diff options
| author | Olcan <[email protected]> | 2025-05-30 01:58:09 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-30 01:58:09 -0700 |
| commit | 7c4a5464f68db32bb0069927f65deb2a61bd094f (patch) | |
| tree | 445a4808aa53c0f7026a1f466edb07a266f1e6a3 /packages/cli/src/ui/components/messages | |
| parent | a3b557222a95965de39920922df21439d69def57 (diff) | |
truncate (hide) tool output at the top, add some spacing, also fix shell output interval change accidentally undone in a previous commit (#619)
Diffstat (limited to 'packages/cli/src/ui/components/messages')
| -rw-r--r-- | packages/cli/src/ui/components/messages/ToolMessage.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/cli/src/ui/components/messages/ToolMessage.tsx b/packages/cli/src/ui/components/messages/ToolMessage.tsx index 922f59d0..51d3dffb 100644 --- a/packages/cli/src/ui/components/messages/ToolMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolMessage.tsx @@ -47,7 +47,7 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({ const displayableResult = React.useMemo( () => resultIsString - ? lines.slice(0, contentHeightEstimate).join('\n') + ? lines.slice(-contentHeightEstimate).join('\n') : resultDisplay, [lines, resultIsString, contentHeightEstimate, resultDisplay], ); @@ -66,8 +66,16 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({ {emphasis === 'high' && <TrailingIndicator />} </Box> {displayableResult && ( - <Box paddingLeft={STATUS_INDICATOR_WIDTH} width="100%"> + <Box paddingLeft={STATUS_INDICATOR_WIDTH} width="100%" marginTop={1}> <Box flexDirection="column"> + {hiddenLines > 0 && ( + <Box> + <Text color={Colors.SubtleComment}> + ... first {hiddenLines} line{hiddenLines === 1 ? '' : 's'}{' '} + hidden ... + </Text> + </Box> + )} {typeof displayableResult === 'string' && ( <Box flexDirection="column"> <MarkdownDisplay @@ -83,14 +91,6 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({ filename={displayableResult.fileName} /> )} - {hiddenLines > 0 && ( - <Box> - <Text color={Colors.SubtleComment}> - ... {hiddenLines} more line{hiddenLines === 1 ? '' : 's'}{' '} - hidden ... - </Text> - </Box> - )} </Box> </Box> )} |
