Stop showing the held tool call as running during a pause

This commit is contained in:
Ian Gulliver
2026-10-22 22:14:19 -07:00
parent 293c21ca8c
commit 11e21bcf18
6 changed files with 42 additions and 12 deletions
+14 -1
View File
@@ -78,6 +78,7 @@ final class Row: Identifiable {
var tag = false
var result: String?
var unfinished = false
var held = false
var started: Date?
var status = "starting…"
var statusState = SubagentState.running
@@ -97,7 +98,7 @@ final class Row: Identifiable {
var pending: Bool {
switch kind {
case .tool, .subagent:
return result == nil && !unfinished
return result == nil && !unfinished && !held
case .group:
return body!.rows.contains { $0.pending }
default:
@@ -590,6 +591,18 @@ final class TranscriptBuilder {
ctx.questions[item.id]?.question = item
continue
}
if ev.kind == "agent.held" {
ctx.tools[jsString(p["tool_use_id"])]?.held = true
continue
}
if ev.kind == "session.paused" {
if !bool(p, "paused") {
for tool in ctx.tools.values {
tool.held = false
}
}
continue
}
let sub = ctx.subagents[parent]
if ev.kind == "agent.tool_call" && isSubagentCall(p) {
let row = renderSubagent(p, parent)