@deepseek-harness-tui/dsh-tui 0.8.8 → 0.9.1
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 +60 -238
- package/bin/dsh-tui.js +172 -5
- package/cordis.patch.yml +16 -4
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/cc/hyperlink.d.ts +7 -1
- package/lib/types/cc/hyperlink.d.ts.map +1 -1
- package/lib/types/cc/hyperlink.js +3 -2
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +33 -3
- package/lib/types/cc/sessionColors.d.ts +27 -0
- package/lib/types/cc/sessionColors.d.ts.map +1 -0
- package/lib/types/cc/sessionColors.js +39 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +10 -2
- package/lib/types/components/ActivityPicker.d.ts +4 -1
- package/lib/types/components/ActivityPicker.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.js +2 -2
- package/lib/types/components/AutoRecapRow.d.ts +23 -0
- package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
- package/lib/types/components/AutoRecapRow.js +23 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +1 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts +2 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +11 -3
- package/lib/types/components/ColorPicker.d.ts +17 -0
- package/lib/types/components/ColorPicker.d.ts.map +1 -0
- package/lib/types/components/ColorPicker.js +20 -0
- package/lib/types/components/CommandSuggestions.d.ts +23 -4
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +41 -14
- package/lib/types/components/ContextBarView.d.ts +33 -0
- package/lib/types/components/ContextBarView.d.ts.map +1 -0
- package/lib/types/components/ContextBarView.js +46 -0
- package/lib/types/components/EffortInputBorder.d.ts +12 -1
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +22 -5
- package/lib/types/components/EffortSlider.d.ts +4 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +4 -2
- package/lib/types/components/ExtensionDialog.js +6 -2
- package/lib/types/components/FileActionsPanel.d.ts +22 -0
- package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
- package/lib/types/components/FileActionsPanel.js +28 -0
- package/lib/types/components/FileSuggestions.d.ts +26 -7
- package/lib/types/components/FileSuggestions.d.ts.map +1 -1
- package/lib/types/components/FileSuggestions.js +39 -12
- package/lib/types/components/GoalTodoPanel.d.ts +26 -2
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +86 -17
- package/lib/types/components/HelpMenu.d.ts +7 -1
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +12 -4
- package/lib/types/components/HistorySearchDialog.d.ts +4 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +2 -2
- package/lib/types/components/LangPicker.d.ts +14 -0
- package/lib/types/components/LangPicker.d.ts.map +1 -0
- package/lib/types/components/LangPicker.js +17 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +3 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +12 -3
- package/lib/types/components/MessageList.d.ts +45 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +560 -41
- package/lib/types/components/ModelPicker.d.ts +27 -2
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +26 -6
- package/lib/types/components/PermissionsPicker.d.ts +21 -0
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
- package/lib/types/components/PermissionsPicker.js +27 -0
- package/lib/types/components/PlanPicker.d.ts +15 -0
- package/lib/types/components/PlanPicker.d.ts.map +1 -0
- package/lib/types/components/PlanPicker.js +18 -0
- package/lib/types/components/PresetPicker.d.ts +4 -1
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +2 -2
- package/lib/types/components/PromptInput.d.ts +4 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +602 -75
- package/lib/types/components/RecapPanel.d.ts +25 -0
- package/lib/types/components/RecapPanel.d.ts.map +1 -0
- package/lib/types/components/RecapPanel.js +55 -0
- package/lib/types/components/RewindPicker.d.ts +12 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +6 -4
- package/lib/types/components/ScrollbarGutter.d.ts +28 -0
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
- package/lib/types/components/ScrollbarGutter.js +119 -0
- package/lib/types/components/Select.d.ts +8 -1
- package/lib/types/components/Select.d.ts.map +1 -1
- package/lib/types/components/Select.js +4 -2
- package/lib/types/components/SkillsPicker.d.ts +4 -1
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +2 -2
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +9 -2
- package/lib/types/components/SubagentDashboard.d.ts +4 -0
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +9 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +5 -4
- package/lib/types/components/SuggestionCard.d.ts +65 -0
- package/lib/types/components/SuggestionCard.d.ts.map +1 -0
- package/lib/types/components/SuggestionCard.js +77 -0
- package/lib/types/components/ThemePicker.d.ts +4 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +2 -2
- package/lib/types/components/ThinkingToggle.d.ts +4 -1
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +2 -2
- package/lib/types/components/TimelineRail.d.ts +53 -0
- package/lib/types/components/TimelineRail.d.ts.map +1 -0
- package/lib/types/components/TimelineRail.js +197 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts +6 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -2
- package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
- package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceMenuPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +4 -1
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -1
- package/lib/types/components/WorkspacePicker.js +2 -2
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +5 -1
- package/lib/types/components/design-system/ListItem.d.ts +8 -1
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +8 -3
- package/lib/types/components/design-system/ThemeProvider.d.ts +7 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +2 -1
- package/lib/types/components/messages/AssistantTextMessage.d.ts +5 -2
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantTextMessage.js +6 -2
- 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 +10 -4
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +15 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +37 -7
- package/lib/types/components/messages/UserPromptMessage.d.ts +2 -1
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +7 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +75 -11
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +13 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +4 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +4 -2
- package/lib/types/components/trajectory/HotspotView.d.ts +7 -1
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -1
- package/lib/types/components/trajectory/HotspotView.js +8 -2
- package/lib/types/components/trajectory/Ledger.d.ts +9 -1
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +23 -5
- package/lib/types/components/trajectory/WaveBand.d.ts +10 -1
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -1
- package/lib/types/components/trajectory/WaveBand.js +7 -2
- package/lib/types/dsh-adapter/channel.d.ts +117 -7
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +1301 -122
- package/lib/types/dsh-adapter/compat/index.d.ts +8 -6
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +8 -6
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +150 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +518 -41
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +1 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +1 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.d.ts +20 -2
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +9 -1
- package/lib/types/dsh-adapter/plugin.d.ts +0 -9
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +453 -14
- package/lib/types/dsh-adapter/presets.d.ts +18 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +31 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +29 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +89 -5
- package/lib/types/dsh-adapter/questions.d.ts +19 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +53 -10
- package/lib/types/dsh-adapter/recap.d.ts +49 -0
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
- package/lib/types/dsh-adapter/recap.js +121 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +314 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessionTree.js +954 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +15 -44
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +28 -165
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/herdr.js +1 -1
- package/lib/types/i18n.d.ts +770 -181
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +257 -80
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +13 -1
- package/lib/types/ink/components/App.d.ts +12 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +101 -4
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -1
- package/lib/types/ink/components/ClockContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +170 -91
- package/lib/types/ink/constants.d.ts +9 -0
- package/lib/types/ink/constants.d.ts.map +1 -1
- package/lib/types/ink/constants.js +9 -0
- package/lib/types/ink/events/click-event.d.ts +7 -16
- package/lib/types/ink/events/click-event.d.ts.map +1 -1
- package/lib/types/ink/events/click-event.js +16 -19
- package/lib/types/ink/events/event-handlers.d.ts +11 -1
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -1
- package/lib/types/ink/events/event-handlers.js +2 -0
- package/lib/types/ink/events/input-event.d.ts +9 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +4 -0
- package/lib/types/ink/events/pointer-event.d.ts +61 -0
- package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
- package/lib/types/ink/events/pointer-event.js +61 -0
- package/lib/types/ink/events/wheel-event.d.ts +17 -0
- package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
- package/lib/types/ink/events/wheel-event.js +20 -0
- package/lib/types/ink/geometry-trace.d.ts +51 -0
- package/lib/types/ink/geometry-trace.d.ts.map +1 -0
- package/lib/types/ink/geometry-trace.js +83 -0
- package/lib/types/ink/hit-test.d.ts +56 -1
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +146 -8
- package/lib/types/ink/ink.d.ts +58 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +230 -29
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +21 -0
- package/lib/types/ink/node-cache.d.ts +5 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.d.ts +8 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +101 -12
- package/lib/types/ink/render-node-to-output.d.ts +10 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +111 -18
- package/lib/types/ink/timeline-rail.d.ts +138 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -0
- package/lib/types/ink/timeline-rail.js +179 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +47 -5
- package/lib/types/migrationPrefs.d.ts +60 -0
- package/lib/types/migrationPrefs.d.ts.map +1 -0
- package/lib/types/migrationPrefs.js +97 -0
- package/lib/types/modelGroups.d.ts +72 -0
- package/lib/types/modelGroups.d.ts.map +1 -0
- package/lib/types/modelGroups.js +97 -0
- package/lib/types/modelRecents.d.ts +39 -0
- package/lib/types/modelRecents.d.ts.map +1 -0
- package/lib/types/modelRecents.js +97 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +11 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +31 -1
- package/lib/types/oauth.d.ts +15 -0
- package/lib/types/oauth.d.ts.map +1 -0
- package/lib/types/oauth.js +14 -0
- package/lib/types/reload.d.ts +109 -0
- package/lib/types/reload.d.ts.map +1 -0
- package/lib/types/reload.js +118 -0
- package/lib/types/screens/Chat.d.ts +3 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1377 -371
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionBrowser.js +56 -29
- package/lib/types/screens/SessionTree.d.ts +27 -0
- package/lib/types/screens/SessionTree.d.ts.map +1 -0
- package/lib/types/screens/SessionTree.js +555 -0
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +64 -22
- package/lib/types/screens/StatusLine.d.ts +0 -8
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +224 -45
- package/lib/types/screens/StatusMetrics.d.ts +35 -3
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +63 -8
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +81 -14
- package/lib/types/screens/chatOverlay.d.ts +237 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -0
- package/lib/types/screens/chatOverlay.js +116 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +64 -10
- package/lib/types/tuiDisplayPrefs.d.ts +15 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +9 -0
- package/lib/types/update.d.ts +139 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +382 -30
- package/lib/types/utils/debug.d.ts +10 -0
- package/lib/types/utils/debug.d.ts.map +1 -1
- package/lib/types/utils/debug.js +24 -0
- package/lib/types/utils/fileTarget.d.ts +46 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -0
- package/lib/types/utils/fileTarget.js +178 -0
- package/lib/types/utils/keymap.d.ts +134 -0
- package/lib/types/utils/keymap.d.ts.map +1 -0
- package/lib/types/utils/keymap.js +311 -0
- package/lib/types/utils/mentions.d.ts +25 -2
- package/lib/types/utils/mentions.d.ts.map +1 -1
- package/lib/types/utils/mentions.js +69 -10
- package/lib/types/utils/openExternal.d.ts +50 -0
- package/lib/types/utils/openExternal.d.ts.map +1 -0
- package/lib/types/utils/openExternal.js +170 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +1 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +140 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +11 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.d.ts +14 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.js +67 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +64 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.js +170 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +79 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +196 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +193 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.d.ts +32 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.js +101 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +31 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.d.ts +69 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +129 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +70 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +19 -5
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/instruction-hint.mjs +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ClickEvent } from './events/click-event.js';
|
|
2
|
+
import { PointerEvent } from './events/pointer-event.js';
|
|
3
|
+
import { WheelEvent } from './events/wheel-event.js';
|
|
4
|
+
import { logError } from '../utils/log.js';
|
|
2
5
|
import { nodeCache } from './node-cache.js';
|
|
6
|
+
import { getAbsoluteHitList } from './render-node-to-output.js';
|
|
7
|
+
import { dispatcher } from './reconciler.js';
|
|
3
8
|
/**
|
|
4
9
|
* Find the deepest DOM element whose rendered rect contains (col, row).
|
|
5
10
|
*
|
|
@@ -37,19 +42,55 @@ export function hitTest(node, col, row) {
|
|
|
37
42
|
}
|
|
38
43
|
return node;
|
|
39
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* hitTest, but overlay-aware: absolute-positioned nodes can paint OUTSIDE
|
|
47
|
+
* every ancestor's rect (OverlayAbove's `bottom:'100%'` pickers float over
|
|
48
|
+
* the transcript), so the plain containment recursion never reaches them —
|
|
49
|
+
* a click on the picker lands in the ScrollBox's rows instead. Check the
|
|
50
|
+
* frame's absolute hit list FIRST, in reverse paint order (later = visually
|
|
51
|
+
* on top), then fall back to the in-flow tree.
|
|
52
|
+
* @param root - the tree root for the in-flow fallback.
|
|
53
|
+
* @param col - the screen column to test.
|
|
54
|
+
* @param row - the screen row to test.
|
|
55
|
+
* @returns the deepest element at (col, row), or null.
|
|
56
|
+
*/
|
|
57
|
+
export function hitTestWithOverlays(root, col, row) {
|
|
58
|
+
const overlays = getAbsoluteHitList();
|
|
59
|
+
for (let i = overlays.length - 1; i >= 0; i--) {
|
|
60
|
+
const { node, rect } = overlays[i];
|
|
61
|
+
if (col >= rect.x &&
|
|
62
|
+
col < rect.x + rect.width &&
|
|
63
|
+
row >= rect.y &&
|
|
64
|
+
row < rect.y + rect.height) {
|
|
65
|
+
// hitTest re-checks containment via nodeCache and descends normally;
|
|
66
|
+
// nested absolutes deeper inside are themselves in the list and were
|
|
67
|
+
// already offered (later paint order) above.
|
|
68
|
+
const hit = hitTest(node, col, row);
|
|
69
|
+
if (hit)
|
|
70
|
+
return hit;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return hitTest(root, col, row);
|
|
74
|
+
}
|
|
40
75
|
/**
|
|
41
76
|
* Hit-test the root at (col, row) and bubble a ClickEvent from the deepest
|
|
42
77
|
* containing node up through parentNode. Only nodes with an onClick handler
|
|
43
78
|
* fire. Stops when a handler calls stopImmediatePropagation(). Returns
|
|
44
79
|
* true if at least one onClick handler fired.
|
|
80
|
+
*
|
|
81
|
+
* Each handler call is isolated: a throwing handler is logged and the
|
|
82
|
+
* bubbling continues, so one broken onClick cannot swallow the click from
|
|
83
|
+
* its ancestors or the rest of the input batch.
|
|
84
|
+
*
|
|
45
85
|
* @param root - the tree root to hit-test.
|
|
46
86
|
* @param col - the screen column of the click.
|
|
47
87
|
* @param row - the screen row of the click.
|
|
48
88
|
* @param cellIsBlank - whether the clicked cell is blank, reported on the event.
|
|
89
|
+
* @param button - raw SGR release byte (carries shift/alt/ctrl modifier bits).
|
|
49
90
|
* @returns true when at least one onClick handler fired.
|
|
50
91
|
*/
|
|
51
|
-
export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
52
|
-
let target =
|
|
92
|
+
export function dispatchClick(root, col, row, cellIsBlank = false, button = 0) {
|
|
93
|
+
let target = hitTestWithOverlays(root, col, row) ?? undefined;
|
|
53
94
|
if (!target)
|
|
54
95
|
return false;
|
|
55
96
|
// Click-to-focus: find the closest focusable ancestor and focus it.
|
|
@@ -64,7 +105,7 @@ export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
|
64
105
|
focusTarget = focusTarget.parentNode;
|
|
65
106
|
}
|
|
66
107
|
}
|
|
67
|
-
const event = new ClickEvent(col, row, cellIsBlank);
|
|
108
|
+
const event = new ClickEvent(col, row, cellIsBlank, { button });
|
|
68
109
|
let handled = false;
|
|
69
110
|
while (target) {
|
|
70
111
|
const handler = target._eventHandlers?.onClick;
|
|
@@ -75,7 +116,16 @@ export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
|
75
116
|
event.localCol = col - rect.x;
|
|
76
117
|
event.localRow = row - rect.y;
|
|
77
118
|
}
|
|
78
|
-
|
|
119
|
+
else {
|
|
120
|
+
event.localCol = 0;
|
|
121
|
+
event.localRow = 0;
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
handler(event);
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
logError(error);
|
|
128
|
+
}
|
|
79
129
|
if (event.didStopImmediatePropagation())
|
|
80
130
|
return true;
|
|
81
131
|
}
|
|
@@ -83,6 +133,73 @@ export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
|
83
133
|
}
|
|
84
134
|
return handled;
|
|
85
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Fire onMouseLeave on every tracked hover node, then empty the set.
|
|
138
|
+
*
|
|
139
|
+
* The pointer-state resets (alt-screen swap, terminal resize) drop the hover
|
|
140
|
+
* set because the geometry it was computed against is gone. But the React
|
|
141
|
+
* components behind those nodes still hold their `hovered=true` state: a bare
|
|
142
|
+
* `set.clear()` never tells them the pointer "left", so every row crossed
|
|
143
|
+
* before the reset keeps its highlight forever — the next motion event only
|
|
144
|
+
* fires enter on the new row (the old nodes are no longer in the set, so no
|
|
145
|
+
* diff ever produces their leave). Firing leave first is what makes the
|
|
146
|
+
* reset invisible to the rows.
|
|
147
|
+
*
|
|
148
|
+
* @param hovered - the tracked hover set; emptied in place.
|
|
149
|
+
* @param col - pointer column for the synthetic leave events (-1 = unknown).
|
|
150
|
+
* @param row - pointer row for the synthetic leave events.
|
|
151
|
+
*/
|
|
152
|
+
export function clearHovered(hovered, col = -1, row = -1) {
|
|
153
|
+
for (const node of hovered) {
|
|
154
|
+
hovered.delete(node);
|
|
155
|
+
// Detached nodes (screen already swapped out from under us) can no
|
|
156
|
+
// longer re-render — skip them; their component state dies with the
|
|
157
|
+
// subtree anyway.
|
|
158
|
+
if (!node.parentNode)
|
|
159
|
+
continue;
|
|
160
|
+
const handler = node._eventHandlers
|
|
161
|
+
?.onMouseLeave;
|
|
162
|
+
if (handler) {
|
|
163
|
+
try {
|
|
164
|
+
handler(new PointerEvent('hover', col, row, { action: 'move' }));
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
logError(error);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Route a wheel event to the ScrollBox (or any onWheel handler) under the
|
|
174
|
+
* pointer. Dispatches through the shared Dispatcher at continuous priority
|
|
175
|
+
* so the event bubbles from the deepest hit node and React schedules any
|
|
176
|
+
* state updates at the right lane.
|
|
177
|
+
*
|
|
178
|
+
* @param root - the tree root to hit-test.
|
|
179
|
+
* @param col - the screen column of the wheel event.
|
|
180
|
+
* @param row - the screen row of the wheel event.
|
|
181
|
+
* @param deltaY - rows to scroll (positive = scroll down).
|
|
182
|
+
* @param deltaX - columns to scroll (positive = right; informational).
|
|
183
|
+
* @param button - raw SGR byte (carries modifier bits).
|
|
184
|
+
* @returns true when an onWheel handler existed under the pointer.
|
|
185
|
+
*/
|
|
186
|
+
export function dispatchWheel(root, col, row, deltaY, deltaX = 0, button = 0) {
|
|
187
|
+
const target = hitTestWithOverlays(root, col, row);
|
|
188
|
+
if (!target)
|
|
189
|
+
return false;
|
|
190
|
+
// Does any ancestor (target inclusive) carry an onWheel handler?
|
|
191
|
+
let node = target;
|
|
192
|
+
let hasHandler = false;
|
|
193
|
+
while (node && !hasHandler) {
|
|
194
|
+
hasHandler = Boolean(node._eventHandlers?.onWheel);
|
|
195
|
+
node = node.parentNode;
|
|
196
|
+
}
|
|
197
|
+
if (!hasHandler)
|
|
198
|
+
return false;
|
|
199
|
+
const event = new WheelEvent(col, row, deltaY, deltaX, { button });
|
|
200
|
+
dispatcher.dispatchContinuous(target, event);
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
86
203
|
/**
|
|
87
204
|
* Fire onMouseEnter/onMouseLeave as the pointer moves. Like DOM
|
|
88
205
|
* mouseenter/mouseleave: does NOT bubble — moving between children does
|
|
@@ -90,6 +207,10 @@ export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
|
90
207
|
* ancestor with a hover handler; diffs against the previous hovered set;
|
|
91
208
|
* fires leave on the nodes exited, enter on the nodes entered.
|
|
92
209
|
*
|
|
210
|
+
* Handlers receive a PointerEvent ('hover') with the pointer position;
|
|
211
|
+
* existing `() => void` handlers simply ignore the argument. Each call is
|
|
212
|
+
* isolated so one throwing handler cannot break the rest of the diff.
|
|
213
|
+
*
|
|
93
214
|
* Mutates `hovered` in place so the caller (App instance) can hold it
|
|
94
215
|
* across calls. Clears the set when the hit is null (cursor moved into a
|
|
95
216
|
* non-rendered gap or off the root rect).
|
|
@@ -100,7 +221,7 @@ export function dispatchClick(root, col, row, cellIsBlank = false) {
|
|
|
100
221
|
*/
|
|
101
222
|
export function dispatchHover(root, col, row, hovered) {
|
|
102
223
|
const next = new Set();
|
|
103
|
-
let node =
|
|
224
|
+
let node = hitTestWithOverlays(root, col, row) ?? undefined;
|
|
104
225
|
while (node) {
|
|
105
226
|
const h = node._eventHandlers;
|
|
106
227
|
if (h?.onMouseEnter || h?.onMouseLeave)
|
|
@@ -112,15 +233,32 @@ export function dispatchHover(root, col, row, hovered) {
|
|
|
112
233
|
hovered.delete(old);
|
|
113
234
|
// Skip handlers on detached nodes (removed between mouse events)
|
|
114
235
|
if (old.parentNode) {
|
|
115
|
-
|
|
116
|
-
|
|
236
|
+
const handler = old._eventHandlers
|
|
237
|
+
?.onMouseLeave;
|
|
238
|
+
if (handler) {
|
|
239
|
+
try {
|
|
240
|
+
handler(new PointerEvent('hover', col, row, { action: 'move' }));
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
logError(error);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
117
246
|
}
|
|
118
247
|
}
|
|
119
248
|
}
|
|
120
249
|
for (const n of next) {
|
|
121
250
|
if (!hovered.has(n)) {
|
|
122
251
|
hovered.add(n);
|
|
123
|
-
n._eventHandlers
|
|
252
|
+
const handler = n._eventHandlers
|
|
253
|
+
?.onMouseEnter;
|
|
254
|
+
if (handler) {
|
|
255
|
+
try {
|
|
256
|
+
handler(new PointerEvent('hover', col, row, { action: 'move' }));
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
logError(error);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
124
262
|
}
|
|
125
263
|
}
|
|
126
264
|
}
|
package/lib/types/ink/ink.d.ts
CHANGED
|
@@ -99,6 +99,28 @@ export default class Ink {
|
|
|
99
99
|
reanchorViewport(): void;
|
|
100
100
|
/** Render synchronously and invalidate older trailing/drain callbacks. */
|
|
101
101
|
private renderNow;
|
|
102
|
+
/**
|
|
103
|
+
* Schedule the next scroll-drain frame — Grok Build's Presenter, ported.
|
|
104
|
+
* Grok keeps TWO cadence knobs (min_draw_ms for renders, scroll_ms for
|
|
105
|
+
* scroll); collapsing both to FRAME_INTERVAL_MS made big flicks steppy
|
|
106
|
+
* (the proportional step, 75%-of-remaining, × 4× the interval = chunky
|
|
107
|
+
* ramp and ~4× longer settle), so the drain keeps its own fast cadence:
|
|
108
|
+
*
|
|
109
|
+
* - CADENCE: quarter interval (~250fps). Drain frames are cheap
|
|
110
|
+
* (DECSTBM + ~10 patches); scroll throughput is unchanged.
|
|
111
|
+
* - IN-FLIGHT GATE: while stdout still holds unflushed bytes above
|
|
112
|
+
* PTY_BACKLOG_BYTES (slow ConPTY round trip, ssh link), queue nothing
|
|
113
|
+
* further — re-probe at quarter interval instead. Grok's equivalent
|
|
114
|
+
* (in_flight_target + writer ack) exists to keep latency bounded
|
|
115
|
+
* under exactly this backpressure; without it each stacked frame adds
|
|
116
|
+
* its full render+write to the input→paint latency, which reads as
|
|
117
|
+
* sticky, laggy scrolling on Windows terminals.
|
|
118
|
+
*
|
|
119
|
+
* The gate holds only DRAIN frames; React-driven renders (keystrokes,
|
|
120
|
+
* streaming) still render via the normal throttle — user-visible updates
|
|
121
|
+
* must never wait behind scroll output.
|
|
122
|
+
*/
|
|
123
|
+
private scheduleDrain;
|
|
102
124
|
onRender(): void;
|
|
103
125
|
pause(): void;
|
|
104
126
|
resume(): void;
|
|
@@ -193,6 +215,31 @@ export default class Ink {
|
|
|
193
215
|
detachStdinForHandoff(): void;
|
|
194
216
|
/** @see drainStdin */
|
|
195
217
|
drainStdin(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Self-heal after a terminal-side mode reset. Windows conpty drops DEC
|
|
220
|
+
* private modes on DPI changes, window moves between monitors and renderer
|
|
221
|
+
* restarts — the user sees the app "exit fullscreen" with a dead mouse
|
|
222
|
+
* while altScreenActive still claims we are in alt. Two layers:
|
|
223
|
+
*
|
|
224
|
+
* 1. Blind, idempotent mouse-tracking re-assert (covers the mode reset
|
|
225
|
+
* without a round trip; ~30 bytes).
|
|
226
|
+
* 2. DECRQM probe of mode 1049. Re-entry (destructive: ERASE) happens
|
|
227
|
+
* ONLY on a positive "reset" answer, so iTerm2's
|
|
228
|
+
* enter-clears-when-already-in-alt quirk can never fire on a healthy
|
|
229
|
+
* screen, and terminals that ignore DECRQM stay inert.
|
|
230
|
+
*
|
|
231
|
+
* Called from every interaction dispatch (click/hover/wheel/key) plus the
|
|
232
|
+
* focus/resize/stdin-gap triggers. The 250ms throttle keeps the round
|
|
233
|
+
* trip bounded while active use is going on — a dropped 1049 heals on
|
|
234
|
+
* the FIRST interaction after the drop instead of waiting for a focus
|
|
235
|
+
* event or a >5s idle gap (mouse motion keeps lastStdinTime fresh, so
|
|
236
|
+
* the gap path never fires during active use — the exact pattern that
|
|
237
|
+
* left the app broken until the user gave up).
|
|
238
|
+
*/
|
|
239
|
+
private lastHealthProbeAt;
|
|
240
|
+
probeAltScreenHealth: () => void;
|
|
241
|
+
/** Refocus = first observable moment after a conpty-side mode reset. */
|
|
242
|
+
handleTerminalFocusProbe: (focused: boolean) => void;
|
|
196
243
|
/**
|
|
197
244
|
* Re-enter alt-screen, clear, home, re-enable mouse tracking, and reset
|
|
198
245
|
* frame buffers so the next render repaints from scratch. Self-heal for
|
|
@@ -312,8 +359,18 @@ export default class Ink {
|
|
|
312
359
|
* Returns true if a DOM handler consumed the click. Gated on
|
|
313
360
|
* altScreenActive — clicks only make sense with a fixed viewport where
|
|
314
361
|
* nodeCache rects map 1:1 to terminal cells (no scrollback offset).
|
|
362
|
+
* The button byte is the raw SGR release code; its modifier bits land
|
|
363
|
+
* on ClickEvent.shift/alt/ctrl.
|
|
364
|
+
*/
|
|
365
|
+
dispatchClick(col: number, row: number, button?: number): boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Route a wheel event to the ScrollBox (any onWheel handler) under the
|
|
368
|
+
* pointer. Returns true when a handler consumed it, so App can skip the
|
|
369
|
+
* legacy global wheel-key path and exactly one layer scrolls. Gated on
|
|
370
|
+
* altScreenActive like dispatchClick — without mouse tracking there are
|
|
371
|
+
* no wheel coordinates to route by.
|
|
315
372
|
*/
|
|
316
|
-
|
|
373
|
+
dispatchWheelAt(col: number, row: number, deltaY: number, deltaX?: number, button?: number): boolean;
|
|
317
374
|
dispatchHover(col: number, row: number): void;
|
|
318
375
|
dispatchKeyboardEvent(parsedKey: ParsedKey): void;
|
|
319
376
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AASrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAA4B,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAqG,KAAK,SAAS,EAAwF,KAAK,cAAc,EAAqH,MAAM,gBAAgB,CAAC;AAiCjX,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,GAAG;IA6HV,OAAO,CAAC,QAAQ,CAAC,OAAO;IA5HpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAA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