@deepseek-harness-tui/dsh-tui 0.11.1 → 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 +50 -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 +39 -17
- package/cordis.yml +3 -2
- package/lib/settings.json +1272 -0
- 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 +13 -0
- 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 +46 -4
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +43 -0
- package/lib/types/adapter/ports/channel-view.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/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 +13 -4
- 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 +48 -7
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +2 -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/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/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.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +3 -2
- 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/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 +1 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +8 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +69 -21
- package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +35 -2
- 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.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +5 -1
- 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-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 +2 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +9 -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 +39 -7
- 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 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +4 -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 +14 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +6 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +30 -35
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +138 -4
- 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.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -4
- 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/contract.d.ts +5 -5
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +8 -6
- 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 +4 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +143 -364
- 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/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 +28 -3
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +77 -2
- 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/i18n.d.ts +424 -42
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +145 -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/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 +40 -18
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +142 -30
- 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 +14 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +606 -53
- 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.map +1 -1
- package/lib/types/screens/StatusLine.js +45 -15
- 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.map +1 -1
- package/lib/types/utils/fold-long-lines.js +2 -1
- 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/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 +111 -97
|
@@ -25,6 +25,7 @@ import { clipPreview } from '../ink/timeline-rail.js';
|
|
|
25
25
|
import { getRevealVersion, revealLengthOf, revealTextOf } from './smoothReveal.js';
|
|
26
26
|
import { useRevealVersion } from '../hooks/useRevealVersion.js';
|
|
27
27
|
import { TranscriptImages } from './messages/TranscriptImages.js';
|
|
28
|
+
import { primaryComboString } from '../utils/keymap.js';
|
|
28
29
|
/**
|
|
29
30
|
* Transcript rows rendered with the dsh-TUI message layout: user prompts
|
|
30
31
|
* on a grey bubble with a `❯` pointer, assistant text with a `●` bullet and
|
|
@@ -764,6 +765,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
764
765
|
// post-commit, only when the signature changes.
|
|
765
766
|
let timelineTurns = [];
|
|
766
767
|
let activeTurnIndex = null;
|
|
768
|
+
let pinnedTurnIndex = null;
|
|
767
769
|
let upTurnIndex = null;
|
|
768
770
|
let downTurnIndex = null;
|
|
769
771
|
const timelineMemoRef = React.useRef(null);
|
|
@@ -856,10 +858,16 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
856
858
|
}
|
|
857
859
|
if (timelineTurns.length > 0 && activeTurnIndex === null)
|
|
858
860
|
activeTurnIndex = 0;
|
|
861
|
+
if (activeTurnIndex !== null) {
|
|
862
|
+
const active = timelineTurns[activeTurnIndex];
|
|
863
|
+
if (active.folded === true || active.top < viewTop)
|
|
864
|
+
pinnedTurnIndex = activeTurnIndex;
|
|
865
|
+
}
|
|
859
866
|
}
|
|
860
867
|
const timeline = {
|
|
861
868
|
turns: timelineTurns,
|
|
862
869
|
activeId: activeTurnIndex === null ? null : timelineTurns[activeTurnIndex].id,
|
|
870
|
+
pinnedId: pinnedTurnIndex === null ? null : timelineTurns[pinnedTurnIndex].id,
|
|
863
871
|
upId: upTurnIndex === null ? null : timelineTurns[upTurnIndex].id,
|
|
864
872
|
downId: downTurnIndex === null ? null : timelineTurns[downTurnIndex].id,
|
|
865
873
|
};
|
|
@@ -878,6 +886,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
878
886
|
const prev = lastTimelineReportRef.current;
|
|
879
887
|
if (prev !== null &&
|
|
880
888
|
prev.activeId === timeline.activeId &&
|
|
889
|
+
prev.pinnedId === timeline.pinnedId &&
|
|
881
890
|
prev.upId === timeline.upId &&
|
|
882
891
|
prev.downId === timeline.downId &&
|
|
883
892
|
prev.turns.length === timeline.turns.length &&
|
|
@@ -988,7 +997,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
988
997
|
localRefs.current.delete(rowId);
|
|
989
998
|
registerRowRef?.(rowId, el);
|
|
990
999
|
}, [registerRowRef]);
|
|
991
|
-
return (_jsxs(_Fragment, { children: [rows.some(row => row.folded) && (_jsx(ClickableDivider, { title: t('load-earlier'), onClick: onLoadOlder })), !showAll && hiddenCount > 0 && (_jsx(ClickableDivider, { title: t('show-previous-messages', { n: hiddenCount }), onClick: onToggleAll })), topPad > 0 && _jsx(Box, { height: topPad, flexShrink: 0 }), visibleRows
|
|
1000
|
+
return (_jsxs(_Fragment, { children: [rows.some(row => row.folded) && (_jsx(ClickableDivider, { title: t('load-earlier'), onClick: onLoadOlder })), !showAll && hiddenCount > 0 && (_jsx(ClickableDivider, { title: t('show-previous-messages', { n: hiddenCount, key: primaryComboString('showAll') }), onClick: onToggleAll })), topPad > 0 && _jsx(Box, { height: topPad, flexShrink: 0 }), visibleRows
|
|
992
1001
|
.slice(start, end)
|
|
993
1002
|
.map((row) => {
|
|
994
1003
|
// The pre-pass result keeps windowed rows at full-mount
|
|
@@ -1136,7 +1145,7 @@ function TranscriptRow({ rowId, kind, text, images, textFull, executionTarget, s
|
|
|
1136
1145
|
// The post-compaction summary defaults to a folded one-liner with a
|
|
1137
1146
|
// text preview; Ctrl+O (global), message-selection Enter, or a click
|
|
1138
1147
|
// reveals the full summary.
|
|
1139
|
-
return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(displayText), ' ', t('hint-expand-ctrl-o')] })) }));
|
|
1148
|
+
return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(displayText), ' ', t('hint-expand-ctrl-o', { key: primaryComboString('transcript') })] })) }));
|
|
1140
1149
|
case 'subagent':
|
|
1141
1150
|
if (!subagent)
|
|
1142
1151
|
return null;
|
|
@@ -1161,10 +1170,10 @@ const MemoRow = React.memo(TranscriptRow);
|
|
|
1161
1170
|
* welcome line. It scrolls away with the transcript once the conversation
|
|
1162
1171
|
* fills the viewport.
|
|
1163
1172
|
*/
|
|
1164
|
-
export function LogoHeader({ model, effort, cwd, whale = true, whaleIdle = true, working = false, skipIntro = false, }) {
|
|
1173
|
+
export function LogoHeader({ model, effort, cwd, fontId, whale = true, whaleIdle = true, whaleGirl = false, starred = false, onStarClick, working = false, skipIntro = false, }) {
|
|
1165
1174
|
// Minimal mode drops the whole splash (whale art AND wordmark) — only the
|
|
1166
1175
|
// transcript and a bare status bar remain.
|
|
1167
1176
|
if (isMinimalMode())
|
|
1168
1177
|
return null;
|
|
1169
|
-
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsx(LogoV2, { model: model, effort: effort, cwd: cwd, whale: whale, whaleIdle: whaleIdle, working: working, skipIntro: skipIntro }) }));
|
|
1178
|
+
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsx(LogoV2, { model: model, effort: effort, cwd: cwd, fontId: fontId, whale: whale, whaleIdle: whaleIdle, whaleGirl: whaleGirl, starred: starred, onStarClick: onStarClick, working: working, skipIntro: skipIntro }) }));
|
|
1170
1179
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MigratePickerRow } from '../dsh-adapter/migrate/picker.js';
|
|
3
|
+
/**
|
|
4
|
+
* `/migrate` source picker (multi-select, PRD revision): each row shows a
|
|
5
|
+
* checkbox, the scannable file count, and a recent-activity badge. Keys
|
|
6
|
+
* (Chat owns the logic): space toggles the focused source, `a` selects
|
|
7
|
+
* all/none, Enter proceeds to the confirmation layer with the checked set
|
|
8
|
+
* (the focused row when nothing is checked), Esc closes. While the rows are
|
|
9
|
+
* still being collected it says so — the scan takes a moment on real stores
|
|
10
|
+
* and "no sources available" would be a lie in that window.
|
|
11
|
+
*/
|
|
12
|
+
export declare function MigratePicker({ rows, focusIndex, checked, loading, onPick, }: {
|
|
13
|
+
rows: readonly MigratePickerRow[];
|
|
14
|
+
focusIndex: number;
|
|
15
|
+
/** Checked agent ids (multi-select state lives in Chat). */
|
|
16
|
+
checked: ReadonlySet<string>;
|
|
17
|
+
/** Rows still loading: render the scanning line, not the empty state. */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** Mouse pick (fullscreen): toggle the clicked row's checked state. */
|
|
20
|
+
onPick?: (index: number) => void;
|
|
21
|
+
}): React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The second confirmation layer (PRD #2): one line per checked source with
|
|
24
|
+
* its scannable count and the repeat-safe note. Keys (Chat): Enter imports,
|
|
25
|
+
* `d` dry-runs, Esc returns to the picker with the checked set preserved.
|
|
26
|
+
*/
|
|
27
|
+
export declare function MigrateConfirm({ rows, }: {
|
|
28
|
+
rows: readonly MigratePickerRow[];
|
|
29
|
+
}): React.ReactNode;
|
|
30
|
+
//# sourceMappingURL=MigratePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MigratePicker.d.ts","sourceRoot":"","sources":["../../../src/components/MigratePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAExE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,OAAO,EACP,OAAe,EACf,MAAM,GACP,EAAE;IACD,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC5B,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CA+ClB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,GACL,EAAE;IACD,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAClC,GAAG,KAAK,CAAC,SAAS,CAyBlB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from '../i18n.js';
|
|
3
|
+
import { Box, Text } from '../ui.js';
|
|
4
|
+
import { Pane } from './design-system/Pane.js';
|
|
5
|
+
import { ListItem } from './design-system/ListItem.js';
|
|
6
|
+
import { HintLine } from './design-system/HintLine.js';
|
|
7
|
+
import { listWindow } from './listWindow.js';
|
|
8
|
+
import { useOverlayListRows } from './OverlayAbove.js';
|
|
9
|
+
/**
|
|
10
|
+
* `/migrate` source picker (multi-select, PRD revision): each row shows a
|
|
11
|
+
* checkbox, the scannable file count, and a recent-activity badge. Keys
|
|
12
|
+
* (Chat owns the logic): space toggles the focused source, `a` selects
|
|
13
|
+
* all/none, Enter proceeds to the confirmation layer with the checked set
|
|
14
|
+
* (the focused row when nothing is checked), Esc closes. While the rows are
|
|
15
|
+
* still being collected it says so — the scan takes a moment on real stores
|
|
16
|
+
* and "no sources available" would be a lie in that window.
|
|
17
|
+
*/
|
|
18
|
+
export function MigratePicker({ rows, focusIndex, checked, loading = false, onPick, }) {
|
|
19
|
+
// 每项恒占 2 行(主行 + 描述行),预算同 SkillsPicker(OverlayAbove 高度
|
|
20
|
+
// 减 Pane 2 + 标题 2 + 页脚 1 + marginTop 1 = 6)。
|
|
21
|
+
const listRows = useOverlayListRows(6);
|
|
22
|
+
const { start, end } = listWindow(rows.map(() => 2), focusIndex, listRows);
|
|
23
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('picker-title-migrate') }) }), loading ? (_jsx(Text, { dimColor: true, children: t('migrate-picker-scanning') })) : rows.length === 0 ? (_jsx(Text, { dimColor: true, children: t('migrate-picker-empty') })) : (rows.slice(start, end).map((row, index) => {
|
|
24
|
+
const absoluteIndex = start + index;
|
|
25
|
+
const description = row.minutesAgo !== undefined
|
|
26
|
+
? t('migrate-picker-recent', { minutes: row.minutesAgo })
|
|
27
|
+
: t('migrate-picker-cold');
|
|
28
|
+
return (_jsx(ListItem, { isFocused: absoluteIndex === focusIndex, description: description, showScrollUp: absoluteIndex === start && start > 0, showScrollDown: absoluteIndex === end - 1 && end < rows.length, onClick: onPick ? () => onPick(absoluteIndex) : undefined, children: `${checked.has(row.agentId) ? '[x]' : '[ ]'} ${row.label} · ${t('migrate-picker-count', { n: row.count })}` }, row.agentId));
|
|
29
|
+
}))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('migrate-picker-hint') }) })] }));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The second confirmation layer (PRD #2): one line per checked source with
|
|
33
|
+
* its scannable count and the repeat-safe note. Keys (Chat): Enter imports,
|
|
34
|
+
* `d` dry-runs, Esc returns to the picker with the checked set preserved.
|
|
35
|
+
*/
|
|
36
|
+
export function MigrateConfirm({ rows, }) {
|
|
37
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('migrate-confirm-title') }) }), rows.map(row => (_jsx(Box, { paddingLeft: 1, children: _jsx(Text, { children: t('migrate-confirm-line', { label: row.label, n: row.count }) }) }, row.agentId))), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: t('migrate-confirm-note') }) })] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('migrate-confirm-actions') }) })] }));
|
|
38
|
+
}
|
|
@@ -3,6 +3,23 @@ import type { ChannelUi as Channel } from '../adapter/channel/ui-policy.js';
|
|
|
3
3
|
import type { ComposerImageRef } from '../dsh-adapter/channel.js';
|
|
4
4
|
import type { TranscriptImage } from '../dsh-adapter/transcript-images.js';
|
|
5
5
|
import { type PromptDraftCache } from './promptDraftCache.js';
|
|
6
|
+
/**
|
|
7
|
+
* Normalize editable text so no terminal control characters remain in state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sanitizeEditableText(text: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Paste-payload ingress: strip the ESC-less tail of a split record before
|
|
12
|
+
* normalizing. The tail is printable, so it survives `sanitizeEditableText`'s
|
|
13
|
+
* control probe untouched; typed text keeps it because only a paste payload
|
|
14
|
+
* can carry a partial record.
|
|
15
|
+
*
|
|
16
|
+
* The five separators only prove the *shape*, not that a record was split:
|
|
17
|
+
* a user can legitimately paste the literal `[13;28;13;1;0;1_`. Strip the
|
|
18
|
+
* ESC-less form only when the same payload also carries a full ESC-bearing
|
|
19
|
+
* record — only then is there in-payload evidence of a split stream.
|
|
20
|
+
* Otherwise the bytes are ordinary text and must survive verbatim.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sanitizePastedText(text: string): string;
|
|
6
23
|
/** Capabilities referenced by `text`, in first occurrence order. A raw token
|
|
7
24
|
* restored from disk/history has no sidecar entry and therefore stays inert. */
|
|
8
25
|
export declare function composerImageRefsForText(text: string, stagedByToken: ReadonlyMap<string, string>): ComposerImageRef[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA0BzB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAY1E,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA0BzB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAY1E,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAA;AA+E9B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD;AAwDD;gFACgF;AAChF,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,gBAAgB,EAAE,CAWpB;AA+MD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,yFAAyF;IACzF,IAAI,IAAI,MAAM,CAAA;IACd,4EAA4E;IAC5E,aAAa,CAAC,IAAI,SAAS;QAAE,KAAK,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtE,KAAK,IAAI,IAAI,CAAA;IACb;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B;;;;;OAKG;IACH,oBAAoB,IAAI,OAAO,CAAA;IAC/B,2EAA2E;IAC3E,SAAS,IAAI,OAAO,CAAA;IACpB;yEACqE;IACrE,SAAS,IAAI,OAAO,CAAA;CAAC;AAEvB;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,IAAI,IAAI,CAAA;IACpB;;;OAGG;IACH,YAAY,CACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAClC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,6EAA6E;IAC7E,eAAe,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB,kEAAkE;IAClE,eAAe,CAAC,IAAI,IAAI,CAAA;IACxB;;;OAGG;IACH,mBAAmB,CAAC,IAAI,IAAI,CAAA;IAC5B;;;;;;;;OAQG;IACH,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB;;;;OAIG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAA;IACrC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IACxD;;;;;;;OAOG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAAA;IAC7G;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,IAAI,IAAI,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,SAAiB,EACjB,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,4BAA4B,EAC5B,aAAa,EACb,YAAY,EACZ,gBAAwB,EACxB,qBAAqB,GACtB,EAAE,gBAAgB,4BA8xGlB"}
|
|
@@ -73,17 +73,58 @@ const isBigInput = (text) => text.split('\n').length >= FOLD_MIN_LINES || text.l
|
|
|
73
73
|
* Strip terminal controls and expand tabs at ingress while preserving newlines.
|
|
74
74
|
*/
|
|
75
75
|
const EDITABLE_CONTROL = /[\u0000-\u0009\u000b-\u001f\u007f]/u;
|
|
76
|
-
/**
|
|
77
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Raw win32-input-mode records (`CSI Vk;Sc;Uc;Kd;Cs;Rc _`) that reached the
|
|
78
|
+
* editable buffer as text instead of being translated. `stripAnsi` consumes
|
|
79
|
+
* the record head and leaves its terminating `_` in the draft — the stray
|
|
80
|
+
* underscore users see after a multi-line paste (issue #1090). Only the full
|
|
81
|
+
* record grammar (exactly five `;` separators) matches, so a real `_` and
|
|
82
|
+
* ordinary bracket text survive untouched.
|
|
83
|
+
*/
|
|
84
|
+
const WIN32_RECORD_RESIDUE = /\u001b\[\d*(?:;\d*){5}_/gu;
|
|
85
|
+
/**
|
|
86
|
+
* The same record with its ESC byte missing: what a record split across
|
|
87
|
+
* reads leaves behind when the escape timer flushed the prefix before the
|
|
88
|
+
* tail arrived. Printable, so it is stripped only from paste payloads
|
|
89
|
+
* ({@link sanitizePastedText}) — and only when the same payload also carries
|
|
90
|
+
* a full ESC-bearing record as in-payload evidence of that split; typed text
|
|
91
|
+
* and literal clipboard/bracketed-paste bytes are left untouched.
|
|
92
|
+
*/
|
|
93
|
+
const WIN32_RECORD_RESIDUE_TAIL = /\[\d*(?:;\d*){5}_/gu;
|
|
94
|
+
/**
|
|
95
|
+
* Normalize editable text so no terminal control characters remain in state.
|
|
96
|
+
*/
|
|
97
|
+
export function sanitizeEditableText(text) {
|
|
78
98
|
// Fast path for ordinary and multi-line drafts: newline is intentionally
|
|
79
|
-
// absent from the probe, so
|
|
99
|
+
// absent from the probe, so large clean text returns without the
|
|
100
|
+
// stripAnsi/control-normalization passes.
|
|
80
101
|
if (!EDITABLE_CONTROL.test(text))
|
|
81
102
|
return text;
|
|
82
|
-
|
|
103
|
+
// Record residue goes first: `stripAnsi` would consume the CSI head and
|
|
104
|
+
// leave only the terminating `_` behind.
|
|
105
|
+
return stripAnsi(text.replace(WIN32_RECORD_RESIDUE, ''))
|
|
83
106
|
.replace(/\r\n?/gu, '\n')
|
|
84
107
|
.replace(/\t/gu, ' ')
|
|
85
108
|
.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu, '');
|
|
86
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Paste-payload ingress: strip the ESC-less tail of a split record before
|
|
112
|
+
* normalizing. The tail is printable, so it survives `sanitizeEditableText`'s
|
|
113
|
+
* control probe untouched; typed text keeps it because only a paste payload
|
|
114
|
+
* can carry a partial record.
|
|
115
|
+
*
|
|
116
|
+
* The five separators only prove the *shape*, not that a record was split:
|
|
117
|
+
* a user can legitimately paste the literal `[13;28;13;1;0;1_`. Strip the
|
|
118
|
+
* ESC-less form only when the same payload also carries a full ESC-bearing
|
|
119
|
+
* record — only then is there in-payload evidence of a split stream.
|
|
120
|
+
* Otherwise the bytes are ordinary text and must survive verbatim.
|
|
121
|
+
*/
|
|
122
|
+
export function sanitizePastedText(text) {
|
|
123
|
+
// Probe with String#match: the /g detection regex carries lastIndex state
|
|
124
|
+
// across `.test` calls, so a previous success could skip a later match.
|
|
125
|
+
const hasRecordStream = text.match(WIN32_RECORD_RESIDUE) !== null;
|
|
126
|
+
return sanitizeEditableText(hasRecordStream ? text.replace(WIN32_RECORD_RESIDUE_TAIL, '') : text);
|
|
127
|
+
}
|
|
87
128
|
const COMPOSER_IMAGE_TOKEN = /\[Image #\d+\]/gu;
|
|
88
129
|
/** Format label for one image media type, matching the image preview card's
|
|
89
130
|
* title (`JPEG`, `PNG`, `WEBP`, `GIF`). */
|
|
@@ -1688,7 +1729,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1688
1729
|
// Newlines remain data — they are NOT Enter — so this branch runs before
|
|
1689
1730
|
// the whole-line submit rule.
|
|
1690
1731
|
if (event?.isPasted && input.length > 0) {
|
|
1691
|
-
const text =
|
|
1732
|
+
const text = sanitizePastedText(input.replace(/\r\n/g, '\n').replace(/\r/g, '\n'));
|
|
1692
1733
|
// Desktop drops reach the TUI as pasted text (Ghostty forwards
|
|
1693
1734
|
// Shell.escape(path) through the PTY with no drop boundary). Only a
|
|
1694
1735
|
// paste that IS one unambiguous existing local image path stages as
|
|
@@ -1757,7 +1798,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1757
1798
|
return;
|
|
1758
1799
|
}
|
|
1759
1800
|
if (content.kind === 'unavailable') {
|
|
1760
|
-
channel.notify(t('input-clipboard-unavailable'), { color: 'warning' });
|
|
1801
|
+
channel.notify(t(content.wsl === true ? 'input-clipboard-unavailable-wsl' : 'input-clipboard-unavailable'), { color: 'warning' });
|
|
1761
1802
|
return;
|
|
1762
1803
|
}
|
|
1763
1804
|
if (content.kind === 'image') {
|
|
@@ -1846,7 +1887,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1846
1887
|
return;
|
|
1847
1888
|
// Insert against the LIVE input state: the read above resolved
|
|
1848
1889
|
// asynchronously and the user may have typed while waiting.
|
|
1849
|
-
const text =
|
|
1890
|
+
const text = sanitizePastedText(formatClipboardInsert(content));
|
|
1850
1891
|
const { at } = insertClipboardAtCaret(text);
|
|
1851
1892
|
// Same fold as bracketed paste — but never inside the expanded
|
|
1852
1893
|
// editor (plain text there, see the isPasted branch).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAO7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAO7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAyR3D,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAuB,EACvB,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C,GAAG,KAAK,CAAC,SAAS,CAwFlB"}
|
|
@@ -13,6 +13,7 @@ import { getTheme } from '../theme.js';
|
|
|
13
13
|
import { t } from '../i18n.js';
|
|
14
14
|
import { useTheme } from './design-system/ThemeProvider.js';
|
|
15
15
|
import { revealLinesOf } from './smoothReveal.js';
|
|
16
|
+
import { primaryComboString } from '../utils/keymap.js';
|
|
16
17
|
/** Replace tabs so width math and alignment hold (pi convention). */
|
|
17
18
|
const expandTabs = (text) => text.replaceAll('\t', ' ');
|
|
18
19
|
/**
|
|
@@ -275,5 +276,5 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground =
|
|
|
275
276
|
? undefined
|
|
276
277
|
: { segments: newRuns !== undefined ? mergeRuns(newRuns, row.newWords) : row.newWords };
|
|
277
278
|
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(PaneLine, { side: oldSide, kind: row.kind === 'add' ? 'context' : row.kind, tone: "old", width: paneWidth, toolBackground: toolBackground }), _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 })] }, index));
|
|
278
|
-
}), hidden > 0 && (_jsx(Text, { dimColor: true, children: t('lines-folded-expand', { n: hidden }) }))] }));
|
|
279
|
+
}), hidden > 0 && (_jsx(Text, { dimColor: true, children: t('lines-folded-expand', { n: hidden, key: primaryComboString('transcript') }) }))] }));
|
|
279
280
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StarMilestone } from '../usageStats.js';
|
|
3
|
+
/** What a star attempt came back with (the modal renders each outcome). */
|
|
4
|
+
export type StarAttempt = {
|
|
5
|
+
readonly kind: 'starred';
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'no-gh';
|
|
8
|
+
readonly url: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'not-authed';
|
|
11
|
+
readonly url: string;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'failed';
|
|
14
|
+
readonly detail: string;
|
|
15
|
+
readonly url: string;
|
|
16
|
+
};
|
|
17
|
+
/** The two things the modal can do (Chat supplies the real actions; tests
|
|
18
|
+
* override them through the same seam). `onStar` reports the outcome so the
|
|
19
|
+
* modal can celebrate a real star instead of guessing. */
|
|
20
|
+
export interface StarPromptActions {
|
|
21
|
+
onStar: () => StarAttempt | Promise<StarAttempt>;
|
|
22
|
+
onOpen: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The one-time "asks for a star" startup modal (usage milestones `99h` /
|
|
26
|
+
* `999 launches`, see `usageStats.ts`). Chat mounts it over a dimmed
|
|
27
|
+
* click-catcher on boot when `dueStarModal()` says the moment arrived —
|
|
28
|
+
* never mid-turn, at most one milestone per boot, `Esc`/click-outside
|
|
29
|
+
* closes, and unmounting hands the keyboard straight back (nothing is left
|
|
30
|
+
* registered, so it cannot steal keys after closing).
|
|
31
|
+
*
|
|
32
|
+
* Composition follows the house design system: the milestone title sits in
|
|
33
|
+
* the card's top border, the two actions are `ListItem` rows (pointer,
|
|
34
|
+
* focus colour, hover background — the same component every picker uses),
|
|
35
|
+
* a `Divider` separates the footer, and the hint line is a `HintLine` with
|
|
36
|
+
* its bold key. The art slot shows the raster maid first, the animated
|
|
37
|
+
* pixel whale otherwise.
|
|
38
|
+
*
|
|
39
|
+
* A successful star switches the card into a short CELEBRATION instead of
|
|
40
|
+
* closing silently: confetti falls over the whale, which spouts on a loop,
|
|
41
|
+
* with a thank-you line — then the card closes itself. A failed attempt
|
|
42
|
+
* keeps the card open with the reason and the browser escape hatch.
|
|
43
|
+
*/
|
|
44
|
+
export declare function StarPrompt({ milestone, actions, onClose, initialPhase, }: {
|
|
45
|
+
/** The reached milestone (drives the title's hours/launches wording). */
|
|
46
|
+
readonly milestone: StarMilestone;
|
|
47
|
+
readonly actions: StarPromptActions;
|
|
48
|
+
readonly onClose: () => void;
|
|
49
|
+
/** 起始阶段:`done` 直接进庆祝态——`/star`、`Alt+S`、标语点击成功后就
|
|
50
|
+
* 走这条(只演感谢,不再问一次)。 */
|
|
51
|
+
readonly initialPhase?: 'ask' | 'done';
|
|
52
|
+
}): React.ReactNode;
|
|
53
|
+
//# sourceMappingURL=StarPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/StarPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAuBrD,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9E;;0DAE0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAO,EACP,YAAoB,GACrB,EAAE;IACD,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B;2BACuB;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CAsOlB"}
|