Integrate Claude Agent SDK for direct streaming chat, add Codex login/logout flow with OAuth support in settings, improve AI chat panel UI and agent discovery, and update build config for new dependencies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
507 B
JavaScript
18 lines
507 B
JavaScript
const { spawn } = require("node:child_process");
|
|
const electronPath = require("electron"); // returns binary path
|
|
|
|
const env = { ...process.env };
|
|
delete env.ELECTRON_RUN_AS_NODE;
|
|
|
|
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);
|
|
}
|
|
});
|
|
}
|