@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
|
@@ -11,6 +11,7 @@ import { SessionListRow } from '../components/sessions/SessionListRow.js';
|
|
|
11
11
|
import { SpinnerGlyph } from '../components/Spinner/SpinnerGlyph.js';
|
|
12
12
|
import { ApprovalPanel } from '../components/approvals/ApprovalPanel.js';
|
|
13
13
|
import { useTerminalFocus } from '../ink/hooks/use-terminal-focus.js';
|
|
14
|
+
import { useDeclaredCursor, useNativeCursor } from '../ink/hooks/use-declared-cursor.js';
|
|
14
15
|
import { useAnimationFrame } from '../ink/hooks/use-animation-frame.js';
|
|
15
16
|
import { isPlainReturn, isMod } from '../utils/modifiers.js';
|
|
16
17
|
import { truncateWidth } from '../sessions/format.js';
|
|
@@ -65,6 +66,25 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
65
66
|
const [tab, setTab] = useState(DSH_TAB);
|
|
66
67
|
/** The `+N` dropdown of folded tabs, anchored where it was clicked. */
|
|
67
68
|
const [tabMenu, setTabMenu] = useState(undefined);
|
|
69
|
+
// Like ModelPicker, the native caret follows the region last touched.
|
|
70
|
+
// The live filter keeps the rail/list's existing navigation and Enter target.
|
|
71
|
+
const [filterFocused, setFilterFocused] = useState(false);
|
|
72
|
+
const cursorActive = approval === null && menu === undefined && tabMenu === undefined
|
|
73
|
+
&& rename === undefined && confirmRemove === undefined && sessionRename === undefined && confirmDelete === undefined;
|
|
74
|
+
const searchCursor = filterFocused || (!railVisible && activePane === 'rail');
|
|
75
|
+
const nativeCursor = useNativeCursor();
|
|
76
|
+
const newSessionCursorRef = useDeclaredCursor({
|
|
77
|
+
line: 0, column: 0, active: tab === DSH_TAB && cursorActive && !searchCursor && cardFocused,
|
|
78
|
+
visible: nativeCursor, hideOnIdle: true,
|
|
79
|
+
});
|
|
80
|
+
const focusRail = () => {
|
|
81
|
+
setFilterFocused(false);
|
|
82
|
+
activateRail();
|
|
83
|
+
};
|
|
84
|
+
const focusList = () => {
|
|
85
|
+
setFilterFocused(false);
|
|
86
|
+
activateList();
|
|
87
|
+
};
|
|
68
88
|
const tabMenuRef = useRef(tabMenu);
|
|
69
89
|
tabMenuRef.current = tabMenu;
|
|
70
90
|
/** The session-rename draft as the keyboard sees it (see the input handler). */
|
|
@@ -102,6 +122,7 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
102
122
|
closeMenu();
|
|
103
123
|
closeTabMenu();
|
|
104
124
|
setQuery('');
|
|
125
|
+
setFilterFocused(false);
|
|
105
126
|
setNotice(undefined);
|
|
106
127
|
setTab(id);
|
|
107
128
|
}, [closeMenu, closeTabMenu, setQuery, setNotice]);
|
|
@@ -238,6 +259,7 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
238
259
|
return;
|
|
239
260
|
}
|
|
240
261
|
if (queryRef.current.length > 0) {
|
|
262
|
+
setFilterFocused(true);
|
|
241
263
|
setQuery('');
|
|
242
264
|
return;
|
|
243
265
|
}
|
|
@@ -251,6 +273,9 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
251
273
|
cycleTab(key.shift ? -1 : 1);
|
|
252
274
|
return;
|
|
253
275
|
}
|
|
276
|
+
if (key.leftArrow || key.rightArrow || key.upArrow || key.downArrow || key.wheelUp || key.wheelDown || key.pageUp || key.pageDown) {
|
|
277
|
+
setFilterFocused(false);
|
|
278
|
+
}
|
|
254
279
|
if (tab !== DSH_TAB) {
|
|
255
280
|
foreignKey(input, key);
|
|
256
281
|
return;
|
|
@@ -286,12 +311,10 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
286
311
|
moveRail(key.pageDown ? 1 : -1);
|
|
287
312
|
return;
|
|
288
313
|
}
|
|
289
|
-
//
|
|
290
|
-
//
|
|
291
|
-
// (a seat would have to relearn them). So printable input goes straight to
|
|
292
|
-
// the query — without this branch the box rendered, focused, and could never
|
|
293
|
-
// be typed into.
|
|
314
|
+
// Typing moves the native caret into the live filter; arrows and Enter
|
|
315
|
+
// still belong to the rail/list, so filtering adds no separate input mode.
|
|
294
316
|
if (key.backspace || key.delete) {
|
|
317
|
+
setFilterFocused(true);
|
|
295
318
|
setQuery(text => text.slice(0, -1));
|
|
296
319
|
return;
|
|
297
320
|
}
|
|
@@ -361,8 +384,10 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
361
384
|
// unknown key cannot type an invisible glyph into the query.
|
|
362
385
|
if (!isMod(key) && !key.meta && !key.super && input && !key.return) {
|
|
363
386
|
const typed = input.replace(/\p{Cc}/gu, '');
|
|
364
|
-
if (typed.length > 0)
|
|
387
|
+
if (typed.length > 0) {
|
|
388
|
+
setFilterFocused(true);
|
|
365
389
|
setQuery(text => text + typed);
|
|
390
|
+
}
|
|
366
391
|
}
|
|
367
392
|
});
|
|
368
393
|
// Working rows animate their glyph. The shared clock only runs while at
|
|
@@ -394,6 +419,7 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
394
419
|
return;
|
|
395
420
|
}
|
|
396
421
|
if (key.backspace || key.delete) {
|
|
422
|
+
setFilterFocused(true);
|
|
397
423
|
setQuery(text => text.slice(0, -1));
|
|
398
424
|
return;
|
|
399
425
|
}
|
|
@@ -413,8 +439,10 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
413
439
|
}
|
|
414
440
|
if (!key.meta && !key.super && input && !key.return) {
|
|
415
441
|
const typed = input.replace(/\p{Cc}/gu, '');
|
|
416
|
-
if (typed.length > 0)
|
|
442
|
+
if (typed.length > 0) {
|
|
443
|
+
setFilterFocused(true);
|
|
417
444
|
setQuery(text => text + typed);
|
|
445
|
+
}
|
|
418
446
|
}
|
|
419
447
|
}
|
|
420
448
|
// Header: title, subtitle, and the source strip on the right. Width runs
|
|
@@ -465,14 +493,16 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
465
493
|
const next = { col: event.col, row: event.row, item: 0 };
|
|
466
494
|
tabMenuRef.current = next;
|
|
467
495
|
setTabMenu(next);
|
|
468
|
-
} }) }))] }), _jsx(Divider, { bleed: true }), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab, home: home, now: now, query: query, notice: notice, railVisible: railVisible, railWidth: railWidth, railEntryCapacity: railEntryCapacity, sessionWidth: sessionWidth, rows: rows, isTerminalFocused: isTerminalFocused })), tab === DSH_TAB && (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: [railVisible && (_jsxs("ink-box", { style: { flexDirection: 'column', width: railWidth, height: '100%', flexShrink: 0, overflow: 'hidden' }, onClick:
|
|
496
|
+
} }) }))] }), _jsx(Divider, { bleed: true }), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab, home: home, now: now, query: query, notice: notice, railVisible: railVisible, railWidth: railWidth, railEntryCapacity: railEntryCapacity, sessionWidth: sessionWidth, rows: rows, isTerminalFocused: isTerminalFocused, filterFocused: filterFocused, cursorActive: cursorActive, onFilterFocus: setFilterFocused })), tab === DSH_TAB && (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: [railVisible && (_jsxs("ink-box", { style: { flexDirection: 'column', width: railWidth, height: '100%', flexShrink: 0, overflow: 'hidden' }, onClick: focusRail, onMouseEnter: focusRail, onWheel: (event) => {
|
|
497
|
+
setFilterFocused(false);
|
|
469
498
|
moveRail(event.deltaY >= 0 ? 1 : -1);
|
|
470
499
|
}, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", paddingX: 1, children: _jsx(Text, { dimColor: true, children: truncateWidth(railEntries.length === entries.length
|
|
471
500
|
? t('home-section-workspaces', { n: entries.length })
|
|
472
501
|
: t('supervisor-workspace-groups', { registered: entries.length, history: railEntries.length - entries.length }), railWidth - 2) }) }), !loading && railEntries.length === 0 && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: truncateWidth(t('home-no-workspaces'), railWidth - 2) }) })), visibleRailRows.map((entry) => {
|
|
473
502
|
const absolute = railEntries.indexOf(entry);
|
|
474
|
-
return (_jsx(HomeWorkspaceRow, { title: entry.title, path: entry.path, home: home, sessionCount: countOf(entry), historyOnly: entry.from === 'unregistered', present: entry.present, selected: selected !== undefined && selected.id === entry.id, focused: activePane === 'rail' && railFocus === absolute, width: railWidth, onSelect: (event) => {
|
|
503
|
+
return (_jsx(HomeWorkspaceRow, { title: entry.title, path: entry.path, home: home, sessionCount: countOf(entry), historyOnly: entry.from === 'unregistered', present: entry.present, selected: selected !== undefined && selected.id === entry.id, focused: activePane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
|
|
475
504
|
event.stopImmediatePropagation();
|
|
505
|
+
setFilterFocused(false);
|
|
476
506
|
railRef.current = absolute;
|
|
477
507
|
setRailFocus(absolute);
|
|
478
508
|
selectEntry(entry);
|
|
@@ -484,20 +514,31 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
484
514
|
menuRef.current = next;
|
|
485
515
|
setMenu(next);
|
|
486
516
|
} }, entry.id));
|
|
487
|
-
}), _jsx(Box, { flexGrow: 1 }), _jsx(Box, { flexShrink: 0, paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: railHint }) }) })] })), railVisible && (_jsx(Box, { width: 1, flexShrink: 0, flexDirection: "column", children: _jsx(Text, { dimColor: true, children: '│' }) })), _jsxs(Box, { flexDirection: "column", width: sessionWidth, height: "100%", flexShrink: 0, overflow: "hidden", onClick:
|
|
517
|
+
}), _jsx(Box, { flexGrow: 1 }), _jsx(Box, { flexShrink: 0, paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: railHint }) }) })] })), railVisible && (_jsx(Box, { width: 1, flexShrink: 0, flexDirection: "column", children: _jsx(Text, { dimColor: true, children: '│' }) })), _jsxs(Box, { flexDirection: "column", width: sessionWidth, height: "100%", flexShrink: 0, overflow: "hidden", onClick: focusList, onMouseEnter: focusList, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsxs(Box, { flexShrink: 1, overflow: "hidden", children: [_jsx(Text, { color: "remember", bold: true, children: truncateWidth(` ${t('home-sessions-title', { name: selected?.title ?? t('supervisor-title') })}`, Math.max(4, sessionWidth - 3)) }), _jsx(Text, { dimColor: true, children: ` ${truncateWidth(t('supervisor-counts', { working: workingCount, live: liveCount, total: visibleSessions.length }) + (refreshing ? ` · ${t('home-sessions-refreshing')}` : ''), Math.max(4, sessionWidth - 3))}` })] }) }), _jsx(Box, { height: 1, flexShrink: 0, paddingX: 1, onClick: event => {
|
|
518
|
+
event.stopImmediatePropagation();
|
|
519
|
+
activateList();
|
|
520
|
+
setFilterFocused(true);
|
|
521
|
+
}, onMouseEnter: event => {
|
|
522
|
+
event.stopImmediatePropagation();
|
|
523
|
+
if (activePane !== 'list')
|
|
524
|
+
activateList();
|
|
525
|
+
setFilterFocused(true);
|
|
526
|
+
}, children: _jsx(SearchBox, { query: query, isFocused: activePane === 'list' || searchCursor, declareCursor: cursorActive && searchCursor, isTerminalFocused: isTerminalFocused, placeholder: truncateWidth(t('supervisor-filter-placeholder'), Math.max(8, sessionWidth - 6)), prefix: "/", borderless: true, width: Math.max(8, sessionWidth - 2) }) }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, onMouseEnter: () => setFilterFocused(false), onClick: (event) => {
|
|
488
527
|
event.stopImmediatePropagation();
|
|
489
528
|
if (selected !== undefined)
|
|
490
529
|
newSessionIn(selected);
|
|
491
|
-
}, children: [_jsxs(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: [_jsx(Text, { color: cardFocused ? 'success' : 'subtle', children: cardFocused ? '❯ ' : ' ' }), _jsx(Text, { color: cardFocused ? 'success' : undefined, bold: cardFocused, children: t('supervisor-new-session') })] }), _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, children: ` ${truncateWidth(t('supervisor-new-session-hint', { name: selected?.title ?? t('supervisor-title') }), Math.max(8, sessionWidth - 3))}` }) })] }), _jsxs("ink-box", { style: { flexDirection: 'column', flexGrow: 1, flexShrink: 1, overflow: 'hidden' }, onWheel: (event) => {
|
|
530
|
+
}, children: [_jsxs(Box, { ref: newSessionCursorRef, height: 1, flexShrink: 0, overflow: "hidden", children: [_jsx(Text, { color: cardFocused ? 'success' : 'subtle', children: cardFocused ? '❯ ' : ' ' }), _jsx(Text, { color: cardFocused ? 'success' : undefined, bold: cardFocused, children: t('supervisor-new-session') })] }), _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, children: ` ${truncateWidth(t('supervisor-new-session-hint', { name: selected?.title ?? t('supervisor-title') }), Math.max(8, sessionWidth - 3))}` }) })] }), _jsxs("ink-box", { style: { flexDirection: 'column', flexGrow: 1, flexShrink: 1, overflow: 'hidden' }, onMouseEnter: () => setFilterFocused(false), onWheel: (event) => {
|
|
531
|
+
setFilterFocused(false);
|
|
492
532
|
moveSession(event.deltaY >= 0 ? 1 : -1);
|
|
493
533
|
}, children: [loading && _jsx(Text, { dimColor: true, italic: true, children: ` ${truncateWidth(t('home-sessions-loading'), sessionWidth - 2)}` }), !loading && visibleSessions.length === 0 && (_jsx(Text, { dimColor: true, italic: true, children: ` ${truncateWidth(filtered ? t('supervisor-no-matches') : t('home-no-sessions'), sessionWidth - 2)}` })), visibleSessionRows.map((session, index) => {
|
|
494
534
|
const state = liveStateOf(session.id);
|
|
495
535
|
const holder = holderOf(session.id);
|
|
496
|
-
return (_jsx(SessionListRow, { session: session, width: sessionWidth, depth: 0, focused: activePane === 'list' && sessionTop + index + 1 === sessionIndex, pinned: pins.has(session.id), now: now, liveStatus: state?.live === true ? state.status : undefined, current: state?.current === true, occupiedPid: holder, spinner: { frame: spinnerFrame, time: spinnerTime }, onClick: (event) => {
|
|
536
|
+
return (_jsx(SessionListRow, { session: session, width: sessionWidth, depth: 0, focused: activePane === 'list' && sessionTop + index + 1 === sessionIndex, declareCursor: cursorActive && !searchCursor, pinned: pins.has(session.id), now: now, liveStatus: state?.live === true ? state.status : undefined, current: state?.current === true, occupiedPid: holder, spinner: { frame: spinnerFrame, time: spinnerTime }, onClick: (event) => {
|
|
497
537
|
event.stopImmediatePropagation();
|
|
498
538
|
setFocusSessionId(session.id);
|
|
499
539
|
openSession(session);
|
|
500
540
|
}, onTogglePin: () => {
|
|
541
|
+
setFilterFocused(false);
|
|
501
542
|
setFocusSessionId(session.id);
|
|
502
543
|
persistPin(session.id, !pins.has(session.id));
|
|
503
544
|
}, onContextMenu: (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../src/screens/Settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAgZ3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../src/screens/Settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAgZ3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,CA+uBlB"}
|
|
@@ -234,6 +234,7 @@ export function Settings({ channel, onClose, }) {
|
|
|
234
234
|
formsRef.current = forms;
|
|
235
235
|
const refresh = () => {
|
|
236
236
|
setNamespaces(host?.listNamespaces() ?? []);
|
|
237
|
+
setSections(channel.settingsSections());
|
|
237
238
|
};
|
|
238
239
|
// Secret fields report only configured/unconfigured; resolve each ref once
|
|
239
240
|
// per section-list change (and after every save, which may have set one).
|
|
@@ -574,6 +575,12 @@ export function Settings({ channel, onClose, }) {
|
|
|
574
575
|
const badges = [];
|
|
575
576
|
if (view === undefined)
|
|
576
577
|
badges.push({ text: t('settings-section-unavailable'), color: 'warning' });
|
|
578
|
+
// A fault in the document itself: the broken-file badge names the backup
|
|
579
|
+
// the first save made, so the original settings stay findable.
|
|
580
|
+
if (view?.warning?.id === 'unreadable')
|
|
581
|
+
badges.push({ text: t('settings-badge-unreadable'), color: 'warning' });
|
|
582
|
+
if (view?.warning?.id === 'recovered')
|
|
583
|
+
badges.push({ text: t('settings-badge-recovered', { backup: view.warning.backup }), color: 'warning' });
|
|
577
584
|
if (view?.applies === 'restart')
|
|
578
585
|
badges.push({ text: t('settings-badge-restart'), color: 'warning' });
|
|
579
586
|
if (shell?.dirty === true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusLine.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAoC,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AASxG,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,kEAAkE;AAClE;wEACwE;AACxE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAKvG;
|
|
1
|
+
{"version":3,"file":"StatusLine.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAoC,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AASxG,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,kEAAkE;AAClE;wEACwE;AACxE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAKvG;AAyBD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AA4HvD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,eAAuB,EACvB,QAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EAAE,iBAAiB,GAC5B,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;+EAU2E;IAC3E,WAAW,CAAC,EAAE;QACZ,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAC5B,CAAA;IACD;;;;0EAIsE;IACtE,WAAW,CAAC,EAAE;QACZ,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAC5B,CAAA;IACD;;uEAEmE;IACnE,YAAY,CAAC,EAAE;QACb,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAC5B,CAAA;IACD;kFAC8E;IAC9E,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE;QACL,IAAI,EAAE,QAAQ,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,8DAA8D;QAC9D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,2DAA2D;QAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,qBA2fA;AAED,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AA2SD,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKvF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EACL;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACzD,SAAS,GACZ,MAAM,GAAG,SAAS,CAIpB"}
|
|
@@ -32,7 +32,7 @@ import { ContextBarView } from '../components/ContextBarView.js';
|
|
|
32
32
|
import { TooltipTarget } from '../components/Tooltip.js';
|
|
33
33
|
import { formatProject } from '../sessions/format.js';
|
|
34
34
|
import { homeDir } from '../utils/paths.js';
|
|
35
|
-
import { USED_SEGMENTS, channelContextOccupancy, contextBarBreakdown, contextBarSegmentColors, renderMiniContextBar, renderTpsGauge, renderTpsSparkline, speedColor, tpsStats, } from './StatusMetrics.js';
|
|
35
|
+
import { USED_SEGMENTS, channelContextOccupancy, attributeBarTokens, barSegments, contextBarBreakdown, contextBarSegmentColors, renderMiniContextBar, renderTpsGauge, renderTpsSparkline, speedColor, tpsStats, } from './StatusMetrics.js';
|
|
36
36
|
/**
|
|
37
37
|
* The footer under the prompt input: the segmented context progress bar on
|
|
38
38
|
* its own first line, the
|
|
@@ -251,7 +251,16 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
251
251
|
id: 'jobs',
|
|
252
252
|
node: (_jsxs(Text, { color: "toolDotTask", children: ['● ', liveJobs.length] })),
|
|
253
253
|
};
|
|
254
|
+
// The placeholder's backend is still opening: say so up front, so the
|
|
255
|
+
// frame drawn before DSH's synchronous load is not a silent one.
|
|
256
|
+
const startingPart = channel.ready === false && channel.startupFailure === undefined
|
|
257
|
+
? {
|
|
258
|
+
key: 'starting',
|
|
259
|
+
node: _jsx(Text, { color: "warning", children: t('status-starting', { backend: channel.backendCapabilities?.backendLabel ?? 'DSH' }) }),
|
|
260
|
+
}
|
|
261
|
+
: undefined;
|
|
254
262
|
const leftFields = [
|
|
263
|
+
...(startingPart !== undefined ? [startingPart] : []),
|
|
255
264
|
...(statusBar.model
|
|
256
265
|
? [{ key: 'model', id: 'model', ...(modelPicker === undefined ? {} : { onClick: modelPicker.onOpen }), node: _jsx(Text, { color: "inactiveShimmer", children: channel.modelDisplay ?? channel.model }) }]
|
|
257
266
|
: []),
|
|
@@ -378,8 +387,8 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
378
387
|
// (the v0.8.0 paddingX 2→1 tightening left the old `columns - 4` stale).
|
|
379
388
|
const barWidth = columns - 2;
|
|
380
389
|
// 空段的深色兜底:deepseek 档冷灰、claude 档暖墨(品牌档见 branding.ts)。
|
|
381
|
-
// 明暗问色板而不是比主题名:浅色主题不一定叫 `light
|
|
382
|
-
//
|
|
390
|
+
// 明暗问色板而不是比主题名:浅色主题不一定叫 `light`(pink-day、用户/插件
|
|
391
|
+
// 色板也可以是浅色),只有真彩/ANSI 的深色默认档才需要显式的 free 段色。
|
|
383
392
|
const barColors = isLightThemeActive(themeName)
|
|
384
393
|
? undefined
|
|
385
394
|
: getActiveBrand() === 'claude'
|
|
@@ -415,7 +424,7 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
415
424
|
showActivity ||
|
|
416
425
|
showTrajectory ||
|
|
417
426
|
hint !== '';
|
|
418
|
-
return (_jsx(Box, { paddingX: 1, width: columns, flexShrink: 0, children: _jsxs(Box, { flexDirection: "column", width: "100%", children: [barVisible ? (_jsx(ContextBarView, { segments: channel.contextSegments, usedTokens: contextUsed ?? 0, contextWindow: contextWindow ?? 0, width: barWidth, colors: barColors, onHover: hovered => setHover(current => hovered ? 'bar' : current === 'bar' ? null : current) })) : null, hasStatusFields ? statusBar.compact ? (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: compactFields, hoverProps: hoverProps }) }), ctxNode !== undefined ? (_jsx(Box, { flexShrink: 0, ...hoverProps('ctx'), children: _jsx(Text, { wrap: "truncate", children: ctxNode }) })) : null] })) : (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: fullLeftFields, hoverProps: hoverProps }) }), _jsx(Box, { justifyContent: "flex-end", flexShrink: 2, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: rightFields, hoverProps: hoverProps }) })] })) : null, showSupplementalRow ? _jsxs(Box, { height: 1, overflow: "hidden", flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { flexDirection: "row", flexGrow: 1, justifyContent: showActivity && trailer !== null ? 'space-between' : 'flex-start', gap: 2, children: [showActivity && activity !== undefined ? (_jsx(ActivityLine, { activity: activity, activityFrames: channel.activityFrames, warnPct: contextPressurePct(occupancy), warnDanger: (contextPressurePct(occupancy) ?? 0) >= 95 })) : trailer, showActivity ? trailer : null] }), showTrajectory && wake !== undefined ? (_jsx(MiniWake, { band: wake.band, hint: wake.hint, tick: wake.tick, onOpen: wake.onOpen, hoverHint: wake.hoverHint })) : null] }) : null] }) }));
|
|
427
|
+
return (_jsx(Box, { paddingX: 1, width: columns, flexShrink: 0, children: _jsxs(Box, { flexDirection: "column", width: "100%", children: [barVisible ? (_jsx(ContextBarView, { segments: channel.contextSegments, breakdown: channel.contextBreakdown, usedTokens: contextUsed ?? 0, contextWindow: contextWindow ?? 0, width: barWidth, colors: barColors, onHover: hovered => setHover(current => hovered ? 'bar' : current === 'bar' ? null : current) })) : null, hasStatusFields ? statusBar.compact ? (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: compactFields, hoverProps: hoverProps }) }), ctxNode !== undefined ? (_jsx(Box, { flexShrink: 0, ...hoverProps('ctx'), children: _jsx(Text, { wrap: "truncate", children: ctxNode }) })) : null] })) : (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: fullLeftFields, hoverProps: hoverProps }) }), _jsx(Box, { justifyContent: "flex-end", flexShrink: 2, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: rightFields, hoverProps: hoverProps }) })] })) : null, showSupplementalRow ? _jsxs(Box, { height: 1, overflow: "hidden", flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { flexDirection: "row", flexGrow: 1, justifyContent: showActivity && trailer !== null ? 'space-between' : 'flex-start', gap: 2, children: [showActivity && activity !== undefined ? (_jsx(ActivityLine, { activity: activity, activityFrames: channel.activityFrames, warnPct: contextPressurePct(occupancy), warnDanger: (contextPressurePct(occupancy) ?? 0) >= 95 })) : trailer, showActivity ? trailer : null] }), showTrajectory && wake !== undefined ? (_jsx(MiniWake, { band: wake.band, hint: wake.hint, tick: wake.tick, onOpen: wake.onOpen, hoverHint: wake.hoverHint })) : null] }) : null] }) }));
|
|
419
428
|
}
|
|
420
429
|
/**
|
|
421
430
|
* The supplemental-row readout for a hovered footer field. Technical label
|
|
@@ -446,8 +455,10 @@ function buildHoverDetail(hover, channel, occupancy, usage, columns, barColors,
|
|
|
446
455
|
if (window === undefined || window <= 0 || contextUsed === undefined)
|
|
447
456
|
return null;
|
|
448
457
|
// The bar's text-free design pays off here: this line is its legend, so
|
|
449
|
-
// every entry leads with a chip of the very color it names
|
|
450
|
-
|
|
458
|
+
// every entry leads with a chip of the very color it names, and the numbers
|
|
459
|
+
// are the shares the fills above were drawn from — attributed to the
|
|
460
|
+
// occupancy, so five entries plus `free` make up the window.
|
|
461
|
+
const { entries, separator } = contextBarBreakdown(attributeBarTokens(barSegments(channel.contextSegments, channel.contextBreakdown), contextUsed), contextUsed, window, columns, { used: usedColors, freeFill: barColors?.freeFill });
|
|
451
462
|
if (entries.length === 0)
|
|
452
463
|
return null;
|
|
453
464
|
return (_jsx(Text, { wrap: "truncate", children: entries.map((entry, index) => (_jsxs(React.Fragment, { children: [index > 0 ? dim(separator) : null, _jsx(Text, { backgroundColor: entry.color, children: " " }), entry.label] }, entry.key))) }));
|
|
@@ -460,7 +471,13 @@ function buildHoverDetail(hover, channel, occupancy, usage, columns, barColors,
|
|
|
460
471
|
// The hover payoff for the ctx ask: percent + counts + free, then the
|
|
461
472
|
// segment breakdown as the truncate-able tail (no bar — the row's
|
|
462
473
|
// in-place morph and the segment bar above already carry the gauge).
|
|
463
|
-
|
|
474
|
+
// Match the bar's attributed shares, including its measured-used
|
|
475
|
+
// fallback when no content category can be attributed.
|
|
476
|
+
const sizes = attributeBarTokens(barSegments(channel.contextSegments, channel.contextBreakdown), contextUsed);
|
|
477
|
+
const hasComposition = USED_SEGMENTS.some(segment => sizes[segment.key] > 0);
|
|
478
|
+
const segments = hasComposition
|
|
479
|
+
? USED_SEGMENTS.map(segment => `${segment.labels[1] ?? segment.key} ${formatTokens(sizes[segment.key])}`).join(' · ')
|
|
480
|
+
: `${t('context-bar-used')} ${formatTokens(contextUsed)}`;
|
|
464
481
|
return (_jsxs(Text, { wrap: "truncate", children: [((contextUsed / window) * 100).toFixed(1), "% \u00B7", ' ', formatTokens(contextUsed), "/", formatTokens(window), " \u00B7 ", dim('free '), formatTokens(free), ' · ', segments] }));
|
|
465
482
|
}
|
|
466
483
|
case 'mode': {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Color } from '../ink/styles.js';
|
|
11
11
|
import type { Theme } from '../theme.js';
|
|
12
|
-
import type { ContextOccupancy } from '../adapter/ports/channel-view.js';
|
|
12
|
+
import type { ContextBreakdown, ContextOccupancy } from '../adapter/ports/channel-view.js';
|
|
13
13
|
/**
|
|
14
14
|
* The occupancy reading a screen renders.
|
|
15
15
|
*
|
|
@@ -118,6 +118,51 @@ export declare function contextBarReadout(usedTokens: number, contextWindow: num
|
|
|
118
118
|
* JSX bar (ContextBarView) so both render identical readouts.
|
|
119
119
|
*/
|
|
120
120
|
export declare function rightAlignBarText(options: readonly string[], width: number): string;
|
|
121
|
+
/**
|
|
122
|
+
* The five fills' weights, in bar order — the composition the bar is drawn
|
|
123
|
+
* from: the meter's `contextBreakdown` joined with the estimates that stay
|
|
124
|
+
* useful for the part it does not break down.
|
|
125
|
+
*
|
|
126
|
+
* DSH's meter prices the composition it can see (`contextBreakdown`: the system
|
|
127
|
+
* prompt, the newest request ENVELOPE's tool schemas, and every other visible
|
|
128
|
+
* surface node, injected context included). This app's own `segments` estimates
|
|
129
|
+
* are what remains useful for the part the meter does not break down: the
|
|
130
|
+
* message side, where only the transcript distinguishes a human prompt from
|
|
131
|
+
* assistant text, reasoning and tool results. The join is therefore:
|
|
132
|
+
*
|
|
133
|
+
* - `system` ← the meter's `systemTokens`;
|
|
134
|
+
* - `tools` ← the meter's `toolsTokens` (the tool SCHEMAS, which no transcript
|
|
135
|
+
* estimate can see) plus this app's tool-RESULT estimate;
|
|
136
|
+
* - `prompt`/`assistant`/`thinking` ← the meter's `messageTokens` shared in the
|
|
137
|
+
* proportions the estimates report.
|
|
138
|
+
*
|
|
139
|
+
* One weight set feeds every reader of the composition: the bar's own column
|
|
140
|
+
* split (`contextBarColumns`, which the hoverable twin calls too) and the hover
|
|
141
|
+
* legend (`contextBarBreakdown`), so the numbers under the pointer describe the
|
|
142
|
+
* fills above them.
|
|
143
|
+
*
|
|
144
|
+
* Without a meter value this is the estimates alone — the pre-existing
|
|
145
|
+
* behavior — and the bar spans whatever the occupancy says regardless, since
|
|
146
|
+
* the weights only divide a span the occupancy already fixed.
|
|
147
|
+
* @param segments - Used tokens per content type (this app's estimates).
|
|
148
|
+
* @param breakdown - The meter's composition, when the harness publishes one.
|
|
149
|
+
* @returns One weight per used fill, in bar order.
|
|
150
|
+
*/
|
|
151
|
+
export declare function barSegments(segments: ContextSegments, breakdown: ContextBreakdown | undefined): ContextSegments;
|
|
152
|
+
/**
|
|
153
|
+
* Attribute the composition's weights to the one authoritative token total:
|
|
154
|
+
* largest remainders, integers that sum EXACTLY to it, so the hover legend's
|
|
155
|
+
* numbers add up to the reading beside them instead of reporting a second,
|
|
156
|
+
* unrelated total.
|
|
157
|
+
*
|
|
158
|
+
* All-zero weights — no composition known at all — attribute nothing: the bar
|
|
159
|
+
* paints its measured span as one `unclassified` block, so the legend names
|
|
160
|
+
* that block as measured `used` rather than inventing five equal slices.
|
|
161
|
+
* @param weights - The composition's weights, one per used fill.
|
|
162
|
+
* @param total - Tokens to attribute (the occupancy numerator).
|
|
163
|
+
* @returns Integer weights summing to `total` (all zero for a non-positive total).
|
|
164
|
+
*/
|
|
165
|
+
export declare function attributeBarTokens(weights: ContextSegments, total: number): ContextSegments;
|
|
121
166
|
/** One entry of the context bar's hover breakdown: the fill color, the name
|
|
122
167
|
* to put next to a swatch of it, and the token count already folded into
|
|
123
168
|
* `label` (`system 1.2k`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMetrics.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"StatusMetrics.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAM1F;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;IACzF,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3C,GAAG,gBAAgB,GAAG,SAAS,CAK/B;AAED;;;;;;;;;;;uCAWuC;AACvC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;EAMhB,CAAA;AA0CV;;kCAEkC;AAClC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAAG,KAAK,CAQ9E;AAED;;;;;yCAKyC;AACzC,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,KAAK,EAAE,CAEvE;AAED,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,GAAG,KAAK,CAGpE;AAED,mGAAmG;AACnG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAEnF;;sDAEsD;AACtD,eAAO,MAAM,iBAAiB,YAAY,CAAA;AAC1C,eAAO,MAAM,iBAAiB,YAAY,CAAA;AAiB1C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOlD;AAQD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAIhF;AAID;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,SAAS,MAAM,EAAE,CAGnB;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,MAAM,GACZ,MAAM,CAYR;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,gBAAgB,GAAG,SAAS,GACtC,eAAe,CAmBjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,CAS3F;AAED;;+BAE+B;AAC/B,MAAM,MAAM,wBAAwB,GAAG;IACrC,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb;uDACmD;IACnD,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,6EAA6E;AAC7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,wBAAwB,EAAE,CAAA;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GACrD,mBAAmB,CAoErB;AA6BD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBrF;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GACZ;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAYxD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC9C,MAAM,CAqBR;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,SAAK,GACT,MAAM,CAaR;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG5D;AAYD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAYhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAqB9E;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG;IACxF,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,CAUA"}
|
|
@@ -205,6 +205,78 @@ function renderFreeSegment(options, width, fill, style) {
|
|
|
205
205
|
return '';
|
|
206
206
|
return background(fill, style(rightAlignBarText(options, width)));
|
|
207
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* The five fills' weights, in bar order — the composition the bar is drawn
|
|
210
|
+
* from: the meter's `contextBreakdown` joined with the estimates that stay
|
|
211
|
+
* useful for the part it does not break down.
|
|
212
|
+
*
|
|
213
|
+
* DSH's meter prices the composition it can see (`contextBreakdown`: the system
|
|
214
|
+
* prompt, the newest request ENVELOPE's tool schemas, and every other visible
|
|
215
|
+
* surface node, injected context included). This app's own `segments` estimates
|
|
216
|
+
* are what remains useful for the part the meter does not break down: the
|
|
217
|
+
* message side, where only the transcript distinguishes a human prompt from
|
|
218
|
+
* assistant text, reasoning and tool results. The join is therefore:
|
|
219
|
+
*
|
|
220
|
+
* - `system` ← the meter's `systemTokens`;
|
|
221
|
+
* - `tools` ← the meter's `toolsTokens` (the tool SCHEMAS, which no transcript
|
|
222
|
+
* estimate can see) plus this app's tool-RESULT estimate;
|
|
223
|
+
* - `prompt`/`assistant`/`thinking` ← the meter's `messageTokens` shared in the
|
|
224
|
+
* proportions the estimates report.
|
|
225
|
+
*
|
|
226
|
+
* One weight set feeds every reader of the composition: the bar's own column
|
|
227
|
+
* split (`contextBarColumns`, which the hoverable twin calls too) and the hover
|
|
228
|
+
* legend (`contextBarBreakdown`), so the numbers under the pointer describe the
|
|
229
|
+
* fills above them.
|
|
230
|
+
*
|
|
231
|
+
* Without a meter value this is the estimates alone — the pre-existing
|
|
232
|
+
* behavior — and the bar spans whatever the occupancy says regardless, since
|
|
233
|
+
* the weights only divide a span the occupancy already fixed.
|
|
234
|
+
* @param segments - Used tokens per content type (this app's estimates).
|
|
235
|
+
* @param breakdown - The meter's composition, when the harness publishes one.
|
|
236
|
+
* @returns One weight per used fill, in bar order.
|
|
237
|
+
*/
|
|
238
|
+
export function barSegments(segments, breakdown) {
|
|
239
|
+
if (breakdown === undefined)
|
|
240
|
+
return segments;
|
|
241
|
+
const promptEst = Math.max(0, segments.prompt ?? 0);
|
|
242
|
+
const assistantEst = Math.max(0, segments.assistant ?? 0);
|
|
243
|
+
const thinkingEst = Math.max(0, segments.thinking ?? 0);
|
|
244
|
+
const toolsEst = Math.max(0, segments.tools ?? 0);
|
|
245
|
+
const estimatedMessages = promptEst + assistantEst + thinkingEst + toolsEst;
|
|
246
|
+
// No estimates to share it in (a partial channel literal, or the frame before
|
|
247
|
+
// a replay folds): the message side stays unattributed rather than invented.
|
|
248
|
+
const scale = estimatedMessages > 0
|
|
249
|
+
? Math.max(0, breakdown.messageTokens) / estimatedMessages
|
|
250
|
+
: 0;
|
|
251
|
+
return {
|
|
252
|
+
system: Math.max(0, breakdown.systemTokens),
|
|
253
|
+
prompt: promptEst * scale,
|
|
254
|
+
assistant: assistantEst * scale,
|
|
255
|
+
thinking: thinkingEst * scale,
|
|
256
|
+
tools: Math.max(0, breakdown.toolsTokens) + toolsEst * scale,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Attribute the composition's weights to the one authoritative token total:
|
|
261
|
+
* largest remainders, integers that sum EXACTLY to it, so the hover legend's
|
|
262
|
+
* numbers add up to the reading beside them instead of reporting a second,
|
|
263
|
+
* unrelated total.
|
|
264
|
+
*
|
|
265
|
+
* All-zero weights — no composition known at all — attribute nothing: the bar
|
|
266
|
+
* paints its measured span as one `unclassified` block, so the legend names
|
|
267
|
+
* that block as measured `used` rather than inventing five equal slices.
|
|
268
|
+
* @param weights - The composition's weights, one per used fill.
|
|
269
|
+
* @param total - Tokens to attribute (the occupancy numerator).
|
|
270
|
+
* @returns Integer weights summing to `total` (all zero for a non-positive total).
|
|
271
|
+
*/
|
|
272
|
+
export function attributeBarTokens(weights, total) {
|
|
273
|
+
const budget = Math.max(0, Math.round(total));
|
|
274
|
+
const values = USED_SEGMENTS.map(segment => Math.max(0, weights[segment.key] ?? 0));
|
|
275
|
+
const attributed = values.reduce((sum, value) => sum + value, 0) <= 0
|
|
276
|
+
? values.map(() => 0)
|
|
277
|
+
: allocateProportionally(values, budget);
|
|
278
|
+
return Object.fromEntries(USED_SEGMENTS.map((segment, index) => [segment.key, attributed[index] ?? 0]));
|
|
279
|
+
}
|
|
208
280
|
/**
|
|
209
281
|
* The context bar's hover breakdown — the legend the bar no longer carries
|
|
210
282
|
* itself. Local content estimates come first, measured free space last. When
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChannelUi } from '../../adapter/ports/channel-ui.js';
|
|
3
|
-
import { type KernelStatus } from '../../components/kernelCatalog.js';
|
|
4
|
-
import {
|
|
3
|
+
import { type KernelEntry, type KernelOption, type KernelStatus } from '../../components/kernelCatalog.js';
|
|
4
|
+
import type { KernelBackendId } from '../../kernelPrefs.js';
|
|
5
5
|
import type { ChatOverlayAction } from '../chatOverlay.js';
|
|
6
|
-
export declare function useKernelPicker({ channel, kernelVersion, launchpadShown, onProbeKernels, onSwitchBackend, canInstallSdk, dispatchOverlay }: {
|
|
6
|
+
export declare function useKernelPicker({ channel, kernelVersion, kernelEntries, launchpadShown, onProbeKernels, onSwitchBackend, canInstallSdk, dispatchOverlay }: {
|
|
7
7
|
channel: ChannelUi;
|
|
8
8
|
kernelVersion: string | undefined;
|
|
9
|
+
/** The host's registry projection, in picker order (P0: the UI renders the
|
|
10
|
+
* entry list it is handed and never imports the registry). */
|
|
11
|
+
kernelEntries: readonly KernelEntry[];
|
|
9
12
|
launchpadShown: boolean;
|
|
10
13
|
onProbeKernels: (() => Promise<Record<string, KernelStatus>>) | undefined;
|
|
11
14
|
onSwitchBackend: ((id: KernelBackendId) => void) | undefined;
|
|
@@ -15,9 +18,10 @@ export declare function useKernelPicker({ channel, kernelVersion, launchpadShown
|
|
|
15
18
|
dispatchOverlay: React.Dispatch<ChatOverlayAction>;
|
|
16
19
|
}): {
|
|
17
20
|
currentId: string;
|
|
18
|
-
options: readonly
|
|
21
|
+
options: readonly KernelOption[];
|
|
19
22
|
open: (index?: number) => void;
|
|
20
23
|
pick: (index: number) => void;
|
|
24
|
+
pickById: (id: string) => Promise<void>;
|
|
21
25
|
reprobe: () => void;
|
|
22
26
|
};
|
|
23
27
|
//# sourceMappingURL=useKernelPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKernelPicker.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/useKernelPicker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"useKernelPicker.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/useKernelPicker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAG9H,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE;IAC1J,OAAO,EAAE,SAAS,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC;mEAC+D;IAC/D,aAAa,EAAE,SAAS,WAAW,EAAE,CAAA;IACrC,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IACzE,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,eAAe,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;IAC5D;2EACuE;IACvE,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;CACnD;;;mBAkCyC,MAAM,KAAG,IAAI;kBA8ChC,MAAM,KAAG,IAAI;mBAIN,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;mBAjEZ,IAAI;EAoF3C"}
|
|
@@ -2,50 +2,66 @@ import React from 'react';
|
|
|
2
2
|
import { buildKernelCatalog } from '../../components/kernelCatalog.js';
|
|
3
3
|
import { WORKING_GATE_NOTICES } from '../../commands.js';
|
|
4
4
|
import { t } from '../../i18n.js';
|
|
5
|
-
|
|
6
|
-
export function useKernelPicker({ channel, kernelVersion, launchpadShown, onProbeKernels, onSwitchBackend, canInstallSdk, dispatchOverlay }) {
|
|
5
|
+
export function useKernelPicker({ channel, kernelVersion, kernelEntries, launchpadShown, onProbeKernels, onSwitchBackend, canInstallSdk, dispatchOverlay }) {
|
|
7
6
|
const currentId = channel.backendCapabilities?.backendId ?? 'dsh';
|
|
8
7
|
const [probe, setProbe] = React.useState(undefined);
|
|
9
|
-
const
|
|
8
|
+
const probeRequest = React.useRef(undefined);
|
|
9
|
+
const pendingPick = React.useRef(0);
|
|
10
|
+
React.useEffect(() => () => { pendingPick.current += 1; }, []);
|
|
10
11
|
const requestProbe = React.useCallback(() => {
|
|
11
|
-
if (
|
|
12
|
-
return;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
if (probeRequest.current !== undefined || onProbeKernels === undefined)
|
|
13
|
+
return probeRequest.current;
|
|
14
|
+
probeRequest.current = onProbeKernels().catch(() => {
|
|
15
|
+
// A failed probe leaves every optional backend "not installed" rather than
|
|
16
|
+
// "checking" forever; dsh needs no status (it is always available).
|
|
17
|
+
return Object.fromEntries(kernelEntries.map(entry => [entry.id, { installed: false }]));
|
|
16
18
|
});
|
|
17
|
-
|
|
19
|
+
void probeRequest.current.then(setProbe);
|
|
20
|
+
return probeRequest.current;
|
|
21
|
+
}, [onProbeKernels, kernelEntries]);
|
|
18
22
|
/** Force a fresh probe (the once-guard stays for the automatic paths): the
|
|
19
23
|
* SDK install wizard calls this after a successful install so the dim
|
|
20
24
|
* row lights up without a process restart. */
|
|
21
25
|
const reprobe = React.useCallback(() => {
|
|
22
|
-
|
|
23
|
-
requestProbe();
|
|
26
|
+
probeRequest.current = undefined;
|
|
27
|
+
void requestProbe();
|
|
24
28
|
}, [requestProbe]);
|
|
25
29
|
const options = React.useMemo(() => buildKernelCatalog({
|
|
26
30
|
current: currentId,
|
|
31
|
+
entries: kernelEntries,
|
|
27
32
|
...(kernelVersion === undefined ? {} : { dshVersion: kernelVersion }),
|
|
28
33
|
...(probe === undefined ? {} : { statuses: probe }),
|
|
29
34
|
canInstallSdk,
|
|
30
|
-
}), [currentId, kernelVersion, probe, canInstallSdk]);
|
|
35
|
+
}), [currentId, kernelEntries, kernelVersion, probe, canInstallSdk]);
|
|
31
36
|
React.useEffect(() => {
|
|
32
37
|
if (launchpadShown)
|
|
33
|
-
requestProbe();
|
|
38
|
+
void requestProbe();
|
|
34
39
|
}, [launchpadShown, requestProbe]);
|
|
35
40
|
const currentIndex = Math.max(0, options.findIndex(option => option.current));
|
|
36
41
|
const open = React.useCallback((index) => {
|
|
37
|
-
|
|
42
|
+
pendingPick.current += 1;
|
|
43
|
+
void requestProbe();
|
|
38
44
|
dispatchOverlay({ type: 'open', overlay: { kind: 'kernel', index: index ?? currentIndex } });
|
|
39
45
|
}, [currentIndex, requestProbe, dispatchOverlay]);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
const pickOption = (option, wasWorking = channel.working) => {
|
|
47
|
+
if (option === undefined) {
|
|
48
|
+
channel.notify(t('kernel-switch-unavailable'), { color: 'warning' });
|
|
43
49
|
return;
|
|
50
|
+
}
|
|
44
51
|
if (!option.selectable) {
|
|
45
52
|
if (option.installable === true) {
|
|
46
53
|
// The installable row opens the wizard instead of a dead-end toast;
|
|
47
|
-
// the wizard owns its own keys (Enter/Esc) from here on.
|
|
48
|
-
|
|
54
|
+
// the wizard owns its own keys (Enter/Esc) from here on. It carries the
|
|
55
|
+
// row's id: the surface the wizard acts on is looked up per backend at
|
|
56
|
+
// open time, not assumed (Stage B / §6 item 12).
|
|
57
|
+
dispatchOverlay({
|
|
58
|
+
type: 'open',
|
|
59
|
+
overlay: {
|
|
60
|
+
kind: 'sdk-install',
|
|
61
|
+
backendId: option.id,
|
|
62
|
+
...(option.hint === undefined ? {} : { foundCli: option.hint }),
|
|
63
|
+
},
|
|
64
|
+
});
|
|
49
65
|
return;
|
|
50
66
|
}
|
|
51
67
|
// Detection's own guidance (how to install or upgrade) beats the bare reason.
|
|
@@ -61,12 +77,36 @@ export function useKernelPicker({ channel, kernelVersion, launchpadShown, onProb
|
|
|
61
77
|
channel.notify(t('kernel-switch-unavailable'), { color: 'warning' });
|
|
62
78
|
return;
|
|
63
79
|
}
|
|
64
|
-
if (channel.working) {
|
|
80
|
+
if (wasWorking || channel.working) {
|
|
65
81
|
channel.notify(t(WORKING_GATE_NOTICES.kernel), { color: 'warning' });
|
|
66
82
|
return;
|
|
67
83
|
}
|
|
68
84
|
dispatchOverlay({ type: 'close' });
|
|
69
85
|
onSwitchBackend(option.id);
|
|
70
86
|
};
|
|
71
|
-
|
|
87
|
+
const pick = (index) => {
|
|
88
|
+
pendingPick.current += 1;
|
|
89
|
+
if (options[index] !== undefined)
|
|
90
|
+
pickOption(options[index]);
|
|
91
|
+
};
|
|
92
|
+
const pickById = async (id) => {
|
|
93
|
+
const generation = ++pendingPick.current;
|
|
94
|
+
const wasWorking = channel.working;
|
|
95
|
+
let option = options.find(option => option.id === id);
|
|
96
|
+
if (option?.reasonKey === 'kernel-probing') {
|
|
97
|
+
const statuses = await requestProbe();
|
|
98
|
+
// A newer pick, opening the picker, or unmounting cancels a waiting shortcut.
|
|
99
|
+
if (generation !== pendingPick.current)
|
|
100
|
+
return;
|
|
101
|
+
option = buildKernelCatalog({
|
|
102
|
+
current: channel.backendCapabilities?.backendId ?? 'dsh',
|
|
103
|
+
entries: kernelEntries,
|
|
104
|
+
dshVersion: kernelVersion,
|
|
105
|
+
statuses,
|
|
106
|
+
canInstallSdk,
|
|
107
|
+
}).find(option => option.id === id);
|
|
108
|
+
}
|
|
109
|
+
pickOption(option, wasWorking);
|
|
110
|
+
};
|
|
111
|
+
return { currentId, options, open, pick, pickById, reprobe };
|
|
72
112
|
}
|