@earendil-works/pi-coding-agent 0.81.0 → 0.81.1

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 (37) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/core/agent-session.d.ts +22 -0
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +32 -2
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/compaction/branch-summarization.d.ts +5 -0
  7. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  8. package/dist/core/compaction/branch-summarization.js +5 -7
  9. package/dist/core/compaction/branch-summarization.js.map +1 -1
  10. package/dist/core/compaction/compaction.d.ts +13 -4
  11. package/dist/core/compaction/compaction.d.ts.map +1 -1
  12. package/dist/core/compaction/compaction.js +21 -17
  13. package/dist/core/compaction/compaction.js.map +1 -1
  14. package/dist/core/sdk.d.ts.map +1 -1
  15. package/dist/core/sdk.js +7 -3
  16. package/dist/core/sdk.js.map +1 -1
  17. package/dist/main.d.ts.map +1 -1
  18. package/dist/main.js +2 -1
  19. package/dist/main.js.map +1 -1
  20. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  21. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  22. package/dist/modes/interactive/interactive-mode.js +34 -4
  23. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  24. package/docs/json.md +5 -1
  25. package/docs/rpc.md +33 -0
  26. package/docs/sdk.md +3 -0
  27. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  28. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  29. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  30. package/examples/extensions/gondolin/package-lock.json +2 -2
  31. package/examples/extensions/gondolin/package.json +1 -1
  32. package/examples/extensions/sandbox/package-lock.json +2 -2
  33. package/examples/extensions/sandbox/package.json +1 -1
  34. package/examples/extensions/with-deps/package-lock.json +2 -2
  35. package/examples/extensions/with-deps/package.json +1 -1
  36. package/npm-shrinkwrap.json +12 -12
  37. package/package.json +4 -4
@@ -580,6 +580,12 @@ export class InteractiveMode {
580
580
  */
581
581
  async run() {
582
582
  await this.init();
583
+ if (!process.env.PI_OFFLINE) {
584
+ void this.session.modelRuntime
585
+ .refresh()
586
+ .then(() => this.updateAvailableProviderCount())
587
+ .catch(() => { });
588
+ }
583
589
  // Start version check asynchronously
584
590
  checkForNewPiVersion(this.version).then((newRelease) => {
585
591
  if (newRelease) {
@@ -2515,6 +2521,28 @@ export class InteractiveMode {
2515
2521
  this.ui.requestRender();
2516
2522
  break;
2517
2523
  }
2524
+ case "summarization_retry_scheduled": {
2525
+ this.showError(event.errorMessage);
2526
+ this.showStatusIndicator(new RetryStatusIndicator(this.ui, event.attempt, event.maxAttempts, event.delayMs));
2527
+ this.ui.requestRender();
2528
+ break;
2529
+ }
2530
+ case "summarization_retry_attempt_start": {
2531
+ this.clearStatusIndicator("retry");
2532
+ if (event.source === "branchSummary") {
2533
+ this.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));
2534
+ }
2535
+ else {
2536
+ this.showStatusIndicator(new CompactionStatusIndicator(this.ui, event.reason));
2537
+ }
2538
+ this.ui.requestRender();
2539
+ break;
2540
+ }
2541
+ case "summarization_retry_finished": {
2542
+ this.clearStatusIndicator("retry");
2543
+ this.ui.requestRender();
2544
+ break;
2545
+ }
2518
2546
  }
2519
2547
  }
2520
2548
  /** Extract text content from a user message */
@@ -3593,10 +3621,12 @@ export class InteractiveMode {
3593
3621
  return [];
3594
3622
  }
3595
3623
  }
3596
- /** Update the footer's available provider count from current model candidates */
3597
- async updateAvailableProviderCount() {
3598
- const models = await this.getModelCandidates();
3599
- const uniqueProviders = new Set(models.map((m) => m.provider));
3624
+ /** Update the footer's available provider count from the current snapshot without refreshing catalogs. */
3625
+ updateAvailableProviderCount() {
3626
+ const models = this.session.scopedModels.length > 0
3627
+ ? this.session.scopedModels.map((scoped) => scoped.model)
3628
+ : this.session.modelRuntime.getAvailableSnapshot();
3629
+ const uniqueProviders = new Set(models.map((model) => model.provider));
3600
3630
  this.footerDataProvider.setAvailableProviderCount(uniqueProviders.size);
3601
3631
  }
3602
3632
  async maybeWarnAboutAnthropicSubscriptionAuth(model = this.session.model) {