Skip to content

Commit fdc51f6

Browse files
committed
Hide thinking if single bold phrase
1 parent 62e9f99 commit fdc51f6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cli/src/components/thinking.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ export const Thinking = memo(
3030
const theme = useTheme()
3131
const { contentMaxWidth } = useTerminalDimensions()
3232

33+
// Special case: single **bold** string under 100 chars gets compact rendering
34+
const singleBoldMatch = content.length < 100 ? content.trim().match(/^\*\*([^*]+)\*\*$/) : null
35+
if (singleBoldMatch) {
36+
return (
37+
null
38+
)
39+
}
40+
3341
const width = Math.max(10, availableWidth ?? contentMaxWidth)
3442
// Normalize content to single line for consistent preview
3543
const normalizedContent = content.replace(/\n+/g, ' ').trim()
@@ -46,9 +54,9 @@ export const Thinking = memo(
4654

4755
const toggleIndicator =
4856
!isThinkingComplete ? '• '
49-
: showFull ? '▾ '
50-
: showPreview ? '• '
51-
: '▸ '
57+
: showFull ? '▾ '
58+
: showPreview ? '• '
59+
: '▸ '
5260

5361
return (
5462
<Button

0 commit comments

Comments
 (0)