@vandeepunk/pi-coding-agent 0.0.4 → 0.0.6
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 +58 -0
- package/README.md +8 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +6 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.css +59 -0
- package/dist/core/export-html/template.js +21 -1
- 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 +7 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +1 -2
- package/dist/core/package-manager.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +14 -5
- 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/custom-provider.md +9 -0
- package/docs/extensions.md +61 -1
- package/docs/providers.md +24 -19
- package/docs/rpc.md +7 -1
- 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/subagent/index.ts +2 -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
|
@@ -222,14 +222,19 @@ 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)
|
|
228
231
|
return;
|
|
229
232
|
// Load changelog (only show new entries, skip for resumed sessions)
|
|
230
233
|
this.changelogMarkdown = this.getChangelogForDisplay();
|
|
231
|
-
//
|
|
232
|
-
|
|
234
|
+
// Ensure fd and rg are available (downloads if missing, adds to PATH via getBinDir)
|
|
235
|
+
// Both are needed: fd for autocomplete, rg for grep tool and bash commands
|
|
236
|
+
const [fdPath] = await Promise.all([ensureTool("fd"), ensureTool("rg")]);
|
|
237
|
+
this.fdPath = fdPath;
|
|
233
238
|
// Add header container as first child
|
|
234
239
|
this.ui.addChild(this.headerContainer);
|
|
235
240
|
// Add header with keybindings from config (unless silenced)
|
|
@@ -810,6 +815,9 @@ export class InteractiveMode {
|
|
|
810
815
|
await this.handleResumeSession(sessionPath);
|
|
811
816
|
return { cancelled: false };
|
|
812
817
|
},
|
|
818
|
+
reload: async () => {
|
|
819
|
+
await this.handleReloadCommand();
|
|
820
|
+
},
|
|
813
821
|
},
|
|
814
822
|
shutdownHandler: () => {
|
|
815
823
|
this.shutdownRequested = true;
|
|
@@ -1088,6 +1096,7 @@ export class InteractiveMode {
|
|
|
1088
1096
|
setHeader: (factory) => this.setExtensionHeader(factory),
|
|
1089
1097
|
setTitle: (title) => this.ui.terminal.setTitle(title),
|
|
1090
1098
|
custom: (factory, options) => this.showExtensionCustom(factory, options),
|
|
1099
|
+
pasteToEditor: (text) => this.editor.handleInput(`\x1b[200~${text}\x1b[201~`),
|
|
1091
1100
|
setEditorText: (text) => this.editor.setText(text),
|
|
1092
1101
|
getEditorText: () => this.editor.getText(),
|
|
1093
1102
|
editor: (title, prefill) => this.showExtensionEditor(title, prefill),
|
|
@@ -1259,9 +1268,9 @@ export class InteractiveMode {
|
|
|
1259
1268
|
// Use duck typing since instanceof fails across jiti module boundaries
|
|
1260
1269
|
const customEditor = newEditor;
|
|
1261
1270
|
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;
|
|
1271
|
+
customEditor.onEscape = () => this.defaultEditor.onEscape?.();
|
|
1272
|
+
customEditor.onCtrlD = () => this.defaultEditor.onCtrlD?.();
|
|
1273
|
+
customEditor.onPasteImage = () => this.defaultEditor.onPasteImage?.();
|
|
1265
1274
|
customEditor.onExtensionShortcut = (data) => this.defaultEditor.onExtensionShortcut?.(data);
|
|
1266
1275
|
// Copy action handlers (clear, suspend, model switching, etc.)
|
|
1267
1276
|
for (const [action, handler] of this.defaultEditor.actionHandlers) {
|