From e486d84d6a627ce2563ac2313d55c46a663d4bc0 Mon Sep 17 00:00:00 2001
From: Taylor Mullen <ntaylormullen@google.com>
Date: Fri, 16 May 2025 22:26:03 -0700
Subject: feat: Patch console.debug and display only in debug mode

- Patches `console.debug` in `ConsolePatcher.tsx` to capture debug messages.
- Updates `ConsoleOutput` to only display debug messages when `debugMode` is enabled.
- Passes `debugMode` prop from `App.tsx` to `ConsoleOutput`.

Fixes https://github.com/google-gemini/gemini-cli/issues/397
---
 packages/cli/src/ui/App.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/cli/src/ui/App.tsx')

diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx
index e607955a..70ece34f 100644
--- a/packages/cli/src/ui/App.tsx
+++ b/packages/cli/src/ui/App.tsx
@@ -409,7 +409,7 @@ export const App = ({
           cliVersion={cliVersion}
           geminiMdFileCount={geminiMdFileCount}
         />
-        <ConsoleOutput />
+        <ConsoleOutput debugMode={config.getDebugMode()} />
       </Box>
     </Box>
   );
-- 
cgit v1.2.3

