diff --git a/packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx b/packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx index 762a4faa..fba536d2 100644 --- a/packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx +++ b/packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx @@ -27,7 +27,7 @@ export const ConsoleSummaryDisplay: React.FC = ({ {errorCount > 0 && ( {errorIcon} {errorCount} error{errorCount > 1 ? 's' : ''}{' '} - (CTRL-O for details) + (ctrl+O for details) )} diff --git a/packages/cli/src/ui/components/DetailedMessagesDisplay.tsx b/packages/cli/src/ui/components/DetailedMessagesDisplay.tsx index 1ab78426..cd3f37bb 100644 --- a/packages/cli/src/ui/components/DetailedMessagesDisplay.tsx +++ b/packages/cli/src/ui/components/DetailedMessagesDisplay.tsx @@ -33,7 +33,7 @@ export const DetailedMessagesDisplay: React.FC< Debug Console{' '} - (CTRL-O to close) + (ctrl+O to close) {messages.map((msg, index) => { diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index 61632bcb..46d669b7 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -64,10 +64,15 @@ export const Footer: React.FC = ({ ) : process.env.SANDBOX === 'sandbox-exec' ? ( - sandbox-exec ({process.env.SEATBELT_PROFILE}) + sandbox-exec{' '} + + ({process.env.SEATBELT_PROFILE}) + ) : ( - no sandbox (see README) + + no sandbox (see README) + )} diff --git a/packages/cli/src/ui/components/LoadingIndicator.tsx b/packages/cli/src/ui/components/LoadingIndicator.tsx index 31c6fee9..64059d53 100644 --- a/packages/cli/src/ui/components/LoadingIndicator.tsx +++ b/packages/cli/src/ui/components/LoadingIndicator.tsx @@ -37,8 +37,8 @@ export const LoadingIndicator: React.FC = ({ } /> - - {currentLoadingPhrase} + {currentLoadingPhrase} + {streamingState === StreamingState.WaitingForConfirmation ? '' : ` (esc to cancel, ${elapsedTime}s)`} diff --git a/packages/cli/src/ui/components/messages/DiffRenderer.tsx b/packages/cli/src/ui/components/messages/DiffRenderer.tsx index 8780d9c2..1a4c69c0 100644 --- a/packages/cli/src/ui/components/messages/DiffRenderer.tsx +++ b/packages/cli/src/ui/components/messages/DiffRenderer.tsx @@ -260,7 +260,7 @@ const renderDiffContent = ( acc.push( - {gutterNumStr.padEnd(4)} + {gutterNumStr.padEnd(4)} {prefixSymbol}{' '} diff --git a/packages/cli/src/ui/utils/CodeColorizer.tsx b/packages/cli/src/ui/utils/CodeColorizer.tsx index 1916ff50..8f905498 100644 --- a/packages/cli/src/ui/utils/CodeColorizer.tsx +++ b/packages/cli/src/ui/utils/CodeColorizer.tsx @@ -94,16 +94,31 @@ export function colorizeCode( const activeTheme = themeManager.getActiveTheme(); try { - const hastTree = - !language || !lowlight.registered(language) - ? lowlight.highlightAuto(codeToHighlight) - : lowlight.highlight(language, codeToHighlight); - // Render the HAST tree using the adapted theme // Apply the theme's default foreground color to the top-level Text element + const lines = codeToHighlight.split('\n'); + const getHighlightedLines = (line: string) => + !language || !lowlight.registered(language) + ? lowlight.highlightAuto(line) + : lowlight.highlight(language, line); + return ( - - {renderHastNode(hastTree, activeTheme, undefined)} + + {lines.map((line, index) => ( + + + {`${String(index + 1).padStart(3, ' ')} `} + + + {renderHastNode( + getHighlightedLines(line), + activeTheme, + undefined, + )} + + {index < lines.length - 1 && '\n'} + + ))} ); } catch (error) { @@ -112,6 +127,20 @@ export function colorizeCode( error, ); // Fallback to plain text with default color on error - return {codeToHighlight}; + // Also display line numbers in fallback + const lines = codeToHighlight.split('\n'); + return ( + + {lines.map((line, index) => ( + + + {`${String(index + 1).padStart(3, ' ')} `} + + {line} + {index < lines.length - 1 && '\n'} + + ))} + + ); } }