Skip to content

Commit fa3027b

Browse files
committed
Simplify thinking block
1 parent 2fbbb56 commit fa3027b

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

cli/src/components/blocks/thinking-block.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Thinking } from '../thinking'
55
import type { ContentBlock } from '../../types/chat'
66

77
// Nested thinking blocks need more offset to account for the subagent's border and padding
8-
const WIDTH_OFFSET = 8
9-
const NESTED_WIDTH_OFFSET = 12
8+
const WIDTH_OFFSET = 6
9+
const NESTED_WIDTH_OFFSET = 10
1010

1111
interface ThinkingBlockProps {
1212
blocks: Extract<ContentBlock, { type: 'text' }>[]

cli/src/components/thinking.tsx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ export const Thinking = memo(
3333
width,
3434
PREVIEW_LINE_COUNT,
3535
)
36-
// Pad to exactly PREVIEW_LINE_COUNT lines for consistent height while streaming.
37-
const previewLines = [...lines]
38-
while (previewLines.length < PREVIEW_LINE_COUNT) {
39-
previewLines.push('')
40-
}
4136

4237
return (
4338
<Button
@@ -49,21 +44,8 @@ export const Thinking = memo(
4944
}}
5045
onClick={onToggle}
5146
>
52-
<box
53-
style={{
54-
flexDirection: 'row',
55-
alignSelf: 'flex-start',
56-
}}
57-
>
58-
<text
59-
style={{ wrapMode: 'none', attributes: TextAttributes.BOLD }}
60-
fg={theme.foreground}
61-
>
62-
• Thinking
63-
</text>
64-
</box>
6547
{isCollapsed ? (
66-
previewLines.length > 0 && (
48+
lines.length > 0 && (
6749
<box
6850
style={{
6951
flexDirection: 'row',
@@ -93,7 +75,7 @@ export const Thinking = memo(
9375
}}
9476
attributes={TextAttributes.ITALIC}
9577
>
96-
{(hasMore ? '...' : '') + previewLines.join(' ')}
78+
{hasMore ? '...' + lines.join(' ') : lines.join(' ')}
9779
</text>
9880
</box>
9981
</box>

0 commit comments

Comments
 (0)