tui: show pending toolcall count instead of generic 'Running...' message

This commit is contained in:
Dax Raad 2026-03-03 15:06:07 -05:00
parent e3a787a7a3
commit c78e7e1a28

View File

@ -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") {