feat:修复预览波形只能展示一个的bug + iverilog工具映射

This commit is contained in:
Roe-xin
2026-01-12 12:01:16 +08:00
parent e440dd2773
commit faa7b63aee
3 changed files with 3 additions and 4 deletions

View File

@ -14,9 +14,7 @@ export function getContextButtonContent(): string {
<path d="M469.333333 469.333333V170.666667h85.333334v298.666666h298.666666v85.333334h-298.666666v298.666666h-85.333334v-298.666666H170.666667v-85.333334h298.666666z" fill="#8a8a8a" p-id="4995"></path> <path d="M469.333333 469.333333V170.666667h85.333334v298.666666h298.666666v85.333334h-298.666666v298.666666h-85.333334v-298.666666H170.666667v-85.333334h298.666666z" fill="#8a8a8a" p-id="4995"></path>
</svg> </svg>
<span class="add-context-label">添加上下文</span> <span class="add-context-label">添加上下文</span>
<svg class="dropdown-arrow" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
<path d="M512 714.666667L213.333333 416l42.666667-42.666667L512 629.333333l256-256 42.666667 42.666667z" fill="currentColor"/>
</svg>
</button> </button>
<span class="tooltiptext">添加文件、文件夹、图片或文档作为上下文</span> <span class="tooltiptext">添加文件、文件夹、图片或文档作为上下文</span>
</div> </div>

View File

@ -760,6 +760,7 @@ export function getMessageAreaScript(): string {
'spawnDebugger': '波形调试', 'spawnDebugger': '波形调试',
'askUser': '用户提问', 'askUser': '用户提问',
'updatePhase': '已更新阶段', 'updatePhase': '已更新阶段',
'iverilog': '已完成编译',
}; };
return toolNameMap[toolName] || toolName; return toolNameMap[toolName] || toolName;
} }

View File

@ -174,7 +174,7 @@ export function getWaveformPreviewScript(): string {
const content = document.createElement('div'); const content = document.createElement('div');
content.className = 'waveform-preview-content'; content.className = 'waveform-preview-content';
const miniViewerId = 'waveform-mini-' + Date.now(); const miniViewerId = 'waveform-mini-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9);
const miniViewer = document.createElement('div'); const miniViewer = document.createElement('div');
miniViewer.id = miniViewerId; miniViewer.id = miniViewerId;
miniViewer.className = 'waveform-mini-viewer'; miniViewer.className = 'waveform-mini-viewer';