feat: 工具卡片从聊天区域迁移到工作空间面板

- 工作空间新增「🔧 工具」页签,专门展示工具调用卡片
- 工具执行时自动切换到工具页签
- run_command 执行时自动切换到终端页签
- AI 回复消息不再显示工具卡片,保持聊天区域简洁
- 工具页签支持清空、自动滚动、状态统计
This commit is contained in:
thzxx
2026-04-19 19:01:43 +08:00
parent b81bb4dd60
commit c7f2fe0c27
5 changed files with 390 additions and 32 deletions
+17
View File
@@ -170,6 +170,7 @@
<span class="ws-title">🖥️ 工作空间</span>
<div class="ws-tabs">
<button class="ws-header-tab active" id="wsTabTerminal">💻 命令行</button>
<button class="ws-header-tab" id="wsTabTools">🔧 工具</button>
<button class="ws-header-tab" id="wsTabFiles">📁 文件</button>
</div>
</div>
@@ -195,6 +196,22 @@
</div>
</div>
<!-- 工具调用 Tab -->
<div class="ws-content" id="wsToolsContent" style="display:none;">
<div class="ws-tools-output" id="wsToolsOutput"></div>
<div class="ws-term-toolbar">
<span class="ws-tools-hint" id="wsToolsHint">等待工具调用...</span>
<div class="ws-term-toolbar-btns">
<button class="ws-toolbar-btn" id="wsToolsClearBtn" title="清空">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="3 6 5 6 21 6"/>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
</svg>
</button>
</div>
</div>
</div>
<!-- 文件 Tab -->
<div class="ws-content" id="wsFilesContent" style="display:none;">
<div class="ws-file-toolbar">