feat(panel): add local CloudCode proxy sync and independent Main/Subagent-Swarm context window toggles (#36)

This commit is contained in:
fish
2026-11-22 21:19:25 +09:00
parent 6da6c75390
commit 743bdfa24d
18 changed files with 1862 additions and 97 deletions
+23
View File
@@ -242,5 +242,28 @@ if (isTestHarnessEnv) {
);
}
} else {
let processStopping = false;
async function handleProcessExitSignal(exitCode = 0) {
if (processStopping) return;
processStopping = true;
const forceTimer = setTimeout(() => process.exit(exitCode), 1800);
forceTimer.unref?.();
try {
if (activeWorker) {
const w = activeWorker;
activeWorker = null;
await stopWorkerGracefully(w);
}
} finally {
clearTimeout(forceTimer);
process.exit(exitCode);
}
}
process.once('SIGTERM', () => {
void handleProcessExitSignal(0);
});
process.once('SIGINT', () => {
void handleProcessExitSignal(0);
});
void ensureActiveWorker();
}