fix(tui): simplify thinking toggle styling (#28487)

This commit is contained in:
Aiden Cline
2026-05-20 15:54:29 -05:00
committed by GitHub
parent 3fc4e936c6
commit 930ab80931
3 changed files with 50 additions and 24 deletions
@@ -411,12 +411,9 @@ function AssistantReasoning(props: {
<Switch>
<Match when={!inMinimal() || expanded()}>
<box
paddingLeft={2}
paddingLeft={3}
marginTop={1}
flexDirection="column"
border={["left"]}
customBorderChars={SplitBorder.customBorderChars}
borderColor={theme.backgroundElement}
flexShrink={0}
onMouseUp={toggle}
>
@@ -425,17 +422,20 @@ function AssistantReasoning(props: {
drawUnstyledText={false}
streaming={true}
syntaxStyle={props.subtleSyntax}
content={(inMinimal() ? " " : "") + "_Thinking:_ " + content()}
content={(inMinimal() ? "- " : "") + "_Thinking:_ " + content()}
conceal={true}
fg={theme.textMuted}
/>
</box>
</Match>
<Match when={isDone()}>
<box paddingLeft={3} marginTop={1} flexShrink={0} onMouseUp={toggle}>
<text fg={theme.textMuted} wrapMode="none">
{title() ? "▶ Thought: " + title() : "▶ Thought"}
</text>
<box
paddingLeft={3}
marginTop={1}
flexShrink={0}
onMouseUp={toggle}
>
<CollapsedReasoningText title={title()} />
</box>
</Match>
<Match when={true}>
@@ -448,6 +448,16 @@ function AssistantReasoning(props: {
)
}
function CollapsedReasoningText(props: { title: string | null }) {
const { theme } = useTheme()
return (
<text fg={theme.warning} wrapMode="none">
<span style={{ fg: theme.warning, italic: true }}>{props.title ? "+ Thought · " + props.title : "+ Thought"}</span>
</text>
)
}
function AssistantTool(props: { part: SessionMessageAssistantTool; sessionID: string }) {
const input = createMemo(() => toolInputRecord(props.part.state.input))
const toolprops = {