@deepseek-harness-tui/dsh-tui 0.16.1 → 0.18.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 +213 -34
- package/assets/plugin-icon.svg +13 -0
- package/assets/windows-installer.cs +308 -0
- package/assets/windows-installer.ps1 +17 -0
- package/bin/dsh-tui.js +64 -5
- package/cli/adapters/dsh/index.mjs +111 -0
- package/cli/adapters/dsh/locate.mjs +73 -0
- package/cli/adapters/dsh/management-plugin.mjs +111 -0
- package/cli/args.mjs +154 -0
- package/cli/contracts.d.ts +48 -0
- package/cli/engine.mjs +92 -0
- package/cli/entry.mjs +48 -0
- package/cli/process.mjs +118 -0
- package/cli/protocol.mjs +23 -0
- package/cli/schema-v1.json +33 -0
- package/cordis.patch.yml +3 -1
- package/cordis.yml +3 -1
- package/guide/dsh-tui-guide/SKILL.md +1 -0
- package/guide/dsh-tui-guide/cli.en.md +114 -0
- package/guide/dsh-tui-guide/cli.md +114 -0
- package/guide/dsh-tui-guide/configuration.en.md +7 -5
- package/guide/dsh-tui-guide/configuration.md +7 -5
- package/guide/dsh-tui-guide/getting-started.en.md +33 -3
- package/guide/dsh-tui-guide/getting-started.md +23 -2
- package/guide/dsh-tui-guide/interaction.en.md +50 -17
- package/guide/dsh-tui-guide/interaction.md +35 -13
- package/guide/dsh-tui-guide/plugins.en.md +63 -11
- package/guide/dsh-tui-guide/plugins.md +41 -7
- package/guide/dsh-tui-guide/user-guide.en.md +55 -34
- package/guide/dsh-tui-guide/user-guide.md +45 -28
- package/lib/settings.json +85 -42
- package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
- package/lib/types/adapter/channel/plugins.js +8 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +2 -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/ports/channel-display.d.ts +10 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +2 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +11 -1
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +7 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.d.ts +60 -0
- package/lib/types/adapter/standard/grants.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.js +74 -0
- package/lib/types/agent/capabilities.d.ts +2 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +15 -1
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/api.d.ts +2 -2
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/events.js +2 -1
- package/lib/types/backends/codex/auth/status.js +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +6 -5
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/events.js +3 -1
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +9 -8
- package/lib/types/channel/history-restore.d.ts.map +1 -1
- package/lib/types/channel/history-restore.js +2 -0
- package/lib/types/channel/interaction.d.ts.map +1 -1
- package/lib/types/channel/interaction.js +1 -0
- package/lib/types/channel/projection.d.ts +1 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +19 -4
- package/lib/types/channel/questions.d.ts +2 -0
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/sanitize.d.ts +14 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +55 -0
- package/lib/types/channel/working-directory.d.ts +9 -0
- package/lib/types/channel/working-directory.d.ts.map +1 -0
- package/lib/types/channel/working-directory.js +7 -0
- package/lib/types/commands.d.ts +8 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +14 -5
- package/lib/types/components/ChatTitle.d.ts +7 -0
- package/lib/types/components/ChatTitle.d.ts.map +1 -0
- package/lib/types/components/ChatTitle.js +15 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
- package/lib/types/components/CodeBlockFrame.js +10 -5
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
- package/lib/types/components/CompactionStatusRow.js +24 -3
- package/lib/types/components/GoalTodoPanel.d.ts +73 -6
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +165 -17
- package/lib/types/components/Markdown.d.ts +9 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +5 -4
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +20 -14
- package/lib/types/components/PluginGrantList.d.ts +45 -0
- package/lib/types/components/PluginGrantList.d.ts.map +1 -0
- package/lib/types/components/PluginGrantList.js +126 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
- package/lib/types/components/PluginInstallPane.js +35 -6
- package/lib/types/components/PluginManagePane.d.ts.map +1 -1
- package/lib/types/components/PluginManagePane.js +65 -8
- package/lib/types/components/PromptInput.d.ts +13 -5
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +190 -108
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +232 -22
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +10 -0
- package/lib/types/components/SubagentDetailScene.d.ts +3 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +17 -1
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +8 -5
- package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +93 -11
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +24 -11
- package/lib/types/components/onboardingModel.d.ts +2 -2
- package/lib/types/components/onboardingModel.js +3 -3
- package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
- package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
- package/lib/types/components/onboardingProviderPlan.js +78 -0
- package/lib/types/components/previewRows.d.ts +19 -0
- package/lib/types/components/previewRows.d.ts.map +1 -0
- package/lib/types/components/previewRows.js +46 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
- package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +18 -10
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/InfoPanel.js +4 -3
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +16 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +8 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +8 -1
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +36 -18
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
- package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
- package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
- package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
- package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
- package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
- package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
- package/lib/types/components/sidePanel/types.d.ts +2 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +39 -7
- package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
- package/lib/types/components/trajectory/MiniWake.js +7 -3
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
- package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/session.js +62 -6
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +18 -4
- package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +11 -1
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +121 -113
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-mentions.js +38 -17
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -5
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +48 -3
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +7 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +2 -1
- package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +192 -13
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +31 -5
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +34 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +31 -4
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mentions.js +21 -7
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +11 -9
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +56 -36
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +3 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +3 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
- package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +2 -2
- package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
- package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
- package/lib/types/dsh-adapter/contract.d.ts +7 -5
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +10 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +1 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.d.ts +29 -0
- package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
- package/lib/types/dsh-adapter/experimental-bundles.js +15 -0
- package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
- package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grant-file.js +178 -0
- package/lib/types/dsh-adapter/host-access.d.ts +4 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +54 -4
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.js +2 -2
- package/lib/types/dsh-adapter/host-dsh.js +3 -3
- package/lib/types/dsh-adapter/index.d.ts +8 -4
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +17 -12
- package/lib/types/dsh-adapter/panels.d.ts +28 -8
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +11 -56
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-install.js +160 -13
- package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-manage.js +240 -51
- package/lib/types/dsh-adapter/plugin.d.ts +81 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +378 -84
- package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +99 -31
- package/lib/types/dsh-adapter/presets.d.ts +19 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +69 -12
- package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
- package/lib/types/dsh-adapter/process-exit.js +1 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +11 -5
- package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
- package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
- package/lib/types/dsh-adapter/row-attachment.js +29 -0
- package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
- package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-tools.js +39 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +73 -0
- package/lib/types/dsh-adapter/status.d.ts +88 -1
- package/lib/types/dsh-adapter/status.d.ts.map +1 -1
- package/lib/types/dsh-adapter/status.js +318 -3
- package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +76 -112
- package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
- package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
- package/lib/types/dsh-adapter/worktree-tool.js +87 -0
- package/lib/types/extensions.d.ts +1 -1
- package/lib/types/extensions.d.ts.map +1 -1
- package/lib/types/force-production-react.js +3 -3
- package/lib/types/heldInputs.d.ts +36 -0
- package/lib/types/heldInputs.d.ts.map +1 -0
- package/lib/types/heldInputs.js +173 -0
- package/lib/types/i18n.d.ts +543 -73
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +265 -46
- package/lib/types/ink/colorize.d.ts +7 -1
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +29 -8
- package/lib/types/ink/components/App.d.ts +2 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +10 -3
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +1 -0
- package/lib/types/ink/dom.d.ts +1 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
- package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-program-status.js +96 -0
- package/lib/types/ink/ink.d.ts +13 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +119 -25
- package/lib/types/ink/output.d.ts +17 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +85 -2
- package/lib/types/ink/parse-keypress.d.ts +1 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +5 -4
- package/lib/types/ink/render-node-to-output.d.ts +2 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +79 -10
- package/lib/types/ink/root.d.ts +8 -0
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/root.js +12 -3
- package/lib/types/ink/screen.d.ts +11 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +44 -0
- package/lib/types/ink/selection.d.ts +7 -2
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +187 -44
- package/lib/types/ink/shutdown-input.d.ts +15 -0
- package/lib/types/ink/shutdown-input.d.ts.map +1 -0
- package/lib/types/ink/shutdown-input.js +28 -0
- package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
- package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
- package/lib/types/ink/sixel-cursor-heal.js +62 -0
- package/lib/types/ink/sixel-graphics.d.ts +6 -0
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +18 -0
- package/lib/types/ink/styles.d.ts +8 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
- package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification-windows.js +433 -0
- package/lib/types/ink/terminal-notification.d.ts +3 -1
- package/lib/types/ink/terminal-notification.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification.js +4 -1
- package/lib/types/ink/terminal-querier.d.ts +9 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +32 -1
- package/lib/types/ink/terminal.d.ts +23 -2
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +32 -2
- package/lib/types/ink/termio/osc.d.ts +2 -1
- package/lib/types/ink/termio/osc.d.ts.map +1 -1
- package/lib/types/ink/termio/osc.js +37 -8
- package/lib/types/ink/termio/osc7501.d.ts +102 -0
- package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
- package/lib/types/ink/termio/osc7501.js +229 -0
- package/lib/types/ink/termio/tokenize.js +5 -7
- package/lib/types/onboardingDraft.d.ts +143 -0
- package/lib/types/onboardingDraft.d.ts.map +1 -0
- package/lib/types/onboardingDraft.js +71 -0
- package/lib/types/panels.d.ts +1 -1
- package/lib/types/panels.d.ts.map +1 -1
- package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
- package/lib/types/screens/AgentTranscriptScene.js +5 -1
- package/lib/types/screens/Chat.d.ts +6 -6
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +394 -141
- package/lib/types/screens/Launchpad.d.ts +8 -2
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +32 -12
- package/lib/types/screens/Onboarding.d.ts +22 -3
- package/lib/types/screens/Onboarding.d.ts.map +1 -1
- package/lib/types/screens/Onboarding.js +606 -36
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +31 -21
- package/lib/types/screens/Settings.d.ts +5 -1
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +528 -51
- package/lib/types/screens/StatusLine.d.ts +9 -3
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +91 -15
- package/lib/types/screens/StatusMetrics.d.ts +2 -11
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +20 -14
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
- 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 +13 -21
- package/lib/types/sessionMounts.d.ts +14 -0
- package/lib/types/sessionMounts.d.ts.map +1 -1
- package/lib/types/sessionMounts.js +20 -9
- package/lib/types/sessions/format.d.ts +39 -0
- package/lib/types/sessions/format.d.ts.map +1 -1
- package/lib/types/sessions/format.js +83 -0
- package/lib/types/sessions/resumeFailure.d.ts +4 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +12 -4
- package/lib/types/sessions/workspaceCounts.d.ts +6 -0
- package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
- package/lib/types/sessions/workspaceCounts.js +24 -0
- package/lib/types/settings/definitions.d.ts +24 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +40 -15
- package/lib/types/tips.js +2 -2
- package/lib/types/tuiDisplayPrefs.d.ts +113 -5
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +276 -14
- package/lib/types/update.d.ts +15 -14
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +163 -115
- package/lib/types/updateProcess.d.ts +28 -0
- package/lib/types/updateProcess.d.ts.map +1 -0
- package/lib/types/updateProcess.js +135 -0
- package/lib/types/utils/inputWordBoundary.d.ts +5 -0
- package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
- package/lib/types/utils/inputWordBoundary.js +18 -0
- package/lib/types/utils/keymap.d.ts +1 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +6 -1
- package/lib/types/utils/paths.d.ts +15 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +25 -0
- package/lib/types/windowsInstaller.d.ts +4 -0
- package/lib/types/windowsInstaller.d.ts.map +1 -0
- package/lib/types/windowsInstaller.js +237 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +130 -111
- package/presets/liangshen/custom-bash.mjs +13 -1
- package/presets/liangshen/instruction-hint.mjs +4 -1
- package/presets/liangshen/skill-search.mjs +14 -2
- package/presets/winbash.mjs +16 -4
- package/tui-profile/feed/README.md +17 -8
- package/tui-profile/feed/first-party.json +1 -1
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Box, Text } from '../ui.js';
|
|
4
4
|
import * as JsDiff from 'diff';
|
|
5
5
|
import { extname } from 'node:path';
|
|
6
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
6
7
|
import { getCliHighlightPromise } from '../terminal-utils/cliHighlight.js';
|
|
7
8
|
import { highlightLines, syntaxThemeSignature } from '../terminal-utils/syntaxRuns.js';
|
|
8
9
|
// Backward-compatible re-export: repro scripts import chalkFromToken from
|
|
@@ -13,6 +14,7 @@ import { getTheme } from '../theme.js';
|
|
|
13
14
|
import { t } from '../i18n.js';
|
|
14
15
|
import { useTheme } from './design-system/ThemeProvider.js';
|
|
15
16
|
import { revealLinesOf } from './smoothReveal.js';
|
|
17
|
+
import { getGraphemeSegmenter } from '../utils/intl.js';
|
|
16
18
|
import { primaryComboString } from '../utils/keymap.js';
|
|
17
19
|
import { isPatchDiff, parseFilePatch, patchHeader, patchHeaderText } from './diffPatch.js';
|
|
18
20
|
/** Replace tabs so width math and alignment hold (pi convention). */
|
|
@@ -270,8 +272,140 @@ function alignPatchFile(fileIndex, parsed) {
|
|
|
270
272
|
});
|
|
271
273
|
return { rows, oldSide, newSide };
|
|
272
274
|
}
|
|
275
|
+
// --- visual rows ------------------------------------------------------------
|
|
276
|
+
/** Expanded bodies walk a bounded VISUAL-row window — the two-pane twin of the
|
|
277
|
+
* unified body's 400-line window. It bounds PAINTED rows, not the work: every
|
|
278
|
+
* shown line is still wrapped on each frame (O(body) per render). The row
|
|
279
|
+
* that crosses the window edge is cut there, so the painted body never
|
|
280
|
+
* exceeds the window; the rows above that edge are painted whole. */
|
|
281
|
+
const VERBOSE_VISUAL_ROW_WINDOW = 400;
|
|
282
|
+
/** Flatten styled runs into styled graphemes, segmenting the JOINED line.
|
|
283
|
+
*
|
|
284
|
+
* Cutting a run by code unit would split a surrogate pair or a combining
|
|
285
|
+
* sequence, so the wrap walks graphemes instead. Segmenting each run on its
|
|
286
|
+
* own is not enough either: the word diff tokenizes non-Latin text per code
|
|
287
|
+
* point (jsdiff's `extendedWordChars` only covers Latin-1 / Latin Extended),
|
|
288
|
+
* so a changed family emoji or an edited combining mark leaves runs that end
|
|
289
|
+
* inside one grapheme cluster — the ZWJ or the accent lands in the next run.
|
|
290
|
+
* Segmenting the flattened text reunites the cluster; each grapheme keeps the
|
|
291
|
+
* style of the run its first code unit came from. */
|
|
292
|
+
function graphemes(segments) {
|
|
293
|
+
if (segments.length === 0)
|
|
294
|
+
return [];
|
|
295
|
+
const text = segments.map(segment => segment.text).join('');
|
|
296
|
+
// One style slot per UTF-16 code unit: Intl.Segmenter reports code-unit
|
|
297
|
+
// indices, so this maps a cluster back to the run it starts in.
|
|
298
|
+
const styles = new Array(text.length);
|
|
299
|
+
let at = 0;
|
|
300
|
+
for (const segment of segments) {
|
|
301
|
+
for (let index = 0; index < segment.text.length; index++)
|
|
302
|
+
styles[at + index] = segment;
|
|
303
|
+
at += segment.text.length;
|
|
304
|
+
}
|
|
305
|
+
const out = [];
|
|
306
|
+
for (const { segment, index } of getGraphemeSegmenter().segment(text)) {
|
|
307
|
+
const style = styles[index];
|
|
308
|
+
out.push({ text: segment, changed: style.changed, color: style.color });
|
|
309
|
+
}
|
|
310
|
+
return out;
|
|
311
|
+
}
|
|
312
|
+
/** Join graphemes back into runs, merging neighbours that share a style so a
|
|
313
|
+
* wrapped row paints the same runs it would have painted unwrapped. */
|
|
314
|
+
function toSegments(line) {
|
|
315
|
+
const out = [];
|
|
316
|
+
for (const grapheme of line) {
|
|
317
|
+
const last = out[out.length - 1];
|
|
318
|
+
if (last !== undefined && last.changed === grapheme.changed && last.color === grapheme.color) {
|
|
319
|
+
out[out.length - 1] = { text: last.text + grapheme.text, changed: last.changed, color: last.color };
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
out.push({ text: grapheme.text, changed: grapheme.changed, color: grapheme.color });
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return out;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Split one logical line into visual rows no wider than `budget` display
|
|
329
|
+
* cells. A row prefers to end at the last space that fits, so prose breaks
|
|
330
|
+
* between words and only an unbroken run (a URL, a minified line) is cut
|
|
331
|
+
* mid-word. The space a break lands on stays at the end of the row it closes,
|
|
332
|
+
* so joining the rows reproduces the input exactly.
|
|
333
|
+
*
|
|
334
|
+
* Empty source text still occupies one row; only a missing side has no rows.
|
|
335
|
+
*/
|
|
336
|
+
function wrapSegments(segments, budget) {
|
|
337
|
+
const all = graphemes(segments);
|
|
338
|
+
const rows = [];
|
|
339
|
+
let start = 0;
|
|
340
|
+
while (start < all.length) {
|
|
341
|
+
let width = 0;
|
|
342
|
+
let end = start;
|
|
343
|
+
/** Exclusive index just past the last space that fits on this row. */
|
|
344
|
+
let breakAt = -1;
|
|
345
|
+
while (end < all.length) {
|
|
346
|
+
const grapheme = all[end];
|
|
347
|
+
const graphemeWidth = stringWidth(grapheme.text);
|
|
348
|
+
// A single grapheme wider than the whole budget still has to land
|
|
349
|
+
// somewhere: it keeps a row of its own instead of disappearing.
|
|
350
|
+
if (width + graphemeWidth > budget && end > start)
|
|
351
|
+
break;
|
|
352
|
+
width += graphemeWidth;
|
|
353
|
+
end += 1;
|
|
354
|
+
if (/^\s+$/u.test(grapheme.text) && end < all.length)
|
|
355
|
+
breakAt = end;
|
|
356
|
+
}
|
|
357
|
+
if (end < all.length && breakAt > start)
|
|
358
|
+
end = breakAt;
|
|
359
|
+
rows.push(toSegments(all.slice(start, end)));
|
|
360
|
+
start = end;
|
|
361
|
+
}
|
|
362
|
+
return rows.length > 0 ? rows : [[]];
|
|
363
|
+
}
|
|
364
|
+
/** How many graphemes of a pane line the renderer's `truncate` drops. It cuts
|
|
365
|
+
* only a line WIDER than the columns it is handed (`src/ink/wrap-text.ts`
|
|
366
|
+
* returns the text untouched when it fits); once it does cut, it spends one
|
|
367
|
+
* of those columns on `…` and keeps `budget - 1` cells of text. That "-1" is
|
|
368
|
+
* the renderer's, not this file's — so a line that fits its budget whole
|
|
369
|
+
* loses nothing. */
|
|
370
|
+
function clippedGraphemes(segments, budget) {
|
|
371
|
+
if (segments === undefined)
|
|
372
|
+
return 0;
|
|
373
|
+
const all = graphemes(segments);
|
|
374
|
+
const widths = all.map(grapheme => stringWidth(grapheme.text));
|
|
375
|
+
if (widths.reduce((total, width) => total + width, 0) <= budget)
|
|
376
|
+
return 0;
|
|
377
|
+
const fits = budget - 1;
|
|
378
|
+
let width = 0;
|
|
379
|
+
let visible = 0;
|
|
380
|
+
while (visible < all.length) {
|
|
381
|
+
const next = width + widths[visible];
|
|
382
|
+
if (next > fits)
|
|
383
|
+
break;
|
|
384
|
+
width = next;
|
|
385
|
+
visible += 1;
|
|
386
|
+
}
|
|
387
|
+
return all.length - visible;
|
|
388
|
+
}
|
|
273
389
|
// --- rendering --------------------------------------------------------------
|
|
274
|
-
|
|
390
|
+
/** Gutter text of one painted row: the status marker alone, or a right-aligned
|
|
391
|
+
* real line number plus the marker (patch diffs). The new pane keeps the
|
|
392
|
+
* leading cell the old pane spends on nothing, so the two text columns start
|
|
393
|
+
* the same distance from their divider; the one-cell gap between gutter and
|
|
394
|
+
* text is the caller's. */
|
|
395
|
+
function gutterText(kind, tone, lineNo, hasContent, lineNoWidth) {
|
|
396
|
+
// Status gutter instead of line numbers: ToolFileDiff has no file
|
|
397
|
+
// offsets, and an invented number misleads (issue #250, P2-3).
|
|
398
|
+
const marker = kind === 'context' ? ' ' : tone === 'old' ? '−' : '+';
|
|
399
|
+
const numbered = lineNoWidth > 0
|
|
400
|
+
? `${(lineNo === undefined || !hasContent ? '' : String(lineNo)).padStart(lineNoWidth)} ${marker}`
|
|
401
|
+
: marker;
|
|
402
|
+
return tone === 'new' ? ` ${numbered}` : numbered;
|
|
403
|
+
}
|
|
404
|
+
/** One pane of one terminal row. `prefix` is the gutter already padded to its
|
|
405
|
+
* final width — a continuation row of a wrapped line repeats that width in
|
|
406
|
+
* spaces so its text lines up with the row above. `segments` is undefined
|
|
407
|
+
* when this pane has nothing to paint here (blank side, or a shorter wrap). */
|
|
408
|
+
function PaneLine({ segments, prefix, kind, width, tone, toolBackground, paneId, padding, continuation, }) {
|
|
275
409
|
const ordinaryBackground = toolBackground === 'subtle'
|
|
276
410
|
? 'toolCardBackgroundDim'
|
|
277
411
|
: toolBackground === 'strong'
|
|
@@ -285,14 +419,10 @@ function PaneLine({ side, kind, width, tone, toolBackground, padLeft = false, li
|
|
|
285
419
|
? 'diffRemovedDimmed'
|
|
286
420
|
: 'diffAddedDimmed';
|
|
287
421
|
const wordColor = tone === 'old' ? 'diffRemovedWord' : 'diffAddedWord';
|
|
288
|
-
|
|
289
|
-
// offsets, and an invented number misleads (issue #250, P2-3).
|
|
290
|
-
const marker = kind === 'context' ? ' ' : tone === 'old' ? '−' : '+';
|
|
291
|
-
const numbered = lineNoWidth > 0 ? `${(lineNo === undefined || side === undefined ? '' : String(lineNo)).padStart(lineNoWidth)} ${marker}` : marker;
|
|
292
|
-
const prefix = padLeft ? ` ${numbered}` : numbered;
|
|
293
|
-
return (_jsxs(Box, { width: width, flexShrink: 0, backgroundColor: backgroundColor, children: [_jsx(Text, { dimColor: true, backgroundColor: backgroundColor, children: `${prefix} ` }), side === undefined ? (_jsx(Text, { backgroundColor: backgroundColor, children: " " })) : (_jsx(Text, { wrap: "truncate", backgroundColor: backgroundColor, children: side.segments.map((segment, index) => segment.changed ? (_jsx(Text, { color: wordColor, bold: true, backgroundColor: backgroundColor, children: segment.text }, index)) : (_jsx(Text, { color: segment.color, backgroundColor: backgroundColor, children: segment.text }, index))) }))] }));
|
|
422
|
+
return (_jsxs(Box, { width: width, flexShrink: 0, backgroundColor: backgroundColor, selectionPane: paneId, noSelect: padding, softWrapContinuation: continuation, children: [_jsx(Box, { noSelect: true, children: _jsx(Text, { dimColor: true, backgroundColor: backgroundColor, children: prefix }) }), segments === undefined ? (_jsx(Text, { backgroundColor: backgroundColor, children: " " })) : (_jsx(Text, { wrap: "truncate", backgroundColor: backgroundColor, children: segments.map((segment, index) => segment.changed ? (_jsx(Text, { color: wordColor, bold: true, backgroundColor: backgroundColor, children: segment.text }, index)) : (_jsx(Text, { color: segment.color, backgroundColor: backgroundColor, children: segment.text }, index))) }))] }));
|
|
294
423
|
}
|
|
295
424
|
export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground = 'none', reveal, }) {
|
|
425
|
+
const paneId = React.useId();
|
|
296
426
|
const [hl, setHl] = React.useState(null);
|
|
297
427
|
React.useEffect(() => {
|
|
298
428
|
let mounted = true;
|
|
@@ -338,6 +468,18 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground =
|
|
|
338
468
|
prevPath = diff.path;
|
|
339
469
|
rows.push(...alignFileDiff(fileIndex, diff.oldText, diff.newText));
|
|
340
470
|
});
|
|
471
|
+
// Determine each file's sides from its complete alignment, before folding
|
|
472
|
+
// or smooth reveal can hide the opposite side and make the layout jump.
|
|
473
|
+
const oldFiles = new Set();
|
|
474
|
+
const newFiles = new Set();
|
|
475
|
+
for (const row of rows) {
|
|
476
|
+
if ('separator' in row)
|
|
477
|
+
continue;
|
|
478
|
+
if (row.oldIndex !== undefined)
|
|
479
|
+
oldFiles.add(row.fileIndex);
|
|
480
|
+
if (row.newIndex !== undefined)
|
|
481
|
+
newFiles.add(row.fileIndex);
|
|
482
|
+
}
|
|
341
483
|
const totalRows = rows.length;
|
|
342
484
|
const capped = verbose || totalRows <= maxRows || totalRows - maxRows === 1;
|
|
343
485
|
const visible = capped ? rows : rows.slice(0, maxRows);
|
|
@@ -349,6 +491,7 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground =
|
|
|
349
491
|
: visible.length;
|
|
350
492
|
const shown = revealedRows >= visible.length ? visible : visible.slice(0, revealedRows);
|
|
351
493
|
const paneWidth = Math.max(20, Math.floor((width - 1) / 2));
|
|
494
|
+
const blockWidth = Math.max(width, paneWidth * 2 + 1);
|
|
352
495
|
// Whole-hunk highlight per file (multi-line lexer state preserved);
|
|
353
496
|
// only the visible rows merge syntax runs with word flags below.
|
|
354
497
|
const fileSyntax = diffs.map((diff, fileIndex) => {
|
|
@@ -368,20 +511,87 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground =
|
|
|
368
511
|
next: highlightLines(expandTabs(diff.newText), language, hl, syntaxTheme, themeSig),
|
|
369
512
|
};
|
|
370
513
|
});
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
514
|
+
// Resolve the shown rows into paint plans. Collapsed paints one terminal row
|
|
515
|
+
// per logical row (#245's height contract); expanded pre-wraps each pane and
|
|
516
|
+
// both panes paint the taller column's row count.
|
|
517
|
+
const windowLimit = verbose ? VERBOSE_VISUAL_ROW_WINDOW : Number.POSITIVE_INFINITY;
|
|
518
|
+
const paint = [];
|
|
519
|
+
/** Collapsed: graphemes the renderer clipped on the painted rows of both
|
|
520
|
+
* panes (0 = nothing was clipped, so no hint). */
|
|
521
|
+
let clippedChars = 0;
|
|
522
|
+
let paintedRows = 0;
|
|
523
|
+
/** Visual rows the whole shown body needs — what the window reports. */
|
|
524
|
+
let totalVisualRows = 0;
|
|
525
|
+
for (const row of shown) {
|
|
526
|
+
if ('separator' in row) {
|
|
527
|
+
totalVisualRows += 1;
|
|
528
|
+
if (paintedRows < windowLimit) {
|
|
529
|
+
paint.push({ separator: row.separator });
|
|
530
|
+
paintedRows += 1;
|
|
531
|
+
}
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
const syntax = fileSyntax[row.fileIndex];
|
|
535
|
+
const oldRuns = row.oldIndex !== undefined ? syntax?.old?.[row.oldIndex] : undefined;
|
|
536
|
+
const newRuns = row.newIndex !== undefined ? syntax?.next?.[row.newIndex] : undefined;
|
|
537
|
+
const oldSegments = row.oldWords === undefined
|
|
538
|
+
? undefined
|
|
539
|
+
: oldRuns !== undefined ? mergeRuns(oldRuns, row.oldWords) : row.oldWords;
|
|
540
|
+
const newSegments = row.newWords === undefined
|
|
541
|
+
? undefined
|
|
542
|
+
: newRuns !== undefined ? mergeRuns(newRuns, row.newWords) : row.newWords;
|
|
543
|
+
const lineNoWidth = patchFiles.get(row.fileIndex)?.lineNoWidth ?? 0;
|
|
544
|
+
// An add row leaves the old pane blank and vice versa, so the blank side
|
|
545
|
+
// paints the "context" tone there — and, being empty, no line number.
|
|
546
|
+
const leftKind = row.kind === 'add' ? 'context' : row.kind;
|
|
547
|
+
const rightKind = row.kind === 'del' ? 'context' : row.kind;
|
|
548
|
+
const leftPrefix = `${gutterText(leftKind, 'old', row.oldNo, oldSegments !== undefined, lineNoWidth)} `;
|
|
549
|
+
const rightPrefix = `${gutterText(rightKind, 'new', row.newNo, newSegments !== undefined, lineNoWidth)} `;
|
|
550
|
+
const singleSide = oldFiles.has(row.fileIndex) === newFiles.has(row.fileIndex)
|
|
551
|
+
? undefined : oldFiles.has(row.fileIndex) ? 'old' : 'new';
|
|
552
|
+
const rowPaneWidth = singleSide === undefined ? paneWidth : blockWidth;
|
|
553
|
+
const leftBudget = rowPaneWidth - stringWidth(leftPrefix);
|
|
554
|
+
const rightBudget = rowPaneWidth - stringWidth(rightPrefix);
|
|
555
|
+
if (!verbose) {
|
|
556
|
+
clippedChars += clippedGraphemes(oldSegments, leftBudget);
|
|
557
|
+
clippedChars += clippedGraphemes(newSegments, rightBudget);
|
|
558
|
+
}
|
|
559
|
+
const leftRows = oldSegments === undefined
|
|
560
|
+
? []
|
|
561
|
+
: verbose ? wrapSegments(oldSegments, leftBudget) : [oldSegments];
|
|
562
|
+
const rightRows = newSegments === undefined
|
|
563
|
+
? []
|
|
564
|
+
: verbose ? wrapSegments(newSegments, rightBudget) : [newSegments];
|
|
565
|
+
// Neither pane can run ahead: the next logical row starts below the
|
|
566
|
+
// taller column. A row with no content on either side still paints one.
|
|
567
|
+
const height = Math.max(leftRows.length, rightRows.length, 1);
|
|
568
|
+
totalVisualRows += height;
|
|
569
|
+
if (paintedRows < windowLimit) {
|
|
570
|
+
// One logical line has no height bound of its own (a single 40k-cell
|
|
571
|
+
// line wraps into ~740 rows), so the row that crosses the window edge is
|
|
572
|
+
// cut to the rows left in it. Only that last row is ever cut; leaving
|
|
573
|
+
// paintedRows short of totalVisualRows is what shows the window notice.
|
|
574
|
+
const take = Math.min(height, windowLimit - paintedRows);
|
|
575
|
+
paint.push({
|
|
576
|
+
singleSide,
|
|
577
|
+
paneWidth: rowPaneWidth,
|
|
578
|
+
leftPrefix,
|
|
579
|
+
rightPrefix,
|
|
580
|
+
leftRows: take < height ? leftRows.slice(0, take) : leftRows,
|
|
581
|
+
rightRows: take < height ? rightRows.slice(0, take) : rightRows,
|
|
582
|
+
leftKind,
|
|
583
|
+
rightKind,
|
|
584
|
+
height: take,
|
|
585
|
+
});
|
|
586
|
+
paintedRows += take;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
return (_jsxs(Box, { flexDirection: "column", width: blockWidth, children: [paint.map((plan, index) => {
|
|
590
|
+
if ('separator' in plan) {
|
|
591
|
+
return (_jsx(Box, { width: blockWidth, children: _jsx(Text, { dimColor: true, wrap: "truncate", children: plan.separator === '⋯' ? '⋯' : ` ${plan.separator}` }) }, index));
|
|
374
592
|
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
? undefined
|
|
380
|
-
: { segments: oldRuns !== undefined ? mergeRuns(oldRuns, row.oldWords) : row.oldWords };
|
|
381
|
-
const newSide = row.newWords === undefined
|
|
382
|
-
? undefined
|
|
383
|
-
: { segments: newRuns !== undefined ? mergeRuns(newRuns, row.newWords) : row.newWords };
|
|
384
|
-
const lineNoWidth = patchFiles.get(row.fileIndex)?.lineNoWidth ?? 0;
|
|
385
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(PaneLine, { side: oldSide, kind: row.kind === 'add' ? 'context' : row.kind, tone: "old", width: paneWidth, toolBackground: toolBackground, lineNo: row.oldNo, lineNoWidth: lineNoWidth }), _jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { dimColor: true, children: "\u2502" }) }), _jsx(PaneLine, { side: newSide, kind: row.kind === 'del' ? 'context' : row.kind, tone: "new", width: paneWidth, toolBackground: toolBackground, padLeft: true, lineNo: row.newNo, lineNoWidth: lineNoWidth })] }, index));
|
|
386
|
-
}), hidden > 0 && (_jsx(Text, { dimColor: true, children: t('lines-folded-expand', { n: hidden, key: primaryComboString('transcript') }) }))] }));
|
|
593
|
+
const leftPad = ' '.repeat(stringWidth(plan.leftPrefix));
|
|
594
|
+
const rightPad = ' '.repeat(stringWidth(plan.rightPrefix));
|
|
595
|
+
return Array.from({ length: plan.height }, (_, visual) => (_jsxs(Box, { flexDirection: "row", children: [plan.singleSide !== 'new' && _jsx(PaneLine, { padding: plan.leftRows[visual] === undefined, paneId: paneId + '-old', continuation: visual > 0 && plan.leftRows[visual] !== undefined ? stringWidth(plan.leftPrefix) + stringWidth(plan.leftRows[visual - 1].map(s => s.text).join('')) : undefined, segments: plan.leftRows[visual], prefix: visual === 0 ? plan.leftPrefix : leftPad, kind: plan.leftKind, tone: "old", width: plan.paneWidth, toolBackground: toolBackground }), plan.singleSide === undefined && _jsx(Box, { width: 1, flexShrink: 0, noSelect: true, children: _jsx(Text, { dimColor: true, children: "\u2502" }) }), plan.singleSide !== 'old' && _jsx(PaneLine, { padding: plan.rightRows[visual] === undefined, paneId: paneId + '-new', continuation: visual > 0 && plan.rightRows[visual] !== undefined ? stringWidth(plan.rightPrefix) + stringWidth(plan.rightRows[visual - 1].map(s => s.text).join('')) : undefined, segments: plan.rightRows[visual], prefix: visual === 0 ? plan.rightPrefix : rightPad, kind: plan.rightKind, tone: "new", width: plan.paneWidth, toolBackground: toolBackground })] }, `${index}-${visual}`)));
|
|
596
|
+
}), hidden > 0 && (_jsx(Text, { dimColor: true, children: t('lines-folded-expand', { n: hidden, key: primaryComboString('transcript') }) })), clippedChars > 0 && (_jsx(Text, { dimColor: true, children: t('tool-card-lines-hidden', { parts: t('tool-card-chars-unit', { n: clippedChars }), key: primaryComboString('transcript') }) })), paintedRows < totalVisualRows && (_jsx(Text, { dimColor: true, children: t('tool-card-window-shown-wrapped', { shown: paintedRows, total: totalVisualRows }) }))] }));
|
|
387
597
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentDashboard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"SubagentDashboard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAOhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAI1E,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IACzC;mDAC+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;0BACsB;IACtB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC;6DACyD;IACzD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf;2DACuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAOjF;AAED,yCAAyC;AACzC,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG,KAAK,CAAC,SAAS,CAWhF;AAgED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAyS1C"}
|
|
@@ -5,6 +5,7 @@ import { SubagentCard, teamStatusGlyph } from './SubagentCard.js';
|
|
|
5
5
|
import { t } from '../i18n.js';
|
|
6
6
|
import { Divider } from './design-system/Divider.js';
|
|
7
7
|
import { isPlainReturnInput } from '../utils/modifiers.js';
|
|
8
|
+
import { actionMatches } from '../utils/keymap.js';
|
|
8
9
|
import { usePanelInput } from './sidePanel/usePanelInput.js';
|
|
9
10
|
import { AgentMessagesSummary } from './messages/AgentMessageFlow.js';
|
|
10
11
|
import { isTeamTaskBlocked, teamDashboardModel, teamTaskProgress } from './teamRoster.js';
|
|
@@ -118,6 +119,15 @@ export function SubagentDashboard({ subagents, team, sessionId, peers, onClose,
|
|
|
118
119
|
const panelKeyHandler = (input, key) => {
|
|
119
120
|
if (key.escape === true || (key.ctrl === true && input === 'c'))
|
|
120
121
|
return false;
|
|
122
|
+
// 分栏在渲染时 keymap 的 `paste` 组合(可重映射,macOS 上是 Cmd+V)先
|
|
123
|
+
// 投递给活动面板:粘贴组合本身(含重映射到方向键等命名键)不触发表面动作。
|
|
124
|
+
if (actionMatches('paste', input, key, true))
|
|
125
|
+
return false;
|
|
126
|
+
// 带修饰的字母同样不触发字母快捷键(Cmd+V 不能命中下面的 v)。方向键/Enter
|
|
127
|
+
// 保持面板自己的语义(Cmd+↑/↓ 移焦点、Cmd+Enter 选中;isPanelPlainReturn
|
|
128
|
+
// 不转发 super),不能被粘贴守卫一并吃掉。
|
|
129
|
+
if ((key.ctrl === true || key.meta === true || key.super === true) && /^[a-z]$/u.test(input.toLowerCase()))
|
|
130
|
+
return false;
|
|
121
131
|
if (key.upArrow === true) {
|
|
122
132
|
moveFocus(-1);
|
|
123
133
|
scrollRef.current?.scrollBy(-3);
|
|
@@ -4,6 +4,8 @@ import type { AgentComposeTarget, AgentMessageControl, AgentMessageView } from '
|
|
|
4
4
|
import { type TranscriptLoader } from './messages/subagentTranscript.js';
|
|
5
5
|
export interface SubagentDetailSceneProps {
|
|
6
6
|
subagent: SubagentState;
|
|
7
|
+
/** Called only while this specific failed child is visible. */
|
|
8
|
+
onFailureRead?: (subagent: SubagentState) => void;
|
|
7
9
|
onBack: () => void;
|
|
8
10
|
onInterrupt?: (agentId: string) => void;
|
|
9
11
|
/** The child's full transcript (`subagentControl.history`). Absent = no
|
|
@@ -33,5 +35,5 @@ export interface SubagentDetailSceneProps {
|
|
|
33
35
|
* seam only accepts continuable children, and one-shot spawn children are
|
|
34
36
|
* disposed at settlement, so the affordance would be a dead control.
|
|
35
37
|
*/
|
|
36
|
-
export declare function SubagentDetailScene({ subagent, onBack, onInterrupt, loadTranscript, onOpenView, messages, compose, variant, focused, visible, }: SubagentDetailSceneProps): React.ReactNode;
|
|
38
|
+
export declare function SubagentDetailScene({ subagent, onFailureRead, onBack, onInterrupt, loadTranscript, onOpenView, messages, compose, variant, focused, visible, }: SubagentDetailSceneProps): React.ReactNode;
|
|
37
39
|
//# sourceMappingURL=SubagentDetailScene.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentDetailScene.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDetailScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"SubagentDetailScene.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDetailScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAA;AA+JzC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,aAAa,CAAA;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IACjD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;qDAEiD;IACjD,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACxF;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAa,EACb,OAAO,EACP,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,wBAAwB,GAAG,KAAK,CAAC,SAAS,CAomB5C"}
|
|
@@ -10,6 +10,7 @@ import { t } from '../i18n.js';
|
|
|
10
10
|
import { Divider } from './design-system/Divider.js';
|
|
11
11
|
import { ExitButton, isPanelPlainReturn } from './SubagentDashboard.js';
|
|
12
12
|
import { isPlainReturnInput } from '../utils/modifiers.js';
|
|
13
|
+
import { actionMatches } from '../utils/keymap.js';
|
|
13
14
|
import { toolNameColor } from './messages/AssistantToolUseMessage.js';
|
|
14
15
|
import { Markdown } from './Markdown.js';
|
|
15
16
|
import { getCliHighlightPromise } from '../terminal-utils/cliHighlight.js';
|
|
@@ -116,7 +117,11 @@ function isActivityLine(text) {
|
|
|
116
117
|
* seam only accepts continuable children, and one-shot spawn children are
|
|
117
118
|
* disposed at settlement, so the affordance would be a dead control.
|
|
118
119
|
*/
|
|
119
|
-
export function SubagentDetailScene({ subagent, onBack, onInterrupt, loadTranscript, onOpenView, messages = [], compose, variant = 'default', focused = true, visible = true, }) {
|
|
120
|
+
export function SubagentDetailScene({ subagent, onFailureRead, onBack, onInterrupt, loadTranscript, onOpenView, messages = [], compose, variant = 'default', focused = true, visible = true, }) {
|
|
121
|
+
React.useEffect(() => {
|
|
122
|
+
if (visible && subagent.status === 'failed')
|
|
123
|
+
onFailureRead?.(subagent);
|
|
124
|
+
}, [visible, subagent, onFailureRead]);
|
|
120
125
|
const panelMode = variant === 'panel';
|
|
121
126
|
const scrollRef = React.useRef(null);
|
|
122
127
|
const { rows, columns } = useTerminalSize();
|
|
@@ -318,6 +323,12 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, loadTranscr
|
|
|
318
323
|
// 的 Esc 回退是「焦点回聊天」)。其余未认的键返回 false,让 [/]、数字、
|
|
319
324
|
// z、+/- 继续可用。
|
|
320
325
|
const panelKeyHandler = (input, key) => {
|
|
326
|
+
// 分栏在渲染时 keymap 的 `paste` 组合(可重映射,macOS 上是 Cmd+V)先
|
|
327
|
+
// 投递给活动面板:粘贴组合本身(含重映射到方向键等命名键)不触发表面动作。
|
|
328
|
+
// 必须排在 composer 转发之前:否则重映射到 ctrl+backspace / ctrl+← 的
|
|
329
|
+
// 粘贴键会在子代理 composer 里删字/移光标(Cmd+V 还会插入字面 v)。
|
|
330
|
+
if (actionMatches('paste', input, key, true))
|
|
331
|
+
return false;
|
|
321
332
|
// composer 聚焦时键先给编辑器(含 Esc);↑/↓ 仍滚动正文。
|
|
322
333
|
if (compose !== undefined && composerFocused) {
|
|
323
334
|
if (key.upArrow === true || key.downArrow === true) {
|
|
@@ -330,6 +341,11 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, loadTranscr
|
|
|
330
341
|
onBack();
|
|
331
342
|
return true;
|
|
332
343
|
}
|
|
344
|
+
// 带修饰的字母同样不触发字母快捷键(Cmd+V 不能命中下面的 v)。方向键/Enter
|
|
345
|
+
// 保持面板自己的语义(Cmd+←/→ 翻页、Cmd+Enter 折叠/返回;isPanelPlainReturn
|
|
346
|
+
// 不转发 super),不能被粘贴守卫一并吃掉。
|
|
347
|
+
if ((key.ctrl === true || key.meta === true || key.super === true) && /^[a-z]$/u.test(input.toLowerCase()))
|
|
348
|
+
return false;
|
|
333
349
|
if (key.leftArrow === true) {
|
|
334
350
|
turnPage(-1);
|
|
335
351
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Whale.d.ts","sourceRoot":"","sources":["../../../src/components/Whale.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Whale.d.ts","sourceRoot":"","sources":["../../../src/components/Whale.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjF;;;;;;;;GAQG;AAEH,KAAK,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAoB5C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,GAAG,GAAG,SAAS,GAC/C,MAAM,EAAE,CA2CV;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC,GAAG,MAAM,EAAE,CAG9G;AAWD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,EAAE,CAO/D;AAGD,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACvB,UAAiC,EACjC,IAAI,EACJ,KAAK,GACN,EAAE;IACD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,KAAK,CAAC,SAAS,CAWlB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { backgroundOpenCode, foregroundOpenCode } from '../ink/colorize.js';
|
|
2
3
|
import { Box, Text } from '../ui.js';
|
|
3
4
|
import { WHALE_FRAMES } from './whaleFrames.js';
|
|
4
5
|
import { composeWhaleGrid, poseKey } from './whaleLayers.js';
|
|
@@ -11,8 +12,8 @@ const PALETTE = {
|
|
|
11
12
|
H: [204, 51, 153],
|
|
12
13
|
Z: [128, 128, 128],
|
|
13
14
|
};
|
|
14
|
-
const fg = (rgb) =>
|
|
15
|
-
const bg = (rgb) =>
|
|
15
|
+
const fg = (rgb) => foregroundOpenCode(`rgb(${rgb[0]},${rgb[1]},${rgb[2]})`);
|
|
16
|
+
const bg = (rgb) => backgroundOpenCode(`rgb(${rgb[0]},${rgb[1]},${rgb[2]})`);
|
|
16
17
|
const RESET = '\x1b[0m';
|
|
17
18
|
/** Erase from the cursor to the end of the physical line (default colors). */
|
|
18
19
|
const ERASE_TO_EOL = '\x1b[K';
|
|
@@ -51,11 +52,13 @@ export function renderCellRows(width, height, pixel) {
|
|
|
51
52
|
// background, and SGR persists across cells — a bg left over from
|
|
52
53
|
// the previous cell would paint a phantom pixel into the empty half
|
|
53
54
|
// (the contour noise of the sprite). Reset it explicitly.
|
|
54
|
-
|
|
55
|
+
const color = fg(up);
|
|
56
|
+
seq = color === '' ? '' : color + BG_DEFAULT;
|
|
55
57
|
ch = '▀';
|
|
56
58
|
}
|
|
57
59
|
else if (lo !== undefined) {
|
|
58
|
-
|
|
60
|
+
const color = fg(lo);
|
|
61
|
+
seq = color === '' ? '' : color + BG_DEFAULT;
|
|
59
62
|
ch = '▄';
|
|
60
63
|
}
|
|
61
64
|
else {
|
|
@@ -72,7 +75,7 @@ export function renderCellRows(width, height, pixel) {
|
|
|
72
75
|
// otherwise leak its SGR into the line's remaining padding — then append
|
|
73
76
|
// the erase pass (see the doc above).
|
|
74
77
|
let row = out;
|
|
75
|
-
if (!row.endsWith(RESET))
|
|
78
|
+
if (foregroundOpenCode('ansi:white') !== '' && !row.endsWith(RESET))
|
|
76
79
|
row += RESET;
|
|
77
80
|
rows.push(row + ERASE_TO_EOL);
|
|
78
81
|
}
|
|
@@ -42,6 +42,6 @@ export type ApprovalPanelProps = {
|
|
|
42
42
|
* the reason does not fit, its tail (the typing position) is shown after an
|
|
43
43
|
* ellipsis.
|
|
44
44
|
*/
|
|
45
|
-
export declare function feedbackRowLines(prefix: string, label: string, reason: string, columns: number): string[];
|
|
45
|
+
export declare function feedbackRowLines(prefix: string, label: string, reason: string, columns: number, maxLines?: 1 | 2): string[];
|
|
46
46
|
export declare function ApprovalPanel({ approval, background, onDecide }: ApprovalPanelProps): React.ReactNode;
|
|
47
47
|
//# sourceMappingURL=ApprovalPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/approvals/ApprovalPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ApprovalPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/approvals/ApprovalPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,8BAA8B,CAAA;AAGrC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;IAC1C;2EACuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAA;CAChG,CAAA;AAmED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,GAAG,CAAsB,GAAG,MAAM,EAAE,CAM/I;AAQD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,UAAkB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAsP7G"}
|