@mariozechner/pi-coding-agent 0.52.7 → 0.52.9

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 (54) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/cli/args.d.ts.map +1 -1
  3. package/dist/cli/args.js +7 -6
  4. package/dist/cli/args.js.map +1 -1
  5. package/dist/core/agent-session.d.ts +3 -6
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +2 -1
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/export-html/index.d.ts.map +1 -1
  10. package/dist/core/export-html/index.js +1 -1
  11. package/dist/core/export-html/index.js.map +1 -1
  12. package/dist/core/export-html/template.css +59 -0
  13. package/dist/core/export-html/template.js +21 -1
  14. package/dist/core/extensions/runner.d.ts +2 -0
  15. package/dist/core/extensions/runner.d.ts.map +1 -1
  16. package/dist/core/extensions/runner.js +5 -0
  17. package/dist/core/extensions/runner.js.map +1 -1
  18. package/dist/core/extensions/types.d.ts +7 -2
  19. package/dist/core/extensions/types.d.ts.map +1 -1
  20. package/dist/core/extensions/types.js.map +1 -1
  21. package/dist/core/package-manager.d.ts +1 -0
  22. package/dist/core/package-manager.d.ts.map +1 -1
  23. package/dist/core/package-manager.js +22 -4
  24. package/dist/core/package-manager.js.map +1 -1
  25. package/dist/main.d.ts.map +1 -1
  26. package/dist/main.js +165 -72
  27. package/dist/main.js.map +1 -1
  28. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  29. package/dist/modes/interactive/interactive-mode.js +17 -5
  30. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  31. package/dist/modes/print-mode.d.ts.map +1 -1
  32. package/dist/modes/print-mode.js +3 -0
  33. package/dist/modes/print-mode.js.map +1 -1
  34. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  35. package/dist/modes/rpc/rpc-mode.js +7 -0
  36. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  37. package/dist/utils/tools-manager.d.ts.map +1 -1
  38. package/dist/utils/tools-manager.js +11 -5
  39. package/dist/utils/tools-manager.js.map +1 -1
  40. package/docs/custom-provider.md +9 -0
  41. package/docs/extensions.md +61 -1
  42. package/docs/providers.md +24 -19
  43. package/docs/rpc.md +7 -1
  44. package/examples/extensions/README.md +1 -0
  45. package/examples/extensions/custom-compaction.ts +2 -2
  46. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  47. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  48. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  49. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  50. package/examples/extensions/reload-runtime.ts +37 -0
  51. package/examples/extensions/subagent/index.ts +2 -1
  52. package/examples/extensions/with-deps/package-lock.json +2 -2
  53. package/examples/extensions/with-deps/package.json +1 -1
  54. 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
- // Setup autocomplete with fd tool for file path completion
232
- this.fdPath = await ensureTool("fd");
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,9 +815,15 @@ 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;
824
+ if (!this.session.isStreaming) {
825
+ void this.shutdown();
826
+ }
816
827
  },
817
828
  onError: (error) => {
818
829
  this.showExtensionError(error.extensionPath, error.error, error.stack);
@@ -1085,6 +1096,7 @@ export class InteractiveMode {
1085
1096
  setHeader: (factory) => this.setExtensionHeader(factory),
1086
1097
  setTitle: (title) => this.ui.terminal.setTitle(title),
1087
1098
  custom: (factory, options) => this.showExtensionCustom(factory, options),
1099
+ pasteToEditor: (text) => this.editor.handleInput(`\x1b[200~${text}\x1b[201~`),
1088
1100
  setEditorText: (text) => this.editor.setText(text),
1089
1101
  getEditorText: () => this.editor.getText(),
1090
1102
  editor: (title, prefill) => this.showExtensionEditor(title, prefill),
@@ -1256,9 +1268,9 @@ export class InteractiveMode {
1256
1268
  // Use duck typing since instanceof fails across jiti module boundaries
1257
1269
  const customEditor = newEditor;
1258
1270
  if ("actionHandlers" in customEditor && customEditor.actionHandlers instanceof Map) {
1259
- customEditor.onEscape = this.defaultEditor.onEscape;
1260
- customEditor.onCtrlD = this.defaultEditor.onCtrlD;
1261
- customEditor.onPasteImage = this.defaultEditor.onPasteImage;
1271
+ customEditor.onEscape = () => this.defaultEditor.onEscape?.();
1272
+ customEditor.onCtrlD = () => this.defaultEditor.onCtrlD?.();
1273
+ customEditor.onPasteImage = () => this.defaultEditor.onPasteImage?.();
1262
1274
  customEditor.onExtensionShortcut = (data) => this.defaultEditor.onExtensionShortcut?.(data);
1263
1275
  // Copy action handlers (clear, suspend, model switching, etc.)
1264
1276
  for (const [action, handler] of this.defaultEditor.actionHandlers) {