@deepseek-harness-tui/dsh-tui 0.7.3 → 0.8.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 +15 -7
- package/bin/dsh-tui.js +19 -3
- package/cordis.patch.yml +43 -11
- package/cordis.yml +20 -1
- package/ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
- package/ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
- package/ecosystem-spec/registry/permissions-0.1.json +13 -0
- package/ecosystem-spec/registry/registry-0.15.json +57 -0
- package/ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
- package/ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
- package/ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
- package/lib/types/cc/figures.d.ts +4 -0
- package/lib/types/cc/figures.d.ts.map +1 -1
- package/lib/types/cc/figures.js +4 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +4 -1
- package/lib/types/components/ExtensionDialog.d.ts +40 -0
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
- package/lib/types/components/ExtensionDialog.js +210 -0
- package/lib/types/components/HelpMenu.js +1 -1
- package/lib/types/components/LoadedContextPanel.d.ts +5 -10
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +7 -18
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +1 -2
- package/lib/types/components/MessageList.d.ts +3 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +29 -5
- package/lib/types/components/PluginSceneBoundary.d.ts +31 -0
- package/lib/types/components/PluginSceneBoundary.d.ts.map +1 -0
- package/lib/types/components/PluginSceneBoundary.js +29 -0
- package/lib/types/components/RewindPicker.d.ts +13 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +26 -2
- package/lib/types/components/SkillsPicker.d.ts +18 -0
- package/lib/types/components/SkillsPicker.d.ts.map +1 -0
- package/lib/types/components/SkillsPicker.js +50 -0
- package/lib/types/components/SplitDiffView.d.ts +28 -0
- package/lib/types/components/SplitDiffView.d.ts.map +1 -0
- package/lib/types/components/SplitDiffView.js +417 -0
- package/lib/types/components/ToolUseLoader.d.ts +8 -3
- package/lib/types/components/ToolUseLoader.d.ts.map +1 -1
- package/lib/types/components/ToolUseLoader.js +43 -9
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +3 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +17 -7
- package/lib/types/dsh-adapter/channel.d.ts +98 -7
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +623 -26
- package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
- package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-attribution.js +93 -0
- package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
- package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-errors.js +63 -0
- package/lib/types/dsh-adapter/component-identity.d.ts +28 -0
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/component-identity.js +108 -0
- package/lib/types/dsh-adapter/contract.d.ts +2 -2
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +3 -2
- package/lib/types/dsh-adapter/decision-guard.d.ts +84 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/decision-guard.js +354 -0
- package/lib/types/dsh-adapter/dialogs.d.ts +146 -0
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/dialogs.js +262 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +99 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
- package/lib/types/dsh-adapter/effect-ledger.js +231 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +193 -0
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extension-events.js +169 -0
- package/lib/types/dsh-adapter/extensions.d.ts +32 -0
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extensions.js +42 -0
- package/lib/types/dsh-adapter/grants.d.ts +25 -0
- package/lib/types/dsh-adapter/grants.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grants.js +184 -0
- package/lib/types/dsh-adapter/host-descriptor.d.ts +24 -0
- package/lib/types/dsh-adapter/host-descriptor.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-descriptor.js +146 -0
- package/lib/types/dsh-adapter/index.d.ts +4 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +1 -0
- package/lib/types/dsh-adapter/message-observer.d.ts +178 -0
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
- package/lib/types/dsh-adapter/message-observer.js +509 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +103 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-host.js +270 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts +113 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-storage.js +385 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +106 -1
- package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugins-info.js +276 -0
- package/lib/types/dsh-adapter/promptDebug.d.ts +10 -0
- package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -0
- package/lib/types/dsh-adapter/promptDebug.js +148 -0
- package/lib/types/dsh-adapter/renderers.d.ts +65 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/renderers.js +138 -0
- package/lib/types/dsh-adapter/sanitize.d.ts +36 -0
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sanitize.js +65 -0
- package/lib/types/dsh-adapter/scenes.d.ts +81 -0
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -0
- package/lib/types/dsh-adapter/scenes.js +93 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts +116 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -0
- package/lib/types/dsh-adapter/settings-sections.js +63 -0
- package/lib/types/dsh-adapter/settingsEditor.d.ts +128 -0
- package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -0
- package/lib/types/dsh-adapter/settingsEditor.js +244 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +109 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
- package/lib/types/dsh-adapter/shortcuts.js +268 -0
- package/lib/types/dsh-adapter/status.d.ts +75 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -0
- package/lib/types/dsh-adapter/status.js +168 -0
- package/lib/types/extensions.d.ts +8 -0
- package/lib/types/extensions.d.ts.map +1 -0
- package/lib/types/extensions.js +15 -0
- package/lib/types/i18n.d.ts +299 -26
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +89 -8
- package/lib/types/ink/ink.d.ts +11 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +33 -0
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +101 -51
- package/lib/types/ink/output.d.ts +7 -0
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +125 -4
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +14 -6
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +18 -6
- package/lib/types/jsx-runtime.d.ts +2 -0
- package/lib/types/jsx-runtime.d.ts.map +1 -0
- package/lib/types/jsx-runtime.js +13 -0
- package/lib/types/modelRoute.d.ts +10 -2
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +33 -4
- package/lib/types/plugin-host.d.ts +13 -0
- package/lib/types/plugin-host.d.ts.map +1 -0
- package/lib/types/plugin-host.js +17 -0
- package/lib/types/plugin-spec/negotiate.d.ts +11 -0
- package/lib/types/plugin-spec/negotiate.d.ts.map +1 -0
- package/lib/types/plugin-spec/negotiate.js +97 -0
- package/lib/types/plugin-spec/permission-scope.d.ts +32 -0
- package/lib/types/plugin-spec/permission-scope.d.ts.map +1 -0
- package/lib/types/plugin-spec/permission-scope.js +90 -0
- package/lib/types/plugin-spec/registry.d.ts +23 -0
- package/lib/types/plugin-spec/registry.d.ts.map +1 -0
- package/lib/types/plugin-spec/registry.js +157 -0
- package/lib/types/plugin-spec/schema-check.d.ts +17 -0
- package/lib/types/plugin-spec/schema-check.d.ts.map +1 -0
- package/lib/types/plugin-spec/schema-check.js +165 -0
- package/lib/types/plugin-spec/tui-extension.d.ts +16 -0
- package/lib/types/plugin-spec/tui-extension.d.ts.map +1 -0
- package/lib/types/plugin-spec/tui-extension.js +77 -0
- package/lib/types/plugin-spec/types.d.ts +114 -0
- package/lib/types/plugin-spec/types.d.ts.map +1 -0
- package/lib/types/plugin-spec/types.js +10 -0
- package/lib/types/plugin-spec/validate.d.ts +21 -0
- package/lib/types/plugin-spec/validate.d.ts.map +1 -0
- package/lib/types/plugin-spec/validate.js +119 -0
- package/lib/types/scenes.d.ts +3 -0
- package/lib/types/scenes.d.ts.map +1 -0
- package/lib/types/scenes.js +4 -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 +247 -48
- package/lib/types/screens/Settings.d.ts +20 -0
- package/lib/types/screens/Settings.d.ts.map +1 -0
- package/lib/types/screens/Settings.js +333 -0
- package/lib/types/screens/StatusLine.js +1 -1
- package/lib/types/settings-sections.d.ts +3 -0
- package/lib/types/settings-sections.d.ts.map +1 -0
- package/lib/types/settings-sections.js +4 -0
- package/lib/types/theme.d.ts +17 -0
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +51 -0
- package/lib/types/update.d.ts +20 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +54 -7
- package/lib/types/utils/loaded-context.d.ts +8 -3
- package/lib/types/utils/loaded-context.d.ts.map +1 -1
- package/lib/types/utils/loaded-context.js +39 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +3 -2
- package/lib/types/working-activity.d.ts +12 -0
- package/lib/types/working-activity.d.ts.map +1 -1
- package/lib/types/working-activity.js +13 -0
- package/node_modules/@dsh-std/command/LICENSE +21 -0
- package/node_modules/@dsh-std/command/README.md +26 -0
- package/node_modules/@dsh-std/command/README.zh.md +28 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/command/lib/index.js +252 -0
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/command/package.json +22 -0
- package/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/node_modules/@dsh-std/connection/README.md +42 -0
- package/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/node_modules/@dsh-std/connection/package.json +20 -0
- package/node_modules/@dsh-std/core/LICENSE +21 -0
- package/node_modules/@dsh-std/core/README.md +13 -0
- package/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/core/package.json +21 -0
- package/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/node_modules/@dsh-std/manifest/README.md +5 -0
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/manifest/package.json +20 -0
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/node_modules/@dsh-std/messages/LICENSE +21 -0
- package/node_modules/@dsh-std/messages/README.md +5 -0
- package/node_modules/@dsh-std/messages/README.zh.md +7 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/messages/lib/index.js +151 -0
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/messages/package.json +20 -0
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
- package/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/node_modules/@dsh-std/presentation/README.md +26 -0
- package/node_modules/@dsh-std/presentation/README.zh.md +28 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts +219 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.js +547 -0
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/node_modules/@dsh-std/presentation/package.json +21 -0
- package/node_modules/@dsh-std/storage/LICENSE +21 -0
- package/node_modules/@dsh-std/storage/README.md +5 -0
- package/node_modules/@dsh-std/storage/README.zh.md +7 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/storage/lib/index.js +104 -0
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/storage/package.json +20 -0
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
- package/package.json +118 -67
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +26 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +28 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +219 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +547 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +21 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
|
@@ -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;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAQrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAA4B,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAqG,KAAK,SAAS,EAAgE,KAAK,cAAc,EAAqH,MAAM,gBAAgB,CAAC;AAgCzV,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,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KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI;IAiFtC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,IAAI,IAAI;IAYtB;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI;IAUlB,YAAY,IAAI,MAAM,IAAI;IAqB1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;CAoCpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAM,CAAC,UAA0B,GAAG,IAAI,CAsDzE"}
|
package/lib/types/ink/ink.js
CHANGED
|
@@ -988,6 +988,39 @@ export default class Ink {
|
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
|
+
/**
|
|
992
|
+
* Fully detach stdin before handing the terminal to a child process that
|
|
993
|
+
* inherits it (the /update restart). `detachForShutdown()` restores
|
|
994
|
+
* cooked mode but leaves the App's 'readable' pump attached — ordinary
|
|
995
|
+
* exits don't care because the process dies right after, but a parent
|
|
996
|
+
* that lingers waiting on the child keeps a libuv read pending on the
|
|
997
|
+
* console and races the child for every keypress: the restarted TUI
|
|
998
|
+
* sees dropped or entirely swallowed input (issues #284/#307). Remove
|
|
999
|
+
* the listeners and pause the pump so the child is the sole reader.
|
|
1000
|
+
*/
|
|
1001
|
+
detachStdinForHandoff() {
|
|
1002
|
+
const stdin = this.options.stdin;
|
|
1003
|
+
try {
|
|
1004
|
+
this.drainStdin();
|
|
1005
|
+
}
|
|
1006
|
+
catch {
|
|
1007
|
+
// A destroyed stream must not block the handoff.
|
|
1008
|
+
}
|
|
1009
|
+
stdin.removeAllListeners('readable');
|
|
1010
|
+
stdin.removeAllListeners('data');
|
|
1011
|
+
try {
|
|
1012
|
+
stdin.pause();
|
|
1013
|
+
}
|
|
1014
|
+
catch {
|
|
1015
|
+
// Same destroyed-stream tolerance as above.
|
|
1016
|
+
}
|
|
1017
|
+
try {
|
|
1018
|
+
stdin.unref();
|
|
1019
|
+
}
|
|
1020
|
+
catch {
|
|
1021
|
+
// unref on a closed stream can throw on some Node versions.
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
991
1024
|
/** @see drainStdin */
|
|
992
1025
|
drainStdin() {
|
|
993
1026
|
drainStdin(this.options.stdin);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;AAsBpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAO7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;
|
|
1
|
+
{"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;AAsBpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAO7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;CAwcR"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ansiCodesToString, diffAnsiCodes, } from '@alcalzone/ansi-tokenize';
|
|
2
2
|
import { logForDebugging } from '../utils/debug.js';
|
|
3
3
|
import { cellAt, charInCellAt, diffEach, isEmptyCellAt, shiftRows, visibleCellAtIndex, } from './screen.js';
|
|
4
|
-
import { CURSOR_HOME,
|
|
4
|
+
import { CURSOR_HOME, eraseToEndOfScreen, scrollDown as csiScrollDown, scrollUp as csiScrollUp, RESET_SCROLL_REGION, SGR_RESET, setScrollRegion, } from './termio/csi.js';
|
|
5
5
|
import { isJetBrainsIdeTerminal } from './terminal.js';
|
|
6
6
|
import { LINK_END, link as oscLink } from './termio/osc.js';
|
|
7
7
|
const CARRIAGE_RETURN = { type: 'carriageReturn' };
|
|
@@ -207,19 +207,24 @@ export class LogUpdate {
|
|
|
207
207
|
const prevHadScrollback = cursorAtBottom && prev.screen.height >= prev.viewport.height;
|
|
208
208
|
const isShrinking = next.screen.height < prev.screen.height;
|
|
209
209
|
const nextFitsViewport = next.screen.height <= prev.viewport.height;
|
|
210
|
-
// When shrinking from above-viewport to at-or-below-viewport,
|
|
211
|
-
// that
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
//
|
|
216
|
-
//
|
|
210
|
+
// When shrinking from above-viewport to at-or-below-viewport, the rows
|
|
211
|
+
// that scrolled into scrollback during growth come BACK into the live
|
|
212
|
+
// frame, so their scrollback snapshots are now duplicates (seen as the
|
|
213
|
+
// duplicated whale logo after the first turn). Use a clear-terminal
|
|
214
|
+
// reset, not an in-place repaint: at this point the UI's scrollback
|
|
215
|
+
// footprint is at most a viewport tall (prev was at most one row past
|
|
216
|
+
// the viewport), which is exactly what the clear sequence blanks — the
|
|
217
|
+
// in-place repaint kept both copies (snapshot + live). The former full
|
|
218
|
+
// reset here was once changed to an in-place repaint to stop the
|
|
219
|
+
// per-shrink stale-copy deposits (#38 #39 #19), but that fix traded
|
|
220
|
+
// them for a different duplication: the repainted viewport overlaps
|
|
221
|
+
// rows whose growth snapshots are still in scrollback.
|
|
217
222
|
// Use <= (not <) because even when next height equals viewport height,
|
|
218
223
|
// the scrollback depth from the previous render differs from a fresh
|
|
219
224
|
// render.
|
|
220
225
|
if (prevHadScrollback && nextFitsViewport && isShrinking) {
|
|
221
|
-
logForDebugging(`
|
|
222
|
-
return
|
|
226
|
+
logForDebugging(`Full reset (shrink->below): prevHeight=${prev.screen.height}, nextHeight=${next.screen.height}, viewport=${prev.viewport.height}`);
|
|
227
|
+
return fullResetSequence_CAUSES_FLICKER(next, 'offscreen', stylePool);
|
|
223
228
|
}
|
|
224
229
|
// Steady-state scrollback check removed: rows above the viewport used
|
|
225
230
|
// to force a full reset (ESC[2J+ESC[3J) whenever they changed, which
|
|
@@ -240,20 +245,33 @@ export class LogUpdate {
|
|
|
240
245
|
const linesToClear = prev.screen.height - next.screen.height;
|
|
241
246
|
// Main-screen mode + content taller than the viewport: the terminal
|
|
242
247
|
// viewport does NOT follow the content bottom when content shrinks —
|
|
243
|
-
// a diff-loop path would write rows at stale physical offsets.
|
|
244
|
-
//
|
|
245
|
-
//
|
|
246
|
-
//
|
|
247
|
-
//
|
|
248
|
-
//
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
//
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
248
|
+
// a diff-loop path would write rows at stale physical offsets. Two
|
|
249
|
+
// sub-cases:
|
|
250
|
+
//
|
|
251
|
+
// 1. Frame shrinks but stays >= viewport height: take the ordinary
|
|
252
|
+
// diff loop. Its viewportY bookkeeping (the shrinking formula plus
|
|
253
|
+
// cursorRestoreScroll below) addresses rows through the parked
|
|
254
|
+
// cursor correctly, and the diff only touches the few rows that
|
|
255
|
+
// actually changed. A viewport repaint here re-paints the whole
|
|
256
|
+
// window from the viewport top while the frame top sits a few rows
|
|
257
|
+
// ABOVE it (frame is taller than the window) — the growth frames
|
|
258
|
+
// around the shrink freeze those overlapped rows into scrollback
|
|
259
|
+
// as snapshots while the same rows stay live in the window, which
|
|
260
|
+
// the user sees as duplicated transcript rows when scrolling up.
|
|
261
|
+
// 2. Frame shrinks to BELOW the viewport (content now fits): the rows
|
|
262
|
+
// that scrolled into scrollback during growth come BACK into the
|
|
263
|
+
// live frame, so their scrollback snapshots are now duplicates
|
|
264
|
+
// (seen as the duplicated whale logo after the first turn). Use a
|
|
265
|
+
// clear-terminal reset here, not an in-place repaint: at this
|
|
266
|
+
// point the UI's scrollback footprint is at most a viewport tall,
|
|
267
|
+
// which is exactly what the clear sequence blanks, while the
|
|
268
|
+
// in-place repaint would keep both copies. Only fires early in a
|
|
269
|
+
// session (frame ~= viewport); once the transcript outgrows the
|
|
270
|
+
// viewport, case 1 handles every shrink.
|
|
271
|
+
if (!altScreen &&
|
|
272
|
+
prev.screen.height > prev.viewport.height &&
|
|
273
|
+
next.screen.height < next.viewport.height) {
|
|
274
|
+
logForDebugging(`Full reset (shrink to fit): prevHeight=${prev.screen.height}, nextHeight=${next.screen.height}, viewport=${prev.viewport.height}`);
|
|
257
275
|
return fullResetSequence_CAUSES_FLICKER(next, 'offscreen', this.options.stylePool);
|
|
258
276
|
}
|
|
259
277
|
// eraseLines only works within the viewport - it can't clear scrollback.
|
|
@@ -518,7 +536,7 @@ function fullResetSequence_CAUSES_FLICKER(frame, reason, stylePool, debug) {
|
|
|
518
536
|
const contentRows = Math.min(height, Math.max(1, frame.viewport.height - 1));
|
|
519
537
|
const startY = height - contentRows;
|
|
520
538
|
const screen = new VirtualScreen({ x: 0, y: startY }, frame.viewport.width);
|
|
521
|
-
renderFrameSlice(screen, frame, startY, height, stylePool);
|
|
539
|
+
renderFrameSlice(screen, frame, startY, height, stylePool, false);
|
|
522
540
|
return [{ type: 'clearTerminal', reason, debug }, ...screen.diff];
|
|
523
541
|
}
|
|
524
542
|
/**
|
|
@@ -576,27 +594,42 @@ function viewportRepaintPatches(prev, next, stylePool, resetPrefix, origin) {
|
|
|
576
594
|
// steady state, where the park LF materializes one row below the frame).
|
|
577
595
|
const contentRows = Math.min(height, viewportHeight - 1);
|
|
578
596
|
const startY = height - contentRows;
|
|
579
|
-
//
|
|
580
|
-
//
|
|
581
|
-
//
|
|
582
|
-
//
|
|
583
|
-
//
|
|
584
|
-
//
|
|
597
|
+
// Anchor with CSI H (cursor to viewport origin) instead of a RELATIVE
|
|
598
|
+
// cursor-up walk. The relative form assumed the physical cursor sits
|
|
599
|
+
// exactly on the park row — an assumption that breaks after a terminal
|
|
600
|
+
// reflow (a width change rewraps scrollback, shifting the buffer/cursor
|
|
601
|
+
// bookkeeping by a row or two). The over-shot cursor-up lands ABOVE the
|
|
602
|
+
// viewport top, and the subsequent erase+repaint writes a full UI copy
|
|
603
|
+
// into the scrollback (duplicated-history reports). CSI H has absolute
|
|
604
|
+
// semantics — it always lands on the current viewport's top-left — so the
|
|
605
|
+
// repaint can never cross into scrollback regardless of cursor drift.
|
|
606
|
+
// Erase down from there (BCE fill — the SGR reset guarantees the default
|
|
607
|
+
// background). The erase also blanks the park row, so no stale
|
|
585
608
|
// prompt/status pixels survive below short content.
|
|
586
|
-
const rowsToStart = origin === 'viewport-bottom' ? viewportHeight - 1 : contentRows;
|
|
587
609
|
const anchor = (resetPrefix ? SGR_RESET + LINK_END : '') +
|
|
588
|
-
|
|
589
|
-
cursorUp(rowsToStart) +
|
|
610
|
+
CURSOR_HOME +
|
|
590
611
|
eraseToEndOfScreen();
|
|
591
612
|
const screen = new VirtualScreen({ x: 0, y: startY }, next.viewport.width);
|
|
592
|
-
renderFrameSlice(screen, next, startY, height, stylePool);
|
|
613
|
+
renderFrameSlice(screen, next, startY, height, stylePool, false);
|
|
593
614
|
return [{ type: 'stdout', content: anchor }, ...screen.diff];
|
|
594
615
|
}
|
|
595
616
|
/**
|
|
596
617
|
* Render a slice of rows from the frame's screen.
|
|
597
618
|
* Each row is rendered followed by a newline. Cursor ends at (0, endY).
|
|
598
619
|
*/
|
|
599
|
-
function renderFrameSlice(screen, frame, startY, endY, stylePool
|
|
620
|
+
function renderFrameSlice(screen, frame, startY, endY, stylePool,
|
|
621
|
+
/**
|
|
622
|
+
* When false (repaint / full-reset paths), advance rows with
|
|
623
|
+
* CR + cursor-down instead of bare LFs. The repaint paints exactly a
|
|
624
|
+
* viewport of rows starting at the viewport top; a trailing LF on the
|
|
625
|
+
* bottom row SCROLLS the terminal, pushing a copy of the just-painted
|
|
626
|
+
* rows into the scrollback that the cursor bookkeeping never accounted
|
|
627
|
+
* for — every later relative move lands offset, writing content into
|
|
628
|
+
* the history (duplicated transcript rows on scroll-up). cursor-down
|
|
629
|
+
* clamps at the bottom margin instead of scrolling, so the physical
|
|
630
|
+
* cursor stays exactly where the model expects it.
|
|
631
|
+
*/
|
|
632
|
+
allowScroll = true) {
|
|
600
633
|
let currentStyleId = stylePool.none;
|
|
601
634
|
let currentHyperlink = undefined;
|
|
602
635
|
// Track the styleId of the last rendered cell on this line (-1 if none).
|
|
@@ -605,22 +638,30 @@ function renderFrameSlice(screen, frame, startY, endY, stylePool) {
|
|
|
605
638
|
const { width: screenWidth, cells, charPool, hyperlinkPool } = frame.screen;
|
|
606
639
|
let index = startY * screenWidth;
|
|
607
640
|
for (let y = startY; y < endY; y += 1) {
|
|
608
|
-
// Advance cursor to this row
|
|
609
|
-
// CSI CUD stops at the viewport bottom margin and cannot
|
|
610
|
-
// but LF scrolls the viewport to create new lines. Without this,
|
|
641
|
+
// Advance cursor to this row. With allowScroll, use LF (not CSI CUD /
|
|
642
|
+
// cursor-down): CSI CUD stops at the viewport bottom margin and cannot
|
|
643
|
+
// scroll, but LF scrolls the viewport to create new lines. Without this,
|
|
611
644
|
// when the cursor is at the viewport bottom, moveCursorTo's
|
|
612
645
|
// cursor-down silently fails, creating a permanent off-by-one
|
|
613
646
|
// between the virtual cursor and the real terminal cursor.
|
|
614
647
|
if (screen.cursor.y < y) {
|
|
615
648
|
const rowsToAdvance = y - screen.cursor.y;
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
649
|
+
if (allowScroll) {
|
|
650
|
+
screen.txn(prev => {
|
|
651
|
+
const patches = new Array(1 + rowsToAdvance);
|
|
652
|
+
patches[0] = CARRIAGE_RETURN;
|
|
653
|
+
for (let i = 0; i < rowsToAdvance; i++) {
|
|
654
|
+
patches[1 + i] = NEWLINE;
|
|
655
|
+
}
|
|
656
|
+
return [patches, { dx: -prev.x, dy: rowsToAdvance }];
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
screen.txn(prev => [
|
|
661
|
+
[CARRIAGE_RETURN, { type: 'cursorMove', x: 0, y: rowsToAdvance }],
|
|
662
|
+
{ dx: -prev.x, dy: rowsToAdvance },
|
|
663
|
+
]);
|
|
664
|
+
}
|
|
624
665
|
}
|
|
625
666
|
// Reset at start of each line — no cell rendered yet
|
|
626
667
|
lastRenderedStyleId = -1;
|
|
@@ -650,10 +691,19 @@ function renderFrameSlice(screen, frame, startY, endY, stylePool) {
|
|
|
650
691
|
// skip empty cells, we must reset explicitly.
|
|
651
692
|
currentStyleId = transitionStyle(screen.diff, stylePool, currentStyleId, stylePool.none);
|
|
652
693
|
currentHyperlink = transitionHyperlink(screen.diff, currentHyperlink, undefined);
|
|
653
|
-
// CR+LF at end of row —
|
|
654
|
-
// Without \r, the terminal cursor stays at
|
|
655
|
-
// (since we skip trailing spaces, this
|
|
656
|
-
|
|
694
|
+
// CR+LF (or CR+cursor-down for non-scrolling slices) at end of row —
|
|
695
|
+
// \r resets to column 0. Without \r, the terminal cursor stays at
|
|
696
|
+
// whatever column content ended (since we skip trailing spaces, this
|
|
697
|
+
// can be mid-row).
|
|
698
|
+
if (allowScroll) {
|
|
699
|
+
screen.txn(prev => [[CARRIAGE_RETURN, NEWLINE], { dx: -prev.x, dy: 1 }]);
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
screen.txn(prev => [
|
|
703
|
+
[CARRIAGE_RETURN, { type: 'cursorMove', x: 0, y: 1 }],
|
|
704
|
+
{ dx: -prev.x, dy: 1 },
|
|
705
|
+
]);
|
|
706
|
+
}
|
|
657
707
|
}
|
|
658
708
|
// Reset any open style/hyperlink at end of slice
|
|
659
709
|
transitionStyle(screen.diff, stylePool, currentStyleId, stylePool.none);
|
|
@@ -130,6 +130,13 @@ export default class Output {
|
|
|
130
130
|
private screen;
|
|
131
131
|
private readonly operations;
|
|
132
132
|
private charCache;
|
|
133
|
+
/**
|
|
134
|
+
* Streaming-tail slot, shared by every writeLineToScreen call of this
|
|
135
|
+
* Output (only one line grows per frame during streaming). Survives reset()
|
|
136
|
+
* like charCache - it is keyed by strict line extension, so stale entries
|
|
137
|
+
* can never produce a wrong hit.
|
|
138
|
+
*/
|
|
139
|
+
private streamingSlot;
|
|
133
140
|
constructor(options: Options);
|
|
134
141
|
/**
|
|
135
142
|
* Reuse this Output for a new frame. Zeroes the screen buffer, clears
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/ink/output.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/ink/output.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;AAIpB;;;;;;;;;GASG;AACH,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,CAAA;AAgCD;;;;GAIG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,GAAG,CAAqC;IAChD,OAAO,CAAC,KAAK,CAAI;IAEjB;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,SAAS;IAI9C;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI;IAapD,mEAAmE;IACnE,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,qCAAqC;IACrC,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED;;;;GAIG;AACH,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,sFAAsF;AACtF,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,aAAa,GACb,eAAe,GACf,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,cAAc,CAAA;AAElB,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,OAAO,CAAA;IACb,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,IAAI,EAAE,MAAM,CAAA;I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SAAS,CAAW;IACrC,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;IAE7C,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,aAAa,CAA2D;gBAEpE,OAAO,EAAE,OAAO;IAW5B;;;;;;;;;OASG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAW1D;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5E;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAInD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI;IAItD;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIjC;;;;;;OAMG;IACH,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI;IAcrE;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAOtB,uCAAuC;IACvC,MAAM,IAAI,IAAI;IAMd;;;OAGG;IACH,GAAG,IAAI,MAAM;CAyQd"}
|
package/lib/types/ink/output.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styledCharsFromTokens, tokenize, } from '@alcalzone/ansi-tokenize';
|
|
1
|
+
import { ansiCodesToString, styledCharsFromTokens, tokenize, } from '@alcalzone/ansi-tokenize';
|
|
2
2
|
import { logForDebugging } from '../utils/debug.js';
|
|
3
3
|
import { getGraphemeSegmenter } from '../utils/intl.js';
|
|
4
4
|
import sliceAnsi from '../utils/sliceAnsi.js';
|
|
@@ -106,6 +106,120 @@ function minDefined(a, b) {
|
|
|
106
106
|
return a;
|
|
107
107
|
return Math.min(a, b);
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Classify the tail of the line relative to its LAST ESC character.
|
|
111
|
+
* - 'none': no ESC at all
|
|
112
|
+
* - 'dangling': the last ESC starts an escape sequence that is cut off at
|
|
113
|
+
* end-of-line - next frame's continuation completes it, so the prefix
|
|
114
|
+
* clustering cannot be reused (the partial sequence was clustered as text)
|
|
115
|
+
* - 'bare': the last ESC's sequence is complete but ends exactly at
|
|
116
|
+
* end-of-line - the SGR state after it never applied to any character, so
|
|
117
|
+
* trailingStyles (derived from the last char) would be stale next frame
|
|
118
|
+
* - 'complete': last sequence terminated with plain text after it
|
|
119
|
+
*/
|
|
120
|
+
function escapeTailState(line) {
|
|
121
|
+
const i = line.lastIndexOf('\x1b');
|
|
122
|
+
if (i === -1)
|
|
123
|
+
return 'none';
|
|
124
|
+
const rest = line.slice(i);
|
|
125
|
+
const c1 = rest[1];
|
|
126
|
+
if (c1 === undefined)
|
|
127
|
+
return 'dangling';
|
|
128
|
+
if (c1 === '[') {
|
|
129
|
+
for (let k = 2; k < rest.length; k++) {
|
|
130
|
+
const ch = rest.charCodeAt(k);
|
|
131
|
+
if (ch >= 0x40 && ch <= 0x7e)
|
|
132
|
+
return k === rest.length - 1 ? 'bare' : 'complete';
|
|
133
|
+
if (ch < 0x20 || ch > 0x3f)
|
|
134
|
+
return 'complete';
|
|
135
|
+
}
|
|
136
|
+
return 'dangling';
|
|
137
|
+
}
|
|
138
|
+
if (c1 === ']' || c1 === 'P' || c1 === '_' || c1 === '^' || c1 === 'X') {
|
|
139
|
+
for (let k = 2; k < rest.length; k++) {
|
|
140
|
+
if (rest[k] === '\x07')
|
|
141
|
+
return k === rest.length - 1 ? 'bare' : 'complete';
|
|
142
|
+
if (rest[k] === '\x1b' && rest[k + 1] === '\\') {
|
|
143
|
+
return k + 1 === rest.length - 1 ? 'bare' : 'complete';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return 'dangling';
|
|
147
|
+
}
|
|
148
|
+
// Two-character sequence ESC <0x30-0x7E>: rest.length >= 2 means complete.
|
|
149
|
+
return rest.length === 2 ? 'bare' : 'complete';
|
|
150
|
+
}
|
|
151
|
+
/** True when the line's last code point may continue into a multi-codepoint
|
|
152
|
+
* grapheme (ZWJ, variation selectors, combining marks, skin tones, regional
|
|
153
|
+
* indicators) - appending to it would change the last grapheme's clustering. */
|
|
154
|
+
function endsWithOpenGrapheme(line) {
|
|
155
|
+
const cp = line.codePointAt(line.length - 1);
|
|
156
|
+
if (cp === undefined)
|
|
157
|
+
return false;
|
|
158
|
+
return (cp === 0x200d ||
|
|
159
|
+
cp === 0xfe0f ||
|
|
160
|
+
cp === 0xfe0e ||
|
|
161
|
+
(cp >= 0x0300 && cp <= 0x036f) ||
|
|
162
|
+
(cp >= 0x1f3fb && cp <= 0x1f3ff) ||
|
|
163
|
+
(cp >= 0x1f1e6 && cp <= 0x1f1ff));
|
|
164
|
+
}
|
|
165
|
+
/** Hebrew / Arabic / Syriac and related RTL blocks - bidirectional reordering
|
|
166
|
+
* is line-global, so prefix-reuse (which reorders only the suffix) is not
|
|
167
|
+
* safe for these; take the full path. */
|
|
168
|
+
function hasRtlChars(text) {
|
|
169
|
+
return /[\u0590-\u05FF\u0600-\u06FF\u0700-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/.test(text);
|
|
170
|
+
}
|
|
171
|
+
/** Update (or clear) the streaming slot after a full-path build of `line`.
|
|
172
|
+
* The slot is only kept when the line can safely be extended next frame. */
|
|
173
|
+
function updateStreamingSlot(slot, line, clustered, chars) {
|
|
174
|
+
if (line.length <= MAX_CACHEABLE_LINE ||
|
|
175
|
+
endsWithOpenGrapheme(line) ||
|
|
176
|
+
hasRtlChars(line)) {
|
|
177
|
+
// Short lines are served by CharCache; complex tails always take the
|
|
178
|
+
// full path. Drop a stale slot when the stream settles.
|
|
179
|
+
if (slot.current)
|
|
180
|
+
slot.current = null;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const tail = escapeTailState(line);
|
|
184
|
+
if (tail === 'dangling' || tail === 'bare') {
|
|
185
|
+
if (slot.current)
|
|
186
|
+
slot.current = null;
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
slot.current = {
|
|
190
|
+
line: detachString(line),
|
|
191
|
+
clustered,
|
|
192
|
+
trailingStyles: chars.length > 0 ? chars[chars.length - 1].styles : [],
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Build the clustered characters for one line, taking the streaming-prefix
|
|
197
|
+
* fast path when possible. `slot` is the instance-level streaming slot;
|
|
198
|
+
* `prevChars`/`fullChars` wiring is handled by updateStreamingSlot.
|
|
199
|
+
*/
|
|
200
|
+
function buildClusteredChars(line, stylePool, slot) {
|
|
201
|
+
const prev = slot.current;
|
|
202
|
+
if (prev &&
|
|
203
|
+
line.length > MAX_CACHEABLE_LINE &&
|
|
204
|
+
line.length > prev.line.length &&
|
|
205
|
+
line.startsWith(prev.line) &&
|
|
206
|
+
!endsWithOpenGrapheme(prev.line) &&
|
|
207
|
+
!hasRtlChars(line.slice(prev.line.length))) {
|
|
208
|
+
// Reuse the prefix clustering verbatim; tokenize only the appended
|
|
209
|
+
// suffix, replaying the line-end SGR state so new characters inherit
|
|
210
|
+
// the correct style. Bidi runs on the suffix alone (line verified RTL-free).
|
|
211
|
+
const suffix = line.slice(prev.line.length);
|
|
212
|
+
const replay = styledCharsFromTokens(tokenize(ansiCodesToString(prev.trailingStyles) + suffix));
|
|
213
|
+
const clustered = styledCharsWithGraphemeClustering(replay, stylePool);
|
|
214
|
+
const result = prev.clustered.concat(reorderBidi(clustered));
|
|
215
|
+
updateStreamingSlot(slot, line, result, replay);
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
const chars = styledCharsFromTokens(tokenize(line));
|
|
219
|
+
const clustered = reorderBidi(styledCharsWithGraphemeClustering(chars, stylePool));
|
|
220
|
+
updateStreamingSlot(slot, line, clustered, chars);
|
|
221
|
+
return clustered;
|
|
222
|
+
}
|
|
109
223
|
/**
|
|
110
224
|
* Collects write/blit/clear/clip operations from the render tree, then
|
|
111
225
|
* applies them to a Screen buffer in get(). The Screen is what gets
|
|
@@ -120,6 +234,13 @@ export default class Output {
|
|
|
120
234
|
screen;
|
|
121
235
|
operations = [];
|
|
122
236
|
charCache = new CharCache();
|
|
237
|
+
/**
|
|
238
|
+
* Streaming-tail slot, shared by every writeLineToScreen call of this
|
|
239
|
+
* Output (only one line grows per frame during streaming). Survives reset()
|
|
240
|
+
* like charCache - it is keyed by strict line extension, so stale entries
|
|
241
|
+
* can never produce a wrong hit.
|
|
242
|
+
*/
|
|
243
|
+
streamingSlot = { current: null };
|
|
123
244
|
constructor(options) {
|
|
124
245
|
const { width, height, stylePool, screen } = options;
|
|
125
246
|
this.width = width;
|
|
@@ -403,7 +524,7 @@ export default class Output {
|
|
|
403
524
|
if (lineY >= screenHeight) {
|
|
404
525
|
break;
|
|
405
526
|
}
|
|
406
|
-
const contentEnd = writeLineToScreen(screen, line, x, lineY, screenWidth, this.stylePool, this.charCache);
|
|
527
|
+
const contentEnd = writeLineToScreen(screen, line, x, lineY, screenWidth, this.stylePool, this.charCache, this.streamingSlot);
|
|
407
528
|
writeCells += contentEnd - x;
|
|
408
529
|
// See Screen.softWrap docstring for the encoding. contentEnd
|
|
409
530
|
// from writeLineToScreen is tab-expansion-aware, unlike
|
|
@@ -520,10 +641,10 @@ function flushBuffer(buffer, styles, stylePool, out) {
|
|
|
520
641
|
* the caller can record it in screen.softWrap without re-walking the
|
|
521
642
|
* line via stringWidth(). Caller computes the debug cell-count as end-x.
|
|
522
643
|
*/
|
|
523
|
-
function writeLineToScreen(screen, line, x, y, screenWidth, stylePool, charCache) {
|
|
644
|
+
function writeLineToScreen(screen, line, x, y, screenWidth, stylePool, charCache, streamingSlot) {
|
|
524
645
|
let characters = charCache.get(line);
|
|
525
646
|
if (!characters) {
|
|
526
|
-
characters =
|
|
647
|
+
characters = buildClusteredChars(line, stylePool, streamingSlot);
|
|
527
648
|
charCache.set(line, characters);
|
|
528
649
|
}
|
|
529
650
|
let offsetX = x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-node-to-output.d.ts","sourceRoot":"","sources":["../../../src/ink/render-node-to-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAK1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAqBxC,6CAA6C;AAC7C,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAOD;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAWvE,qFAAqF;AACrF,wBAAgB,eAAe,IAAI,IAAI,CAItC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAEjD;AASD,8DAA8D;AAC9D,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,UAAU,GAAG,IAAI,CAEtD;AAUD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAGD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,GAAG,IAAI,CAIzD;AAoFD;;;;;GAKG;AACH,iBAAS,qBAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CASlE;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,wBAAwB,CAC/B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,aAAa,EAAE,EACzB,aAAa,EAAE,MAAM,EAAE,EACvB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,OAAe,GAC3B,MAAM,CA0GR;AA+DD;;;;;;;;;GASG;AACH,iBAAS,kBAAkB,CACzB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAM9B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,wBAAwB,CAAC,EAAE,KAAK,CAAA;CACjC,GACA,IAAI,
|
|
1
|
+
{"version":3,"file":"render-node-to-output.d.ts","sourceRoot":"","sources":["../../../src/ink/render-node-to-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAK1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAqBxC,6CAA6C;AAC7C,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAOD;;;;;;GAMG;AACH,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B,EAAE,CAAA;AAE1D,eAAe,kBAAkB,CAAA"}
|
|
@@ -701,7 +701,9 @@ function renderNodeToOutput(node, output, options) {
|
|
|
701
701
|
const pending = node.pendingScrollDelta;
|
|
702
702
|
const cMin = node.scrollClampMin;
|
|
703
703
|
const cMax = node.scrollClampMax;
|
|
704
|
-
|
|
704
|
+
// Single-sided clamps are valid: sticky virtualization sets only the
|
|
705
|
+
// min (scroll-up protection during the sticky->manual transition)
|
|
706
|
+
// and leaves the max open for bottom-follow.
|
|
705
707
|
if (pending !== undefined && pending !== 0) {
|
|
706
708
|
// Drain continues even past the clamp — the render-clamp below
|
|
707
709
|
// holds the VISUAL at the mounted edge regardless. Hard-stopping
|
|
@@ -715,8 +717,8 @@ function renderNodeToOutput(node, output, options) {
|
|
|
715
717
|
// perceived stall at the edge). Past-clamp drain caps at ~4 rows/
|
|
716
718
|
// frame, roughly matching React's slide rate so the gap stays
|
|
717
719
|
// bounded and catch-up is quick once input stops.
|
|
718
|
-
const pastClamp =
|
|
719
|
-
(
|
|
720
|
+
const pastClamp = (pending < 0 && cMin !== undefined && cur < cMin) ||
|
|
721
|
+
(pending > 0 && cMax !== undefined && cur > cMax);
|
|
720
722
|
const eff = pastClamp ? Math.min(4, innerHeight >> 3) : innerHeight;
|
|
721
723
|
cur += isXtermJsHost()
|
|
722
724
|
? drainAdaptive(node, pending, eff)
|
|
@@ -739,9 +741,7 @@ function renderNodeToOutput(node, output, options) {
|
|
|
739
741
|
// the right range. Not scheduling scrollDrainNode here keeps the
|
|
740
742
|
// clamp passive — React's commit → resetAfterCommit → onRender will
|
|
741
743
|
// paint again with fresh bounds.
|
|
742
|
-
const clamped =
|
|
743
|
-
? Math.max(cMin, Math.min(scrollTop, cMax))
|
|
744
|
-
: scrollTop;
|
|
744
|
+
const clamped = Math.max(cMin ?? -Infinity, Math.min(scrollTop, cMax ?? Infinity));
|
|
745
745
|
node.scrollTop = scrollTop;
|
|
746
746
|
// Clamp hitting top/bottom consumes any remainder. Set drainPending
|
|
747
747
|
// only after clamp so a wasted no-op frame isn't scheduled.
|
|
@@ -819,6 +819,14 @@ function renderNodeToOutput(node, output, options) {
|
|
|
819
819
|
const scrollHeight = contentYoga.getComputedHeight();
|
|
820
820
|
const prevHeight = contentCached?.height ?? scrollHeight;
|
|
821
821
|
const heightDelta = scrollHeight - prevHeight;
|
|
822
|
+
// NOTE: scroll-up + streaming growth (delta < 0, heightDelta > 0)
|
|
823
|
+
// deliberately stays OUT of the fast path. Virtualization moves the
|
|
824
|
+
// topPad spacer on the same frame (every mounted row's yogaTop
|
|
825
|
+
// shifts), so the appended-content screen mapping is not derivable
|
|
826
|
+
// from prevHeight - a widened edge region misses rows and leaves
|
|
827
|
+
// blitted stale copies next to the new ones (content duplication).
|
|
828
|
+
// Upstream observed the same class of bug ("content bleeding
|
|
829
|
+
// through during scroll-up + streaming") and chose the full path.
|
|
822
830
|
const safeForFastPath = !hint ||
|
|
823
831
|
heightDelta === 0 ||
|
|
824
832
|
(hint.delta > 0 && heightDelta === hint.delta);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../src/ink/terminal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAKtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../src/ink/terminal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAKtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAatC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,eAAe,CAAA;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,IAAI,OAAO,CAuCtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAwDvD;AAcD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAyBD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,WAAW,GAAE,MAAM,GAAG,SAAoC,EAC1D,kBAAkB,GAAE,MAAM,GAAG,SAA4C,GACxE,OAAO,CAOT;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,SAAkC,CAAA;AAEpE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAuBD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,eAAe,UAAQ,GACtB,IAAI,CAgFN"}
|
|
@@ -2,8 +2,7 @@ import { coerce } from 'semver';
|
|
|
2
2
|
import { appendFileSync } from 'node:fs';
|
|
3
3
|
import { env } from '../utils/env.js';
|
|
4
4
|
import { gte } from '../utils/semver.js';
|
|
5
|
-
import {
|
|
6
|
-
import { cursorMove, cursorTo, eraseLines, SGR_RESET } from './termio/csi.js';
|
|
5
|
+
import { CURSOR_HOME, cursorMove, cursorTo, ERASE_SCREEN, ERASE_SCROLLBACK, eraseLines, SGR_RESET, } from './termio/csi.js';
|
|
7
6
|
import { BSU, ESU, HIDE_CURSOR, SHOW_CURSOR } from './termio/dec.js';
|
|
8
7
|
import { link } from './termio/osc.js';
|
|
9
8
|
/**
|
|
@@ -312,10 +311,23 @@ export function writeDiffToTerminal(terminal, diff, skipSyncMarkers = false) {
|
|
|
312
311
|
}
|
|
313
312
|
break;
|
|
314
313
|
case 'clearTerminal':
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
|
|
314
|
+
// Hard clear of screen + scrollback. MUST run OUTSIDE the BSU/ESU
|
|
315
|
+
// sync block: Windows Terminal snaps the viewport back to the top
|
|
316
|
+
// when 2J/3J execute inside a synchronized-update block
|
|
317
|
+
// (claude-code#35580) — the reason the scrollUp-based "soft" clear
|
|
318
|
+
// existed at all. Close the block, clear, reopen. Everything stays
|
|
319
|
+
// in the SAME write, so the terminal processes it with no
|
|
320
|
+
// intermediate paint. The hard clear actually removes the UI's
|
|
321
|
+
// scrollback snapshots (the duplicated whale-logo class of bugs);
|
|
322
|
+
// the old soft clear (CSI n S) PUSHED the live viewport into the
|
|
323
|
+
// scrollback instead, depositing a fresh full-UI copy per reset.
|
|
324
|
+
buffer +=
|
|
325
|
+
(useSync ? ESU : '') +
|
|
326
|
+
SGR_RESET +
|
|
327
|
+
ERASE_SCREEN +
|
|
328
|
+
ERASE_SCROLLBACK +
|
|
329
|
+
CURSOR_HOME +
|
|
330
|
+
(useSync ? BSU : '');
|
|
319
331
|
break;
|
|
320
332
|
case 'cursorHide':
|
|
321
333
|
buffer += HIDE_CURSOR;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx-runtime.ts"],"names":[],"mappings":"AAYA,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Host JSX factory for plugin scenes: re-exports the TUI's OWN
|
|
2
|
+
// react/jsx-runtime, so JSX a plugin compiles against this subpath produces
|
|
3
|
+
// React 19 elements (`Symbol.for('react.transitional.element')`) — the only
|
|
4
|
+
// element flavor this app's reconciler accepts. A plugin bundling its own
|
|
5
|
+
// older React emits `Symbol.for('react.element')` and dies on first render.
|
|
6
|
+
//
|
|
7
|
+
// Plugin tsconfig:
|
|
8
|
+
// "jsx": "react-jsx",
|
|
9
|
+
// "jsxImportSource": "@deepseek-harness-tui/dsh-tui"
|
|
10
|
+
//
|
|
11
|
+
// Hooks still come from the scene props' injected `React` — this module
|
|
12
|
+
// covers element creation only.
|
|
13
|
+
export * from 'react/jsx-runtime';
|