fix(tui): restore thinking spinner (#29765)

This commit is contained in:
Aiden Cline
2026-05-28 11:24:45 -05:00
committed by GitHub
parent 425a4f584f
commit af30b315b2
2 changed files with 46 additions and 28 deletions
@@ -442,16 +442,25 @@ function ReasoningHeader(props: { toggleable: boolean; open: boolean; done: bool
: theme.warning : theme.warning
return ( return (
<text fg={fg()} wrapMode="none"> <Switch>
<Show when={props.toggleable}> <Match when={!props.done}>
<span>{props.open ? "- " : "+ "}</span> <box flexDirection="row">
</Show> <Spinner color={fg()}>{props.title ? "Thinking: " + props.title : "Thinking"}</Spinner>
<span>{props.done ? "Thought" : "Thinking"}</span> </box>
<Show when={props.title}> </Match>
<span>: </span> <Match when={true}>
<span>{props.title}</span> <text fg={fg()} wrapMode="none">
</Show> <Show when={props.toggleable}>
</text> <span>{props.open ? "- " : "+ "}</span>
</Show>
<span>Thought</span>
<Show when={props.title}>
<span>: </span>
<span>{props.title}</span>
</Show>
</text>
</Match>
</Switch>
) )
} }
@@ -1595,24 +1595,33 @@ function ReasoningHeader(props: {
: theme.warning : theme.warning
return ( return (
<text fg={fg()} wrapMode="none"> <Switch>
<Show when={props.toggleable}> <Match when={!props.done}>
<span>{props.open ? "- " : "+ "}</span> <box flexDirection="row">
</Show> <Spinner color={fg()}>{props.title ? "Thinking: " + props.title : "Thinking"}</Spinner>
<span>{props.done ? "Thought" : "Thinking"}</span> </box>
<Show when={props.title || props.duration}> </Match>
<span>: </span> <Match when={true}>
</Show> <text fg={fg()} wrapMode="none">
<Show when={props.title}> <Show when={props.toggleable}>
<span>{props.title}</span> <span>{props.open ? "- " : "+ "}</span>
</Show> </Show>
<Show when={props.duration}> <span>Thought</span>
<span> <Show when={props.title || props.duration}>
{props.title ? " · " : ""} <span>: </span>
{props.duration} </Show>
</span> <Show when={props.title}>
</Show> <span>{props.title}</span>
</text> </Show>
<Show when={props.duration}>
<span>
{props.title ? " · " : ""}
{props.duration}
</span>
</Show>
</text>
</Match>
</Switch>
) )
} }