feat: 工作空间与 AI Tool Calling 深度集成

核心变更:
- 新增 execWorkspaceCommand() 无超时进程执行(workspace.ts)
- 新增 workspace:execTool IPC 通道(无超时,5MB 输出上限)
- run_command 工具改用 workspace IPC,移除 30s 超时限制
- run_command 默认启用(需用户确认),AI 上下文注入工作空间目录
- Agent Loop 工具执行:run_command 无超时,其他工具保持 30s
- Agent 系统提示词新增工作空间规则(userTerminated/truncated 反馈)

UI 修复:
- Header z-index 提升至 50,Model Bar 提升至 40,Input Area 提升至 30
- 工作空间面板 top 调整为 90px(header + model-bar),不再遮挡菜单
- Input Area 增加 position: relative 确保 z-index 生效

其他:
- 新增 docs/DEVELOPMENT.md 开发规范文档
- 设置面板 run_command 开关文案优化,默认值改为 true
This commit is contained in:
thzxx
2026-04-07 22:24:58 +08:00
parent 4a85879b20
commit d9e9416d35
10 changed files with 492 additions and 25 deletions
+7 -3
View File
@@ -199,7 +199,7 @@ html, body {
-webkit-backdrop-filter: saturate(180%) blur(20px);
border-bottom: 1px solid var(--border-subtle);
flex-shrink: 0;
z-index: 10;
z-index: 50;
}
.header-left {
@@ -392,6 +392,8 @@ html, body {
background: var(--bg-layer-alt);
border-bottom: 1px solid var(--border-subtle);
flex-shrink: 0;
z-index: 40;
position: relative;
}
.model-bar-icon {
@@ -1046,7 +1048,8 @@ html, body {
backdrop-filter: saturate(180%) blur(20px);
-webkit-backdrop-filter: saturate(180%) blur(20px);
border-top: 1px solid var(--border-subtle);
z-index: 20;
z-index: 30;
position: relative;
pointer-events: auto;
}
@@ -2664,12 +2667,13 @@ html, body {
.workspace-panel {
position: fixed;
top: 0;
top: 90px; /* header(44px) + model-bar(46px) */
right: 0;
bottom: 0;
width: 420px;
background: var(--bg-solid, #202020);
border-left: 1px solid var(--border-default, rgba(255,255,255,0.08));
border-top: 1px solid var(--border-default, rgba(255,255,255,0.08));
display: flex;
flex-direction: column;
z-index: 10;