diff options
| author | Castor Regex <[email protected]> | 2025-08-24 13:07:04 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-24 13:07:04 -0500 |
| commit | 3f82a60986c6ab7b6519034b46b56ae603d8ecbb (patch) | |
| tree | 8e36ed0f7b02403d3ee5ad8f6eb4f4f39ff4b07f /packages/cli/src/gemini.tsx | |
| parent | d12a64368dc7a46a2e7d397d6bd10b03ae396678 (diff) | |
feat(startup): create new chat on startup
Diffstat (limited to 'packages/cli/src/gemini.tsx')
| -rw-r--r-- | packages/cli/src/gemini.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index b285a5af..3195a52c 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { execFileSync } from 'child_process'; import React from 'react'; import { render } from 'ink'; import { AppWrapper } from './ui/App.js'; @@ -159,6 +160,17 @@ export async function main() { argv, ); + // Create a new chat on startup. + try { + const countOutput = execFileSync('/home/jcarr/go/bin/regex', ['--count-auto'], { encoding: 'utf8' }); + const count = parseInt(countOutput.trim(), 10); + const topic = `Auto ${count + 1}`; + execFileSync('/home/jcarr/go/bin/regex', ['--new-chat', sessionId, topic]); + } catch (e) { + console.error(`Error creating new chat: ${e}`); + } + + const consolePatcher = new ConsolePatcher({ stderr: true, debugMode: config.getDebugMode(), |
