diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/SandboxToolDisplay.swift b/NucleicRemote/NucleicRemote/Views/Transcript/SandboxToolDisplay.swift index b70e0e8..85027d2 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/SandboxToolDisplay.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/SandboxToolDisplay.swift @@ -39,7 +39,8 @@ enum SandboxToolDisplay { case "linux_vm_exec", "linux_vm_control": "Linux VM" case "linux_vm_computer", "linux_vm_computer_batch": "Linux VM screen" case "linux_container": "Linux container" - case "nucleic_supervise": "Supervising subagents" + case "nucleic_supervise": "Supervising subagents" + case AskUserQuestion.nucleicToolName: "Question for you" default: nil } } @@ -68,7 +69,8 @@ enum SandboxToolDisplay { case "mac_vm_request_operator": "Waiting for you to drive the VM…" case "mac_vm_control": "Managing the macOS VM…" case "linux_vm_control": "Managing the Linux VM…" - case "nucleic_supervise": "Waiting on subagents…" + case "nucleic_supervise": "Waiting on subagents…" + case AskUserQuestion.nucleicToolName: "Waiting on your answer…" default: nil } } @@ -86,7 +88,8 @@ enum SandboxToolDisplay { case "mac_vm_clear_notifications": "bell.slash" case "mac_vm_request_operator": "hand.raised" case "mac_vm_control", "linux_vm_control": "power" - case "nucleic_supervise": "eye" + case "nucleic_supervise": "eye" + case AskUserQuestion.nucleicToolName: "questionmark.bubble" default: nil } } @@ -121,6 +124,11 @@ enum SandboxToolDisplay { // Takes no arguments: nothing to print beside the label. case "mac_vm_clear_notifications": return nil + case AskUserQuestion.nucleicToolName: + guard let questions = AskUserQuestion.questions(from: input), + let first = questions.first else { return nil } + let suffix = questions.count > 1 ? " +\(questions.count - 1) more" : "" + return singleLine(first.question) + suffix default: return nil } diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift b/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift index d87121d..ef24529 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift @@ -573,6 +573,7 @@ struct LockLineRow: View { /// SF Symbols for the common tools + file-change kinds, so a glance reads the action. enum ToolGlyph { static func icon(_ name: String) -> String { + if AskUserQuestion.matches(toolName: name) { return "questionmark.bubble" } switch name { case "Bash", "Shell": return "terminal" case "Read": return "doc.text" @@ -581,7 +582,6 @@ enum ToolGlyph { case "WebFetch", "WebSearch": return "globe" case "Task", "Agent", ToolGroup.orchestraSubagentToolName: return "person.2" case "TodoWrite": return "checklist" - case "AskUserQuestion": return "questionmark.bubble" case ExitPlanMode.toolName, PlanReview.toolName, PlanReview.qualifiedToolName: return "list.bullet.clipboard" case HostCommandSummary.hostExecToolName: return "desktopcomputer" diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift b/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift index f71aeed..07ceee1 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift @@ -120,7 +120,7 @@ struct ToolGroup: Equatable { var isOrchestration: Bool { name == "Task" || name == "Agent" || name == Self.orchestraSubagentToolName } - var isAskUserQuestion: Bool { name == "AskUserQuestion" } + var isAskUserQuestion: Bool { AskUserQuestion.matches(toolName: name) } var isExitPlanMode: Bool { PlanReview.isPlanTool(name) } /// The literal shell command a `Bash` call ran, if any (nil for every other tool). Used to