summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/ShowMoreLines.tsx
diff options
context:
space:
mode:
authorN. Taylor Mullen <[email protected]>2025-06-22 16:57:53 +0100
committerGitHub <[email protected]>2025-06-22 15:57:53 +0000
commit3c656cfbc619e82c3ecf3ea5356cf34cac58c539 (patch)
tree794f8441f9ed134da53d37d2ca002d0693745239 /packages/cli/src/ui/components/ShowMoreLines.tsx
parentcb76b08e31630d41c006323e8de211d7f14aaebd (diff)
feat: Only show ctrl-s when idle (#1299)
Diffstat (limited to 'packages/cli/src/ui/components/ShowMoreLines.tsx')
-rw-r--r--packages/cli/src/ui/components/ShowMoreLines.tsx11
1 files changed, 9 insertions, 2 deletions
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 (
<Box>
<Text color={Colors.Gray} wrap="truncate">
- Press Ctrl-S to show more lines
+ Press ctrl-s to show more lines
</Text>
</Box>
);