File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -300,11 +300,28 @@ async function main(): Promise<void> {
300300 backgroundColor : 'transparent' ,
301301 exitOnCtrlC : false ,
302302 } )
303- createRoot ( renderer ) . render (
303+
304+ const root = createRoot ( renderer )
305+
306+ // React component tree to render
307+ const app = (
304308 < QueryClientProvider client = { queryClient} >
305309 < AppWithAsyncAuth / >
306- < / QueryClientProvider > ,
310+ < / QueryClientProvider >
307311 )
312+
313+ // Add resize event listener for terminal resize support on Windows PowerShell
314+ // On Windows, the SIGWINCH signal may not fire reliably, so we listen to
315+ // process.stdout 'resize' event to ensure the UI updates when the window is resized
316+ if ( process . stdout . isTTY ) {
317+ process . stdout . on ( 'resize' , ( ) => {
318+ // Re-render the React tree to update with new terminal dimensions
319+ root . render ( app )
320+ } )
321+ }
322+
323+ // Initial render
324+ root . render ( app )
308325}
309326
310327void main ( )
You can’t perform that action at this time.
0 commit comments