@vandeepunk/pi-coding-agent 0.0.4 → 0.0.5
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 +27 -0
- package/dist/core/extensions/runner.d.ts +2 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +5 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +10 -3
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +3 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +7 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +11 -5
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/extensions.md +60 -0
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/custom-compaction.ts +2 -2
- 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/reload-runtime.ts +37 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -222,6 +222,9 @@ export class InteractiveMode {
|
|
|
222
222
|
// Setup autocomplete
|
|
223
223
|
this.autocompleteProvider = new CombinedAutocompleteProvider([...slashCommands, ...templateCommands, ...extensionCommands, ...skillCommandList], process.cwd(), fdPath);
|
|
224
224
|
this.defaultEditor.setAutocompleteProvider(this.autocompleteProvider);
|
|
225
|
+
if (this.editor !== this.defaultEditor) {
|
|
226
|
+
this.editor.setAutocompleteProvider?.(this.autocompleteProvider);
|
|
227
|
+
}
|
|
225
228
|
}
|
|
226
229
|
async init() {
|
|
227
230
|
if (this.isInitialized)
|
|
@@ -810,6 +813,9 @@ export class InteractiveMode {
|
|
|
810
813
|
await this.handleResumeSession(sessionPath);
|
|
811
814
|
return { cancelled: false };
|
|
812
815
|
},
|
|
816
|
+
reload: async () => {
|
|
817
|
+
await this.handleReloadCommand();
|
|
818
|
+
},
|
|
813
819
|
},
|
|
814
820
|
shutdownHandler: () => {
|
|
815
821
|
this.shutdownRequested = true;
|
|
@@ -1088,6 +1094,7 @@ export class InteractiveMode {
|
|
|
1088
1094
|
setHeader: (factory) => this.setExtensionHeader(factory),
|
|
1089
1095
|
setTitle: (title) => this.ui.terminal.setTitle(title),
|
|
1090
1096
|
custom: (factory, options) => this.showExtensionCustom(factory, options),
|
|
1097
|
+
pasteToEditor: (text) => this.editor.handleInput(`\x1b[200~${text}\x1b[201~`),
|
|
1091
1098
|
setEditorText: (text) => this.editor.setText(text),
|
|
1092
1099
|
getEditorText: () => this.editor.getText(),
|
|
1093
1100
|
editor: (title, prefill) => this.showExtensionEditor(title, prefill),
|
|
@@ -1259,9 +1266,9 @@ export class InteractiveMode {
|
|
|
1259
1266
|
// Use duck typing since instanceof fails across jiti module boundaries
|
|
1260
1267
|
const customEditor = newEditor;
|
|
1261
1268
|
if ("actionHandlers" in customEditor && customEditor.actionHandlers instanceof Map) {
|
|
1262
|
-
customEditor.onEscape = this.defaultEditor.onEscape;
|
|
1263
|
-
customEditor.onCtrlD = this.defaultEditor.onCtrlD;
|
|
1264
|
-
customEditor.onPasteImage = this.defaultEditor.onPasteImage;
|
|
1269
|
+
customEditor.onEscape = () => this.defaultEditor.onEscape?.();
|
|
1270
|
+
customEditor.onCtrlD = () => this.defaultEditor.onCtrlD?.();
|
|
1271
|
+
customEditor.onPasteImage = () => this.defaultEditor.onPasteImage?.();
|
|
1265
1272
|
customEditor.onExtensionShortcut = (data) => this.defaultEditor.onExtensionShortcut?.(data);
|
|
1266
1273
|
// Copy action handlers (clear, suspend, model switching, etc.)
|
|
1267
1274
|
for (const [action, handler] of this.defaultEditor.actionHandlers) {
|