diff options
| author | Castor Regex <[email protected]> | 2025-08-25 10:21:30 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-25 10:21:30 -0500 |
| commit | 090986ca5a74ebec4cf94164524b7420ded5937b (patch) | |
| tree | c4fb8fe5071d362c778ba814c0fba0101907c14b /packages/cli/src/ui/App.tsx | |
| parent | 2747a978c7df016780b9b65bc6602d47ad54d450 (diff) | |
feat: poll for /tmp/regex.txt and process contents
Diffstat (limited to 'packages/cli/src/ui/App.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index d93efcf0..dc724cda 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -616,6 +616,21 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { [addMessage], ); + useEffect(() => { + const interval = setInterval(() => { + const filePath = '/tmp/regex.txt'; + if (fs.existsSync(filePath)) { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.trim().length > 0) { + handleFinalSubmit(content); + } + fs.unlinkSync(filePath); + } + }, 5000); // Check every 5 seconds + + return () => clearInterval(interval); + }, [handleFinalSubmit]); + const handleIdePromptComplete = useCallback( (result: IdeIntegrationNudgeResult) => { if (result.userSelection === 'yes') { |
