@code-yeongyu/senpi 2026.5.18 → 2026.5.19

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 (64) hide show
  1. package/CHANGELOG.md +31 -44
  2. package/dist/cli/args.d.ts +6 -0
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +4 -0
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +3 -3
  8. package/dist/cli.js.map +1 -1
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/config.js +35 -27
  11. package/dist/config.js.map +1 -1
  12. package/dist/core/package-manager.d.ts.map +1 -1
  13. package/dist/core/package-manager.js +4 -8
  14. package/dist/core/package-manager.js.map +1 -1
  15. package/dist/core/system-prompt.d.ts.map +1 -1
  16. package/dist/core/system-prompt.js +3 -2
  17. package/dist/core/system-prompt.js.map +1 -1
  18. package/dist/core/tools/bash.d.ts.map +1 -1
  19. package/dist/core/tools/bash.js +1 -0
  20. package/dist/core/tools/bash.js.map +1 -1
  21. package/dist/main.d.ts.map +1 -1
  22. package/dist/main.js +19 -1
  23. package/dist/main.js.map +1 -1
  24. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  25. package/dist/modes/interactive/components/extension-editor.js +14 -6
  26. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  27. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  28. package/dist/modes/interactive/interactive-mode.js +13 -6
  29. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  30. package/dist/modes/interactive/theme/theme.d.ts +21 -2
  31. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  32. package/dist/modes/interactive/theme/theme.js +82 -40
  33. package/dist/modes/interactive/theme/theme.js.map +1 -1
  34. package/dist/modes/neo-mode.d.ts +24 -0
  35. package/dist/modes/neo-mode.d.ts.map +1 -0
  36. package/dist/modes/neo-mode.js +114 -0
  37. package/dist/modes/neo-mode.js.map +1 -0
  38. package/dist/package-manager-cli.d.ts.map +1 -1
  39. package/dist/package-manager-cli.js +22 -5
  40. package/dist/package-manager-cli.js.map +1 -1
  41. package/dist/senpi +3 -3
  42. package/dist/utils/child-process.d.ts +5 -8
  43. package/dist/utils/child-process.d.ts.map +1 -1
  44. package/dist/utils/child-process.js +8 -59
  45. package/dist/utils/child-process.js.map +1 -1
  46. package/dist/utils/shell.d.ts.map +1 -1
  47. package/dist/utils/shell.js +6 -1
  48. package/dist/utils/shell.js.map +1 -1
  49. package/dist/utils/windows-self-update.d.ts +3 -0
  50. package/dist/utils/windows-self-update.d.ts.map +1 -0
  51. package/dist/utils/windows-self-update.js +77 -0
  52. package/dist/utils/windows-self-update.js.map +1 -0
  53. package/docs/index.md +8 -0
  54. package/docs/packages.md +2 -0
  55. package/docs/quickstart.md +20 -0
  56. package/docs/usage.md +2 -0
  57. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  58. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  59. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  60. package/examples/extensions/sandbox/package-lock.json +2 -2
  61. package/examples/extensions/sandbox/package.json +1 -1
  62. package/examples/extensions/with-deps/package-lock.json +2 -2
  63. package/examples/extensions/with-deps/package.json +1 -1
  64. package/package.json +7 -5
@@ -2989,7 +2989,7 @@ export class InteractiveMode {
2989
2989
  }
2990
2990
  this.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
2991
2991
  }
2992
- openExternalEditor() {
2992
+ async openExternalEditor() {
2993
2993
  // Determine editor (respect $VISUAL, then $EDITOR)
2994
2994
  const editorCmd = process.env.VISUAL || process.env.EDITOR;
2995
2995
  if (!editorCmd) {
@@ -3005,13 +3005,20 @@ export class InteractiveMode {
3005
3005
  this.ui.stop();
3006
3006
  // Split by space to support editor arguments (e.g., "code --wait")
3007
3007
  const [editor, ...editorArgs] = editorCmd.split(" ");
3008
- // Spawn editor synchronously with inherited stdio for interactive editing
3009
- const result = spawnSync(editor, [...editorArgs, tmpFile], {
3010
- stdio: "inherit",
3011
- shell: process.platform === "win32",
3008
+ process.stdout.write(`Launching external editor: ${editorCmd}\nPi will resume when the editor exits.\n`);
3009
+ // Do not use spawnSync here. On Windows, synchronous child_process calls can keep
3010
+ // Node/libuv's console input read active after ui.stop() pauses stdin, racing
3011
+ // vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
3012
+ const status = await new Promise((resolve) => {
3013
+ const child = spawn(editor, [...editorArgs, tmpFile], {
3014
+ stdio: "inherit",
3015
+ shell: process.platform === "win32",
3016
+ });
3017
+ child.on("error", () => resolve(null));
3018
+ child.on("close", (code) => resolve(code));
3012
3019
  });
3013
3020
  // On successful exit (status 0), replace editor content
3014
- if (result.status === 0) {
3021
+ if (status === 0) {
3015
3022
  const newContent = fs.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
3016
3023
  this.editor.setText(newContent);
3017
3024
  }