fix(web): replayed tool call after resume reuses its card (duplicate React key)
A suspended agent.propose_options / approval call is replayed on resume with the same toolCallId; foldEvents pushed a second item with the same key, which also inflated the tool call meter. Also use 「」 in the report footnote. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a99c77ce4e
commit
57346d438c
3 files changed
+40
-2
No files matched your search
@@ -106,6 +106,14 @@ export function foldEvents(events: AgentRunEvent[]): StreamItem[] {
|
||||
else items.push({ kind: "thinking", key: `th${e.seq}`, text: e.delta, at: e.at });
|
||||
break;
|
||||
case "tool_call_start": {
|
||||
// 挂起的调用(方案选择 / 审批 / 等子会话)恢复时按同一 toolCallId 重放:沿用原卡片,不重复出卡
|
||||
const prev = tools.get(e.toolCallId);
|
||||
if (prev) {
|
||||
Object.assign(prev, { status: "running", outputSummary: null, reason: null, endedAt: null });
|
||||
prev.recovery = e.recovery;
|
||||
if (e.inputSummary) prev.inputSummary = e.inputSummary;
|
||||
break;
|
||||
}
|
||||
const call: ToolCallView = {
|
||||
toolCallId: e.toolCallId,
|
||||
capabilityId: e.capabilityId,
|
||||
|
||||
Reference in new issue
Block a user