refactor: 工作空间去掉手动命令输入,终止时自动反馈 AI

- 移除工作空间终端的命令输入框和执行按钮
- 用户只能通过终止按钮中断卡住的 AI 命令
- 终止后自动通过 killTool IPC 终止进程,结果自动回传 AI
- 新增 workspace:killTool IPC 和 terminateCurrentToolCommand
- 新增终端底部状态提示(等待/执行中)
- 修复工作空间面板顶部对齐(90px → 92px)
This commit is contained in:
thzxx
2026-04-08 12:57:48 +08:00
parent d5f4112d97
commit d150b53116
7 changed files with 130 additions and 110 deletions
+2
View File
@@ -243,6 +243,8 @@ export interface MetonaDesktopAPI {
execTool: (command: string, cwd?: string) => Promise<{ success: boolean; stdout: string; stderr: string; exitCode: number | null; duration: number; userTerminated: boolean; truncated: boolean }>;
/** AI Tool Calling 命令输出 → 同步到工作空间终端 */
onToolOutput: (callback: (data: { command: string; stdout: string; stderr: string; exitCode: number | null }) => void) => void;
/** 终止当前 AI 工具命令 */
killTool: () => Promise<{ killed: boolean }>;
};
}