@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.
Files changed (33) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +10 -0
  3. package/dist/core/index.d.ts +1 -1
  4. package/dist/core/index.d.ts.map +1 -1
  5. package/dist/core/index.js.map +1 -1
  6. package/dist/core/model-resolver.d.ts.map +1 -1
  7. package/dist/core/model-resolver.js +4 -4
  8. package/dist/core/model-resolver.js.map +1 -1
  9. package/dist/core/package-manager.d.ts +2 -0
  10. package/dist/core/package-manager.d.ts.map +1 -1
  11. package/dist/core/package-manager.js +42 -1
  12. package/dist/core/package-manager.js.map +1 -1
  13. package/dist/core/sdk.d.ts.map +1 -1
  14. package/dist/core/sdk.js +2 -2
  15. package/dist/core/sdk.js.map +1 -1
  16. package/dist/core/session-manager.d.ts +5 -0
  17. package/dist/core/session-manager.d.ts.map +1 -1
  18. package/dist/core/session-manager.js +2 -2
  19. package/dist/core/session-manager.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  24. package/dist/modes/interactive/interactive-mode.js +16 -4
  25. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  26. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  27. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  28. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  29. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  30. package/examples/extensions/subagent/index.ts +21 -1
  31. package/examples/extensions/with-deps/package-lock.json +2 -2
  32. package/examples/extensions/with-deps/package.json +1 -1
  33. 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
- // Stop the TUI (restore terminal to normal mode)
2257
- this.ui.stop();
2258
- // Send SIGTSTP to process group (pid=0 means all processes in group)
2259
- process.kill(0, "SIGTSTP");
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();