From 2b90445b9ac4d477a1acf4e1e8abd930701d971b Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sun, 14 Jun 2026 11:33:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(workflow):=20kill=20=E6=95=B4=E4=B8=AA=20w?= =?UTF-8?q?orkflow=20=E5=90=8E=E7=AB=8B=E5=8D=B3=E5=9B=9E=E4=B8=BB=20chat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_done→store→notifications.ts 的通知路径已有,但 confirmYes 后面板继续 挂着挡住主 chat,用户看不到"已停止"反馈。kill 后调 onDone() 立即退出面板, 让主 chat 的 `Workflow "" was stopped` 通知直接可见。 Co-Authored-By: glm-5.2 --- src/workflow/panel/WorkflowsPanel.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/workflow/panel/WorkflowsPanel.tsx b/src/workflow/panel/WorkflowsPanel.tsx index be6a3570a..477590a92 100644 --- a/src/workflow/panel/WorkflowsPanel.tsx +++ b/src/workflow/panel/WorkflowsPanel.tsx @@ -150,6 +150,12 @@ export function WorkflowsPanel({ confirmYes: () => { if (confirmKill === 'workflow' && focused) { svc.kill(focused.runId); + // 杀掉整个 workflow 后立即回主 chat:run_done 事件 → store reducer 把 status 改为 + // killed → notifications.ts 桥接 enqueuePendingNotification,主 chat 展示 + // `Workflow "" was stopped`。继续停在面板反而让用户错过"已停止"反馈。 + setConfirmKill(null); + onDone(); + return; } else if (confirmKill === 'agent' && focused) { const agent = visibleAgents[clampedAgent]; if (agent) svc.killAgent(focused.runId, agent.id);