diff --git a/package.json b/package.json index 3bf9b7dd..958e5888 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test:integration:sandbox:docker": "GEMINI_SANDBOX=docker node integration-tests/run-tests.js", "test:integration:sandbox:podman": "GEMINI_SANDBOX=podman node integration-tests/run-tests.js", "start": "node scripts/start.js", - "debug": "cross-env DEBUG=1 node scripts/start.js", + "debug": "cross-env DEBUG=1 node --inspect-brk scripts/start.js", "lint:fix": "eslint . --fix && eslint integration-tests --fix", "lint": "eslint . --ext .ts,.tsx && eslint integration-tests", "typecheck": "npm run typecheck --workspaces --if-present", diff --git a/packages/cli/src/ui/components/ShowMoreLines.tsx b/packages/cli/src/ui/components/ShowMoreLines.tsx index bfcefcbf..41232d94 100644 --- a/packages/cli/src/ui/components/ShowMoreLines.tsx +++ b/packages/cli/src/ui/components/ShowMoreLines.tsx @@ -6,6 +6,8 @@ import { Box, Text } from 'ink'; import { useOverflowState } from '../contexts/OverflowContext.js'; +import { useStreamingContext } from '../contexts/StreamingContext.js'; +import { StreamingState } from '../types.js'; import { Colors } from '../colors.js'; interface ShowMoreLinesProps { @@ -14,11 +16,16 @@ interface ShowMoreLinesProps { export const ShowMoreLines = ({ constrainHeight }: ShowMoreLinesProps) => { const overflowState = useOverflowState(); + const streamingState = useStreamingContext(); if ( overflowState === undefined || overflowState.overflowingIds.size === 0 || - !constrainHeight + !constrainHeight || + !( + streamingState === StreamingState.Idle || + streamingState === StreamingState.WaitingForConfirmation + ) ) { return null; } @@ -26,7 +33,7 @@ export const ShowMoreLines = ({ constrainHeight }: ShowMoreLinesProps) => { return ( - Press Ctrl-S to show more lines + Press ctrl-s to show more lines );