feat(startup): create new chat with incrementing topic
This commit is contained in:
parent
3f82a60986
commit
2747a978c7
|
@ -162,10 +162,8 @@ export async function main() {
|
|||
|
||||
// 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]);
|
||||
const topic = execFileSync('/home/jcarr/go/bin/regex', ['--get-next-auto-topic'], { encoding: 'utf8' });
|
||||
execFileSync('/home/jcarr/go/bin/regex', ['--new-chat', sessionId, topic.trim()]);
|
||||
} catch (e) {
|
||||
console.error(`Error creating new chat: ${e}`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue