@mariozechner/pi-coding-agent 0.61.0 → 0.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +10 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +4 -4
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +2 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +42 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +5 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +2 -2
- package/dist/core/session-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +16 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/subagent/index.ts +21 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -2243,20 +2243,32 @@ export class InteractiveMode {
|
|
|
2243
2243
|
await this.shutdown();
|
|
2244
2244
|
}
|
|
2245
2245
|
handleCtrlZ() {
|
|
2246
|
+
// Keep the event loop alive while suspended. Without this, stopping the TUI
|
|
2247
|
+
// can leave Node with no ref'ed handles, causing the process to exit on fg
|
|
2248
|
+
// before the SIGCONT handler gets a chance to restore the terminal.
|
|
2249
|
+
const suspendKeepAlive = setInterval(() => { }, 2 ** 30);
|
|
2246
2250
|
// Ignore SIGINT while suspended so Ctrl+C in the terminal does not
|
|
2247
2251
|
// kill the backgrounded process. The handler is removed on resume.
|
|
2248
2252
|
const ignoreSigint = () => { };
|
|
2249
2253
|
process.on("SIGINT", ignoreSigint);
|
|
2250
2254
|
// Set up handler to restore TUI when resumed
|
|
2251
2255
|
process.once("SIGCONT", () => {
|
|
2256
|
+
clearInterval(suspendKeepAlive);
|
|
2252
2257
|
process.removeListener("SIGINT", ignoreSigint);
|
|
2253
2258
|
this.ui.start();
|
|
2254
2259
|
this.ui.requestRender(true);
|
|
2255
2260
|
});
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2261
|
+
try {
|
|
2262
|
+
// Stop the TUI (restore terminal to normal mode)
|
|
2263
|
+
this.ui.stop();
|
|
2264
|
+
// Send SIGTSTP to process group (pid=0 means all processes in group)
|
|
2265
|
+
process.kill(0, "SIGTSTP");
|
|
2266
|
+
}
|
|
2267
|
+
catch (error) {
|
|
2268
|
+
clearInterval(suspendKeepAlive);
|
|
2269
|
+
process.removeListener("SIGINT", ignoreSigint);
|
|
2270
|
+
throw error;
|
|
2271
|
+
}
|
|
2260
2272
|
}
|
|
2261
2273
|
async handleFollowUp() {
|
|
2262
2274
|
const text = (this.editor.getExpandedText?.() ?? this.editor.getText()).trim();
|