lsd-pi 1.3.2 → 1.3.7

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 (205) hide show
  1. package/dist/cli.js +2 -1
  2. package/dist/lsd-settings-manager.d.ts +2 -0
  3. package/dist/lsd-settings-manager.js +5 -0
  4. package/dist/resource-loader.js +33 -3
  5. package/dist/resources/extensions/browser-tools/tools/codegen.js +5 -5
  6. package/dist/resources/extensions/browser-tools/tools/navigation.js +107 -178
  7. package/dist/resources/extensions/browser-tools/tools/network-mock.js +112 -167
  8. package/dist/resources/extensions/browser-tools/tools/pages.js +182 -234
  9. package/dist/resources/extensions/browser-tools/tools/refs.js +202 -461
  10. package/dist/resources/extensions/browser-tools/tools/session.js +176 -323
  11. package/dist/resources/extensions/browser-tools/tools/state-persistence.js +91 -154
  12. package/dist/resources/extensions/browser-tools/utils.js +1 -1
  13. package/dist/resources/extensions/cache-timer/index.js +3 -2
  14. package/dist/resources/extensions/slash-commands/extension-manifest.json +2 -2
  15. package/dist/resources/extensions/slash-commands/fast.js +73 -0
  16. package/dist/resources/extensions/slash-commands/index.js +2 -0
  17. package/dist/resources/extensions/slash-commands/plan.js +37 -12
  18. package/dist/resources/extensions/subagent/background-job-manager.js +13 -0
  19. package/dist/resources/extensions/subagent/in-process-runner.js +387 -0
  20. package/dist/resources/extensions/subagent/index.js +278 -626
  21. package/dist/resources/extensions/subagent/legacy-runner.js +503 -0
  22. package/dist/resources/extensions/voice/index.js +96 -36
  23. package/dist/resources/extensions/voice/push-to-talk.js +26 -0
  24. package/dist/welcome-screen.js +2 -2
  25. package/package.json +1 -1
  26. package/packages/pi-agent-core/dist/agent.d.ts +19 -0
  27. package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
  28. package/packages/pi-agent-core/dist/agent.js +16 -0
  29. package/packages/pi-agent-core/dist/agent.js.map +1 -1
  30. package/packages/pi-agent-core/src/agent.ts +32 -2
  31. package/packages/pi-ai/dist/providers/openai-codex-responses.d.ts +34 -1
  32. package/packages/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  33. package/packages/pi-ai/dist/providers/openai-codex-responses.js +32 -4
  34. package/packages/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  35. package/packages/pi-ai/dist/providers/openai-codex-responses.test.js +127 -16
  36. package/packages/pi-ai/dist/providers/openai-codex-responses.test.js.map +1 -1
  37. package/packages/pi-ai/dist/providers/openai-responses.d.ts +8 -1
  38. package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  39. package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.d.ts +2 -0
  40. package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.d.ts.map +1 -0
  41. package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.js +67 -0
  42. package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.js.map +1 -0
  43. package/packages/pi-ai/dist/providers/openai-responses.js +21 -3
  44. package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
  45. package/packages/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
  46. package/packages/pi-ai/dist/providers/simple-options.js +2 -0
  47. package/packages/pi-ai/dist/providers/simple-options.js.map +1 -1
  48. package/packages/pi-ai/dist/types.d.ts +5 -0
  49. package/packages/pi-ai/dist/types.d.ts.map +1 -1
  50. package/packages/pi-ai/dist/types.js.map +1 -1
  51. package/packages/pi-ai/src/providers/openai-codex-responses.test.ts +143 -20
  52. package/packages/pi-ai/src/providers/openai-codex-responses.ts +47 -4
  53. package/packages/pi-ai/src/providers/openai-responses.fast-mode.test.ts +73 -0
  54. package/packages/pi-ai/src/providers/openai-responses.ts +26 -3
  55. package/packages/pi-ai/src/providers/simple-options.ts +2 -0
  56. package/packages/pi-ai/src/types.ts +5 -0
  57. package/packages/pi-coding-agent/dist/core/keybindings.d.ts +1 -1
  58. package/packages/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
  59. package/packages/pi-coding-agent/dist/core/keybindings.js +2 -0
  60. package/packages/pi-coding-agent/dist/core/keybindings.js.map +1 -1
  61. package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  62. package/packages/pi-coding-agent/dist/core/sdk.js +4 -2
  63. package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
  64. package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.d.ts +2 -0
  65. package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.d.ts.map +1 -0
  66. package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.js +35 -0
  67. package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.js.map +1 -0
  68. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +12 -0
  69. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  70. package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.d.ts +2 -0
  71. package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.d.ts.map +1 -0
  72. package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.js +35 -0
  73. package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.js.map +1 -0
  74. package/packages/pi-coding-agent/dist/core/settings-manager.js +24 -0
  75. package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  76. package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  77. package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
  78. package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  79. package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  80. package/packages/pi-coding-agent/dist/core/system-prompt.js +6 -1
  81. package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  82. package/packages/pi-coding-agent/dist/core/tool-priority.d.ts +4 -0
  83. package/packages/pi-coding-agent/dist/core/tool-priority.d.ts.map +1 -0
  84. package/packages/pi-coding-agent/dist/core/tool-priority.js +18 -0
  85. package/packages/pi-coding-agent/dist/core/tool-priority.js.map +1 -0
  86. package/packages/pi-coding-agent/dist/core/tool-priority.test.d.ts +2 -0
  87. package/packages/pi-coding-agent/dist/core/tool-priority.test.d.ts.map +1 -0
  88. package/packages/pi-coding-agent/dist/core/tool-priority.test.js +27 -0
  89. package/packages/pi-coding-agent/dist/core/tool-priority.test.js.map +1 -0
  90. package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts +5 -0
  91. package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -1
  92. package/packages/pi-coding-agent/dist/core/tools/edit-diff.js +21 -0
  93. package/packages/pi-coding-agent/dist/core/tools/edit-diff.js.map +1 -1
  94. package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js +16 -1
  95. package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js.map +1 -1
  96. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.d.ts +2 -0
  97. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.d.ts.map +1 -0
  98. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.js +34 -0
  99. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.js.map +1 -0
  100. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.d.ts +45 -0
  101. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.d.ts.map +1 -0
  102. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.js +314 -0
  103. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.js.map +1 -0
  104. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.d.ts +2 -0
  105. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.d.ts.map +1 -0
  106. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.js +122 -0
  107. package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.js.map +1 -0
  108. package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts +7 -5
  109. package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -1
  110. package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js +86 -28
  111. package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js.map +1 -1
  112. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts +4 -0
  113. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
  114. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +23 -10
  115. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  116. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +8 -0
  117. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  118. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +52 -6
  119. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  120. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +19 -0
  121. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  122. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +127 -14
  123. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  124. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.d.ts +14 -0
  125. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.d.ts.map +1 -0
  126. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.js +93 -0
  127. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.js.map +1 -0
  128. package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.d.ts +2 -0
  129. package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.d.ts.map +1 -0
  130. package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.js +328 -0
  131. package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.js.map +1 -0
  132. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  133. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +123 -0
  134. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  135. package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js +1 -1
  136. package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js.map +1 -1
  137. package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
  138. package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +7 -0
  139. package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
  140. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts +4 -0
  141. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
  142. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.js.map +1 -1
  143. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +9 -1
  144. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  145. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +103 -23
  146. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  147. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
  148. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +41 -0
  149. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
  150. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +4 -4
  151. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
  152. package/packages/pi-coding-agent/package.json +1 -1
  153. package/packages/pi-coding-agent/src/core/keybindings.ts +4 -1
  154. package/packages/pi-coding-agent/src/core/sdk.ts +4 -2
  155. package/packages/pi-coding-agent/src/core/settings-manager.collapse-tool-calls.test.ts +46 -0
  156. package/packages/pi-coding-agent/src/core/settings-manager.fast-mode.test.ts +46 -0
  157. package/packages/pi-coding-agent/src/core/settings-manager.ts +36 -0
  158. package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
  159. package/packages/pi-coding-agent/src/core/system-prompt.ts +6 -1
  160. package/packages/pi-coding-agent/src/core/tool-priority.test.ts +30 -0
  161. package/packages/pi-coding-agent/src/core/tool-priority.ts +17 -0
  162. package/packages/pi-coding-agent/src/core/tools/edit-diff.test.ts +20 -0
  163. package/packages/pi-coding-agent/src/core/tools/edit-diff.ts +26 -0
  164. package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-summary-line.test.ts +41 -0
  165. package/packages/pi-coding-agent/src/modes/interactive/components/btw-overlay.test.ts +172 -0
  166. package/packages/pi-coding-agent/src/modes/interactive/components/btw-overlay.ts +402 -0
  167. package/packages/pi-coding-agent/src/modes/interactive/components/diff.ts +105 -28
  168. package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +21 -6
  169. package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +63 -6
  170. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +1262 -1138
  171. package/packages/pi-coding-agent/src/modes/interactive/components/tool-summary-line.ts +120 -0
  172. package/packages/pi-coding-agent/src/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.ts +396 -0
  173. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +530 -398
  174. package/packages/pi-coding-agent/src/modes/interactive/controllers/extension-ui-controller.ts +1 -1
  175. package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +7 -0
  176. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-state.ts +4 -0
  177. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +109 -23
  178. package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +60 -1
  179. package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +4 -4
  180. package/packages/pi-tui/dist/components/editor.js +3 -3
  181. package/packages/pi-tui/dist/components/editor.js.map +1 -1
  182. package/packages/pi-tui/src/components/editor.ts +3 -3
  183. package/pkg/dist/modes/interactive/theme/themes.js +4 -4
  184. package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
  185. package/pkg/package.json +1 -1
  186. package/src/resources/extensions/browser-tools/tools/codegen.ts +5 -5
  187. package/src/resources/extensions/browser-tools/tools/navigation.ts +118 -196
  188. package/src/resources/extensions/browser-tools/tools/network-mock.ts +114 -205
  189. package/src/resources/extensions/browser-tools/tools/pages.ts +183 -237
  190. package/src/resources/extensions/browser-tools/tools/refs.ts +193 -507
  191. package/src/resources/extensions/browser-tools/tools/session.ts +182 -321
  192. package/src/resources/extensions/browser-tools/tools/state-persistence.ts +94 -172
  193. package/src/resources/extensions/browser-tools/utils.ts +1 -1
  194. package/src/resources/extensions/cache-timer/index.ts +3 -2
  195. package/src/resources/extensions/slash-commands/extension-manifest.json +2 -2
  196. package/src/resources/extensions/slash-commands/fast.ts +89 -0
  197. package/src/resources/extensions/slash-commands/index.ts +2 -0
  198. package/src/resources/extensions/slash-commands/plan.ts +42 -12
  199. package/src/resources/extensions/subagent/background-job-manager.ts +28 -0
  200. package/src/resources/extensions/subagent/in-process-runner.ts +534 -0
  201. package/src/resources/extensions/subagent/index.ts +489 -799
  202. package/src/resources/extensions/subagent/legacy-runner.ts +607 -0
  203. package/src/resources/extensions/voice/index.ts +308 -238
  204. package/src/resources/extensions/voice/push-to-talk.ts +42 -0
  205. package/src/resources/extensions/voice/tests/push-to-talk.test.ts +109 -0
@@ -48,6 +48,7 @@ import { SessionSelectorComponent } from "./components/session-selector.js";
48
48
  import { SettingsSelectorComponent } from "./components/settings-selector.js";
49
49
  import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
50
50
  import { ToolExecutionComponent } from "./components/tool-execution.js";
51
+ import { ToolSummaryLine } from "./components/tool-summary-line.js";
51
52
  import { TreeSelectorComponent } from "./components/tree-selector.js";
52
53
  import { UserMessageComponent } from "./components/user-message.js";
53
54
  import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
@@ -197,11 +198,16 @@ export class InteractiveMode {
197
198
  this.streamingMessage = undefined;
198
199
  // Tool execution tracking: toolCallId -> component
199
200
  this.pendingTools = new Map();
201
+ this.collapsedToolSummaryLine = undefined;
200
202
  this.agentPtyComponents = new Map();
201
203
  // Tool output expansion state
204
+ this.collapsedToolCallsExpanded = false;
202
205
  this.toolOutputExpanded = false;
203
206
  // Thinking block visibility state
204
207
  this.hideThinkingBlock = false;
208
+ // Notification sound (terminal bell on completed agent response)
209
+ this.notificationSoundEnabled = false;
210
+ this.playNotificationSoundOnAgentEnd = false;
205
211
  // Pin last prompt feature
206
212
  this.pinLastPromptEnabled = false;
207
213
  this.lastSentPromptText = undefined;
@@ -270,6 +276,10 @@ export class InteractiveMode {
270
276
  this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
271
277
  // Load pin last prompt setting
272
278
  this.pinLastPromptEnabled = this.settingsManager.getPinLastPrompt();
279
+ // Load notification sound setting
280
+ this.notificationSoundEnabled = this.settingsManager.getNotificationSound();
281
+ this.footer.setNotificationSoundEnabled(this.notificationSoundEnabled);
282
+ this.footer.setVerboseFooterEnabled(this.settingsManager.getVerboseFooter());
273
283
  // Register themes from resource loader and initialize
274
284
  setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
275
285
  initTheme(this.settingsManager.getTheme(), true, this.settingsManager.getThemeAccent());
@@ -1866,6 +1876,7 @@ export class InteractiveMode {
1866
1876
  this.defaultEditor.onAction("cyclePermissionMode", () => this.cyclePermissionMode());
1867
1877
  this.defaultEditor.onAction("showHotkeys", () => showHotkeys(this.getSlashCommandContext()));
1868
1878
  this.defaultEditor.onAction("terminalFocus", () => this.toggleEmbeddedTerminalFocus());
1879
+ this.defaultEditor.onAction("toggleNotificationSound", () => this.toggleNotificationSound());
1869
1880
  // Global debug handler on TUI (works regardless of focus)
1870
1881
  this.ui.onDebug = () => this.handleDebugCommand();
1871
1882
  this.defaultEditor.onAction("selectModel", () => this.showModelSelector());
@@ -1884,6 +1895,7 @@ export class InteractiveMode {
1884
1895
  if (wasBashMode !== this.isBashMode) {
1885
1896
  this.updateEditorBorderColor();
1886
1897
  }
1898
+ this.updateEditorExpandHint();
1887
1899
  };
1888
1900
  // Handle clipboard image paste (triggered on Ctrl+V)
1889
1901
  this.defaultEditor.onPasteImage = () => {
@@ -2488,6 +2500,13 @@ export class InteractiveMode {
2488
2500
  this.showStatus(`Thinking level: ${newLevel}`);
2489
2501
  }
2490
2502
  }
2503
+ toggleNotificationSound() {
2504
+ this.notificationSoundEnabled = !this.notificationSoundEnabled;
2505
+ this.settingsManager.setNotificationSound(this.notificationSoundEnabled);
2506
+ this.footer.setNotificationSoundEnabled(this.notificationSoundEnabled);
2507
+ this.ui.requestRender();
2508
+ this.showStatus(`Notification sound: ${this.notificationSoundEnabled ? "enabled" : "disabled"}`);
2509
+ }
2491
2510
  async cycleModel(direction) {
2492
2511
  try {
2493
2512
  const result = await this.session.cycleModel(direction);
@@ -2506,52 +2525,84 @@ export class InteractiveMode {
2506
2525
  this.showError(error instanceof Error ? error.message : String(error));
2507
2526
  }
2508
2527
  }
2528
+ hasCollapsedToolCallSummaries() {
2529
+ return this.chatContainer.children.some((child) => child instanceof ToolSummaryLine);
2530
+ }
2531
+ shouldUseCollapsedToolCallIntermediateState() {
2532
+ return this.settingsManager.getCollapseToolCalls() && this.hasCollapsedToolCallSummaries();
2533
+ }
2509
2534
  toggleToolOutputExpansion() {
2510
- this.setToolsExpanded(!this.toolOutputExpanded);
2535
+ if (this.toolOutputExpanded) {
2536
+ this.setToolOutputExpansionState(false, false);
2537
+ return;
2538
+ }
2539
+ if (this.shouldUseCollapsedToolCallIntermediateState() && !this.collapsedToolCallsExpanded) {
2540
+ this.setToolOutputExpansionState(true, false);
2541
+ return;
2542
+ }
2543
+ this.setToolOutputExpansionState(true, true);
2511
2544
  }
2512
2545
  setToolsExpanded(expanded) {
2513
- this.toolOutputExpanded = expanded;
2546
+ this.setToolOutputExpansionState(expanded, expanded);
2547
+ }
2548
+ setToolOutputExpansionState(collapsedToolCallsExpanded, toolOutputExpanded) {
2549
+ this.collapsedToolCallsExpanded = collapsedToolCallsExpanded || toolOutputExpanded;
2550
+ this.toolOutputExpanded = toolOutputExpanded;
2551
+ const collapseToolCalls = this.settingsManager.getCollapseToolCalls();
2552
+ const showCollapsedToolCalls = collapseToolCalls && this.collapsedToolCallsExpanded;
2514
2553
  for (const child of this.chatContainer.children) {
2515
2554
  if (isExpandable(child)) {
2516
- child.setExpanded(expanded);
2555
+ child.setExpanded(toolOutputExpanded);
2556
+ }
2557
+ if (child instanceof ToolExecutionComponent) {
2558
+ child.setHidden(!showCollapsedToolCalls && child.shouldHideWhenCollapsed(collapseToolCalls));
2559
+ }
2560
+ if (child instanceof ToolSummaryLine) {
2561
+ child.setHidden(!collapseToolCalls || showCollapsedToolCalls);
2517
2562
  }
2518
2563
  }
2519
2564
  if (this.bashComponent) {
2520
- this.bashComponent.setExpanded(expanded);
2565
+ this.bashComponent.setExpanded(toolOutputExpanded);
2521
2566
  }
2522
2567
  for (const component of this.pendingBashComponents) {
2523
- component.setExpanded(expanded);
2568
+ component.setExpanded(toolOutputExpanded);
2524
2569
  }
2525
2570
  this.updateEditorExpandHint();
2526
2571
  this.ui.requestRender();
2527
2572
  }
2528
- /** Append/remove the "ctrl+o to expand" hint in the editor bottom border. */
2573
+ /** Append/remove right-aligned expand and streaming hints in editor bottom border. */
2529
2574
  updateEditorExpandHint() {
2530
2575
  const expandKey = appKey(this.keybindings, "expandTools");
2531
2576
  const collapseHint = `${theme.fg("dim", expandKey)}${theme.fg("muted", " collapse")}`;
2532
- const expandHint = `${theme.fg("dim", expandKey)}${theme.fg("muted", " : verbose")}`;
2533
- // The base hint set during agent_start
2534
- const enterKey = theme.fg("dim", "↵");
2535
- const followUpKey = theme.fg("dim", appKey(this.keybindings, "followUp"));
2536
- const steerLabel = theme.fg("muted", " steer");
2537
- const queueLabel = theme.fg("muted", " queue");
2538
- const baseHint = `${enterKey}${steerLabel} ${followUpKey}${queueLabel}`;
2577
+ const expandToolCallsHint = `${theme.fg("dim", expandKey)}${theme.fg("muted", " : uncollapsed tools")}`;
2578
+ const expandVerboseHint = `${theme.fg("dim", expandKey)}${theme.fg("muted", " : verbose")}`;
2579
+ const editorHasText = this.defaultEditor.getText().trim().length > 0;
2580
+ const streamingHints = editorHasText
2581
+ ? `${theme.fg("dim", "↵")}${theme.fg("muted", " steer")} ${theme.fg("dim", appKey(this.keybindings, "followUp"))}${theme.fg("muted", " queue")}`
2582
+ : "";
2539
2583
  // Check if there are any expandable tool outputs in the chat
2540
2584
  const hasToolOutputs = this.chatContainer.children.some(isExpandable) ||
2541
2585
  !!this.bashComponent ||
2542
2586
  this.pendingBashComponents.length > 0;
2543
- const activeHint = this.toolOutputExpanded ? collapseHint : expandHint;
2544
- if (this.loadingAnimation) {
2545
- // Agent is running - always show expand/collapse hint when there are tool outputs
2546
- this.defaultEditor.bottomHint = hasToolOutputs
2547
- ? `${baseHint} ${activeHint}`
2548
- : baseHint;
2587
+ const canExpandCollapsedToolCalls = this.shouldUseCollapsedToolCallIntermediateState();
2588
+ let activeHint = expandVerboseHint;
2589
+ if (this.toolOutputExpanded) {
2590
+ activeHint = collapseHint;
2591
+ }
2592
+ else if (this.collapsedToolCallsExpanded && canExpandCollapsedToolCalls) {
2593
+ activeHint = expandVerboseHint;
2594
+ }
2595
+ else if (canExpandCollapsedToolCalls) {
2596
+ activeHint = expandToolCallsHint;
2549
2597
  }
2550
- else if (hasToolOutputs) {
2551
- // Idle - show expand/collapse hint so user knows ctrl+o works
2552
- this.defaultEditor.bottomHint = activeHint;
2598
+ const rightHints = [];
2599
+ if (this.loadingAnimation && streamingHints) {
2600
+ rightHints.push(streamingHints);
2553
2601
  }
2554
- // If no tool outputs and idle, leave bottomHint as-is (cleared by agent_end)
2602
+ if (hasToolOutputs) {
2603
+ rightHints.push(activeHint);
2604
+ }
2605
+ this.defaultEditor.bottomHint = rightHints.join(" ");
2555
2606
  }
2556
2607
  toggleThinkingBlockVisibility() {
2557
2608
  this.hideThinkingBlock = !this.hideThinkingBlock;
@@ -2857,7 +2908,9 @@ export class InteractiveMode {
2857
2908
  enableSkillCommands: this.settingsManager.getEnableSkillCommands(),
2858
2909
  toolProfile: this.settingsManager.getToolProfile(),
2859
2910
  codexRotate: this.settingsManager.getCodexRotate(),
2911
+ fastMode: this.settingsManager.getFastMode(),
2860
2912
  cacheTimer: this.settingsManager.getCacheTimer(),
2913
+ verboseFooter: this.settingsManager.getVerboseFooter(),
2861
2914
  pinLastPrompt: this.settingsManager.getPinLastPrompt(),
2862
2915
  steeringMode: this.session.steeringMode,
2863
2916
  followUpMode: this.session.followUpMode,
@@ -2882,10 +2935,12 @@ export class InteractiveMode {
2882
2935
  clearOnShrink: this.settingsManager.getClearOnShrink(),
2883
2936
  timestampFormat: this.settingsManager.getTimestampFormat(),
2884
2937
  toolOutputMode: this.settingsManager.getToolOutputMode(),
2938
+ collapseToolCalls: this.settingsManager.getCollapseToolCalls(),
2885
2939
  rtk: this.settingsManager.getRtk(),
2886
2940
  editorScheme: this.settingsManager.getEditorScheme(),
2887
2941
  autoDream: this.settingsManager.getAutoDream(),
2888
2942
  autoMemory: this.settingsManager.getAutoMemory(),
2943
+ notificationSound: this.notificationSoundEnabled,
2889
2944
  telegramLiveRelayAutoConnect: this.settingsManager.getTelegramLiveRelayAutoConnect(),
2890
2945
  sandboxEnabled: this.settingsManager.getSandboxSettings().enabled ?? true,
2891
2946
  sandboxNetworkMode: this.settingsManager.getSandboxSettings().networkMode
@@ -2984,10 +3039,20 @@ export class InteractiveMode {
2984
3039
  this.settingsManager.setCodexRotate(enabled);
2985
3040
  this.showStatus(`Codex rotate: ${enabled ? "enabled" : "disabled"} (restart required)`);
2986
3041
  },
3042
+ onFastModeChange: (enabled) => {
3043
+ this.settingsManager.setFastMode(enabled);
3044
+ this.showStatus(`Fast mode: ${enabled ? "enabled" : "disabled"}`);
3045
+ },
2987
3046
  onCacheTimerChange: (enabled) => {
2988
3047
  this.settingsManager.setCacheTimer(enabled);
2989
3048
  this.showStatus(`Cache timer: ${enabled ? "enabled" : "disabled"}`);
2990
3049
  },
3050
+ onVerboseFooterChange: (enabled) => {
3051
+ this.settingsManager.setVerboseFooter(enabled);
3052
+ this.footer.setVerboseFooterEnabled(enabled);
3053
+ this.ui.requestRender();
3054
+ this.showStatus(`Verbose footer: ${enabled ? "enabled" : "disabled"}`);
3055
+ },
2991
3056
  onPinLastPromptChange: (enabled) => {
2992
3057
  this.settingsManager.setPinLastPrompt(enabled);
2993
3058
  this.pinLastPromptEnabled = enabled;
@@ -3006,6 +3071,13 @@ export class InteractiveMode {
3006
3071
  this.settingsManager.setAutoMemory(enabled);
3007
3072
  this.showStatus(`Auto memory: ${enabled ? "enabled" : "disabled"}`);
3008
3073
  },
3074
+ onNotificationSoundChange: (enabled) => {
3075
+ this.notificationSoundEnabled = enabled;
3076
+ this.settingsManager.setNotificationSound(enabled);
3077
+ this.footer.setNotificationSoundEnabled(enabled);
3078
+ this.ui.requestRender();
3079
+ this.showStatus(`Notification sound: ${enabled ? "enabled" : "disabled"}`);
3080
+ },
3009
3081
  onTelegramLiveRelayAutoConnectChange: (enabled) => {
3010
3082
  this.settingsManager.setTelegramLiveRelayAutoConnect(enabled);
3011
3083
  this.showStatus(`Telegram autoconnect: ${enabled ? "enabled" : "disabled"}`);
@@ -3116,6 +3188,14 @@ export class InteractiveMode {
3116
3188
  this.settingsManager.setEditorScheme(scheme);
3117
3189
  this.showStatus(`Editor link scheme: ${scheme}`);
3118
3190
  },
3191
+ onCollapseToolCallsChange: (enabled) => {
3192
+ this.settingsManager.setCollapseToolCalls(enabled);
3193
+ this.setToolOutputExpansionState(enabled && (this.collapsedToolCallsExpanded || this.toolOutputExpanded), this.toolOutputExpanded);
3194
+ if (!enabled) {
3195
+ this.collapsedToolSummaryLine = undefined;
3196
+ }
3197
+ this.showStatus(`Collapse tool calls: ${enabled ? "enabled" : "disabled"}`);
3198
+ },
3119
3199
  onToolOutputModeChange: (mode) => {
3120
3200
  this.settingsManager.setToolOutputMode(mode);
3121
3201
  for (const child of this.chatContainer.children) {