@jingyi0605/codingns4dsh 0.1.7-rc.3 → 0.2.0-beta.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/LICENSE +695 -0
- package/README.en.md +46 -15
- package/README.md +36 -15
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts +50 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +239 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -0
- package/data/build/dist/bootstrap/index.d.ts +3 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -0
- package/data/build/dist/bootstrap/index.js +1 -0
- package/data/build/dist/bootstrap/index.js.map +1 -0
- package/data/build/dist/client/account-bar.d.ts +7 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -0
- package/data/build/dist/client/account-bar.js +151 -69
- package/data/build/dist/client/account-bar.js.map +1 -0
- package/data/build/dist/client/bundle.js +8174 -2024
- package/data/build/dist/client/bundle.js.map +1 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -0
- package/data/build/dist/client/cli-slots.js +15 -4
- package/data/build/dist/client/cli-slots.js.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts +53 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.js +171 -0
- package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts.map +1 -0
- package/data/build/dist/client/debug/ui.js +2 -1
- package/data/build/dist/client/debug/ui.js.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.js +19 -6
- package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.d.ts +3 -2
- package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.js +7 -6
- package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
- package/data/build/dist/client/external-tool-stream.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
- package/data/build/dist/client/features/cli-adapters.js +20 -4
- package/data/build/dist/client/features/cli-adapters.js.map +1 -0
- package/data/build/dist/client/features/debug.d.ts.map +1 -0
- package/data/build/dist/client/features/debug.js +2 -2
- package/data/build/dist/client/features/debug.js.map +1 -0
- package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management-panel.js.map +1 -0
- package/data/build/dist/client/features/file-management.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management.js +2 -2
- package/data/build/dist/client/features/file-management.js.map +1 -0
- package/data/build/dist/client/features/index.d.ts +5 -2
- package/data/build/dist/client/features/index.d.ts.map +1 -0
- package/data/build/dist/client/features/index.js +6 -2
- package/data/build/dist/client/features/index.js.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.js +80 -2
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -0
- package/data/build/dist/client/features/lan-access-status.d.ts +40 -0
- package/data/build/dist/client/features/lan-access-status.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-status.js +118 -0
- package/data/build/dist/client/features/lan-access-status.js.map +1 -0
- package/data/build/dist/client/features/lan-access.d.ts +4 -1
- package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access.js +29 -4
- package/data/build/dist/client/features/lan-access.js.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.js.map +1 -0
- package/data/build/dist/client/features/login-protection-session.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-session.js.map +1 -0
- package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection.js +2 -2
- package/data/build/dist/client/features/login-protection.js.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts +12 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.js +259 -0
- package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
- package/data/build/dist/client/features/mobile-access.d.ts +13 -0
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access.js +75 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -0
- package/data/build/dist/client/features/peer-host.d.ts +35 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/client/features/peer-host.js +495 -56
- package/data/build/dist/client/features/peer-host.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.js +2 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.js +2 -2
- package/data/build/dist/client/features/reverse-proxy.js.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts +15 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.js +117 -0
- package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.js +2 -2
- package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
- package/data/build/dist/client/features/types.d.ts +12 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -0
- package/data/build/dist/client/features/types.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +27 -7
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js +34 -6
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
- package/data/build/dist/client/file-management-dom.d.ts +2 -0
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
- package/data/build/dist/client/file-management-dom.js +37 -8
- package/data/build/dist/client/file-management-dom.js.map +1 -0
- package/data/build/dist/client/git-history-graph.d.ts +81 -0
- package/data/build/dist/client/git-history-graph.d.ts.map +1 -0
- package/data/build/dist/client/git-history-graph.js +195 -0
- package/data/build/dist/client/git-history-graph.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -0
- package/data/build/dist/client/git-management.js +305 -67
- package/data/build/dist/client/git-management.js.map +1 -0
- package/data/build/dist/client/git-panel-styles.d.ts +28 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
- package/data/build/dist/client/git-panel-styles.js +95 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.d.ts.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
- package/data/build/dist/client/host-router.d.ts.map +1 -0
- package/data/build/dist/client/host-router.js.map +1 -0
- package/data/build/dist/client/index.d.ts +6 -4
- package/data/build/dist/client/index.d.ts.map +1 -0
- package/data/build/dist/client/index.js +26 -53
- package/data/build/dist/client/index.js.map +1 -0
- package/data/build/dist/client/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/lan-access.js.map +1 -0
- package/data/build/dist/client/locale.d.ts.map +1 -0
- package/data/build/dist/client/locale.js +170 -12
- package/data/build/dist/client/locale.js.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts +49 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js +152 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts +97 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js +316 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts +18 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.js +15 -0
- package/data/build/dist/client/mobile-sidebar-logo.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts +106 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js +444 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js.map +1 -0
- package/data/build/dist/client/mobile-vibration.d.ts +16 -0
- package/data/build/dist/client/mobile-vibration.d.ts.map +1 -0
- package/data/build/dist/client/mobile-vibration.js +20 -0
- package/data/build/dist/client/mobile-vibration.js.map +1 -0
- package/data/build/dist/client/native-workspace-store.d.ts +29 -0
- package/data/build/dist/client/native-workspace-store.d.ts.map +1 -0
- package/data/build/dist/client/native-workspace-store.js +64 -0
- package/data/build/dist/client/native-workspace-store.js.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts +13 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js +14 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js.map +1 -0
- package/data/build/dist/client/peer-host-color.d.ts +13 -0
- package/data/build/dist/client/peer-host-color.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-color.js +57 -0
- package/data/build/dist/client/peer-host-color.js.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.js +6 -3
- package/data/build/dist/client/peer-host-connection-button.js.map +1 -0
- package/data/build/dist/client/peer-host-management-api.d.ts +34 -0
- package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-api.js +12 -0
- package/data/build/dist/client/peer-host-management-api.js.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.d.ts +1 -1
- package/data/build/dist/client/peer-host-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.js +521 -86
- package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts +46 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.js +137 -0
- package/data/build/dist/client/peer-host-native-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts +21 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.js +114 -0
- package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.js.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts +44 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.js +472 -0
- package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts +47 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.js +207 -0
- package/data/build/dist/client/peer-host-workspace-tag.js.map +1 -0
- package/data/build/dist/client/popup-dismiss.d.ts +48 -0
- package/data/build/dist/client/popup-dismiss.d.ts.map +1 -0
- package/data/build/dist/client/popup-dismiss.js +93 -0
- package/data/build/dist/client/popup-dismiss.js.map +1 -0
- package/data/build/dist/client/provider-icon-assets.d.ts.map +1 -0
- package/data/build/dist/client/provider-icon-assets.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +10 -1
- package/data/build/dist/client/provider-icons.d.ts.map +1 -0
- package/data/build/dist/client/provider-icons.js +19 -12
- package/data/build/dist/client/provider-icons.js.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts +73 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.js +178 -0
- package/data/build/dist/client/pwa-install-prompt.js.map +1 -0
- package/data/build/dist/client/pwa-notifications.d.ts +105 -0
- package/data/build/dist/client/pwa-notifications.d.ts.map +1 -0
- package/data/build/dist/client/pwa-notifications.js +192 -0
- package/data/build/dist/client/pwa-notifications.js.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
- package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
- package/data/build/dist/client/remote-web-context.js +26 -2
- package/data/build/dist/client/remote-web-context.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
- package/data/build/dist/client/session-adapter-cache.js.map +1 -0
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
- package/data/build/dist/client/session-changed-files-view.js.map +1 -0
- package/data/build/dist/client/settings-anchor.d.ts +67 -0
- package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
- package/data/build/dist/client/settings-anchor.js +64 -0
- package/data/build/dist/client/settings-anchor.js.map +1 -0
- package/data/build/dist/client/settings-bridge.d.ts +20 -5
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
- package/data/build/dist/client/settings-bridge.js +30 -7
- package/data/build/dist/client/settings-bridge.js.map +1 -0
- package/data/build/dist/client/settings-section.d.ts.map +1 -0
- package/data/build/dist/client/settings-section.js +16 -2
- package/data/build/dist/client/settings-section.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +3 -1
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
- package/data/build/dist/client/subscription-slot.js +33 -25
- package/data/build/dist/client/subscription-slot.js.map +1 -0
- package/data/build/dist/client/terminal/index.d.ts.map +1 -0
- package/data/build/dist/client/terminal/index.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts.map +1 -0
- package/data/build/dist/client/terminal/model.js.map +1 -0
- package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
- package/data/build/dist/client/terminal/recovery.js.map +1 -0
- package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
- package/data/build/dist/client/terminal/styles.js.map +1 -0
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
- package/data/build/dist/client/terminal/ui.js +1 -1
- package/data/build/dist/client/terminal/ui.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.js +1 -1
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
- package/data/build/dist/client/theme.d.ts +17 -5
- package/data/build/dist/client/theme.d.ts.map +1 -0
- package/data/build/dist/client/theme.js +35 -13
- package/data/build/dist/client/theme.js.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +14 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.js +70 -11
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +5 -2
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +3 -2
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts +2 -2
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts +22 -1
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js +29 -3
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts +2 -2
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/index.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.js +44 -1
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.js +6 -2
- package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts +8 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.js +260 -7
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/types.js.map +1 -0
- package/data/build/dist/features/host-router.d.ts.map +1 -0
- package/data/build/dist/features/host-router.js.map +1 -0
- package/data/build/dist/features/index.d.ts.map +1 -0
- package/data/build/dist/features/index.js.map +1 -0
- package/data/build/dist/features/registry.d.ts +7 -0
- package/data/build/dist/features/registry.d.ts.map +1 -0
- package/data/build/dist/features/registry.js +20 -2
- package/data/build/dist/features/registry.js.map +1 -0
- package/data/build/dist/features/resource-scope/index.d.ts.map +1 -0
- package/data/build/dist/features/resource-scope/index.js.map +1 -0
- package/data/build/dist/host/auth-session.d.ts.map +1 -0
- package/data/build/dist/host/auth-session.js.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +14 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js +78 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +5 -2
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js +248 -45
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +24 -2
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.js +250 -30
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +49 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.js +176 -7
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.js +6 -3
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.js +3 -2
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.js.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.js.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +8 -3
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts +36 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js +108 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js +7 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.js +7 -2
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +35 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js +405 -5
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts +9 -3
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.js +30 -0
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +8 -2
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.js +19 -0
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.js.map +1 -0
- package/data/build/dist/host/control-api-client.d.ts.map +1 -0
- package/data/build/dist/host/control-api-client.js.map +1 -0
- package/data/build/dist/host/credential-store.d.ts.map +1 -0
- package/data/build/dist/host/credential-store.js.map +1 -0
- package/data/build/dist/host/debug.d.ts.map +1 -0
- package/data/build/dist/host/debug.js.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/host/features/auth.d.ts.map +1 -0
- package/data/build/dist/host/features/auth.js.map +1 -0
- package/data/build/dist/host/features/debug.d.ts.map +1 -0
- package/data/build/dist/host/features/debug.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -0
- package/data/build/dist/host/features/file-management.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts.map +1 -0
- package/data/build/dist/host/features/git-management.js +133 -23
- package/data/build/dist/host/features/git-management.js.map +1 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -0
- package/data/build/dist/host/features/host-status.js.map +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -0
- package/data/build/dist/host/features/index.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.js +30 -1
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/host/features/peer-host.js +340 -20
- package/data/build/dist/host/features/peer-host.js.map +1 -0
- package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-process.js.map +1 -0
- package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-status.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +9 -3
- package/data/build/dist/host/features/types.d.ts.map +1 -0
- package/data/build/dist/host/features/types.js.map +1 -0
- package/data/build/dist/host/host-router.d.ts.map +1 -0
- package/data/build/dist/host/host-router.js.map +1 -0
- package/data/build/dist/host/index-injection.d.ts +27 -5
- package/data/build/dist/host/index-injection.d.ts.map +1 -0
- package/data/build/dist/host/index-injection.js +77 -11
- package/data/build/dist/host/index-injection.js.map +1 -0
- package/data/build/dist/host/index.d.ts +8 -2
- package/data/build/dist/host/index.d.ts.map +1 -0
- package/data/build/dist/host/index.js +54 -7
- package/data/build/dist/host/index.js.map +1 -0
- package/data/build/dist/host/lan-access-dsh.d.ts +88 -3
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/lan-access-dsh.js +349 -14
- package/data/build/dist/host/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts +146 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +322 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts +8 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js +120 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +22 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +24 -3
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +9 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +26 -12
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +3 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +6 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +17 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +52 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +25 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +184 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts +22 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +111 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts +53 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +153 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +20 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +118 -37
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts +21 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.js +65 -3
- package/data/build/dist/host/modules/peer-host/peer-host-store.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +49 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +174 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.js.map +1 -0
- package/data/build/dist/host/modules/pwa/index.d.ts +7 -0
- package/data/build/dist/host/modules/pwa/index.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/index.js +7 -0
- package/data/build/dist/host/modules/pwa/index.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts +48 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js +180 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js +38 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js +185 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts +74 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js +288 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts +14 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +80 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts +12 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js +47 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +4 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -0
- package/data/build/dist/host/native-session-bridge.js +67 -12
- package/data/build/dist/host/native-session-bridge.js.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts +33 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.js +81 -20
- package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
- package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
- package/data/build/dist/host/remote-web-runtime.js +40 -17
- package/data/build/dist/host/remote-web-runtime.js.map +1 -0
- package/data/build/dist/host/rpc-table.d.ts.map +1 -0
- package/data/build/dist/host/rpc-table.js.map +1 -0
- package/data/build/dist/host/rpc.d.ts +24 -5
- package/data/build/dist/host/rpc.d.ts.map +1 -0
- package/data/build/dist/host/rpc.js +54 -13
- package/data/build/dist/host/rpc.js.map +1 -0
- package/data/build/dist/host/session-changes.d.ts.map +1 -0
- package/data/build/dist/host/session-changes.js.map +1 -0
- package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
- package/data/build/dist/host/session-migration-repair.js +14 -0
- package/data/build/dist/host/session-migration-repair.js.map +1 -0
- package/data/build/dist/host/settings.d.ts +2 -2
- package/data/build/dist/host/settings.d.ts.map +1 -0
- package/data/build/dist/host/settings.js +40 -1
- package/data/build/dist/host/settings.js.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.js.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
- package/data/build/dist/host/terminal/index.d.ts.map +1 -0
- package/data/build/dist/host/terminal/index.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
- package/data/build/dist/host/terminal/startup.d.ts +2 -2
- package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
- package/data/build/dist/host/terminal/startup.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
- package/data/build/dist/index.d.ts +2 -2
- package/data/build/dist/index.d.ts.map +1 -0
- package/data/build/dist/index.js +2 -2
- package/data/build/dist/index.js.map +1 -0
- package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/auth.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +52 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
- package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/command-code.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +100 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/config.js +101 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug.js.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -0
- package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/feature.js.map +1 -0
- package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/file-management.js.map +1 -0
- package/data/build/dist/shared/contracts/git.d.ts +15 -1
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/git.js.map +1 -0
- package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/host-status.js.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +23 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.js.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts +158 -1
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.js +73 -0
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -0
- package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/signaling.js.map +1 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +7 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/subscription.js +14 -1
- package/data/build/dist/shared/contracts/subscription.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal.js.map +1 -0
- package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/transport.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +14 -6
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/version.js +23 -8
- package/data/build/dist/shared/contracts/version.js.map +1 -0
- package/data/build/dist/shared/debug.d.ts.map +1 -0
- package/data/build/dist/shared/debug.js.map +1 -0
- package/data/build/dist/shared/index.d.ts +6 -5
- package/data/build/dist/shared/index.d.ts.map +1 -0
- package/data/build/dist/shared/index.js +4 -3
- package/data/build/dist/shared/index.js.map +1 -0
- package/data/build/dist/transport/carrier.d.ts +11 -1
- package/data/build/dist/transport/carrier.d.ts.map +1 -0
- package/data/build/dist/transport/carrier.js +77 -26
- package/data/build/dist/transport/carrier.js.map +1 -0
- package/data/build/dist/transport/debug.d.ts +5 -0
- package/data/build/dist/transport/debug.d.ts.map +1 -0
- package/data/build/dist/transport/debug.js +19 -2
- package/data/build/dist/transport/debug.js.map +1 -0
- package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-envelope.js.map +1 -0
- package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-gateway.js.map +1 -0
- package/data/build/dist/transport/dsh-session.d.ts +18 -1
- package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-session.js +48 -13
- package/data/build/dist/transport/dsh-session.js.map +1 -0
- package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-transport.js.map +1 -0
- package/data/build/dist/transport/frame.d.ts.map +1 -0
- package/data/build/dist/transport/frame.js.map +1 -0
- package/data/build/dist/transport/index.d.ts +2 -2
- package/data/build/dist/transport/index.d.ts.map +1 -0
- package/data/build/dist/transport/index.js +2 -2
- package/data/build/dist/transport/index.js.map +1 -0
- package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
- package/data/build/dist/transport/multiplexer.js.map +1 -0
- package/data/build/dist/transport/webrtc-client.d.ts +8 -0
- package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-client.js +135 -9
- package/data/build/dist/transport/webrtc-client.js.map +1 -0
- package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-host.js +5 -1
- package/data/build/dist/transport/webrtc-host.js.map +1 -0
- package/data/build/dist/typert.host.d.ts.map +1 -0
- package/data/build/dist/typert.host.js.map +1 -0
- package/data/build/dist/typert.remote-client.d.ts.map +1 -0
- package/data/build/dist/typert.remote-client.js.map +1 -0
- package/package.json +39 -20
- package/profile/README.md +18 -5
- package/profile/package.json +4 -3
- package/profile/scripts/check-dsh-install.mjs +100 -9
- package/profile/version.json +3 -3
- package/scripts/check-dsh-install.mjs +98 -17
- package/version.json +3 -3
- package/data/build/dist/client/host-navigation.d.ts +0 -29
- package/data/build/dist/client/host-navigation.js +0 -29
- package/data/build/dist/client/peer-host-native-session-ui.d.ts +0 -60
- package/data/build/dist/client/peer-host-native-session-ui.js +0 -372
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { PEER_HOST_COLOR_PRESETS, normalizePeerHostColor } from '../shared/contracts/peer-host.js';
|
|
1
2
|
import { PEER_HOST_OPEN_EVENT } from './peer-host-connection-button.js';
|
|
3
|
+
import { fetchLocalIdentity, readRelayLoginIdentity } from './account-bar.js';
|
|
2
4
|
import { createPeerHostManagementApi } from './peer-host-management-api.js';
|
|
3
|
-
|
|
5
|
+
import { resolvePeerHostColor } from './peer-host-color.js';
|
|
6
|
+
import { dshThemeColor } from './theme.js';
|
|
7
|
+
/** PeerHost 管理面板;入口来自统一账户菜单,面板只渲染脱敏记录。 */
|
|
4
8
|
export function startPeerHostManagementPanel(options) {
|
|
5
9
|
const dom = options.document ?? (typeof document === 'undefined' ? undefined : document);
|
|
6
10
|
if (dom === undefined)
|
|
@@ -31,72 +35,225 @@ function createOverlay(dom, api, onClose) {
|
|
|
31
35
|
const overlay = dom.createElement('div');
|
|
32
36
|
overlay.setAttribute('data-codingns-peer-host-panel', '');
|
|
33
37
|
overlay.setAttribute('role', 'dialog');
|
|
38
|
+
overlay.setAttribute('aria-modal', 'true');
|
|
34
39
|
overlay.setAttribute('aria-label', '管理其他 DSH Host');
|
|
35
|
-
Object.assign(overlay.style, {
|
|
40
|
+
Object.assign(overlay.style, {
|
|
41
|
+
position: 'fixed', inset: '0', zIndex: '9999', display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
42
|
+
padding: 'max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px))',
|
|
43
|
+
boxSizing: 'border-box', background: dshThemeColor.overlay,
|
|
44
|
+
});
|
|
45
|
+
const dialog = dom.createElement('section');
|
|
46
|
+
Object.assign(dialog.style, {
|
|
47
|
+
width: 'min(980px, 100%)', maxHeight: '100%', overflow: 'auto', boxSizing: 'border-box',
|
|
48
|
+
padding: '22px 24px 24px', border: `1px solid ${dshThemeColor.border}`, borderRadius: '10px',
|
|
49
|
+
background: dshThemeColor.menuBackground, color: dshThemeColor.labelPrimary, boxShadow: dshThemeColor.prominentShadow,
|
|
50
|
+
});
|
|
36
51
|
const header = dom.createElement('header');
|
|
52
|
+
Object.assign(header.style, { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: '16px', paddingBottom: '14px', borderBottom: `1px solid ${dshThemeColor.border}` });
|
|
53
|
+
const heading = dom.createElement('div');
|
|
54
|
+
Object.assign(heading.style, { display: 'flex', flexDirection: 'column', gap: '4px', minWidth: '0' });
|
|
37
55
|
const title = dom.createElement('strong');
|
|
38
56
|
title.textContent = '管理其他 DSH Host';
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
Object.assign(title.style, { fontSize: '18px', lineHeight: '1.35' });
|
|
58
|
+
const subtitle = dom.createElement('span');
|
|
59
|
+
subtitle.textContent = '连接并管理已登记的其他工作主机';
|
|
60
|
+
Object.assign(subtitle.style, { color: dshThemeColor.labelSecondary, fontSize: '12px', lineHeight: '1.5' });
|
|
61
|
+
heading.append(title, subtitle);
|
|
62
|
+
const close = actionButton(dom, '', () => { overlay.remove(); onClose(); });
|
|
63
|
+
close.setAttribute('aria-label', '关闭 PeerHost 管理');
|
|
64
|
+
close.title = '关闭';
|
|
65
|
+
close.append(createHeaderIcon(dom, 'close'));
|
|
66
|
+
styleHeaderIconButton(close, 'close');
|
|
67
|
+
const addToggle = actionButton(dom, '', () => {
|
|
68
|
+
addToggle.setAttribute('aria-expanded', 'true');
|
|
69
|
+
openAddDialog(dom, overlay, api, () => addToggle.setAttribute('aria-expanded', 'false'));
|
|
70
|
+
});
|
|
71
|
+
addToggle.setAttribute('aria-label', '添加 Host');
|
|
72
|
+
addToggle.title = '添加 Host';
|
|
73
|
+
addToggle.setAttribute('aria-expanded', 'false');
|
|
74
|
+
addToggle.append(createHeaderIcon(dom, 'plus'));
|
|
75
|
+
styleHeaderIconButton(addToggle, 'add');
|
|
76
|
+
const headerActions = dom.createElement('div');
|
|
77
|
+
Object.assign(headerActions.style, { display: 'flex', alignItems: 'center', gap: '6px', flex: '0 0 auto' });
|
|
78
|
+
headerActions.append(addToggle, close);
|
|
79
|
+
header.append(heading, headerActions);
|
|
80
|
+
const listSection = dom.createElement('section');
|
|
81
|
+
Object.assign(listSection.style, { padding: '14px 0 18px', borderBottom: `1px solid ${dshThemeColor.border}` });
|
|
82
|
+
const listHeading = dom.createElement('div');
|
|
83
|
+
Object.assign(listHeading.style, { display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', flexWrap: 'wrap', gap: '4px 10px', marginBottom: '10px' });
|
|
84
|
+
const listTitle = dom.createElement('strong');
|
|
85
|
+
listTitle.textContent = '已登记的 Host';
|
|
86
|
+
const listHint = dom.createElement('span');
|
|
87
|
+
listHint.textContent = '管理连接、资源和访问状态';
|
|
88
|
+
Object.assign(listHint.style, { color: dshThemeColor.labelSecondary, fontSize: '11px', lineHeight: '1.4' });
|
|
89
|
+
listHeading.append(listTitle, listHint);
|
|
48
90
|
const list = dom.createElement('div');
|
|
49
91
|
list.setAttribute('data-codingns-peer-host-list', '');
|
|
50
|
-
|
|
51
|
-
|
|
92
|
+
Object.assign(list.style, {
|
|
93
|
+
display: 'grid',
|
|
94
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(min(300px, 100%), 300px))',
|
|
95
|
+
justifyContent: 'start',
|
|
96
|
+
gap: '12px',
|
|
97
|
+
width: '100%',
|
|
98
|
+
maxWidth: '936px',
|
|
99
|
+
});
|
|
100
|
+
listSection.append(listHeading, list);
|
|
101
|
+
dialog.append(header, listSection);
|
|
102
|
+
overlay.append(dialog);
|
|
103
|
+
overlay.addEventListener('click', (event) => { if (event.target === overlay) {
|
|
104
|
+
overlay.remove();
|
|
105
|
+
onClose();
|
|
106
|
+
} });
|
|
52
107
|
dom.body.append(overlay);
|
|
53
108
|
return overlay;
|
|
54
109
|
}
|
|
55
|
-
function
|
|
110
|
+
function createFormDialog(dom, parent, titleText, onClose) {
|
|
111
|
+
const formOverlay = dom.createElement('div');
|
|
112
|
+
formOverlay.setAttribute('data-codingns-peer-host-form-dialog', '');
|
|
113
|
+
formOverlay.setAttribute('role', 'dialog');
|
|
114
|
+
formOverlay.setAttribute('aria-modal', 'true');
|
|
115
|
+
formOverlay.setAttribute('aria-label', titleText);
|
|
116
|
+
Object.assign(formOverlay.style, {
|
|
117
|
+
position: 'fixed', inset: '0', zIndex: '10000', display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
118
|
+
padding: 'max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px))',
|
|
119
|
+
boxSizing: 'border-box', background: dshThemeColor.overlay,
|
|
120
|
+
});
|
|
121
|
+
const dialog = dom.createElement('section');
|
|
122
|
+
Object.assign(dialog.style, {
|
|
123
|
+
width: 'min(480px, 100%)', maxHeight: '100%', overflow: 'auto', boxSizing: 'border-box',
|
|
124
|
+
padding: '20px 22px 22px', border: `1px solid ${dshThemeColor.border}`, borderRadius: '10px',
|
|
125
|
+
background: dshThemeColor.menuBackground, color: dshThemeColor.labelPrimary, boxShadow: dshThemeColor.prominentShadow,
|
|
126
|
+
});
|
|
127
|
+
const header = dom.createElement('header');
|
|
128
|
+
Object.assign(header.style, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', paddingBottom: '12px', borderBottom: `1px solid ${dshThemeColor.border}` });
|
|
129
|
+
const title = dom.createElement('strong');
|
|
130
|
+
title.textContent = titleText;
|
|
131
|
+
Object.assign(title.style, { fontSize: '16px', lineHeight: '1.35' });
|
|
132
|
+
const closeButton = actionButton(dom, '', closeDialog);
|
|
133
|
+
closeButton.setAttribute('aria-label', `关闭${titleText}`);
|
|
134
|
+
closeButton.title = '关闭';
|
|
135
|
+
closeButton.append(createHeaderIcon(dom, 'close'));
|
|
136
|
+
styleHeaderIconButton(closeButton, 'close');
|
|
137
|
+
header.append(title, closeButton);
|
|
138
|
+
const message = dom.createElement('div');
|
|
139
|
+
message.setAttribute('role', 'status');
|
|
140
|
+
message.setAttribute('data-codingns-peer-host-message', '');
|
|
141
|
+
message.hidden = true;
|
|
142
|
+
Object.assign(message.style, { margin: '12px 0 4px', color: dshThemeColor.labelSecondary, fontSize: '12px', lineHeight: '1.5' });
|
|
143
|
+
const body = dom.createElement('div');
|
|
144
|
+
Object.assign(body.style, { display: 'flex', flexDirection: 'column', gap: '8px' });
|
|
145
|
+
dialog.append(header, message, body);
|
|
146
|
+
formOverlay.append(dialog);
|
|
147
|
+
formOverlay.addEventListener('click', (event) => { if (event.target === formOverlay)
|
|
148
|
+
closeDialog(); });
|
|
149
|
+
parent.append(formOverlay);
|
|
150
|
+
let closed = false;
|
|
151
|
+
function closeDialog() {
|
|
152
|
+
if (closed)
|
|
153
|
+
return;
|
|
154
|
+
closed = true;
|
|
155
|
+
formOverlay.remove();
|
|
156
|
+
onClose();
|
|
157
|
+
}
|
|
158
|
+
return { overlay: formOverlay, body, message, close: closeDialog };
|
|
159
|
+
}
|
|
160
|
+
function openAddDialog(dom, parent, api, onClose) {
|
|
161
|
+
const modal = createFormDialog(dom, parent, '添加 Host', onClose);
|
|
162
|
+
// 表单必须拿到 close:添加成功后要自动关闭对话框,否则用户会以为没生效而重复提交。
|
|
163
|
+
modal.body.append(createAddForm(dom, api, parent, modal.message, modal.close));
|
|
164
|
+
}
|
|
165
|
+
function createAddForm(dom, api, panel, message, close) {
|
|
56
166
|
const form = dom.createElement('form');
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
const transportVersion = input(dom, '中转协议版本', 'text');
|
|
73
|
-
const routeFields = dom.createElement('div');
|
|
74
|
-
routeFields.append(url.wrapper, deviceId.wrapper, relayEntryId.wrapper, transportVersion.wrapper);
|
|
75
|
-
const updateRouteFields = () => {
|
|
76
|
-
const relay = routeKind.value === 'relay';
|
|
77
|
-
url.wrapper.hidden = relay;
|
|
78
|
-
deviceId.wrapper.hidden = !relay;
|
|
79
|
-
relayEntryId.wrapper.hidden = !relay;
|
|
80
|
-
transportVersion.wrapper.hidden = !relay;
|
|
81
|
-
url.input.required = !relay;
|
|
82
|
-
deviceId.input.required = relay;
|
|
83
|
-
relayEntryId.input.required = relay;
|
|
84
|
-
transportVersion.input.required = relay;
|
|
85
|
-
};
|
|
86
|
-
routeKind.addEventListener('change', updateRouteFields);
|
|
87
|
-
updateRouteFields();
|
|
88
|
-
const submit = dom.createElement('button');
|
|
167
|
+
form.setAttribute('data-codingns-peer-host-add-form', '');
|
|
168
|
+
Object.assign(form.style, { display: 'flex', flexDirection: 'column', gap: '8px' });
|
|
169
|
+
const name = input(dom, '名称(可选)', 'text', 'data-codingns-peer-host-name');
|
|
170
|
+
name.input.required = false;
|
|
171
|
+
const url = input(dom, 'Host 地址', 'url', 'data-codingns-peer-host-url');
|
|
172
|
+
const username = input(dom, '目标 Host 用户名', 'text', 'data-codingns-peer-host-username');
|
|
173
|
+
const password = input(dom, '目标 Host 密码', 'password', 'data-codingns-peer-host-password');
|
|
174
|
+
password.input.autocomplete = 'current-password';
|
|
175
|
+
const identity = dom.createElement('small');
|
|
176
|
+
identity.setAttribute('data-codingns-peer-host-identity', '');
|
|
177
|
+
identity.textContent = '正在识别当前登录账号…';
|
|
178
|
+
const identityNote = dom.createElement('small');
|
|
179
|
+
identityNote.textContent = '登录信息只用于目标 Host 会话;密码不会保存到浏览器。';
|
|
180
|
+
Object.assign(identityNote.style, { color: dshThemeColor.labelSecondary, fontSize: '11px', lineHeight: '1.5' });
|
|
181
|
+
const submit = actionButton(dom, '添加并登录', () => undefined);
|
|
89
182
|
submit.type = 'submit';
|
|
90
|
-
submit.
|
|
91
|
-
form.append(name.wrapper,
|
|
183
|
+
Object.assign(submit.style, { alignSelf: 'flex-start', marginTop: '4px', padding: '0 14px', background: dshThemeColor.accent, borderColor: dshThemeColor.accent, color: dshThemeColor.primaryForeground });
|
|
184
|
+
form.append(name.wrapper, url.wrapper, identity, identityNote, username.wrapper, password.wrapper, submit);
|
|
185
|
+
// 首次提交创建记录;若握手或登录失败后重试,必须走 update 而不是再次 create:
|
|
186
|
+
// 重复 create 会撞 PEER_HOST_DUPLICATE,而重新 create 又会在用户改了地址时留下孤儿记录。
|
|
187
|
+
let createdId = null;
|
|
92
188
|
form.addEventListener('submit', (event) => {
|
|
93
189
|
event.preventDefault();
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
190
|
+
const displayName = name.input.value.trim();
|
|
191
|
+
const route = { kind: 'lan', baseUrl: url.input.value.trim(), normalizedOrigin: '' };
|
|
192
|
+
submit.disabled = true;
|
|
193
|
+
submit.textContent = createdId === null ? '添加中…' : '重试中…';
|
|
194
|
+
const ensureRecord = createdId === null
|
|
195
|
+
? api.create({ displayName, route }).then((record) => {
|
|
196
|
+
createdId = record.id;
|
|
197
|
+
return record.id;
|
|
198
|
+
})
|
|
199
|
+
// 重试时把用户可能修正过的名称与地址写回同一条记录。
|
|
200
|
+
: api.update({
|
|
201
|
+
peerHostId: createdId,
|
|
202
|
+
...(displayName === '' ? {} : { displayName }),
|
|
203
|
+
route,
|
|
204
|
+
}).then(() => createdId);
|
|
205
|
+
void ensureRecord
|
|
206
|
+
.then(async (peerHostId) => {
|
|
207
|
+
// 登录依赖握手状态 ready,顺序必须是创建/更新 -> 握手检查 -> 登录。
|
|
208
|
+
const checked = await api.check(peerHostId);
|
|
209
|
+
const account = { username: username.input.value.trim(), password: password.input.value };
|
|
210
|
+
if (checked.status !== 'ready')
|
|
211
|
+
return { record: checked, ready: false };
|
|
212
|
+
if (account.username === '' || account.password === '')
|
|
213
|
+
return { record: checked, ready: true };
|
|
214
|
+
await api.login({ peerHostId, ...account });
|
|
215
|
+
return { record: checked, ready: true };
|
|
216
|
+
})
|
|
217
|
+
.then(async ({ record, ready }) => {
|
|
218
|
+
await refreshList(panel, api);
|
|
219
|
+
if (ready) {
|
|
220
|
+
// 添加并连接成功:自动关闭对话框,由外层列表展示新记录。
|
|
221
|
+
close();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
// 握手未通过时保留对话框,让用户看到原因并就地修正后重试。
|
|
225
|
+
setMessage(`PeerHost 已登记,但握手状态为“${statusLabel(record.status)}”;请修正地址或凭据后再次提交。`);
|
|
226
|
+
})
|
|
227
|
+
.catch((error) => setMessage(error instanceof Error ? error.message : String(error)))
|
|
228
|
+
.finally(() => { submit.disabled = false; submit.textContent = '添加并登录'; });
|
|
98
229
|
});
|
|
230
|
+
void hydrateIdentity(dom, username.input, identity);
|
|
99
231
|
return form;
|
|
232
|
+
function setMessage(text) {
|
|
233
|
+
message.textContent = text;
|
|
234
|
+
message.hidden = text === '';
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
async function hydrateIdentity(dom, username, identity) {
|
|
238
|
+
let local = null;
|
|
239
|
+
try {
|
|
240
|
+
local = await fetchLocalIdentity(dom);
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
local = null;
|
|
244
|
+
}
|
|
245
|
+
const relay = readRelayLoginIdentity();
|
|
246
|
+
if (local !== null) {
|
|
247
|
+
username.value = local.username;
|
|
248
|
+
identity.textContent = `已读取当前页面账号“${local.username}”作为用户名建议;这不会自动登录远程 Host`;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (relay !== null) {
|
|
252
|
+
username.value = relay.username;
|
|
253
|
+
identity.textContent = `已读取当前中转账号“${relay.username}”作为用户名建议;仍需目标 Host 自己的密码`;
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
identity.textContent = '未识别当前页面账号;请填写目标 Host 的用户名和密码';
|
|
100
257
|
}
|
|
101
258
|
async function refreshList(overlay, api) {
|
|
102
259
|
const list = overlay.querySelector('[data-codingns-peer-host-list]');
|
|
@@ -106,76 +263,354 @@ async function refreshList(overlay, api) {
|
|
|
106
263
|
try {
|
|
107
264
|
const records = await api.list();
|
|
108
265
|
list.textContent = '';
|
|
109
|
-
|
|
110
|
-
|
|
266
|
+
if (records.length === 0) {
|
|
267
|
+
const empty = list.ownerDocument.createElement('p');
|
|
268
|
+
empty.textContent = '尚未添加其他 Host。点击右上角“+”添加。';
|
|
269
|
+
Object.assign(empty.style, { margin: '6px 0 0', color: dshThemeColor.labelSecondary, fontSize: '12px' });
|
|
270
|
+
list.append(empty);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const cards = await Promise.all(records.map(async (record) => ({
|
|
274
|
+
record,
|
|
275
|
+
// 未握手或未登录的记录不能通过代理读取远端资源,避免把业务错误当成 RPC 格式错误。
|
|
276
|
+
status: record.status === 'ready' ? await api.status(record.id).catch(() => null) : null,
|
|
277
|
+
})));
|
|
278
|
+
for (const card of cards)
|
|
279
|
+
list.append(renderRecord(overlay.ownerDocument, api, card.record, list, card.status, overlay));
|
|
111
280
|
}
|
|
112
281
|
catch (error) {
|
|
113
282
|
list.textContent = error instanceof Error ? error.message : String(error);
|
|
114
283
|
}
|
|
115
284
|
}
|
|
116
|
-
function renderRecord(dom, api, record, list) {
|
|
285
|
+
function renderRecord(dom, api, record, list, hostStatus, panel) {
|
|
117
286
|
const row = dom.createElement('article');
|
|
118
287
|
row.setAttribute('data-peer-host-id', record.id);
|
|
288
|
+
Object.assign(row.style, {
|
|
289
|
+
display: 'flex',
|
|
290
|
+
flexDirection: 'column',
|
|
291
|
+
gap: '4px',
|
|
292
|
+
width: '300px',
|
|
293
|
+
height: '220px',
|
|
294
|
+
minWidth: '0',
|
|
295
|
+
boxSizing: 'border-box',
|
|
296
|
+
overflow: 'hidden',
|
|
297
|
+
position: 'relative',
|
|
298
|
+
padding: '10px',
|
|
299
|
+
border: `1px solid ${dshThemeColor.border}`,
|
|
300
|
+
borderRadius: '8px',
|
|
301
|
+
background: dshThemeColor.cardBackground,
|
|
302
|
+
boxShadow: dshThemeColor.subtleShadow,
|
|
303
|
+
});
|
|
304
|
+
const titleRow = dom.createElement('div');
|
|
305
|
+
Object.assign(titleRow.style, { display: 'flex', alignItems: 'center', gap: '8px', minWidth: '0', minHeight: '20px' });
|
|
306
|
+
const swatch = dom.createElement('span');
|
|
307
|
+
swatch.setAttribute('data-codingns-peer-host-swatch', '');
|
|
308
|
+
swatch.title = record.color === null || record.color === undefined ? '默认配色(按名称推导)' : `标签配色 ${record.color}`;
|
|
309
|
+
Object.assign(swatch.style, {
|
|
310
|
+
flex: '0 0 auto', width: '10px', height: '10px', borderRadius: '999px',
|
|
311
|
+
background: peerHostColor(record), border: `1px solid ${dshThemeColor.border}`,
|
|
312
|
+
});
|
|
119
313
|
const title = dom.createElement('strong');
|
|
120
|
-
title.textContent =
|
|
121
|
-
|
|
122
|
-
|
|
314
|
+
title.textContent = record.displayName;
|
|
315
|
+
Object.assign(title.style, { minWidth: '0', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: '14px', lineHeight: '1.3' });
|
|
316
|
+
const status = dom.createElement('span');
|
|
317
|
+
status.textContent = statusLabel(record.status);
|
|
318
|
+
Object.assign(status.style, { flex: '0 0 auto', padding: '2px 6px', borderRadius: '999px', color: record.status === 'ready' ? dshThemeColor.success : dshThemeColor.labelSecondary, background: dshThemeColor.surfaceSubtle, fontSize: '10px', lineHeight: '1.2' });
|
|
319
|
+
titleRow.append(swatch, title, status);
|
|
320
|
+
const hostname = dom.createElement('div');
|
|
321
|
+
hostname.textContent = `主机名:${record.hostname ?? '未上报'}`;
|
|
322
|
+
Object.assign(hostname.style, { color: dshThemeColor.labelSecondary, fontSize: '11px', lineHeight: '1.35', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' });
|
|
323
|
+
const metadata = dom.createElement('div');
|
|
324
|
+
Object.assign(metadata.style, { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '6px', padding: '4px 0', borderTop: `1px solid ${dshThemeColor.border}`, borderBottom: `1px solid ${dshThemeColor.border}` });
|
|
325
|
+
metadata.append(metaItem(dom, 'DSH 版本', record.dshVersion ?? '未知'), metaItem(dom, '可见工作区', String((record.visibleWorkspaceIds ?? []).length)));
|
|
326
|
+
const resources = dom.createElement('div');
|
|
327
|
+
Object.assign(resources.style, { display: 'flex', flexDirection: 'column', gap: '4px' });
|
|
328
|
+
resources.append(resourceMeter(dom, 'CPU', hostStatus === null ? null : hostStatus.cpuPercent, hostStatus === null ? null : `${Math.round(hostStatus.cpuPercent)}%`));
|
|
329
|
+
resources.append(resourceMeter(dom, '内存', hostStatus === null ? null : hostStatus.memoryPercent, hostStatus === null ? null : `${formatBytes(hostStatus.memoryUsedBytes)} / ${formatBytes(hostStatus.memoryTotalBytes)}`));
|
|
123
330
|
const actions = dom.createElement('div');
|
|
124
|
-
|
|
331
|
+
// 只保留四个动作:登录/退出登录已并入"编辑"的一次性保存,不再是独立步骤。
|
|
332
|
+
Object.assign(actions.style, { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '4px', marginTop: 'auto' });
|
|
333
|
+
actions.append(actionButton(dom, '编辑', () => openEditForm(dom, api, record, panel)), actionButton(dom, '测试', () => run(() => api.check(record.id))), actionButton(dom, record.status === 'disabled' ? '启用' : '禁用', () => run(() => record.status === 'disabled' ? api.enable(record.id) : api.disable(record.id))), actionButton(dom, '删除', () => {
|
|
125
334
|
if (dom.defaultView?.confirm(`确认删除 PeerHost“${record.displayName}”?`) !== true)
|
|
126
335
|
return;
|
|
127
336
|
run(() => api.remove(record.id));
|
|
128
337
|
}));
|
|
129
|
-
|
|
338
|
+
for (const button of actions.querySelectorAll('button')) {
|
|
339
|
+
Object.assign(button.style, { width: '100%', minWidth: '0', minHeight: '26px', padding: '0 4px', fontSize: '11px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' });
|
|
340
|
+
}
|
|
341
|
+
row.append(titleRow, hostname, metadata, resources, actions);
|
|
130
342
|
return row;
|
|
131
343
|
function run(operation) {
|
|
132
|
-
void operation().then(() => refreshList(
|
|
344
|
+
void operation().then(() => refreshList(panel, api)).catch((error) => { hostname.textContent = error instanceof Error ? error.message : String(error); });
|
|
133
345
|
}
|
|
134
346
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
347
|
+
function metaItem(dom, label, value) {
|
|
348
|
+
const item = dom.createElement('div');
|
|
349
|
+
Object.assign(item.style, { display: 'flex', flexDirection: 'column', gap: '2px', minWidth: '0' });
|
|
350
|
+
const key = dom.createElement('span');
|
|
351
|
+
key.textContent = label;
|
|
352
|
+
Object.assign(key.style, { color: dshThemeColor.labelTertiary, fontSize: '10px' });
|
|
353
|
+
const content = dom.createElement('span');
|
|
354
|
+
content.textContent = value;
|
|
355
|
+
Object.assign(content.style, { color: dshThemeColor.labelPrimary, fontSize: '12px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' });
|
|
356
|
+
item.append(key, content);
|
|
357
|
+
return item;
|
|
141
358
|
}
|
|
142
|
-
function
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
359
|
+
function resourceMeter(dom, label, percent, value) {
|
|
360
|
+
const item = dom.createElement('div');
|
|
361
|
+
const header = dom.createElement('div');
|
|
362
|
+
Object.assign(header.style, { display: 'flex', justifyContent: 'space-between', gap: '8px', color: dshThemeColor.labelSecondary, fontSize: '10px', lineHeight: '1.2' });
|
|
363
|
+
const name = dom.createElement('span');
|
|
364
|
+
name.textContent = label;
|
|
365
|
+
const amount = dom.createElement('span');
|
|
366
|
+
amount.textContent = value ?? '暂无采样';
|
|
367
|
+
header.append(name, amount);
|
|
368
|
+
const track = dom.createElement('div');
|
|
369
|
+
Object.assign(track.style, { height: '4px', marginTop: '2px', overflow: 'hidden', borderRadius: '999px', background: dshThemeColor.surfaceSubtle });
|
|
370
|
+
const fill = dom.createElement('div');
|
|
371
|
+
Object.assign(fill.style, { width: `${Math.min(100, Math.max(0, percent ?? 0))}%`, height: '100%', borderRadius: 'inherit', background: percent === null ? dshThemeColor.labelTertiary : dshThemeColor.accent });
|
|
372
|
+
track.append(fill);
|
|
373
|
+
item.append(header, track);
|
|
374
|
+
return item;
|
|
375
|
+
}
|
|
376
|
+
function openEditForm(dom, api, record, panel) {
|
|
377
|
+
const modal = createFormDialog(dom, panel, '编辑 Host', () => undefined);
|
|
378
|
+
const form = dom.createElement('form');
|
|
379
|
+
form.setAttribute('data-codingns-peer-host-edit', '');
|
|
380
|
+
Object.assign(form.style, { display: 'flex', flexDirection: 'column', gap: '8px' });
|
|
381
|
+
const name = input(dom, '名称', 'text', 'data-codingns-peer-host-name');
|
|
382
|
+
name.input.value = record.displayName;
|
|
383
|
+
const url = input(dom, 'Host 地址(可选)', 'url', 'data-codingns-peer-host-url');
|
|
384
|
+
url.input.required = false;
|
|
385
|
+
if (record.route.kind === 'lan' && record.route.baseUrl !== undefined)
|
|
386
|
+
url.input.value = record.route.baseUrl;
|
|
387
|
+
const username = input(dom, '目标 Host 用户名(可选)', 'text', 'data-codingns-peer-host-username');
|
|
388
|
+
username.input.required = false;
|
|
389
|
+
username.input.autocomplete = 'username';
|
|
390
|
+
const password = input(dom, '目标 Host 密码(可选)', 'password', 'data-codingns-peer-host-password');
|
|
391
|
+
password.input.required = false;
|
|
392
|
+
password.input.autocomplete = 'current-password';
|
|
393
|
+
const colorField = colorInput(dom, record.color ?? null);
|
|
394
|
+
const credentialNote = dom.createElement('small');
|
|
395
|
+
credentialNote.setAttribute('data-codingns-peer-host-credential-note', '');
|
|
396
|
+
Object.assign(credentialNote.style, { color: dshThemeColor.labelSecondary, fontSize: '11px', lineHeight: '1.5' });
|
|
397
|
+
credentialNote.textContent = '密码留空表示保持已保存的登录凭据不变;填写密码后会立即握手并登录。';
|
|
398
|
+
const submit = actionButton(dom, '保存并连接', () => undefined);
|
|
399
|
+
submit.type = 'submit';
|
|
400
|
+
const note = dom.createElement('small');
|
|
401
|
+
note.textContent = record.route.kind === 'lan' ? '地址已从记录中回填;留空表示保持当前地址不变。' : '中转路由由 Host 侧保存,当前不可在客户端修改。';
|
|
402
|
+
form.append(name.wrapper, ...(record.route.kind === 'lan' ? [url.wrapper] : []), colorField.wrapper, username.wrapper, password.wrapper, credentialNote, note, submit);
|
|
403
|
+
modal.body.append(form);
|
|
404
|
+
void hydrateCredentialState(dom, api, record.id, credentialNote);
|
|
405
|
+
void hydrateEditUsername(dom, username.input);
|
|
406
|
+
form.addEventListener('submit', (event) => {
|
|
407
|
+
event.preventDefault();
|
|
408
|
+
if (!name.input.value.trim())
|
|
149
409
|
return;
|
|
150
|
-
|
|
151
|
-
|
|
410
|
+
const route = record.route.kind === 'lan'
|
|
411
|
+
? (url.input.value.trim() === '' ? undefined : { kind: 'lan', baseUrl: url.input.value.trim(), normalizedOrigin: '' })
|
|
412
|
+
: undefined;
|
|
413
|
+
// 密码是一次性更新凭据的开关:密码留空时忽略用户名建议并保留原登录态。
|
|
414
|
+
const account = username.input.value.trim();
|
|
415
|
+
const secret = password.input.value;
|
|
416
|
+
if (secret !== '' && account === '') {
|
|
417
|
+
credentialNote.textContent = '填写密码时必须同时填写目标 Host 用户名;密码留空即可保持当前凭据。';
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
submit.disabled = true;
|
|
421
|
+
submit.textContent = '保存中…';
|
|
422
|
+
void api.update({
|
|
423
|
+
peerHostId: record.id,
|
|
424
|
+
displayName: name.input.value.trim(),
|
|
425
|
+
color: colorField.value(),
|
|
426
|
+
...(route === undefined ? {} : { route }),
|
|
427
|
+
...(secret === '' ? {} : { username: account, password: secret }),
|
|
428
|
+
})
|
|
429
|
+
.then(() => refreshList(panel, api))
|
|
430
|
+
.then(() => modal.close())
|
|
431
|
+
.catch((error) => { credentialNote.textContent = error instanceof Error ? error.message : String(error); })
|
|
432
|
+
.finally(() => { submit.disabled = false; submit.textContent = '保存并连接'; });
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
/** 显示该 PeerHost 是否已保存凭据;已保存时用户名不再回填(Host 不回传)。 */
|
|
436
|
+
async function hydrateCredentialState(dom, api, peerHostId, note) {
|
|
437
|
+
try {
|
|
438
|
+
const status = await api.credentialStatus(peerHostId);
|
|
439
|
+
if (!status.hasSavedCredential)
|
|
440
|
+
return;
|
|
441
|
+
note.textContent = '当前 Host 已保存该目标的登录凭据,连接会自动完成;留空即可保持不变。';
|
|
442
|
+
}
|
|
443
|
+
catch {
|
|
444
|
+
// 凭据状态只是提示信息,读取失败不影响编辑与保存。
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
/** 编辑表单里的用户名建议;只填用户名,密码必须由用户自己输入。 */
|
|
448
|
+
async function hydrateEditUsername(dom, username) {
|
|
449
|
+
let local = null;
|
|
450
|
+
try {
|
|
451
|
+
local = await fetchLocalIdentity(dom);
|
|
452
|
+
}
|
|
453
|
+
catch {
|
|
454
|
+
local = null;
|
|
152
455
|
}
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
const transportVersion = dom.defaultView?.prompt('中转协议版本')?.trim();
|
|
156
|
-
if (!deviceId || !relayEntryId || !transportVersion)
|
|
456
|
+
const value = local ?? readRelayLoginIdentity();
|
|
457
|
+
if (value === null || username.value !== '')
|
|
157
458
|
return;
|
|
158
|
-
|
|
459
|
+
username.value = value.username;
|
|
159
460
|
}
|
|
160
461
|
function actionButton(dom, label, action) {
|
|
161
462
|
const button = dom.createElement('button');
|
|
162
463
|
button.type = 'button';
|
|
163
464
|
button.textContent = label;
|
|
164
465
|
button.addEventListener('click', action);
|
|
466
|
+
Object.assign(button.style, { minHeight: '30px', padding: '0 10px', border: `1px solid ${dshThemeColor.border}`, borderRadius: '6px', color: dshThemeColor.labelPrimary, background: dshThemeColor.buttonBackground, cursor: 'pointer', fontSize: '12px' });
|
|
165
467
|
return button;
|
|
166
468
|
}
|
|
167
|
-
function
|
|
469
|
+
function styleHeaderIconButton(button, kind) {
|
|
470
|
+
Object.assign(button.style, {
|
|
471
|
+
flex: '0 0 auto',
|
|
472
|
+
display: 'inline-flex',
|
|
473
|
+
alignItems: 'center',
|
|
474
|
+
justifyContent: 'center',
|
|
475
|
+
width: '34px',
|
|
476
|
+
minWidth: '34px',
|
|
477
|
+
height: '34px',
|
|
478
|
+
minHeight: '34px',
|
|
479
|
+
padding: '0',
|
|
480
|
+
border: `1px solid ${dshThemeColor.menuBorder}`,
|
|
481
|
+
borderRadius: '8px',
|
|
482
|
+
color: dshThemeColor.labelSecondary,
|
|
483
|
+
background: dshThemeColor.buttonBackground,
|
|
484
|
+
boxShadow: dshThemeColor.subtleShadow,
|
|
485
|
+
fontSize: kind === 'add' ? '21px' : '22px',
|
|
486
|
+
fontWeight: '500',
|
|
487
|
+
lineHeight: '1',
|
|
488
|
+
fontFamily: 'inherit',
|
|
489
|
+
outline: 'none',
|
|
490
|
+
cursor: 'pointer',
|
|
491
|
+
transition: 'background-color 120ms ease, border-color 120ms ease, color 120ms ease',
|
|
492
|
+
});
|
|
493
|
+
button.addEventListener('mouseenter', () => {
|
|
494
|
+
button.style.background = dshThemeColor.hoverBackground;
|
|
495
|
+
button.style.color = dshThemeColor.labelPrimary;
|
|
496
|
+
});
|
|
497
|
+
button.addEventListener('mouseleave', () => {
|
|
498
|
+
button.style.background = dshThemeColor.buttonBackground;
|
|
499
|
+
button.style.color = dshThemeColor.labelSecondary;
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
function createHeaderIcon(dom, kind) {
|
|
503
|
+
const createElementNS = dom.createElementNS;
|
|
504
|
+
if (typeof createElementNS !== 'function') {
|
|
505
|
+
const fallback = dom.createElement('span');
|
|
506
|
+
fallback.textContent = kind === 'plus' ? '+' : '×';
|
|
507
|
+
fallback.setAttribute('aria-hidden', 'true');
|
|
508
|
+
return fallback;
|
|
509
|
+
}
|
|
510
|
+
const svg = createElementNS.call(dom, 'http://www.w3.org/2000/svg', 'svg');
|
|
511
|
+
svg.setAttribute('width', '16');
|
|
512
|
+
svg.setAttribute('height', '16');
|
|
513
|
+
svg.setAttribute('viewBox', '0 0 24 24');
|
|
514
|
+
svg.setAttribute('fill', 'none');
|
|
515
|
+
svg.setAttribute('stroke', 'currentColor');
|
|
516
|
+
svg.setAttribute('stroke-width', '2');
|
|
517
|
+
svg.setAttribute('stroke-linecap', 'round');
|
|
518
|
+
svg.setAttribute('stroke-linejoin', 'round');
|
|
519
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
520
|
+
svg.style.display = 'block';
|
|
521
|
+
svg.style.pointerEvents = 'none';
|
|
522
|
+
const path = createElementNS.call(dom, 'http://www.w3.org/2000/svg', 'path');
|
|
523
|
+
path.setAttribute('d', kind === 'plus' ? 'M12 5v14M5 12h14' : 'M6 6l12 12M18 6 6 18');
|
|
524
|
+
svg.append(path);
|
|
525
|
+
return svg;
|
|
526
|
+
}
|
|
527
|
+
function input(dom, label, type, attribute) {
|
|
168
528
|
const wrapper = dom.createElement('label');
|
|
169
529
|
wrapper.textContent = label;
|
|
170
530
|
const control = dom.createElement('input');
|
|
171
531
|
control.type = type;
|
|
172
532
|
control.required = true;
|
|
533
|
+
if (attribute !== undefined)
|
|
534
|
+
control.setAttribute(attribute, '');
|
|
535
|
+
Object.assign(wrapper.style, { display: 'flex', flexDirection: 'column', gap: '5px', margin: '5px 0', color: dshThemeColor.labelSecondary, fontSize: '12px', lineHeight: '1.4' });
|
|
536
|
+
Object.assign(control.style, { minHeight: '36px', boxSizing: 'border-box', color: dshThemeColor.labelPrimary, background: dshThemeColor.inputBackground, border: `1px solid ${dshThemeColor.border}`, borderRadius: '6px', padding: '7px 9px', fontSize: '13px' });
|
|
173
537
|
wrapper.append(control);
|
|
174
538
|
return { wrapper, input: control };
|
|
175
539
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
540
|
+
/**
|
|
541
|
+
* 工作区标签配色选择器。
|
|
542
|
+
*
|
|
543
|
+
* 提供一组预设色加一个原生取色器,并允许"默认"(清除自定义色,回到按名称推导)。
|
|
544
|
+
* 返回值始终是 `#rrggbb` 或 null,Host 侧还会再校验一次。
|
|
545
|
+
*/
|
|
546
|
+
function colorInput(dom, initial) {
|
|
547
|
+
const wrapper = dom.createElement('div');
|
|
548
|
+
Object.assign(wrapper.style, { display: 'flex', flexDirection: 'column', gap: '5px', margin: '5px 0', color: dshThemeColor.labelSecondary, fontSize: '12px', lineHeight: '1.4' });
|
|
549
|
+
const label = dom.createElement('span');
|
|
550
|
+
label.textContent = '工作区标签配色';
|
|
551
|
+
const row = dom.createElement('div');
|
|
552
|
+
Object.assign(row.style, { display: 'flex', alignItems: 'center', gap: '6px', flexWrap: 'wrap' });
|
|
553
|
+
const picker = dom.createElement('input');
|
|
554
|
+
picker.type = 'color';
|
|
555
|
+
picker.setAttribute('data-codingns-peer-host-color', '');
|
|
556
|
+
picker.value = resolvePeerHostColor(initial, '');
|
|
557
|
+
Object.assign(picker.style, { width: '36px', height: '30px', padding: '0', border: `1px solid ${dshThemeColor.border}`, borderRadius: '6px', background: dshThemeColor.inputBackground, cursor: 'pointer' });
|
|
558
|
+
const presetRow = dom.createElement('div');
|
|
559
|
+
Object.assign(presetRow.style, { display: 'flex', alignItems: 'center', gap: '4px' });
|
|
560
|
+
let selected = normalizePeerHostColor(initial);
|
|
561
|
+
const presetButtons = [];
|
|
562
|
+
for (const preset of PEER_HOST_COLOR_PRESETS) {
|
|
563
|
+
const button = actionButton(dom, '', () => {
|
|
564
|
+
selected = preset;
|
|
565
|
+
picker.value = preset;
|
|
566
|
+
syncPresets();
|
|
567
|
+
});
|
|
568
|
+
button.setAttribute('data-codingns-peer-host-color-preset', preset);
|
|
569
|
+
button.setAttribute('aria-label', `使用配色 ${preset}`);
|
|
570
|
+
button.title = preset;
|
|
571
|
+
Object.assign(button.style, { width: '18px', minWidth: '18px', height: '18px', minHeight: '18px', padding: '0', borderRadius: '999px', background: preset, border: `1px solid ${dshThemeColor.border}` });
|
|
572
|
+
presetButtons.push(button);
|
|
573
|
+
presetRow.append(button);
|
|
574
|
+
}
|
|
575
|
+
const reset = actionButton(dom, '默认', () => {
|
|
576
|
+
selected = null;
|
|
577
|
+
syncPresets();
|
|
578
|
+
});
|
|
579
|
+
reset.setAttribute('data-codingns-peer-host-color-reset', '');
|
|
580
|
+
Object.assign(reset.style, { minHeight: '24px', padding: '0 8px', fontSize: '11px' });
|
|
581
|
+
picker.addEventListener('input', () => {
|
|
582
|
+
selected = normalizePeerHostColor(picker.value);
|
|
583
|
+
syncPresets();
|
|
584
|
+
});
|
|
585
|
+
row.append(picker, presetRow, reset);
|
|
586
|
+
wrapper.append(label, row);
|
|
587
|
+
syncPresets();
|
|
588
|
+
return { wrapper, value: () => selected };
|
|
589
|
+
function syncPresets() {
|
|
590
|
+
for (const button of presetButtons) {
|
|
591
|
+
const preset = button.getAttribute('data-codingns-peer-host-color-preset');
|
|
592
|
+
const active = selected !== null && selected === preset;
|
|
593
|
+
button.style.outline = active ? `2px solid ${dshThemeColor.labelPrimary}` : 'none';
|
|
594
|
+
button.style.outlineOffset = '1px';
|
|
595
|
+
}
|
|
596
|
+
reset.style.borderColor = selected === null ? dshThemeColor.accent : dshThemeColor.border;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
function statusLabel(status) {
|
|
600
|
+
const labels = {
|
|
601
|
+
configured: '待测试', checking: '测试中', ready: '已连接', plugin_missing: '插件缺失',
|
|
602
|
+
version_mismatch: '版本不匹配', identity_changed: '身份已变化', session_required: '需要登录',
|
|
603
|
+
unreachable: '无法连接', reconnecting: '重连中', disabled: '已禁用',
|
|
604
|
+
};
|
|
605
|
+
return labels[status] ?? status;
|
|
606
|
+
}
|
|
607
|
+
/** 卡片色点用的最终颜色:显式配置优先,否则按名称推导。 */
|
|
608
|
+
function peerHostColor(record) {
|
|
609
|
+
return resolvePeerHostColor(record.color, record.displayName);
|
|
610
|
+
}
|
|
611
|
+
function formatBytes(value) {
|
|
612
|
+
if (value < 1024 ** 3)
|
|
613
|
+
return `${Math.round(value / 1024 ** 2)} MB`;
|
|
614
|
+
return `${(value / 1024 ** 3).toFixed(1)} GB`;
|
|
180
615
|
}
|
|
181
616
|
//# sourceMappingURL=peer-host-management-panel.js.map
|