From c27779e1b2c2a4ac94274d55a1d6ee7061a06497 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 3 Mar 2026 14:09:27 -0500 Subject: [PATCH] tui: improve task status display readability in session view Refactored task status rendering to provide clearer information about tool execution progress. Users now see a more consistent and readable format showing active tool calls and completion timing. --- .../src/cli/cmd/tui/routes/session/index.tsx | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 35a3c50fc4..7103bec2d3 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1973,6 +1973,23 @@ function Task(props: ToolProps) { return assistant - first }) + const content = createMemo(() => { + if (!props.input.description) return "" + let content = [`Task ${props.input.description}`] + + if (isRunning() && tools().length > 0) { + content[0] += ` · ${tools().length} toolcalls` + if (current()) content.push(`⤷ ${Locale.titlecase(current()!.tool)} ${(current()!.state as any).title}`) + else content.push(`⤷ Running...`) + } + + if (props.part.state.status === "completed") { + content.push(`└ ${tools().length} toolcalls · ${Locale.duration(duration())}`) + } + + return content.join("\n") + }) + return ( ) { pending="Delegating..." part={props.part} > - Task {props.input.description} - 0}> - {" "} - · {tools().length} toolcalls - - {"\n└"} {Locale.titlecase(current()!.tool)} {(current()!.state as any).title} - - - - {"\n└ "} - {tools().length} toolcalls · {Locale.duration(duration())} - + {content()} ) }