@deepseek-harness-tui/dsh-tui 0.13.0 → 0.14.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.
- package/README.md +85 -5
- package/assets/claude-girl/claude-girl-happy.png +0 -0
- package/assets/claude-girl/claude-girl.png +0 -0
- package/assets/codex-girl/codex-girl-happy.png +0 -0
- package/assets/codex-girl/codex-girl.png +0 -0
- package/bin/dsh-tui.js +104 -18
- package/cordis.patch.yml +2 -0
- package/cordis.yml +2 -0
- package/guide/dsh-tui-guide/SKILL.md +4 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +203 -0
- package/guide/dsh-tui-guide/claude-backend.md +161 -0
- package/guide/dsh-tui-guide/codex-backend.en.md +297 -0
- package/guide/dsh-tui-guide/codex-backend.md +257 -0
- package/guide/dsh-tui-guide/configuration.en.md +9 -2
- package/guide/dsh-tui-guide/configuration.md +9 -2
- package/guide/dsh-tui-guide/interaction.en.md +169 -27
- package/guide/dsh-tui-guide/interaction.md +115 -17
- package/guide/dsh-tui-guide/themes.en.md +24 -2
- package/guide/dsh-tui-guide/themes.md +21 -2
- package/guide/dsh-tui-guide/user-guide.en.md +38 -23
- package/guide/dsh-tui-guide/user-guide.md +22 -11
- package/guide/dsh-tui-guide/vscode.en.md +1 -0
- package/guide/dsh-tui-guide/vscode.md +1 -0
- package/lib/settings.json +139 -6
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +17 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +29 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +45 -5
- package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +7 -1
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +5 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +183 -6
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +477 -13
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/agent/backend.d.ts +168 -0
- package/lib/types/agent/backend.d.ts.map +1 -0
- package/lib/types/agent/backend.js +1 -0
- package/lib/types/agent/capabilities.d.ts +461 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -0
- package/lib/types/agent/capabilities.js +1 -0
- package/lib/types/agent/events.d.ts +733 -0
- package/lib/types/agent/events.d.ts.map +1 -0
- package/lib/types/agent/events.js +2 -0
- package/lib/types/agent/index.d.ts +8 -0
- package/lib/types/agent/index.d.ts.map +1 -0
- package/lib/types/agent/index.js +7 -0
- package/lib/types/agent/messages.d.ts +52 -0
- package/lib/types/agent/messages.d.ts.map +1 -0
- package/lib/types/agent/messages.js +91 -0
- package/lib/types/agent/presentation.d.ts +29 -0
- package/lib/types/agent/presentation.d.ts.map +1 -0
- package/lib/types/agent/presentation.js +4 -0
- package/lib/types/agent/refs.d.ts +30 -0
- package/lib/types/agent/refs.d.ts.map +1 -0
- package/lib/types/agent/refs.js +39 -0
- package/lib/types/agent/session.d.ts +78 -0
- package/lib/types/agent/session.d.ts.map +1 -0
- package/lib/types/agent/session.js +1 -0
- package/lib/types/backends/claude/activity.d.ts +53 -0
- package/lib/types/backends/claude/activity.d.ts.map +1 -0
- package/lib/types/backends/claude/activity.js +103 -0
- package/lib/types/backends/claude/auth.d.ts +245 -0
- package/lib/types/backends/claude/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/auth.js +503 -0
- package/lib/types/backends/claude/backend.d.ts +32 -0
- package/lib/types/backends/claude/backend.d.ts.map +1 -0
- package/lib/types/backends/claude/backend.js +296 -0
- package/lib/types/backends/claude/catalog.d.ts +17 -0
- package/lib/types/backends/claude/catalog.d.ts.map +1 -0
- package/lib/types/backends/claude/catalog.js +94 -0
- package/lib/types/backends/claude/channels.d.ts +63 -0
- package/lib/types/backends/claude/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/channels.js +275 -0
- package/lib/types/backends/claude/contract.d.ts +37 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -0
- package/lib/types/backends/claude/contract.js +46 -0
- package/lib/types/backends/claude/controls.d.ts +134 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -0
- package/lib/types/backends/claude/controls.js +425 -0
- package/lib/types/backends/claude/dialogs.d.ts +62 -0
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -0
- package/lib/types/backends/claude/dialogs.js +253 -0
- package/lib/types/backends/claude/flag-settings.d.ts +12 -0
- package/lib/types/backends/claude/flag-settings.d.ts.map +1 -0
- package/lib/types/backends/claude/flag-settings.js +49 -0
- package/lib/types/backends/claude/images.d.ts +49 -0
- package/lib/types/backends/claude/images.d.ts.map +1 -0
- package/lib/types/backends/claude/images.js +94 -0
- package/lib/types/backends/claude/index.d.ts +5 -0
- package/lib/types/backends/claude/index.d.ts.map +1 -0
- package/lib/types/backends/claude/index.js +4 -0
- package/lib/types/backends/claude/install.d.ts +15 -0
- package/lib/types/backends/claude/install.d.ts.map +1 -0
- package/lib/types/backends/claude/install.js +91 -0
- package/lib/types/backends/claude/modelEnv.d.ts +64 -0
- package/lib/types/backends/claude/modelEnv.d.ts.map +1 -0
- package/lib/types/backends/claude/modelEnv.js +199 -0
- package/lib/types/backends/claude/narrow.d.ts +10 -0
- package/lib/types/backends/claude/narrow.d.ts.map +1 -0
- package/lib/types/backends/claude/narrow.js +8 -0
- package/lib/types/backends/claude/older-history.d.ts +16 -0
- package/lib/types/backends/claude/older-history.d.ts.map +1 -0
- package/lib/types/backends/claude/older-history.js +101 -0
- package/lib/types/backends/claude/options.d.ts +181 -0
- package/lib/types/backends/claude/options.d.ts.map +1 -0
- package/lib/types/backends/claude/options.js +208 -0
- package/lib/types/backends/claude/permissions.d.ts +83 -0
- package/lib/types/backends/claude/permissions.d.ts.map +1 -0
- package/lib/types/backends/claude/permissions.js +331 -0
- package/lib/types/backends/claude/prefs.d.ts +55 -0
- package/lib/types/backends/claude/prefs.d.ts.map +1 -0
- package/lib/types/backends/claude/prefs.js +150 -0
- package/lib/types/backends/claude/process.d.ts +19 -0
- package/lib/types/backends/claude/process.d.ts.map +1 -0
- package/lib/types/backends/claude/process.js +156 -0
- package/lib/types/backends/claude/replay.d.ts +129 -0
- package/lib/types/backends/claude/replay.d.ts.map +1 -0
- package/lib/types/backends/claude/replay.js +505 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts +23 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk-warnings.js +55 -0
- package/lib/types/backends/claude/sdk.d.ts +12 -0
- package/lib/types/backends/claude/sdk.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk.js +34 -0
- package/lib/types/backends/claude/send-message.d.ts +54 -0
- package/lib/types/backends/claude/send-message.d.ts.map +1 -0
- package/lib/types/backends/claude/send-message.js +65 -0
- package/lib/types/backends/claude/session/auth.d.ts +47 -0
- package/lib/types/backends/claude/session/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/session/auth.js +226 -0
- package/lib/types/backends/claude/session/channels.d.ts +82 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/session/channels.js +45 -0
- package/lib/types/backends/claude/session/input.d.ts +16 -0
- package/lib/types/backends/claude/session/input.d.ts.map +1 -0
- package/lib/types/backends/claude/session/input.js +64 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts +6 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -0
- package/lib/types/backends/claude/session/lifecycle.js +852 -0
- package/lib/types/backends/claude/session/store.d.ts +17 -0
- package/lib/types/backends/claude/session/store.d.ts.map +1 -0
- package/lib/types/backends/claude/session/store.js +122 -0
- package/lib/types/backends/claude/session/subagents.d.ts +13 -0
- package/lib/types/backends/claude/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/claude/session/subagents.js +77 -0
- package/lib/types/backends/claude/session/types.d.ts +89 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -0
- package/lib/types/backends/claude/session/types.js +1 -0
- package/lib/types/backends/claude/session.d.ts +4 -0
- package/lib/types/backends/claude/session.d.ts.map +1 -0
- package/lib/types/backends/claude/session.js +2 -0
- package/lib/types/backends/claude/side-query.d.ts +34 -0
- package/lib/types/backends/claude/side-query.d.ts.map +1 -0
- package/lib/types/backends/claude/side-query.js +116 -0
- package/lib/types/backends/claude/task-output.d.ts +13 -0
- package/lib/types/backends/claude/task-output.d.ts.map +1 -0
- package/lib/types/backends/claude/task-output.js +101 -0
- package/lib/types/backends/claude/tools.d.ts +45 -0
- package/lib/types/backends/claude/tools.d.ts.map +1 -0
- package/lib/types/backends/claude/tools.js +231 -0
- package/lib/types/backends/claude/transcript-file.d.ts +41 -0
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -0
- package/lib/types/backends/claude/transcript-file.js +195 -0
- package/lib/types/backends/claude/translate/attempts.d.ts +33 -0
- package/lib/types/backends/claude/translate/attempts.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/attempts.js +243 -0
- package/lib/types/backends/claude/translate/content.d.ts +33 -0
- package/lib/types/backends/claude/translate/content.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/content.js +91 -0
- package/lib/types/backends/claude/translate/core.d.ts +76 -0
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/core.js +447 -0
- package/lib/types/backends/claude/translate/events.d.ts +9 -0
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/events.js +77 -0
- package/lib/types/backends/claude/translate/lanes.d.ts +31 -0
- package/lib/types/backends/claude/translate/lanes.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/lanes.js +177 -0
- package/lib/types/backends/claude/translate/messages.d.ts +36 -0
- package/lib/types/backends/claude/translate/messages.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/messages.js +202 -0
- package/lib/types/backends/claude/translate/system.d.ts +40 -0
- package/lib/types/backends/claude/translate/system.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/system.js +399 -0
- package/lib/types/backends/claude/translate/tasks.d.ts +19 -0
- package/lib/types/backends/claude/translate/tasks.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/tasks.js +159 -0
- package/lib/types/backends/claude/translate/types.d.ts +114 -0
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/types.js +1 -0
- package/lib/types/backends/claude/translate.d.ts +9 -0
- package/lib/types/backends/claude/translate.d.ts.map +1 -0
- package/lib/types/backends/claude/translate.js +6 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts +66 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/external-tokens.js +325 -0
- package/lib/types/backends/codex/auth/route.d.ts +14 -0
- package/lib/types/backends/codex/auth/route.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/route.js +52 -0
- package/lib/types/backends/codex/auth/status.d.ts +16 -0
- package/lib/types/backends/codex/auth/status.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/status.js +115 -0
- package/lib/types/backends/codex/backend.d.ts +58 -0
- package/lib/types/backends/codex/backend.d.ts.map +1 -0
- package/lib/types/backends/codex/backend.js +201 -0
- package/lib/types/backends/codex/catalog.d.ts +17 -0
- package/lib/types/backends/codex/catalog.d.ts.map +1 -0
- package/lib/types/backends/codex/catalog.js +128 -0
- package/lib/types/backends/codex/channels.d.ts +59 -0
- package/lib/types/backends/codex/channels.d.ts.map +1 -0
- package/lib/types/backends/codex/channels.js +274 -0
- package/lib/types/backends/codex/contract.d.ts +46 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -0
- package/lib/types/backends/codex/contract.js +80 -0
- package/lib/types/backends/codex/detect.d.ts +14 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -0
- package/lib/types/backends/codex/detect.js +90 -0
- package/lib/types/backends/codex/index.d.ts +6 -0
- package/lib/types/backends/codex/index.d.ts.map +1 -0
- package/lib/types/backends/codex/index.js +5 -0
- package/lib/types/backends/codex/modes.d.ts +16 -0
- package/lib/types/backends/codex/modes.d.ts.map +1 -0
- package/lib/types/backends/codex/modes.js +49 -0
- package/lib/types/backends/codex/narrow.d.ts +20 -0
- package/lib/types/backends/codex/narrow.d.ts.map +1 -0
- package/lib/types/backends/codex/narrow.js +18 -0
- package/lib/types/backends/codex/prefs.d.ts +42 -0
- package/lib/types/backends/codex/prefs.d.ts.map +1 -0
- package/lib/types/backends/codex/prefs.js +124 -0
- package/lib/types/backends/codex/protocol/index.d.ts +149 -0
- package/lib/types/backends/codex/protocol/index.d.ts.map +1 -0
- package/lib/types/backends/codex/protocol/index.js +130 -0
- package/lib/types/backends/codex/rpc/binary.d.ts +35 -0
- package/lib/types/backends/codex/rpc/binary.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/binary.js +174 -0
- package/lib/types/backends/codex/rpc/client.d.ts +72 -0
- package/lib/types/backends/codex/rpc/client.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/client.js +214 -0
- package/lib/types/backends/codex/rpc/hub.d.ts +105 -0
- package/lib/types/backends/codex/rpc/hub.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/hub.js +532 -0
- package/lib/types/backends/codex/rpc/transport.d.ts +39 -0
- package/lib/types/backends/codex/rpc/transport.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/transport.js +212 -0
- package/lib/types/backends/codex/session/activity.d.ts +18 -0
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -0
- package/lib/types/backends/codex/session/activity.js +108 -0
- package/lib/types/backends/codex/session/approvals.d.ts +39 -0
- package/lib/types/backends/codex/session/approvals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/approvals.js +477 -0
- package/lib/types/backends/codex/session/commands.d.ts +37 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/session/commands.js +141 -0
- package/lib/types/backends/codex/session/controls.d.ts +37 -0
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -0
- package/lib/types/backends/codex/session/controls.js +303 -0
- package/lib/types/backends/codex/session/goals.d.ts +25 -0
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/goals.js +97 -0
- package/lib/types/backends/codex/session/history.d.ts +52 -0
- package/lib/types/backends/codex/session/history.d.ts.map +1 -0
- package/lib/types/backends/codex/session/history.js +196 -0
- package/lib/types/backends/codex/session/images.d.ts +17 -0
- package/lib/types/backends/codex/session/images.d.ts.map +1 -0
- package/lib/types/backends/codex/session/images.js +138 -0
- package/lib/types/backends/codex/session/input.d.ts +75 -0
- package/lib/types/backends/codex/session/input.d.ts.map +1 -0
- package/lib/types/backends/codex/session/input.js +294 -0
- package/lib/types/backends/codex/session/plan-review.d.ts +19 -0
- package/lib/types/backends/codex/session/plan-review.d.ts.map +1 -0
- package/lib/types/backends/codex/session/plan-review.js +48 -0
- package/lib/types/backends/codex/session/prompts.d.ts +7 -0
- package/lib/types/backends/codex/session/prompts.d.ts.map +1 -0
- package/lib/types/backends/codex/session/prompts.js +47 -0
- package/lib/types/backends/codex/session/session.d.ts +12 -0
- package/lib/types/backends/codex/session/session.d.ts.map +1 -0
- package/lib/types/backends/codex/session/session.js +871 -0
- package/lib/types/backends/codex/session/side-query.d.ts +25 -0
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -0
- package/lib/types/backends/codex/session/side-query.js +121 -0
- package/lib/types/backends/codex/session/state.d.ts +57 -0
- package/lib/types/backends/codex/session/state.d.ts.map +1 -0
- package/lib/types/backends/codex/session/state.js +1 -0
- package/lib/types/backends/codex/session/subagents.d.ts +28 -0
- package/lib/types/backends/codex/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/codex/session/subagents.js +286 -0
- package/lib/types/backends/codex/session/tasks.d.ts +25 -0
- package/lib/types/backends/codex/session/tasks.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tasks.js +207 -0
- package/lib/types/backends/codex/session/tool-output.d.ts +9 -0
- package/lib/types/backends/codex/session/tool-output.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tool-output.js +29 -0
- package/lib/types/backends/codex/translate/commands.d.ts +30 -0
- package/lib/types/backends/codex/translate/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/commands.js +103 -0
- package/lib/types/backends/codex/translate/events.d.ts +9 -0
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/events.js +71 -0
- package/lib/types/backends/codex/translate/items.d.ts +112 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/items.js +375 -0
- package/lib/types/backends/codex/translate/live.d.ts +39 -0
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/live.js +315 -0
- package/lib/types/backends/codex/translate/notices.d.ts +27 -0
- package/lib/types/backends/codex/translate/notices.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/notices.js +99 -0
- package/lib/types/backends/codex/translate/presentation.d.ts +49 -0
- package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/presentation.js +237 -0
- package/lib/types/backends/codex/translate/replay.d.ts +18 -0
- package/lib/types/backends/codex/translate/replay.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/replay.js +33 -0
- package/lib/types/backends/codex/translate/usage.d.ts +29 -0
- package/lib/types/backends/codex/translate/usage.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/usage.js +65 -0
- package/lib/types/backends/shared/atomic-file.d.ts +4 -0
- package/lib/types/backends/shared/atomic-file.d.ts.map +1 -0
- package/lib/types/backends/shared/atomic-file.js +52 -0
- package/lib/types/backends/shared/channel-tokens.d.ts +29 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-tokens.js +161 -0
- package/lib/types/backends/shared/display-path.d.ts +3 -0
- package/lib/types/backends/shared/display-path.d.ts.map +1 -0
- package/lib/types/backends/shared/display-path.js +12 -0
- package/lib/types/branding.d.ts +92 -0
- package/lib/types/branding.d.ts.map +1 -0
- package/lib/types/branding.js +117 -0
- package/lib/types/channel/activity.d.ts +53 -0
- package/lib/types/channel/activity.d.ts.map +1 -0
- package/lib/types/channel/activity.js +955 -0
- package/lib/types/channel/capabilities.d.ts +24 -0
- package/lib/types/channel/capabilities.d.ts.map +1 -0
- package/lib/types/channel/capabilities.js +57 -0
- package/lib/types/channel/channel-slug.d.ts +9 -0
- package/lib/types/channel/channel-slug.d.ts.map +1 -0
- package/lib/types/channel/channel-slug.js +15 -0
- package/lib/types/channel/channel-wizard.d.ts +30 -0
- package/lib/types/channel/channel-wizard.d.ts.map +1 -0
- package/lib/types/channel/channel-wizard.js +226 -0
- package/lib/types/channel/elicitation.d.ts +135 -0
- package/lib/types/channel/elicitation.d.ts.map +1 -0
- package/lib/types/channel/elicitation.js +360 -0
- package/lib/types/channel/goal-command.d.ts +49 -0
- package/lib/types/channel/goal-command.d.ts.map +1 -0
- package/lib/types/channel/goal-command.js +72 -0
- package/lib/types/channel/history-restore.d.ts +16 -0
- package/lib/types/channel/history-restore.d.ts.map +1 -0
- package/lib/types/channel/history-restore.js +214 -0
- package/lib/types/channel/interaction.d.ts +38 -0
- package/lib/types/channel/interaction.d.ts.map +1 -0
- package/lib/types/channel/interaction.js +110 -0
- package/lib/types/channel/job-format.d.ts +6 -0
- package/lib/types/channel/job-format.d.ts.map +1 -0
- package/lib/types/channel/job-format.js +12 -0
- package/lib/types/channel/live-output.d.ts +35 -0
- package/lib/types/channel/live-output.d.ts.map +1 -0
- package/lib/types/channel/live-output.js +74 -0
- package/lib/types/channel/model-capabilities.d.ts +10 -0
- package/lib/types/channel/model-capabilities.d.ts.map +1 -0
- package/lib/types/channel/model-capabilities.js +51 -0
- package/lib/types/channel/permissions.d.ts +155 -0
- package/lib/types/channel/permissions.d.ts.map +1 -0
- package/lib/types/channel/permissions.js +188 -0
- package/lib/types/channel/projection.d.ts +110 -0
- package/lib/types/channel/projection.d.ts.map +1 -0
- package/lib/types/channel/projection.js +1521 -0
- package/lib/types/channel/question-record.d.ts +76 -0
- package/lib/types/channel/question-record.d.ts.map +1 -0
- package/lib/types/channel/question-record.js +109 -0
- package/lib/types/channel/questions.d.ts +204 -0
- package/lib/types/channel/questions.d.ts.map +1 -0
- package/lib/types/channel/questions.js +286 -0
- package/lib/types/channel/sanitize.d.ts +49 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -0
- package/lib/types/channel/sanitize.js +88 -0
- package/lib/types/channel/selection-record.d.ts +18 -0
- package/lib/types/channel/selection-record.d.ts.map +1 -0
- package/lib/types/channel/selection-record.js +45 -0
- package/lib/types/channel/side-prompts.d.ts +59 -0
- package/lib/types/channel/side-prompts.d.ts.map +1 -0
- package/lib/types/channel/side-prompts.js +127 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -0
- package/lib/types/channel/transcript.js +19 -0
- package/lib/types/channel/usage.d.ts +48 -0
- package/lib/types/channel/usage.d.ts.map +1 -0
- package/lib/types/channel/usage.js +143 -0
- package/lib/types/commands.d.ts +147 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +196 -2
- package/lib/types/components/AgentMessageComposer.d.ts +50 -0
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -0
- package/lib/types/components/AgentMessageComposer.js +159 -0
- package/lib/types/components/BtwPanel.d.ts +13 -12
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +35 -24
- package/lib/types/components/ChannelPicker.d.ts +40 -0
- package/lib/types/components/ChannelPicker.d.ts.map +1 -0
- package/lib/types/components/ChannelPicker.js +26 -0
- package/lib/types/components/Chat/JobCard.d.ts +29 -31
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +31 -112
- package/lib/types/components/Chat/SubagentMessage.d.ts +4 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +10 -3
- package/lib/types/components/ClaudeGirl.d.ts +27 -0
- package/lib/types/components/ClaudeGirl.d.ts.map +1 -0
- package/lib/types/components/ClaudeGirl.js +30 -0
- package/lib/types/components/CodeBlockFrame.d.ts +19 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -0
- package/lib/types/components/CodeBlockFrame.js +138 -0
- package/lib/types/components/CommandSuggestions.d.ts +10 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +20 -3
- package/lib/types/components/ContextBarView.d.ts +2 -2
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +18 -8
- package/lib/types/components/EffortChargeGlyph.d.ts +1 -1
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -1
- package/lib/types/components/EffortChargeGlyph.js +3 -4
- package/lib/types/components/EffortInputBorder.d.ts +1 -2
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +7 -4
- package/lib/types/components/EffortSlider.d.ts +5 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +2 -2
- package/lib/types/components/EffortTierBadge.d.ts +1 -2
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -1
- package/lib/types/components/EffortTierBadge.js +8 -5
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +11 -5
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/JobsPanel.d.ts +8 -9
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +72 -13
- package/lib/types/components/KernelPicker.d.ts +28 -0
- package/lib/types/components/KernelPicker.d.ts.map +1 -0
- package/lib/types/components/KernelPicker.js +37 -0
- package/lib/types/components/LogoV2.d.ts +7 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +120 -24
- package/lib/types/components/Markdown.d.ts +2 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +37 -8
- package/lib/types/components/MathBlock.d.ts.map +1 -1
- package/lib/types/components/MathBlock.js +3 -1
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/components/MermaidDiagram.js +7 -5
- package/lib/types/components/MessageList.d.ts +21 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +62 -42
- package/lib/types/components/ModePicker.d.ts +20 -0
- package/lib/types/components/ModePicker.d.ts.map +1 -0
- package/lib/types/components/ModePicker.js +17 -0
- package/lib/types/components/PromptInput.d.ts +2 -2
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +308 -55
- package/lib/types/components/SdkInstallWizard.d.ts +44 -0
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -0
- package/lib/types/components/SdkInstallWizard.js +18 -0
- package/lib/types/components/SearchBox.d.ts +7 -8
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +18 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +113 -6
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +5 -3
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +6 -4
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +25 -18
- package/lib/types/components/SubagentDashboard.d.ts +10 -6
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +32 -21
- package/lib/types/components/SubagentDetailScene.d.ts +16 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +196 -45
- package/lib/types/components/SyntaxText.d.ts.map +1 -1
- package/lib/types/components/SyntaxText.js +4 -1
- package/lib/types/components/TurnInterruptedRow.d.ts +3 -1
- package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -1
- package/lib/types/components/TurnInterruptedRow.js +6 -3
- package/lib/types/components/TurnUsageRow.d.ts +24 -0
- package/lib/types/components/TurnUsageRow.d.ts.map +1 -0
- package/lib/types/components/TurnUsageRow.js +46 -0
- package/lib/types/components/WorkingSpinner.d.ts +2 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +21 -4
- package/lib/types/components/approvals/ApprovalPanel.d.ts +36 -13
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +173 -25
- package/lib/types/components/claudeGirlSprite.d.ts +18 -0
- package/lib/types/components/claudeGirlSprite.d.ts.map +1 -0
- package/lib/types/components/claudeGirlSprite.js +48 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +46 -13
- package/lib/types/components/design-system/ThemedText.d.ts +3 -1
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/diffPatch.d.ts +55 -0
- package/lib/types/components/diffPatch.d.ts.map +1 -0
- package/lib/types/components/diffPatch.js +142 -0
- package/lib/types/components/kernelCatalog.d.ts +48 -0
- package/lib/types/components/kernelCatalog.d.ts.map +1 -0
- package/lib/types/components/kernelCatalog.js +53 -0
- package/lib/types/components/launchpadActions.d.ts +13 -6
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +26 -4
- package/lib/types/components/launchpadParams.d.ts +101 -0
- package/lib/types/components/launchpadParams.d.ts.map +1 -0
- package/lib/types/components/launchpadParams.js +171 -0
- package/lib/types/components/maidPortrait.d.ts +37 -5
- package/lib/types/components/maidPortrait.d.ts.map +1 -1
- package/lib/types/components/maidPortrait.js +73 -54
- package/lib/types/components/messages/AgentMessageFlow.d.ts +20 -0
- package/lib/types/components/messages/AgentMessageFlow.d.ts.map +1 -0
- package/lib/types/components/messages/AgentMessageFlow.js +37 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +6 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +29 -5
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +11 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +289 -36
- package/lib/types/components/messages/TranscriptLeaves.d.ts +85 -0
- package/lib/types/components/messages/TranscriptLeaves.d.ts.map +1 -0
- package/lib/types/components/messages/TranscriptLeaves.js +74 -0
- package/lib/types/components/messages/agentTeam.d.ts +69 -0
- package/lib/types/components/messages/agentTeam.d.ts.map +1 -0
- package/lib/types/components/messages/agentTeam.js +53 -0
- package/lib/types/components/messages/liveOutputLines.d.ts +33 -0
- package/lib/types/components/messages/liveOutputLines.d.ts.map +1 -0
- package/lib/types/components/messages/liveOutputLines.js +100 -0
- package/lib/types/components/messages/subagentTranscript.d.ts +146 -0
- package/lib/types/components/messages/subagentTranscript.d.ts.map +1 -0
- package/lib/types/components/messages/subagentTranscript.js +304 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +16 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +76 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +11 -6
- package/lib/types/components/questions/ProviderModelEditor.d.ts +12 -0
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -0
- package/lib/types/components/questions/ProviderModelEditor.js +266 -0
- package/lib/types/components/shimmer.d.ts +26 -0
- package/lib/types/components/shimmer.d.ts.map +1 -1
- package/lib/types/components/shimmer.js +26 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/InfoPanel.js +13 -8
- package/lib/types/components/sidePanel/PanelBar.d.ts +0 -24
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +55 -77
- package/lib/types/components/sidePanel/PanelStore.d.ts +3 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +8 -4
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +3 -10
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +9 -12
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/TrajectoryPanel.js +78 -14
- package/lib/types/components/sidePanel/agentViewStore.d.ts +20 -0
- package/lib/types/components/sidePanel/agentViewStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/agentViewStore.js +26 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +50 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.js +45 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +13 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +147 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +14 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +131 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +87 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts +111 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/threads.js +302 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +70 -30
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +4 -46
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +19 -55
- package/lib/types/components/sidePanel/companion/mood.d.ts +32 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/mood.js +44 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts +34 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +203 -29
- package/lib/types/components/splashFonts.d.ts +17 -9
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +119 -15
- package/lib/types/components/splashLayout.d.ts.map +1 -1
- package/lib/types/components/splashLayout.js +3 -1
- package/lib/types/components/subagentDetailMemory.d.ts +17 -0
- package/lib/types/components/subagentDetailMemory.d.ts.map +1 -0
- package/lib/types/components/subagentDetailMemory.js +28 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -1
- package/lib/types/components/trajectory/Inspector.js +9 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +7 -1
- package/lib/types/components/trajectory/scope.d.ts +64 -0
- package/lib/types/components/trajectory/scope.d.ts.map +1 -0
- package/lib/types/components/trajectory/scope.js +88 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts +42 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts.map +1 -0
- package/lib/types/components/trajectory/useTrajectoryScope.js +86 -0
- package/lib/types/customTheme.d.ts +4 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +6 -8
- package/lib/types/dsh-adapter/approvals.d.ts +18 -5
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +17 -4
- package/lib/types/dsh-adapter/backend/session.d.ts +64 -0
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/session.js +291 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts +58 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/translate.js +467 -0
- package/lib/types/dsh-adapter/backends.d.ts +49 -0
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.js +124 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +16 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +109 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +7 -5
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +19 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +58 -135
- package/lib/types/dsh-adapter/channel/binding.d.ts +61 -14
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +102 -35
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +33 -4
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +3 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +4 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/actions.js +152 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +145 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +289 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +217 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/compose.js +938 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/files.js +45 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +55 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/host.js +116 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.js +117 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-images.js +147 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts +12 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/reports.js +77 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.js +219 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +174 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.js +390 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/sessions.js +268 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/decisions.js +4 -4
- package/lib/types/dsh-adapter/channel/emitter.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/emitter.js +5 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts +36 -0
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/extensions.js +714 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts +1 -10
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/ide-selection.js +4 -46
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +27 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +240 -21
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +21 -5
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +65 -27
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +10 -32
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +10 -78
- package/lib/types/dsh-adapter/channel/local-fs.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/local-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-fs.js +46 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +38 -5
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +9 -6
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +16 -13
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +38 -1143
- package/lib/types/dsh-adapter/channel/question-record.d.ts +3 -75
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/question-record.js +3 -107
- package/lib/types/dsh-adapter/channel/session-activity.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/session-activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-activity.js +42 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +3 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +2 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +7 -3
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -9
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +4 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +5 -10
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +74 -113
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +7 -6
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -7
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +72 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +7 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +58 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +153 -9
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +114 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.js +279 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +7 -15
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +17 -21
- package/lib/types/dsh-adapter/channel/types.d.ts +16 -7
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +3 -23
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +5 -111
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +2 -1
- package/lib/types/dsh-adapter/channel.d.ts +17 -8
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +24 -1059
- package/lib/types/dsh-adapter/context-occupancy.d.ts +6 -1
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +6 -1
- package/lib/types/dsh-adapter/decision-guard.d.ts +24 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +44 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +4 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +22 -10
- package/lib/types/dsh-adapter/index.d.ts +41 -3
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +28 -1
- package/lib/types/dsh-adapter/jobs.d.ts +5 -3
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +53 -14
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -16
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +3 -29
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts +34 -0
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth-credential-source.js +66 -0
- package/lib/types/dsh-adapter/plugin.d.ts +38 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +546 -110
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts +10 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.js +80 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +8 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +118 -52
- package/lib/types/dsh-adapter/questions.d.ts +29 -124
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +33 -267
- package/lib/types/dsh-adapter/recap.d.ts +3 -15
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +3 -46
- package/lib/types/dsh-adapter/sanitize.d.ts +4 -44
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sanitize.js +4 -84
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +3 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +4 -2
- package/lib/types/dsh-adapter/sessions/digest.d.ts +18 -3
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +60 -27
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +6 -4
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/recovery.js +23 -14
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +1 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +3 -13
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +7 -0
- package/lib/types/dsh-adapter/themes.d.ts +1 -1
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts +84 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.js +601 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +31 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +28 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +3 -1
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/index.js +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +7 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/inspect.js +70 -2
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +4 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +36 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +13 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +7 -0
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +11 -2
- package/lib/types/handoffAck.d.ts +57 -0
- package/lib/types/handoffAck.d.ts.map +1 -0
- package/lib/types/handoffAck.js +154 -0
- package/lib/types/handoffEvents.d.ts +52 -0
- package/lib/types/handoffEvents.d.ts.map +1 -0
- package/lib/types/handoffEvents.js +128 -0
- package/lib/types/i18n.d.ts +3189 -68
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +855 -9
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +8 -2
- package/lib/types/ink/components/AlternateScreen.d.ts +12 -1
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +25 -4
- package/lib/types/ink/components/App.d.ts +5 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +52 -5
- package/lib/types/ink/components/Image.d.ts +8 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/components/Text.d.ts +8 -1
- package/lib/types/ink/components/Text.d.ts.map +1 -1
- package/lib/types/ink/components/Text.js +11 -1
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +75 -3
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +9 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +8 -2
- package/lib/types/ink/kitty-graphics.d.ts +7 -2
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +15 -7
- package/lib/types/ink/node-cache.d.ts +15 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +4 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +2 -0
- package/lib/types/ink/parse-keypress.d.ts +13 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +438 -19
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +9 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +200 -4
- package/lib/types/ink/render-stats.d.ts +35 -0
- package/lib/types/ink/render-stats.d.ts.map +1 -0
- package/lib/types/ink/render-stats.js +53 -0
- package/lib/types/ink/sixel-codec.d.ts +11 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +10 -3
- package/lib/types/ink/sixel-graphics.js +2 -2
- package/lib/types/ink/styles.d.ts +46 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +7 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +1 -1
- package/lib/types/ink/terminal-querier.js +4 -4
- package/lib/types/ink/text-decoration.d.ts +49 -0
- package/lib/types/ink/text-decoration.d.ts.map +1 -0
- package/lib/types/ink/text-decoration.js +235 -0
- package/lib/types/ink/update-overflow-guard.d.ts +9 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +41 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +5 -1
- package/lib/types/kernelPrefs.d.ts +51 -0
- package/lib/types/kernelPrefs.d.ts.map +1 -0
- package/lib/types/kernelPrefs.js +126 -0
- package/lib/types/modelRecents.d.ts +10 -2
- package/lib/types/modelRecents.d.ts.map +1 -1
- package/lib/types/modelRecents.js +20 -7
- package/lib/types/screens/AgentTranscriptScene.d.ts +42 -0
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -0
- package/lib/types/screens/AgentTranscriptScene.js +269 -0
- package/lib/types/screens/Chat.d.ts +45 -7
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +625 -113
- package/lib/types/screens/Launchpad.d.ts +24 -7
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +147 -28
- package/lib/types/screens/SessionSupervisor.d.ts +3 -3
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +69 -5
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +211 -7
- package/lib/types/screens/StatusLine.d.ts +40 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +131 -19
- package/lib/types/screens/StatusMetrics.d.ts +53 -17
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +141 -30
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +74 -12
- package/lib/types/screens/chat/backendCommands.d.ts +37 -0
- package/lib/types/screens/chat/backendCommands.d.ts.map +1 -0
- package/lib/types/screens/chat/backendCommands.js +51 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts +20 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts.map +1 -0
- package/lib/types/screens/chat/useBackendChannels.js +117 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +23 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useKernelPicker.js +72 -0
- package/lib/types/screens/chatOverlay.d.ts +32 -2
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +9 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +5 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +14 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -22
- package/lib/types/sessionHistory.d.ts +18 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +46 -4
- package/lib/types/sessionPins.d.ts +7 -0
- package/lib/types/sessionPins.d.ts.map +1 -1
- package/lib/types/sessionPins.js +9 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +2 -1
- package/lib/types/settings/definitions.d.ts +74 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +50 -4
- package/lib/types/terminal-utils/hyperlink.d.ts +2 -2
- package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -1
- package/lib/types/terminal-utils/hyperlink.js +21 -4
- package/lib/types/terminal-utils/markdown.d.ts +34 -6
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +257 -66
- package/lib/types/theme.d.ts +49 -8
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +514 -18
- package/lib/types/tips.js +2 -2
- package/lib/types/trajectory/effortIgnition.d.ts +25 -7
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -1
- package/lib/types/trajectory/effortIgnition.js +106 -34
- package/lib/types/trajectory/window.d.ts +26 -0
- package/lib/types/trajectory/window.d.ts.map +1 -0
- package/lib/types/trajectory/window.js +27 -0
- package/lib/types/tuiDisplayPrefs.d.ts +38 -1
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +45 -1
- package/lib/types/update.d.ts +88 -3
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +285 -18
- package/lib/types/utils/crashDetail.d.ts +56 -0
- package/lib/types/utils/crashDetail.d.ts.map +1 -0
- package/lib/types/utils/crashDetail.js +175 -0
- package/lib/types/utils/imageResize.d.ts +9 -23
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +24 -20
- package/lib/types/utils/inputPaste.d.ts +9 -8
- package/lib/types/utils/inputPaste.d.ts.map +1 -1
- package/lib/types/utils/inputPaste.js +53 -16
- package/lib/types/utils/jsonl.d.ts +24 -0
- package/lib/types/utils/jsonl.d.ts.map +1 -0
- package/lib/types/utils/jsonl.js +36 -0
- package/package.json +18 -2
|
@@ -8,6 +8,7 @@ import { readPresetPref } from '../presetPrefs.js';
|
|
|
8
8
|
import { readModelPref } from '../modelPrefs.js';
|
|
9
9
|
import { readActivityFrames } from '../activityPrefs.js';
|
|
10
10
|
import { envThemeOverride } from '../components/design-system/ThemeProvider.js';
|
|
11
|
+
import { resolveBrand, setActiveBrand } from '../branding.js';
|
|
11
12
|
import { hasPath } from '../dsh-adapter/settingsEditor.js';
|
|
12
13
|
import { planReload } from '../reload.js';
|
|
13
14
|
import { AlternateScreen, Box, Image, Text, useInput, ScrollBox, useTheme, useTerminalSize } from '../ui.js';
|
|
@@ -16,11 +17,13 @@ import { POINTER } from '../terminal-utils/figures.js';
|
|
|
16
17
|
import { isPlainReturnInput } from '../utils/modifiers.js';
|
|
17
18
|
import { actionMatches, effectiveComboDisplay, primaryComboString } from '../utils/keymap.js';
|
|
18
19
|
import { formatTokens } from '../terminal-utils/format.js';
|
|
20
|
+
import { formatClock } from '../trajectory/format.js';
|
|
19
21
|
import { homeDir } from '../utils/paths.js';
|
|
20
22
|
import { execFileNoThrow } from '../utils/execFileNoThrow.js';
|
|
21
23
|
import { cleanRenderText, cleanScalarText } from '../dsh-adapter/sanitize.js';
|
|
22
24
|
import { deriveModelGroups, modelPickerLanding, recentCatalogModels, RECENTS_GROUP_PROVIDER, } from '../modelGroups.js';
|
|
23
25
|
import { readModelRecents, recordModelUse } from '../modelRecents.js';
|
|
26
|
+
import { WORKING_GATE_NOTICES } from '../commands.js';
|
|
24
27
|
import { TuiDialogStore } from '../dsh-adapter/dialogs.js';
|
|
25
28
|
import { TuiStatusStore } from '../dsh-adapter/status.js';
|
|
26
29
|
import { ActivityStore, useActivity } from '../dsh-adapter/activity-store.js';
|
|
@@ -32,11 +35,16 @@ import { renderMathRaster } from '../math/renderer.js';
|
|
|
32
35
|
const MATH_PREVIEW_SCALE = 2;
|
|
33
36
|
const MATH_PREVIEW_MAX_COLUMNS = 480;
|
|
34
37
|
const MATH_PREVIEW_MAX_ROWS = 64;
|
|
35
|
-
import { runProviderWizard } from '../dsh-adapter/providerWizard.js';
|
|
36
|
-
import {
|
|
38
|
+
import { runOAuthLogin, runProviderWizard } from '../dsh-adapter/providerWizard.js';
|
|
39
|
+
import { useKernelPicker } from './chat/useKernelPicker.js';
|
|
40
|
+
import { useBackendChannels } from './chat/useBackendChannels.js';
|
|
41
|
+
import { backendModeStatus as modeStatus, backendPermissionCommand, parseMcpCommand } from './chat/backendCommands.js';
|
|
42
|
+
import { PermissionStore } from '../channel/permissions.js';
|
|
43
|
+
import { goalStatusLines, parseGoalCommand } from '../channel/goal-command.js';
|
|
37
44
|
import { AskUserQuestionPanel } from '../components/questions/AskUserQuestionPanel.js';
|
|
38
45
|
import { ApprovalPanel } from '../components/approvals/ApprovalPanel.js';
|
|
39
46
|
import { ExtensionDialog } from '../components/ExtensionDialog.js';
|
|
47
|
+
import { consumeBoundaryRecoveryRemount } from '../ink/update-overflow-guard.js';
|
|
40
48
|
import { useSearchHighlight } from '../ink/hooks/use-search-highlight.js';
|
|
41
49
|
import { useTerminalTitle } from '../ink/hooks/use-terminal-title.js';
|
|
42
50
|
import { useTerminalFocus } from '../ink/hooks/use-terminal-focus.js';
|
|
@@ -53,6 +61,10 @@ import { normalizeScrollGutter } from '../tuiDisplayPrefs.js';
|
|
|
53
61
|
import { OverlayAbove } from '../components/OverlayAbove.js';
|
|
54
62
|
import { TooltipLayer } from '../components/Tooltip.js';
|
|
55
63
|
import { PromptInput } from '../components/PromptInput.js';
|
|
64
|
+
import { turnUsageParts } from '../components/TurnUsageRow.js';
|
|
65
|
+
import { AgentTranscriptScene } from './AgentTranscriptScene.js';
|
|
66
|
+
import { agentViewStore } from '../components/sidePanel/agentViewStore.js';
|
|
67
|
+
import { agentComposeTargetOf } from '../components/messages/agentTeam.js';
|
|
56
68
|
import { PromptEditorLayer, usePromptEditorOpen } from '../components/PromptEditor.js';
|
|
57
69
|
import { GoalTodoPanel } from '../components/GoalTodoPanel.js';
|
|
58
70
|
import { useSidePanel } from '../components/sidePanel/useSidePanel.js';
|
|
@@ -65,7 +77,7 @@ import { CompactionStatusRow } from '../components/CompactionStatusRow.js';
|
|
|
65
77
|
import { BalanceReportRow } from '../components/BalanceReportRow.js';
|
|
66
78
|
import { estimateSessionCostSnapshotCny } from '../deepseekPricing.js';
|
|
67
79
|
import { LoadedContextPanel } from '../components/LoadedContextPanel.js';
|
|
68
|
-
import { StatusLine } from './StatusLine.js';
|
|
80
|
+
import { formatCostReport, StatusLine } from './StatusLine.js';
|
|
69
81
|
import { channelContextOccupancy } from './StatusMetrics.js';
|
|
70
82
|
import { WorkingSpinner, useThinkingStatus } from '../components/WorkingSpinner.js';
|
|
71
83
|
import { ActivityLine, contextPressurePct } from '../components/ActivityLine.js';
|
|
@@ -90,6 +102,11 @@ import { ColorPicker } from '../components/ColorPicker.js';
|
|
|
90
102
|
import { EffortSlider } from '../components/EffortSlider.js';
|
|
91
103
|
import { PresetPicker } from '../components/PresetPicker.js';
|
|
92
104
|
import { PermissionsPicker } from '../components/PermissionsPicker.js';
|
|
105
|
+
import { ModePicker } from '../components/ModePicker.js';
|
|
106
|
+
import { KernelPicker } from '../components/KernelPicker.js';
|
|
107
|
+
import { SdkInstallWizard } from '../components/SdkInstallWizard.js';
|
|
108
|
+
import { ChannelPicker } from '../components/ChannelPicker.js';
|
|
109
|
+
import { modeDisplayName } from '../sessionModes.js';
|
|
93
110
|
import { PlanPicker } from '../components/PlanPicker.js';
|
|
94
111
|
import { LangPicker } from '../components/LangPicker.js';
|
|
95
112
|
import { ThemePicker, getThemeOptions } from '../components/ThemePicker.js';
|
|
@@ -98,7 +115,10 @@ import { FRAME_PRESETS, PRESET_NAMES } from '../components/activityFrames.js';
|
|
|
98
115
|
import { ThinkingToggle } from '../components/ThinkingToggle.js';
|
|
99
116
|
import { HistorySearchDialog } from '../components/HistorySearchDialog.js';
|
|
100
117
|
import { RewindPicker } from '../components/RewindPicker.js';
|
|
101
|
-
import {
|
|
118
|
+
import { BtwPanelFallback } from '../components/BtwPanel.js';
|
|
119
|
+
import { btwThreads } from '../components/sidePanel/btw/threads.js';
|
|
120
|
+
import { getBtwContextBudget, getBtwContextTurns } from '../tuiDisplayPrefs.js';
|
|
121
|
+
import { BtwThreadScene } from '../components/sidePanel/btw/BtwThreadScene.js';
|
|
102
122
|
import { RecapPanel } from '../components/RecapPanel.js';
|
|
103
123
|
import { isValidSessionColor, SESSION_COLOR_NAMES } from '../terminal-utils/sessionColors.js';
|
|
104
124
|
import { TipsPanel } from '../components/TipsPanel.js';
|
|
@@ -162,13 +182,19 @@ const MIGRATE_CHILD_TIMEOUT_MS = 30 * 60 * 1000;
|
|
|
162
182
|
* 落地页期间照旧整块让位。
|
|
163
183
|
*/
|
|
164
184
|
const LAUNCHPAD_OVERLAY_KINDS = new Set([
|
|
165
|
-
'model', 'effort', 'plan', 'preset', 'permission',
|
|
185
|
+
'model', 'effort', 'plan', 'preset', 'permission', 'mode',
|
|
166
186
|
// 第七版:左下角工作目录铭牌点开的工作区菜单(及其二级选择器/流程层)
|
|
167
187
|
// 也是「盖在落地页之上」的姿态——同一套 pickerPanels 挂载,Esc 回落地页。
|
|
168
188
|
'workspace-menu', 'workspace-picker', 'workspace-flow',
|
|
169
189
|
// 第八版:帮助入口也走「盖在落地页之上」的浮层姿态(overlay kind 'help',
|
|
170
190
|
// HelpMenu 经 pickerPanels 挂进 OverlayAbove)——不再收掉落地页进对话页。
|
|
171
191
|
'help',
|
|
192
|
+
// 内核选择器(/kernel 与启动页「内核」入口):同一姿态盖在落地页之上,
|
|
193
|
+
// 点选即切换内核并重启(组合根的 onSwitchBackend)。
|
|
194
|
+
'kernel',
|
|
195
|
+
// SDK 安装向导(内核选择器「未安装」行 Enter 进入):同一姿态,Esc 层级
|
|
196
|
+
// 一样——向导收回,露出落地页。
|
|
197
|
+
'sdk-install',
|
|
172
198
|
]);
|
|
173
199
|
function cleanCommandError(error) {
|
|
174
200
|
try {
|
|
@@ -281,7 +307,7 @@ const noCouponSnapshot = () => null;
|
|
|
281
307
|
function peekKey(image, title) {
|
|
282
308
|
return `${title ?? ''} ${image.id}`;
|
|
283
309
|
}
|
|
284
|
-
export function Chat({ channel, questionStore, approvalStore, extensionDialogs, bonusNotices, extensionStatus, activityStore, extensionShortcuts, themeHost, onExit, onUpdate, onRestart, fullscreen = false, trajectorySeen: trajectorySeenProp, injectControllerRef, promptControllerRef: promptControllerRefProp, renderScene, openHomeOnBoot, launchpadOnBoot, onboardingOnBoot, starPrompt, }) {
|
|
310
|
+
export function Chat({ channel, questionStore, approvalStore, extensionDialogs, bonusNotices, extensionStatus, activityStore, extensionShortcuts, themeHost, onExit, onUpdate, onRestart, onSwitchBackend, onRestartFreshSession, onProbeKernels, onResolveSdkInstallTarget, onStartSdkInstall, onCheckPnpm, sdkInstallPinned, kernelPinned, fullscreen = false, trajectorySeen: trajectorySeenProp, injectControllerRef, promptControllerRef: promptControllerRefProp, renderScene, openHomeOnBoot, launchpadOnBoot, onboardingOnBoot, starPrompt, }) {
|
|
285
311
|
const writeRaw = React.useContext(TerminalWriteContext);
|
|
286
312
|
// Re-render whenever the channel mutates; rows/status are read fresh below.
|
|
287
313
|
// DEFAULT lane on purpose (useExternalVersion): the channel version bumps
|
|
@@ -302,7 +328,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
302
328
|
// parks here until the panel decides; shown with priority over a pending
|
|
303
329
|
// questionnaire since it gates a tool about to run. Hosts that pass no
|
|
304
330
|
// approvalStore share one inert instance that never holds an ask.
|
|
305
|
-
const approvals = approvalStore ?? (fallbackApprovalStore ??= new
|
|
331
|
+
const approvals = approvalStore ?? (fallbackApprovalStore ??= new PermissionStore());
|
|
306
332
|
const approvalSnapshot = React.useSyncExternalStore(listener => approvals.subscribe(listener), () => approvals.getSnapshot());
|
|
307
333
|
// The pending managed plugin dialog (tuiDialogs seam): a plugin's
|
|
308
334
|
// select/confirm/input request parks here until the panel settles it.
|
|
@@ -401,7 +427,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
401
427
|
/** Provider display identities for the /model group level; refreshed alongside `models`. */
|
|
402
428
|
const [providerInfos, setProviderInfos] = React.useState([]);
|
|
403
429
|
/** /model 最近使用分组:成功切换即记录(去重置顶,上限 10),重启保留。 */
|
|
404
|
-
|
|
430
|
+
// Recents are per backend: a Claude session's picks never evict the DSH list.
|
|
431
|
+
const recentsBackend = channel.backendCapabilities?.backendId;
|
|
432
|
+
const [modelRecents, setModelRecents] = React.useState(() => readModelRecents(undefined, recentsBackend));
|
|
405
433
|
/** Two-level /model: the drilled-in provider route; undefined = group level.
|
|
406
434
|
* Reset on open; stale ids resolve back to the group level via `activeModelGroup`. */
|
|
407
435
|
const [modelGroup, setModelGroup] = React.useState(undefined);
|
|
@@ -435,7 +463,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
435
463
|
return ok;
|
|
436
464
|
if (name !== undefined)
|
|
437
465
|
channel.notify(t('model-switched', { name }));
|
|
438
|
-
setModelRecents(recordModelUse({ provider, id }));
|
|
466
|
+
setModelRecents(recordModelUse({ provider, id }, undefined, recentsBackend));
|
|
439
467
|
return ok;
|
|
440
468
|
});
|
|
441
469
|
};
|
|
@@ -459,11 +487,16 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
459
487
|
* on" has not been answered yet. Every later launch starts on the chat
|
|
460
488
|
* screen, and the screen stays reachable.
|
|
461
489
|
*/
|
|
490
|
+
// 根错误边界恢复后的重挂不是一次启动:启动页、首启引导与会话管理屏都
|
|
491
|
+
// 不再打开,直接回到对话页(一次性标记由错误边界的恢复路径写入,见
|
|
492
|
+
// update-overflow-guard)。首次渲染即消费;若这次渲染被丢弃,最坏只是
|
|
493
|
+
// 多显示一次启动入口。
|
|
494
|
+
const recoveryRemountOnBoot = consumeBoundaryRecoveryRemount();
|
|
462
495
|
// 第七版:启动页在开时**不再**预开会话浏览器。旧姿态是「先收落地页再开
|
|
463
496
|
// 整屏」,浏览器必须提前藏在下面;现在整屏(会话/设置/任务面板)盖在
|
|
464
497
|
// 落地页**之上**、Esc 退回落地页,按需打开即可——boot 时同时为真反而会
|
|
465
|
-
// 让浏览器盖住落地页(渲染顺序见各 early-return
|
|
466
|
-
const [supervisorOpen, setSupervisorOpen] = React.useState(openHomeOnBoot === true && launchpadOnBoot !== true);
|
|
498
|
+
// 让浏览器盖住落地页(渲染顺序见各 early-return)。恢复重挂同样不开它。
|
|
499
|
+
const [supervisorOpen, setSupervisorOpen] = React.useState(openHomeOnBoot === true && launchpadOnBoot !== true && !recoveryRemountOnBoot);
|
|
467
500
|
/**
|
|
468
501
|
* The launchpad: the landing page every ordinary launch starts on.
|
|
469
502
|
*
|
|
@@ -471,7 +504,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
471
504
|
* that decides what comes next — a submitted line hands over to the chat
|
|
472
505
|
* screen, an action hands over to whatever surface that action opens.
|
|
473
506
|
*/
|
|
474
|
-
const [launchpadOpen, setLaunchpadOpen] = React.useState(launchpadOnBoot === true);
|
|
507
|
+
const [launchpadOpen, setLaunchpadOpen] = React.useState(launchpadOnBoot === true && !recoveryRemountOnBoot);
|
|
475
508
|
/**
|
|
476
509
|
* The launchpad's draft. It lives HERE, not inside the screen, because the
|
|
477
510
|
* screen unmounts the moment the user submits: a draft owned by an
|
|
@@ -522,7 +555,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
522
555
|
* settings / help 的 early-return 排在两个界面**之后**:不收掉当前界面就是
|
|
523
556
|
* "点了没反应",状态还滞留着、等界面关掉才突然弹出来。默认收,白名单只留给覆盖层。
|
|
524
557
|
*/
|
|
525
|
-
const overlayCommandNames = React.useMemo(() => new Set(['model', 'effort', 'plan', 'preset', 'permission']), []);
|
|
558
|
+
const overlayCommandNames = React.useMemo(() => new Set(['model', 'effort', 'plan', 'preset', 'permission', 'kernel']), []);
|
|
526
559
|
/**
|
|
527
560
|
* 打开**整屏界面**的命令(第七版):从落地页触发这些命令时**不收掉落地页**
|
|
528
561
|
* ——整屏盖在落地页之上渲染(它们的 early-return 排在落地页分支之前),
|
|
@@ -547,6 +580,81 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
547
580
|
setLaunchpadUpdateAvailable(update !== undefined);
|
|
548
581
|
}).catch(() => undefined);
|
|
549
582
|
}, [launchpadShown]);
|
|
583
|
+
const canInstallSdk = onResolveSdkInstallTarget !== undefined && onStartSdkInstall !== undefined
|
|
584
|
+
&& onCheckPnpm !== undefined && sdkInstallPinned !== undefined;
|
|
585
|
+
const { currentId: kernelCurrentId, options: kernelOptions, open: openKernelPicker, pick: pickKernel, reprobe: reprobeKernels } = useKernelPicker({
|
|
586
|
+
channel, kernelVersion, launchpadShown, onProbeKernels, onSwitchBackend, canInstallSdk, dispatchOverlay,
|
|
587
|
+
});
|
|
588
|
+
/**
|
|
589
|
+
* SDK 安装向导的步骤态(异步进程状态,按 chatOverlay 的分工留在 Chat,
|
|
590
|
+
* 不进 overlay union)。生命周期约定:向导打开时从 idle 初始化,安装
|
|
591
|
+
* (checking/running)期间面板保持打开——所有异步落地都发生在面板还在
|
|
592
|
+
* 的窗口内;关闭路径(Esc/Enter 离开)一律重置回 idle,下一次打开重新
|
|
593
|
+
* 解析安装目标。
|
|
594
|
+
*/
|
|
595
|
+
const [sdkPhase, setSdkPhase] = React.useState({ kind: 'idle' });
|
|
596
|
+
const sdkInstallerRef = React.useRef(undefined);
|
|
597
|
+
// 打开即解析安装目标(同步、只读 argv + 文件系统):profile → 确认面板;
|
|
598
|
+
// standalone / 无 profile → 直接给手动指引面板。
|
|
599
|
+
React.useEffect(() => {
|
|
600
|
+
if (overlay.kind !== 'sdk-install' || sdkPhase.kind !== 'idle' || onResolveSdkInstallTarget === undefined)
|
|
601
|
+
return;
|
|
602
|
+
const target = onResolveSdkInstallTarget();
|
|
603
|
+
if (target.kind === 'profile' && sdkInstallPinned !== undefined) {
|
|
604
|
+
setSdkPhase({ kind: 'confirm', dir: target.dir, version: sdkInstallPinned.version, specifier: sdkInstallPinned.specifier });
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
setSdkPhase({ kind: 'no-target', reason: target.kind === 'standalone' ? 'standalone' : 'no-profile' });
|
|
608
|
+
}
|
|
609
|
+
}, [overlay.kind, sdkPhase.kind, onResolveSdkInstallTarget, sdkInstallPinned]);
|
|
610
|
+
const closeSdkInstallToKernelPicker = () => {
|
|
611
|
+
setSdkPhase({ kind: 'idle' });
|
|
612
|
+
dispatchOverlay({ type: 'close' });
|
|
613
|
+
openKernelPicker();
|
|
614
|
+
};
|
|
615
|
+
const closeSdkInstall = () => {
|
|
616
|
+
setSdkPhase({ kind: 'idle' });
|
|
617
|
+
dispatchOverlay({ type: 'close' });
|
|
618
|
+
};
|
|
619
|
+
const runSdkInstall = (dir) => {
|
|
620
|
+
if (onStartSdkInstall === undefined || sdkInstallPinned === undefined)
|
|
621
|
+
return;
|
|
622
|
+
const installer = onStartSdkInstall(dir);
|
|
623
|
+
sdkInstallerRef.current = installer;
|
|
624
|
+
setSdkPhase({ kind: 'running' });
|
|
625
|
+
void installer.result.then(result => {
|
|
626
|
+
if (result.kind === 'ok') {
|
|
627
|
+
// 装好了:重探内核(灰行变亮,无需重启进程),停在完成面板。
|
|
628
|
+
reprobeKernels();
|
|
629
|
+
setSdkPhase({ kind: 'done' });
|
|
630
|
+
}
|
|
631
|
+
else if (result.kind === 'failed') {
|
|
632
|
+
setSdkPhase({ kind: 'failed', exitCode: result.exitCode, tail: result.tail, dir, version: sdkInstallPinned.version, specifier: sdkInstallPinned.specifier });
|
|
633
|
+
}
|
|
634
|
+
else if (result.kind === 'pnpm-missing') {
|
|
635
|
+
setSdkPhase({ kind: 'pnpm-missing', dir, version: sdkInstallPinned.version, specifier: sdkInstallPinned.specifier });
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
setSdkPhase({ kind: 'cancelled' });
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
const confirmSdkInstall = (dir) => {
|
|
643
|
+
if (onCheckPnpm === undefined)
|
|
644
|
+
return;
|
|
645
|
+
setSdkPhase({ kind: 'checking' });
|
|
646
|
+
void onCheckPnpm().then(ok => {
|
|
647
|
+
if (!ok && sdkInstallPinned !== undefined) {
|
|
648
|
+
setSdkPhase({ kind: 'pnpm-missing', dir, version: sdkInstallPinned.version, specifier: sdkInstallPinned.specifier });
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
runSdkInstall(dir);
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
const host = channel.backendChannels?.();
|
|
655
|
+
const { rows: channelRows, open: openChannelPicker, pick: pickChannel, setMode: runBackendModeCommand, login: runBackendLogin } = useBackendChannels({
|
|
656
|
+
channel, host, questionStore, dispatchOverlay, onRestartFreshSession, runOAuthLogin,
|
|
657
|
+
});
|
|
550
658
|
/**
|
|
551
659
|
* 落地页条件位③(投喂一颗 Star):与开屏求 star 弹窗**同一口径**——
|
|
552
660
|
* `usageStats`(~/.dsh-tui/usage.json)里有未报过的已达档里程碑
|
|
@@ -557,13 +665,24 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
557
665
|
* The first-run guide. Renders above the launchpad (see the prop docs): a
|
|
558
666
|
* launch that needs setup has not answered the launchpad's question yet.
|
|
559
667
|
*/
|
|
560
|
-
const [onboardingOpen, setOnboardingOpen] = React.useState(onboardingOnBoot === true);
|
|
668
|
+
const [onboardingOpen, setOnboardingOpen] = React.useState(onboardingOnBoot === true && !recoveryRemountOnBoot);
|
|
561
669
|
/**
|
|
562
670
|
* 落地页那条"第一次用?跑一遍引导"的横幅认的是**还欠一次引导**,而不是启动快照:
|
|
563
671
|
* 完成(写进 onboarding.json)之后立刻收掉;跳过刻意保留——没记账,下次启动还会问,
|
|
564
672
|
* 横幅说的正是这件事。
|
|
565
673
|
*/
|
|
566
|
-
const [onboardingPending, setOnboardingPending] = React.useState(onboardingOnBoot === true);
|
|
674
|
+
const [onboardingPending, setOnboardingPending] = React.useState(onboardingOnBoot === true && !recoveryRemountOnBoot);
|
|
675
|
+
/**
|
|
676
|
+
* 品牌档(`branding.ts`):设置项 `dsh-tui.brand`(`auto` = 跟后端)与当前
|
|
677
|
+
* 后端 id(`backendCapabilities.backendId`,boot 时即定)的合成。开屏词、
|
|
678
|
+
* 立绘、大字配色读 prop;主题默认档经 `setActiveBrand` 镜像给
|
|
679
|
+
* ThemeProvider(它挂在 Chat 外层,拿不到 channel)——plugin 已在首帧前
|
|
680
|
+
* 铺过初值,这里负责 `/settings` 切品牌时的实时跟动。
|
|
681
|
+
*/
|
|
682
|
+
const brand = resolveBrand(channel.brand, channel.backendCapabilities?.backendId);
|
|
683
|
+
React.useEffect(() => {
|
|
684
|
+
setActiveBrand(brand);
|
|
685
|
+
}, [brand]);
|
|
567
686
|
/** `/tree` opens the session family tree (pi's Session Tree): every rewind
|
|
568
687
|
* fork stitched back onto the message it diverged from, hover previews,
|
|
569
688
|
* and per-node rewind/fork/adopt actions. Like the supervisor, a screen. */
|
|
@@ -580,11 +699,19 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
580
699
|
const EMPTY_AGENT_VIEW_ROWS = [];
|
|
581
700
|
const agentViewRows = React.useSyncExternalStore(listener => channel.subscribeAgentView?.(listener) ?? (() => { }), () => channel.agentViewRows?.() ?? EMPTY_AGENT_VIEW_ROWS);
|
|
582
701
|
const backgroundAgentsNeedingInput = agentViewRows.filter(row => row.status === 'needs-input' && !row.current).length;
|
|
583
|
-
/**
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
* attaches back to it). */
|
|
702
|
+
/** Open the supervisor from `/bg`, `/background`, or an empty-prompt ←.
|
|
703
|
+
* DSH backgrounds the attached session first and uses it as the Esc
|
|
704
|
+
* return target; other backends keep the current session attached. */
|
|
587
705
|
const backgroundToAgentView = React.useCallback(() => {
|
|
706
|
+
// The non-DSH backends have a session catalog, but no live background
|
|
707
|
+
// handoff. Open the shared session manager without pretending to park the
|
|
708
|
+
// current turn. DSH keeps its existing handoff and Esc return target.
|
|
709
|
+
const backendId = channel.backendCapabilities?.backendId;
|
|
710
|
+
if (backendId !== undefined && backendId !== 'dsh') {
|
|
711
|
+
agentViewOpenSessionRef.current = channel.agentId;
|
|
712
|
+
setSupervisorOpen(true);
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
588
715
|
void channel.backgroundCurrent().then((result) => {
|
|
589
716
|
if (result.ok) {
|
|
590
717
|
setAgentViewReturnId(result.backgroundedSessionId);
|
|
@@ -775,6 +902,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
775
902
|
}, [launchpadShown, presetOptions.length, channel]);
|
|
776
903
|
/** `/effort` adapter levels: load async before the slider opens. */
|
|
777
904
|
const [effortOptions, setEffortOptions] = React.useState([]);
|
|
905
|
+
/** True when those levels are the CLI-standard compatibility ladder (the
|
|
906
|
+
* model row declares no tiers of its own) — the slider says so. */
|
|
907
|
+
const [effortLevelsFallback, setEffortLevelsFallback] = React.useState(false);
|
|
778
908
|
const [themeName, setTheme] = useTheme();
|
|
779
909
|
const { rows: terminalRows } = useTerminalSize();
|
|
780
910
|
/**
|
|
@@ -799,15 +929,31 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
799
929
|
* plugin answering after the user moved on must not open a confirm for
|
|
800
930
|
* a row they are no longer looking at). */
|
|
801
931
|
const rewindRequestRef = React.useRef(0);
|
|
802
|
-
/** /btw side-question
|
|
803
|
-
*
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
932
|
+
/** /btw side-question thread: pure UI state in btwThreads — the answers
|
|
933
|
+
* never enter the transcript or the session log. The floating overlay is
|
|
934
|
+
* only the FALLBACK surface (btw panel not enabled); with the panel
|
|
935
|
+
* enabled the same thread routes to the sidebar instead — one answer,
|
|
936
|
+
* exactly one surface. */
|
|
937
|
+
const [btwOverlayOpen, setBtwOverlayOpen] = React.useState(false);
|
|
938
|
+
/** ⤢ fullscreen thread scene (openPanelFullscreen 'btw' route). */
|
|
939
|
+
const [btwSceneOpen, setBtwSceneOpen] = React.useState(false);
|
|
940
|
+
// Only the fallback overlay reads the thread here. With the overlay closed
|
|
941
|
+
// the snapshot stays undefined, so an answer streaming into the sidebar
|
|
942
|
+
// panel does not re-render the whole Chat on every delta.
|
|
943
|
+
const btwOverlayThread = React.useSyncExternalStore(btwThreads.subscribe, () => (btwOverlayOpen ? btwThreads.get(String(channel.agentId)) : undefined));
|
|
944
|
+
const closeBtwOverlay = () => {
|
|
945
|
+
// Fallback parity with the pre-thread overlay: closing cancels the
|
|
946
|
+
// in-flight ask (completed turns stay in the thread).
|
|
947
|
+
btwThreads.abortActive(String(channel.agentId));
|
|
948
|
+
setBtwOverlayOpen(false);
|
|
810
949
|
};
|
|
950
|
+
/** 有模态或整屏界面时,/btw 的回答不抢着打开面板,只标未读。 */
|
|
951
|
+
const btwSurfaceFree = () => approvalSnapshot === null && dialogSnapshot === null && questionSnapshot === null
|
|
952
|
+
&& overlay.kind === 'none' && !helpOpen && !starModal && !couponVisible
|
|
953
|
+
&& !supervisorOpen && !treeOpen && !settingsOpen && !jobsPanelOpen
|
|
954
|
+
&& !sceneOpen && channel.pluginScene === undefined
|
|
955
|
+
&& !subagentDashboardOpen && subagentDetailId === null
|
|
956
|
+
&& !onboardingOpen && !launchpadShown && !btwSceneOpen && !promptEditorOpen;
|
|
811
957
|
/** /recap overlay (pi-recap semantics): pure UI state like /btw — the
|
|
812
958
|
* summary never enters the transcript or session log; applying the
|
|
813
959
|
* proposed title goes through the normal /rename path. `auto` marks the
|
|
@@ -844,14 +990,11 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
844
990
|
balanceSeqRef.current += 1;
|
|
845
991
|
setBalance(null);
|
|
846
992
|
}, [balanceSessionId]);
|
|
847
|
-
// A side question belongs to its captured session just like a recap.
|
|
848
|
-
//
|
|
849
|
-
// the
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
btwAbortRef.current = null;
|
|
853
|
-
setBtw(null);
|
|
854
|
-
}, [channel.agentId]);
|
|
993
|
+
// A side question belongs to its captured session just like a recap. The
|
|
994
|
+
// THREAD stays in memory under its own session id (an archived thread may
|
|
995
|
+
// keep streaming); only the FALLBACK overlay is retired on a binding change
|
|
996
|
+
// (see the btwSessionIdRef effect above) so an old conversation never leaks
|
|
997
|
+
// onto the new one's screen.
|
|
855
998
|
// Auto-recap (`dsh-tui.recapOnOpen`): every time the session switches
|
|
856
999
|
// (mount = open/resume, rewind/fork included), summarize its tail into
|
|
857
1000
|
// the dim AutoRecapRow. Failures stay silent in auto mode — `/recap`
|
|
@@ -942,7 +1085,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
942
1085
|
setSearchCursor(0);
|
|
943
1086
|
setSearchCount(0);
|
|
944
1087
|
setSearchCurrent(0);
|
|
945
|
-
|
|
1088
|
+
setBtwOverlayOpen(false);
|
|
946
1089
|
repaintTranscript();
|
|
947
1090
|
}, [channel.agentId]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
948
1091
|
/** The session attached when the agent view opened; a close on a
|
|
@@ -983,6 +1126,14 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
983
1126
|
setJobsPanelFocusId(focusId);
|
|
984
1127
|
setJobsPanelOpen(true);
|
|
985
1128
|
}, []);
|
|
1129
|
+
// A job card / the panel keeps its output tail fresh while on screen, when
|
|
1130
|
+
// the backend reads output on demand. The control is re-projected on every
|
|
1131
|
+
// read; this handler keeps one identity per channel capability so the
|
|
1132
|
+
// memoized rows are not re-rendered by it.
|
|
1133
|
+
const jobControlRef = React.useRef(channel.jobControl);
|
|
1134
|
+
jobControlRef.current = channel.jobControl;
|
|
1135
|
+
const jobOutputWatchable = typeof channel.jobControl?.watchOutput === 'function';
|
|
1136
|
+
const watchJobOutput = React.useMemo(() => jobOutputWatchable ? (id) => jobControlRef.current?.watchOutput?.(id) ?? (() => undefined) : undefined, [jobOutputWatchable]);
|
|
986
1137
|
/** Ctrl+A / detail 回退:侧栏分栏且 agents 已启用时打开右栏 Panel(内部
|
|
987
1138
|
* dashboard ↔ detail 二级路由自己管);窄屏 / inline 保留整屏形态。 */
|
|
988
1139
|
const openSubagentDashboard = React.useCallback(() => {
|
|
@@ -995,12 +1146,58 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
995
1146
|
}, []);
|
|
996
1147
|
/** Detail view for a specific subagent (opened from dashboard). */
|
|
997
1148
|
const [subagentDetailId, setSubagentDetailId] = React.useState(null);
|
|
1149
|
+
/**
|
|
1150
|
+
* 主屏只读 Agent View:Chat 自己的场景层。父 Chat、Channel 与 PromptInput
|
|
1151
|
+
* 保持挂载(草稿经 draftCache 往返),场景只借用屏幕与键盘;Esc 回到打开它
|
|
1152
|
+
* 的地方(对话 / 代理面板 / 详情 / 转录卡)。不建第二个 Channel。
|
|
1153
|
+
*/
|
|
1154
|
+
const [agentView, setAgentView] = React.useState(null);
|
|
1155
|
+
const openAgentView = React.useCallback((agentId, source) => {
|
|
1156
|
+
setAgentView({ agentId, source });
|
|
1157
|
+
}, []);
|
|
1158
|
+
/** 工作台里切到同级或父代理:原地换被查看的代理,Esc 仍回最初的入口。 */
|
|
1159
|
+
const switchViewedAgent = React.useCallback((agentId) => {
|
|
1160
|
+
setAgentView(prev => prev === null ? prev : { ...prev, agentId });
|
|
1161
|
+
}, []);
|
|
1162
|
+
/** 转录卡入口的稳定句柄:MessageList 的 memo 行按 props 身份比较,内联
|
|
1163
|
+
* 箭头会让每个流式 tick 重渲染全部落定行(verify-tool-history-window)。 */
|
|
1164
|
+
const openSubagentViewFromCard = React.useCallback((agentId, rowId) => {
|
|
1165
|
+
openAgentView(agentId, { kind: 'transcript-card', rowId });
|
|
1166
|
+
}, [openAgentView]);
|
|
1167
|
+
// 侧栏 agents 面板 / 其 Detail 的主屏查看请求(面板没有 Chat 的场景 state)。
|
|
1168
|
+
React.useEffect(() => agentViewStore.subscribe(() => {
|
|
1169
|
+
const request = agentViewStore.get();
|
|
1170
|
+
if (request === null)
|
|
1171
|
+
return;
|
|
1172
|
+
const source = request.source === 'agents-dashboard'
|
|
1173
|
+
? { kind: 'agents-dashboard', ...(request.panel ? { panel: true } : {}) }
|
|
1174
|
+
: { kind: 'agent-detail', agentId: request.agentId, ...(request.panel ? { panel: true } : {}) };
|
|
1175
|
+
setAgentView({ agentId: request.agentId, source });
|
|
1176
|
+
}), []);
|
|
1177
|
+
/** Esc 的返回路由:面板来源回面板(路由经模块记忆保真),整屏来源回整屏。 */
|
|
1178
|
+
const exitAgentView = React.useCallback((source) => {
|
|
1179
|
+
setAgentView(null);
|
|
1180
|
+
const sidePanel = sidePanelRef.current;
|
|
1181
|
+
const panelReturn = (sidePanel !== null && sidePanel.split && sidePanel.enabledPanelIds.includes('agents'));
|
|
1182
|
+
if (source.kind === 'agents-dashboard') {
|
|
1183
|
+
if (source.panel === true && panelReturn)
|
|
1184
|
+
sidePanel.openPanel('agents', { focus: true });
|
|
1185
|
+
else
|
|
1186
|
+
setSubagentDashboardOpen(true);
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
if (source.kind === 'agent-detail') {
|
|
1190
|
+
if (source.panel === true && panelReturn)
|
|
1191
|
+
sidePanel.openPanel('agents', { focus: true });
|
|
1192
|
+
else
|
|
1193
|
+
setSubagentDetailId(source.agentId);
|
|
1194
|
+
}
|
|
1195
|
+
}, []);
|
|
998
1196
|
/**
|
|
999
1197
|
* Hidden `/deepseek` easter egg: each invocation bumps this key so the
|
|
1000
1198
|
* logo header remounts and replays the whale spout + text shimmer.
|
|
1001
1199
|
*/
|
|
1002
1200
|
const [logoNonce, setLogoNonce] = React.useState(0);
|
|
1003
|
-
React.useEffect(() => () => btwAbortRef.current?.abort(), []);
|
|
1004
1201
|
React.useEffect(() => () => recapAbortRef.current?.abort(), []);
|
|
1005
1202
|
/**
|
|
1006
1203
|
* The trajectory scene (issue #80 evolution). Unlike every other overlay
|
|
@@ -1034,7 +1231,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1034
1231
|
const launchpadGate = () => !launchpadShown || launchpadCoverRef.current;
|
|
1035
1232
|
// 覆盖屏全部收起时收回授权:下一次打开必须再经过落地页自己的交互。
|
|
1036
1233
|
const launchpadCoverScreenUp = supervisorOpen || treeOpen || settingsOpen
|
|
1037
|
-
|| jobsPanelOpen || subagentDashboardOpen || subagentDetailId !== null || sceneOpen
|
|
1234
|
+
|| jobsPanelOpen || subagentDashboardOpen || subagentDetailId !== null || sceneOpen
|
|
1235
|
+
|| agentView !== null
|
|
1236
|
+
|| btwSceneOpen;
|
|
1038
1237
|
React.useEffect(() => {
|
|
1039
1238
|
if (!launchpadCoverScreenUp)
|
|
1040
1239
|
launchpadCoverRef.current = false;
|
|
@@ -1056,6 +1255,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1056
1255
|
* straight back into the panel it is trying to leave.
|
|
1057
1256
|
*/
|
|
1058
1257
|
const openScene = React.useCallback((options) => {
|
|
1258
|
+
// /trace, Ctrl+T, the sidebar tab and ⤢ all open the trajectory. A
|
|
1259
|
+
// kernel without a trajectory source reports 'unsupported' and the
|
|
1260
|
+
// scene/panel say so; no entry point refuses on its own, so they can
|
|
1261
|
+
// never disagree about the capability.
|
|
1059
1262
|
seenFailuresRef.current = trajectoryRef.current?.counts.errors ?? 0;
|
|
1060
1263
|
setTrajectorySeen(previous => {
|
|
1061
1264
|
if (!previous)
|
|
@@ -1071,7 +1274,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1071
1274
|
return;
|
|
1072
1275
|
}
|
|
1073
1276
|
setSceneOpen(true);
|
|
1074
|
-
}, []);
|
|
1277
|
+
}, [channel]);
|
|
1075
1278
|
/**
|
|
1076
1279
|
* Leave the session supervisor for the conversation.
|
|
1077
1280
|
*
|
|
@@ -2095,11 +2298,12 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2095
2298
|
return true;
|
|
2096
2299
|
}
|
|
2097
2300
|
setHelpOpen(false);
|
|
2098
|
-
void channel.listEfforts().then(({ efforts, defaultEffort }) => {
|
|
2301
|
+
void channel.listEfforts().then(({ efforts, defaultEffort, levelsFallback }) => {
|
|
2099
2302
|
// 0/1-tier routes were already notified by listEfforts.
|
|
2100
2303
|
if (efforts.length <= 1)
|
|
2101
2304
|
return;
|
|
2102
2305
|
setEffortOptions(efforts);
|
|
2306
|
+
setEffortLevelsFallback(levelsFallback === true);
|
|
2103
2307
|
const current = channel.reasoningEffort ?? defaultEffort;
|
|
2104
2308
|
const index = efforts.findIndex(effort => effort.id === current);
|
|
2105
2309
|
// open-if: a picker the user opened during the round trip wins
|
|
@@ -2310,7 +2514,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2310
2514
|
setHelpOpen(false);
|
|
2311
2515
|
const spec = parts[0];
|
|
2312
2516
|
const slash = spec.indexOf('/');
|
|
2313
|
-
|
|
2517
|
+
// Backend model routes accept an unqualified model id.
|
|
2518
|
+
const singleProvider = channel.backendCapabilities?.modelRoutes === 'backend';
|
|
2519
|
+
const provider = slash >= 0 ? spec.slice(0, slash) : singleProvider ? channel.provider : undefined;
|
|
2314
2520
|
const id = slash >= 0 ? spec.slice(slash + 1) : spec;
|
|
2315
2521
|
if (provider === undefined || id.length === 0 || provider.length === 0) {
|
|
2316
2522
|
channel.notify(t('model-usage'), { color: 'warning' });
|
|
@@ -2337,7 +2543,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2337
2543
|
let recentsNow = modelRecents;
|
|
2338
2544
|
if (channel.provider !== '' && channel.model !== ''
|
|
2339
2545
|
&& !recentsNow.some(ref => ref.provider === channel.provider && ref.id === channel.model)) {
|
|
2340
|
-
recentsNow = recordModelUse({ provider: channel.provider, id: channel.model });
|
|
2546
|
+
recentsNow = recordModelUse({ provider: channel.provider, id: channel.model }, undefined, recentsBackend);
|
|
2341
2547
|
setModelRecents(recentsNow);
|
|
2342
2548
|
}
|
|
2343
2549
|
// Two-level landing: recents (when catalogued) focus their pinned
|
|
@@ -2442,24 +2648,29 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2442
2648
|
});
|
|
2443
2649
|
return true;
|
|
2444
2650
|
case 'tokens': {
|
|
2445
|
-
//
|
|
2651
|
+
// Four separately-labelled facts, never two measures side by side:
|
|
2446
2652
|
// what THIS request uploaded (the provider's mutually-exclusive prompt
|
|
2447
|
-
// buckets), what the
|
|
2448
|
-
//
|
|
2449
|
-
//
|
|
2653
|
+
// buckets, with when it was sampled), what the last turn used (its
|
|
2654
|
+
// own ledger, never added into the session counters), what the
|
|
2655
|
+
// session has accumulated, and how full the window is (the channel's
|
|
2656
|
+
// single occupancy reading — the same number the footer and the
|
|
2657
|
+
// context-low warning show).
|
|
2450
2658
|
const usage = channel.lastUsage;
|
|
2451
2659
|
const lines = [];
|
|
2452
2660
|
if (usage !== undefined) {
|
|
2453
2661
|
const upload = usage.input + usage.cacheRead + usage.cacheWrite;
|
|
2454
2662
|
const rate = upload > 0 ? ((usage.cacheRead / upload) * 100).toFixed(1) : '0.0';
|
|
2455
|
-
lines.push(t('tokens-request-upload', {
|
|
2663
|
+
lines.push(`${t('tokens-request-upload', {
|
|
2456
2664
|
upload: formatTokens(upload),
|
|
2457
2665
|
input: formatTokens(usage.input),
|
|
2458
2666
|
read: formatTokens(usage.cacheRead),
|
|
2459
2667
|
write: formatTokens(usage.cacheWrite),
|
|
2460
2668
|
rate,
|
|
2461
|
-
}));
|
|
2669
|
+
})} · ${t('usage-sampled-at', { time: formatClock(usage.at) })}`);
|
|
2462
2670
|
}
|
|
2671
|
+
const turn = channel.turnUsage;
|
|
2672
|
+
if (turn !== undefined)
|
|
2673
|
+
lines.push(`${t('usage-turn-summary')} ${turnUsageParts(turn).join(' · ')}`);
|
|
2463
2674
|
lines.push(t('tokens-session-breakdown', {
|
|
2464
2675
|
input: formatTokens(channel.tokens.input),
|
|
2465
2676
|
output: formatTokens(channel.tokens.output),
|
|
@@ -2486,9 +2697,15 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2486
2697
|
setHelpOpen(false);
|
|
2487
2698
|
// Split-aware, like /trace and /jobs: while the sidebar is rendering
|
|
2488
2699
|
// and the workspace panel is enabled, the workspace view opens THERE.
|
|
2489
|
-
// The panel's own ⤢ goes back to the full-screen home.
|
|
2700
|
+
// The panel's own ⤢ goes back to the full-screen home. The panel reads
|
|
2701
|
+
// the DSH workspace ledger, though: a backend without that capability
|
|
2702
|
+
// (capability snapshots absent on test stubs = DSH) would have its
|
|
2703
|
+
// /resume swallowed by an unsupported panel and no history anywhere —
|
|
2704
|
+
// those keep the full-screen session supervisor.
|
|
2705
|
+
const capabilities = channel.backendCapabilities;
|
|
2490
2706
|
const controller = sidePanelRef.current;
|
|
2491
|
-
if (
|
|
2707
|
+
if ((capabilities === undefined || capabilities.commands.includes('workspace'))
|
|
2708
|
+
&& controller !== null && controller.split && controller.enabledPanelIds.includes('workspace')) {
|
|
2492
2709
|
controller.openPanel('workspace', { focus: true });
|
|
2493
2710
|
return true;
|
|
2494
2711
|
}
|
|
@@ -2507,9 +2724,8 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2507
2724
|
}
|
|
2508
2725
|
case 'bg':
|
|
2509
2726
|
case 'background': {
|
|
2510
|
-
//
|
|
2511
|
-
//
|
|
2512
|
-
// session, and the supervisor opens on top.
|
|
2727
|
+
// DSH parks the attached session before opening the supervisor;
|
|
2728
|
+
// other backends open it over their still-attached session.
|
|
2513
2729
|
setHelpOpen(false);
|
|
2514
2730
|
backgroundToAgentView();
|
|
2515
2731
|
return true;
|
|
@@ -2609,8 +2825,13 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2609
2825
|
if (usage !== undefined) {
|
|
2610
2826
|
const total = usage.input + usage.cacheRead + usage.cacheWrite;
|
|
2611
2827
|
const rate = total > 0 ? ((usage.cacheRead / total) * 100).toFixed(1) : '0.0';
|
|
2612
|
-
lines.push(t('cost-cache-rate', { rate, read: formatTokens(usage.cacheRead), write: formatTokens(usage.cacheWrite) }));
|
|
2828
|
+
lines.push(`${t('cost-cache-rate', { rate, read: formatTokens(usage.cacheRead), write: formatTokens(usage.cacheWrite) })} · ${t('usage-sampled-at', { time: formatClock(usage.at) })}`);
|
|
2613
2829
|
}
|
|
2830
|
+
// The last turn gets its own labelled line so it never reads as part
|
|
2831
|
+
// of the session totals.
|
|
2832
|
+
const turn = channel.turnUsage;
|
|
2833
|
+
if (turn !== undefined)
|
|
2834
|
+
lines.push(`${t('usage-turn-summary')} ${turnUsageParts(turn).join(' · ')}`);
|
|
2614
2835
|
const occupancyLine = contextOccupancyLine(channel);
|
|
2615
2836
|
if (occupancyLine !== undefined)
|
|
2616
2837
|
lines.push(occupancyLine);
|
|
@@ -2633,6 +2854,16 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2633
2854
|
const rate = total > 0 ? ((usage.cacheRead / total) * 100).toFixed(1) : '0.0';
|
|
2634
2855
|
lines.push(t('cost-cache-hit-rate', { rate, read: formatTokens(usage.cacheRead), write: formatTokens(usage.cacheWrite) }));
|
|
2635
2856
|
}
|
|
2857
|
+
// A backend that reports its own session cost (Claude) states the
|
|
2858
|
+
// bill itself; the DeepSeek estimate below would only be noise.
|
|
2859
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- partial embedder channels omit the report
|
|
2860
|
+
const report = channel.costReport;
|
|
2861
|
+
if (report !== undefined) {
|
|
2862
|
+
lines.push(`${formatCostReport(report)} · ${t(report.source === 'backend' ? 'cost-source-backend' : 'status-cost-note')}`);
|
|
2863
|
+
setHelpOpen(false);
|
|
2864
|
+
channel.pushLocal('/cost', lines);
|
|
2865
|
+
return true;
|
|
2866
|
+
}
|
|
2636
2867
|
// 金额与拆解:主会话按模型分桶 + 子代理按各自 (provider, model) 分桶;
|
|
2637
2868
|
// 全部未计价时只报 token 并标注未计价,不显示 ¥0.00 金额行(DESIGN D4/D6)。
|
|
2638
2869
|
const estimate = estimateSessionCostSnapshotCny({
|
|
@@ -2816,6 +3047,11 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2816
3047
|
return true;
|
|
2817
3048
|
}
|
|
2818
3049
|
case 'init': {
|
|
3050
|
+
const backend = channel.backendInit?.();
|
|
3051
|
+
if (backend !== undefined) {
|
|
3052
|
+
void backend.run();
|
|
3053
|
+
return true;
|
|
3054
|
+
}
|
|
2819
3055
|
const result = channel.initWorkspace();
|
|
2820
3056
|
if (result === null)
|
|
2821
3057
|
channel.notify(t('agentsmd-create-failed'), { color: 'error' });
|
|
@@ -2879,6 +3115,8 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2879
3115
|
return true;
|
|
2880
3116
|
case 'login': {
|
|
2881
3117
|
setHelpOpen(false);
|
|
3118
|
+
if (runBackendLogin())
|
|
3119
|
+
return true;
|
|
2882
3120
|
void channel.describeCredential('DEEPSEEK_API_KEY')
|
|
2883
3121
|
.catch(() => undefined)
|
|
2884
3122
|
.then(async (status) => {
|
|
@@ -2922,9 +3160,14 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2922
3160
|
});
|
|
2923
3161
|
return true;
|
|
2924
3162
|
}
|
|
2925
|
-
case 'logout':
|
|
2926
|
-
channel.
|
|
3163
|
+
case 'logout': {
|
|
3164
|
+
const auth = channel.backendAuth();
|
|
3165
|
+
if (auth?.logout === undefined)
|
|
3166
|
+
channel.notify(t('login-logout-hint'));
|
|
3167
|
+
else
|
|
3168
|
+
void auth.logout();
|
|
2927
3169
|
return true;
|
|
3170
|
+
}
|
|
2928
3171
|
case 'permission': {
|
|
2929
3172
|
// The command itself is registered by the permission-presets row
|
|
2930
3173
|
// (dsh-base): bare `/permission` opens the preset picker and Enter
|
|
@@ -2989,7 +3232,21 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2989
3232
|
setHelpOpen(false);
|
|
2990
3233
|
return runPermissionCommand(rawInput, images);
|
|
2991
3234
|
}
|
|
2992
|
-
|
|
3235
|
+
const native = backendPermissionCommand(channel.backendModes?.()?.snapshot(), rawInput, modeDisplayName(channel.mode));
|
|
3236
|
+
if (native === undefined)
|
|
3237
|
+
return false;
|
|
3238
|
+
if (native.kind === 'unknown') {
|
|
3239
|
+
channel.notify(t('permission-mode-unknown', { id: native.id }), { color: 'error' });
|
|
3240
|
+
return true;
|
|
3241
|
+
}
|
|
3242
|
+
setHelpOpen(false);
|
|
3243
|
+
if (native.kind === 'status')
|
|
3244
|
+
channel.pushLocal('/permission', native.lines);
|
|
3245
|
+
else if (native.kind === 'picker')
|
|
3246
|
+
dispatchOverlay({ type: 'open', overlay: native.overlay });
|
|
3247
|
+
else
|
|
3248
|
+
void runBackendModeCommand(native.mode.id, native.mode.name);
|
|
3249
|
+
return true;
|
|
2993
3250
|
}
|
|
2994
3251
|
case 'plan': {
|
|
2995
3252
|
// Registered by dsh-plan-mode: bare `/plan` opens an on/off picker
|
|
@@ -3030,17 +3287,29 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3030
3287
|
t('hooks-mount-hint'),
|
|
3031
3288
|
]);
|
|
3032
3289
|
return true;
|
|
3033
|
-
case 'mcp':
|
|
3290
|
+
case 'mcp': {
|
|
3034
3291
|
setHelpOpen(false);
|
|
3292
|
+
const control = channel.backendMcp?.();
|
|
3293
|
+
const request = parseMcpCommand(rawInput);
|
|
3294
|
+
if (control !== undefined && request.kind !== 'status') {
|
|
3295
|
+
if (request.kind === 'usage')
|
|
3296
|
+
channel.notify(t('mcp-control-usage'), { color: 'warning' });
|
|
3297
|
+
else if (request.kind === 'reconnect')
|
|
3298
|
+
void control.reconnect(request.name);
|
|
3299
|
+
else
|
|
3300
|
+
void control.toggle(request.name, request.enabled);
|
|
3301
|
+
return true;
|
|
3302
|
+
}
|
|
3035
3303
|
channel.pushLocal('/mcp', channel.mcpStatus());
|
|
3036
3304
|
return true;
|
|
3305
|
+
}
|
|
3037
3306
|
case 'update':
|
|
3038
3307
|
setHelpOpen(false);
|
|
3039
3308
|
if (onUpdate === undefined) {
|
|
3040
3309
|
channel.notify(t('update-unavailable'), { color: 'warning' });
|
|
3041
3310
|
}
|
|
3042
3311
|
else if (channel.working) {
|
|
3043
|
-
channel.notify(t(
|
|
3312
|
+
channel.notify(t(WORKING_GATE_NOTICES.update), { color: 'warning' });
|
|
3044
3313
|
}
|
|
3045
3314
|
else {
|
|
3046
3315
|
channel.notify(t('update-starting'));
|
|
@@ -3124,6 +3393,64 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3124
3393
|
channel.pushLocal('/reload', lines);
|
|
3125
3394
|
return true;
|
|
3126
3395
|
}
|
|
3396
|
+
case 'goal': {
|
|
3397
|
+
// DSH: the `dsh-command-goal` registry row owns /goal, exactly as the
|
|
3398
|
+
// default branch below would dispatch it.
|
|
3399
|
+
if (channel.commandList.some(command => command.external && command.name === 'goal')) {
|
|
3400
|
+
setHelpOpen(false);
|
|
3401
|
+
return runExternalCommand(name, rawInput, images);
|
|
3402
|
+
}
|
|
3403
|
+
// Another backend: the channel core's host over its typed `goals`
|
|
3404
|
+
// capability. None (DSH without the row, or a backend's own `goal`
|
|
3405
|
+
// command) keeps the previous route: the line goes on as text. A
|
|
3406
|
+
// backend with neither never gets here — PromptInput refuses /goal
|
|
3407
|
+
// as unavailable (isUnavailableLocalCommand).
|
|
3408
|
+
const goals = channel.backendGoals?.();
|
|
3409
|
+
if (goals === undefined)
|
|
3410
|
+
return false;
|
|
3411
|
+
setHelpOpen(false);
|
|
3412
|
+
// The capability calls settle like registry commands: the draft is
|
|
3413
|
+
// consumed only once the backend took the change (a failure is
|
|
3414
|
+
// reported by the host and leaves the line editable). An invalid
|
|
3415
|
+
// line is never sent anywhere: it stays in the composer.
|
|
3416
|
+
const command = parseGoalCommand(rawInput);
|
|
3417
|
+
switch (command.kind) {
|
|
3418
|
+
case 'status':
|
|
3419
|
+
channel.pushLocal('/goal', goalStatusLines(channel.goal));
|
|
3420
|
+
return true;
|
|
3421
|
+
case 'invalid':
|
|
3422
|
+
channel.notify(command.reason, { color: 'error' });
|
|
3423
|
+
return Promise.resolve(false);
|
|
3424
|
+
case 'set':
|
|
3425
|
+
return goals.set(command.objective, command.tokenBudget === undefined ? undefined : { tokenBudget: command.tokenBudget });
|
|
3426
|
+
case 'pause':
|
|
3427
|
+
return goals.pause();
|
|
3428
|
+
case 'resume':
|
|
3429
|
+
return goals.resume();
|
|
3430
|
+
case 'clear':
|
|
3431
|
+
return goals.clear();
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
case 'channel': {
|
|
3435
|
+
// 渠道选择器。/channel 只在声明了 channels 能力的内核下进命令表,
|
|
3436
|
+
// 能走到这里就说明可用。与 /kernel 一样,再执行一次就收起。
|
|
3437
|
+
setHelpOpen(false);
|
|
3438
|
+
if (overlay.kind === 'channel')
|
|
3439
|
+
dispatchOverlay({ type: 'close' });
|
|
3440
|
+
else
|
|
3441
|
+
openChannelPicker();
|
|
3442
|
+
return true;
|
|
3443
|
+
}
|
|
3444
|
+
case 'kernel':
|
|
3445
|
+
// 内核选择器,每个内核下都可用(在对话页里切回 DSH 只有这一条路)。
|
|
3446
|
+
// 确认后由组合根的 onSwitchBackend 记住选择并以新内核重启。与 /help、
|
|
3447
|
+
// 参数行一致:选择器已开着就收起,没开才打开。
|
|
3448
|
+
setHelpOpen(false);
|
|
3449
|
+
if (overlay.kind === 'kernel')
|
|
3450
|
+
dispatchOverlay({ type: 'close' });
|
|
3451
|
+
else
|
|
3452
|
+
openKernelPicker();
|
|
3453
|
+
return true;
|
|
3127
3454
|
case 'restart':
|
|
3128
3455
|
// pi-style reload tail: /reload cannot re-read boot-time-only state
|
|
3129
3456
|
// (cordis.yml root config, frozen fullscreen layout, newly built
|
|
@@ -3134,7 +3461,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3134
3461
|
channel.notify(t('restart-unavailable'), { color: 'warning' });
|
|
3135
3462
|
}
|
|
3136
3463
|
else if (channel.working) {
|
|
3137
|
-
channel.notify(t(
|
|
3464
|
+
channel.notify(t(WORKING_GATE_NOTICES.restart), { color: 'warning' });
|
|
3138
3465
|
}
|
|
3139
3466
|
else {
|
|
3140
3467
|
channel.notify(t('restart-starting'));
|
|
@@ -3189,30 +3516,28 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3189
3516
|
return true;
|
|
3190
3517
|
}
|
|
3191
3518
|
case 'btw': {
|
|
3192
|
-
// `/btw
|
|
3193
|
-
//
|
|
3519
|
+
// `/btw`:单轮无工具侧问,线程只在内存里(btwThreads,按会话
|
|
3520
|
+
// 隔离),不打断主回合、不写会话历史。空参数只提示用法。启用了
|
|
3521
|
+
// btw 面板就进面板线程(有模态界面时不抢开,只标未读);没启用
|
|
3522
|
+
// 就用浮层。同一个问答只出现在一处。
|
|
3194
3523
|
setHelpOpen(false);
|
|
3195
3524
|
const question = rawInput.trim();
|
|
3196
3525
|
if (!question) {
|
|
3197
3526
|
channel.notify(t('btw-usage'), { timeoutMs: 3000 });
|
|
3198
3527
|
return true;
|
|
3199
3528
|
}
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
}
|
|
3212
|
-
if (controller.signal.aborted)
|
|
3213
|
-
return;
|
|
3214
|
-
setBtw(prev => prev ? { ...prev, error: error instanceof Error ? error.message : String(error), done: true } : prev);
|
|
3215
|
-
});
|
|
3529
|
+
const btwResult = btwThreads.submit(String(channel.agentId), question, (q, options) => channel.sideQuestion(q, options), { recentTurnsLimit: getBtwContextTurns(), contextBudget: getBtwContextBudget() });
|
|
3530
|
+
if (!btwResult.ok) {
|
|
3531
|
+
channel.notify(t('btw-thread-busy'), { color: 'warning', timeoutMs: 3000 });
|
|
3532
|
+
return true;
|
|
3533
|
+
}
|
|
3534
|
+
if (sidePanel.enabledPanelIds.includes('btw')) {
|
|
3535
|
+
if (btwSurfaceFree())
|
|
3536
|
+
sidePanel.openPanel('btw');
|
|
3537
|
+
}
|
|
3538
|
+
else {
|
|
3539
|
+
setBtwOverlayOpen(true);
|
|
3540
|
+
}
|
|
3216
3541
|
return true;
|
|
3217
3542
|
}
|
|
3218
3543
|
case 'deepseek': {
|
|
@@ -3279,6 +3604,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3279
3604
|
: NO_ROWS;
|
|
3280
3605
|
/** Open the rewind picker (from PromptInput's double-Esc on an empty input). */
|
|
3281
3606
|
const openRewind = () => {
|
|
3607
|
+
if (channel.backendCapabilities?.rewind === false) {
|
|
3608
|
+
channel.notify(t('capability-unavailable-backend', { name: 'rewind' }), { color: 'warning', timeoutMs: 4000 });
|
|
3609
|
+
return;
|
|
3610
|
+
}
|
|
3282
3611
|
// The overlay is not 'rewind' yet this render, so rewindRows is empty —
|
|
3283
3612
|
// scan directly instead of reading the gated list.
|
|
3284
3613
|
const candidates = channel.rows
|
|
@@ -3382,6 +3711,13 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3382
3711
|
if (panelId === 'workspace') {
|
|
3383
3712
|
sidePanelRef.current?.focusChat();
|
|
3384
3713
|
setSupervisorOpen(true);
|
|
3714
|
+
return;
|
|
3715
|
+
}
|
|
3716
|
+
if (panelId === 'btw') {
|
|
3717
|
+
// ⤢ 进整屏线程场景:Esc 返回侧栏,不清 thread/draft(面板
|
|
3718
|
+
// mountPolicy=enabled 保挂载,路由/焦点/滚动原样恢复)。
|
|
3719
|
+
sidePanelRef.current?.focusChat();
|
|
3720
|
+
setBtwSceneOpen(true);
|
|
3385
3721
|
}
|
|
3386
3722
|
}, [openScene]);
|
|
3387
3723
|
// openJobsPanel(在上方、identity 稳定)经 ref 读取最新控制器。
|
|
@@ -3564,9 +3900,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3564
3900
|
const lastModalEnterAtRef = React.useRef(0);
|
|
3565
3901
|
const couponVisible = coupon !== null && starModal === null
|
|
3566
3902
|
&& approvalSnapshot === null && dialogSnapshot === null && questionSnapshot === null
|
|
3567
|
-
&& overlay.kind === 'none' &&
|
|
3903
|
+
&& overlay.kind === 'none' && !btwOverlayOpen && recap === null
|
|
3568
3904
|
&& !supervisorOpen && !treeOpen && !settingsOpen && !jobsPanelOpen
|
|
3569
|
-
&& !sceneOpen && !subagentDashboardOpen && subagentDetailId === null
|
|
3905
|
+
&& !sceneOpen && !subagentDashboardOpen && subagentDetailId === null
|
|
3906
|
+
&& !btwSceneOpen;
|
|
3570
3907
|
const markCouponShown = React.useCallback((orderId) => {
|
|
3571
3908
|
bonusNotices?.shown(orderId);
|
|
3572
3909
|
}, [bonusNotices]);
|
|
@@ -3585,7 +3922,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3585
3922
|
// still lets the panel receive them. PromptInput now stays mounted but
|
|
3586
3923
|
// suspended to preserve async command drafts, making this guard also
|
|
3587
3924
|
// essential for Ctrl+C: it must never clear the hidden composer.
|
|
3588
|
-
if (
|
|
3925
|
+
if (btwOverlayOpen
|
|
3589
3926
|
|| overlay.kind === 'tips'
|
|
3590
3927
|
|| (recap !== null && (!recap.auto || recap.expanded)))
|
|
3591
3928
|
return;
|
|
@@ -3623,12 +3960,20 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3623
3960
|
// Subagent dashboard or detail scene: it owns the keyboard while open.
|
|
3624
3961
|
if (subagentDashboardOpen || subagentDetailId !== null)
|
|
3625
3962
|
return;
|
|
3963
|
+
// The main-screen Agent View owns the whole terminal while open (its
|
|
3964
|
+
// composer, scrolling and Esc layering live in the scene).
|
|
3965
|
+
if (agentView !== null)
|
|
3966
|
+
return;
|
|
3626
3967
|
// The `/jobs` panel replaces the conversation too, so it owns Esc (close)
|
|
3627
3968
|
// and k (kill) while open. Unguarded, Esc meant to CLOSE the panel also
|
|
3628
3969
|
// reached the chat:cancel branch below whenever a turn was in flight —
|
|
3629
3970
|
// dismissing the panel and killing the turn with one key.
|
|
3630
3971
|
if (jobsPanelOpen)
|
|
3631
3972
|
return;
|
|
3973
|
+
// The ⤢ btw thread scene owns the keyboard the same way: Esc there
|
|
3974
|
+
// returns to the sidebar (never the chat:cancel branch below).
|
|
3975
|
+
if (btwSceneOpen)
|
|
3976
|
+
return;
|
|
3632
3977
|
// A plugin scene (dsh-tui-scenes) or the trajectory scene owns the whole
|
|
3633
3978
|
// screen while open: every key belongs to it. Unguarded, an Esc meant to
|
|
3634
3979
|
// CLOSE the scene also reached the chat:cancel branch below whenever a
|
|
@@ -4228,6 +4573,84 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4228
4573
|
}
|
|
4229
4574
|
return;
|
|
4230
4575
|
}
|
|
4576
|
+
if (overlay.kind === 'mode') {
|
|
4577
|
+
if (key.upArrow || key.downArrow) {
|
|
4578
|
+
dispatchOverlay({ type: 'move', delta: key.upArrow ? -1 : 1, count: overlay.modes.length });
|
|
4579
|
+
}
|
|
4580
|
+
else if (plainReturn) {
|
|
4581
|
+
const option = overlay.modes[overlay.index];
|
|
4582
|
+
dispatchOverlay({ type: 'close' });
|
|
4583
|
+
if (option !== undefined)
|
|
4584
|
+
void runBackendModeCommand(option.id, option.name);
|
|
4585
|
+
}
|
|
4586
|
+
else if (key.escape) {
|
|
4587
|
+
dispatchOverlay({ type: 'close' });
|
|
4588
|
+
}
|
|
4589
|
+
return;
|
|
4590
|
+
}
|
|
4591
|
+
if (overlay.kind === 'kernel') {
|
|
4592
|
+
// 名册不冻在 overlay 里(kernelOptions 是渲染期派生值):探测落地后
|
|
4593
|
+
// 选择器自己就刷新成完整目录,不需要重开。
|
|
4594
|
+
if (key.upArrow || key.downArrow) {
|
|
4595
|
+
dispatchOverlay({ type: 'move', delta: key.upArrow ? -1 : 1, count: kernelOptions.length });
|
|
4596
|
+
}
|
|
4597
|
+
else if (plainReturn) {
|
|
4598
|
+
pickKernel(overlay.index);
|
|
4599
|
+
}
|
|
4600
|
+
else if (key.escape) {
|
|
4601
|
+
dispatchOverlay({ type: 'close' });
|
|
4602
|
+
}
|
|
4603
|
+
return;
|
|
4604
|
+
}
|
|
4605
|
+
if (overlay.kind === 'sdk-install') {
|
|
4606
|
+
// 向导按键按步骤态分派;checking/running 期间除 Esc(取消安装)外
|
|
4607
|
+
// 全部吞掉——异步落地只发生在面板还在的窗口内(见 sdkPhase 注释)。
|
|
4608
|
+
if (sdkPhase.kind === 'confirm') {
|
|
4609
|
+
if (plainReturn)
|
|
4610
|
+
confirmSdkInstall(sdkPhase.dir);
|
|
4611
|
+
else if (key.escape)
|
|
4612
|
+
closeSdkInstallToKernelPicker();
|
|
4613
|
+
}
|
|
4614
|
+
else if (sdkPhase.kind === 'checking') {
|
|
4615
|
+
// 亚秒级预检,无键可按。
|
|
4616
|
+
}
|
|
4617
|
+
else if (sdkPhase.kind === 'running') {
|
|
4618
|
+
if (key.escape)
|
|
4619
|
+
sdkInstallerRef.current?.cancel();
|
|
4620
|
+
}
|
|
4621
|
+
else if (sdkPhase.kind === 'done') {
|
|
4622
|
+
if (plainReturn)
|
|
4623
|
+
closeSdkInstallToKernelPicker();
|
|
4624
|
+
else if (key.escape)
|
|
4625
|
+
closeSdkInstall();
|
|
4626
|
+
}
|
|
4627
|
+
else if (sdkPhase.kind === 'failed') {
|
|
4628
|
+
if (input === 'r' && !key.ctrl && !key.meta)
|
|
4629
|
+
confirmSdkInstall(sdkPhase.dir);
|
|
4630
|
+
else if (key.escape)
|
|
4631
|
+
closeSdkInstallToKernelPicker();
|
|
4632
|
+
}
|
|
4633
|
+
else {
|
|
4634
|
+
// pnpm-missing / cancelled / no-target:Esc 回内核选择器。
|
|
4635
|
+
if (key.escape)
|
|
4636
|
+
closeSdkInstallToKernelPicker();
|
|
4637
|
+
}
|
|
4638
|
+
return;
|
|
4639
|
+
}
|
|
4640
|
+
if (overlay.kind === 'channel') {
|
|
4641
|
+
// 名册不冻在 overlay 里(channelRows 是渲染期派生值):切换/导入后
|
|
4642
|
+
// 选择器自己就刷新成新状态,不需要重开。
|
|
4643
|
+
if (key.upArrow || key.downArrow) {
|
|
4644
|
+
dispatchOverlay({ type: 'move', delta: key.upArrow ? -1 : 1, count: channelRows.length });
|
|
4645
|
+
}
|
|
4646
|
+
else if (plainReturn) {
|
|
4647
|
+
pickChannel(overlay.index);
|
|
4648
|
+
}
|
|
4649
|
+
else if (key.escape) {
|
|
4650
|
+
dispatchOverlay({ type: 'close' });
|
|
4651
|
+
}
|
|
4652
|
+
return;
|
|
4653
|
+
}
|
|
4231
4654
|
if (overlay.kind === 'plan') {
|
|
4232
4655
|
if (key.upArrow || key.downArrow) {
|
|
4233
4656
|
dispatchOverlay({ type: 'move', delta: key.upArrow ? -1 : 1, count: 2 });
|
|
@@ -4493,19 +4916,17 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4493
4916
|
else if (key.escape && channel.working && !helpOpen && !promptControllerRef.current?.vimActive()) {
|
|
4494
4917
|
// Esc interrupts a running turn (the prompt input
|
|
4495
4918
|
// only sees esc when idle, where it has the double-tap-clear meaning).
|
|
4496
|
-
// With messages queued
|
|
4497
|
-
//
|
|
4919
|
+
// With messages queued, the queue DOCKS (Claude Code parity): the
|
|
4920
|
+
// abort drops the backend copies, the previews park channel-side and
|
|
4921
|
+
// the composer's dock hint offers ↑ to edit one / ⏎ to send them all
|
|
4922
|
+
// — nothing auto-sends. Already-docked rows dock nothing new; the
|
|
4923
|
+
// turn still needs its plain abort.
|
|
4498
4924
|
// vim mode (either submode) yields: there Esc is a MODE key (INSERT→
|
|
4499
4925
|
// NORMAL, NORMAL = no-op/cancel pending d) and the prompt owns it;
|
|
4500
4926
|
// interrupting still works via Ctrl+C / Ctrl+Enter.
|
|
4501
4927
|
if (channel.pending.length > 0) {
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
images: item.images ?? [],
|
|
4505
|
-
})));
|
|
4506
|
-
if (count > 0) {
|
|
4507
|
-
channel.notify(t('interrupt-delivered', { n: count }), { timeoutMs: 2500 });
|
|
4508
|
-
}
|
|
4928
|
+
if (channel.interruptAndDock() === 0)
|
|
4929
|
+
channel.cancel();
|
|
4509
4930
|
}
|
|
4510
4931
|
else {
|
|
4511
4932
|
channel.cancel();
|
|
@@ -4688,7 +5109,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4688
5109
|
// covered screen is unmounted, exactly like the chat-state prompt slot.
|
|
4689
5110
|
// The panel elements are shared with the prompt-slot chain below so the
|
|
4690
5111
|
// two mount sites cannot drift.
|
|
4691
|
-
const approvalPanelNode = approvalSnapshot !== null ? (_jsx(ApprovalPanel, { approval: approvalSnapshot, background: approvalSnapshot.agentId !== channel.agentId, onDecide: outcome => approvals.decide(outcome) }, approvalSnapshot.key)) : null;
|
|
5112
|
+
const approvalPanelNode = approvalSnapshot !== null ? (_jsx(ApprovalPanel, { approval: approvalSnapshot, background: approvalSnapshot.agentId !== channel.agentId, onDecide: (outcome, decision) => approvals.decide(outcome, decision) }, approvalSnapshot.key)) : null;
|
|
4692
5113
|
const questionPanelNode = questionSnapshot !== null ? (_jsx(AskUserQuestionPanel, { question: questionSnapshot.question, position: questionSnapshot.position, total: questionSnapshot.total, answered: questionSnapshot.answered, initialDraft: questionSnapshot.draft, onAnswer: selection => {
|
|
4693
5114
|
if (!questionStore.stillCurrent(questionSnapshot.key))
|
|
4694
5115
|
return;
|
|
@@ -4729,6 +5150,20 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4729
5150
|
* (above the input cluster) and the launchpad itself (above its input
|
|
4730
5151
|
* card, see the launchpad branch). Defined once so the two never drift.
|
|
4731
5152
|
*/
|
|
5153
|
+
const backendModeStatus = modeStatus(channel.backendModes?.()?.snapshot(), () => { void runCommand('permission', ''); });
|
|
5154
|
+
/**
|
|
5155
|
+
* 底栏模型段/思考档位段的点击(与模式段同一契约):后端声明了模型目录或
|
|
5156
|
+
* effort 能力(backendCapabilities 位)才挂,点击 = 既有 /model · /effort
|
|
5157
|
+
* 命令(同一批选择器);无能力不挂点击,hover 也不承诺(StatusLine 的
|
|
5158
|
+
* effort hover id 与点击同乘,model hover 只是不追加操作行)。
|
|
5159
|
+
*/
|
|
5160
|
+
const backendCaps = channel.backendCapabilities;
|
|
5161
|
+
const modelPickerStatus = backendCaps?.models === false
|
|
5162
|
+
? undefined
|
|
5163
|
+
: { onOpen: () => { void runCommand('model', ''); } };
|
|
5164
|
+
const effortPickerStatus = backendCaps?.effort === false
|
|
5165
|
+
? undefined
|
|
5166
|
+
: { onOpen: () => { void runCommand('effort', ''); } };
|
|
4732
5167
|
const pickerPanels = (_jsxs(_Fragment, { children: [overlay.kind === 'help' && (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsx(HelpMenu, { commands: channel.commandList, viewportHeight: helpCoverViewportHeight, viewportWidth: chatColumns, scrollRef: helpCoverScrollRef, onCommandPick: (name) => {
|
|
4733
5168
|
// 点击命令行 = 把 /name 填进落地页草稿(聊天页 Tab 补全的
|
|
4734
5169
|
// 鼠标等价),浮层收起、人还在启动页(第八版:不许进对话页)。
|
|
@@ -4817,7 +5252,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4817
5252
|
dispatchOverlay({ type: 'close' });
|
|
4818
5253
|
if (row !== undefined)
|
|
4819
5254
|
sidePanel.openPanel(row.id, { focus: true });
|
|
4820
|
-
} }) })), overlay.kind === 'effort' && effortOptions.length > 1 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(EffortSlider, { options: effortOptions, focusIndex: overlay.index, currentId: channel.reasoningEffort,
|
|
5255
|
+
} }) })), overlay.kind === 'effort' && effortOptions.length > 1 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(EffortSlider, { options: effortOptions, focusIndex: overlay.index, currentId: channel.reasoningEffort, levelsFallback: effortLevelsFallback,
|
|
4821
5256
|
// 点击档位 = 移到该档并即时应用(与 ←/→ 同语义)
|
|
4822
5257
|
onPick: (index) => {
|
|
4823
5258
|
dispatchOverlay({ type: 'set-index', kind: 'effort', index });
|
|
@@ -4836,6 +5271,21 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4836
5271
|
dispatchOverlay({ type: 'close' });
|
|
4837
5272
|
if (option !== undefined)
|
|
4838
5273
|
void runPermissionCommand(` ${option.value}`);
|
|
5274
|
+
} }) })), overlay.kind === 'mode' && overlay.modes.length > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(ModePicker, { modes: overlay.modes, focusIndex: overlay.index, currentId: overlay.currentId, onPick: (index) => {
|
|
5275
|
+
if (approvalSnapshot !== null || questionSnapshot !== null || dialogSnapshot !== null)
|
|
5276
|
+
return;
|
|
5277
|
+
const option = overlay.modes[index];
|
|
5278
|
+
dispatchOverlay({ type: 'close' });
|
|
5279
|
+
if (option !== undefined)
|
|
5280
|
+
void runBackendModeCommand(option.id, option.name);
|
|
5281
|
+
} }) })), overlay.kind === 'kernel' && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(KernelPicker, { options: kernelOptions, focusIndex: overlay.index, pinned: kernelPinned === true, onPick: (index) => {
|
|
5282
|
+
if (approvalSnapshot !== null || questionSnapshot !== null || dialogSnapshot !== null)
|
|
5283
|
+
return;
|
|
5284
|
+
pickKernel(index);
|
|
5285
|
+
} }) })), overlay.kind === 'sdk-install' && sdkPhase.kind !== 'idle' && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(SdkInstallWizard, { phase: sdkPhase }) })), overlay.kind === 'channel' && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(ChannelPicker, { rows: channelRows, focusIndex: overlay.index, onPick: (index) => {
|
|
5286
|
+
if (approvalSnapshot !== null || questionSnapshot !== null || dialogSnapshot !== null)
|
|
5287
|
+
return;
|
|
5288
|
+
pickChannel(index);
|
|
4839
5289
|
} }) })), overlay.kind === 'plan' && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(PlanPicker, { focusIndex: overlay.index, currentOn: channel.mode.plan === true, onPick: (index) => {
|
|
4840
5290
|
dispatchOverlay({ type: 'close' });
|
|
4841
5291
|
const on = index === 0;
|
|
@@ -4887,6 +5337,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4887
5337
|
} }) })), overlay.kind === 'search' && _jsx(TranscriptSearch, { query: searchQuery, cursorOffset: searchCursor, count: searchCount, current: searchCurrent })] }));
|
|
4888
5338
|
const screenOpen = channel.pluginScene !== undefined || supervisorOpen || settingsOpen
|
|
4889
5339
|
|| subagentDetailId !== null || subagentDashboardOpen || sceneOpen
|
|
5340
|
+
|| agentView !== null
|
|
4890
5341
|
|| launchpadShown || onboardingOpen;
|
|
4891
5342
|
if (interruptPanel !== null && screenOpen) {
|
|
4892
5343
|
const node = (_jsx(Box, { flexDirection: "column", width: "100%", paddingX: 1, children: interruptPanel }));
|
|
@@ -4960,7 +5411,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4960
5411
|
* about which session is waiting for input.
|
|
4961
5412
|
*/
|
|
4962
5413
|
const agentRowOf = (sessionId) => agentViewRows.find(row => row.id === sessionId);
|
|
4963
|
-
const supervisorNode = (_jsx(SessionSupervisor, { channel: channel, home: homeDir(), onClose: closeHome, approval: approvalSnapshot, onApprove: outcome => approvals.decide(outcome), onOpenSession: async (sessionId) => {
|
|
5414
|
+
const supervisorNode = (_jsx(SessionSupervisor, { channel: channel, home: homeDir(), onClose: closeHome, approval: approvalSnapshot, onApprove: (outcome, decision) => approvals.decide(outcome, decision), onOpenSession: async (sessionId) => {
|
|
4964
5415
|
// A refusal is reported by the screen itself (see `openSession`):
|
|
4965
5416
|
// the composer that draws channel notifications is not mounted here.
|
|
4966
5417
|
const result = await channel.resumeTo(sessionId);
|
|
@@ -4997,9 +5448,14 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4997
5448
|
return ok;
|
|
4998
5449
|
}, onStopSession: async (sessionId) => channel.stopBackgroundAgent?.(sessionId) ?? false, liveStateOf: (sessionId) => {
|
|
4999
5450
|
const row = agentRowOf(sessionId);
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5451
|
+
if (row !== undefined)
|
|
5452
|
+
return { status: row.status, live: row.live, current: row.current, summary: row.summary };
|
|
5453
|
+
// Without agent view, only this terminal's current session has live state.
|
|
5454
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- runtime guard: headless hosts render Chat with a partial channel
|
|
5455
|
+
const hasAgentView = channel.backendCapabilities?.commands.includes('agentview') ?? true;
|
|
5456
|
+
if (hasAgentView || sessionId !== channel.agentId)
|
|
5457
|
+
return undefined;
|
|
5458
|
+
return { status: channel.working ? 'working' : 'idle', live: true, current: true, summary: '' };
|
|
5003
5459
|
} }));
|
|
5004
5460
|
// Inline hosts enter the alternate screen for the duration; full-screen
|
|
5005
5461
|
// hosts are already in it and must not nest a second one.
|
|
@@ -5026,6 +5482,29 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5026
5482
|
const screen = _jsx(Settings, { channel: channel, onClose: () => setSettingsOpen(false) });
|
|
5027
5483
|
return fullscreen ? screen : _jsx(AlternateScreen, { children: screen });
|
|
5028
5484
|
}
|
|
5485
|
+
// Main-screen read-only Agent View: a scene over the mounted Chat, with no
|
|
5486
|
+
// second Channel and no change of the bound session. It borrows the screen
|
|
5487
|
+
// the way the trajectory scene does; Chat stays mounted, so the parent's
|
|
5488
|
+
// rows, draft, pending queue and usage are untouched by the round trip.
|
|
5489
|
+
// Esc returns to wherever the view was opened from.
|
|
5490
|
+
if (agentView !== null && launchpadGate()) {
|
|
5491
|
+
const viewSubagent = channel.subagents.find(s => s.agentId === agentView.agentId);
|
|
5492
|
+
if (!viewSubagent) {
|
|
5493
|
+
// The roster lost this child (session switch): pop the view, don't crash.
|
|
5494
|
+
setAgentView(null);
|
|
5495
|
+
return null;
|
|
5496
|
+
}
|
|
5497
|
+
// Headless stubs mount Chat without a subagentControl at all.
|
|
5498
|
+
const messageControl = channel.subagentControl?.message;
|
|
5499
|
+
const loadTranscript = channel.subagentControl?.history;
|
|
5500
|
+
const viewMessages = messageControl === undefined ? [] : messageControl.messages().filter(m => m.from === agentView.agentId || m.to === agentView.agentId);
|
|
5501
|
+
const viewTarget = agentComposeTargetOf(agentView.agentId, new Map(channel.subagents.map(s => [s.agentId, s.description])));
|
|
5502
|
+
const viewScene = (_jsx(AgentTranscriptScene, { subagent: viewSubagent, source: agentView.source, onExit: () => exitAgentView(agentView.source), ...(loadTranscript === undefined ? {} : { loadTranscript }), messages: viewMessages, ...(messageControl === undefined ? {} : { compose: { control: messageControl, target: viewTarget } }), roster: channel.subagents,
|
|
5503
|
+
// Switching to a sibling or the parent swaps the viewed agent in
|
|
5504
|
+
// place; Esc still returns to the original entry point.
|
|
5505
|
+
onSwitchAgent: switchViewedAgent }));
|
|
5506
|
+
return fullscreen ? viewScene : _jsx(AlternateScreen, { children: viewScene });
|
|
5507
|
+
}
|
|
5029
5508
|
// Subagent detail scene: displays detailed view of a specific subagent.
|
|
5030
5509
|
// Like the browser and settings, it replaces the conversation entirely.
|
|
5031
5510
|
if (subagentDetailId !== null && launchpadGate()) {
|
|
@@ -5036,7 +5515,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5036
5515
|
openSubagentDashboard();
|
|
5037
5516
|
return null;
|
|
5038
5517
|
}
|
|
5039
|
-
const
|
|
5518
|
+
const detailControl = channel.subagentControl?.message;
|
|
5519
|
+
const detailMessages = detailControl === undefined ? [] : detailControl.messages().filter(m => m.from === subagent.agentId || m.to === subagent.agentId);
|
|
5520
|
+
const detailTarget = agentComposeTargetOf(subagent.agentId, new Map(channel.subagents.map(s => [s.agentId, s.description])));
|
|
5521
|
+
const scene = (_jsx(SubagentDetailScene, { subagent: subagent, onInterrupt: (id) => channel.subagentControl?.interrupt(id), ...(channel.subagentControl?.history === undefined ? {} : { loadTranscript: channel.subagentControl.history }), onOpenView: () => openAgentView(subagent.agentId, { kind: 'agent-detail', agentId: subagent.agentId }), messages: detailMessages, ...(detailControl === undefined ? {} : { compose: { control: detailControl, target: detailTarget } }), onBack: () => {
|
|
5040
5522
|
setSubagentDetailId(null);
|
|
5041
5523
|
setSubagentDashboardOpen(true);
|
|
5042
5524
|
} }));
|
|
@@ -5045,7 +5527,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5045
5527
|
// Jobs panel: background jobs (running/killed) with kill/inspect actions.
|
|
5046
5528
|
// Like the browser and settings, it replaces the conversation entirely.
|
|
5047
5529
|
if (jobsPanelOpen && launchpadGate()) {
|
|
5048
|
-
const panel = (_jsx(JobsPanel, { jobs: channel.backgroundJobs ?? [], initialFocusId: jobsPanelFocusId ?? undefined, onClose: () => { setJobsPanelOpen(false); setJobsPanelFocusId(null); }, onKill: (id) => {
|
|
5530
|
+
const panel = (_jsx(JobsPanel, { jobs: channel.backgroundJobs ?? [], initialFocusId: jobsPanelFocusId ?? undefined, onClose: () => { setJobsPanelOpen(false); setJobsPanelFocusId(null); }, onWatchOutput: watchJobOutput, onKill: (id) => {
|
|
5049
5531
|
// Stub channels (verify harnesses) have no jobControl — surface
|
|
5050
5532
|
// the same failure toast as a refused kill instead of throwing.
|
|
5051
5533
|
if (channel.jobControl?.kill(id) !== true) {
|
|
@@ -5054,19 +5536,28 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5054
5536
|
} }));
|
|
5055
5537
|
return fullscreen ? panel : _jsx(AlternateScreen, { children: panel });
|
|
5056
5538
|
}
|
|
5539
|
+
// ⤢ btw thread scene (openPanelFullscreen 'btw'): the whole-terminal form
|
|
5540
|
+
// of the sidebar panel. Esc returns to the sidebar exactly as it was — the
|
|
5541
|
+
// thread and the composer draft live in btwThreads, nothing is cleared.
|
|
5542
|
+
if (btwSceneOpen && launchpadGate()) {
|
|
5543
|
+
const scene = (_jsx(BtwThreadScene, { channel: channel, onClose: () => setBtwSceneOpen(false) }));
|
|
5544
|
+
return fullscreen ? scene : _jsx(AlternateScreen, { children: scene });
|
|
5545
|
+
}
|
|
5057
5546
|
// Subagent dashboard: displays all active and completed subagents.
|
|
5058
5547
|
// Like the browser and settings, it replaces the conversation entirely.
|
|
5059
5548
|
if (subagentDashboardOpen && launchpadGate()) {
|
|
5549
|
+
// No kernel serves agents from other sessions yet, so the dashboard gets
|
|
5550
|
+
// no `peers`; once one does, pass them here.
|
|
5060
5551
|
const dashboard = (_jsx(SubagentDashboard, { subagents: [...channel.subagents], onSelect: (id) => {
|
|
5061
5552
|
setSubagentDashboardOpen(false);
|
|
5062
5553
|
setSubagentDetailId(id);
|
|
5063
|
-
}, onClose: () => setSubagentDashboardOpen(false) }));
|
|
5554
|
+
}, onOpenView: (id) => openAgentView(id, { kind: 'agents-dashboard' }), messages: channel.subagentControl?.message?.messages(), onClose: () => setSubagentDashboardOpen(false) }));
|
|
5064
5555
|
return fullscreen ? dashboard : _jsx(AlternateScreen, { children: dashboard });
|
|
5065
5556
|
}
|
|
5066
5557
|
/** Prompt input is inert while a modal dialog owns the keyboard. The
|
|
5067
5558
|
* overlay union covers every picker/dialog and /tips in one check;
|
|
5068
5559
|
* message-selection mode and the /btw panel live outside it. */
|
|
5069
|
-
const promptSelectionActive = selectionActive || overlay.kind !== 'none' ||
|
|
5560
|
+
const promptSelectionActive = selectionActive || overlay.kind !== 'none' || btwOverlayOpen;
|
|
5070
5561
|
// These panels replace the visible composer, but PromptInput remains
|
|
5071
5562
|
// mounted (suspended) so an async registry command cannot lose its exact
|
|
5072
5563
|
// text/image draft while it waits for a user decision.
|
|
@@ -5074,7 +5565,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5074
5565
|
|| dialogSnapshot !== null
|
|
5075
5566
|
|| overlay.kind === 'tips'
|
|
5076
5567
|
|| (recap !== null && (!recap.auto || recap.expanded))
|
|
5077
|
-
||
|
|
5568
|
+
|| btwOverlayOpen
|
|
5078
5569
|
|| questionPanelNode !== null
|
|
5079
5570
|
|| starModal !== null
|
|
5080
5571
|
|| couponVisible;
|
|
@@ -5127,8 +5618,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5127
5618
|
jobsRunning: (channel.backgroundJobs ?? []).some(job => job.status === 'running' || job.status === 'stopping'),
|
|
5128
5619
|
updateAvailable: launchpadUpdateAvailable,
|
|
5129
5620
|
starDue: launchpadStarDue,
|
|
5621
|
+
// 内核入口带名(「内核 · Claude」):backendId 是内核身份的唯一来源。
|
|
5622
|
+
backendId: kernelCurrentId,
|
|
5130
5623
|
});
|
|
5131
|
-
const
|
|
5624
|
+
const launchpad = (_jsx(Launchpad, { query: launchpadDraft, cursorOffset: launchpadCaret, focusIndex: launchpadFocus, isTerminalFocused: terminalFocused, whale: channel.whale, whaleIdle: channel.whaleIdle, whaleGirl: channel.whaleGirl, fontId: splashFontIdOf(channel.splashFont), brand: brand, starred: starred, onStarClick: runStarAction, firstRun: onboardingPending, actions: launchpadActions,
|
|
5132
5625
|
// 参数行四段点开的既有选择器(第五版):pickerPanels 与聊天页共用
|
|
5133
5626
|
// 同一份 JSX,盖在落地页之上;选择器开着时落地页键盘让位(inputPaused)。
|
|
5134
5627
|
overlayPanel: launchpadOverlayUp ? pickerPanels : undefined, inputPaused: launchpadOverlayUp, onParamPick: (segment) => {
|
|
@@ -5196,7 +5689,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5196
5689
|
if (overlay.kind !== 'none')
|
|
5197
5690
|
dispatchOverlay({ type: 'close' });
|
|
5198
5691
|
setLaunchpadFocus(-1);
|
|
5199
|
-
}, model: channel.model, effort: channel.reasoningEffort, preset: channel.agentPreset === undefined
|
|
5692
|
+
}, model: channel.modelDisplay ?? channel.model, effort: channel.reasoningEffort, preset: channel.agentPreset === undefined
|
|
5200
5693
|
? undefined
|
|
5201
5694
|
: presetOptions.find(option => option.id === channel.agentPreset)?.name ?? channel.agentPreset, permission: launchpadPermission, commands: launchpadOverlayUp || !launchpadDraft.startsWith('/')
|
|
5202
5695
|
? undefined
|
|
@@ -5219,11 +5712,21 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5219
5712
|
setLaunchpadOpen(false);
|
|
5220
5713
|
}
|
|
5221
5714
|
void runCommand(parsed.name, parsed.rawInput);
|
|
5222
|
-
}, cwd: channel.displayCwd, branch: channel.gitBranch, tuiVersion: tuiVersion,
|
|
5715
|
+
}, cwd: channel.displayCwd, branch: channel.gitBranch, tuiVersion: tuiVersion,
|
|
5716
|
+
// 右下角的内核行:与选择器同一份目录,标出当前内核,点它打开选择器。
|
|
5717
|
+
kernels: kernelOptions, onKernelPick: () => openKernelPicker(),
|
|
5223
5718
|
// 左下角工作目录铭牌(第七版):点开/回车开既有 /workspace 菜单——
|
|
5224
5719
|
// workspace-menu 在 LAUNCHPAD_OVERLAY_KINDS 里,选择器盖在落地页之上,
|
|
5225
5720
|
// Esc 回落地页(与参数行选择器同一姿态),不新造面板。
|
|
5226
5721
|
onOpenWorkspace: () => { void runCommand('workspace', ''); } }));
|
|
5722
|
+
// 落地页这一屏的完整树(AC-4):Tooltip 单例层挂在**最外层最后**——与下面
|
|
5723
|
+
// 聊天主树末尾那处(SidePanelLayout 里)是同一个组件、同一条"单例层挂树尾"
|
|
5724
|
+
// 姿态;参数行被截断的段(ParamChip 写的锚点)hover 600ms 后由它画完整名。
|
|
5725
|
+
// 本屏没有滚动、也没有面板几何过渡 ⇒ 不需要 subscribeInvalidation;但**必须**给
|
|
5726
|
+
// invalidationKey:选择器是**盖在落地页之上**的浮层,落地页不卸载、指针也不一定
|
|
5727
|
+
// 离开被悬停的那一段,没有这个键时旧卡片会继续画在选择器上方(复核场景回归见
|
|
5728
|
+
// `verify-launchpad-onboarding-chat` 的 R4)。
|
|
5729
|
+
const node = (_jsxs(_Fragment, { children: [launchpad, _jsx(TooltipLayer, { invalidationKey: overlay.kind })] }));
|
|
5227
5730
|
return fullscreen ? node : _jsx(AlternateScreen, { children: node });
|
|
5228
5731
|
}
|
|
5229
5732
|
// 浮层整体挂载条件:与内部各面板的可见条件同值(数据门在
|
|
@@ -5287,10 +5790,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5287
5790
|
seekRow(anchorUserRowId);
|
|
5288
5791
|
else
|
|
5289
5792
|
handle?.scrollToBottom();
|
|
5290
|
-
} })), _jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, marginRight: sidePanel.split ? 0 : -pageInsetX, children: [_jsxs(ScrollBox, { ref: setHandle, flexDirection: "column", flexGrow: 1, flexShrink: 1, stickyScroll: true, children: [_jsx(LogoHeader, { model: channel.model, effort: channel.reasoningEffort, cwd: channel.displayCwd,
|
|
5793
|
+
} })), _jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, marginRight: sidePanel.split ? 0 : -pageInsetX, children: [_jsxs(ScrollBox, { ref: setHandle, flexDirection: "column", flexGrow: 1, flexShrink: 1, stickyScroll: true, children: [_jsx(LogoHeader, { model: channel.modelDisplay ?? channel.model, effort: channel.reasoningEffort, cwd: channel.displayCwd,
|
|
5291
5794
|
// 大字字面(设置项 `dsh-tui.splashFont`):`daily` 交回按天轮换
|
|
5292
5795
|
// (`undefined`),其余 pin 住一款。
|
|
5293
|
-
fontId: splashFontIdOf(channel.splashFont), whale: channel.whale, whaleIdle: channel.whaleIdle && whaleArtVisible, whaleGirl: channel.whaleGirl, starred: starred, onStarClick: runStarAction, working: channel.working,
|
|
5796
|
+
fontId: splashFontIdOf(channel.splashFont), whale: channel.whale, whaleIdle: channel.whaleIdle && whaleArtVisible, whaleGirl: channel.whaleGirl, brand: brand, starred: starred, onStarClick: runStarAction, working: channel.working,
|
|
5294
5797
|
// Resuming a long session skips the ~3.4s opening animation: it
|
|
5295
5798
|
// keeps firing low-frequency React commits that compete with the
|
|
5296
5799
|
// transcript mount batches (and the first wheel events) for the
|
|
@@ -5298,7 +5801,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5298
5801
|
// sessions keep the full intro; restored ones settle instantly.
|
|
5299
5802
|
// A remount after a whole screen closed also settles instantly
|
|
5300
5803
|
// (see suppressLogoIntroRef).
|
|
5301
|
-
skipIntro: suppressLogoIntroRef.current || channel.rows.length > 30 }, logoNonce), loadedContextVisible && (_jsx(LoadedContextPanel, { context: channel.loadedContext, open: loadedContextOpen, onToggle: toggleLoadedContext })), _jsx(MessageList, { rows: channel.rows, failureHintRowId: failureHintRowId, failureHint: t('traj-hint-failure', { key: primaryComboString('trajectory') }), expanded: expanded, expandedRows: expandedRows, selectedId: selectionActive ? selectedId : null, onToggleRow: toggleRowExpanded, streamViewToggledRows: streamViewToggledRows, onToggleStreamView: toggleStreamView, model: channel.model, diffLayout: channel.diffLayout, thinkingFold: channel.thinkingFold, jobGroupFold: channel.jobGroupFold, toolBackground: channel.toolBackground, foldTerminalCommand: channel.foldTerminalCommand, smoothStreaming: channel.smoothStreaming, activityFrames: channel.activityFrames, showAll: showAllMessages, thinkingVisible: thinkingVisible, historyPaintEnabled: !fullscreen, onToggleAll: () => { setShowAllMessages(previous => !previous); }, onLoadOlder: () => channel.loadOlder(), registerRowRef: registerRowRef, scrollHandle: handle, forceMountRowId: forceMountRowId, newSinceRowId: isSticky ? null : lastSeenRowIdRef.current, onUnseenCount: setUnseenCount, onTimeline: setTimeline, onOpenSubagent: setSubagentDetailId, onOpenJobs: openJobsPanel, onOpenFile: openFileActions, sessionCwd: channel.cwd, onPreviewImage: openImagePreview, suppressImageGraphics: activePreview !== null })] }), (() => {
|
|
5804
|
+
skipIntro: suppressLogoIntroRef.current || channel.rows.length > 30 }, logoNonce), loadedContextVisible && (_jsx(LoadedContextPanel, { context: channel.loadedContext, open: loadedContextOpen, onToggle: toggleLoadedContext })), _jsx(MessageList, { rows: channel.rows, failureHintRowId: failureHintRowId, failureHint: t('traj-hint-failure', { key: primaryComboString('trajectory') }), expanded: expanded, expandedRows: expandedRows, selectedId: selectionActive ? selectedId : null, onToggleRow: toggleRowExpanded, streamViewToggledRows: streamViewToggledRows, onToggleStreamView: toggleStreamView, model: channel.modelDisplay ?? channel.model, diffLayout: channel.diffLayout, thinkingFold: channel.thinkingFold, jobGroupFold: channel.jobGroupFold, toolBackground: channel.toolBackground, foldTerminalCommand: channel.foldTerminalCommand, turnUsageRow: channel.turnUsageRow, smoothStreaming: channel.smoothStreaming, activityFrames: channel.activityFrames, showAll: showAllMessages, thinkingVisible: thinkingVisible, historyPaintEnabled: !fullscreen, fullscreen: fullscreen, onToggleAll: () => { setShowAllMessages(previous => !previous); }, onLoadOlder: () => channel.loadOlder(), registerRowRef: registerRowRef, scrollHandle: handle, forceMountRowId: forceMountRowId, newSinceRowId: isSticky ? null : lastSeenRowIdRef.current, onUnseenCount: setUnseenCount, onTimeline: setTimeline, onOpenSubagent: setSubagentDetailId, onOpenSubagentView: openSubagentViewFromCard, onOpenJobs: openJobsPanel, onOpenFile: openFileActions, sessionCwd: channel.cwd, onPreviewImage: openImagePreview, suppressImageGraphics: activePreview !== null, olderHistory: channel.olderHistory, onWatchJobOutput: watchJobOutput })] }), (() => {
|
|
5302
5805
|
// Gutter mode (settings `dsh-tui.scrollGutter`): the timeline
|
|
5303
5806
|
// rail (default), the proportional scrollbar, or nothing. The
|
|
5304
5807
|
// slot keeps its 2 columns in both rendered modes (Qwen's
|
|
@@ -5322,7 +5825,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5322
5825
|
// inflating the reading next to a real upload number). An
|
|
5323
5826
|
// automatic compaction mid-turn badges THIS line too — it is
|
|
5324
5827
|
// the spinner slot whenever real activity data exists.
|
|
5325
|
-
suffix: `${lastUploadTokens > 0 ? ` · ↑ ${formatTokens(lastUploadTokens)}` : ''} · ↓ ${formatTokens(Math.round(channel.responseChars / 4))} tokens${compactionBadge === undefined ? '' : ` · ${compactionBadge}`}` }) })) : (_jsx(WorkingSpinner, { mode: channel.spinnerMode, hasActiveTools: channel.activeToolCount > 0, responseLengthRef: responseLengthRef, uploadTokensRef: uploadTokensRef, loadingStartTimeRef: loadingStartTimeRef, totalPausedMsRef: totalPausedMsRef, pauseStartTimeRef: pauseStartTimeRef, thinkingStatus: thinkingStatus, suffix: compactionBadge }))), !channel.working && channel.compaction !== undefined && (_jsx(CompactionStatusRow, { compaction: channel.compaction, activityPreset: activitySlot ? channel.activityFrames : undefined })), !(sidePanel.split && sidePanel.enabledPanelIds.includes('todo')) && (_jsx(GoalTodoPanel, { channel: channel, collapsed: todoCollapsed, onToggle: () => setTodoCollapsed(previous => !previous) })), recap !== null && recap.auto && !recap.expanded && (_jsx(AutoRecapRow, { summary: recap.summary, streaming: !recap.done, onExpand: () => setRecap(prev => (prev ? { ...prev, expanded: true } : prev)), onDismiss: () => closeRecap() })), balance !== null && (_jsx(BalanceReportRow, { result: balance.result, refreshing: balance.refreshing, tokens: channel.tokens, model: channel.model, provider: channel.provider, mainCost: channel.mainCost, subagentCost: channel.subagentCost, onRefresh: runBalance, onDismiss: () => setBalance(null) })), statusEntries.length > 0 && (_jsx(Text, { dimColor: true, wrap: "truncate", children: statusEntries.map(entry => entry.text).join(' · ') })), activePreview === null && statusViews.map(view => (_jsx(PluginStatusViewBoundary, { viewKey: view.key, onError: (key, error) => statusContributions.reportViewError(key, error), children: _jsx(Box, { flexDirection: "column", flexShrink: 0, maxHeight: view.maxRows, overflow: "hidden", children: _jsx(Box, { flexDirection: "column", flexShrink: 0, children: React.createElement(view.component, {
|
|
5828
|
+
suffix: `${lastUploadTokens > 0 ? ` · ↑ ${formatTokens(lastUploadTokens)}` : ''} · ↓ ${formatTokens(Math.round(channel.responseChars / 4))} tokens${compactionBadge === undefined ? '' : ` · ${compactionBadge}`}` }) })) : (_jsx(WorkingSpinner, { mode: channel.spinnerMode, hasActiveTools: channel.activeToolCount > 0, responseLengthRef: responseLengthRef, uploadTokensRef: uploadTokensRef, loadingStartTimeRef: loadingStartTimeRef, totalPausedMsRef: totalPausedMsRef, pauseStartTimeRef: pauseStartTimeRef, thinkingStatus: thinkingStatus, suffix: compactionBadge }))), !channel.working && channel.compaction !== undefined && (_jsx(CompactionStatusRow, { compaction: channel.compaction, activityPreset: activitySlot ? channel.activityFrames : undefined })), !(sidePanel.split && sidePanel.enabledPanelIds.includes('todo')) && (_jsx(GoalTodoPanel, { channel: channel, collapsed: todoCollapsed, onToggle: () => setTodoCollapsed(previous => !previous) })), recap !== null && recap.auto && !recap.expanded && (_jsx(AutoRecapRow, { summary: recap.summary, streaming: !recap.done, onExpand: () => setRecap(prev => (prev ? { ...prev, expanded: true } : prev)), onDismiss: () => closeRecap() })), balance !== null && (_jsx(BalanceReportRow, { result: balance.result, refreshing: balance.refreshing, tokens: channel.tokens, model: channel.modelDisplay ?? channel.model, provider: channel.provider, mainCost: channel.mainCost, subagentCost: channel.subagentCost, onRefresh: runBalance, onDismiss: () => setBalance(null) })), statusEntries.length > 0 && (_jsx(Text, { dimColor: true, wrap: "truncate", children: statusEntries.map(entry => entry.text).join(' · ') })), activePreview === null && statusViews.map(view => (_jsx(PluginStatusViewBoundary, { viewKey: view.key, onError: (key, error) => statusContributions.reportViewError(key, error), children: _jsx(Box, { flexDirection: "column", flexShrink: 0, maxHeight: view.maxRows, overflow: "hidden", children: _jsx(Box, { flexDirection: "column", flexShrink: 0, children: React.createElement(view.component, {
|
|
5326
5829
|
React,
|
|
5327
5830
|
ui: STATUS_VIEW_UI,
|
|
5328
5831
|
}) }) }) }, `${view.key}:${view.registrationId}`))), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [approvalPanelNode !== null ? (approvalPanelNode) : dialogSnapshot !== null ? (_jsx(ExtensionDialog, { dialog: dialogSnapshot, onDecide: value => dialogs.decide(dialogSnapshot.key, value), onCancel: () => dialogs.cancel(dialogSnapshot.key) }, dialogSnapshot.key)) : overlay.kind === 'tips' ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(TipsPanel, { onClose: () => dispatchOverlay({ type: 'close-if', kind: 'tips' }) }) })) : recap !== null && (!recap.auto || recap.expanded) ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(RecapPanel, { summary: recap.summary, title: recap.title, error: recap.error, streaming: !recap.done, titleApplied: recap.titleApplied, onClose: () => {
|
|
@@ -5344,10 +5847,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5344
5847
|
channel.renameSession(recap.title);
|
|
5345
5848
|
setRecap(prev => (prev ? { ...prev, titleApplied: true } : prev));
|
|
5346
5849
|
channel.notify(t('recap-title-applied-notify', { title: recap.title }), { color: 'success' });
|
|
5347
|
-
} }) })) :
|
|
5348
|
-
void setClipboard(
|
|
5850
|
+
} }) })) : btwOverlayOpen && !sidePanel.enabledPanelIds.includes('btw') ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(BtwPanelFallback, { thread: btwOverlayThread, onClose: closeBtwOverlay, onCopy: answer => {
|
|
5851
|
+
void setClipboard(answer).then(raw => { if (raw)
|
|
5349
5852
|
writeRaw?.(raw); });
|
|
5350
|
-
channel.notify(t('copied-chars', { n:
|
|
5853
|
+
channel.notify(t('copied-chars', { n: answer.length }), { timeoutMs: 1500 });
|
|
5351
5854
|
} }) })) : questionPanelNode !== null ? (questionPanelNode) : null, _jsx(PromptInput, { channel: channel, suspended: promptReplacementOpen,
|
|
5352
5855
|
// 宠物面板是活动面板时,通知由它的头顶气泡「说出来」,输入框上方
|
|
5353
5856
|
// 不再重复弹同一条(error 色除外——可能要行动的信号永远走 toast)。
|
|
@@ -5373,7 +5876,16 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5373
5876
|
// clock and shifting every row-count layout invariant.
|
|
5374
5877
|
channel.agentViewRows !== undefined && backgroundAgentsNeedingInput > 0
|
|
5375
5878
|
? backgroundAgentsNeedingInput
|
|
5376
|
-
: undefined, controllerRef: promptControllerRef, onCaretImage: handleCaretImage, caretPreviewOpen: peekPreview !== null, onDismissCaretPreview: dismissPeek }, "prompt-input"), _jsx(StatusLine, { channel: channel, activity: workingActivity, selectionActive: selectionActive, helpOpen: helpOpen,
|
|
5879
|
+
: undefined, controllerRef: promptControllerRef, onCaretImage: handleCaretImage, caretPreviewOpen: peekPreview !== null, onDismissCaretPreview: dismissPeek }, "prompt-input"), _jsx(StatusLine, { channel: channel, activity: workingActivity, selectionActive: selectionActive, helpOpen: helpOpen,
|
|
5880
|
+
// Backend-native permission modes: the footer mode segment always
|
|
5881
|
+
// shows (the base mode included) and clicks into the same
|
|
5882
|
+
// /permission picker the command opens (the launchpad param row's
|
|
5883
|
+
// route). DSH answers an empty list here — no prop, byte-identical
|
|
5884
|
+
// rendering.
|
|
5885
|
+
backendMode: backendModeStatus,
|
|
5886
|
+
// 模型段/思考档位段:能力位在才可点,点击走既有 /model · /effort
|
|
5887
|
+
// 命令(与模式段打开 /permission 完全同构)。
|
|
5888
|
+
modelPicker: modelPickerStatus, effortPicker: effortPickerStatus, wake: wakeBand === undefined
|
|
5377
5889
|
? undefined
|
|
5378
5890
|
: {
|
|
5379
5891
|
band: wakeBand,
|
|
@@ -5381,7 +5893,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
5381
5893
|
tick: Math.floor(wakeTime / 120),
|
|
5382
5894
|
onOpen: openScene,
|
|
5383
5895
|
hoverHint: primaryComboString('trajectory'),
|
|
5384
|
-
} }), dialogOverlayOpen && (_jsx(OverlayAbove, { maxHeight: Math.max(terminalRows - 8, 1), children: pickerPanels }))] })] }), _jsx(TooltipLayer, { invalidationKey: `${overlay.kind}:${dialogOverlayOpen}:${
|
|
5896
|
+
} }), dialogOverlayOpen && (_jsx(OverlayAbove, { maxHeight: Math.max(terminalRows - 8, 1), children: pickerPanels }))] })] }), _jsx(TooltipLayer, { invalidationKey: `${overlay.kind}:${dialogOverlayOpen}:${btwOverlayOpen}`, subscribeInvalidation: subscribeTooltipInvalidation })] }), _jsx(PromptEditorLayer, {}), promptEditorOpen && imagePreviewNode, starModal !== null && STAR_MILESTONES[starModal.index] !== undefined && (_jsx(StarPrompt, { milestone: STAR_MILESTONES[starModal.index], actions: starModalActions, onClose: closeStarModal, initialPhase: starModal.phase })), couponVisible && coupon !== null && (_jsx(WhaleCouponPrompt, { notice: coupon, onShown: markCouponShown, onClose: closeCoupon }))] }));
|
|
5385
5897
|
}
|
|
5386
5898
|
/**
|
|
5387
5899
|
* The pinned prompt header shown above the ScrollBox while the user has
|