summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/App.tsx
diff options
context:
space:
mode:
authorJacob Richman <[email protected]>2025-06-22 00:54:10 +0000
committerGitHub <[email protected]>2025-06-22 00:54:10 +0000
commit63f6a497cba61299a1c24aa96795a55479740ac6 (patch)
tree34781289e6296340e7cf76300413b06f8994c1ab /packages/cli/src/ui/App.tsx
parente20171e7ddb7c4d0935dcb578b8395dc560005ec (diff)
Jacob314/overflow notification and one MaxSizedBox bug fix (#1288)
Diffstat (limited to 'packages/cli/src/ui/App.tsx')
-rw-r--r--packages/cli/src/ui/App.tsx57
1 files changed, 33 insertions, 24 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx
index a5e6f361..48d045e3 100644
--- a/packages/cli/src/ui/App.tsx
+++ b/packages/cli/src/ui/App.tsx
@@ -68,6 +68,8 @@ import * as fs from 'fs';
import { UpdateNotification } from './components/UpdateNotification.js';
import { checkForUpdates } from './utils/updateCheck.js';
import ansiEscapes from 'ansi-escapes';
+import { OverflowProvider } from './contexts/OverflowContext.js';
+import { ShowMoreLines } from './components/ShowMoreLines.js';
const CTRL_EXIT_PROMPT_DURATION_MS = 1000;
@@ -560,23 +562,27 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => {
>
{(item) => item}
</Static>
- <Box ref={pendingHistoryItemRef}>
- {pendingHistoryItems.map((item, i) => (
- <HistoryItemDisplay
- key={i}
- availableTerminalHeight={
- constrainHeight ? availableTerminalHeight : undefined
- }
- terminalWidth={mainAreaWidth}
- // TODO(taehykim): It seems like references to ids aren't necessary in
- // HistoryItemDisplay. Refactor later. Use a fake id for now.
- item={{ ...item, id: 0 }}
- isPending={true}
- config={config}
- isFocused={!isEditorDialogOpen}
- />
- ))}
- </Box>
+ <OverflowProvider>
+ <Box ref={pendingHistoryItemRef} flexDirection="column">
+ {pendingHistoryItems.map((item, i) => (
+ <HistoryItemDisplay
+ key={i}
+ availableTerminalHeight={
+ constrainHeight ? availableTerminalHeight : undefined
+ }
+ terminalWidth={mainAreaWidth}
+ // TODO(taehykim): It seems like references to ids aren't necessary in
+ // HistoryItemDisplay. Refactor later. Use a fake id for now.
+ item={{ ...item, id: 0 }}
+ isPending={true}
+ config={config}
+ isFocused={!isEditorDialogOpen}
+ />
+ ))}
+ <ShowMoreLines constrainHeight={constrainHeight} />
+ </Box>
+ </OverflowProvider>
+
{showHelp && <Help commands={slashCommands} />}
<Box flexDirection="column" ref={mainControlsRef}>
@@ -700,13 +706,16 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => {
</Box>
{showErrorDetails && (
- <DetailedMessagesDisplay
- messages={filteredConsoleMessages}
- maxHeight={
- constrainHeight ? debugConsoleMaxHeight : undefined
- }
- width={inputWidth}
- />
+ <OverflowProvider>
+ <DetailedMessagesDisplay
+ messages={filteredConsoleMessages}
+ maxHeight={
+ constrainHeight ? debugConsoleMaxHeight : undefined
+ }
+ width={inputWidth}
+ />
+ <ShowMoreLines constrainHeight={constrainHeight} />
+ </OverflowProvider>
)}
{isInputActive && (