feat(startup): create new chat with incrementing topic

This commit is contained in:
Castor Regex 2025-08-24 13:23:01 -05:00 committed by Jeff Carr
parent 3f82a60986
commit 2747a978c7
1 changed files with 2 additions and 4 deletions

View File

@ -162,10 +162,8 @@ export async function main() {
// Create a new chat on startup. // Create a new chat on startup.
try { try {
const countOutput = execFileSync('/home/jcarr/go/bin/regex', ['--count-auto'], { encoding: 'utf8' }); const topic = execFileSync('/home/jcarr/go/bin/regex', ['--get-next-auto-topic'], { encoding: 'utf8' });
const count = parseInt(countOutput.trim(), 10); execFileSync('/home/jcarr/go/bin/regex', ['--new-chat', sessionId, topic.trim()]);
const topic = `Auto ${count + 1}`;
execFileSync('/home/jcarr/go/bin/regex', ['--new-chat', sessionId, topic]);
} catch (e) { } catch (e) {
console.error(`Error creating new chat: ${e}`); console.error(`Error creating new chat: ${e}`);
} }