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.
- package/dist/cli.js +2 -1
- package/dist/lsd-settings-manager.d.ts +2 -0
- package/dist/lsd-settings-manager.js +5 -0
- package/dist/resource-loader.js +33 -3
- package/dist/resources/extensions/browser-tools/tools/codegen.js +5 -5
- package/dist/resources/extensions/browser-tools/tools/navigation.js +107 -178
- package/dist/resources/extensions/browser-tools/tools/network-mock.js +112 -167
- package/dist/resources/extensions/browser-tools/tools/pages.js +182 -234
- package/dist/resources/extensions/browser-tools/tools/refs.js +202 -461
- package/dist/resources/extensions/browser-tools/tools/session.js +176 -323
- package/dist/resources/extensions/browser-tools/tools/state-persistence.js +91 -154
- package/dist/resources/extensions/browser-tools/utils.js +1 -1
- package/dist/resources/extensions/cache-timer/index.js +3 -2
- package/dist/resources/extensions/slash-commands/extension-manifest.json +2 -2
- package/dist/resources/extensions/slash-commands/fast.js +73 -0
- package/dist/resources/extensions/slash-commands/index.js +2 -0
- package/dist/resources/extensions/slash-commands/plan.js +37 -12
- package/dist/resources/extensions/subagent/background-job-manager.js +13 -0
- package/dist/resources/extensions/subagent/in-process-runner.js +387 -0
- package/dist/resources/extensions/subagent/index.js +278 -626
- package/dist/resources/extensions/subagent/legacy-runner.js +503 -0
- package/dist/resources/extensions/voice/index.js +96 -36
- package/dist/resources/extensions/voice/push-to-talk.js +26 -0
- package/dist/welcome-screen.js +2 -2
- package/package.json +1 -1
- package/packages/pi-agent-core/dist/agent.d.ts +19 -0
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +16 -0
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/src/agent.ts +32 -2
- package/packages/pi-ai/dist/providers/openai-codex-responses.d.ts +34 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.js +32 -4
- package/packages/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.js +127 -16
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.d.ts +8 -1
- package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.js +67 -0
- package/packages/pi-ai/dist/providers/openai-responses.fast-mode.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/openai-responses.js +21 -3
- package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/simple-options.js +2 -0
- package/packages/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +5 -0
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/src/providers/openai-codex-responses.test.ts +143 -20
- package/packages/pi-ai/src/providers/openai-codex-responses.ts +47 -4
- package/packages/pi-ai/src/providers/openai-responses.fast-mode.test.ts +73 -0
- package/packages/pi-ai/src/providers/openai-responses.ts +26 -3
- package/packages/pi-ai/src/providers/simple-options.ts +2 -0
- package/packages/pi-ai/src/types.ts +5 -0
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.js +2 -0
- package/packages/pi-coding-agent/dist/core/keybindings.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +4 -2
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.js +35 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.collapse-tool-calls.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +12 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.js +35 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.fast-mode.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js +24 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +6 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tool-priority.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.js +18 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.test.js +27 -0
- package/packages/pi-coding-agent/dist/core/tool-priority.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts +5 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.js +21 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js +16 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.js +34 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-summary-line.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.d.ts +45 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.js +314 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.js +122 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/btw-overlay.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts +7 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js +86 -28
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +23 -10
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +8 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +52 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +19 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +127 -14
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.d.ts +14 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.js +93 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-summary-line.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.js +328 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +123 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +7 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +9 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +103 -23
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +41 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +4 -4
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/keybindings.ts +4 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +4 -2
- package/packages/pi-coding-agent/src/core/settings-manager.collapse-tool-calls.test.ts +46 -0
- package/packages/pi-coding-agent/src/core/settings-manager.fast-mode.test.ts +46 -0
- package/packages/pi-coding-agent/src/core/settings-manager.ts +36 -0
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/packages/pi-coding-agent/src/core/system-prompt.ts +6 -1
- package/packages/pi-coding-agent/src/core/tool-priority.test.ts +30 -0
- package/packages/pi-coding-agent/src/core/tool-priority.ts +17 -0
- package/packages/pi-coding-agent/src/core/tools/edit-diff.test.ts +20 -0
- package/packages/pi-coding-agent/src/core/tools/edit-diff.ts +26 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-summary-line.test.ts +41 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/btw-overlay.test.ts +172 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/btw-overlay.ts +402 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/diff.ts +105 -28
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +21 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +63 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +1262 -1138
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-summary-line.ts +120 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/__tests__/chat-controller.collapsed-tool-summary.test.ts +396 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +530 -398
- package/packages/pi-coding-agent/src/modes/interactive/controllers/extension-ui-controller.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +7 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-state.ts +4 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +109 -23
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +60 -1
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +4 -4
- package/packages/pi-tui/dist/components/editor.js +3 -3
- package/packages/pi-tui/dist/components/editor.js.map +1 -1
- package/packages/pi-tui/src/components/editor.ts +3 -3
- package/pkg/dist/modes/interactive/theme/themes.js +4 -4
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/browser-tools/tools/codegen.ts +5 -5
- package/src/resources/extensions/browser-tools/tools/navigation.ts +118 -196
- package/src/resources/extensions/browser-tools/tools/network-mock.ts +114 -205
- package/src/resources/extensions/browser-tools/tools/pages.ts +183 -237
- package/src/resources/extensions/browser-tools/tools/refs.ts +193 -507
- package/src/resources/extensions/browser-tools/tools/session.ts +182 -321
- package/src/resources/extensions/browser-tools/tools/state-persistence.ts +94 -172
- package/src/resources/extensions/browser-tools/utils.ts +1 -1
- package/src/resources/extensions/cache-timer/index.ts +3 -2
- package/src/resources/extensions/slash-commands/extension-manifest.json +2 -2
- package/src/resources/extensions/slash-commands/fast.ts +89 -0
- package/src/resources/extensions/slash-commands/index.ts +2 -0
- package/src/resources/extensions/slash-commands/plan.ts +42 -12
- package/src/resources/extensions/subagent/background-job-manager.ts +28 -0
- package/src/resources/extensions/subagent/in-process-runner.ts +534 -0
- package/src/resources/extensions/subagent/index.ts +489 -799
- package/src/resources/extensions/subagent/legacy-runner.ts +607 -0
- package/src/resources/extensions/voice/index.ts +308 -238
- package/src/resources/extensions/voice/push-to-talk.ts +42 -0
- 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
|
-
|
|
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.
|
|
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(
|
|
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(
|
|
2565
|
+
this.bashComponent.setExpanded(toolOutputExpanded);
|
|
2521
2566
|
}
|
|
2522
2567
|
for (const component of this.pendingBashComponents) {
|
|
2523
|
-
component.setExpanded(
|
|
2568
|
+
component.setExpanded(toolOutputExpanded);
|
|
2524
2569
|
}
|
|
2525
2570
|
this.updateEditorExpandHint();
|
|
2526
2571
|
this.ui.requestRender();
|
|
2527
2572
|
}
|
|
2528
|
-
/** Append/remove
|
|
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
|
|
2533
|
-
|
|
2534
|
-
const
|
|
2535
|
-
const
|
|
2536
|
-
|
|
2537
|
-
|
|
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
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
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
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2598
|
+
const rightHints = [];
|
|
2599
|
+
if (this.loadingAnimation && streamingHints) {
|
|
2600
|
+
rightHints.push(streamingHints);
|
|
2553
2601
|
}
|
|
2554
|
-
|
|
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) {
|