@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
package/lib/types/ink/output.js
CHANGED
|
@@ -380,6 +380,7 @@ export default class Output {
|
|
|
380
380
|
terminalImagesEnabled;
|
|
381
381
|
opaqueImageBacking;
|
|
382
382
|
imageReady;
|
|
383
|
+
imageRasterBytes;
|
|
383
384
|
operations = [];
|
|
384
385
|
imagePlacements = [];
|
|
385
386
|
imageNodes = new Set();
|
|
@@ -439,6 +440,7 @@ export default class Output {
|
|
|
439
440
|
this.terminalImagesEnabled = options.terminalImages ?? false;
|
|
440
441
|
this.opaqueImageBacking = options.opaqueImageBacking ?? false;
|
|
441
442
|
this.imageReady = options.imageReady;
|
|
443
|
+
this.imageRasterBytes = options.imageRasterBytes;
|
|
442
444
|
this.previousImages = options.previousImages ?? [];
|
|
443
445
|
resetScreen(screen, width, height);
|
|
444
446
|
}
|
|
@@ -452,13 +454,14 @@ export default class Output {
|
|
|
452
454
|
* @param height - the new screen height in rows.
|
|
453
455
|
* @param screen - the screen buffer to render into.
|
|
454
456
|
*/
|
|
455
|
-
reset(width, height, screen, terminalImages = false, previousImages = [], imageReady, opaqueImageBacking = false) {
|
|
457
|
+
reset(width, height, screen, terminalImages = false, previousImages = [], imageReady, opaqueImageBacking = false, imageRasterBytes) {
|
|
456
458
|
this.width = width;
|
|
457
459
|
this.height = height;
|
|
458
460
|
this.screen = screen;
|
|
459
461
|
this.terminalImagesEnabled = terminalImages;
|
|
460
462
|
this.opaqueImageBacking = opaqueImageBacking;
|
|
461
463
|
this.imageReady = imageReady;
|
|
464
|
+
this.imageRasterBytes = imageRasterBytes;
|
|
462
465
|
this.previousImages = previousImages;
|
|
463
466
|
this.operations.length = 0;
|
|
464
467
|
this.imagePlacements.length = 0;
|
|
@@ -571,11 +574,6 @@ export default class Output {
|
|
|
571
574
|
const visibleBottom = Math.min(this.height, top + height, Math.floor(clip?.y2 ?? this.height));
|
|
572
575
|
if (visibleRight <= visibleLeft || visibleBottom <= visibleTop)
|
|
573
576
|
return false;
|
|
574
|
-
const decodedBytes = source.data.byteLength;
|
|
575
|
-
if (this.imageDecodedBytes + decodedBytes >
|
|
576
|
-
TERMINAL_IMAGE_MAX_FRAME_BYTES) {
|
|
577
|
-
return false;
|
|
578
|
-
}
|
|
579
577
|
const placement = {
|
|
580
578
|
node,
|
|
581
579
|
x: left,
|
|
@@ -589,6 +587,11 @@ export default class Output {
|
|
|
589
587
|
...(canCrop ? { clip: { x: visibleLeft, y: visibleTop, columns: visibleRight - visibleLeft, rows: visibleBottom - visibleTop } } : {}),
|
|
590
588
|
...(background !== undefined ? { background } : {}),
|
|
591
589
|
};
|
|
590
|
+
// Bound both decoded sources and fitted uploads: downsampling
|
|
591
|
+
// must not admit more source data, and upscaling must not evade the cap.
|
|
592
|
+
const decodedBytes = Math.max(source.data.byteLength, this.imageRasterBytes?.(placement) ?? 0);
|
|
593
|
+
if (this.imageDecodedBytes + decodedBytes > TERMINAL_IMAGE_MAX_FRAME_BYTES)
|
|
594
|
+
return false;
|
|
592
595
|
const graphicsReady = this.imageReady?.(placement);
|
|
593
596
|
this.imagePlacements.push(graphicsReady === undefined ? placement : { ...placement, graphicsReady });
|
|
594
597
|
this.imageNodes.add(node);
|
|
@@ -864,7 +867,8 @@ export default class Output {
|
|
|
864
867
|
// row. (This used to run in a pass after every write, which let a
|
|
865
868
|
// marker outlive an overlay that overwrote the row.)
|
|
866
869
|
if (operation.y > 0 && operation.y < screen.height) {
|
|
867
|
-
|
|
870
|
+
const contentEnd = Math.max(1, Math.abs(operation.contentEnd));
|
|
871
|
+
screen.softWrap[operation.y] = operation.contentEnd < 0 ? -contentEnd : contentEnd;
|
|
868
872
|
}
|
|
869
873
|
continue;
|
|
870
874
|
}
|
|
@@ -930,7 +934,7 @@ export default class Output {
|
|
|
930
934
|
const writeX = clipHorizontally ? Math.max(x, clip.x1) : x;
|
|
931
935
|
// Copy joins need only the preceding (horizontally clipped) line,
|
|
932
936
|
// not every discarded line. Preserve its content-end coordinate.
|
|
933
|
-
if (softWrap && from > 0 && softWrap[from]
|
|
937
|
+
if (softWrap && from > 0 && softWrap[from]) {
|
|
934
938
|
prevContentEnd = writeX + stringWidth(clipLine(lines[from - 1]));
|
|
935
939
|
}
|
|
936
940
|
lines = lines.slice(from, to);
|
|
@@ -955,8 +959,8 @@ export default class Output {
|
|
|
955
959
|
// from writeLineToScreen is tab-expansion-aware, unlike
|
|
956
960
|
// x+stringWidth(line) which treats tabs as width 0.
|
|
957
961
|
if (softWrap) {
|
|
958
|
-
const
|
|
959
|
-
swBits[lineY] =
|
|
962
|
+
const flag = softWrap[swFrom + offsetY];
|
|
963
|
+
swBits[lineY] = flag === 'gap' ? -prevContentEnd : flag ? prevContentEnd : 0;
|
|
960
964
|
prevContentEnd = contentEnd;
|
|
961
965
|
}
|
|
962
966
|
else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DOMElement } from './dom.js';
|
|
2
2
|
import type { Rectangle } from './layout/geometry.js';
|
|
3
3
|
import type Output from './output.js';
|
|
4
|
+
import type { SoftWrapFlag } from './output.js';
|
|
4
5
|
import { type Screen } from './screen.js';
|
|
5
6
|
import { type StyledSegment } from './squash-text-nodes.js';
|
|
6
7
|
import type { Color } from './styles.js';
|
|
@@ -173,10 +174,12 @@ declare function buildCharToSegmentMap(segments: StyledSegment[]): number[];
|
|
|
173
174
|
* @param originalPlain - the original unwrapped plain text.
|
|
174
175
|
* @param trimEnabled - Whether whitespace trimming is enabled (wrap-trim mode).
|
|
175
176
|
* When true, we skip whitespace in the original that was trimmed from the output.
|
|
176
|
-
* When false (wrap mode),
|
|
177
|
+
* When false (wrap mode), only separators marked 'gap' are skipped.
|
|
178
|
+
* @param softWrap - per-line flags from wrapWithSoftWrap; a 'gap' line had its
|
|
179
|
+
* leading separator space elided, so that original character is skipped.
|
|
177
180
|
* @returns the styled wrapped text.
|
|
178
181
|
*/
|
|
179
|
-
declare function applyStylesToWrappedText(wrappedPlain: string, segments: StyledSegment[], charToSegment: number[], originalPlain: string, trimEnabled?: boolean): string;
|
|
182
|
+
declare function applyStylesToWrappedText(wrappedPlain: string, segments: StyledSegment[], charToSegment: number[], originalPlain: string, trimEnabled?: boolean, softWrap?: SoftWrapFlag[]): string;
|
|
180
183
|
/**
|
|
181
184
|
* Render a laid-out node subtree into the output buffer.
|
|
182
185
|
* After yoga lays out the tree, each node is painted to the output object,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-node-to-output.d.ts","sourceRoot":"","sources":["../../../src/ink/render-node-to-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AASrD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"render-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BAAS,wBAAwB,CAC/B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,aAAa,EAAE,EACzB,aAAa,EAAE,MAAM,EAAE,EACvB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,OAAe,EAC5B,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CA2GR;AAsSD;;;;;;;;;GASG;AACH,iBAAS,kBAAkB,CACzB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAM9B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,wBAAwB,CAAC,EAAE,KAAK,CAAA;CACjC,GACA,IAAI,CA+uCN;AA2OD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAA;AAE1D,eAAe,kBAAkB,CAAA"}
|
|
@@ -365,15 +365,19 @@ function buildCharToSegmentMap(segments) {
|
|
|
365
365
|
* @param originalPlain - the original unwrapped plain text.
|
|
366
366
|
* @param trimEnabled - Whether whitespace trimming is enabled (wrap-trim mode).
|
|
367
367
|
* When true, we skip whitespace in the original that was trimmed from the output.
|
|
368
|
-
* When false (wrap mode),
|
|
368
|
+
* When false (wrap mode), only separators marked 'gap' are skipped.
|
|
369
|
+
* @param softWrap - per-line flags from wrapWithSoftWrap; a 'gap' line had its
|
|
370
|
+
* leading separator space elided, so that original character is skipped.
|
|
369
371
|
* @returns the styled wrapped text.
|
|
370
372
|
*/
|
|
371
|
-
function applyStylesToWrappedText(wrappedPlain, segments, charToSegment, originalPlain, trimEnabled = false) {
|
|
373
|
+
function applyStylesToWrappedText(wrappedPlain, segments, charToSegment, originalPlain, trimEnabled = false, softWrap) {
|
|
372
374
|
const lines = wrappedPlain.split('\n');
|
|
373
375
|
const resultLines = [];
|
|
374
376
|
let charIndex = 0;
|
|
375
377
|
for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
|
|
376
378
|
const line = lines[lineIdx];
|
|
379
|
+
if (softWrap?.[lineIdx] === 'gap')
|
|
380
|
+
charIndex++;
|
|
377
381
|
// In trim mode, skip leading whitespace that was trimmed from this line.
|
|
378
382
|
// Only skip if the original has whitespace but the output line doesn't start
|
|
379
383
|
// with whitespace (meaning it was trimmed). If both have whitespace, the
|
|
@@ -469,6 +473,9 @@ function applyStylesToWrappedText(wrappedPlain, segments, charToSegment, origina
|
|
|
469
473
|
*
|
|
470
474
|
* `wrapLine` replaces the per-line wrap for decorated text (see
|
|
471
475
|
* wrapDecoratedLine); without it every line wraps at maxWidth.
|
|
476
|
+
* In 'wrap' mode wrap-ansi moves the separator space to the start of the
|
|
477
|
+
* next row when a word exactly fills the width; that space is elided and
|
|
478
|
+
* the row flagged 'gap' (row count and widest line are unchanged).
|
|
472
479
|
*/
|
|
473
480
|
function wrapWithSoftWrap(plainText, maxWidth, textWrap, wrapLine) {
|
|
474
481
|
if (textWrap !== 'wrap' && textWrap !== 'wrap-trim') {
|
|
@@ -485,7 +492,15 @@ function wrapWithSoftWrap(plainText, maxWidth, textWrap, wrapLine) {
|
|
|
485
492
|
? wrapLine(orig)
|
|
486
493
|
: wrapText(orig, maxWidth, textWrap).split('\n');
|
|
487
494
|
for (let i = 0; i < pieces.length; i++) {
|
|
488
|
-
|
|
495
|
+
const piece = pieces[i];
|
|
496
|
+
// Blank pieces retain their width for copy joins and trailing trim.
|
|
497
|
+
if (i > 0 && textWrap === 'wrap' && piece.startsWith(' ') &&
|
|
498
|
+
stringWidth(pieces[i - 1]) === maxWidth && stringWidth(piece.trim()) > 0) {
|
|
499
|
+
outLines.push(piece.slice(1));
|
|
500
|
+
softWrap.push('gap');
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
outLines.push(piece);
|
|
489
504
|
softWrap.push(i > 0);
|
|
490
505
|
}
|
|
491
506
|
}
|
|
@@ -595,7 +610,7 @@ function paintDecoratedTextNode(node, x, y, output, maxWidth, paddingLeft, paddi
|
|
|
595
610
|
}
|
|
596
611
|
else {
|
|
597
612
|
const charToSegment = buildCharToSegmentMap(segments);
|
|
598
|
-
styled = applyStylesToWrappedText(w.wrapped, segments, charToSegment, plainText, textWrap === 'wrap-trim');
|
|
613
|
+
styled = applyStylesToWrappedText(w.wrapped, segments, charToSegment, plainText, textWrap === 'wrap-trim', w.softWrap);
|
|
599
614
|
}
|
|
600
615
|
}
|
|
601
616
|
else {
|
|
@@ -655,7 +670,7 @@ function paintDecoratedTextNode(node, x, y, output, maxWidth, paddingLeft, paddi
|
|
|
655
670
|
runWidth = 0;
|
|
656
671
|
};
|
|
657
672
|
for (let r = headerOffset; r < rows.length; r++) {
|
|
658
|
-
if (flags[r]
|
|
673
|
+
if (!flags[r]) {
|
|
659
674
|
closeRun(r);
|
|
660
675
|
lineStart = r;
|
|
661
676
|
lineHang = undefined;
|
|
@@ -957,7 +972,7 @@ function renderNodeToOutput(node, output, options) {
|
|
|
957
972
|
const w = wrapWithSoftWrap(plainText, maxWidth, textWrap);
|
|
958
973
|
softWrap = w.softWrap;
|
|
959
974
|
const charToSegment = buildCharToSegmentMap(segments);
|
|
960
|
-
text = applyStylesToWrappedText(w.wrapped, segments, charToSegment, plainText, textWrap === 'wrap-trim');
|
|
975
|
+
text = applyStylesToWrappedText(w.wrapped, segments, charToSegment, plainText, textWrap === 'wrap-trim', softWrap);
|
|
961
976
|
// Hyperlinks are handled per-run in applyStylesToWrappedText via
|
|
962
977
|
// wrapWithOsc8Link, similar to how styles are applied per-run.
|
|
963
978
|
}
|
|
@@ -1041,9 +1056,6 @@ function renderNodeToOutput(node, output, options) {
|
|
|
1041
1056
|
height: Math.floor(height),
|
|
1042
1057
|
});
|
|
1043
1058
|
}
|
|
1044
|
-
if (node.style.softWrapContinuation !== undefined) {
|
|
1045
|
-
output.softWrapRow(Math.floor(y), Math.floor(x) + node.style.softWrapContinuation);
|
|
1046
|
-
}
|
|
1047
1059
|
const overflowX = node.style.overflowX ?? node.style.overflow;
|
|
1048
1060
|
const overflowY = node.style.overflowY ?? node.style.overflow;
|
|
1049
1061
|
const clipHorizontally = overflowX === 'hidden' || overflowX === 'scroll';
|
|
@@ -1763,6 +1775,12 @@ function renderNodeToOutput(node, output, options) {
|
|
|
1763
1775
|
// (a black frame around a colored surface, and a black hole where a
|
|
1764
1776
|
// Sixel raster is otherwise exposed by a border row or column).
|
|
1765
1777
|
renderBorder(x, y, node, output, node.style.backgroundColor ?? occlusionBackground ?? inheritedBackgroundColor);
|
|
1778
|
+
// Child writes clear row markers, so record the continuation after paint.
|
|
1779
|
+
if (node.style.softWrapContinuation !== undefined) {
|
|
1780
|
+
const continuation = node.style.softWrapContinuation;
|
|
1781
|
+
const contentEnd = Math.floor(x) + Math.abs(continuation);
|
|
1782
|
+
output.softWrapRow(Math.floor(y), continuation < 0 ? -contentEnd : contentEnd);
|
|
1783
|
+
}
|
|
1766
1784
|
}
|
|
1767
1785
|
else if (node.nodeName === 'ink-root') {
|
|
1768
1786
|
renderChildren(node, output, x, y, hasRemovedChild, prevScreen, inheritedBackgroundColor);
|
|
@@ -13,6 +13,7 @@ export type RenderOptions = {
|
|
|
13
13
|
/** Whether terminal graphics are active for this paint pass. */
|
|
14
14
|
terminalImages?: boolean;
|
|
15
15
|
imageReady?: (placement: TerminalImagePlacement) => boolean;
|
|
16
|
+
imageRasterBytes?: (placement: TerminalImagePlacement) => number;
|
|
16
17
|
/**
|
|
17
18
|
* True when rasters paint over the cell grid (Sixel): image-owned cells
|
|
18
19
|
* carry the surface background instead of terminal-default blanks. See
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/ink/renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,UAAU,CAAA;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAIvC,OAAO,KAAK,E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Y,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,OAAO,CAAA;IAC3D,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,MAAM,CAAA;IAChE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAK5B,qBAAqB,EAAE,OAAO,CAAA;CAC/B,CAAA;AAED,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,KAAK,CAAA;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,SAAS,GACnB,QAAQ,CAuMV"}
|
|
@@ -75,7 +75,7 @@ export default function createRenderer(node, stylePool) {
|
|
|
75
75
|
const screen = backScreen ??
|
|
76
76
|
createScreen(width, height, stylePool, charPool, hyperlinkPool);
|
|
77
77
|
if (output) {
|
|
78
|
-
output.reset(width, height, screen, options.terminalImages, frontFrame.images, options.imageReady, options.opaqueImageBacking ?? false);
|
|
78
|
+
output.reset(width, height, screen, options.terminalImages, frontFrame.images, options.imageReady, options.opaqueImageBacking ?? false, options.imageRasterBytes);
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
81
|
output = new Output({
|
|
@@ -86,6 +86,7 @@ export default function createRenderer(node, stylePool) {
|
|
|
86
86
|
terminalImages: options.terminalImages,
|
|
87
87
|
previousImages: frontFrame.images,
|
|
88
88
|
imageReady: options.imageReady,
|
|
89
|
+
imageRasterBytes: options.imageRasterBytes,
|
|
89
90
|
opaqueImageBacking: options.opaqueImageBacking ?? false,
|
|
90
91
|
});
|
|
91
92
|
}
|
|
@@ -169,11 +170,11 @@ export default function createRenderer(node, stylePool) {
|
|
|
169
170
|
// screen), cursor.y = screen.height would trigger log-update's
|
|
170
171
|
// cursor-restore LF at the last row, scrolling one row off the top
|
|
171
172
|
// of the alt buffer and desyncing the diff's cursor model. The
|
|
172
|
-
//
|
|
173
|
+
// This is the diff anchor; ink.tsx separately parks the native caret.
|
|
173
174
|
y: options.altScreen
|
|
174
175
|
? Math.max(0, Math.min(screen.height, terminalRows) - 1)
|
|
175
176
|
: screen.height,
|
|
176
|
-
//
|
|
177
|
+
// Logical anchor visibility; ink.tsx manages the physical caret.
|
|
177
178
|
visible: !isTTY || screen.height === 0,
|
|
178
179
|
},
|
|
179
180
|
};
|
package/lib/types/ink/root.d.ts
CHANGED
|
@@ -58,7 +58,10 @@ export type Instance = {
|
|
|
58
58
|
/**
|
|
59
59
|
* Detach the Ink runtime for process-level shutdown: latches isUnmounted
|
|
60
60
|
* (gating every mouse/alt-screen re-assert), cancels pending renders,
|
|
61
|
-
* releases TTY handlers and stdin raw mode,
|
|
61
|
+
* releases TTY handlers and stdin raw mode, disposes the querier, and
|
|
62
|
+
* unmounts React without closing the alternate screen. Await the result
|
|
63
|
+
* before releasing UI capabilities; exits during a React commit defer
|
|
64
|
+
* effect cleanup until that commit yields.
|
|
62
65
|
* Exposed on the handle so shutdown code can latch the runtime even when
|
|
63
66
|
* the global instances map lookup misses (stdout identity drift, issue
|
|
64
67
|
* #522) — without it, the cleanup-vs-self-heal window re-enables mouse
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/ink/root.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,GAAmC,MAAM,UAAU,CAAA;AAG1D,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAA;IAC3B;;;;OAIG;IACH,KAAK,CAA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K,EAAE,UAAU,KAAK,IAAI,CAAA;CACtC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACvB;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IACnC;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAC3C;;;;OAIG;IACH,qBAAqB,EAAE,GAAG,CAAC,uBAAuB,CAAC,CAAA;IACnD,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;IACjC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,SAAS,EACf,UAAU,MAAM,CAAC,WAAW,GAAG,aAAa,KAC3C,QA4BF,CAAA;AAED;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,GACjB,MAAM,SAAS,EACf,UAAU,MAAM,CAAC,WAAW,GAAG,aAAa,KAC3C,OAAO,CAAC,QAAQ,CAWlB,CAAA;AAED,eAAe,aAAa,CAAA;AAE5B;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
|
|
@@ -263,8 +263,10 @@ export type Screen = Size & {
|
|
|
263
263
|
* inserted by wrapAnsi, not in the source), and row r-1's written
|
|
264
264
|
* content ends at absolute column N (exclusive — cells [0..N) are the
|
|
265
265
|
* fragment, past N is unwritten padding). 0 means row r is NOT a
|
|
266
|
-
* continuation (hard newline or first row).
|
|
267
|
-
*
|
|
266
|
+
* continuation (hard newline or first row). N<0 is the same with
|
|
267
|
+
* content end -N, plus a separator space elided at the wrap point
|
|
268
|
+
* (row r-1 filled the width exactly); copy re-inserts it. Selection
|
|
269
|
+
* copy checks softWrap[r]!==0 to join row r onto row r-1 without a newline, and
|
|
268
270
|
* reads softWrap[r+1] to know row r's content end when row r+1
|
|
269
271
|
* continues from it. The content-end column is needed because an
|
|
270
272
|
* unwritten cell and a written-unstyled-space are indistinguishable in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/ink/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,IAAI,EAEV,MAAM,sBAAsB,CAAA;AAM7B;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,SAAS,CAGf;IACF,OAAO,CAAC,KAAK,CAA8B;IAE3C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAqB5B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG3B;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,SAAS,CAA4B;IAE7C;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAW7C;;;;OAIG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAGpC;AA4BD,yCAAyC;AACzC,MAAM,MAAM,GAAG,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,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AUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CASN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CAyBN"}
|
|
@@ -54,6 +54,9 @@ export type SelectionState = {
|
|
|
54
54
|
focus: Point | null;
|
|
55
55
|
/** True between mouse-down and mouse-up. */
|
|
56
56
|
isDragging: boolean;
|
|
57
|
+
/** Monotonic copy-on-select revision: advances on drag completion or
|
|
58
|
+
* keyboard extension, never on scroll/resize or duplicate releases. */
|
|
59
|
+
settledRevision: number;
|
|
57
60
|
/** For word/line mode: the initial word/line bounds from the first
|
|
58
61
|
* multi-click. Drag extends from this span to the word/line at the
|
|
59
62
|
* current mouse position so the original word/line stays selected
|
|
@@ -178,7 +181,7 @@ export declare function updateSelection(s: SelectionState, col: number, row: num
|
|
|
178
181
|
/**
|
|
179
182
|
* End a drag: clear the dragging flag while keeping anchor/focus so the
|
|
180
183
|
* highlight stays visible and the text can be copied. Call
|
|
181
|
-
* clearSelection to drop the selection
|
|
184
|
+
* clearSelection to drop the selection on Esc or a clearing copy action.
|
|
182
185
|
*
|
|
183
186
|
* Deferred ghost guard: a drag that scrolled both ends fully off the same
|
|
184
187
|
* viewport edge (wheeled away while the button was held) is dropped HERE,
|
|
@@ -549,6 +552,12 @@ export declare function getSelectedText(s: SelectionState, screen: Screen): stri
|
|
|
549
552
|
* @param side - which viewport edge the rows scroll out of.
|
|
550
553
|
*/
|
|
551
554
|
export declare function captureScrolledRows(s: SelectionState, screen: Screen, firstRow: number, lastRow: number, side: 'above' | 'below', screenRowOffset?: number): void;
|
|
555
|
+
/**
|
|
556
|
+
* Resolve the focus-side edge of the visible selection. Blank rows and
|
|
557
|
+
* padding cannot own a native cursor; step toward the anchor until selected
|
|
558
|
+
* content is found. Wide glyphs use their head cell, as text copying does.
|
|
559
|
+
*/
|
|
560
|
+
export declare function getSelectionCursor(screen: Screen, selection: SelectionState): Point | null;
|
|
552
561
|
/**
|
|
553
562
|
* Apply the selection overlay directly to the screen buffer by changing
|
|
554
563
|
* the style of every cell in the selection range. Called after the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/ink/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGjE,KAAK,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;+CAE2C;IAC3C,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;CAC7C,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6DAA6D;IAC7D,MAAM,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,oEAAoE;IACpE,KAAK,EAAE,KAAK,GA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G,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,GAAG,IAAI,CAeP;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,CAAC,EAAE,cAAc,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,OAAO,CAQT;AA+HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,2BAA2B,CACzC,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,OAAO,GACnB,OAAO,CAmIT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAkCzE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,GAAG,OAAO,EACvB,eAAe,SAAI,GAClB,IAAI,CAuDN;AA0CD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,KAAK,GAAG,IAAI,CAmB1F;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,SAAS,EACpB,MAAM,GAAE,SAAS,sBAAsB,EAAO,GAC7C,IAAI,CA2BN"}
|
|
@@ -20,6 +20,7 @@ export function createSelectionState() {
|
|
|
20
20
|
anchor: null,
|
|
21
21
|
focus: null,
|
|
22
22
|
isDragging: false,
|
|
23
|
+
settledRevision: 0,
|
|
23
24
|
anchorSpan: null,
|
|
24
25
|
scrolledOffAbove: [],
|
|
25
26
|
scrolledOffBelow: [],
|
|
@@ -118,7 +119,7 @@ export function updateSelection(s, col, row) {
|
|
|
118
119
|
/**
|
|
119
120
|
* End a drag: clear the dragging flag while keeping anchor/focus so the
|
|
120
121
|
* highlight stays visible and the text can be copied. Call
|
|
121
|
-
* clearSelection to drop the selection
|
|
122
|
+
* clearSelection to drop the selection on Esc or a clearing copy action.
|
|
122
123
|
*
|
|
123
124
|
* Deferred ghost guard: a drag that scrolled both ends fully off the same
|
|
124
125
|
* viewport edge (wheeled away while the button was held) is dropped HERE,
|
|
@@ -128,6 +129,7 @@ export function updateSelection(s, col, row) {
|
|
|
128
129
|
* @param s - the selection state to mutate.
|
|
129
130
|
*/
|
|
130
131
|
export function finishSelection(s) {
|
|
132
|
+
const wasDragging = s.isDragging;
|
|
131
133
|
s.isDragging = false;
|
|
132
134
|
if (s.dragBounds !== undefined) {
|
|
133
135
|
const { top, bottom } = s.dragBounds;
|
|
@@ -136,8 +138,9 @@ export function finishSelection(s) {
|
|
|
136
138
|
clearSelection(s);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
if (wasDragging && hasSelection(s))
|
|
142
|
+
s.settledRevision += 1;
|
|
143
|
+
// Keep anchor/focus after automatic copy; Escape clears the highlight.
|
|
141
144
|
}
|
|
142
145
|
/**
|
|
143
146
|
* Reset the selection to the empty state: no anchor, focus, span, or
|
|
@@ -482,6 +485,7 @@ export function moveFocus(s, col, row) {
|
|
|
482
485
|
// shiftSelection clamp) no longer reflects intent. Anchor stays put so
|
|
483
486
|
// virtualAnchorRow is still valid for its own round-trip.
|
|
484
487
|
s.virtualFocusRow = undefined;
|
|
488
|
+
s.settledRevision += 1;
|
|
485
489
|
}
|
|
486
490
|
/**
|
|
487
491
|
* Shift anchor AND focus by dRow, clamped to [minRow, maxRow]. Used for
|
|
@@ -974,15 +978,16 @@ export function isCellSelected(s, col, row) {
|
|
|
974
978
|
return true;
|
|
975
979
|
}
|
|
976
980
|
/** Extract text from one screen row, plus the copy regions it touches.
|
|
977
|
-
* When the next row is a soft-wrap continuation (screen.softWrap[row+1]
|
|
981
|
+
* When the next row is a soft-wrap continuation (screen.softWrap[row+1]!==0),
|
|
978
982
|
* clamp to that content-end column and skip the trailing trim so the
|
|
979
983
|
* word-separator space survives the join. See Screen.softWrap for why the
|
|
980
984
|
* clamp is necessary. */
|
|
981
|
-
function extractRowText(screen, row, colStart, colEnd, includeNoSelect = false) {
|
|
985
|
+
function extractRowText(screen, row, colStart, colEnd, continuesSelection, includeNoSelect = false) {
|
|
982
986
|
const noSelect = screen.noSelect;
|
|
983
987
|
const copyRegion = screen.copyRegion;
|
|
984
988
|
const rowOff = row * screen.width;
|
|
985
|
-
const
|
|
989
|
+
const next = row + 1 < screen.height ? screen.softWrap[row + 1] : 0;
|
|
990
|
+
const contentEnd = Math.abs(next);
|
|
986
991
|
const lastCol = contentEnd > 0 ? Math.min(colEnd, contentEnd - 1) : colEnd;
|
|
987
992
|
let line = '';
|
|
988
993
|
const regions = [];
|
|
@@ -1017,6 +1022,9 @@ function extractRowText(screen, row, colStart, colEnd, includeNoSelect = false)
|
|
|
1017
1022
|
}
|
|
1018
1023
|
line += cell.char;
|
|
1019
1024
|
}
|
|
1025
|
+
// Restore an elided separator only when the selection joins the next row.
|
|
1026
|
+
if (continuesSelection && next < 0 && colStart <= lastCol && lastCol === contentEnd - 1)
|
|
1027
|
+
line += ' ';
|
|
1020
1028
|
// The trailing trim may only eat blanks written AFTER the last region: a
|
|
1021
1029
|
// region's cells are content (a formula's box), so the space separating it
|
|
1022
1030
|
// from the text before it survives. The markers this replaced were never
|
|
@@ -1024,7 +1032,7 @@ function extractRowText(screen, row, colStart, colEnd, includeNoSelect = false)
|
|
|
1024
1032
|
const tail = regions.length > 0 ? regions[regions.length - 1].at : 0;
|
|
1025
1033
|
return {
|
|
1026
1034
|
text: contentEnd > 0 ? line : line.slice(0, tail) + line.slice(tail).replace(/\s+$/, ''),
|
|
1027
|
-
sw: screen.softWrap[row]
|
|
1035
|
+
sw: screen.softWrap[row] !== 0,
|
|
1028
1036
|
regions,
|
|
1029
1037
|
};
|
|
1030
1038
|
}
|
|
@@ -1215,12 +1223,12 @@ export function refreshSelectionFingerprint(s, screen, coordinated) {
|
|
|
1215
1223
|
}
|
|
1216
1224
|
}
|
|
1217
1225
|
// Row separator + the row's soft-wrap bit: getSelectedText joins a
|
|
1218
|
-
// wrapped row onto the previous line with NO newline (softWrap[row]
|
|
1226
|
+
// wrapped row onto the previous line with NO newline (softWrap[row]!==0)
|
|
1219
1227
|
// but emits a real newline otherwise — identical cells with a flipped
|
|
1220
1228
|
// wrap bit produce a different copy, so the fingerprint must see it.
|
|
1221
|
-
h = Math.imul(h ^ 0x9e3779b9 ^ (softWrap[row]
|
|
1229
|
+
h = Math.imul(h ^ 0x9e3779b9 ^ (softWrap[row] !== 0 ? 0x51ed270b : 0), 0x85ebca6b);
|
|
1222
1230
|
// The row BELOW is an input to THIS row's copy. extractRowText reads
|
|
1223
|
-
// softWrap[row + 1] as this row's content end:
|
|
1231
|
+
// softWrap[row + 1] as this row's content end: !== 0 means the row wraps
|
|
1224
1232
|
// into the next one, which both clamps the last column to
|
|
1225
1233
|
// min(colEnd, contentEnd - 1) and suppresses the trailing-blank trim.
|
|
1226
1234
|
// Flipping only the next row's wrap bit therefore rewrites the last
|
|
@@ -1229,9 +1237,10 @@ export function refreshSelectionFingerprint(s, screen, coordinated) {
|
|
|
1229
1237
|
// cells. Hash exactly what extractRowText consumes (0 = not wrapped) so
|
|
1230
1238
|
// a contentEnd change that does not move the clamp stays invisible
|
|
1231
1239
|
// instead of becoming a false positive.
|
|
1232
|
-
const
|
|
1240
|
+
const next = row + 1 < height ? softWrap[row + 1] : 0;
|
|
1241
|
+
const contentEnd = Math.abs(next);
|
|
1233
1242
|
const wrapClamp = contentEnd > 0 ? Math.min(colEnd, contentEnd - 1) + 1 : 0;
|
|
1234
|
-
h = Math.imul(h ^ 0x27d4eb2f ^ wrapClamp, 0x165667b1);
|
|
1243
|
+
h = Math.imul(h ^ 0x27d4eb2f ^ (next < 0 ? -wrapClamp : wrapClamp), 0x165667b1);
|
|
1235
1244
|
}
|
|
1236
1245
|
// The bytes a region contributes live outside the cells (Screen.copyTexts),
|
|
1237
1246
|
// so they are hashed here — in id order, after the position terms above, so
|
|
@@ -1314,7 +1323,7 @@ export function getSelectedText(s, screen) {
|
|
|
1314
1323
|
if (rowStart > rowEnd)
|
|
1315
1324
|
continue;
|
|
1316
1325
|
}
|
|
1317
|
-
rows.push(extractRowText(screen, row, rowStart, rowEnd, s.includeNoSelectCells));
|
|
1326
|
+
rows.push(extractRowText(screen, row, rowStart, rowEnd, row < end.row || s.scrolledOffBelow.length > 0, s.includeNoSelectCells));
|
|
1318
1327
|
}
|
|
1319
1328
|
for (let i = 0; i < s.scrolledOffBelow.length; i++) {
|
|
1320
1329
|
rows.push(s.scrolledOffBelow[i]);
|
|
@@ -1361,7 +1370,7 @@ export function captureScrolledRows(s, screen, firstRow, lastRow, side, screenRo
|
|
|
1361
1370
|
const colStart = row === start.row ? start.col : 0;
|
|
1362
1371
|
const colEnd = row === end.row ? end.col : width - 1;
|
|
1363
1372
|
const screenRow = row - screenRowOffset;
|
|
1364
|
-
captured.push(extractRowText(screen, screenRow, colStart, colEnd, s.includeNoSelectCells));
|
|
1373
|
+
captured.push(extractRowText(screen, screenRow, colStart, colEnd, row < end.row || s.scrolledOffBelow.length > 0, s.includeNoSelectCells));
|
|
1365
1374
|
}
|
|
1366
1375
|
if (side === 'above') {
|
|
1367
1376
|
// Newest rows go at the bottom of the above-accumulator (closest to
|
|
@@ -1398,6 +1407,73 @@ export function captureScrolledRows(s, screen, firstRow, lastRow, side, screenRo
|
|
|
1398
1407
|
}
|
|
1399
1408
|
}
|
|
1400
1409
|
}
|
|
1410
|
+
/** Selected columns on a visible row, excluding empty rows and trailing padding. */
|
|
1411
|
+
function selectedRowColumns(screen, selection, row, start, end) {
|
|
1412
|
+
if (row < 0 || row >= screen.height)
|
|
1413
|
+
return null;
|
|
1414
|
+
const width = screen.width;
|
|
1415
|
+
let colStart = Math.max(0, row === start.row ? start.col : 0);
|
|
1416
|
+
let colEnd = row === end.row ? Math.min(end.col, width - 1) : width - 1;
|
|
1417
|
+
// Panel-origin gestures are clipped to their column fence on every row.
|
|
1418
|
+
if (selection.fence !== undefined) {
|
|
1419
|
+
colStart = Math.max(colStart, selection.fence.colStart);
|
|
1420
|
+
colEnd = Math.min(colEnd, selection.fence.colEnd);
|
|
1421
|
+
}
|
|
1422
|
+
if (colStart > colEnd)
|
|
1423
|
+
return null;
|
|
1424
|
+
const rowOff = row * width;
|
|
1425
|
+
// Ignore excluded columns when finding the last content cell: text in
|
|
1426
|
+
// the side panel must not extend a chat-origin highlight or cursor.
|
|
1427
|
+
const rowStart = selection.fence?.colStart ?? 0;
|
|
1428
|
+
let rowEnd = Math.min(selection.fence?.colEnd ?? width - 1, width - 1);
|
|
1429
|
+
const wrappedEnd = row + 1 < screen.height ? screen.softWrap[row + 1] : 0;
|
|
1430
|
+
if (wrappedEnd > 0)
|
|
1431
|
+
rowEnd = Math.min(rowEnd, wrappedEnd - 1);
|
|
1432
|
+
for (let col = rowEnd; col >= rowStart; col--) {
|
|
1433
|
+
const idx = rowOff + col;
|
|
1434
|
+
if (screen.noSelect[idx] === 1 && !selection.includeNoSelectCells)
|
|
1435
|
+
continue;
|
|
1436
|
+
const cell = cellAtIndex(screen, idx);
|
|
1437
|
+
if (cell.width === 2 /* CellWidth.SpacerTail */ || cell.width === 3 /* CellWidth.SpacerHead */)
|
|
1438
|
+
continue;
|
|
1439
|
+
if ((screen.copyRegion?.[idx] ?? 0) !== 0 || cell.char.trim() !== '') {
|
|
1440
|
+
// Soft-wrapped fragments retain source separator spaces; hard lines
|
|
1441
|
+
// trim trailing blanks while keeping the entire final wide glyph.
|
|
1442
|
+
colEnd = Math.min(colEnd, wrappedEnd > 0 ? rowEnd : col + (cell.width === 1 /* CellWidth.Wide */ ? 1 : 0));
|
|
1443
|
+
return colStart <= colEnd ? { start: colStart, end: colEnd } : null;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
return null;
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Resolve the focus-side edge of the visible selection. Blank rows and
|
|
1450
|
+
* padding cannot own a native cursor; step toward the anchor until selected
|
|
1451
|
+
* content is found. Wide glyphs use their head cell, as text copying does.
|
|
1452
|
+
*/
|
|
1453
|
+
export function getSelectionCursor(screen, selection) {
|
|
1454
|
+
const bounds = selectionBounds(selection);
|
|
1455
|
+
if (bounds === null)
|
|
1456
|
+
return null;
|
|
1457
|
+
const forward = comparePoints(selection.anchor, selection.focus) <= 0;
|
|
1458
|
+
const firstRow = Math.max(0, bounds.start.row);
|
|
1459
|
+
const lastRow = Math.min(screen.height - 1, bounds.end.row);
|
|
1460
|
+
const step = forward ? -1 : 1;
|
|
1461
|
+
for (let row = forward ? lastRow : firstRow; row >= firstRow && row <= lastRow; row += step) {
|
|
1462
|
+
const columns = selectedRowColumns(screen, selection, row, bounds.start, bounds.end);
|
|
1463
|
+
if (columns === null)
|
|
1464
|
+
continue;
|
|
1465
|
+
for (let col = forward ? columns.end : columns.start; col >= columns.start && col <= columns.end; col += step) {
|
|
1466
|
+
const idx = row * screen.width + col;
|
|
1467
|
+
if (screen.noSelect[idx] === 1 && !selection.includeNoSelectCells)
|
|
1468
|
+
continue;
|
|
1469
|
+
const cell = cellAtIndex(screen, idx);
|
|
1470
|
+
if (cell.width === 2 /* CellWidth.SpacerTail */ || cell.width === 3 /* CellWidth.SpacerHead */)
|
|
1471
|
+
continue;
|
|
1472
|
+
return { col, row };
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
return null;
|
|
1476
|
+
}
|
|
1401
1477
|
/**
|
|
1402
1478
|
* Apply the selection overlay directly to the screen buffer by changing
|
|
1403
1479
|
* the style of every cell in the selection range. Called after the
|
|
@@ -1426,18 +1502,11 @@ export function applySelectionOverlay(screen, selection, stylePool, images = [])
|
|
|
1426
1502
|
const noSelect = screen.noSelect;
|
|
1427
1503
|
const covered = imageCoveredCells(images, width, screen.height);
|
|
1428
1504
|
for (let row = start.row; row <= end.row && row < screen.height; row++) {
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
// column run — intermediate rows never highlight the chat column.
|
|
1433
|
-
if (selection.fence !== undefined) {
|
|
1434
|
-
colStart = Math.max(colStart, selection.fence.colStart);
|
|
1435
|
-
colEnd = Math.min(colEnd, selection.fence.colEnd);
|
|
1436
|
-
if (colStart > colEnd)
|
|
1437
|
-
continue;
|
|
1438
|
-
}
|
|
1505
|
+
const columns = selectedRowColumns(screen, selection, row, start, end);
|
|
1506
|
+
if (columns === null)
|
|
1507
|
+
continue;
|
|
1439
1508
|
const rowOff = row * width;
|
|
1440
|
-
for (let col =
|
|
1509
|
+
for (let col = columns.start; col <= columns.end; col++) {
|
|
1441
1510
|
const idx = rowOff + col;
|
|
1442
1511
|
// Skip noSelect cells — gutters stay visually unchanged so it's
|
|
1443
1512
|
// clear they're not part of the copy. Surrounding selectable cells
|