diff options
| author | Sandy Tao <[email protected]> | 2025-06-27 16:39:54 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-27 23:39:54 +0000 |
| commit | 150df382f8e0b84aa6028622480c28186c99b8a7 (patch) | |
| tree | bf2e663e90914390408202aed409a95dfd56fe57 /packages/cli/src/ui/App.tsx | |
| parent | 19d2a0fb35ff75ebbed2dda5c8574ffcc66cd4d5 (diff) | |
Upgrade to Ink 6 and React 19 (#2096)
Co-authored-by: jacob314 <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/App.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index bccba9e6..6bbe47d4 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -351,18 +351,6 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => { // the user starts interacting with the app. enteringConstrainHeightMode = true; setConstrainHeight(true); - - // If our pending history item happens to exceed the terminal height we will most likely need to refresh - // our static collection to ensure no duplication or tearing. This is currently working around a core bug - // in Ink which we have a PR out to fix: https://github.com/vadimdemedes/ink/pull/717 - if (pendingHistoryItemRef.current && pendingHistoryItems.length > 0) { - const pendingItemDimensions = measureElement( - pendingHistoryItemRef.current, - ); - if (pendingItemDimensions.height > availableTerminalHeight) { - refreshStatic(); - } - } } if (key.ctrl && input === 'o') { @@ -531,23 +519,6 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => { }, [terminalWidth, terminalHeight, refreshStatic]); useEffect(() => { - if (!pendingHistoryItems.length) { - return; - } - - const pendingItemDimensions = measureElement( - pendingHistoryItemRef.current!, - ); - - // If our pending history item happens to exceed the terminal height we will most likely need to refresh - // our static collection to ensure no duplication or tearing. This is currently working around a core bug - // in Ink which we have a PR out to fix: https://github.com/vadimdemedes/ink/pull/717 - if (pendingItemDimensions.height > availableTerminalHeight) { - setStaticNeedsRefresh(true); - } - }, [pendingHistoryItems.length, availableTerminalHeight, streamingState]); - - useEffect(() => { if (streamingState === StreamingState.Idle && staticNeedsRefresh) { setStaticNeedsRefresh(false); refreshStatic(); |
