From 40632982937367c89d23d786ac93cfa7cb5b0668 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 25 Aug 2025 11:28:17 -0500 Subject: [PATCH] mktmp ready file --- packages/cli/src/ui/App.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index dc724cda..210d64fd 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -63,7 +63,7 @@ import { type IdeContext, ideContext, } from '@google/gemini-cli-core'; -import { execFile } from 'child_process'; +import { exec, execFile } from 'child_process'; import { IdeIntegrationNudge, IdeIntegrationNudgeResult, @@ -621,6 +621,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { const filePath = '/tmp/regex.txt'; if (fs.existsSync(filePath)) { const content = fs.readFileSync(filePath, 'utf-8'); + fs.appendFileSync('/tmp/gemini-cli.log', content); if (content.trim().length > 0) { handleFinalSubmit(content); } @@ -631,6 +632,21 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { return () => clearInterval(interval); }, [handleFinalSubmit]); + const previousStreamingState = useRef(streamingState); + useEffect(() => { + if ( + previousStreamingState.current !== StreamingState.Idle && + streamingState === StreamingState.Idle + ) { + exec('touch /tmp/regex.ready', (error) => { + if (error) { + console.error(`exec error: ${error}`); + } + }); + } + previousStreamingState.current = streamingState; + }, [streamingState]); + const handleIdePromptComplete = useCallback( (result: IdeIntegrationNudgeResult) => { if (result.userSelection === 'yes') {