From a66ad2e2af3d4ffd0a7ab125215e7ed3c3325452 Mon Sep 17 00:00:00 2001
From: Juliette Love <juliette29love@gmail.com>
Date: Sun, 20 Apr 2025 20:20:40 +0100
Subject: Simple debug mode for CLI side (#66)

* Adds debug mode config flag.

* Wire through debug lines

* Add debug mode logging example

* Run format

* Run format again
---
 packages/cli/src/ui/App.tsx | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(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 14b76c8f..cfbc024e 100644
--- a/packages/cli/src/ui/App.tsx
+++ b/packages/cli/src/ui/App.tsx
@@ -31,11 +31,8 @@ interface AppProps {
 export const App = ({ config }: AppProps) => {
   const [history, setHistory] = useState<HistoryItem[]>([]);
   const [startupWarnings, setStartupWarnings] = useState<string[]>([]);
-  const { streamingState, submitQuery, initError } = useGeminiStream(
-    setHistory,
-    config.getApiKey(),
-    config.getModel(),
-  );
+  const { streamingState, submitQuery, initError, debugMessage } =
+    useGeminiStream(setHistory, config.getApiKey(), config.getModel());
   const { elapsedTime, currentLoadingPhrase } =
     useLoadingIndicator(streamingState);
 
@@ -147,7 +144,11 @@ export const App = ({ config }: AppProps) => {
         </>
       )}
 
-      <Footer queryLength={query.length} />
+      <Footer
+        queryLength={query.length}
+        debugMode={config.getDebugMode()}
+        debugMessage={debugMessage}
+      />
       <ITermDetectionWarning />
     </Box>
   );
-- 
cgit v1.2.3

