mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-09-24 15:49:09 +00:00
8b2a3d23d4
* feat(ai): support Cursor CLI login for subscription quota Allow the managed Cursor agent to authenticate via local `agent` CLI login as an alternative to CURSOR_API_KEY, so Catty can use subscription Auto quota. Keep API key and CLI login mutually exclusive, isolate resume sessions by auth mode, and expose selectable CLI models with auto as the default. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): harden Cursor CLI login path after review Address multi-agent review findings: soft-cancel abort without late stream errors, prefer cursor-agent over ambiguous agent binaries, mode-aware availability without wiping API keys or sticky-disabling, and concurrent MCP merge refcount restore. Add unit coverage for the new contracts. --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
18 lines
554 B
JavaScript
18 lines
554 B
JavaScript
const { spawn } = require("node:child_process");
|
|
const electronPath = require("electron"); // returns binary path
|
|
const { applyElectronLaunchEnv } = require("./launchEnv.cjs");
|
|
|
|
const env = applyElectronLaunchEnv(process.env);
|
|
|
|
const child = spawn(electronPath, ["."], { stdio: "inherit", env });
|
|
child.on("exit", (code) => process.exit(code ?? 0));
|
|
|
|
// Forward SIGINT/SIGTERM to the Electron child process so Ctrl+C works
|
|
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
process.on(sig, () => {
|
|
if (!child.killed) {
|
|
child.kill(sig);
|
|
}
|
|
});
|
|
}
|