@dreb/coding-agent 2.16.0 → 2.18.0

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 (43) hide show
  1. package/README.md +7 -4
  2. package/dist/cli/args.d.ts.map +1 -1
  3. package/dist/cli/args.js +2 -1
  4. package/dist/cli/args.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 +12 -0
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/sdk.d.ts +1 -1
  10. package/dist/core/sdk.d.ts.map +1 -1
  11. package/dist/core/sdk.js +2 -1
  12. package/dist/core/sdk.js.map +1 -1
  13. package/dist/core/system-prompt.d.ts.map +1 -1
  14. package/dist/core/system-prompt.js +1 -0
  15. package/dist/core/system-prompt.js.map +1 -1
  16. package/dist/core/tools/index.d.ts +11 -1
  17. package/dist/core/tools/index.d.ts.map +1 -1
  18. package/dist/core/tools/index.js +17 -2
  19. package/dist/core/tools/index.js.map +1 -1
  20. package/dist/core/tools/subagent.d.ts +6 -0
  21. package/dist/core/tools/subagent.d.ts.map +1 -1
  22. package/dist/core/tools/subagent.js +28 -3
  23. package/dist/core/tools/subagent.js.map +1 -1
  24. package/dist/core/tools/suggest-next.d.ts +19 -0
  25. package/dist/core/tools/suggest-next.d.ts.map +1 -0
  26. package/dist/core/tools/suggest-next.js +72 -0
  27. package/dist/core/tools/suggest-next.js.map +1 -0
  28. package/dist/core/tools/tmp-read.d.ts.map +1 -1
  29. package/dist/core/tools/tmp-read.js +14 -1
  30. package/dist/core/tools/tmp-read.js.map +1 -1
  31. package/dist/core/tools/wait.d.ts +40 -0
  32. package/dist/core/tools/wait.d.ts.map +1 -0
  33. package/dist/core/tools/wait.js +87 -0
  34. package/dist/core/tools/wait.js.map +1 -0
  35. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  36. package/dist/modes/interactive/interactive-mode.js +13 -0
  37. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  38. package/docs/extensions.md +2 -2
  39. package/docs/json.md +2 -1
  40. package/docs/rpc.md +30 -0
  41. package/docs/session.md +24 -0
  42. package/docs/tui.md +8 -0
  43. package/package.json +1 -1
@@ -963,6 +963,7 @@ export class InteractiveMode {
963
963
  return { cancelled: true };
964
964
  }
965
965
  // Clear UI state
966
+ this.editor.setGhostText?.(null);
966
967
  this.chatContainer.clear();
967
968
  this.pendingMessagesContainer.clear();
968
969
  this.compactionQueuedMessages = [];
@@ -1623,6 +1624,8 @@ export class InteractiveMode {
1623
1624
  // Set up handlers on defaultEditor - they use this.editor for text access
1624
1625
  // so they work correctly regardless of which editor is active
1625
1626
  this.defaultEditor.onEscape = () => {
1627
+ // Always clear ghost text on Escape (CustomEditor intercepts before super.handleInput)
1628
+ this.editor.setGhostText?.(null);
1626
1629
  if (this.loadingAnimation) {
1627
1630
  this.cancelBackgroundAgents();
1628
1631
  this.restoreQueuedMessagesToEditor({ abort: true });
@@ -1906,6 +1909,8 @@ export class InteractiveMode {
1906
1909
  this.footer.invalidate();
1907
1910
  switch (event.type) {
1908
1911
  case "agent_start":
1912
+ // Clear ghost text when a new agent turn starts
1913
+ this.editor.setGhostText?.(null);
1909
1914
  // Restore main escape handler if retry handler is still active
1910
1915
  // (retry success event fires later, but we need main handler now)
1911
1916
  if (this.retryEscapeHandler) {
@@ -2162,6 +2167,13 @@ export class InteractiveMode {
2162
2167
  this.ui.requestRender();
2163
2168
  break;
2164
2169
  }
2170
+ case "suggest_next": {
2171
+ // Show suggestion as ghost text if editor is empty
2172
+ if (this.editor.setGhostText && this.editor.getText() === "") {
2173
+ this.editor.setGhostText(event.command);
2174
+ }
2175
+ break;
2176
+ }
2165
2177
  }
2166
2178
  }
2167
2179
  /** Update the footer status line with running background agent count. */
@@ -3293,6 +3305,7 @@ export class InteractiveMode {
3293
3305
  }
3294
3306
  this.statusContainer.clear();
3295
3307
  // Clear UI state
3308
+ this.editor.setGhostText?.(null);
3296
3309
  this.pendingMessagesContainer.clear();
3297
3310
  this.compactionQueuedMessages = [];
3298
3311
  this.streamingComponent = undefined;