@mariozechner/pi-coding-agent 0.50.2 → 0.50.4

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 (68) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/README.md +1 -0
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +1 -0
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/core/agent-session.d.ts +6 -0
  7. package/dist/core/agent-session.d.ts.map +1 -1
  8. package/dist/core/agent-session.js +10 -0
  9. package/dist/core/agent-session.js.map +1 -1
  10. package/dist/core/model-registry.d.ts.map +1 -1
  11. package/dist/core/model-registry.js +6 -0
  12. package/dist/core/model-registry.js.map +1 -1
  13. package/dist/core/model-resolver.d.ts.map +1 -1
  14. package/dist/core/model-resolver.js +1 -0
  15. package/dist/core/model-resolver.js.map +1 -1
  16. package/dist/core/package-manager.d.ts.map +1 -1
  17. package/dist/core/package-manager.js +81 -5
  18. package/dist/core/package-manager.js.map +1 -1
  19. package/dist/core/settings-manager.d.ts +4 -3
  20. package/dist/core/settings-manager.d.ts.map +1 -1
  21. package/dist/core/settings-manager.js +25 -12
  22. package/dist/core/settings-manager.js.map +1 -1
  23. package/dist/core/tools/path-utils.d.ts.map +1 -1
  24. package/dist/core/tools/path-utils.js +28 -3
  25. package/dist/core/tools/path-utils.js.map +1 -1
  26. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  27. package/dist/modes/interactive/components/config-selector.js +12 -1
  28. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  29. package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
  30. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
  31. package/dist/modes/interactive/components/daxnuts.js +140 -0
  32. package/dist/modes/interactive/components/daxnuts.js.map +1 -0
  33. package/dist/modes/interactive/components/index.d.ts +1 -0
  34. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  35. package/dist/modes/interactive/components/index.js +1 -0
  36. package/dist/modes/interactive/components/index.js.map +1 -1
  37. package/dist/modes/interactive/components/settings-selector.d.ts +2 -2
  38. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  39. package/dist/modes/interactive/components/settings-selector.js +1 -1
  40. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  41. package/dist/modes/interactive/interactive-mode.d.ts +2 -0
  42. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  43. package/dist/modes/interactive/interactive-mode.js +33 -13
  44. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  45. package/dist/modes/rpc/rpc-client.d.ts +4 -0
  46. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  47. package/dist/modes/rpc/rpc-client.js +6 -0
  48. package/dist/modes/rpc/rpc-client.js.map +1 -1
  49. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  50. package/dist/modes/rpc/rpc-mode.js +9 -0
  51. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  52. package/dist/modes/rpc/rpc-types.d.ts +10 -0
  53. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  54. package/dist/modes/rpc/rpc-types.js.map +1 -1
  55. package/dist/utils/clipboard.d.ts.map +1 -1
  56. package/dist/utils/clipboard.js +6 -7
  57. package/dist/utils/clipboard.js.map +1 -1
  58. package/docs/keybindings.md +4 -2
  59. package/docs/models.md +32 -0
  60. package/docs/providers.md +1 -0
  61. package/docs/rpc.md +21 -1
  62. package/examples/extensions/antigravity-image-gen.ts +1 -1
  63. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  64. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  65. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  66. package/examples/extensions/with-deps/package-lock.json +2 -2
  67. package/examples/extensions/with-deps/package.json +1 -1
  68. package/package.json +5 -4
@@ -28,6 +28,7 @@ import { BranchSummaryMessageComponent } from "./components/branch-summary-messa
28
28
  import { CompactionSummaryMessageComponent } from "./components/compaction-summary-message.js";
29
29
  import { CustomEditor } from "./components/custom-editor.js";
30
30
  import { CustomMessageComponent } from "./components/custom-message.js";
31
+ import { DaxnutsComponent } from "./components/daxnuts.js";
31
32
  import { DynamicBorder } from "./components/dynamic-border.js";
32
33
  import { ExtensionEditorComponent } from "./components/extension-editor.js";
33
34
  import { ExtensionInputComponent } from "./components/extension-input.js";
@@ -322,15 +323,15 @@ export class InteractiveMode {
322
323
  this.ui.setFocus(this.editor);
323
324
  this.setupKeyHandlers();
324
325
  this.setupEditorSubmitHandler();
325
- // Render initial messages before starting the UI to avoid layout jump
326
+ // Initialize extensions first so resources are shown before messages
327
+ await this.initExtensions();
328
+ // Render initial messages AFTER showing loaded resources
326
329
  this.renderInitialMessages();
327
330
  // Start the UI
328
331
  this.ui.start();
329
332
  this.isInitialized = true;
330
333
  // Set terminal title
331
334
  this.updateTerminalTitle();
332
- // Initialize extensions with TUI-based UI context
333
- await this.initExtensions();
334
335
  // Subscribe to agent events
335
336
  this.subscribeToAgent();
336
337
  // Set up theme file watcher
@@ -1392,19 +1393,22 @@ export class InteractiveMode {
1392
1393
  this.updateEditorBorderColor();
1393
1394
  }
1394
1395
  else if (!this.editor.getText().trim()) {
1395
- // Double-escape with empty editor triggers /tree or /fork based on setting
1396
- const now = Date.now();
1397
- if (now - this.lastEscapeTime < 500) {
1398
- if (this.settingsManager.getDoubleEscapeAction() === "tree") {
1399
- this.showTreeSelector();
1396
+ // Double-escape with empty editor triggers /tree, /fork, or nothing based on setting
1397
+ const action = this.settingsManager.getDoubleEscapeAction();
1398
+ if (action !== "none") {
1399
+ const now = Date.now();
1400
+ if (now - this.lastEscapeTime < 500) {
1401
+ if (action === "tree") {
1402
+ this.showTreeSelector();
1403
+ }
1404
+ else {
1405
+ this.showUserMessageSelector();
1406
+ }
1407
+ this.lastEscapeTime = 0;
1400
1408
  }
1401
1409
  else {
1402
- this.showUserMessageSelector();
1410
+ this.lastEscapeTime = now;
1403
1411
  }
1404
- this.lastEscapeTime = 0;
1405
- }
1406
- else {
1407
- this.lastEscapeTime = now;
1408
1412
  }
1409
1413
  }
1410
1414
  };
@@ -2601,6 +2605,7 @@ export class InteractiveMode {
2601
2605
  this.footer.invalidate();
2602
2606
  this.updateEditorBorderColor();
2603
2607
  this.showStatus(`Model: ${model.id}`);
2608
+ this.checkDaxnutsEasterEgg(model);
2604
2609
  }
2605
2610
  catch (error) {
2606
2611
  this.showError(error instanceof Error ? error.message : String(error));
@@ -2660,6 +2665,7 @@ export class InteractiveMode {
2660
2665
  this.updateEditorBorderColor();
2661
2666
  done();
2662
2667
  this.showStatus(`Model: ${model.id}`);
2668
+ this.checkDaxnutsEasterEgg(model);
2663
2669
  }
2664
2670
  catch (error) {
2665
2671
  done();
@@ -3333,6 +3339,8 @@ export class InteractiveMode {
3333
3339
  const cursorWordRight = this.getEditorKeyDisplay("cursorWordRight");
3334
3340
  const cursorLineStart = this.getEditorKeyDisplay("cursorLineStart");
3335
3341
  const cursorLineEnd = this.getEditorKeyDisplay("cursorLineEnd");
3342
+ const jumpForward = this.getEditorKeyDisplay("jumpForward");
3343
+ const jumpBackward = this.getEditorKeyDisplay("jumpBackward");
3336
3344
  const pageUp = this.getEditorKeyDisplay("pageUp");
3337
3345
  const pageDown = this.getEditorKeyDisplay("pageDown");
3338
3346
  // Editing keybindings
@@ -3367,6 +3375,8 @@ export class InteractiveMode {
3367
3375
  | \`${cursorWordLeft}\` / \`${cursorWordRight}\` | Move by word |
3368
3376
  | \`${cursorLineStart}\` | Start of line |
3369
3377
  | \`${cursorLineEnd}\` | End of line |
3378
+ | \`${jumpForward}\` | Jump forward to character |
3379
+ | \`${jumpBackward}\` | Jump backward to character |
3370
3380
  | \`${pageUp}\` / \`${pageDown}\` | Scroll by page |
3371
3381
 
3372
3382
  **Editing**
@@ -3480,6 +3490,16 @@ export class InteractiveMode {
3480
3490
  this.chatContainer.addChild(new ArminComponent(this.ui));
3481
3491
  this.ui.requestRender();
3482
3492
  }
3493
+ handleDaxnuts() {
3494
+ this.chatContainer.addChild(new Spacer(1));
3495
+ this.chatContainer.addChild(new DaxnutsComponent(this.ui));
3496
+ this.ui.requestRender();
3497
+ }
3498
+ checkDaxnutsEasterEgg(model) {
3499
+ if (model.provider === "opencode" && model.id.toLowerCase().includes("kimi-k2.5")) {
3500
+ this.handleDaxnuts();
3501
+ }
3502
+ }
3483
3503
  async handleBashCommand(command, excludeFromContext = false) {
3484
3504
  const extensionRunner = this.session.extensionRunner;
3485
3505
  // Emit user_bash event to let extensions intercept