@ashx-j/lunr 0.2.15 → 0.2.16

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 (29) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
  3. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
  4. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
  5. package/dist/core/agent-session.d.ts +3 -0
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +50 -4
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/compaction/compaction.d.ts.map +1 -1
  10. package/dist/core/compaction/compaction.js +10 -5
  11. package/dist/core/compaction/compaction.js.map +1 -1
  12. package/dist/core/extensions/types.d.ts +2 -2
  13. package/dist/core/extensions/types.d.ts.map +1 -1
  14. package/dist/core/extensions/types.js.map +1 -1
  15. package/dist/modes/interactive/interactive-mode.d.ts +2 -0
  16. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  17. package/dist/modes/interactive/interactive-mode.js +19 -4
  18. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  19. package/docs/compaction.md +5 -3
  20. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  21. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  22. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  23. package/examples/extensions/gondolin/package-lock.json +2 -2
  24. package/examples/extensions/gondolin/package.json +1 -1
  25. package/examples/extensions/sandbox/package-lock.json +2 -2
  26. package/examples/extensions/sandbox/package.json +1 -1
  27. package/examples/extensions/with-deps/package-lock.json +2 -2
  28. package/examples/extensions/with-deps/package.json +1 -1
  29. package/package.json +4 -4
@@ -288,6 +288,7 @@ export class InteractiveMode {
288
288
  pendingBashComponents = [];
289
289
  // Auto-compaction state
290
290
  autoCompactionEscapeHandler;
291
+ pendingCompactionRender;
291
292
  // Auto-retry state
292
293
  retryEscapeHandler;
293
294
  // Messages queued while compaction is running
@@ -1482,6 +1483,7 @@ export class InteractiveMode {
1482
1483
  this.chatContainer.clear();
1483
1484
  this.pendingMessagesContainer.clear();
1484
1485
  this.compactionQueuedMessages = [];
1486
+ this.pendingCompactionRender = undefined;
1485
1487
  this.stopSmoothStreaming();
1486
1488
  this.streamingComponent = undefined;
1487
1489
  this.streamingMessage = undefined;
@@ -2950,6 +2952,11 @@ export class InteractiveMode {
2950
2952
  this.ui.requestRender();
2951
2953
  break;
2952
2954
  case "agent_settled":
2955
+ if (this.pendingCompactionRender) {
2956
+ const result = this.pendingCompactionRender;
2957
+ this.pendingCompactionRender = undefined;
2958
+ this.renderCompactionResult(result);
2959
+ }
2953
2960
  await this.checkShutdownRequested();
2954
2961
  break;
2955
2962
  case "compaction_start": {
@@ -2983,10 +2990,12 @@ export class InteractiveMode {
2983
2990
  }
2984
2991
  }
2985
2992
  else if (event.result) {
2986
- this.chatContainer.clear();
2987
- this.rebuildChatFromMessages();
2988
- this.addMessageToChat(createCompactionSummaryMessage(event.result.summary, event.result.tokensBefore, new Date().toISOString()));
2989
- this.footer.invalidate();
2993
+ if (this.session.isIdle) {
2994
+ this.renderCompactionResult(event.result);
2995
+ }
2996
+ else {
2997
+ this.pendingCompactionRender = event.result;
2998
+ }
2990
2999
  }
2991
3000
  else if (event.errorMessage) {
2992
3001
  if (event.reason === "manual") {
@@ -3840,6 +3849,12 @@ export class InteractiveMode {
3840
3849
  const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
3841
3850
  return !!extensionRunner.getCommand(commandName);
3842
3851
  }
3852
+ renderCompactionResult(result) {
3853
+ this.chatContainer.clear();
3854
+ this.rebuildChatFromMessages();
3855
+ this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
3856
+ this.footer.invalidate();
3857
+ }
3843
3858
  async flushCompactionQueue(options) {
3844
3859
  if (this.compactionQueuedMessages.length === 0) {
3845
3860
  return;