Enhance provider models and chat handling with new thinking configurations

This commit is contained in:
decolua
2026-04-13 12:04:57 +07:00
parent ee1271b6fd
commit 4c28a1671d
15 changed files with 142 additions and 421 deletions

View File

@@ -1,35 +0,0 @@
// 9remote process lifecycle manager
let remoteProcess = null;
export function setRemoteProcess(child) {
remoteProcess = child;
}
export function getRemoteProcess() {
return remoteProcess;
}
export function killRemote() {
if (!remoteProcess) return;
try {
remoteProcess.kill("SIGTERM");
console.log(`[9remote] Killed process ${remoteProcess.pid}`);
remoteProcess = null;
} catch (err) {
console.log(`[9remote] Failed to kill:`, err.message);
remoteProcess = null;
}
}
// Register cleanup handlers
if (typeof process !== "undefined") {
const cleanup = () => {
killRemote();
process.exit(0);
};
process.on("SIGTERM", cleanup);
process.on("SIGINT", cleanup);
process.on("beforeExit", killRemote);
}