mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 13:03:42 +00:00
fixes #161: stop theme watcher and exit cleanly in print mode
The theme file watcher was keeping the Node.js process alive indefinitely even in print mode where hot-reload is unnecessary. This simple fix calls stopThemeWatcher() and process.exit(0) after print mode completes. - Added stopThemeWatcher() call after runPrintMode() completes - Added process.exit(0) to ensure clean process termination - Imported stopThemeWatcher from theme module This is a minimal fix that addresses the symptom (process hanging) without changing the theme initialization logic.
This commit is contained in:
parent
9516424cae
commit
7323af1f69
1 changed files with 4 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ import { loadSlashCommands } from "./core/slash-commands.js";
|
|||
import { buildSystemPrompt } from "./core/system-prompt.js";
|
||||
import { allTools, codingTools } from "./core/tools/index.js";
|
||||
import { InteractiveMode, runPrintMode, runRpcMode } from "./modes/index.js";
|
||||
import { initTheme } from "./modes/interactive/theme/theme.js";
|
||||
import { initTheme, stopThemeWatcher } from "./modes/interactive/theme/theme.js";
|
||||
import { getChangelogPath, getNewEntries, parseChangelog } from "./utils/changelog.js";
|
||||
import { ensureTool } from "./utils/tools-manager.js";
|
||||
|
||||
|
|
@ -394,6 +394,9 @@ export async function main(args: string[]) {
|
|||
} else {
|
||||
// Non-interactive mode (--print flag or --mode flag)
|
||||
await runPrintMode(session, mode, parsed.messages, initialMessage, initialAttachments);
|
||||
// Clean up and exit (file watchers keep process alive)
|
||||
stopThemeWatcher();
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue