@earendil-works/pi-coding-agent 0.75.1 → 0.75.3
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 +18 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -27
- package/dist/config.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +4 -8
- package/dist/core/package-manager.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +14 -6
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +13 -6
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +22 -5
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/child-process.d.ts +5 -8
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +8 -59
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +77 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- 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/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +6 -4
|
@@ -2878,7 +2878,7 @@ export class InteractiveMode {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
this.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
|
|
2880
2880
|
}
|
|
2881
|
-
openExternalEditor() {
|
|
2881
|
+
async openExternalEditor() {
|
|
2882
2882
|
// Determine editor (respect $VISUAL, then $EDITOR)
|
|
2883
2883
|
const editorCmd = process.env.VISUAL || process.env.EDITOR;
|
|
2884
2884
|
if (!editorCmd) {
|
|
@@ -2894,13 +2894,20 @@ export class InteractiveMode {
|
|
|
2894
2894
|
this.ui.stop();
|
|
2895
2895
|
// Split by space to support editor arguments (e.g., "code --wait")
|
|
2896
2896
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2897
|
+
process.stdout.write(`Launching external editor: ${editorCmd}\nPi will resume when the editor exits.\n`);
|
|
2898
|
+
// Do not use spawnSync here. On Windows, synchronous child_process calls can keep
|
|
2899
|
+
// Node/libuv's console input read active after ui.stop() pauses stdin, racing
|
|
2900
|
+
// vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
|
|
2901
|
+
const status = await new Promise((resolve) => {
|
|
2902
|
+
const child = spawn(editor, [...editorArgs, tmpFile], {
|
|
2903
|
+
stdio: "inherit",
|
|
2904
|
+
shell: process.platform === "win32",
|
|
2905
|
+
});
|
|
2906
|
+
child.on("error", () => resolve(null));
|
|
2907
|
+
child.on("close", (code) => resolve(code));
|
|
2901
2908
|
});
|
|
2902
2909
|
// On successful exit (status 0), replace editor content
|
|
2903
|
-
if (
|
|
2910
|
+
if (status === 0) {
|
|
2904
2911
|
const newContent = fs.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
2905
2912
|
this.editor.setText(newContent);
|
|
2906
2913
|
}
|