File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,14 @@ export const Thinking = memo(
2525 const theme = useTheme ( )
2626 const { contentMaxWidth } = useTerminalDimensions ( )
2727
28- const width = Math . max ( 10 , Math . min ( availableWidth ?? contentMaxWidth , 120 ) )
28+ const width = Math . max ( 10 , availableWidth ?? contentMaxWidth )
2929 // Normalize content to single line for consistent preview
3030 const normalizedContent = content . replace ( / \n + / g, ' ' ) . trim ( )
31+ // Account for "..." prefix (3 chars) when calculating line widths
32+ const effectiveWidth = width - 3
3133 const { lines, hasMore } = getLastNVisualLines (
3234 normalizedContent ,
33- width ,
35+ effectiveWidth ,
3436 PREVIEW_LINE_COUNT ,
3537 )
3638
@@ -53,12 +55,12 @@ export const Thinking = memo(
5355 < box style = { { paddingLeft : 2 } } >
5456 < text
5557 style = { {
56- wrapMode : 'word ' ,
58+ wrapMode : 'none ' ,
5759 fg : theme . muted ,
5860 } }
5961 attributes = { TextAttributes . ITALIC }
6062 >
61- { hasMore ? '...' + lines . join ( ' ' ) : lines . join ( ' ' ) }
63+ { hasMore ? '...' + lines . join ( '\n ' ) : lines . join ( '\n ' ) }
6264 </ text >
6365 </ box >
6466 )
You can’t perform that action at this time.
0 commit comments