Merge pull request #29 from mostlydev/fix-mcp-server-exit

This commit is contained in:
Tobias Lütke 2026-01-18 10:34:13 -05:00 committed by GitHub
commit 2bde6804fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2626,8 +2626,9 @@ if (import.meta.main) {
process.exit(1);
}
// Cleanup LlamaCpp instance to prevent NAPI crash on exit
await disposeDefaultLlamaCpp();
process.exit(0);
if (cli.command !== "mcp") {
await disposeDefaultLlamaCpp();
process.exit(0);
}
} // end if (import.meta.main)