From c63350cfd67a2d228749f069141e09a83d3e8814 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Mon, 30 Mar 2026 22:25:56 +0000 Subject: [PATCH] fix broken tests (#24279) --- packages/cli/src/gemini.tsx | 2 -- packages/cli/src/interactiveCli.tsx | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index 8d7d85b50b..5bd9944f63 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -92,7 +92,6 @@ import { setupTerminalAndTheme } from './utils/terminalTheme.js'; import { runDeferredCommand } from './deferred.js'; import { cleanupBackgroundLogs } from './utils/logCleanup.js'; import { SlashCommandConflictHandler } from './services/SlashCommandConflictHandler.js'; -import { initializeConsoleStore } from './ui/hooks/useConsoleMessages.js'; export function validateDnsResolutionOrder( order: string | undefined, @@ -294,7 +293,6 @@ export async function main() { process.exit(ExitCodes.FATAL_INPUT_ERROR); } - initializeConsoleStore(); const isDebugMode = cliConfig.isDebugMode(argv); const consolePatcher = new ConsolePatcher({ stderr: true, diff --git a/packages/cli/src/interactiveCli.tsx b/packages/cli/src/interactiveCli.tsx index a6337ef29c..2e0cd25619 100644 --- a/packages/cli/src/interactiveCli.tsx +++ b/packages/cli/src/interactiveCli.tsx @@ -46,6 +46,7 @@ import { TerminalProvider } from './ui/contexts/TerminalContext.js'; import { isAlternateBufferEnabled } from './ui/hooks/useAlternateBuffer.js'; import { OverflowProvider } from './ui/contexts/OverflowContext.js'; import { profiler } from './ui/components/DebugProfiler.js'; +import { initializeConsoleStore } from './ui/hooks/useConsoleMessages.js'; const SLOW_RENDER_MS = 200; @@ -57,6 +58,7 @@ export async function startInteractiveUI( resumedSessionData: ResumedSessionData | undefined, initializationResult: InitializationResult, ) { + initializeConsoleStore(); // Never enter Ink alternate buffer mode when screen reader mode is enabled // as there is no benefit of alternate buffer mode when using a screen reader // and the Ink alternate buffer mode requires line wrapping harmful to