@deepseek-harness-tui/dsh-tui 0.11.0 → 0.11.2
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 +55 -20
- package/assets/whale-girl/whale-girl-dark.png +0 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whale-girl/whale-girl.png +0 -0
- package/bin/dsh-tui.js +63 -3
- package/cordis.patch.yml +43 -20
- package/cordis.yml +6 -4
- package/lib/settings.json +1272 -0
- package/lib/types/activityPrefs.d.ts +24 -0
- package/lib/types/activityPrefs.d.ts.map +1 -1
- package/lib/types/activityPrefs.js +50 -1
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +3 -1
- package/lib/types/adapter/channel/ui-policy.d.ts +9 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +14 -1
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
- package/lib/types/adapter/kernel/replay.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +12 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +38 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +12 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +53 -7
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +43 -12
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +4 -1
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +2 -0
- package/lib/types/components/ActivityLine.d.ts +7 -2
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityLine.js +0 -8
- package/lib/types/components/BalanceReportRow.d.ts +10 -2
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
- package/lib/types/components/BalanceReportRow.js +18 -4
- package/lib/types/components/CompactionStatusRow.d.ts +24 -0
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
- package/lib/types/components/CompactionStatusRow.js +72 -0
- package/lib/types/components/GoalTodoPanel.js +2 -2
- package/lib/types/components/HelpMenu.d.ts +2 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +5 -4
- package/lib/types/components/InlineMathParagraph.d.ts +22 -0
- package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
- package/lib/types/components/InlineMathParagraph.js +178 -0
- package/lib/types/components/LogoV2.d.ts +41 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +148 -24
- package/lib/types/components/Markdown.d.ts +10 -3
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +47 -14
- package/lib/types/components/MathBlock.d.ts +13 -0
- package/lib/types/components/MathBlock.d.ts.map +1 -0
- package/lib/types/components/MathBlock.js +136 -0
- package/lib/types/components/MessageList.d.ts +10 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +15 -5
- package/lib/types/components/MigratePicker.d.ts +30 -0
- package/lib/types/components/MigratePicker.d.ts.map +1 -0
- package/lib/types/components/MigratePicker.js +38 -0
- package/lib/types/components/PromptInput.d.ts +17 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +96 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +3 -1
- package/lib/types/components/StarPrompt.d.ts +53 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -0
- package/lib/types/components/StarPrompt.js +281 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +20 -3
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +12 -6
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +8 -3
- package/lib/types/components/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -1
- package/lib/types/components/Whale.d.ts +17 -8
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +25 -15
- package/lib/types/components/WhaleGirl.d.ts +29 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -0
- package/lib/types/components/WhaleGirl.js +32 -0
- package/lib/types/components/WorkingSpinner.d.ts +4 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/bigfont.d.ts +47 -18
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +55 -40
- package/lib/types/components/design-system/HintLine.d.ts +1 -2
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -1
- package/lib/types/components/design-system/HintLine.js +1 -2
- package/lib/types/components/design-system/ThemeProvider.d.ts +6 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +40 -1
- package/lib/types/components/maidPortrait.d.ts +44 -0
- package/lib/types/components/maidPortrait.d.ts.map +1 -0
- package/lib/types/components/maidPortrait.js +178 -0
- package/lib/types/components/mathPreview.d.ts +25 -0
- package/lib/types/components/mathPreview.d.ts.map +1 -0
- package/lib/types/components/mathPreview.js +48 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +4 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +31 -26
- package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
- package/lib/types/components/messages/TranscriptImages.js +11 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -3
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
- package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
- package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
- package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
- package/lib/types/components/sessions/SourceTabs.js +70 -0
- package/lib/types/components/splashEggs.d.ts +56 -0
- package/lib/types/components/splashEggs.d.ts.map +1 -0
- package/lib/types/components/splashEggs.js +67 -0
- package/lib/types/components/splashFonts.d.ts +119 -0
- package/lib/types/components/splashFonts.d.ts.map +1 -0
- package/lib/types/components/splashFonts.js +267 -0
- package/lib/types/components/splashLayout.d.ts +41 -0
- package/lib/types/components/splashLayout.d.ts.map +1 -0
- package/lib/types/components/splashLayout.js +40 -0
- package/lib/types/components/whaleGirlSprite.d.ts +17 -0
- package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
- package/lib/types/components/whaleGirlSprite.js +47 -0
- package/lib/types/deepseekPricing.d.ts +74 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +110 -11
- package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
- package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/activity-store.js +359 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +6 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +2 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +15 -14
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +70 -21
- package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +35 -4
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +6 -2
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +7 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +127 -17
- package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/question-record.js +107 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +42 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -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 +10 -3
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +43 -9
- 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 +2 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +19 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +8 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +32 -17
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +309 -8
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.d.ts +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +34 -18
- package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +1 -1
- package/lib/types/dsh-adapter/compat/messages.d.ts +6 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +9 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +18 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +18 -3
- package/lib/types/dsh-adapter/compat/settings.d.ts +2 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +14 -0
- package/lib/types/dsh-adapter/contract.d.ts +5 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +9 -5
- package/lib/types/dsh-adapter/index.d.ts +36 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +22 -6
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/browse.js +90 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/cli.js +106 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/index.js +107 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/picker.js +86 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/types.js +11 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
- package/lib/types/dsh-adapter/plugin.d.ts +5 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +168 -372
- package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +254 -66
- package/lib/types/dsh-adapter/questions.d.ts +22 -15
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +47 -45
- package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +20 -13
- package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/frames.js +5 -4
- package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +188 -164
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +62 -25
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +7 -4
- package/lib/types/dsh-adapter/sideQuestion.d.ts +41 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +98 -2
- package/lib/types/dsh-adapter/subagents.d.ts +44 -6
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +163 -26
- package/lib/types/herdr.d.ts +2 -0
- package/lib/types/herdr.d.ts.map +1 -1
- package/lib/types/herdr.js +9 -3
- package/lib/types/history.d.ts +13 -1
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +15 -2
- package/lib/types/i18n.d.ts +512 -41
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +199 -20
- package/lib/types/ink/components/App.d.ts +2 -2
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +5 -1
- package/lib/types/ink/components/Image.d.ts +14 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/events/input-event.js +3 -3
- package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-images.js +13 -0
- package/lib/types/ink/ink.d.ts +6 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +16 -1
- package/lib/types/ink/kitty-graphics.d.ts +44 -3
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +184 -23
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +19 -1
- package/lib/types/ink/output.d.ts +24 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +83 -5
- package/lib/types/ink/parse-keypress.d.ts +26 -1
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +156 -13
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +8 -1
- package/lib/types/ink/screen.d.ts +24 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +89 -0
- package/lib/types/ink/selection.d.ts +68 -18
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +178 -31
- package/lib/types/ink/sixel-codec.d.ts +12 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +29 -5
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +5 -3
- package/lib/types/ink/styles.d.ts +9 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +8 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +7 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +12 -2
- package/lib/types/ink/timeline-rail.d.ts +5 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -1
- package/lib/types/math/inline-layout.d.ts +29 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -0
- package/lib/types/math/inline-layout.js +106 -0
- package/lib/types/math/layout.d.ts +58 -0
- package/lib/types/math/layout.d.ts.map +1 -0
- package/lib/types/math/layout.js +59 -0
- package/lib/types/math/renderer.d.ts +64 -0
- package/lib/types/math/renderer.d.ts.map +1 -0
- package/lib/types/math/renderer.js +256 -0
- package/lib/types/screens/Chat.d.ts +17 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +618 -57
- package/lib/types/screens/SessionSupervisor.d.ts +2 -1
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +156 -19
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +49 -11
- package/lib/types/screens/StatusLine.d.ts +5 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +47 -17
- package/lib/types/screens/chatOverlay.d.ts +5 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +26 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
- package/lib/types/sessionHistory.d.ts +2 -2
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +31 -5
- package/lib/types/settings/definitions.d.ts +681 -0
- package/lib/types/settings/definitions.d.ts.map +1 -0
- package/lib/types/settings/definitions.js +511 -0
- package/lib/types/starAction.d.ts +44 -0
- package/lib/types/starAction.d.ts.map +1 -0
- package/lib/types/starAction.js +52 -0
- package/lib/types/terminal-utils/latex.d.ts +10 -0
- package/lib/types/terminal-utils/latex.d.ts.map +1 -0
- package/lib/types/terminal-utils/latex.js +1417 -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 +26 -1
- package/lib/types/terminal-utils/math.d.ts +66 -0
- package/lib/types/terminal-utils/math.d.ts.map +1 -0
- package/lib/types/terminal-utils/math.js +337 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +6 -0
- package/lib/types/tuiDisplayPrefs.d.ts +67 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +59 -0
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/usageStats.d.ts +98 -0
- package/lib/types/usageStats.d.ts.map +1 -0
- package/lib/types/usageStats.js +169 -0
- package/lib/types/utils/bmp.d.ts +17 -0
- package/lib/types/utils/bmp.d.ts.map +1 -0
- package/lib/types/utils/bmp.js +154 -0
- package/lib/types/utils/clipboard.d.ts +14 -2
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +143 -8
- package/lib/types/utils/fold-long-lines.d.ts +1 -1
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.js +3 -2
- package/lib/types/utils/keymap.d.ts +4 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +8 -0
- package/lib/types/utils/modifiers.d.ts +4 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +4 -3
- package/lib/types/working-activity.d.ts +10 -9
- package/lib/types/working-activity.d.ts.map +1 -1
- package/lib/types/working-activity.js +17 -10
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
- package/package.json +117 -99
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +0 -19
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +0 -1
- package/lib/types/components/design-system/KeyboardShortcutHint.js +0 -14
- package/lib/types/dsh-adapter/channel/activity.d.ts +0 -20
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/activity.js +0 -113
- package/lib/types/terminal-utils/terminal.d.ts +0 -18
- package/lib/types/terminal-utils/terminal.d.ts.map +0 -1
- package/lib/types/terminal-utils/terminal.js +0 -96
package/lib/types/ink/screen.js
CHANGED
|
@@ -575,6 +575,8 @@ export function createScreen(width, height, styles, charPool, hyperlinkPool) {
|
|
|
575
575
|
emptyStyleId: styles.none,
|
|
576
576
|
damage: undefined,
|
|
577
577
|
noSelect: new Uint8Array(size),
|
|
578
|
+
copyRegion: new Int32Array(size),
|
|
579
|
+
copyTexts: new Map(),
|
|
578
580
|
softWrap: new Int32Array(height),
|
|
579
581
|
};
|
|
580
582
|
}
|
|
@@ -606,6 +608,7 @@ export function resetScreen(screen, width, height) {
|
|
|
606
608
|
screen.cells = new Int32Array(buf);
|
|
607
609
|
screen.cells64 = new BigInt64Array(buf);
|
|
608
610
|
screen.noSelect = new Uint8Array(size);
|
|
611
|
+
screen.copyRegion = new Int32Array(size);
|
|
609
612
|
}
|
|
610
613
|
if (screen.softWrap.length < height) {
|
|
611
614
|
screen.softWrap = new Int32Array(height);
|
|
@@ -613,6 +616,12 @@ export function resetScreen(screen, width, height) {
|
|
|
613
616
|
// Reset all cells — single fill call, no loop
|
|
614
617
|
screen.cells64.fill(EMPTY_CELL_VALUE, 0, size);
|
|
615
618
|
screen.noSelect.fill(0, 0, size);
|
|
619
|
+
if (screen.copyRegion === undefined || screen.copyRegion.length < size)
|
|
620
|
+
screen.copyRegion = new Int32Array(size);
|
|
621
|
+
else
|
|
622
|
+
screen.copyRegion.fill(0, 0, size);
|
|
623
|
+
screen.copyTexts ??= new Map();
|
|
624
|
+
screen.copyTexts.clear();
|
|
616
625
|
screen.softWrap.fill(0, 0, height);
|
|
617
626
|
// Update dimensions
|
|
618
627
|
screen.width = width;
|
|
@@ -1046,6 +1055,17 @@ export function blitRegion(dst, src, regionX, regionY, maxX, maxY) {
|
|
|
1046
1055
|
const dstCells = dst.cells;
|
|
1047
1056
|
const srcNoSel = src.noSelect;
|
|
1048
1057
|
const dstNoSel = dst.noSelect;
|
|
1058
|
+
// Copy regions travel with their cells — zeros included, so a blitted
|
|
1059
|
+
// overlay clears the region of a formula painted beneath it earlier in
|
|
1060
|
+
// this frame — and their texts come along.
|
|
1061
|
+
const copyRegions = dst.copyRegion === undefined
|
|
1062
|
+
? undefined
|
|
1063
|
+
: { src: src.copyRegion, dst: dst.copyRegion };
|
|
1064
|
+
if (src.copyTexts !== undefined && src.copyTexts.size > 0) {
|
|
1065
|
+
dst.copyTexts ??= new Map();
|
|
1066
|
+
for (const [id, text] of src.copyTexts)
|
|
1067
|
+
dst.copyTexts.set(id, text);
|
|
1068
|
+
}
|
|
1049
1069
|
// softWrap is per-row — copy the row range regardless of stride/width.
|
|
1050
1070
|
// Partial-width blits still carry the row's wrap provenance since the
|
|
1051
1071
|
// blitted content (a cached ink-text node) is what set the bit.
|
|
@@ -1059,6 +1079,12 @@ export function blitRegion(dst, src, regionX, regionY, maxX, maxY) {
|
|
|
1059
1079
|
const nsStart = regionY * src.width;
|
|
1060
1080
|
const nsLen = (maxY - regionY) * src.width;
|
|
1061
1081
|
dstNoSel.set(srcNoSel.subarray(nsStart, nsStart + nsLen), nsStart);
|
|
1082
|
+
if (copyRegions) {
|
|
1083
|
+
if (copyRegions.src)
|
|
1084
|
+
copyRegions.dst.set(copyRegions.src.subarray(nsStart, nsStart + nsLen), nsStart);
|
|
1085
|
+
else
|
|
1086
|
+
copyRegions.dst.fill(0, nsStart, nsStart + nsLen);
|
|
1087
|
+
}
|
|
1062
1088
|
}
|
|
1063
1089
|
else {
|
|
1064
1090
|
// Per-row copy for partial-width or mismatched-stride regions
|
|
@@ -1069,6 +1095,12 @@ export function blitRegion(dst, src, regionX, regionY, maxX, maxY) {
|
|
|
1069
1095
|
for (let y = regionY; y < maxY; y++) {
|
|
1070
1096
|
dstCells.set(srcCells.subarray(srcRowCI, srcRowCI + rowBytes), dstRowCI);
|
|
1071
1097
|
dstNoSel.set(srcNoSel.subarray(srcRowNS, srcRowNS + rowLen), dstRowNS);
|
|
1098
|
+
if (copyRegions) {
|
|
1099
|
+
if (copyRegions.src)
|
|
1100
|
+
copyRegions.dst.set(copyRegions.src.subarray(srcRowNS, srcRowNS + rowLen), dstRowNS);
|
|
1101
|
+
else
|
|
1102
|
+
copyRegions.dst.fill(0, dstRowNS, dstRowNS + rowLen);
|
|
1103
|
+
}
|
|
1072
1104
|
srcRowCI += srcStride;
|
|
1073
1105
|
dstRowCI += dstStride;
|
|
1074
1106
|
srcRowNS += src.width;
|
|
@@ -1216,11 +1248,13 @@ export function shiftRows(screen, top, bottom, n) {
|
|
|
1216
1248
|
const w = screen.width;
|
|
1217
1249
|
const cells64 = screen.cells64;
|
|
1218
1250
|
const noSel = screen.noSelect;
|
|
1251
|
+
const copy = screen.copyRegion;
|
|
1219
1252
|
const sw = screen.softWrap;
|
|
1220
1253
|
const absN = Math.abs(n);
|
|
1221
1254
|
if (absN > bottom - top) {
|
|
1222
1255
|
cells64.fill(EMPTY_CELL_VALUE, top * w, (bottom + 1) * w);
|
|
1223
1256
|
noSel.fill(0, top * w, (bottom + 1) * w);
|
|
1257
|
+
copy?.fill(0, top * w, (bottom + 1) * w);
|
|
1224
1258
|
sw.fill(0, top, bottom + 1);
|
|
1225
1259
|
return;
|
|
1226
1260
|
}
|
|
@@ -1228,18 +1262,22 @@ export function shiftRows(screen, top, bottom, n) {
|
|
|
1228
1262
|
// SU: row top+n..bottom → top..bottom-n; clear bottom-n+1..bottom
|
|
1229
1263
|
cells64.copyWithin(top * w, (top + n) * w, (bottom + 1) * w);
|
|
1230
1264
|
noSel.copyWithin(top * w, (top + n) * w, (bottom + 1) * w);
|
|
1265
|
+
copy?.copyWithin(top * w, (top + n) * w, (bottom + 1) * w);
|
|
1231
1266
|
sw.copyWithin(top, top + n, bottom + 1);
|
|
1232
1267
|
cells64.fill(EMPTY_CELL_VALUE, (bottom - n + 1) * w, (bottom + 1) * w);
|
|
1233
1268
|
noSel.fill(0, (bottom - n + 1) * w, (bottom + 1) * w);
|
|
1269
|
+
copy?.fill(0, (bottom - n + 1) * w, (bottom + 1) * w);
|
|
1234
1270
|
sw.fill(0, bottom - n + 1, bottom + 1);
|
|
1235
1271
|
}
|
|
1236
1272
|
else {
|
|
1237
1273
|
// SD: row top..bottom+n → top-n..bottom; clear top..top-n-1
|
|
1238
1274
|
cells64.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w);
|
|
1239
1275
|
noSel.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w);
|
|
1276
|
+
copy?.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w);
|
|
1240
1277
|
sw.copyWithin(top - n, top, bottom + n + 1);
|
|
1241
1278
|
cells64.fill(EMPTY_CELL_VALUE, top * w, (top - n) * w);
|
|
1242
1279
|
noSel.fill(0, top * w, (top - n) * w);
|
|
1280
|
+
copy?.fill(0, top * w, (top - n) * w);
|
|
1243
1281
|
sw.fill(0, top, top - n);
|
|
1244
1282
|
}
|
|
1245
1283
|
}
|
|
@@ -1539,6 +1577,57 @@ function diffDifferentWidth(prev, next, startX, endX, startY, endY, cb) {
|
|
|
1539
1577
|
}
|
|
1540
1578
|
return false;
|
|
1541
1579
|
}
|
|
1580
|
+
let nextCopyRegionId = 1;
|
|
1581
|
+
/**
|
|
1582
|
+
* A fresh copy region id. Ids are unique for the process, so regions blitted
|
|
1583
|
+
* from an earlier frame never collide with new ones.
|
|
1584
|
+
*/
|
|
1585
|
+
export function allocateCopyRegionId() {
|
|
1586
|
+
const id = nextCopyRegionId;
|
|
1587
|
+
nextCopyRegionId = nextCopyRegionId >= 0x7fffffff ? 1 : nextCopyRegionId + 1;
|
|
1588
|
+
return id;
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* Mark a rectangular region that copies as `text` (see Screen.copyRegion).
|
|
1592
|
+
* Clamps to screen bounds; like noSelect it affects selection only.
|
|
1593
|
+
*/
|
|
1594
|
+
export function markCopyRegion(screen, x, y, width, height, text, id) {
|
|
1595
|
+
if (screen.copyRegion === undefined)
|
|
1596
|
+
return;
|
|
1597
|
+
const maxX = Math.min(x + width, screen.width);
|
|
1598
|
+
const maxY = Math.min(y + height, screen.height);
|
|
1599
|
+
const stride = screen.width;
|
|
1600
|
+
for (let row = Math.max(0, y); row < maxY; row++) {
|
|
1601
|
+
const rowStart = row * stride;
|
|
1602
|
+
screen.copyRegion.fill(id, rowStart + Math.max(0, x), rowStart + maxX);
|
|
1603
|
+
}
|
|
1604
|
+
;
|
|
1605
|
+
(screen.copyTexts ??= new Map()).set(id, text);
|
|
1606
|
+
}
|
|
1607
|
+
/** Cells [from, to) of `row` no longer belong to any copy region. */
|
|
1608
|
+
export function clearCopyRegionSpan(screen, row, from, to) {
|
|
1609
|
+
if (screen.copyRegion === undefined || row < 0 || row >= screen.height)
|
|
1610
|
+
return;
|
|
1611
|
+
const rowStart = row * screen.width;
|
|
1612
|
+
screen.copyRegion.fill(0, rowStart + Math.max(0, from), rowStart + Math.min(to, screen.width));
|
|
1613
|
+
}
|
|
1614
|
+
/** Drop region texts no cell references any more. */
|
|
1615
|
+
export function pruneCopyTexts(screen) {
|
|
1616
|
+
const texts = screen.copyTexts;
|
|
1617
|
+
if (texts === undefined || texts.size === 0 || screen.copyRegion === undefined)
|
|
1618
|
+
return;
|
|
1619
|
+
const live = new Set();
|
|
1620
|
+
const cells = screen.copyRegion;
|
|
1621
|
+
const size = screen.width * screen.height;
|
|
1622
|
+
for (let index = 0; index < size; index++) {
|
|
1623
|
+
const id = cells[index];
|
|
1624
|
+
if (id !== 0)
|
|
1625
|
+
live.add(id);
|
|
1626
|
+
}
|
|
1627
|
+
for (const id of texts.keys())
|
|
1628
|
+
if (!live.has(id))
|
|
1629
|
+
texts.delete(id);
|
|
1630
|
+
}
|
|
1542
1631
|
/**
|
|
1543
1632
|
* Mark a rectangular region as noSelect (exclude from text selection).
|
|
1544
1633
|
* Clamps to screen bounds. Called from output.ts when a <NoSelect> box
|
|
@@ -10,10 +10,39 @@
|
|
|
10
10
|
* the cursor is now). The rendered highlight normalizes to start ≤ end.
|
|
11
11
|
*/
|
|
12
12
|
import type { Screen, StylePool } from './screen.js';
|
|
13
|
+
import type { TerminalImagePlacement } from './terminal-image.js';
|
|
13
14
|
type Point = {
|
|
14
15
|
col: number;
|
|
15
16
|
row: number;
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* One copy region a screen row touches: a rectangle whose cells are not
|
|
20
|
+
* text (a formula drawn as a terminal image) together with the text it
|
|
21
|
+
* stands for. The text is the formula's SOURCE (see Image.copyText) and is
|
|
22
|
+
* inserted at `at`, a character offset into the row's own text.
|
|
23
|
+
*/
|
|
24
|
+
export type SelectionRegion = {
|
|
25
|
+
readonly at: number;
|
|
26
|
+
/** Stable id of the region (Screen.copyRegion). */
|
|
27
|
+
readonly id: number;
|
|
28
|
+
readonly text: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Text extracted from one screen row plus the copy regions it touched.
|
|
32
|
+
* Regions travel OUTSIDE `text` on purpose: a row's characters are model
|
|
33
|
+
* output, so nothing in them may be re-read as metadata (an earlier design
|
|
34
|
+
* serialized regions into the text and let ordinary content impersonate
|
|
35
|
+
* them — see getSelectedText).
|
|
36
|
+
*/
|
|
37
|
+
export type SelectionRow = {
|
|
38
|
+
readonly text: string;
|
|
39
|
+
/** The row continues the previous one: the `\n` came from word-wrap, not
|
|
40
|
+
* from the source. Captured at extraction time because the screen's
|
|
41
|
+
* softWrap bitmap shifts with content. */
|
|
42
|
+
readonly sw: boolean;
|
|
43
|
+
/** Region insertions, ascending by `at`. */
|
|
44
|
+
readonly regions: readonly SelectionRegion[];
|
|
45
|
+
};
|
|
17
46
|
/**
|
|
18
47
|
* Selection state for fullscreen mode: the anchor/focus cell pair plus
|
|
19
48
|
* the off-screen row accumulators captured during drag-to-scroll.
|
|
@@ -35,23 +64,16 @@ export type SelectionState = {
|
|
|
35
64
|
hi: Point;
|
|
36
65
|
kind: 'word' | 'line';
|
|
37
66
|
} | null;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* so without this accumulator,
|
|
41
|
-
* loses the top of the selection
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* word-wrap, not in the source). Captured alongside the text at
|
|
49
|
-
* scroll time since the screen's softWrap bitmap shifts with content.
|
|
50
|
-
* getSelectedText uses these to join wrapped rows back into logical
|
|
51
|
-
* lines. */
|
|
52
|
-
scrolledOffAboveSW: boolean[];
|
|
53
|
-
/** Parallel to scrolledOffBelow. */
|
|
54
|
-
scrolledOffBelowSW: boolean[];
|
|
67
|
+
/** Rows that scrolled out ABOVE the viewport during drag-to-scroll, as
|
|
68
|
+
* extracted rows (text + wrap bit + copy regions). The screen buffer
|
|
69
|
+
* only holds the current viewport, so without this accumulator,
|
|
70
|
+
* dragging down past the bottom edge loses the top of the selection
|
|
71
|
+
* once the anchor clamps. Prepended to the on-screen rows by
|
|
72
|
+
* getSelectedText. Reset on start/clear. Newest at the end. */
|
|
73
|
+
scrolledOffAbove: SelectionRow[];
|
|
74
|
+
/** Symmetric: rows scrolled out BELOW when dragging up. Appended;
|
|
75
|
+
* newest at the front. */
|
|
76
|
+
scrolledOffBelow: SelectionRow[];
|
|
55
77
|
/** Pre-clamp anchor row. Set when shiftSelection clamps anchor so a
|
|
56
78
|
* reverse scroll can restore the true position and pop accumulators.
|
|
57
79
|
* Without this, PgDn (clamps anchor) → PgUp leaves anchor at the wrong
|
|
@@ -85,6 +107,18 @@ export type SelectionState = {
|
|
|
85
107
|
* user highlighted. Null until the first frame observes the
|
|
86
108
|
* selection. */
|
|
87
109
|
coveredFingerprint: number | null;
|
|
110
|
+
/** The text `getSelectedText` emitted for `coveredFingerprint`'s frame.
|
|
111
|
+
* The fingerprint is a cheap per-frame pre-filter: it hashes the covered
|
|
112
|
+
* cells plus the two soft-wrap inputs that decide how those cells lay out,
|
|
113
|
+
* so it can move while the COPIED TEXT stays byte-identical (flipping the
|
|
114
|
+
* next row's wrap bit from 0 to a value past the selection's last column
|
|
115
|
+
* only toggles trailing-blank trimming, which is invisible when the
|
|
116
|
+
* selected columns are already full). Judging staleness on that hash alone
|
|
117
|
+
* refused legitimate copies — "content under the selection changed; copy
|
|
118
|
+
* cancelled" while a streaming tail wrote somewhere else entirely. The
|
|
119
|
+
* verdict therefore re-checks the emitted text, exactly the bytes the copy
|
|
120
|
+
* would ship, and only latches when THEY differ. Null until baselined. */
|
|
121
|
+
coveredText: string | null;
|
|
88
122
|
/** Geometry key (start/end row:col) the fingerprint was taken at. Any
|
|
89
123
|
* user-driven geometry change (drag motion, word/line extension,
|
|
90
124
|
* keyboard pan, multi-click) re-baselines instead of judging — the
|
|
@@ -431,6 +465,22 @@ export declare function isCellSelected(s: SelectionState, col: number, row: numb
|
|
|
431
465
|
* at ~0.05ms for a full 200x50 selection (~0.14ms at 200x200), i.e. no
|
|
432
466
|
* worse than hashing the ids themselves.
|
|
433
467
|
*
|
|
468
|
+
* The hash is only a PRE-FILTER; the verdict is the copied text. Hashing the
|
|
469
|
+
* wrap inputs keeps a cheap screen-signature, but those inputs can move while
|
|
470
|
+
* the bytes a copy would ship stay identical: flipping the next row's wrap bit
|
|
471
|
+
* from 0 to a value past the selection's last column only toggles
|
|
472
|
+
* trailing-blank trimming, which is invisible when the selected columns are
|
|
473
|
+
* already full (measured live: a streaming tail wrote a row far below the
|
|
474
|
+
* highlight, the wrap bookkeeping moved, and the guard refused a legitimate
|
|
475
|
+
* copy — the "content under the selection changed" toast with the highlight
|
|
476
|
+
* still sitting on exactly the right text). So when the hash moves, this
|
|
477
|
+
* compares `getSelectedText` against the baselined text and latches only when
|
|
478
|
+
* THE BYTES differ — the same expression the copy itself ships, which makes
|
|
479
|
+
* the verdict complete (no real replacement is missed) and sound (no
|
|
480
|
+
* unchanged text is refused). The text is compared, not stored per frame: the
|
|
481
|
+
* extraction runs on a geometry change (once per drag motion) and on a
|
|
482
|
+
* suspected change, never on the steady-state frame.
|
|
483
|
+
*
|
|
434
484
|
* @param s - the selection state to fingerprint.
|
|
435
485
|
* @param screen - the frame's screen buffer.
|
|
436
486
|
* @param coordinated - true when this frame translated the selection
|
|
@@ -496,6 +546,6 @@ export declare function captureScrolledRows(s: SelectionState, screen: Screen, f
|
|
|
496
546
|
* @param selection - the selection whose range to highlight.
|
|
497
547
|
* @param stylePool - the style pool providing the selection background.
|
|
498
548
|
*/
|
|
499
|
-
export declare function applySelectionOverlay(screen: Screen, selection: SelectionState, stylePool: StylePool): void;
|
|
549
|
+
export declare function applySelectionOverlay(screen: Screen, selection: SelectionState, stylePool: StylePool, images?: readonly TerminalImagePlacement[]): void;
|
|
500
550
|
export {};
|
|
501
551
|
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -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;
|
|
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,K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