@deepseek-harness-tui/dsh-tui 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -17
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +47 -10
- package/guide/dsh-tui-guide/codex-backend.md +26 -4
- package/guide/dsh-tui-guide/configuration.en.md +168 -18
- package/guide/dsh-tui-guide/configuration.md +144 -16
- package/guide/dsh-tui-guide/getting-started.en.md +15 -0
- package/guide/dsh-tui-guide/getting-started.md +15 -0
- package/guide/dsh-tui-guide/interaction.en.md +64 -24
- package/guide/dsh-tui-guide/interaction.md +49 -19
- package/guide/dsh-tui-guide/plugins.en.md +97 -3
- package/guide/dsh-tui-guide/plugins.md +55 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +53 -21
- package/guide/dsh-tui-guide/user-guide.md +43 -22
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/projection.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +4 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +5 -1
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -3
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +56 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +68 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +2 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -2
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/contract.d.ts +3 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -1
- package/lib/types/backends/codex/contract.js +3 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/async-questions.d.ts +17 -0
- package/lib/types/backends/codex/session/async-questions.d.ts.map +1 -0
- package/lib/types/backends/codex/session/async-questions.js +89 -0
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +100 -42
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/items.js +7 -5
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/codex/translate/question-reply.d.ts +11 -0
- package/lib/types/backends/codex/translate/question-reply.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/question-reply.js +53 -0
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +10 -0
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +15 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +58 -10
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +24 -7
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +14 -9
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +109 -15
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PermissionsPicker.d.ts +10 -1
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
- package/lib/types/components/PermissionsPicker.js +24 -16
- package/lib/types/components/PluginInstallPane.d.ts +21 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -0
- package/lib/types/components/PluginInstallPane.js +84 -0
- package/lib/types/components/PluginManagePane.d.ts +21 -0
- package/lib/types/components/PluginManagePane.d.ts.map +1 -0
- package/lib/types/components/PluginManagePane.js +69 -0
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +65 -121
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/SubagentCard.d.ts +13 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +27 -12
- package/lib/types/components/SubagentDashboard.d.ts +8 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +58 -16
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts +14 -1
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +38 -19
- package/lib/types/components/messages/TeamMessageBubble.d.ts +20 -0
- package/lib/types/components/messages/TeamMessageBubble.d.ts.map +1 -0
- package/lib/types/components/messages/TeamMessageBubble.js +15 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelHost.js +5 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts +8 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +11 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +15 -2
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +7 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +4 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +28 -8
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +2 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +156 -21
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +6 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +64 -16
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +15 -5
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +101 -10
- package/lib/types/components/sidePanel/btw/threads.d.ts +18 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/threads.js +51 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +5 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +5 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.js +19 -4
- package/lib/types/components/sidePanel/companion/skins.d.ts +8 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +57 -12
- package/lib/types/components/sidePanel/types.d.ts +7 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashArtRows.d.ts +29 -0
- package/lib/types/components/splashArtRows.d.ts.map +1 -0
- package/lib/types/components/splashArtRows.js +31 -0
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/teamRoster.d.ts +70 -0
- package/lib/types/components/teamRoster.d.ts.map +1 -0
- package/lib/types/components/teamRoster.js +78 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +102 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +301 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/agent-view.js +3 -1
- package/lib/types/dsh-adapter/approvals.d.ts +7 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +45 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +71 -8
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts +31 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-assembly.js +225 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +62 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +78 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +304 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +91 -46
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +60 -3
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +17 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +19 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +79 -6
- package/lib/types/dsh-adapter/channel/compaction.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +100 -26
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +5 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +330 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +109 -30
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +7 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +235 -13
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +48 -29
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +4 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +2 -0
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +60 -30
- package/lib/types/dsh-adapter/channel/session-reset.js +2 -2
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +22 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +136 -5
- package/lib/types/dsh-adapter/channel/state.d.ts +43 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +84 -12
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +20 -3
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts +55 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.js +96 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +4 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +20 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +7 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +8 -1
- package/lib/types/dsh-adapter/entry-slot.d.ts +38 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +226 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +148 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +77 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +112 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +481 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +253 -0
- package/lib/types/dsh-adapter/index.d.ts +53 -17
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +63 -9
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/invariant.d.ts +7 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +6 -3
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/index.js +2 -2
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +41 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +119 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +183 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts +94 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-feed.js +135 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts +115 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-guard.js +108 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-install.d.ts +160 -0
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-install.js +545 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts +178 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manage.js +468 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts +144 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +83 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +918 -234
- package/lib/types/dsh-adapter/plugins-info.d.ts +130 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +469 -44
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts +66 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-projection-store.js +149 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/settingsEditor.js +2 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts +21 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +53 -0
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +112 -9
- package/lib/types/dsh-adapter/team-mode.d.ts +74 -0
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-mode.js +188 -0
- package/lib/types/dsh-adapter/team-roster.d.ts +67 -0
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-roster.js +136 -0
- package/lib/types/dsh-adapter/team-tools.d.ts +58 -0
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-tools.js +208 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +961 -1439
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +443 -387
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts +9 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +23 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +130 -17
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +8 -1
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/permissionPresetLabels.d.ts +25 -0
- package/lib/types/permissionPresetLabels.d.ts.map +1 -0
- package/lib/types/permissionPresetLabels.js +33 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/preset-patch.d.ts +22 -0
- package/lib/types/preset-patch.d.ts.map +1 -0
- package/lib/types/preset-patch.js +14 -0
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +55 -16
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +742 -280
- package/lib/types/screens/Launchpad.d.ts +33 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +256 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +7 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts +68 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts.map +1 -0
- package/lib/types/screens/chat/usePluginWriteFlow.js +92 -0
- package/lib/types/screens/chatOverlay.d.ts +30 -5
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessionModes.d.ts +5 -3
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +9 -3
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/lib/types/utils/paths.d.ts +11 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +13 -0
- package/package.json +150 -114
- package/presets/winbash.mjs +716 -0
- package/tui-profile/feed/README.md +63 -0
- package/tui-profile/feed/first-party.json +10 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelStore.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/PanelStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAErF,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,uCAAuC;AACvC,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,kBAAkB;AAClB,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C;;4CAE4C;AAC5C,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAatD,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,SAAS,CAA8C;IAC/D,OAAO,CAAC,QAAQ,CAA2C;IAC3D,OAAO,CAAC,QAAQ,CAAI;IACpB,+CAA+C;IAC/C,OAAO,CAAC,UAAU,CAA8B;IAEhD,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,IAAI;IA0BpE,IAAI,IAAI,SAAS,UAAU,EAAE;IAI7B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIvC;;+CAE2C;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,IAAI;IAWtE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO5B,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAsB7C,SAAS,GAAI,UAAU,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAGrE;IAED,OAAO,CAAC,IAAI;CAIb;AAED,0DAA0D;AAC1D,eAAO,MAAM,UAAU,YAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"PanelStore.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/PanelStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAErF,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,uCAAuC;AACvC,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,kBAAkB;AAClB,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C;;4CAE4C;AAC5C,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAatD,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,SAAS,CAA8C;IAC/D,OAAO,CAAC,QAAQ,CAA2C;IAC3D,OAAO,CAAC,QAAQ,CAAI;IACpB,+CAA+C;IAC/C,OAAO,CAAC,UAAU,CAA8B;IAEhD,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,IAAI;IA0BpE,IAAI,IAAI,SAAS,UAAU,EAAE;IAI7B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIvC;;+CAE2C;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,IAAI;IAWtE;;;OAGG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAOvC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO5B,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAsB7C,SAAS,GAAI,UAAU,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAGrE;IAED,OAAO,CAAC,IAAI;CAIb;AAED,0DAA0D;AAC1D,eAAO,MAAM,UAAU,YAAmB,CAAA"}
|
|
@@ -69,6 +69,17 @@ export class PanelStore {
|
|
|
69
69
|
this.entries.set(id, { ...entry, badge: next });
|
|
70
70
|
this.emit({ type: 'badge', id });
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* 面板广告自己当前的键位片段(见 PanelEntry.hint)。每次 channel delta 都会
|
|
74
|
+
* 有适配器调 setBadge,这里同理按值短路:没变就不通知宿主重渲染。
|
|
75
|
+
*/
|
|
76
|
+
setHint(id, hint) {
|
|
77
|
+
const entry = this.entries.get(id);
|
|
78
|
+
if (entry === undefined || entry.hint === hint)
|
|
79
|
+
return;
|
|
80
|
+
this.entries.set(id, { ...entry, hint });
|
|
81
|
+
this.emit({ type: 'hint', id });
|
|
82
|
+
}
|
|
72
83
|
clearBadge(id) {
|
|
73
84
|
const entry = this.entries.get(id);
|
|
74
85
|
if (entry === undefined || entry.badge === null)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SidePanelColumn: PanelBar, the active panel surface and a one-row key hint.
|
|
3
3
|
* The hint follows focus, and the rules brighten with the divider as one surface.
|
|
4
|
-
* Tabs follow the enabled registration order and carry each panel's badge.
|
|
4
|
+
* Tabs follow the enabled registration order and carry each panel's icon and badge.
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import type { ChannelUi } from '../../adapter/channel/ui-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelColumn.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelColumn.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAMnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,qCAAqC,EAAE,YAAY,CAAA;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/E,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,uCAAuC,EAAE,SAAS,CAAA;CAChF;AAoCD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"SidePanelColumn.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelColumn.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAMnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,qCAAqC,EAAE,YAAY,CAAA;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/E,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,uCAAuC,EAAE,SAAS,CAAA;CAChF;AAoCD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAmFhJ"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/**
|
|
3
3
|
* SidePanelColumn: PanelBar, the active panel surface and a one-row key hint.
|
|
4
4
|
* The hint follows focus, and the rules brighten with the divider as one surface.
|
|
5
|
-
* Tabs follow the enabled registration order and carry each panel's badge.
|
|
5
|
+
* Tabs follow the enabled registration order and carry each panel's icon and badge.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Box, Text, useTerminalSize } from '../../ui.js';
|
|
@@ -40,6 +40,7 @@ export function SidePanelColumn({ width, controller, channel, activity, attentio
|
|
|
40
40
|
return {
|
|
41
41
|
id,
|
|
42
42
|
title: def.titleKey !== undefined ? t(def.titleKey) : def.title ?? fallbackTitle(id),
|
|
43
|
+
icon: def.icon,
|
|
43
44
|
badge: entry.badge,
|
|
44
45
|
};
|
|
45
46
|
});
|
|
@@ -54,6 +55,18 @@ export function SidePanelColumn({ width, controller, channel, activity, attentio
|
|
|
54
55
|
// oxlint-disable-next-line typescript/no-unnecessary-condition -- runtime guard: partial fixture channels
|
|
55
56
|
const trajectoryUnsupported = controller.activePanelId === 'trajectory' && channel.trajectorySource?.() === 'unsupported';
|
|
56
57
|
const canExpand = activeEntry?.definition.capabilities?.fullscreen === true && onExpand !== undefined && !trajectoryUnsupported;
|
|
58
|
+
// 底栏拼序 = 重要性:导航 → 面板自己绑的键 → 列控制。宿主不点名任何面板:
|
|
59
|
+
// 面板经 panelStore 广告自己此刻的键位(例如 btw 在编辑层只说「↑ 回标题」、
|
|
60
|
+
// 在列表层才说 s/c),没广告过的才退回能力位那一段。窄面板从尾部截断,所以
|
|
61
|
+
// 面板键排在列控制前;未聚焦时面板收不到按键,那一格继续只说怎么把焦点拿过来。
|
|
62
|
+
const panelSegment = activeEntry === undefined
|
|
63
|
+
? ''
|
|
64
|
+
: activeEntry.hint !== undefined
|
|
65
|
+
? activeEntry.hint
|
|
66
|
+
: activeEntry.definition.capabilities?.sendToChat === true ? t('panel-hint-send-to-chat') : '';
|
|
67
|
+
const focusedHint = t('panel-hint-focused')
|
|
68
|
+
+ (panelSegment === '' ? '' : ' · ' + panelSegment)
|
|
69
|
+
+ ' · ' + t('panel-hint-zoom-width');
|
|
57
70
|
// 标签点击与 ←/→ 宿主键走同一条路(openPanel 会顺带把焦点给右栏)。
|
|
58
71
|
const onSelectPanel = React.useCallback((id) => { controller.openPanel(id, { focus: true }); },
|
|
59
72
|
// openPanel 在 useSidePanel 里是空依赖 useCallback(引用稳定);
|
|
@@ -63,5 +76,5 @@ export function SidePanelColumn({ width, controller, channel, activity, attentio
|
|
|
63
76
|
const hostHeight = Math.max(1, rows - 4);
|
|
64
77
|
return (_jsxs(Box, { flexDirection: "column", width: width, flexGrow: 1, children: [_jsx(PanelBar, { tabs: tabs, activeId: controller.activePanelId, width: width - 2, focused: focused, canExpand: canExpand, onExpand: canExpand ? () => onExpand?.(controller.activePanelId ?? '') : undefined, onSelect: onSelectPanel }), _jsx(Rule, { focused: focused }), _jsx(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children: anyRegistered
|
|
65
78
|
? (_jsx(PanelHost, { controller: controller, channel: channel, width: width, height: hostHeight, activity: activity, attention: attention, trajectory: trajectory, openFullscreen: onExpand }))
|
|
66
|
-
: _jsx(EmptyNone, {}) }), _jsx(Rule, { focused: focused }), _jsx(Box, { height: 1, flexShrink: 0, paddingX: 1, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: focused ?
|
|
79
|
+
: _jsx(EmptyNone, {}) }), _jsx(Rule, { focused: focused }), _jsx(Box, { height: 1, flexShrink: 0, paddingX: 1, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: focused ? focusedHint : t('panel-hint-unfocused') }) })] }));
|
|
67
80
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SidePanelLayout: owns the two-column row — chat surface left, divider,
|
|
3
|
-
* side-panel surface right (design doc §4.1).
|
|
4
|
-
* state
|
|
5
|
-
*
|
|
3
|
+
* side-panel surface right (design doc §4.1). useSidePanel owns the width
|
|
4
|
+
* state; this component arranges boxes, re-provides contexts, and forwards
|
|
5
|
+
* divider drags as chat-column widths in cells.
|
|
6
6
|
*
|
|
7
7
|
* What each column subtree gets (the PageMargin trick, one level down):
|
|
8
8
|
* - TerminalSizeContext narrowed to the column width, so every existing
|
|
@@ -48,7 +48,9 @@ export interface SidePanelLayoutProps {
|
|
|
48
48
|
readonly side: React.ReactNode;
|
|
49
49
|
readonly onActivateChat?: () => void;
|
|
50
50
|
readonly onActivatePanel?: () => void;
|
|
51
|
+
/** Resize the chat column in cells; the controller clamps both columns. */
|
|
52
|
+
readonly onResize?: (chatColumns: number) => void;
|
|
51
53
|
readonly children: React.ReactNode;
|
|
52
54
|
}
|
|
53
|
-
export declare function SidePanelLayout({ geometry, focus, side, onActivateChat, onActivatePanel, children, }: SidePanelLayoutProps): React.ReactNode;
|
|
55
|
+
export declare function SidePanelLayout({ geometry, focus, side, onActivateChat, onActivatePanel, onResize, children, }: SidePanelLayoutProps): React.ReactNode;
|
|
54
56
|
//# sourceMappingURL=SidePanelLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SidePanelLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IACxC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CACnC;AAqED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,cAAc,EACd,eAAe,EACf,QAAQ,EACR,QAAQ,GACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CA2ExC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* SidePanelLayout: owns the two-column row — chat surface left, divider,
|
|
4
|
-
* side-panel surface right (design doc §4.1).
|
|
5
|
-
* state
|
|
6
|
-
*
|
|
4
|
+
* side-panel surface right (design doc §4.1). useSidePanel owns the width
|
|
5
|
+
* state; this component arranges boxes, re-provides contexts, and forwards
|
|
6
|
+
* divider drags as chat-column widths in cells.
|
|
7
7
|
*
|
|
8
8
|
* What each column subtree gets (the PageMargin trick, one level down):
|
|
9
9
|
* - TerminalSizeContext narrowed to the column width, so every existing
|
|
@@ -50,15 +50,41 @@ import { SurfaceEdgesContext, useSurfaceEdges } from '../SurfaceEdges.js';
|
|
|
50
50
|
* with a rule draw '├', everything else '│' — the seam and the rules read
|
|
51
51
|
* as one framed surface instead of two crossing lines.
|
|
52
52
|
*/
|
|
53
|
-
function DividerColumn({ focused, rows, junctionRows, }) {
|
|
53
|
+
function DividerColumn({ focused, rows, junctionRows, chatColumns, onResize, }) {
|
|
54
|
+
const [hovered, setHovered] = React.useState(false);
|
|
55
|
+
const [dragging, setDragging] = React.useState(false);
|
|
56
|
+
const startChatColumns = React.useRef(null);
|
|
57
|
+
const resizeHandler = React.useRef(onResize);
|
|
58
|
+
// Ink keeps the captured node after removal. Withdraw its callback on
|
|
59
|
+
// unmount so a scene switch cannot resize the hidden sidebar.
|
|
60
|
+
React.useLayoutEffect(() => {
|
|
61
|
+
resizeHandler.current = onResize;
|
|
62
|
+
return () => { resizeHandler.current = undefined; };
|
|
63
|
+
}, [onResize]);
|
|
64
|
+
const resize = (event) => {
|
|
65
|
+
event.stopImmediatePropagation();
|
|
66
|
+
if (startChatColumns.current !== null) {
|
|
67
|
+
resizeHandler.current?.(startChatColumns.current + event.col - event.startCol);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
54
70
|
const junctions = new Set(junctionRows);
|
|
55
71
|
const glyphs = [];
|
|
56
72
|
for (let y = 0; y < Math.max(1, rows); y += 1) {
|
|
57
73
|
glyphs.push(junctions.has(y) ? '├' : '│');
|
|
58
74
|
}
|
|
59
|
-
return (_jsx(Box, { width: 1, flexShrink: 0, overflow: "hidden",
|
|
75
|
+
return (_jsx(Box, { width: 1, flexShrink: 0, overflow: "hidden", noSelect: true, onMouseEnter: onResize === undefined ? undefined : () => setHovered(true), onMouseLeave: onResize === undefined ? undefined : () => setHovered(false), onDragStart: onResize === undefined ? undefined : event => {
|
|
76
|
+
// Keep the press geometry for the entire captured gesture: the
|
|
77
|
+
// divider moves on every frame and localCol moves with it.
|
|
78
|
+
startChatColumns.current = chatColumns;
|
|
79
|
+
setDragging(true);
|
|
80
|
+
resize(event);
|
|
81
|
+
}, onDragMove: onResize === undefined ? undefined : resize, onDragEnd: onResize === undefined ? undefined : event => {
|
|
82
|
+
resize(event);
|
|
83
|
+
startChatColumns.current = null;
|
|
84
|
+
setDragging(false);
|
|
85
|
+
}, children: _jsx(Text, { color: focused || hovered || dragging ? 'accent' : 'inactive', children: glyphs.join('\n') }) }));
|
|
60
86
|
}
|
|
61
|
-
export function SidePanelLayout({ geometry, focus, side, onActivateChat, onActivatePanel, children, }) {
|
|
87
|
+
export function SidePanelLayout({ geometry, focus, side, onActivateChat, onActivatePanel, onResize, children, }) {
|
|
62
88
|
const outerEdges = useSurfaceEdges();
|
|
63
89
|
const parentSize = useTerminalSize();
|
|
64
90
|
const rows = parentSize.rows;
|
|
@@ -73,7 +99,7 @@ export function SidePanelLayout({ geometry, focus, side, onActivateChat, onActiv
|
|
|
73
99
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- geometry identity changes with the split
|
|
74
100
|
[parentSize, geometry, rows, screenRows]);
|
|
75
101
|
const panelSize = React.useMemo(() => ({ columns: panelColumns, rows, screenRows }), [panelColumns, rows, screenRows]);
|
|
76
|
-
return (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: split ? 'hidden' : undefined, children: [_jsx(SurfaceEdgesContext.Provider, { value: split ? chatEdges : outerEdges, children: _jsx(TerminalSizeContext.Provider, { value: chatSize, children: _jsx(Box, { flexDirection: "column", flexGrow: split ? 0 : 1, width: geometry === null ? undefined : geometry.chat, flexShrink: 0, overflow: split ? 'hidden' : undefined, onClick: split ? onActivateChat : undefined, children: children }) }) }), split && (_jsxs(_Fragment, { children: [_jsx(DividerColumn, { focused: focus === 'panel', rows: rows, junctionRows: [1, Math.max(1, rows - 2)] }), _jsx(SurfaceEdgesContext.Provider, { value: panelEdges, children: _jsx(TerminalSizeContext.Provider, { value: panelSize, children: _jsx(Box, { flexDirection: "column", width: panelColumns, flexShrink: 0, overflow: "hidden", onClick: onActivatePanel,
|
|
102
|
+
return (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: split ? 'hidden' : undefined, children: [_jsx(SurfaceEdgesContext.Provider, { value: split ? chatEdges : outerEdges, children: _jsx(TerminalSizeContext.Provider, { value: chatSize, children: _jsx(Box, { flexDirection: "column", flexGrow: split ? 0 : 1, width: geometry === null ? undefined : geometry.chat, flexShrink: 0, overflow: split ? 'hidden' : undefined, onClick: split ? onActivateChat : undefined, children: children }) }) }), split && (_jsxs(_Fragment, { children: [_jsx(DividerColumn, { focused: focus === 'panel', rows: rows, junctionRows: [1, Math.max(1, rows - 2)], chatColumns: geometry.chat, onResize: onResize }), _jsx(SurfaceEdgesContext.Provider, { value: panelEdges, children: _jsx(TerminalSizeContext.Provider, { value: panelSize, children: _jsx(Box, { flexDirection: "column", width: panelColumns, flexShrink: 0, overflow: "hidden", onClick: onActivatePanel,
|
|
77
103
|
/* The right column is fenced out of the fullscreen linear text
|
|
78
104
|
selection: a drag across chat rows must not capture panel
|
|
79
105
|
glyphs (design doc §4.6). Panels carry their own copy action. */
|
|
@@ -30,6 +30,11 @@ export interface SidePanelRuntimeContextValue {
|
|
|
30
30
|
* 未接(或该 Panel 没有整屏形态)时 undefined,按钮照画但点击无效——
|
|
31
31
|
* 宿主是否可展开由 PanelDefinition.capabilities.fullscreen 决定。 */
|
|
32
32
|
readonly openFullscreen?: (panelId: string) => void;
|
|
33
|
+
/** 「回主输入框」出口:Panel 把内容送聊天(attachContext)后把列焦点交回
|
|
34
|
+
* 聊天——chip 就在眼前、可直接接着打字,toast 里的「Esc 可撤」也立刻
|
|
35
|
+
* 成立(剥 chip 的那把 Esc 只有主输入框有焦点时才收得到)。宿主
|
|
36
|
+
* (PanelHost)从 controller.focusChat 注入;未接时送完焦点不动。 */
|
|
37
|
+
readonly focusChat?: () => void;
|
|
33
38
|
}
|
|
34
39
|
export declare const SidePanelRuntimeContext: React.Context<SidePanelRuntimeContextValue | null>;
|
|
35
40
|
export declare function useSidePanelChannel(): ChannelUi;
|
|
@@ -37,6 +42,8 @@ export declare function useSidePanelChannel(): ChannelUi;
|
|
|
37
42
|
export declare function useSidePanelTrajectory(): TrajBuild | undefined;
|
|
38
43
|
/** 「全屏」出口:宿主没接时返回 undefined(按钮点击静默无效)。 */
|
|
39
44
|
export declare function useSidePanelFullscreen(): ((panelId: string) => void) | undefined;
|
|
45
|
+
/** 「回主输入框」出口:宿主没接时返回 undefined(送聊天后焦点不动)。 */
|
|
46
|
+
export declare function useSidePanelFocusChat(): (() => void) | undefined;
|
|
40
47
|
export declare const PanelContext: React.Context<{
|
|
41
48
|
readonly panelId: string;
|
|
42
49
|
} | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanelRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelRuntimeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B;sDACkD;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;IAChC,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/E;6CACyC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;IAC/B;;+DAE2D;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"SidePanelRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/SidePanelRuntimeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B;sDACkD;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;IAChC,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/E;6CACyC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;IAC/B;;+DAE2D;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD;;;0DAGsD;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAED,eAAO,MAAM,uBAAuB,oDAAiE,CAAA;AAErG,wBAAgB,mBAAmB,IAAI,SAAS,CAI/C;AAED,sDAAsD;AACtD,wBAAgB,sBAAsB,IAAI,SAAS,GAAG,SAAS,CAE9D;AAED,0CAA0C;AAC1C,wBAAgB,sBAAsB,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAEhF;AAED,6CAA6C;AAC7C,wBAAgB,qBAAqB,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAEhE;AAED,eAAO,MAAM,YAAY;sBAA2C,MAAM;SAAgB,CAAA"}
|
|
@@ -23,4 +23,8 @@ export function useSidePanelTrajectory() {
|
|
|
23
23
|
export function useSidePanelFullscreen() {
|
|
24
24
|
return React.useContext(SidePanelRuntimeContext)?.openFullscreen;
|
|
25
25
|
}
|
|
26
|
+
/** 「回主输入框」出口:宿主没接时返回 undefined(送聊天后焦点不动)。 */
|
|
27
|
+
export function useSidePanelFocusChat() {
|
|
28
|
+
return React.useContext(SidePanelRuntimeContext)?.focusChat;
|
|
29
|
+
}
|
|
26
30
|
export const PanelContext = React.createContext(null);
|
|
@@ -32,11 +32,14 @@ type BtwKeyFlags = SidePanelKeyFlags & {
|
|
|
32
32
|
/**
|
|
33
33
|
* 单行 composer 的键语义。返回 null = 未消费(面板形态交宿主回退键,
|
|
34
34
|
* 全屏形态交场景其余分支);返回对象按 exitFocus > submit > 编辑 写回。
|
|
35
|
+
* ←/→ 先移光标,贴到行首/行尾后返回未消费——面板形态据此切面板。
|
|
36
|
+
* ↑ 让位给列表(选中轮,见 BtwPanelAdapter 的选中态);↓ 在单行框里没有
|
|
37
|
+
* 语义,吃掉即可,免得漏给主聊天去滚 transcript。
|
|
35
38
|
*/
|
|
36
39
|
export declare function btwComposerKey(state: BtwComposerState, input: string, key: BtwKeyFlags): BtwComposerKeyResult | null;
|
|
37
|
-
export declare function BtwComposer({ state, focused, busy, notice, }: {
|
|
40
|
+
export declare function BtwComposer({ state, focused, busy, notice, onActivate, }: {
|
|
38
41
|
readonly state: BtwComposerState;
|
|
39
|
-
/**
|
|
42
|
+
/** 编辑焦点(决定边框高亮与原生光标显示)。 */
|
|
40
43
|
readonly focused: boolean;
|
|
41
44
|
/** 线程在途:Enter 不发送,提示稍候。 */
|
|
42
45
|
readonly busy: boolean;
|
|
@@ -45,6 +48,8 @@ export declare function BtwComposer({ state, focused, busy, notice, }: {
|
|
|
45
48
|
readonly text: string;
|
|
46
49
|
readonly failure: boolean;
|
|
47
50
|
} | undefined;
|
|
51
|
+
/** 点击输入框进入编辑(默认箭头归导航,点进来才编辑)。 */
|
|
52
|
+
readonly onActivate?: () => void;
|
|
48
53
|
}): React.ReactNode;
|
|
49
54
|
export {};
|
|
50
55
|
//# sourceMappingURL=BtwComposer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtwComposer.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwComposer.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAGpD,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,qDAAqD;AACrD,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"BtwComposer.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwComposer.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAGpD,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,qDAAqD;AACrD,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,oBAAoB,GAAG,IAAI,CAsCpH;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,IAAI,EACJ,MAAM,EACN,UAAU,GACX,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,2BAA2B;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAA;IAClF,iCAAiC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CA6ClB"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import { Box, Text } from '../../../ui.js';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, InputCaret } from '../../../ui.js';
|
|
3
3
|
import { t } from '../../../i18n.js';
|
|
4
4
|
import { nextCodePoint, previousCodePoint } from '../../AgentMessageComposer.js';
|
|
5
5
|
/**
|
|
6
6
|
* 单行 composer 的键语义。返回 null = 未消费(面板形态交宿主回退键,
|
|
7
7
|
* 全屏形态交场景其余分支);返回对象按 exitFocus > submit > 编辑 写回。
|
|
8
|
+
* ←/→ 先移光标,贴到行首/行尾后返回未消费——面板形态据此切面板。
|
|
9
|
+
* ↑ 让位给列表(选中轮,见 BtwPanelAdapter 的选中态);↓ 在单行框里没有
|
|
10
|
+
* 语义,吃掉即可,免得漏给主聊天去滚 transcript。
|
|
8
11
|
*/
|
|
9
12
|
export function btwComposerKey(state, input, key) {
|
|
10
13
|
if (key.escape === true)
|
|
@@ -19,16 +22,32 @@ export function btwComposerKey(state, input, key) {
|
|
|
19
22
|
// Tab 离开编辑层去列表(与 TrajectoryPanel 同款双形态判定)。
|
|
20
23
|
if (key.tab === true || input === '\t')
|
|
21
24
|
return { exitFocus: true };
|
|
25
|
+
// ↑ 也从编辑层上到列表:光标落在本轮标题上(列表形态默认选中最后一条)。
|
|
26
|
+
if (key.upArrow === true)
|
|
27
|
+
return { exitFocus: true };
|
|
28
|
+
if (key.downArrow === true)
|
|
29
|
+
return {};
|
|
22
30
|
if (key.backspace === true || key.delete === true) {
|
|
23
31
|
if (caret <= 0)
|
|
24
32
|
return { state: { ...state, caret } };
|
|
25
33
|
const at = previousCodePoint(state.text, caret);
|
|
26
34
|
return { state: { text: state.text.slice(0, at) + state.text.slice(caret), caret: at } };
|
|
27
35
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (key.rightArrow === true)
|
|
31
|
-
return
|
|
36
|
+
// Shift+←/→ 不归编辑层:返回未消费,面板形态下落宿主切面板(宿主的
|
|
37
|
+
// leftArrow 判定不看 shift)——编辑中途也能一键换面板,不必先 Esc 收起。
|
|
38
|
+
if ((key.leftArrow === true || key.rightArrow === true) && key.shift === true)
|
|
39
|
+
return null;
|
|
40
|
+
// 光标先走、到头让位:还能移就移一格,已经贴着行首/行尾则返回未消费——
|
|
41
|
+
// 面板形态下落宿主切面板,底栏「←/→ 切换」因此在编辑层同样成立;场景
|
|
42
|
+
// 形态下无人接管,等于空操作。
|
|
43
|
+
if (key.leftArrow === true) {
|
|
44
|
+
const previous = previousCodePoint(state.text, caret);
|
|
45
|
+
return previous === caret ? null : { state: { ...state, caret: previous } };
|
|
46
|
+
}
|
|
47
|
+
if (key.rightArrow === true) {
|
|
48
|
+
const next = nextCodePoint(state.text, caret);
|
|
49
|
+
return next === caret ? null : { state: { ...state, caret: next } };
|
|
50
|
+
}
|
|
32
51
|
if (key.home === true)
|
|
33
52
|
return { state: { ...state, caret: 0 } };
|
|
34
53
|
if (key.end === true)
|
|
@@ -38,8 +57,9 @@ export function btwComposerKey(state, input, key) {
|
|
|
38
57
|
}
|
|
39
58
|
return null;
|
|
40
59
|
}
|
|
41
|
-
export function BtwComposer({ state, focused, busy, notice, }) {
|
|
60
|
+
export function BtwComposer({ state, focused, busy, notice, onActivate, }) {
|
|
42
61
|
const { text, caret } = state;
|
|
43
62
|
const shown = Math.min(caret, text.length);
|
|
44
|
-
|
|
63
|
+
const afterCaret = nextCodePoint(text, shown);
|
|
64
|
+
return (_jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(Box, { width: "100%", flexShrink: 0, borderStyle: "round", borderColor: focused ? 'accent' : undefined, onClick: onActivate === undefined ? undefined : () => onActivate(), children: _jsxs(Box, { flexDirection: "row", flexShrink: 0, paddingLeft: 1, paddingRight: 1, children: [_jsx(Text, { color: focused ? 'accent' : undefined, bold: true, children: '›' }), _jsx(Text, { children: ' ' }), focused ? (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "row", flexShrink: 1, minWidth: 0, children: [_jsx(Text, { wrap: "truncate", children: text.slice(0, shown) }), _jsx(InputCaret, { children: text.slice(shown, afterCaret) || ' ' }), text.slice(afterCaret) !== '' ? _jsx(Text, { wrap: "truncate", children: text.slice(afterCaret) }) : null] }), _jsx(Box, { flexGrow: 1, flexShrink: 0, children: _jsx(Text, { children: " " }) }), _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { dimColor: true, children: [" ", t('btw-input-hint-edit')] }) })] })) : (_jsx(Text, { dimColor: true, wrap: "truncate", children: text === '' ? t('btw-input-placeholder') : text }))] }) }), notice !== undefined && (_jsx(Text, { color: notice.failure ? 'error' : undefined, wrap: "truncate", children: notice.text }))] }));
|
|
45
65
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* btw 侧栏面板:线程滚动 + Markdown + 底部 composer 连续追问。Esc 先退出
|
|
3
3
|
* composer 编辑(草稿保留),列表层不消费 Esc,再交宿主回聊天;Tab 在列表
|
|
4
|
-
* 与 composer 间切焦点;未消费的键交宿主(←/→
|
|
4
|
+
* 与 composer 间切焦点;未消费的键交宿主(←/→ 切面板——编辑层里光标贴到
|
|
5
|
+
* 行首/行尾后也让位)。
|
|
5
6
|
*
|
|
6
7
|
* badge 派生(镜像 jobs/agents 适配器):面板不可见期间完成的新 answer
|
|
7
8
|
* 增 info unread、失败 error level 计未读、运行中只亮点不计未读;进入
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtwPanelAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwPanelAdapter.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BtwPanelAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwPanelAdapter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,aAAa,CAAA;AAY9D,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,SAAS,CAiRhG"}
|
|
@@ -2,7 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/**
|
|
3
3
|
* btw 侧栏面板:线程滚动 + Markdown + 底部 composer 连续追问。Esc 先退出
|
|
4
4
|
* composer 编辑(草稿保留),列表层不消费 Esc,再交宿主回聊天;Tab 在列表
|
|
5
|
-
* 与 composer 间切焦点;未消费的键交宿主(←/→
|
|
5
|
+
* 与 composer 间切焦点;未消费的键交宿主(←/→ 切面板——编辑层里光标贴到
|
|
6
|
+
* 行首/行尾后也让位)。
|
|
6
7
|
*
|
|
7
8
|
* badge 派生(镜像 jobs/agents 适配器):面板不可见期间完成的新 answer
|
|
8
9
|
* 增 info unread、失败 error level 计未读、运行中只亮点不计未读;进入
|
|
@@ -12,12 +13,13 @@ import React from 'react';
|
|
|
12
13
|
import { Box, Text } from '../../../ui.js';
|
|
13
14
|
import { t } from '../../../i18n.js';
|
|
14
15
|
import { panelStore } from '../PanelStore.js';
|
|
15
|
-
import { useSidePanelChannel } from '../SidePanelRuntimeContext.js';
|
|
16
|
+
import { useSidePanelChannel, useSidePanelFocusChat } from '../SidePanelRuntimeContext.js';
|
|
16
17
|
import { usePanelInput } from '../usePanelInput.js';
|
|
17
18
|
import { truncateWidth } from '../../../trajectory/format.js';
|
|
18
19
|
import { stringWidth } from '../../../ink/stringWidth.js';
|
|
20
|
+
import { setClipboard } from '../../../ink/termio/osc.js';
|
|
19
21
|
import { btwThreads } from './threads.js';
|
|
20
|
-
import { getBtwContextBudget, getBtwContextTurns
|
|
22
|
+
import { getBtwContextBudget, getBtwContextTurns } from '../../../tuiDisplayPrefs.js';
|
|
21
23
|
import { BtwComposer, btwComposerKey } from './BtwComposer.js';
|
|
22
24
|
import { BtwThreadView } from './BtwThreadView.js';
|
|
23
25
|
function useBtwThread(sessionId) {
|
|
@@ -29,11 +31,25 @@ function btwContextOptions() {
|
|
|
29
31
|
}
|
|
30
32
|
export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
31
33
|
const channel = useSidePanelChannel();
|
|
34
|
+
// 送聊天后把列焦点交回主输入框(宿主没接时 undefined = 焦点不动)。
|
|
35
|
+
const focusChat = useSidePanelFocusChat();
|
|
32
36
|
const sessionId = String(channel.agentId);
|
|
33
37
|
const thread = useBtwThread(sessionId);
|
|
34
38
|
const version = thread?.version ?? 0;
|
|
35
39
|
const busy = thread !== undefined && thread.activeTurnId !== null;
|
|
36
|
-
|
|
40
|
+
// 默认阅读层:箭头归导航(←/→ 切面板、↑/↓ 滚动);Enter/Tab/点击输入框
|
|
41
|
+
// 才进编辑层,箭头变光标——光标贴到行首/行尾后再按同一个键同样落回宿主
|
|
42
|
+
// 切面板(BtwComposer 的到头让位),所以底栏「←/→ 切换」在两层都成立;
|
|
43
|
+
// 聚焦状态另有边框高亮与框内提示兜底。
|
|
44
|
+
const [composerFocus, setComposerFocusState] = React.useState(false);
|
|
45
|
+
// 聚焦位也骑 ref:Enter 聚焦后紧接着的按键(两键之间没有重渲染)必须
|
|
46
|
+
// 已经看见编辑层——与 caret 同一款契约,否则第一个字符会被列表层吃掉。
|
|
47
|
+
const composerFocusRef = React.useRef(false);
|
|
48
|
+
const setComposerFocus = React.useCallback((next) => {
|
|
49
|
+
composerFocusRef.current = next;
|
|
50
|
+
setComposerFocusState(next);
|
|
51
|
+
}, []);
|
|
52
|
+
const activateComposer = React.useCallback(() => setComposerFocus(true), [setComposerFocus]);
|
|
37
53
|
// The caret rides a ref too: two keys arriving before a re-render must
|
|
38
54
|
// see each other's caret (the draft itself is read from the store).
|
|
39
55
|
const caretRef = React.useRef(0);
|
|
@@ -43,6 +59,8 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
43
59
|
setCaretState(next);
|
|
44
60
|
}, []);
|
|
45
61
|
const [notice, setNotice] = React.useState(null);
|
|
62
|
+
// 列表态的滚动句柄(阅读态:↑/↓/PgUp/PgDn 归线程,编辑态仍归输入框)。
|
|
63
|
+
const scrollRef = React.useRef(null);
|
|
46
64
|
// badge(镜像 jobs:version/visible 驱动;可见即已读)。
|
|
47
65
|
React.useEffect(() => {
|
|
48
66
|
const running = thread?.turns.some(turn => turn.phase === 'running') ?? false;
|
|
@@ -58,8 +76,10 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
58
76
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- badge derives from the thread snapshot version
|
|
59
77
|
}, [version, visible]);
|
|
60
78
|
const attachTurn = React.useCallback((turn) => {
|
|
79
|
+
if (turn.phase !== 'completed')
|
|
80
|
+
return false;
|
|
61
81
|
if (typeof channel.attachContext !== 'function')
|
|
62
|
-
return;
|
|
82
|
+
return false;
|
|
63
83
|
channel.attachContext({
|
|
64
84
|
source: 'panel',
|
|
65
85
|
sourceId: turn.turnId,
|
|
@@ -68,7 +88,29 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
68
88
|
});
|
|
69
89
|
const staged = channel.attachedContexts.find(entry => entry.sourceId === turn.turnId);
|
|
70
90
|
channel.notify(staged?.truncated === true ? t('btw-thread-answer-truncated') : t('btw-thread-answer-attached'), { color: 'success' });
|
|
91
|
+
return true;
|
|
92
|
+
}, [channel]);
|
|
93
|
+
/** 该轮是否已经挂在主输入框上(sourceId = turnId;部分夹具没有这个面)。 */
|
|
94
|
+
const attachedEntryOf = React.useCallback((turnId) => {
|
|
95
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- runtime guard: partial fixture channels
|
|
96
|
+
return (channel.attachedContexts ?? []).find(entry => entry.sourceId === turnId);
|
|
71
97
|
}, [channel]);
|
|
98
|
+
/**
|
|
99
|
+
* `s` = 送聊天,再按一次 = 撤回(选中行 → 动作)。送出去之后把列焦点交回主
|
|
100
|
+
* 输入框:chip 就在眼前、可直接接着打字,toast 里那句「Esc 可撤」也才成立
|
|
101
|
+
* (剥 chip 的 Esc 只有主输入框有焦点才收得到)。
|
|
102
|
+
*/
|
|
103
|
+
const sendToChat = React.useCallback((turn) => {
|
|
104
|
+
const staged = attachedEntryOf(turn.turnId);
|
|
105
|
+
if (staged !== undefined) {
|
|
106
|
+
if (typeof channel.detachContext === 'function')
|
|
107
|
+
channel.detachContext(staged.id);
|
|
108
|
+
channel.notify(t('panel-context-detached'), { color: 'success' });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (attachTurn(turn))
|
|
112
|
+
focusChat?.();
|
|
113
|
+
}, [attachTurn, attachedEntryOf, channel, focusChat]);
|
|
72
114
|
const submitDraft = React.useCallback(() => {
|
|
73
115
|
const text = btwThreads.get(sessionId)?.draft ?? '';
|
|
74
116
|
if (text.trim() === '')
|
|
@@ -91,9 +133,45 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
91
133
|
setNotice(null);
|
|
92
134
|
channel.notify(t('btw-thread-clear'), { timeoutMs: 2500 });
|
|
93
135
|
}, [sessionId, channel]);
|
|
136
|
+
const copyLatest = React.useCallback(() => {
|
|
137
|
+
const latest = [...(btwThreads.get(sessionId)?.turns ?? [])].reverse().find(turn => turn.phase === 'completed');
|
|
138
|
+
if (latest === undefined)
|
|
139
|
+
return;
|
|
140
|
+
void setClipboard(latest.answer);
|
|
141
|
+
channel.notify(t('copied-chars', { n: latest.answer.length }), { timeoutMs: 1500 });
|
|
142
|
+
}, [sessionId, channel]);
|
|
143
|
+
// ── 选中轮:列表形态(composer 不聚焦)的键盘归它 ─────────────────────
|
|
144
|
+
// 选中态存在线程 store 里(与 draft 同理:面板与全屏场景共用),快照给的
|
|
145
|
+
// selectedTurnId 已经解析过「跟最后一条」——null 只在空线程上出现。
|
|
146
|
+
const turns = thread?.turns ?? [];
|
|
147
|
+
const selectedId = thread?.selectedTurnId ?? null;
|
|
148
|
+
const selectedTurn = turns.find(turn => turn.turnId === selectedId);
|
|
149
|
+
/** ↑/↓ 移动选中(夹在两端;到底再按 ↓ 由调用方回输入框)。 */
|
|
150
|
+
const moveSelection = React.useCallback((delta) => {
|
|
151
|
+
btwThreads.moveSelection(sessionId, delta);
|
|
152
|
+
}, [sessionId]);
|
|
153
|
+
/** 点标题行:选中那一轮并离开编辑层(高亮只在列表态显示,见 listActive)。 */
|
|
154
|
+
const selectTurn = React.useCallback((turnId) => {
|
|
155
|
+
btwThreads.select(sessionId, turnId);
|
|
156
|
+
setComposerFocus(false);
|
|
157
|
+
}, [sessionId, setComposerFocus]);
|
|
158
|
+
/** 选中轮本身(读实时线程,不依赖渲染期快照)。 */
|
|
159
|
+
const selectedTurnNow = React.useCallback(() => {
|
|
160
|
+
return btwThreads.selectedTurn(sessionId);
|
|
161
|
+
}, [sessionId]);
|
|
162
|
+
/** `c` = 复制选中轮的答案(选中轮还没答案时退回「最后一条已完成」)。 */
|
|
163
|
+
const copySelected = React.useCallback(() => {
|
|
164
|
+
const turn = selectedTurnNow();
|
|
165
|
+
if (turn !== undefined && turn.answer !== '') {
|
|
166
|
+
void setClipboard(turn.answer);
|
|
167
|
+
channel.notify(t('copied-chars', { n: turn.answer.length }), { timeoutMs: 1500 });
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
copyLatest();
|
|
171
|
+
}, [selectedTurnNow, copyLatest, channel]);
|
|
94
172
|
// ── 键盘:composer 层 > 列表层 > 宿主(未消费的键返回 false)──────────
|
|
95
173
|
const onKey = React.useCallback((input, key) => {
|
|
96
|
-
if (
|
|
174
|
+
if (composerFocusRef.current) {
|
|
97
175
|
const text = btwThreads.get(sessionId)?.draft ?? '';
|
|
98
176
|
const result = btwComposerKey({ text, caret: caretRef.current }, input, key);
|
|
99
177
|
if (result === null)
|
|
@@ -114,7 +192,10 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
114
192
|
return true;
|
|
115
193
|
}
|
|
116
194
|
const tabKey = key.tab === true || input === '\t';
|
|
117
|
-
|
|
195
|
+
const enterKey = key.return_ === true || key.return === true || /^[\r\n]+$/u.test(input);
|
|
196
|
+
// Enter/Tab 都回编辑层:列表态不是死胡同,一键继续问(Enter 不进
|
|
197
|
+
// composer 的提交分支——那是聚焦后的下一次按键的事)。
|
|
198
|
+
if (tabKey || enterKey) {
|
|
118
199
|
setComposerFocus(true);
|
|
119
200
|
return true;
|
|
120
201
|
}
|
|
@@ -122,26 +203,80 @@ export function BtwPanelAdapter({ width, height, focused, visible }) {
|
|
|
122
203
|
newTopic();
|
|
123
204
|
return true;
|
|
124
205
|
}
|
|
206
|
+
// 选中轮 + s/c:与 jobs 面板同一套「选中行 → 动作」契约(s 再按一次撤回)。
|
|
125
207
|
if (input === 's' && key.ctrl !== true && key.meta !== true) {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
|
|
208
|
+
const turn = selectedTurnNow();
|
|
209
|
+
if (turn !== undefined)
|
|
210
|
+
sendToChat(turn);
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
if (input === 'c' && key.ctrl !== true && key.meta !== true) {
|
|
214
|
+
copySelected();
|
|
129
215
|
return true;
|
|
130
216
|
}
|
|
131
|
-
//
|
|
217
|
+
// 列表键盘:↑/↓ 只挪选中——滚动交给 BtwThreadView 的「最小揭示」:目标标题
|
|
218
|
+
// 已经在视口里就一动不动,出了视口才滚到恰好露出那一行。已经在最后一条时
|
|
219
|
+
// 再按 ↓ = 回输入框(与输入框里按 ↑ 上到标题互为往返)。
|
|
220
|
+
if (key.upArrow === true) {
|
|
221
|
+
moveSelection(-1);
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
if (key.downArrow === true) {
|
|
225
|
+
const list = btwThreads.get(sessionId)?.turns ?? [];
|
|
226
|
+
const current = btwThreads.selectedTurn(sessionId);
|
|
227
|
+
const at = current === undefined ? list.length - 1 : list.findIndex(turn => turn.turnId === current.turnId);
|
|
228
|
+
if (list.length === 0 || at === list.length - 1) {
|
|
229
|
+
setComposerFocus(true);
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
moveSelection(1);
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
// 翻页仍归滚动(列表里 ↑/↓ 已经改成移动选中了)。
|
|
236
|
+
if (key.pageUp === true) {
|
|
237
|
+
scrollRef.current?.scrollBy(-(height - 6));
|
|
238
|
+
return true;
|
|
239
|
+
}
|
|
240
|
+
if (key.pageDown === true) {
|
|
241
|
+
scrollRef.current?.scrollBy(height - 6);
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
// 其余不独占:返回 false 交宿主(Esc 回聊天、←/→ 切面板、1-9 跳面板)。
|
|
132
245
|
return false;
|
|
133
246
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
-
}, [
|
|
247
|
+
}, [sessionId, submitDraft, newTopic, sendToChat, copySelected, moveSelection, selectedTurnNow, height, setCaret]);
|
|
135
248
|
usePanelInput(onKey, { active: focused && visible });
|
|
136
|
-
// ──
|
|
137
|
-
|
|
249
|
+
// ── 头部(只有线程后才画):首问标题 + 状态徽 + 新话题,下压一条细线 ──
|
|
250
|
+
// 空线程不画头部:标题没有内容,`新话题` 在空线程上也无事可做(清空/换题的
|
|
251
|
+
// 语义只对已有线程成立)——面板标签栏已经给了这块版面的标题。
|
|
138
252
|
const newLabel = t('btw-thread-new');
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
const
|
|
253
|
+
const turnCount = thread?.turns.length ?? 0;
|
|
254
|
+
const title = turnCount > 0 ? thread.turns[0].question : '';
|
|
255
|
+
const chip = busy ? '● ' + t('btw-answering') : turnCount > 0 ? `Q${turnCount}` : '';
|
|
142
256
|
const budget = Math.max(6, width - 2);
|
|
143
|
-
const titleRoom = budget - stringWidth(newLabel) - stringWidth(
|
|
144
|
-
const header = (_jsxs(Box, { flexDirection: "
|
|
145
|
-
|
|
146
|
-
|
|
257
|
+
const titleRoom = budget - stringWidth(newLabel) - stringWidth(chip) - 4;
|
|
258
|
+
const header = turnCount === 0 ? null : (_jsxs(Box, { flexDirection: "column", width: "100%", flexShrink: 0, children: [_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, paddingLeft: 1, children: [_jsx(Text, { bold: true, wrap: "truncate", children: truncateWidth(title, Math.max(2, titleRoom)) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsx(Text, { children: " " }) }), chip !== '' && (_jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: busy ? 'warning' : undefined, dimColor: !busy, children: [chip, " "] }) })), _jsx(Box, { flexShrink: 0, onClick: event => { event.stopImmediatePropagation(); newTopic(); }, children: _jsxs(Text, { color: "permission", children: ["[n] ", newLabel] }) })] }), _jsx(Box, { width: "100%", height: 1, children: _jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(4, width - 2)) }) })] }));
|
|
259
|
+
// 选中高亮 + 光标声明只在列表态出现:光标在主输入框(列没聚焦)或侧栏输入框
|
|
260
|
+
// (composer 编辑层)时都不显示——用户要的是「列表拿着键盘」这个状态的指示,
|
|
261
|
+
// 不是常驻标记。
|
|
262
|
+
const listActive = focused && visible && !composerFocus;
|
|
263
|
+
// 底栏广告按层走(层内状态只有面板自己知道,所以由面板发、宿主只拼):
|
|
264
|
+
// - 列表层:有轮才说 s/c(已附加的那一轮同一个键是撤回);
|
|
265
|
+
// - 编辑层:s/c 在输入框里只是打字,只说「↑ 回标题」;
|
|
266
|
+
// - 空线程没有可选的轮,明确广告空串(连能力位那一段也不画,免得广告一个按
|
|
267
|
+
// 下去没反应的 s);
|
|
268
|
+
// - 光标在主输入框时面板根本收不到键,整段不画。
|
|
269
|
+
const selectedAttached = selectedTurn !== undefined && attachedEntryOf(selectedTurn.turnId) !== undefined;
|
|
270
|
+
const hintText = !focused || !visible
|
|
271
|
+
? ''
|
|
272
|
+
: composerFocus
|
|
273
|
+
? t('btw-hint-edit-back')
|
|
274
|
+
: turns.length === 0
|
|
275
|
+
? ''
|
|
276
|
+
: t(selectedAttached ? 'btw-list-hint-attached' : 'btw-list-hint');
|
|
277
|
+
React.useEffect(() => {
|
|
278
|
+
panelStore.setHint('btw', hintText);
|
|
279
|
+
return () => { panelStore.setHint('btw', ''); };
|
|
280
|
+
}, [hintText]);
|
|
281
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", height: height, overflow: "hidden", children: [header, _jsx(BtwThreadView, { thread: thread, width: width, height: Math.max(3, height - (header === null ? 4 : 6)), alive: visible, selectedTurnId: listActive ? selectedId ?? undefined : undefined, onSelectTurn: selectTurn, scrollHandleRef: scrollRef }), _jsx(BtwComposer, { state: { text: thread?.draft ?? '', caret }, focused: composerFocus && focused && visible, busy: busy, notice: notice === undefined || notice === null ? undefined : notice, onActivate: activateComposer })] }));
|
|
147
282
|
}
|