@jingyi0605/codingns4dsh 0.2.1-beta.8 → 0.2.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +8 -6
- package/README.md +14 -7
- package/assets/provider-icons/magpie.png +0 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -1
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -1
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +26 -1
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -1
- package/data/build/dist/bootstrap/index.d.ts +1 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +57 -91
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +10 -2
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.js +16 -4
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.js +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.d.ts +3 -1
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.js +31 -12
- package/data/build/dist/client/avatar/desktop-view.js.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts +7 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.js +68 -33
- package/data/build/dist/client/avatar/notification-bubble.js.map +1 -1
- package/data/build/dist/client/bundle.js +54814 -34268
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-management-dialog.d.ts +21 -0
- package/data/build/dist/client/cli-management-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-dialog.js +215 -0
- package/data/build/dist/client/cli-management-dialog.js.map +1 -0
- package/data/build/dist/client/cli-management-terminal.d.ts +9 -0
- package/data/build/dist/client/cli-management-terminal.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-terminal.js +30 -0
- package/data/build/dist/client/cli-management-terminal.js.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts +9 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.js +45 -0
- package/data/build/dist/client/cli-settings-dialog.js.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.js +1 -1
- package/data/build/dist/client/cli-settings-rpc.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts +17 -3
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +321 -38
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +4 -3
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/client.assistant-notifications.js.map +1 -1
- package/data/build/dist/client/client.delegate-command.js +50 -32
- package/data/build/dist/client/client.delegate-command.js.map +1 -1
- package/data/build/dist/client/client.editor-engine.js +4 -1
- package/data/build/dist/client/client.editor-engine.js.map +1 -1
- package/data/build/dist/client/{client.model-catalog-cache.js → client.magpie-model-tag.js} +241 -12
- package/data/build/dist/client/client.magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/client.moss-voice-output.js +415 -0
- package/data/build/dist/client/client.moss-voice-output.js.map +1 -0
- package/data/build/dist/client/client.native-workspace-store.js +103 -17
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.primitives-adapter.js +128 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -1
- package/data/build/dist/client/client.react-dom.js +0 -404
- package/data/build/dist/client/client.react-dom.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +173 -0
- package/data/build/dist/client/client.session-translation.js.map +1 -0
- package/data/build/dist/client/client.transport.js +813 -48
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts +11 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.js +54 -0
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -1
- package/data/build/dist/client/delegate-command.js +36 -7
- package/data/build/dist/client/delegate-command.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +1408 -544
- package/data/build/dist/client/editor-engine.d.ts +1 -1
- package/data/build/dist/client/editor-engine.d.ts.map +1 -1
- package/data/build/dist/client/editor-engine.js +4 -1
- package/data/build/dist/client/editor-engine.js.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.d.ts +1 -1
- package/data/build/dist/client/features/assistant-notification-store.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.js +1 -1
- package/data/build/dist/client/features/assistant-notification-store.js.map +1 -1
- package/data/build/dist/client/features/cli-adapters.d.ts +3 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +207 -112
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/file-management.d.ts.map +1 -1
- package/data/build/dist/client/features/file-management.js +18 -0
- package/data/build/dist/client/features/file-management.js.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.js +12 -6
- package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts +1 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +5 -0
- package/data/build/dist/client/features/index.js.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.js +1 -0
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -1
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -1
- package/data/build/dist/client/features/mobile-access.js +7 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +105 -17
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/quick-apps.d.ts +3 -0
- package/data/build/dist/client/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/client/features/quick-apps.js +14 -0
- package/data/build/dist/client/features/quick-apps.js.map +1 -0
- package/data/build/dist/client/features/session-translation.d.ts +3 -0
- package/data/build/dist/client/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/client/features/session-translation.js +117 -0
- package/data/build/dist/client/features/session-translation.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.js +6 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -1
- package/data/build/dist/client/file-management-dom.d.ts +20 -1
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -1
- package/data/build/dist/client/file-management-dom.js +94 -18
- package/data/build/dist/client/file-management-dom.js.map +1 -1
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts +27 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts.map +1 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js +101 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js.map +1 -0
- package/data/build/dist/client/git-management-settings.d.ts +4 -0
- package/data/build/dist/client/git-management-settings.d.ts.map +1 -0
- package/data/build/dist/client/git-management-settings.js +73 -0
- package/data/build/dist/client/git-management-settings.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts +2 -1
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +55 -34
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/git-panel-styles.d.ts +4 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -1
- package/data/build/dist/client/git-panel-styles.js +14 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -1
- package/data/build/dist/client/html-workspace-files.d.ts +4 -0
- package/data/build/dist/client/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/client/html-workspace-files.js +114 -0
- package/data/build/dist/client/html-workspace-files.js.map +1 -0
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +6 -1
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +22 -2
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/cliManagement.d.ts +3 -0
- package/data/build/dist/client/locales/cliManagement.d.ts.map +1 -0
- package/data/build/dist/client/locales/cliManagement.js +155 -0
- package/data/build/dist/client/locales/cliManagement.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.js +8 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/git.d.ts.map +1 -1
- package/data/build/dist/client/locales/git.js +30 -2
- package/data/build/dist/client/locales/git.js.map +1 -1
- package/data/build/dist/client/locales/panels.d.ts.map +1 -1
- package/data/build/dist/client/locales/panels.js +154 -0
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +2 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/quickApps.d.ts +136 -0
- package/data/build/dist/client/locales/quickApps.d.ts.map +1 -0
- package/data/build/dist/client/locales/quickApps.js +162 -0
- package/data/build/dist/client/locales/quickApps.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +98 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/magpie-model-tag.d.ts +8 -0
- package/data/build/dist/client/magpie-model-tag.d.ts.map +1 -0
- package/data/build/dist/client/magpie-model-tag.js +50 -0
- package/data/build/dist/client/magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts +14 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.js +164 -0
- package/data/build/dist/client/mobile-team-panel-dom.js.map +1 -0
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -1
- package/data/build/dist/client/model-catalog-cache.js +66 -12
- package/data/build/dist/client/model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/model-priority-pool.d.ts +23 -0
- package/data/build/dist/client/model-priority-pool.d.ts.map +1 -0
- package/data/build/dist/client/model-priority-pool.js +245 -0
- package/data/build/dist/client/model-priority-pool.js.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts +13 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.js +159 -0
- package/data/build/dist/client/native-model-translation-menu.js.map +1 -0
- package/data/build/dist/client/native-translation-default.d.ts +6 -0
- package/data/build/dist/client/native-translation-default.d.ts.map +1 -0
- package/data/build/dist/client/native-translation-default.js +30 -0
- package/data/build/dist/client/native-translation-default.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +3 -1
- package/data/build/dist/client/provider-icons.js.map +1 -1
- package/data/build/dist/client/quick-apps/browser-storage.d.ts +24 -0
- package/data/build/dist/client/quick-apps/browser-storage.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/browser-storage.js +114 -0
- package/data/build/dist/client/quick-apps/browser-storage.js.map +1 -0
- package/data/build/dist/client/quick-apps/client.d.ts +31 -0
- package/data/build/dist/client/quick-apps/client.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/client.js +68 -0
- package/data/build/dist/client/quick-apps/client.js.map +1 -0
- package/data/build/dist/client/quick-apps/document.d.ts +26 -0
- package/data/build/dist/client/quick-apps/document.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/document.js +110 -0
- package/data/build/dist/client/quick-apps/document.js.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts +14 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.js +51 -0
- package/data/build/dist/client/quick-apps/file-picker.js.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts +7 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.js +267 -0
- package/data/build/dist/client/quick-apps/launcher.js.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts +16 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.js +47 -0
- package/data/build/dist/client/quick-apps/presentation.js.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts +5 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.js +19 -0
- package/data/build/dist/client/quick-apps/rail-preference.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts +6 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js +50 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts +26 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.js +128 -0
- package/data/build/dist/client/quick-apps/reorder.js.map +1 -0
- package/data/build/dist/client/quick-apps/styles.d.ts +3 -0
- package/data/build/dist/client/quick-apps/styles.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/styles.js +153 -0
- package/data/build/dist/client/quick-apps/styles.js.map +1 -0
- package/data/build/dist/client/quick-apps/ui.d.ts +20 -0
- package/data/build/dist/client/quick-apps/ui.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/ui.js +21 -0
- package/data/build/dist/client/quick-apps/ui.js.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts +16 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.js +165 -0
- package/data/build/dist/client/quick-apps/viewer.js.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts +19 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js +30 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js.map +1 -0
- package/data/build/dist/client/session-file-links.d.ts +11 -0
- package/data/build/dist/client/session-file-links.d.ts.map +1 -0
- package/data/build/dist/client/{peer-host-file-links.js → session-file-links.js} +13 -3
- package/data/build/dist/client/session-file-links.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +72 -0
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-chat.js +874 -0
- package/data/build/dist/client/session-translation-chat.js.map +1 -0
- package/data/build/dist/client/session-translation-interactions.d.ts +31 -0
- package/data/build/dist/client/session-translation-interactions.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-interactions.js +158 -0
- package/data/build/dist/client/session-translation-interactions.js.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts +8 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.js +58 -0
- package/data/build/dist/client/session-translation-pending-dom.js.map +1 -0
- package/data/build/dist/client/session-translation-retry.d.ts +16 -0
- package/data/build/dist/client/session-translation-retry.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-retry.js +66 -0
- package/data/build/dist/client/session-translation-retry.js.map +1 -0
- package/data/build/dist/client/session-translation-rules.d.ts +13 -0
- package/data/build/dist/client/session-translation-rules.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-rules.js +58 -0
- package/data/build/dist/client/session-translation-rules.js.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts +13 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.js +54 -0
- package/data/build/dist/client/sidebar-footer-style.js.map +1 -0
- package/data/build/dist/client/style.css +276 -276
- package/data/build/dist/client/subscription-slot.d.ts +6 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +373 -21
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/model.d.ts.map +1 -1
- package/data/build/dist/client/terminal/model.js +2 -1
- package/data/build/dist/client/terminal/model.js.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.js +68 -8
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.js +12 -21
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +3 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +66 -17
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js +28 -2
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js +71 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts +30 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js +93 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts +12 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js +181 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +39 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js +27 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +88 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts +20 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js +65 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts +18 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +75 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts +32 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js +90 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts +52 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js +34 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts +11 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js +97 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js +164 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts +44 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js +240 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts +37 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js +35 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js +30 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js +132 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js +33 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js +37 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js +18 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts +28 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js +31 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js +24 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +22 -5
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +47 -3
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +21 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +106 -6
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.js +9 -8
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.js +7 -3
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +184 -21
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +28 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +198 -34
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts +91 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js +8 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js +81 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +12 -2
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +158 -3
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +8 -2
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +39 -7
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts +27 -0
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-history.js +131 -1
- package/data/build/dist/host/cli-adapters/command-code-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +9 -9
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +41 -4
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -1
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +16 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +120 -13
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +806 -53
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.js +5 -3
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +558 -98
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +48 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js +197 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +20 -3
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js +7 -2
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts +9 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js +90 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js +986 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.js +131 -0
- package/data/build/dist/host/cli-adapters/management-installation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts +37 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.js +144 -0
- package/data/build/dist/host/cli-adapters/management-methods.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.js +62 -0
- package/data/build/dist/host/cli-adapters/management-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management.js +177 -0
- package/data/build/dist/host/cli-adapters/management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/mcode-driver.js +12 -5
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.js +70 -7
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +13 -5
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +7 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +6 -3
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +26 -2
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js +183 -48
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +67 -7
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +45 -11
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.js +16 -11
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +5 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.js +90 -25
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +7 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +163 -56
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts +74 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js +83 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.js +3 -0
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +4 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +2 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts +26 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js +30 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool.js +7 -6
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -1
- package/data/build/dist/host/cli-adapters/team-input.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/team-input.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/team-input.js +67 -0
- package/data/build/dist/host/cli-adapters/team-input.js.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.js +263 -0
- package/data/build/dist/host/cli-adapters/update-check.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-driver.js +7 -2
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js +149 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +14 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-holder.js +53 -6
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +8 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.js +65 -8
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.js +149 -21
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +20 -20
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts +23 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js +73 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +46 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.js +205 -7
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +122 -27
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js +9 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts +52 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js +311 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts +20 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js +61 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts +11 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js +23 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js +208 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.js +18 -0
- package/data/build/dist/host/cli-bridge/team-tool.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/controller.d.ts +1 -0
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.js +21 -3
- package/data/build/dist/host/desktop-assistant/controller.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.js +15 -3
- package/data/build/dist/host/desktop-assistant/mac-agent.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/win-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/win-agent.js +21 -3
- package/data/build/dist/host/desktop-assistant/win-agent.js.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.js +12 -4
- package/data/build/dist/host/features/assistant-notifications.js.map +1 -1
- package/data/build/dist/host/features/file-management.d.ts.map +1 -1
- package/data/build/dist/host/features/file-management.js +10 -1
- package/data/build/dist/host/features/file-management.js.map +1 -1
- package/data/build/dist/host/features/git-commit-message.d.ts +5 -0
- package/data/build/dist/host/features/git-commit-message.d.ts.map +1 -0
- package/data/build/dist/host/features/git-commit-message.js +66 -0
- package/data/build/dist/host/features/git-commit-message.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts +11 -2
- package/data/build/dist/host/features/git-management.d.ts.map +1 -1
- package/data/build/dist/host/features/git-management.js +61 -7
- package/data/build/dist/host/features/git-management.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +2 -3
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +5 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/interaction-translation.d.ts +10 -0
- package/data/build/dist/host/features/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/interaction-translation.js +219 -0
- package/data/build/dist/host/features/interaction-translation.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/features/lan-access-dsh.js +3 -3
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/host/features/peer-host.js +24 -10
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/quick-apps.d.ts +4 -0
- package/data/build/dist/host/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/host/features/quick-apps.js +158 -0
- package/data/build/dist/host/features/quick-apps.js.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts +10 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.js +227 -0
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts +22 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.js +204 -0
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts +21 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.js +125 -0
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts +16 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.js +85 -0
- package/data/build/dist/host/features/session-translation-runtime.js.map +1 -0
- package/data/build/dist/host/features/session-translation-service.d.ts +46 -0
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-service.js +490 -0
- package/data/build/dist/host/features/session-translation-service.js.map +1 -0
- package/data/build/dist/host/features/session-translation.d.ts +5 -0
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation.js +40 -0
- package/data/build/dist/host/features/session-translation.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +13 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/html-workspace-files.d.ts +3 -0
- package/data/build/dist/host/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/host/html-workspace-files.js +135 -0
- package/data/build/dist/host/html-workspace-files.js.map +1 -0
- package/data/build/dist/host/image-artifact-store.d.ts +21 -0
- package/data/build/dist/host/image-artifact-store.d.ts.map +1 -0
- package/data/build/dist/host/image-artifact-store.js +136 -0
- package/data/build/dist/host/image-artifact-store.js.map +1 -0
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +35 -39
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts +14 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +81 -13
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +2 -2
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +10 -9
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +2 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts +3 -3
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js +26 -14
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts +5 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js +27 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts +5 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.js +37 -0
- package/data/build/dist/host/modules/quick-apps/browse.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts +4 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js +39 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.js +87 -0
- package/data/build/dist/host/modules/quick-apps/documents.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.js +244 -0
- package/data/build/dist/host/modules/quick-apps/egress.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.js +15 -0
- package/data/build/dist/host/modules/quick-apps/errors.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js +149 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.js +80 -0
- package/data/build/dist/host/modules/quick-apps/launches.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.js +72 -0
- package/data/build/dist/host/modules/quick-apps/paths.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.js +195 -0
- package/data/build/dist/host/modules/quick-apps/registry.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts +38 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.js +238 -0
- package/data/build/dist/host/modules/quick-apps/remote.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts +27 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.js +174 -0
- package/data/build/dist/host/modules/quick-apps/service.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js +213 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +23 -2
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +57 -15
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +24 -13
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/session-changes.d.ts.map +1 -1
- package/data/build/dist/host/session-changes.js +201 -14
- package/data/build/dist/host/session-changes.js.map +1 -1
- package/data/build/dist/host/session-migration-repair.js +48 -35
- package/data/build/dist/host/session-migration-repair.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +37 -0
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/workspace-file-mutations.d.ts +2 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.js +15 -0
- package/data/build/dist/host/workspace-file-mutations.js.map +1 -0
- package/data/build/dist/host/workspace-root.d.ts +14 -0
- package/data/build/dist/host/workspace-root.d.ts.map +1 -0
- package/data/build/dist/host/workspace-root.js +99 -0
- package/data/build/dist/host/workspace-root.js.map +1 -0
- package/data/build/dist/shared/assistant-notifications.d.ts +2 -2
- package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/shared/attachment-prompts.d.ts +11 -0
- package/data/build/dist/shared/attachment-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/attachment-prompts.js +17 -0
- package/data/build/dist/shared/attachment-prompts.js.map +1 -0
- package/data/build/dist/shared/cli-provider-route.d.ts +7 -0
- package/data/build/dist/shared/cli-provider-route.d.ts.map +1 -0
- package/data/build/dist/shared/cli-provider-route.js +13 -0
- package/data/build/dist/shared/cli-provider-route.js.map +1 -0
- package/data/build/dist/shared/codex-performance.d.ts +3 -0
- package/data/build/dist/shared/codex-performance.d.ts.map +1 -0
- package/data/build/dist/shared/codex-performance.js +2 -0
- package/data/build/dist/shared/codex-performance.js.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts +14 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.js +48 -0
- package/data/build/dist/shared/contracts/agent-team.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +86 -2
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/cli-management.d.ts +29 -0
- package/data/build/dist/shared/contracts/cli-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-management.js +2 -0
- package/data/build/dist/shared/contracts/cli-management.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +13 -1
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +6 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.d.ts +17 -0
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.js +27 -1
- package/data/build/dist/shared/contracts/git.js.map +1 -1
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts +32 -0
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js +2 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts +53 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.js +44 -0
- package/data/build/dist/shared/contracts/interaction-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts +70 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.js +4 -0
- package/data/build/dist/shared/contracts/quick-apps.js.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts +131 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.js +167 -0
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +87 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/subscription.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +9 -15
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +8 -14
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/delegation-carrier.js +6 -6
- package/data/build/dist/shared/delegation-carrier.js.map +1 -1
- package/data/build/dist/shared/desktop-assistant.d.ts +10 -4
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
- package/data/build/dist/shared/desktop-assistant.js +28 -8
- package/data/build/dist/shared/desktop-assistant.js.map +1 -1
- package/data/build/dist/shared/index.d.ts +3 -1
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js +3 -1
- package/data/build/dist/shared/index.js.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +4 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.js +4 -0
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.d.ts.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.js +1 -0
- package/data/build/dist/shared/provider-icon-resources.js.map +1 -1
- package/data/build/dist/shared/quick-app-browser-storage.d.ts +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-browser-storage.js +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts +8 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.js +192 -0
- package/data/build/dist/shared/quick-app-network-allow.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js +134 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts +6 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.js +18 -0
- package/data/build/dist/shared/quick-app-proxy-path.js.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js +189 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts +7 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js +10 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js.map +1 -0
- package/data/build/dist/shared/request-performance.d.ts +15 -0
- package/data/build/dist/shared/request-performance.d.ts.map +1 -0
- package/data/build/dist/shared/request-performance.js +3 -0
- package/data/build/dist/shared/request-performance.js.map +1 -0
- package/data/build/dist/shared/translation-indicator.d.ts +26 -0
- package/data/build/dist/shared/translation-indicator.d.ts.map +1 -0
- package/data/build/dist/shared/translation-indicator.js +29 -0
- package/data/build/dist/shared/translation-indicator.js.map +1 -0
- package/package.json +36 -35
- package/profile/README.md +2 -2
- package/profile/package.json +3 -3
- package/profile/version.json +3 -3
- package/version.json +3 -3
- package/data/build/dist/client/client.model-catalog-cache.js.map +0 -1
- package/data/build/dist/client/peer-host-file-links.d.ts +0 -8
- package/data/build/dist/client/peer-host-file-links.d.ts.map +0 -1
- package/data/build/dist/client/peer-host-file-links.js.map +0 -1
|
@@ -0,0 +1,874 @@
|
|
|
1
|
+
import { createElement, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { DisclosureRow, FileTypeIcon, IconCheckOutlineRegular, IconCopyOutlineRegular, IconThinkOutlineRegular, JsonBlock, MarkdownText, TextShimmer, fileExtension, fileSizeText, writeClipboard, } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
4
|
+
import * as messagePrimitives from '@deepseek-ai/dsh-client-ui-primitives';
|
|
5
|
+
import { createDshCapabilityRegistry } from '../dsh-capabilities/routes.js';
|
|
6
|
+
import { useDismissOnOutsidePointer } from './popup-dismiss.js';
|
|
7
|
+
import { dshThemeColor } from './theme.js';
|
|
8
|
+
import { TRANSLATION_GLYPH_PATHS, TRANSLATION_GLYPH_SIZE, TRANSLATION_PENDING_BADGE_STYLE, TRANSLATION_STATUS_BADGE_STYLE } from '../shared/translation-indicator.js';
|
|
9
|
+
import { uiFontSize } from './font-scale.js';
|
|
10
|
+
import { useCliSessionTranslationState } from './cli-slots.js';
|
|
11
|
+
import { watchPendingTranslationTargets } from './session-translation-pending-dom.js';
|
|
12
|
+
import { callCliRpc } from './cli-catalog.js';
|
|
13
|
+
import { startSerialPolling } from './serial-polling.js';
|
|
14
|
+
import { clearOutputTranslationRetries, useOutputTranslation } from './session-translation-retry.js';
|
|
15
|
+
import { readSessionTranslationMetrics, resolveSessionTranslationOptions } from '../shared/contracts/session-translation.js';
|
|
16
|
+
/**
|
|
17
|
+
* 把翻译状态和查看原文的入口放回对应消息块,不占用 AI 回复底部的统一操作栏。
|
|
18
|
+
*/
|
|
19
|
+
export function TranslationAction(props) {
|
|
20
|
+
const [open, setOpen] = useState(props.inputFailure !== undefined);
|
|
21
|
+
const output = useOutputTranslation({ ...props, record: props.inputFailure?.record ?? props.record });
|
|
22
|
+
const [deciding, setDeciding] = useState(false);
|
|
23
|
+
const decidingRef = useRef(false);
|
|
24
|
+
const [decisionError, setDecisionError] = useState(false);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (props.inputFailure !== undefined)
|
|
27
|
+
setOpen(true);
|
|
28
|
+
setDecisionError(false);
|
|
29
|
+
}, [props.inputFailure?.id]);
|
|
30
|
+
const rootRef = useRef(null);
|
|
31
|
+
const buttonRef = useRef(null);
|
|
32
|
+
const popupRef = useRef(null);
|
|
33
|
+
const [popupPosition, setPopupPosition] = useState(null);
|
|
34
|
+
useDismissOnOutsidePointer(rootRef, open, () => setOpen(false), { portal: popupRef });
|
|
35
|
+
useLayoutEffect(() => {
|
|
36
|
+
if (!open || typeof window === 'undefined') {
|
|
37
|
+
setPopupPosition(null);
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const updatePosition = () => {
|
|
41
|
+
const button = buttonRef.current;
|
|
42
|
+
if (button === null)
|
|
43
|
+
return;
|
|
44
|
+
const rect = button.getBoundingClientRect();
|
|
45
|
+
const edge = 12;
|
|
46
|
+
const gap = 8;
|
|
47
|
+
const width = Math.max(1, Math.min(420, window.innerWidth - edge * 2));
|
|
48
|
+
const availableAbove = Math.max(0, rect.top - gap - edge);
|
|
49
|
+
const availableBelow = Math.max(0, window.innerHeight - rect.bottom - gap - edge);
|
|
50
|
+
const preferredHeight = Math.min(440, window.innerHeight * 0.65);
|
|
51
|
+
const placement = availableAbove >= preferredHeight
|
|
52
|
+
|| (availableBelow < preferredHeight && availableAbove > availableBelow)
|
|
53
|
+
? 'above'
|
|
54
|
+
: 'below';
|
|
55
|
+
const availableHeight = placement === 'above' ? availableAbove : availableBelow;
|
|
56
|
+
const maxHeight = Math.min(preferredHeight, availableHeight);
|
|
57
|
+
const desiredLeft = props.popupAlign === 'end' ? rect.right - width : rect.left;
|
|
58
|
+
const maxLeft = Math.max(edge, window.innerWidth - edge - width);
|
|
59
|
+
setPopupPosition({
|
|
60
|
+
left: Math.min(maxLeft, Math.max(edge, desiredLeft)),
|
|
61
|
+
top: placement === 'above' ? rect.top - gap : rect.bottom + gap,
|
|
62
|
+
width,
|
|
63
|
+
maxHeight,
|
|
64
|
+
placement,
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
updatePosition();
|
|
68
|
+
window.addEventListener('resize', updatePosition);
|
|
69
|
+
window.addEventListener('scroll', updatePosition, true);
|
|
70
|
+
return () => {
|
|
71
|
+
window.removeEventListener('resize', updatePosition);
|
|
72
|
+
window.removeEventListener('scroll', updatePosition, true);
|
|
73
|
+
};
|
|
74
|
+
}, [open, props.popupAlign]);
|
|
75
|
+
const record = output.record;
|
|
76
|
+
const inputFailure = props.inputFailure !== undefined;
|
|
77
|
+
const detailsTitle = props.translationT(inputFailure ? 'translation.inputFailedTitle' : 'translation.detailsTitle');
|
|
78
|
+
const pending = record === undefined || output.pending;
|
|
79
|
+
const failed = record?.failed === true;
|
|
80
|
+
const alreadyTargetLanguage = record?.alreadyTargetLanguage === true;
|
|
81
|
+
const statusText = pending
|
|
82
|
+
? props.translationT('translation.statusTranslating')
|
|
83
|
+
: failed
|
|
84
|
+
? props.translationT('translation.statusFailed')
|
|
85
|
+
: alreadyTargetLanguage
|
|
86
|
+
? props.translationT('translation.statusNotNeeded')
|
|
87
|
+
: props.translationT('translation.statusTranslated');
|
|
88
|
+
const statusColor = pending ? dshThemeColor.accent : failed ? dshThemeColor.error : alreadyTargetLanguage ? dshThemeColor.accent : dshThemeColor.success;
|
|
89
|
+
const detailsId = `codingns-translation-details-${safeDomId(props.messageId)}`;
|
|
90
|
+
const decide = async (choice) => {
|
|
91
|
+
if (props.inputFailure === undefined || decidingRef.current)
|
|
92
|
+
return;
|
|
93
|
+
decidingRef.current = true;
|
|
94
|
+
setDeciding(true);
|
|
95
|
+
setDecisionError(false);
|
|
96
|
+
try {
|
|
97
|
+
await callCliRpc(props.services.rpc, 'translation/resolve', {
|
|
98
|
+
sessionId: props.inputFailure.sessionId, id: props.inputFailure.id, choice,
|
|
99
|
+
}, AbortSignal.timeout(15_000));
|
|
100
|
+
props.onDecision?.();
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
setDecisionError(true);
|
|
104
|
+
}
|
|
105
|
+
finally {
|
|
106
|
+
decidingRef.current = false;
|
|
107
|
+
setDeciding(false);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const details = open && popupPosition !== null ? createElement('div', {
|
|
111
|
+
ref: popupRef,
|
|
112
|
+
role: 'dialog',
|
|
113
|
+
'aria-label': detailsTitle,
|
|
114
|
+
id: detailsId,
|
|
115
|
+
style: {
|
|
116
|
+
position: 'fixed',
|
|
117
|
+
zIndex: 2147483647,
|
|
118
|
+
left: popupPosition.left,
|
|
119
|
+
top: popupPosition.top,
|
|
120
|
+
width: popupPosition.width,
|
|
121
|
+
maxHeight: popupPosition.maxHeight,
|
|
122
|
+
boxSizing: 'border-box',
|
|
123
|
+
...(popupPosition.placement === 'above' ? { transform: 'translateY(-100%)' } : {}),
|
|
124
|
+
overflow: 'auto',
|
|
125
|
+
padding: '10px 12px',
|
|
126
|
+
border: `1px solid ${dshThemeColor.border}`,
|
|
127
|
+
borderRadius: 8,
|
|
128
|
+
color: dshThemeColor.labelPrimary,
|
|
129
|
+
background: dshThemeColor.menuBackground,
|
|
130
|
+
boxShadow: '0 8px 24px color-mix(in srgb, CanvasText 16%, transparent)',
|
|
131
|
+
fontSize: uiFontSize(12),
|
|
132
|
+
lineHeight: 1.45,
|
|
133
|
+
},
|
|
134
|
+
}, createElement('div', { style: { display: 'flex', justifyContent: 'space-between', gap: 10, fontWeight: 600 } }, createElement('span', undefined, detailsTitle), inputFailure ? null : createElement('span', { role: 'status', 'aria-live': 'polite', style: { color: statusColor, fontWeight: 400 } }, statusText)), inputFailure || record?.sourceLanguage === undefined ? null : createElement('div', { style: { marginTop: 8, color: dshThemeColor.labelSecondary } }, `${props.translationT('translation.detectedLanguage')}: ${props.translationT(`translation.language.${record.sourceLanguage}`)}`), inputFailure ? null : createElement(DetailBlock, { kind: 'original', translationT: props.translationT, value: record?.original ?? props.original ?? '' }), pending ? createElement('progress', { 'aria-label': statusText, style: { display: 'block', width: '100%', height: 4, marginTop: 8, accentColor: dshThemeColor.accent } }) : null, pending
|
|
135
|
+
? createElement('div', { role: 'status', 'aria-live': 'polite', style: { marginTop: 8, color: dshThemeColor.labelSecondary } }, props.translationT('translation.progressHelp'))
|
|
136
|
+
: props.inputFailure !== undefined ? null : createElement(DetailBlock, { kind: props.messageRole === 'user' ? 'sent' : 'translated', translationT: props.translationT, value: record.translated }), pending || inputFailure ? null : createElement('div', { style: { marginTop: 8, color: dshThemeColor.labelSecondary } }, [
|
|
137
|
+
`${props.translationT('translation.modelUsed')}: ${alreadyTargetLanguage ? props.translationT('translation.modelNotUsed') : formatModel(record.model, props.translationT)}`,
|
|
138
|
+
...(record.durationMs === undefined ? [] : [`${(record.durationMs / 1000).toFixed(2)} s`]),
|
|
139
|
+
...(record.totalTokens === undefined ? [] : [`${record.totalTokens} tok`]),
|
|
140
|
+
].join(' · ')), props.inputFailure === undefined ? null : createElement('p', { role: 'alert' }, props.translationT('translation.inputFailedHelp')), decisionError ? createElement('p', { role: 'alert', style: { color: dshThemeColor.error } }, props.translationT('translation.decisionFailed')) : null, props.inputFailure !== undefined ? createElement('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 8, marginTop: 10 } }, ...['retry', 'send', 'cancel'].map(choice => createElement('button', {
|
|
141
|
+
key: choice, type: 'button', disabled: deciding, onClick: () => { void decide(choice); }, style: recoveryButtonStyle,
|
|
142
|
+
}, props.translationT(choice === 'retry' ? 'translation.retry' : choice === 'send' ? 'translation.sendDirectly' : 'translation.cancelSending')))) : output.retry === undefined ? null : createElement('button', {
|
|
143
|
+
type: 'button', disabled: pending, onClick: () => { void output.retry?.(); }, style: { ...recoveryButtonStyle, marginTop: 10 },
|
|
144
|
+
}, props.translationT('translation.retry'))) : null;
|
|
145
|
+
const renderedDetails = details === null
|
|
146
|
+
? null
|
|
147
|
+
: typeof document === 'undefined' ? details : createPortal(details, document.body);
|
|
148
|
+
return createElement('div', {
|
|
149
|
+
ref: rootRef,
|
|
150
|
+
style: {
|
|
151
|
+
position: 'relative',
|
|
152
|
+
display: 'inline-flex',
|
|
153
|
+
alignItems: 'center',
|
|
154
|
+
verticalAlign: 'middle',
|
|
155
|
+
...(props.inline === true ? { marginInlineStart: 4 } : {}),
|
|
156
|
+
},
|
|
157
|
+
'data-codingns-translation-action': props.messageId,
|
|
158
|
+
}, createElement('button', {
|
|
159
|
+
ref: buttonRef,
|
|
160
|
+
type: 'button',
|
|
161
|
+
title: `${statusText} · ${props.translationT('translation.viewDetails')}`,
|
|
162
|
+
'aria-label': `${statusText} · ${props.translationT('translation.viewDetails')}`,
|
|
163
|
+
'aria-expanded': open,
|
|
164
|
+
'aria-controls': detailsId,
|
|
165
|
+
onClick: () => setOpen((value) => !value),
|
|
166
|
+
style: translationButtonStyle,
|
|
167
|
+
}, createElement(TranslationGlyph), createElement('span', {
|
|
168
|
+
'aria-hidden': true,
|
|
169
|
+
'data-codingns-translation-pending': pending || undefined,
|
|
170
|
+
style: {
|
|
171
|
+
...TRANSLATION_STATUS_BADGE_STYLE,
|
|
172
|
+
...(pending ? TRANSLATION_PENDING_BADGE_STYLE : { background: statusColor }),
|
|
173
|
+
},
|
|
174
|
+
}, pending ? null : failed ? '!' : '✓')), renderedDetails);
|
|
175
|
+
}
|
|
176
|
+
const recoveryButtonStyle = {
|
|
177
|
+
padding: '5px 10px', borderRadius: 6, border: `1px solid ${dshThemeColor.border}`,
|
|
178
|
+
background: dshThemeColor.surfaceSubtle, color: dshThemeColor.labelPrimary, cursor: 'pointer', font: 'inherit',
|
|
179
|
+
};
|
|
180
|
+
function PendingTranslationActions(props) {
|
|
181
|
+
const anchorRef = useRef(null);
|
|
182
|
+
const [targets, setTargets] = useState([]);
|
|
183
|
+
const [failures, setFailures] = useState([]);
|
|
184
|
+
const pollingRef = useRef();
|
|
185
|
+
const { adapterId, enabled } = useCliSessionTranslationState(props.sessionId, props.services.rpc);
|
|
186
|
+
const store = props.services.settings;
|
|
187
|
+
const settings = useSyncExternalStore(store.subscribe.bind(store), store.getSnapshot.bind(store), store.getSnapshot.bind(store));
|
|
188
|
+
const subagent = props.useSession?.((state) => state.subagent);
|
|
189
|
+
const eligible = enabled && resolveSessionTranslationOptions(settings.value?.sessionTranslation, adapterId).inputEnabled && subagent == null && !props.sessionId?.startsWith('codingns-assistant-');
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
setFailures([]);
|
|
192
|
+
if (!eligible || props.sessionId === undefined)
|
|
193
|
+
return;
|
|
194
|
+
const polling = startSerialPolling(async (signal) => {
|
|
195
|
+
const next = await callCliRpc(props.services.rpc, 'translation/pending', { sessionId: props.sessionId }, signal);
|
|
196
|
+
if (!signal.aborted && Array.isArray(next))
|
|
197
|
+
setFailures(current => JSON.stringify(current) === JSON.stringify(next) ? current : next);
|
|
198
|
+
}, 750);
|
|
199
|
+
pollingRef.current = polling;
|
|
200
|
+
return () => { polling.dispose(); pollingRef.current = undefined; };
|
|
201
|
+
}, [eligible, props.sessionId, props.services.rpc]);
|
|
202
|
+
useLayoutEffect(() => {
|
|
203
|
+
setTargets([]);
|
|
204
|
+
if (!eligible || anchorRef.current === null)
|
|
205
|
+
return undefined;
|
|
206
|
+
return watchPendingTranslationTargets(anchorRef.current, setTargets);
|
|
207
|
+
}, [eligible, props.sessionId]);
|
|
208
|
+
const remaining = [...failures];
|
|
209
|
+
const actions = targets.map(target => {
|
|
210
|
+
const index = remaining.findIndex(failure => normalizePendingText(failure.record.original) === normalizePendingText(target.original));
|
|
211
|
+
const failure = index < 0 ? undefined : remaining.splice(index, 1)[0];
|
|
212
|
+
return createPortal(createElement(PendingTranslationAction, {
|
|
213
|
+
services: props.services,
|
|
214
|
+
translationT: props.translationT,
|
|
215
|
+
original: target.original,
|
|
216
|
+
inputFailure: failure,
|
|
217
|
+
onDecision: () => { void pollingRef.current?.refresh({ afterPending: true }); },
|
|
218
|
+
}), target.container, String(target.key));
|
|
219
|
+
});
|
|
220
|
+
return createElement('span', { ref: anchorRef, style: { display: 'contents' } }, ...actions, ...remaining.map(failure => createElement('span', { key: failure.id, style: { display: 'inline-flex', alignItems: 'center', gap: 8, maxWidth: '100%' } }, createElement('span', { style: { maxWidth: 240, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, failure.record.original), createElement(PendingTranslationAction, { services: props.services, translationT: props.translationT,
|
|
221
|
+
original: failure.record.original, inputFailure: failure,
|
|
222
|
+
onDecision: () => { void pollingRef.current?.refresh({ afterPending: true }); } }))));
|
|
223
|
+
}
|
|
224
|
+
function normalizePendingText(value) { return value.replace(/\s+/gu, ' ').trim(); }
|
|
225
|
+
function PendingTranslationAction(props) {
|
|
226
|
+
const id = useId();
|
|
227
|
+
return createElement(TranslationAction, { ...props, messageId: `pending-${id}`, messageRole: 'user', popupAlign: 'end' });
|
|
228
|
+
}
|
|
229
|
+
function TranslationGlyph() {
|
|
230
|
+
return createElement('svg', {
|
|
231
|
+
viewBox: '0 0 24 24',
|
|
232
|
+
width: TRANSLATION_GLYPH_SIZE,
|
|
233
|
+
height: TRANSLATION_GLYPH_SIZE,
|
|
234
|
+
fill: 'none',
|
|
235
|
+
stroke: 'currentColor',
|
|
236
|
+
strokeWidth: 1.5,
|
|
237
|
+
strokeLinecap: 'round',
|
|
238
|
+
strokeLinejoin: 'round',
|
|
239
|
+
'aria-hidden': true,
|
|
240
|
+
}, ...TRANSLATION_GLYPH_PATHS.map(d => createElement('path', { key: d, d })));
|
|
241
|
+
}
|
|
242
|
+
const messageActionButtonStyle = {
|
|
243
|
+
position: 'relative',
|
|
244
|
+
display: 'inline-flex',
|
|
245
|
+
alignItems: 'center',
|
|
246
|
+
justifyContent: 'center',
|
|
247
|
+
width: 28,
|
|
248
|
+
height: 28,
|
|
249
|
+
padding: 0,
|
|
250
|
+
border: 0,
|
|
251
|
+
borderRadius: 'var(--dsw-radius-sm, 6px)',
|
|
252
|
+
color: dshThemeColor.labelTertiary,
|
|
253
|
+
background: 'transparent',
|
|
254
|
+
cursor: 'pointer',
|
|
255
|
+
};
|
|
256
|
+
const translationButtonStyle = {
|
|
257
|
+
...messageActionButtonStyle,
|
|
258
|
+
transition: 'background-color 100ms ease, color 100ms ease',
|
|
259
|
+
};
|
|
260
|
+
const translationDetailTypes = {
|
|
261
|
+
original: { labelKey: 'translation.originalText', color: dshThemeColor.labelSecondary },
|
|
262
|
+
translated: { labelKey: 'translation.translatedText', color: dshThemeColor.accent },
|
|
263
|
+
sent: { labelKey: 'translation.actualSentText', color: dshThemeColor.success },
|
|
264
|
+
};
|
|
265
|
+
function DetailBlock({ kind, translationT, value }) {
|
|
266
|
+
const { labelKey, color } = translationDetailTypes[kind];
|
|
267
|
+
return createElement('div', { style: { marginTop: 8 } }, createElement('div', {
|
|
268
|
+
style: {
|
|
269
|
+
display: 'inline-block',
|
|
270
|
+
maxWidth: '100%',
|
|
271
|
+
boxSizing: 'border-box',
|
|
272
|
+
marginBottom: 6,
|
|
273
|
+
padding: '2px 8px',
|
|
274
|
+
border: `1px solid color-mix(in srgb, ${color} 30%, transparent)`,
|
|
275
|
+
borderRadius: 'var(--dsw-radius-sm, 6px)',
|
|
276
|
+
color,
|
|
277
|
+
background: `color-mix(in srgb, ${color} 12%, transparent)`,
|
|
278
|
+
fontWeight: 600,
|
|
279
|
+
overflowWrap: 'anywhere',
|
|
280
|
+
},
|
|
281
|
+
}, translationT(labelKey)), createElement('pre', {
|
|
282
|
+
style: {
|
|
283
|
+
margin: 0,
|
|
284
|
+
color: `color-mix(in srgb, ${color} 45%, ${dshThemeColor.labelPrimary})`,
|
|
285
|
+
whiteSpace: 'pre-wrap',
|
|
286
|
+
overflowWrap: 'anywhere',
|
|
287
|
+
fontFamily: 'inherit',
|
|
288
|
+
},
|
|
289
|
+
}, value));
|
|
290
|
+
}
|
|
291
|
+
/** 按原生 user 节点的结构渲染用户消息;翻译入口只在确实有记录时追加。 */
|
|
292
|
+
function UserMessageNodeView(props) {
|
|
293
|
+
const data = props.node.data;
|
|
294
|
+
const parts = splitUserContent(data.content);
|
|
295
|
+
const record = readInputRecord({ source: data.source });
|
|
296
|
+
// 这个渲染器以更低优先级遮蔽了 DSH 原生 user 渲染器,因此无论有没有翻译记录
|
|
297
|
+
// 都必须画出消息本身:返回 null 会让整条用户消息从对话里消失。
|
|
298
|
+
const translationRecord = record === undefined ? undefined : inputRecordForAction(record);
|
|
299
|
+
const labels = Array.isArray(data.referenceLabels) ? data.referenceLabels.filter((label) => typeof label === 'string') : [];
|
|
300
|
+
const skillNames = Array.isArray(data.skillNames) ? data.skillNames.filter((name) => typeof name === 'string') : [];
|
|
301
|
+
const showBubble = parts.text !== '' || parts.rest.length > 0;
|
|
302
|
+
const images = parts.attachments.filter((attachment) => attachment.type === 'image');
|
|
303
|
+
const compactImages = images.length > 1;
|
|
304
|
+
const messageId = `user-${String(data.seq ?? props.node.id ?? 'message')}`;
|
|
305
|
+
const chatT = props.t;
|
|
306
|
+
return createElement('div', {
|
|
307
|
+
'data-chat-flow-kind': 'user',
|
|
308
|
+
style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-end', gap: 6 },
|
|
309
|
+
}, props.presentation.kind === 'factory' ? props.presentation.userContent(props, {
|
|
310
|
+
text: parts.text,
|
|
311
|
+
attachments: parts.attachments.map(item => item.type === 'image' ? { type: 'image', image: { attachment: item.attachment } } : item),
|
|
312
|
+
extraBlocks: parts.rest,
|
|
313
|
+
referenceLabels: labels,
|
|
314
|
+
}, { sessionLabels: labels, skillNames }) : createElement('div', {
|
|
315
|
+
style: {
|
|
316
|
+
display: 'flex',
|
|
317
|
+
flexDirection: 'column',
|
|
318
|
+
alignItems: 'flex-end',
|
|
319
|
+
gap: 8,
|
|
320
|
+
minWidth: 0,
|
|
321
|
+
maxWidth: 'min(calc(var(--dsh-chat-content-width, 748px) * .702), 82%)',
|
|
322
|
+
},
|
|
323
|
+
}, parts.attachments.length > 0 ? createElement('div', {
|
|
324
|
+
'data-message-attachments': true,
|
|
325
|
+
style: { display: 'flex', flexWrap: 'wrap', justifyContent: 'flex-end', gap: 8, maxWidth: '100%' },
|
|
326
|
+
}, ...parts.attachments.map((attachment, index) => attachment.type === 'image'
|
|
327
|
+
? createElement('div', { key: `image-${index}` }, props.presentation.images(props, { images: [{ attachment: attachment.attachment }], align: 'end', compact: compactImages }))
|
|
328
|
+
: createFileAttachment(attachment.file, index))) : null, showBubble ? createElement('div', {
|
|
329
|
+
style: {
|
|
330
|
+
boxSizing: 'border-box',
|
|
331
|
+
maxWidth: '100%',
|
|
332
|
+
padding: '10px 16px',
|
|
333
|
+
borderRadius: 'var(--dsw-radius-xl, 18px)',
|
|
334
|
+
color: dshThemeColor.labelPrimary,
|
|
335
|
+
background: 'var(--dsw-specific-bubble, var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,.08)))',
|
|
336
|
+
fontSize: 'var(--dsh-content-font-size, 14px)',
|
|
337
|
+
lineHeight: 'calc(22px + var(--dsh-content-font-delta, 0px))',
|
|
338
|
+
whiteSpace: 'pre-wrap',
|
|
339
|
+
wordBreak: 'break-word',
|
|
340
|
+
},
|
|
341
|
+
}, props.presentation.projectText(parts.text, labels, skillNames, 'skill', typeof props.openFile === 'function' && typeof props.openSkill === 'function'
|
|
342
|
+
? { openFile: props.openFile, openSkill: props.openSkill }
|
|
343
|
+
: undefined), ...parts.rest.map((block, index) => createElement(JsonBlock, {
|
|
344
|
+
key: `extra-${index}`,
|
|
345
|
+
label: chatT('message.extraBlock'),
|
|
346
|
+
payload: block,
|
|
347
|
+
truncatedLabel: (total) => chatT('json.truncated', { total }),
|
|
348
|
+
}))) : null, labels.length === 0 ? null : createElement('div', {
|
|
349
|
+
style: {
|
|
350
|
+
color: dshThemeColor.labelTertiary,
|
|
351
|
+
fontSize: 'var(--dsh-content-font-size-secondary, 13px)',
|
|
352
|
+
lineHeight: 'calc(18px + var(--dsh-content-font-delta-secondary, 0px))',
|
|
353
|
+
},
|
|
354
|
+
}, chatT('message.referenceSummary', { labels: labels.join(chatT('message.referenceSeparator')) }))), createElement('div', {
|
|
355
|
+
style: {
|
|
356
|
+
display: 'flex',
|
|
357
|
+
alignItems: 'center',
|
|
358
|
+
alignSelf: 'flex-end',
|
|
359
|
+
height: 'calc(28px + var(--dsh-content-font-delta, 0px))',
|
|
360
|
+
gap: 8,
|
|
361
|
+
color: dshThemeColor.labelTertiary,
|
|
362
|
+
},
|
|
363
|
+
}, typeof data.time === 'number' ? createElement('span', {
|
|
364
|
+
style: { paddingRight: 12, color: dshThemeColor.labelTertiary, fontSize: 'var(--dsh-content-font-size-secondary, 13px)', whiteSpace: 'nowrap' },
|
|
365
|
+
}, formatMessageTime(data.time)) : null, translationRecord === undefined ? null : createElement(TranslationAction, {
|
|
366
|
+
messageId,
|
|
367
|
+
messageRole: 'user',
|
|
368
|
+
services: props.services,
|
|
369
|
+
translationT: props.translationT,
|
|
370
|
+
popupAlign: 'end',
|
|
371
|
+
record: translationRecord,
|
|
372
|
+
}), createElement(CopyAction, { text: parts.text, t: chatT })));
|
|
373
|
+
}
|
|
374
|
+
function createFileAttachment(file, index) {
|
|
375
|
+
const name = typeof file.name === 'string' ? file.name : '';
|
|
376
|
+
const bytes = typeof file.bytes === 'number' ? file.bytes : 0;
|
|
377
|
+
return createElement('span', {
|
|
378
|
+
key: `file-${index}`,
|
|
379
|
+
title: name,
|
|
380
|
+
style: {
|
|
381
|
+
display: 'inline-flex',
|
|
382
|
+
alignItems: 'center',
|
|
383
|
+
minWidth: 0,
|
|
384
|
+
maxWidth: '100%',
|
|
385
|
+
gap: 8,
|
|
386
|
+
padding: '8px 10px',
|
|
387
|
+
border: `1px solid ${dshThemeColor.border}`,
|
|
388
|
+
borderRadius: 8,
|
|
389
|
+
color: dshThemeColor.labelPrimary,
|
|
390
|
+
background: dshThemeColor.surfaceSubtle,
|
|
391
|
+
},
|
|
392
|
+
}, createElement(FileTypeIcon, { path: name, style: { flex: 'none' } }), createElement('span', { style: { display: 'flex', flexDirection: 'column', minWidth: 0, textAlign: 'left' } }, createElement('span', { style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, name), createElement('span', { style: { color: dshThemeColor.labelSecondary, fontSize: 11 } }, [fileExtension(name).toUpperCase().slice(0, 8), fileSizeText(bytes)].filter(Boolean).join(' '))));
|
|
393
|
+
}
|
|
394
|
+
function CopyAction({ text, t: chatT }) {
|
|
395
|
+
const [copied, setCopied] = useState(false);
|
|
396
|
+
const timer = useRef(undefined);
|
|
397
|
+
useEffect(() => () => {
|
|
398
|
+
if (timer.current !== undefined)
|
|
399
|
+
clearTimeout(timer.current);
|
|
400
|
+
}, []);
|
|
401
|
+
return createElement('button', {
|
|
402
|
+
type: 'button',
|
|
403
|
+
title: copied ? chatT('copied') : chatT('copy'),
|
|
404
|
+
'aria-label': copied ? chatT('copied') : chatT('copy'),
|
|
405
|
+
onClick: () => {
|
|
406
|
+
void writeClipboard(text).then((success) => {
|
|
407
|
+
if (!success)
|
|
408
|
+
return;
|
|
409
|
+
setCopied(true);
|
|
410
|
+
if (timer.current !== undefined)
|
|
411
|
+
clearTimeout(timer.current);
|
|
412
|
+
timer.current = setTimeout(() => {
|
|
413
|
+
timer.current = undefined;
|
|
414
|
+
setCopied(false);
|
|
415
|
+
}, 1000);
|
|
416
|
+
});
|
|
417
|
+
},
|
|
418
|
+
style: messageActionButtonStyle,
|
|
419
|
+
}, createElement(copied ? IconCheckOutlineRegular : IconCopyOutlineRegular));
|
|
420
|
+
}
|
|
421
|
+
function splitUserContent(content) {
|
|
422
|
+
const text = [];
|
|
423
|
+
const attachments = [];
|
|
424
|
+
const rest = [];
|
|
425
|
+
if (typeof content === 'string')
|
|
426
|
+
return { text: content, attachments, rest };
|
|
427
|
+
if (!Array.isArray(content))
|
|
428
|
+
return { text: '', attachments, rest };
|
|
429
|
+
for (const value of content) {
|
|
430
|
+
const block = asRecord(value);
|
|
431
|
+
if (block?.type === 'text' && typeof block.text === 'string')
|
|
432
|
+
text.push(block.text);
|
|
433
|
+
else if (block?.type === 'image' && block.attachment !== undefined)
|
|
434
|
+
attachments.push({ type: 'image', attachment: block.attachment });
|
|
435
|
+
else if (block?.type === 'file' && asRecord(block.attachment) !== undefined)
|
|
436
|
+
attachments.push({ type: 'file', file: asRecord(block.attachment) });
|
|
437
|
+
else
|
|
438
|
+
rest.push(value);
|
|
439
|
+
}
|
|
440
|
+
return { text: text.join(''), attachments, rest };
|
|
441
|
+
}
|
|
442
|
+
function formatMessageTime(time) {
|
|
443
|
+
const date = new Date(time);
|
|
444
|
+
const now = new Date();
|
|
445
|
+
const sameDay = date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate();
|
|
446
|
+
const options = sameDay
|
|
447
|
+
? { hour: '2-digit', minute: '2-digit' }
|
|
448
|
+
: { ...(date.getFullYear() === now.getFullYear() ? {} : { year: 'numeric' }), month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' };
|
|
449
|
+
return new Intl.DateTimeFormat(undefined, options).format(date);
|
|
450
|
+
}
|
|
451
|
+
/** DSH assistant-step renderer: keep each translation action adjacent to its source block. */
|
|
452
|
+
function AssistantTranslationNodeView(props) {
|
|
453
|
+
const data = props.node.data;
|
|
454
|
+
const blocks = Array.isArray(data.blocks) ? data.blocks : [];
|
|
455
|
+
const streaming = data.status === 'running';
|
|
456
|
+
const chatT = props.t;
|
|
457
|
+
const markdownLabels = useMemo(() => createMarkdownLabels(chatT), [chatT]);
|
|
458
|
+
const pathImages = useMemo(() => ({ resolve: resolveMarkdownImagePath }), []);
|
|
459
|
+
// 与 DSH 原生 AssistantMarkdown 相同的可见性判据:只有「运行中 / 被中断 / 含正文块」
|
|
460
|
+
// 才渲染内容。这个渲染器遮蔽了原生 assistant-step 渲染器,若在这里因为缺少翻译
|
|
461
|
+
// 记录而返回 null,整段 AI 正文就会从对话里消失。
|
|
462
|
+
const renderable = streaming || data.status === 'interrupted' || blocks.some((block) => block.kind !== 'tool-call');
|
|
463
|
+
// 只有确实需要渲染时才读取事件流:没有翻译的普通会话不再订阅 Session 事件。
|
|
464
|
+
const eventSnapshot = renderable ? readEventSource(props.services, props.sessionId)?.getSnapshot() : undefined;
|
|
465
|
+
const hasTranslation = renderable && blocks.some((block) => {
|
|
466
|
+
if (block.kind !== 'reasoning' && block.kind !== 'text')
|
|
467
|
+
return false;
|
|
468
|
+
const outputKind = block.kind === 'reasoning' ? 'reasoning' : 'assistant';
|
|
469
|
+
const embedded = readRecord(block);
|
|
470
|
+
if (embedded !== undefined && (embedded.outputKind === undefined || embedded.outputKind === outputKind))
|
|
471
|
+
return true;
|
|
472
|
+
return eventSnapshot !== undefined && findTranslationRecordForText(eventSnapshot, block.text, outputKind, data.turn, data.step) !== undefined;
|
|
473
|
+
});
|
|
474
|
+
const turn = props.node.location?.kind === 'turn' || props.node.location?.kind === 'step' ? props.node.location.turn : undefined;
|
|
475
|
+
const tail = typeof props.useTurnData === 'function' ? props.useTurnData('turn-tail') : undefined;
|
|
476
|
+
const finalNode = data.finalNode;
|
|
477
|
+
const fileOwner = turn?.status === 'closed' && finalNode !== undefined && tail?.closing?.finalNode?.seq === finalNode.seq
|
|
478
|
+
? { turn, seq: finalNode.seq, openFile: (path) => { void props.openFile(path); } }
|
|
479
|
+
: undefined;
|
|
480
|
+
const mentions = fileOwner === undefined || typeof props.fileMentions !== 'function' ? undefined : props.fileMentions(fileOwner);
|
|
481
|
+
const turnProcess = props.turnProcess;
|
|
482
|
+
const reasoningHidden = turnProcess !== undefined
|
|
483
|
+
&& turnProcess.foldable === true
|
|
484
|
+
&& turnProcess.spec?.answerStep === data.step
|
|
485
|
+
&& turnProcess.spec?.inlineReasoning === true
|
|
486
|
+
&& turnProcess.open !== true;
|
|
487
|
+
const rendered = [];
|
|
488
|
+
const last = blocks.length - 1;
|
|
489
|
+
// Keep retries attached when a running step receives its final history node.
|
|
490
|
+
const messageId = `turn-${data.turn}-step-${data.step}`;
|
|
491
|
+
if (!renderable)
|
|
492
|
+
return null;
|
|
493
|
+
for (let index = 0; index < blocks.length; index += 1) {
|
|
494
|
+
const block = blocks[index];
|
|
495
|
+
if (block === undefined)
|
|
496
|
+
continue;
|
|
497
|
+
if (props.groupPart === 'reasoning' && block.kind !== 'reasoning')
|
|
498
|
+
continue;
|
|
499
|
+
if (props.groupPart === 'response' && block.kind === 'reasoning')
|
|
500
|
+
continue;
|
|
501
|
+
const running = streaming && index === last;
|
|
502
|
+
if (block.kind === 'text') {
|
|
503
|
+
const translationRecord = readRecord(block) ?? (hasTranslation && eventSnapshot !== undefined
|
|
504
|
+
? findTranslationRecordForText(eventSnapshot, block.text, 'assistant', data.turn, data.step)
|
|
505
|
+
: undefined);
|
|
506
|
+
rendered.push(createElement(AssistantTextContent, {
|
|
507
|
+
key: `text-${index}`,
|
|
508
|
+
messageId: `${messageId}-text-${index}`,
|
|
509
|
+
sessionId: props.sessionId,
|
|
510
|
+
services: props.services,
|
|
511
|
+
translationT: props.translationT,
|
|
512
|
+
text: block.text, streaming, markdownLabels, mentions, pathImages, translationRecord,
|
|
513
|
+
}));
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
if (block.kind === 'reasoning') {
|
|
517
|
+
const translationRecord = readRecord(block) ?? (hasTranslation && eventSnapshot !== undefined
|
|
518
|
+
? findTranslationRecordForText(eventSnapshot, block.text, 'reasoning', data.turn, data.step)
|
|
519
|
+
: undefined);
|
|
520
|
+
rendered.push(createElement(AssistantReasoningBlock, {
|
|
521
|
+
key: `reasoning-${index}`,
|
|
522
|
+
messageId: `${messageId}-reasoning-${index}`,
|
|
523
|
+
sessionId: props.sessionId,
|
|
524
|
+
services: props.services,
|
|
525
|
+
translationT: props.translationT,
|
|
526
|
+
chatT,
|
|
527
|
+
text: block.text,
|
|
528
|
+
...(translationRecord === undefined ? {} : { translationRecord }),
|
|
529
|
+
running,
|
|
530
|
+
hidden: reasoningHidden,
|
|
531
|
+
reveal: () => turnProcess?.setOpen?.(true),
|
|
532
|
+
useGroupAction: props.useGroupAction,
|
|
533
|
+
renderFactorySlot: props.renderFactorySlot,
|
|
534
|
+
markdownLabels,
|
|
535
|
+
pathImages,
|
|
536
|
+
mentions,
|
|
537
|
+
}));
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
if (block.kind === 'image') {
|
|
541
|
+
const imageGroup = [block];
|
|
542
|
+
while (index + 1 < blocks.length && blocks[index + 1]?.kind === 'image') {
|
|
543
|
+
const next = blocks[index + 1];
|
|
544
|
+
if (next?.kind !== 'image')
|
|
545
|
+
break;
|
|
546
|
+
imageGroup.push(next);
|
|
547
|
+
index += 1;
|
|
548
|
+
}
|
|
549
|
+
rendered.push(createElement('div', { key: `images-${index}`, style: { alignSelf: 'flex-start' } }, props.presentation.images(props, { images: imageGroup.map((image) => ({ attachment: image.attachment })), align: 'start' })));
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
if (block.kind === 'other') {
|
|
553
|
+
rendered.push(createElement(JsonBlock, {
|
|
554
|
+
key: `other-${index}`,
|
|
555
|
+
label: chatT('message.unknownBlock'),
|
|
556
|
+
payload: block.block,
|
|
557
|
+
truncatedLabel: (total) => chatT('json.truncated', { total }),
|
|
558
|
+
}));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
return createElement('div', {
|
|
562
|
+
'data-streaming': streaming || undefined,
|
|
563
|
+
style: { display: 'flex', flexDirection: 'column', gap: 16, minWidth: 0, color: dshThemeColor.labelPrimary, fontSize: 'var(--dsh-content-font-size, 14px)', lineHeight: 'calc(24px + var(--dsh-content-font-delta, 0px))' },
|
|
564
|
+
}, ...rendered, data.status === 'interrupted' ? createElement('span', {
|
|
565
|
+
style: { alignSelf: 'flex-start', padding: '0 6px', borderRadius: 'var(--dsw-radius-sm, 4px)', color: dshThemeColor.labelTertiary, background: dshThemeColor.surfaceSubtle, fontSize: 11, lineHeight: '18px' },
|
|
566
|
+
}, chatT('message.stopped')) : null);
|
|
567
|
+
}
|
|
568
|
+
function AssistantTextContent(props) {
|
|
569
|
+
const { record } = useOutputTranslation({ ...props, outputKind: 'assistant', record: props.translationRecord });
|
|
570
|
+
return createElement('div', { 'data-codingns-translation-inline': true, style: { minWidth: 0 } }, createElement(MarkdownText, { text: record?.translated ?? props.text, streaming: props.streaming, labels: props.markdownLabels, fileMentions: props.mentions, pathImages: props.pathImages }), record === undefined ? null : createElement(TranslationAction, { messageId: props.messageId, sessionId: props.sessionId,
|
|
571
|
+
messageRole: 'assistant', outputKind: 'assistant', services: props.services, translationT: props.translationT,
|
|
572
|
+
record: props.translationRecord, inline: true }));
|
|
573
|
+
}
|
|
574
|
+
function AssistantReasoningBlock(props) {
|
|
575
|
+
const [expanded, setExpanded] = useState(false);
|
|
576
|
+
const groupRef = props.useGroupAction?.(props.hidden, props.reveal);
|
|
577
|
+
const { record } = useOutputTranslation({ ...props, outputKind: 'reasoning', record: props.translationRecord });
|
|
578
|
+
const displayText = record?.translated ?? props.text;
|
|
579
|
+
const summary = displayText.split('\n').map((line) => line.replace(/[`*_#>]/gu, '').trim()).find(Boolean) ?? '';
|
|
580
|
+
return createElement('div', {
|
|
581
|
+
ref: groupRef,
|
|
582
|
+
hidden: props.hidden,
|
|
583
|
+
'data-turn-process-inline': props.hidden || undefined,
|
|
584
|
+
}, createElement(DisclosureRow, {
|
|
585
|
+
icon: createElement(IconThinkOutlineRegular, { size: 14 }),
|
|
586
|
+
title: props.chatT('message.think'),
|
|
587
|
+
open: expanded,
|
|
588
|
+
expandable: true,
|
|
589
|
+
expandOnRowClick: true,
|
|
590
|
+
running: props.running,
|
|
591
|
+
onToggle: () => setExpanded((value) => !value),
|
|
592
|
+
collapsedContent: createElement('span', {
|
|
593
|
+
style: { minWidth: 0, overflow: 'hidden', color: dshThemeColor.labelSecondary, fontSize: 'var(--dsh-content-font-size-secondary, 13px)', textOverflow: 'ellipsis', whiteSpace: 'nowrap' },
|
|
594
|
+
}, createElement(TextShimmer, { active: props.running, children: summary })),
|
|
595
|
+
}, expanded ? createElement(AssistantReasoningContent, {
|
|
596
|
+
messageId: props.messageId,
|
|
597
|
+
sessionId: props.sessionId,
|
|
598
|
+
services: props.services,
|
|
599
|
+
translationT: props.translationT,
|
|
600
|
+
text: props.text,
|
|
601
|
+
running: props.running,
|
|
602
|
+
...(props.translationRecord === undefined ? {} : { translationRecord: props.translationRecord }),
|
|
603
|
+
markdownLabels: props.markdownLabels,
|
|
604
|
+
pathImages: props.pathImages,
|
|
605
|
+
mentions: props.mentions,
|
|
606
|
+
...(props.renderFactorySlot === undefined ? {} : { renderFactorySlot: props.renderFactorySlot }),
|
|
607
|
+
}) : null));
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* 思考块展开后的正文。
|
|
611
|
+
*
|
|
612
|
+
* DSH 原生 `ReasoningRow` 直接渲染 `MarkdownText`,运行时**没有**注册
|
|
613
|
+
* `conversation.chat.reasoning.content` 工厂(`conversation.chat.*` 只有
|
|
614
|
+
* `node` / `assistant-actions` / `commandview` / `turnTail`)。而 `renderFactorySlot`
|
|
615
|
+
* 在工厂缺失时只渲染 `fallback`,缺省为 `null`——此前这里既不传 fallback,
|
|
616
|
+
* 又把正文完全交给该工厂,于是展开思考后只剩翻译入口,译文一行都看不到。
|
|
617
|
+
* 因此原生 MarkdownText 必须作为 fallback 传进去:没有工厂时按原生方式渲染,
|
|
618
|
+
* 工厂存在时才允许表现层覆盖。
|
|
619
|
+
*/
|
|
620
|
+
export function AssistantReasoningContent(props) {
|
|
621
|
+
const { record } = useOutputTranslation({ ...props, outputKind: 'reasoning', record: props.translationRecord });
|
|
622
|
+
const displayText = record?.translated ?? props.text;
|
|
623
|
+
const markdown = createElement(MarkdownText, { text: displayText, streaming: props.running, labels: props.markdownLabels, fileMentions: props.mentions, pathImages: props.pathImages, variant: 'compact' });
|
|
624
|
+
const content = props.renderFactorySlot === undefined
|
|
625
|
+
? markdown
|
|
626
|
+
: props.renderFactorySlot('conversation.chat.reasoning.content', { text: displayText, running: props.running }, { fallback: markdown });
|
|
627
|
+
return createElement('div', {
|
|
628
|
+
'data-codingns-translation-inline': true,
|
|
629
|
+
style: { paddingTop: 8 },
|
|
630
|
+
}, content, props.translationRecord === undefined ? null : createElement(TranslationAction, {
|
|
631
|
+
messageId: props.messageId,
|
|
632
|
+
sessionId: props.sessionId,
|
|
633
|
+
outputKind: 'reasoning',
|
|
634
|
+
messageRole: 'assistant',
|
|
635
|
+
services: props.services,
|
|
636
|
+
translationT: props.translationT,
|
|
637
|
+
record: props.translationRecord,
|
|
638
|
+
inline: true,
|
|
639
|
+
}));
|
|
640
|
+
}
|
|
641
|
+
function createMarkdownLabels(chatT) {
|
|
642
|
+
return {
|
|
643
|
+
code: {
|
|
644
|
+
copyLabel: chatT('copy'),
|
|
645
|
+
copiedLabel: chatT('copied'),
|
|
646
|
+
toolbarLabels: {
|
|
647
|
+
codeLabel: chatT('codeBlock.title'),
|
|
648
|
+
wrapLabel: chatT('codeBlock.wrap'),
|
|
649
|
+
unwrapLabel: chatT('codeBlock.unwrap'),
|
|
650
|
+
},
|
|
651
|
+
},
|
|
652
|
+
footnotes: chatT('markdown.footnotes'),
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function resolveMarkdownImagePath(value) {
|
|
656
|
+
if (typeof document === 'undefined' || !value.startsWith('/') || /^[/\\]{2}/u.test(value) || /[\u0000-\u001f\u007f]/u.test(value))
|
|
657
|
+
return undefined;
|
|
658
|
+
const base = document.baseURI;
|
|
659
|
+
if (!/^https?:/u.test(base) && !base.startsWith('dsh-app://app/'))
|
|
660
|
+
return undefined;
|
|
661
|
+
try {
|
|
662
|
+
return new URL(`api/file?path=${encodeURIComponent(value)}`, base).href;
|
|
663
|
+
}
|
|
664
|
+
catch {
|
|
665
|
+
return undefined;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* 注册用户消息(含插话)与 AI 正文的翻译渲染器;DSH 的用户气泡内容仍由统一主题令牌控制。
|
|
670
|
+
*/
|
|
671
|
+
export function registerSessionTranslationChatUi(services, facts = { primitives: messagePrimitives }) {
|
|
672
|
+
const resolution = createDshCapabilityRegistry(services.dshVersion, 'client', services, facts).getProfile(services).capabilities.get('conversation.message-presentation');
|
|
673
|
+
const slots = services.slots;
|
|
674
|
+
if (slots?.inject === undefined || slots.register === undefined)
|
|
675
|
+
return () => undefined;
|
|
676
|
+
const removeStyles = installSessionTranslationChatStyles();
|
|
677
|
+
const translationT = services.locale.bind('codingns');
|
|
678
|
+
const removePendingActions = slots.inject('conversation.input.left', () => slots.register({
|
|
679
|
+
name: 'conversation.input.left',
|
|
680
|
+
id: 'codingns-translation-pending',
|
|
681
|
+
inject: (sessionId) => ({ services, sessionId, translationT }),
|
|
682
|
+
}, PendingTranslationActions));
|
|
683
|
+
if (resolution?.status !== 'ready')
|
|
684
|
+
return () => { clearOutputTranslationRetries(services); removePendingActions(); removeStyles(); };
|
|
685
|
+
const presentation = resolution.value;
|
|
686
|
+
const removeRenderers = presentation.mount(() => {
|
|
687
|
+
// DSH 把运行中被当前 turn 接收的插话投影为 steering 节点,并用同一个用户气泡
|
|
688
|
+
// 渲染;只遮蔽 user 会让插话的翻译记录不显示,看起来像未经翻译就发送。
|
|
689
|
+
const renderers = [
|
|
690
|
+
['user', props => UserMessageNodeView({ ...props, presentation })],
|
|
691
|
+
['steering', props => UserMessageNodeView({ ...props, presentation })],
|
|
692
|
+
['assistant-step', props => AssistantTranslationNodeView({ ...props, presentation })],
|
|
693
|
+
];
|
|
694
|
+
const removers = [];
|
|
695
|
+
try {
|
|
696
|
+
for (const [key, component] of renderers) {
|
|
697
|
+
removers.push(slots.inject('conversation.chat.node', () => slots.register({
|
|
698
|
+
name: 'conversation.chat.node',
|
|
699
|
+
key,
|
|
700
|
+
priority: -100,
|
|
701
|
+
locale: 'chat',
|
|
702
|
+
inject: (sessionId) => ({ services, sessionId, translationT }),
|
|
703
|
+
}, component)));
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
catch (error) {
|
|
707
|
+
for (const remove of removers.reverse())
|
|
708
|
+
remove();
|
|
709
|
+
throw error;
|
|
710
|
+
}
|
|
711
|
+
return () => { for (const remove of [...removers].reverse())
|
|
712
|
+
remove(); };
|
|
713
|
+
});
|
|
714
|
+
return () => {
|
|
715
|
+
clearOutputTranslationRetries(services);
|
|
716
|
+
removePendingActions();
|
|
717
|
+
removeRenderers();
|
|
718
|
+
removeStyles();
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
function installSessionTranslationChatStyles() {
|
|
722
|
+
if (typeof document === 'undefined')
|
|
723
|
+
return () => undefined;
|
|
724
|
+
const styleId = 'codingns-session-translation-chat';
|
|
725
|
+
if (document.head.querySelector(`style[data-plugin-css="${styleId}"]`) !== null)
|
|
726
|
+
return () => undefined;
|
|
727
|
+
const style = document.createElement('style');
|
|
728
|
+
style.dataset.plugin = 'codingns4dsh';
|
|
729
|
+
style.dataset.pluginCss = styleId;
|
|
730
|
+
style.textContent = `
|
|
731
|
+
@keyframes codingns-translation-spin{to{transform:rotate(360deg)}}
|
|
732
|
+
[data-codingns-translation-pending]{animation:codingns-translation-spin .8s linear infinite}
|
|
733
|
+
@media(prefers-reduced-motion:reduce){[data-codingns-translation-pending]{animation-duration:1.6s}}
|
|
734
|
+
[data-codingns-translation-inline] > div:not([data-codingns-translation-action]){display:contents}
|
|
735
|
+
[data-codingns-translation-inline] > div:not([data-codingns-translation-action]) > p:last-child{display:inline;margin:0}
|
|
736
|
+
`;
|
|
737
|
+
document.head.appendChild(style);
|
|
738
|
+
return () => style.remove();
|
|
739
|
+
}
|
|
740
|
+
function readEventSource(services, sessionId) {
|
|
741
|
+
const sessions = services.sessions;
|
|
742
|
+
try {
|
|
743
|
+
return sessions?.binding?.(sessionId)?.eventSource;
|
|
744
|
+
}
|
|
745
|
+
catch {
|
|
746
|
+
return undefined;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
function findTranslationRecordForText(snapshot, text, outputKind, turn, step) {
|
|
750
|
+
const entries = snapshot.entries ?? [];
|
|
751
|
+
for (let index = entries.length - 1; index >= 0; index -= 1) {
|
|
752
|
+
const event = readEntryEvent(entries[index]);
|
|
753
|
+
if (event === undefined || !event.type.startsWith('assistant/'))
|
|
754
|
+
continue;
|
|
755
|
+
const eventData = asRecord(event.data);
|
|
756
|
+
if (turn !== undefined && typeof eventData?.turn === 'number' && eventData.turn !== turn)
|
|
757
|
+
continue;
|
|
758
|
+
if (step !== undefined && typeof eventData?.step === 'number' && eventData.step !== step)
|
|
759
|
+
continue;
|
|
760
|
+
const candidates = [];
|
|
761
|
+
collectRecordCandidates(event.data, candidates, new Set());
|
|
762
|
+
for (const candidate of candidates) {
|
|
763
|
+
const record = readRecord(candidate);
|
|
764
|
+
if (record === undefined || record.original !== text && record.translated !== text)
|
|
765
|
+
continue;
|
|
766
|
+
if (outputKind !== undefined && record.outputKind !== undefined && record.outputKind !== outputKind)
|
|
767
|
+
continue;
|
|
768
|
+
return record;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
return undefined;
|
|
772
|
+
}
|
|
773
|
+
function collectRecordCandidates(value, candidates, seen, depth = 0) {
|
|
774
|
+
if (Array.isArray(value)) {
|
|
775
|
+
for (const item of value)
|
|
776
|
+
collectRecordCandidates(item, candidates, seen, depth + 1);
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
const record = asRecord(value);
|
|
780
|
+
if (record === undefined || seen.has(record) || depth > 7)
|
|
781
|
+
return;
|
|
782
|
+
seen.add(record);
|
|
783
|
+
if (readRecord(record) !== undefined || asRecord(record.codingnsTranslation) !== undefined)
|
|
784
|
+
candidates.push(record);
|
|
785
|
+
for (const key of ['codingnsTranslation', 'source', 'message', 'content', 'stream', 'chunk', 'block', 'data']) {
|
|
786
|
+
if (record[key] !== undefined)
|
|
787
|
+
collectRecordCandidates(record[key], candidates, seen, depth + 1);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
function readEntryEvent(value) {
|
|
791
|
+
const record = asRecord(value);
|
|
792
|
+
const event = asRecord(record?.event);
|
|
793
|
+
return event ?? (typeof record?.type === 'string' ? record : undefined);
|
|
794
|
+
}
|
|
795
|
+
function readRecord(value) {
|
|
796
|
+
const record = asRecord(value);
|
|
797
|
+
const candidate = asRecord(record?.codingnsTranslation) ?? record;
|
|
798
|
+
if (candidate?.original === undefined || candidate.translated === undefined)
|
|
799
|
+
return undefined;
|
|
800
|
+
if (typeof candidate.original !== 'string' || typeof candidate.translated !== 'string')
|
|
801
|
+
return undefined;
|
|
802
|
+
const targetLanguage = readLanguage(candidate.targetLanguage);
|
|
803
|
+
if (targetLanguage === undefined)
|
|
804
|
+
return undefined;
|
|
805
|
+
const model = readModel(candidate.model);
|
|
806
|
+
const outputKind = candidate.outputKind === 'assistant' || candidate.outputKind === 'reasoning' ? candidate.outputKind : undefined;
|
|
807
|
+
return {
|
|
808
|
+
original: candidate.original,
|
|
809
|
+
translated: candidate.translated,
|
|
810
|
+
...(candidate.sourceLanguage === 'zh' || candidate.sourceLanguage === 'en' || candidate.sourceLanguage === 'fr' || candidate.sourceLanguage === 'de' || candidate.sourceLanguage === 'ja' ? { sourceLanguage: candidate.sourceLanguage } : {}),
|
|
811
|
+
targetLanguage,
|
|
812
|
+
bilingual: candidate.bilingual === true,
|
|
813
|
+
...(outputKind === undefined ? {} : { outputKind }),
|
|
814
|
+
...(candidate.alreadyTargetLanguage === true ? { alreadyTargetLanguage: true } : {}),
|
|
815
|
+
...(model === undefined ? {} : { model }),
|
|
816
|
+
...(candidate.failed === true ? { failed: true } : {}),
|
|
817
|
+
...readSessionTranslationMetrics(candidate),
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
function readModel(value) {
|
|
821
|
+
const record = asRecord(value);
|
|
822
|
+
if (typeof record?.provider !== 'string' || typeof record.model !== 'string' || record.provider.trim() === '' || record.model.trim() === '')
|
|
823
|
+
return undefined;
|
|
824
|
+
return { provider: record.provider, model: record.model };
|
|
825
|
+
}
|
|
826
|
+
function readInputRecord(value) {
|
|
827
|
+
const message = asRecord(value);
|
|
828
|
+
const source = asRecord(message?.source);
|
|
829
|
+
const candidate = asRecord(source?.codingnsTranslationInput);
|
|
830
|
+
if (candidate?.original === undefined || candidate.translated === undefined)
|
|
831
|
+
return undefined;
|
|
832
|
+
if (typeof candidate.original !== 'string' || typeof candidate.translated !== 'string')
|
|
833
|
+
return undefined;
|
|
834
|
+
const targetLanguage = readLanguage(candidate.targetLanguage);
|
|
835
|
+
if (targetLanguage === undefined)
|
|
836
|
+
return undefined;
|
|
837
|
+
const model = readModel(candidate.model);
|
|
838
|
+
return {
|
|
839
|
+
original: candidate.original,
|
|
840
|
+
translated: candidate.translated,
|
|
841
|
+
...(candidate.sourceLanguage === 'zh' || candidate.sourceLanguage === 'en' || candidate.sourceLanguage === 'fr' || candidate.sourceLanguage === 'de' || candidate.sourceLanguage === 'ja' ? { sourceLanguage: candidate.sourceLanguage } : {}),
|
|
842
|
+
targetLanguage,
|
|
843
|
+
...(candidate.alreadyTargetLanguage === true ? { alreadyTargetLanguage: true } : {}),
|
|
844
|
+
...(model === undefined ? {} : { model }),
|
|
845
|
+
...(candidate.failed === true ? { failed: true } : {}),
|
|
846
|
+
...readSessionTranslationMetrics(candidate),
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function inputRecordForAction(record) {
|
|
850
|
+
return {
|
|
851
|
+
original: record.original,
|
|
852
|
+
translated: record.translated,
|
|
853
|
+
...(record.sourceLanguage === undefined ? {} : { sourceLanguage: record.sourceLanguage }),
|
|
854
|
+
targetLanguage: record.targetLanguage,
|
|
855
|
+
bilingual: false,
|
|
856
|
+
...(record.alreadyTargetLanguage === true ? { alreadyTargetLanguage: true } : {}),
|
|
857
|
+
...(record.model === undefined ? {} : { model: record.model }),
|
|
858
|
+
...(record.failed === true ? { failed: true } : {}),
|
|
859
|
+
...readSessionTranslationMetrics(record),
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
function readLanguage(value) {
|
|
863
|
+
return value === 'zh' || value === 'en' || value === 'fr' || value === 'de' || value === 'ja' ? value : undefined;
|
|
864
|
+
}
|
|
865
|
+
function formatModel(model, t) {
|
|
866
|
+
return model === undefined ? t('translation.modelUnknown') : `${model.provider} / ${model.model}`;
|
|
867
|
+
}
|
|
868
|
+
function safeDomId(value) {
|
|
869
|
+
return encodeURIComponent(value).replace(/%/gu, '-');
|
|
870
|
+
}
|
|
871
|
+
function asRecord(value) {
|
|
872
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value) ? value : undefined;
|
|
873
|
+
}
|
|
874
|
+
//# sourceMappingURL=session-translation-chat.js.map
|