summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-03-03 15:06:07 -0500
committerDax Raad <[email protected]>2026-03-03 15:08:11 -0500
commitc78e7e1a286968369b6521f4d2a3d78d35659b7e (patch)
treef79ffa05db394ccdfdf7e8c87058506e5f5e6dfc
parente3a787a7a3c093935e7972ba606b3f0e3e7d2890 (diff)
downloadopencode-c78e7e1a286968369b6521f4d2a3d78d35659b7e.tar.gz
opencode-c78e7e1a286968369b6521f4d2a3d78d35659b7e.zip
tui: show pending toolcall count instead of generic 'Running...' message
-rw-r--r--packages/opencode/src/cli/cmd/tui/routes/session/index.tsx28
1 files changed, 5 insertions, 23 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 7a7f6ce9f..26b263195 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
@@ -1411,13 +1411,6 @@ function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: Ass
// OpenRouter sends encrypted reasoning data that appears as [REDACTED]
return props.part.text.replace("[REDACTED]", "").trim()
})
- const streaming = createMemo(() => {
- if (!props.last) return false
- if (props.part.time.end) return false
- if (props.message.time.completed) return false
- if (props.message.error) return false
- return true
- })
return (
<Show when={content() && ctx.showThinking()}>
<box
@@ -1432,7 +1425,7 @@ function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: Ass
<code
filetype="markdown"
drawUnstyledText={false}
- streaming={streaming()}
+ streaming={true}
syntaxStyle={subtleSyntax()}
content={"_Thinking:_ " + content()}
conceal={ctx.conceal()}
@@ -1446,13 +1439,6 @@ function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: Ass
function TextPart(props: { last: boolean; part: TextPart; message: AssistantMessage }) {
const ctx = use()
const { theme, syntax } = useTheme()
- const streaming = createMemo(() => {
- if (!props.last) return false
- if (props.part.time?.end) return false
- if (props.message.time.completed) return false
- if (props.message.error) return false
- return true
- })
return (
<Show when={props.part.text.trim()}>
<box id={"text-" + props.part.id} paddingLeft={3} marginTop={1} flexShrink={0}>
@@ -1460,20 +1446,16 @@ function TextPart(props: { last: boolean; part: TextPart; message: AssistantMess
<Match when={Flag.OPENCODE_EXPERIMENTAL_MARKDOWN}>
<markdown
syntaxStyle={syntax()}
- streaming={streaming()}
+ streaming={true}
content={props.part.text.trim()}
conceal={ctx.conceal()}
- tableOptions={{
- widthMode: "full",
- columnFitter: "balanced",
- }}
/>
</Match>
<Match when={!Flag.OPENCODE_EXPERIMENTAL_MARKDOWN}>
<code
filetype="markdown"
drawUnstyledText={false}
- streaming={streaming()}
+ streaming={true}
syntaxStyle={syntax()}
content={props.part.text.trim()}
conceal={ctx.conceal()}
@@ -1997,8 +1979,8 @@ function Task(props: ToolProps<typeof TaskTool>) {
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 (current()) content.push(`⤷ ${Locale.titlecase(current()!.tool)} ${(current()!.state as any).title}`)
+ else content.push(`⤷ ${tools().length} toolcalls`)
}
if (props.part.state.status === "completed") {