@jingyi0605/codingns4dsh 0.2.0-beta.1 → 0.2.0-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 +29 -12
- package/README.md +22 -13
- package/assets/provider-icons/minimax-code.svg +4 -0
- package/assets/provider-icons/zcode.svg +14 -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 -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 +8 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -0
- package/data/build/dist/client/account-bar.js +166 -79
- package/data/build/dist/client/account-bar.js.map +1 -0
- package/data/build/dist/client/bundle.js +16641 -8889
- 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 +32 -13
- package/data/build/dist/client/cli-slots.js.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts +2 -1
- package/data/build/dist/client/debug/ui.d.ts.map +1 -0
- package/data/build/dist/client/debug/ui.js +40 -33
- package/data/build/dist/client/debug/ui.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts +16 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -0
- package/data/build/dist/client/delegate-command.js +138 -0
- package/data/build/dist/client/delegate-command.js.map +1 -0
- package/data/build/dist/client/delegate-plan.d.ts +31 -0
- package/data/build/dist/client/delegate-plan.d.ts.map +1 -0
- package/data/build/dist/client/delegate-plan.js +59 -0
- package/data/build/dist/client/delegate-plan.js.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts +40 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.js +363 -0
- package/data/build/dist/client/delegate-ui-dom.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 +12 -5
- 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 +44 -36
- package/data/build/dist/client/external-tool-stream.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts +7 -2
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
- package/data/build/dist/client/features/cli-adapters.js +59 -105
- 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 +6 -4
- 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 +8 -5
- package/data/build/dist/client/features/file-management.js.map +1 -0
- package/data/build/dist/client/features/index.d.ts +4 -2
- package/data/build/dist/client/features/index.d.ts.map +1 -0
- package/data/build/dist/client/features/index.js +5 -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 +89 -11
- 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 +35 -5
- 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 +9 -7
- 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 +3 -3
- 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 +79 -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 +599 -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 +3 -3
- package/data/build/dist/client/features/reverse-proxy.js.map +1 -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.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 +3 -3
- 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 +5 -2
- 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 +24 -6
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
- package/data/build/dist/client/file-management-dom.d.ts +5 -0
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
- package/data/build/dist/client/file-management-dom.js +78 -38
- 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 +2 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -0
- package/data/build/dist/client/git-management.js +284 -108
- 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/git-workspace-events.d.ts +7 -0
- package/data/build/dist/client/git-workspace-events.d.ts.map +1 -0
- package/data/build/dist/client/git-workspace-events.js +32 -0
- package/data/build/dist/client/git-workspace-events.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 +7 -4
- package/data/build/dist/client/index.d.ts.map +1 -0
- package/data/build/dist/client/index.js +16 -9
- 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 +7 -0
- package/data/build/dist/client/locale.d.ts.map +1 -0
- package/data/build/dist/client/locale.js +231 -47
- package/data/build/dist/client/locale.js.map +1 -0
- package/data/build/dist/client/locales/debug.d.ts +9 -0
- package/data/build/dist/client/locales/debug.d.ts.map +1 -0
- package/data/build/dist/client/locales/debug.js +163 -0
- package/data/build/dist/client/locales/debug.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.js +139 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -0
- package/data/build/dist/client/locales/git.d.ts +9 -0
- package/data/build/dist/client/locales/git.d.ts.map +1 -0
- package/data/build/dist/client/locales/git.js +223 -0
- package/data/build/dist/client/locales/git.js.map +1 -0
- package/data/build/dist/client/locales/panels.d.ts +9 -0
- package/data/build/dist/client/locales/panels.d.ts.map +1 -0
- package/data/build/dist/client/locales/panels.js +33 -0
- package/data/build/dist/client/locales/panels.js.map +1 -0
- package/data/build/dist/client/locales/peerHost.d.ts +9 -0
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHost.js +153 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js +69 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts +9 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.js +67 -0
- package/data/build/dist/client/locales/terminalAuth.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts +9 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -0
- package/data/build/dist/client/locales/usage.js +195 -0
- package/data/build/dist/client/locales/usage.js.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts +44 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.js +291 -0
- package/data/build/dist/client/mobile-session-interaction.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 +114 -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 +452 -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 +14 -1
- package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.js +18 -7
- 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 +4 -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 +533 -94
- package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts +47 -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 +142 -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 +5 -5
- 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 +52 -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 +492 -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 +4 -0
- package/data/build/dist/client/provider-icon-assets.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +18 -3
- package/data/build/dist/client/provider-icons.d.ts.map +1 -0
- package/data/build/dist/client/provider-icons.js +30 -14
- package/data/build/dist/client/provider-icons.js.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts +76 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.js +179 -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 +11 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.js +20 -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 +20 -8
- 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.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 +8 -1
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
- package/data/build/dist/client/session-changed-files-view.js +71 -28
- package/data/build/dist/client/session-changed-files-view.js.map +1 -0
- package/data/build/dist/client/settings-anchor.d.ts +73 -0
- package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
- package/data/build/dist/client/settings-anchor.js +70 -0
- package/data/build/dist/client/settings-anchor.js.map +1 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
- 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 +19 -5
- package/data/build/dist/client/settings-section.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +4 -1
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
- package/data/build/dist/client/subscription-slot.js +328 -69
- 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 +13 -2
- package/data/build/dist/client/terminal/model.d.ts.map +1 -0
- package/data/build/dist/client/terminal/model.js +27 -7
- 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 +3 -1
- package/data/build/dist/client/terminal/ui.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts +4 -1
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.js +19 -17
- 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 +17 -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 +192 -47
- 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 +3 -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 +3 -1
- 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 +3 -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 +46 -17
- 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.map +1 -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 +10 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +20 -0
- 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.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.map +1 -0
- 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.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 -31
- 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.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.js +96 -11
- 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.map +1 -0
- 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/browser-text.d.ts +30 -0
- package/data/build/dist/host/browser-text.d.ts.map +1 -0
- package/data/build/dist/host/browser-text.js +105 -0
- package/data/build/dist/host/browser-text.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 +28 -2
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +78 -5
- 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 +22 -9
- 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 +10 -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 +352 -49
- 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 +296 -34
- 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/delegate-dispatch.d.ts +47 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +158 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +121 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.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 +5 -4
- 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/dsh-virtual-providers.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +73 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.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 +348 -19
- 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 +27 -8
- 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 +27 -9
- 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 +22 -6
- 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 +118 -21
- 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 +33 -7
- 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 +11 -2
- 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 +15 -6
- 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/mcode-catalog.d.ts +23 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js +120 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts +56 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js +544 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +30 -5
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js +83 -8
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +51 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +193 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js.map +1 -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 +18 -15
- package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +107 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.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 +20 -4
- 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 +30 -8
- 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 +8 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js +98 -2
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js +9 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.js +37 -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 +6 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.js +42 -4
- 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 +2 -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 +30 -4
- 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/subagent-tool.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js +66 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.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/cli-adapters/zcode-driver.d.ts +57 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js +843 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts +28 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js +212 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +27 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js +51 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +34 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js +135 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts +25 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js +60 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts +19 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.js +90 -0
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.js +131 -0
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +8 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +151 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.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 +97 -10
- 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 +34 -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 +341 -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 +3 -0
- 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 +15 -0
- package/data/build/dist/host/index-injection.d.ts.map +1 -0
- package/data/build/dist/host/index-injection.js +45 -0
- package/data/build/dist/host/index-injection.js.map +1 -0
- package/data/build/dist/host/index.d.ts +12 -2
- package/data/build/dist/host/index.d.ts.map +1 -0
- package/data/build/dist/host/index.js +75 -3
- package/data/build/dist/host/index.js.map +1 -0
- package/data/build/dist/host/lan-access-dsh.d.ts +93 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/lan-access-dsh.js +438 -27
- package/data/build/dist/host/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/login-attempt-guard.d.ts +55 -0
- package/data/build/dist/host/login-attempt-guard.d.ts.map +1 -0
- package/data/build/dist/host/login-attempt-guard.js +201 -0
- package/data/build/dist/host/login-attempt-guard.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 +25 -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 +26 -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 +10 -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 +27 -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 +187 -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 +30 -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 +120 -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 +60 -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 +181 -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 +50 -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 +182 -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 +17 -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 +82 -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.map +1 -0
- package/data/build/dist/host/native-session-bridge.js +86 -55
- 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 +71 -19
- 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.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.map +1 -0
- package/data/build/dist/host/rpc.js +21 -6
- 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.map +1 -0
- package/data/build/dist/host/settings.d.ts.map +1 -0
- package/data/build/dist/host/settings.js +33 -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.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 +35 -0
- 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 +89 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/config.js +92 -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 +160 -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 +15 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
- 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 -6
- package/data/build/dist/shared/index.d.ts.map +1 -0
- package/data/build/dist/shared/index.js +3 -3
- package/data/build/dist/shared/index.js.map +1 -0
- package/data/build/dist/transport/carrier.d.ts.map +1 -0
- package/data/build/dist/transport/carrier.js.map +1 -0
- package/data/build/dist/transport/debug.d.ts.map +1 -0
- package/data/build/dist/transport/debug.js +2 -0
- 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.map +1 -0
- 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 +1 -1
- package/data/build/dist/transport/index.d.ts.map +1 -0
- package/data/build/dist/transport/index.js +1 -1
- 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 +36 -19
- package/profile/README.md +18 -5
- package/profile/package.json +3 -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,16 +1,35 @@
|
|
|
1
1
|
import { createElement, useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
2
|
+
import { buildHistoryGraph, GRAPH_DASH_ARRAY, GRAPH_LANE_WIDTH, GRAPH_ROW_HEIGHT, laneCenterX, laneColor, laneStroke, laneDashed, isUnpushed, segmentStroke } from './git-history-graph.js';
|
|
2
3
|
import { CODINGNS_RPC_CHANNEL } from '../shared/contracts/transport.js';
|
|
4
|
+
import { backdropPointerDownHandler, useDismissOnOutsidePointer } from './popup-dismiss.js';
|
|
3
5
|
import { debugWarn } from '../shared/debug.js';
|
|
4
6
|
import { dshSettingsToastStyle, dshThemeColor } from './theme.js';
|
|
7
|
+
import { gitPanelClass, installGitPanelStyles } from './git-panel-styles.js';
|
|
8
|
+
import { resolveCodingNsTranslator } from './locale.js';
|
|
9
|
+
import { notifyGitWorkspaceChanged } from './git-workspace-events.js';
|
|
10
|
+
// 单列 Git 视图需要一个稳定的分段控件;这里保持 React 结构简单,避免引入额外依赖。
|
|
11
|
+
function SegmentedControl({ id, value, options, onChange, label, disabled }) {
|
|
12
|
+
const index = Math.max(0, options.findIndex((option) => option.value === value));
|
|
13
|
+
return createElement('div', { role: 'tablist', 'aria-label': label, className: gitPanelClass.segmented, style: { '--dsh-segment-count': options.length, '--dsh-segment-index': index } }, createElement('span', { 'aria-hidden': 'true', className: gitPanelClass.segmentedIndicator }), ...options.map((option) => createElement('button', {
|
|
14
|
+
key: option.value, type: 'button', role: 'tab', id: `${id}-${option.value}`, 'aria-selected': option.value === value,
|
|
15
|
+
tabIndex: option.value === value ? 0 : -1, disabled: disabled === true || option.disabled === true,
|
|
16
|
+
className: gitPanelClass.segment, title: option.title, onClick: () => onChange(option.value),
|
|
17
|
+
}, option.label)));
|
|
18
|
+
}
|
|
5
19
|
export const GIT_PROVIDER_ID = 'codingns4dsh/git';
|
|
6
20
|
export const GIT_KIND = 'git';
|
|
7
21
|
const INITIAL_HISTORY_LIMIT = 50;
|
|
8
22
|
const HISTORY_PAGE_SIZE = 100;
|
|
9
23
|
/** 兼容早期调用方使用的面板标识;实际注册已迁移到右侧 Sidebar。 */
|
|
10
24
|
export const GIT_PANEL_ID = GIT_PROVIDER_ID;
|
|
25
|
+
function gitOperationLabel(operation, t) {
|
|
26
|
+
return operation === 'fetch' ? t('git.opFetch') : operation === 'pull' ? t('git.opPull') : operation === 'push' ? t('git.opPush') : operation === 'undo' ? t('git.opUndo') : t('git.refresh');
|
|
27
|
+
}
|
|
11
28
|
/** 注册 DSH 右侧 Sidebar 的 Git 标签类型,数据按 Workspace 复用。 */
|
|
12
29
|
export function registerGitManagementUi(ctx, services) {
|
|
30
|
+
const t = resolveCodingNsTranslator(services.locale);
|
|
13
31
|
const disposers = [];
|
|
32
|
+
disposers.push(installGitPanelStyles());
|
|
14
33
|
const sidebarRight = ctx.sidebarRight;
|
|
15
34
|
try {
|
|
16
35
|
disposers.push(ctx.sidebarRightTabs.register({
|
|
@@ -18,15 +37,16 @@ export function registerGitManagementUi(ctx, services) {
|
|
|
18
37
|
kind: GIT_KIND,
|
|
19
38
|
multiple: false,
|
|
20
39
|
priority: 'extension',
|
|
21
|
-
title: () => '
|
|
22
|
-
guide: [{ id: 'git', order: 40, title: () => '
|
|
40
|
+
title: () => t('git.tabTitle'),
|
|
41
|
+
guide: [{ id: 'git', order: 40, title: () => t('git.tabTitle'), description: () => t('git.guideDescription'), icon: createGitPanelIcon(t) }],
|
|
23
42
|
}));
|
|
24
43
|
disposers.push(ctx.slots.inject('sidebar.right.pane.tab', () => ctx.slots.register({
|
|
25
44
|
name: 'sidebar.right.pane.tab', key: GIT_PROVIDER_ID,
|
|
26
|
-
inject: () => ({ rpc: services.rpc, remote: services.remote }),
|
|
45
|
+
inject: () => ({ rpc: services.rpc, remote: services.remote, t }),
|
|
27
46
|
}, GitPanel)));
|
|
28
47
|
disposers.push(ctx.slots.inject('sidebar.right.pane.tab.title', () => ctx.slots.register({
|
|
29
48
|
name: 'sidebar.right.pane.tab.title', key: GIT_PROVIDER_ID,
|
|
49
|
+
inject: () => ({ t }),
|
|
30
50
|
}, GitTabTitle)));
|
|
31
51
|
disposers.push(ctx.slots.inject('shell.overlay', () => ctx.slots.register({
|
|
32
52
|
name: 'shell.overlay', id: 'codingns4dsh-git-workspace-recovery', order: 990,
|
|
@@ -51,17 +71,20 @@ export function registerGitManagementUi(ctx, services) {
|
|
|
51
71
|
function isDuplicateGitRegistration(error) {
|
|
52
72
|
return error instanceof Error && /sidebarRight: (?:tab type id|tab kind) .* already registered/u.test(error.message);
|
|
53
73
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
74
|
+
function createGitPanelIcon(t) {
|
|
75
|
+
return function GitPanelIcon({ size = 16 }) {
|
|
76
|
+
return createElement('span', {
|
|
77
|
+
title: t('git.panelLabel'), 'aria-label': t('git.panelLabel'), style: { display: 'inline-flex', width: size, height: size, alignItems: 'center', justifyContent: 'center', color: dshThemeColor.labelSecondary, fontSize: Math.max(12, size - 2), fontWeight: 700 },
|
|
78
|
+
}, '⑂');
|
|
79
|
+
};
|
|
58
80
|
}
|
|
59
|
-
function GitTabTitle({ useTabInfo }) {
|
|
81
|
+
function GitTabTitle({ useTabInfo, t }) {
|
|
60
82
|
useTabInfo();
|
|
61
|
-
return createElement('span', { title: '
|
|
83
|
+
return createElement('span', { title: t('git.panelLabel'), 'aria-label': t('git.panelLabel'), style: tabTitleStyle }, t('git.tabTitle'));
|
|
62
84
|
}
|
|
63
85
|
function GitPanel(props) {
|
|
64
86
|
const sessionId = String(props.sessionId);
|
|
87
|
+
const t = props.t;
|
|
65
88
|
const tabInfo = props.useTabInfo();
|
|
66
89
|
const [workspaceId, setWorkspaceId] = useState();
|
|
67
90
|
const [status, setStatus] = useState(null);
|
|
@@ -69,11 +92,13 @@ function GitPanel(props) {
|
|
|
69
92
|
const [branches, setBranches] = useState(null);
|
|
70
93
|
const [subject, setSubject] = useState('');
|
|
71
94
|
const [busy, setBusy] = useState(false);
|
|
95
|
+
const [activeOperation, setActiveOperation] = useState(null);
|
|
72
96
|
const [toast, setToast] = useState(null);
|
|
73
97
|
const [diffView, setDiffView] = useState(null);
|
|
74
98
|
const [fileDiff, setFileDiff] = useState(null);
|
|
75
99
|
const [singleColumn, setSingleColumn] = useState(false);
|
|
76
100
|
const [activeColumn, setActiveColumn] = useState('files');
|
|
101
|
+
const [historyScope, setHistoryScope] = useState('all');
|
|
77
102
|
const [historyTotalCount, setHistoryTotalCount] = useState(0);
|
|
78
103
|
const [historyLoadingMore, setHistoryLoadingMore] = useState(false);
|
|
79
104
|
const contentGridRef = useRef(null);
|
|
@@ -140,7 +165,7 @@ function GitPanel(props) {
|
|
|
140
165
|
return;
|
|
141
166
|
}
|
|
142
167
|
const [nextHistory, nextBranches] = await Promise.all([
|
|
143
|
-
historyExpanded.current ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: resolvedWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0 }),
|
|
168
|
+
historyExpanded.current ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: resolvedWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0, scope: historyScope }),
|
|
144
169
|
call(props.rpc, 'git/branches', { workspaceId: resolvedWorkspaceId }),
|
|
145
170
|
]);
|
|
146
171
|
if (disposed)
|
|
@@ -153,7 +178,6 @@ function GitPanel(props) {
|
|
|
153
178
|
}
|
|
154
179
|
setStatus(nextStatus);
|
|
155
180
|
setBranches(normalizedBranches);
|
|
156
|
-
setToast(null);
|
|
157
181
|
}
|
|
158
182
|
catch (error) {
|
|
159
183
|
if (!disposed)
|
|
@@ -164,7 +188,7 @@ function GitPanel(props) {
|
|
|
164
188
|
if (disposed)
|
|
165
189
|
return;
|
|
166
190
|
if (resolvedWorkspaceId === undefined) {
|
|
167
|
-
notify('error', '
|
|
191
|
+
notify('error', t('git.noWorkspace'));
|
|
168
192
|
return;
|
|
169
193
|
}
|
|
170
194
|
rememberGitWorkspaceSession(sessionId, resolvedWorkspaceId);
|
|
@@ -176,7 +200,7 @@ function GitPanel(props) {
|
|
|
176
200
|
}).catch((error) => { if (!disposed)
|
|
177
201
|
notify('error', error instanceof Error ? error.message : String(error)); });
|
|
178
202
|
return () => { disposed = true; cleanupTimer?.(); };
|
|
179
|
-
}, [props.remote, props.rpc, sessionId]);
|
|
203
|
+
}, [props.remote, props.rpc, sessionId, historyScope]);
|
|
180
204
|
useEffect(() => {
|
|
181
205
|
const close = () => {
|
|
182
206
|
if (!tabInfo.tab.signal.aborted)
|
|
@@ -191,26 +215,33 @@ function GitPanel(props) {
|
|
|
191
215
|
tabInfo.tab.signal.addEventListener('abort', close, { once: true });
|
|
192
216
|
return () => tabInfo.tab.signal.removeEventListener('abort', close);
|
|
193
217
|
}, [sessionId, tabInfo.tab.signal]);
|
|
194
|
-
const run = async (action, payload, onSuccess) => {
|
|
195
|
-
setBusy(true);
|
|
196
|
-
setToast(null);
|
|
218
|
+
const run = async (action, payload, onSuccess, operation) => {
|
|
197
219
|
if (workspaceId === undefined) {
|
|
198
|
-
notify('error', '
|
|
199
|
-
setBusy(false);
|
|
220
|
+
notify('error', t('git.noWorkspace'));
|
|
200
221
|
return;
|
|
201
222
|
}
|
|
223
|
+
setBusy(true);
|
|
224
|
+
if (operation !== undefined) {
|
|
225
|
+
setActiveOperation(operation);
|
|
226
|
+
setToast({ kind: 'info', message: t('git.operationRunning', { operation: gitOperationLabel(operation, t) }) });
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
setToast(null);
|
|
230
|
+
}
|
|
202
231
|
const targetWorkspaceId = workspaceId;
|
|
203
232
|
const preserveExpandedHistory = action === 'git/status' && historyExpanded.current;
|
|
204
233
|
if (!preserveExpandedHistory)
|
|
205
234
|
historyExpanded.current = false;
|
|
206
235
|
try {
|
|
207
236
|
const value = await call(props.rpc, action, { workspaceId: targetWorkspaceId, ...payload });
|
|
237
|
+
if (action !== 'git/status')
|
|
238
|
+
notifyGitWorkspaceChanged(targetWorkspaceId);
|
|
208
239
|
onSuccess?.(value);
|
|
209
240
|
const nextStatus = await call(props.rpc, 'git/status', { workspaceId: targetWorkspaceId });
|
|
210
241
|
setStatus(nextStatus);
|
|
211
242
|
if (nextStatus.snapshot.enabled !== false) {
|
|
212
243
|
const [nextHistory, nextBranches] = await Promise.all([
|
|
213
|
-
preserveExpandedHistory ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: targetWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0 }),
|
|
244
|
+
preserveExpandedHistory ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: targetWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0, scope: historyScope }),
|
|
214
245
|
call(props.rpc, 'git/branches', { workspaceId: targetWorkspaceId }),
|
|
215
246
|
]);
|
|
216
247
|
const normalizedBranches = normalizeBranchSnapshot(nextBranches);
|
|
@@ -227,34 +258,37 @@ function GitPanel(props) {
|
|
|
227
258
|
setBranches(null);
|
|
228
259
|
writeCache(targetWorkspaceId, { status: nextStatus, history: [], historyTotalCount: 0, branches: null });
|
|
229
260
|
}
|
|
230
|
-
notify('success', '
|
|
261
|
+
notify('success', operation === undefined ? t('git.operationCompleted') : t('git.operationDone', { operation: gitOperationLabel(operation, t) }));
|
|
231
262
|
}
|
|
232
263
|
catch (error) {
|
|
233
264
|
notify('error', error instanceof Error ? error.message : String(error));
|
|
234
265
|
}
|
|
235
266
|
finally {
|
|
236
267
|
setBusy(false);
|
|
268
|
+
if (operation !== undefined) {
|
|
269
|
+
setActiveOperation(null);
|
|
270
|
+
}
|
|
237
271
|
}
|
|
238
272
|
};
|
|
239
273
|
const commit = () => {
|
|
240
274
|
const value = subject.trim();
|
|
241
275
|
if (!value) {
|
|
242
|
-
notify('error', '
|
|
276
|
+
notify('error', t('git.commitMessageRequired'));
|
|
243
277
|
return;
|
|
244
278
|
}
|
|
245
279
|
void run('git/commit', { subject: value }, () => setSubject(''));
|
|
246
280
|
};
|
|
247
281
|
const copyCommitHash = (commitHash) => {
|
|
248
|
-
void copyText(commitHash).then((copied) => notify(copied ? 'success' : 'error', copied ? '
|
|
282
|
+
void copyText(commitHash).then((copied) => notify(copied ? 'success' : 'error', copied ? t('git.commitHashCopied') : t('git.copyUnsupported')));
|
|
249
283
|
};
|
|
250
284
|
const copyCommitMessage = (value) => {
|
|
251
|
-
void copyText(value).then((copied) => notify(copied ? 'success' : 'error', copied ? '
|
|
285
|
+
void copyText(value).then((copied) => notify(copied ? 'success' : 'error', copied ? t('git.commitMessageCopied') : t('git.copyUnsupported')));
|
|
252
286
|
};
|
|
253
287
|
const openCommitDiff = (commitHash) => {
|
|
254
288
|
if (workspaceId === undefined)
|
|
255
289
|
return;
|
|
256
290
|
setBusy(true);
|
|
257
|
-
notify('info', '
|
|
291
|
+
notify('info', t('git.readingCommitDiff'));
|
|
258
292
|
void call(props.rpc, 'git/commit-diff', { workspaceId, commitHash }).then((value) => {
|
|
259
293
|
setDiffView(value);
|
|
260
294
|
setToast(null);
|
|
@@ -264,7 +298,7 @@ function GitPanel(props) {
|
|
|
264
298
|
if (workspaceId === undefined)
|
|
265
299
|
return;
|
|
266
300
|
setBusy(true);
|
|
267
|
-
notify('info', '
|
|
301
|
+
notify('info', t('git.readingFileDiff'));
|
|
268
302
|
void call(props.rpc, 'git/diff', { workspaceId, path, staged }).then((value) => {
|
|
269
303
|
setFileDiff({ path, staged, diff: value });
|
|
270
304
|
setToast(null);
|
|
@@ -275,7 +309,7 @@ function GitPanel(props) {
|
|
|
275
309
|
return;
|
|
276
310
|
setHistoryLoadingMore(true);
|
|
277
311
|
historyExpanded.current = true;
|
|
278
|
-
void call(props.rpc, 'git/history', { workspaceId, limit: HISTORY_PAGE_SIZE, offset: history.length }).then((page) => {
|
|
312
|
+
void call(props.rpc, 'git/history', { workspaceId, limit: HISTORY_PAGE_SIZE, offset: history.length, scope: historyScope }).then((page) => {
|
|
279
313
|
setHistory((current) => [...current, ...page.items.filter((item) => !current.some((existing) => existing.commitHash === item.commitHash))]);
|
|
280
314
|
setHistoryTotalCount(page.totalCount);
|
|
281
315
|
}).catch((error) => { historyExpanded.current = history.length > INITIAL_HISTORY_LIMIT; notify('error', error instanceof Error ? error.message : String(error)); }).finally(() => setHistoryLoadingMore(false));
|
|
@@ -285,48 +319,64 @@ function GitPanel(props) {
|
|
|
285
319
|
const unstaged = changes.filter((item) => hasUnstagedChanges(item));
|
|
286
320
|
const runGitOperation = (action) => {
|
|
287
321
|
if (action === 'refresh') {
|
|
288
|
-
void run('git/status', {}, (value) => setStatus(value));
|
|
322
|
+
void run('git/status', {}, (value) => setStatus(value), action);
|
|
289
323
|
return;
|
|
290
324
|
}
|
|
291
|
-
void run(`git/${action}`, {});
|
|
325
|
+
void run(`git/${action}`, {}, undefined, action);
|
|
292
326
|
};
|
|
293
327
|
const stageAll = () => { void run('git/stage', { targets: unstaged.map((item) => item.path) }); };
|
|
294
328
|
const discardAll = () => { void run('git/discard', { targets: changes.map((item) => item.path) }); };
|
|
295
|
-
return createElement('section', { style: panelStyle, 'data-git-management-panel': 'true' },
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
|
|
329
|
+
return createElement('section', { style: panelStyle, 'data-git-management-panel': 'true' },
|
|
330
|
+
// 面板标题已由 Sidebar 标签页渲染,这里不再重复;只保留视图切换与操作菜单。
|
|
331
|
+
createElement('header', { style: headerStyle }, singleColumn ? createElement('div', { style: columnSwitchStyle }, createElement((SegmentedControl), {
|
|
332
|
+
id: 'codingns4dsh-git-view', value: activeColumn, onChange: setActiveColumn, label: t('git.viewSwitcherLabel'),
|
|
333
|
+
options: [
|
|
334
|
+
{ value: 'files', label: t('git.switchToFiles'), title: t('git.switchToFiles') },
|
|
335
|
+
{ value: 'history', label: t('git.switchToHistory'), title: t('git.switchToHistory') },
|
|
336
|
+
],
|
|
337
|
+
})) : null, createElement('div', { style: headerActionsStyle }, createElement(GitOperationsMenu, { busy, activeOperation, hasRemote: Boolean(status?.snapshot.hasRemote || branches?.remote.length), canUndo: history.length > 0, hasMoreVersions: history.length < historyTotalCount, stagedCount: staged.length, unstagedCount: unstaged.length, onStageAll: stageAll, onDiscardAll: discardAll, onLoadMore: loadMoreHistory, onOperation: runGitOperation, t }))), toast === null ? null : createElement('div', { role: toast.kind === 'error' ? 'alert' : 'status', 'aria-live': 'polite', style: { ...dshSettingsToastStyle, position: 'absolute', top: 8, right: 'auto', left: '50%', transform: 'translateX(-50%)', width: 'min(300px, calc(100% - 24px))', pointerEvents: 'none', borderColor: toast.kind === 'error' ? dshThemeColor.error : toast.kind === 'success' ? dshThemeColor.success : dshThemeColor.border } }, toast.message), status === null ? createElement('div', { style: emptyStyle }, t('git.readingStatus')) : null, status !== null && status.snapshot.enabled === false ? createElement('section', { style: sectionStyle }, createElement('strong', undefined, t('git.noRepository')), createElement('div', { style: mutedStyle }, t('git.initHint')), createElement('button', { type: 'button', disabled: busy, onClick: () => void run('git/init', {}), className: `${gitPanelClass.button} ${gitPanelClass.buttonPrimary}`, style: primaryButtonStyle }, t('git.init'))) : null, status !== null ? createElement('div', { style: summaryStyle }, t('git.summary', { staged: staged.length, unstaged: unstaged.length, total: historyTotalCount, scope: historyScope === 'all' ? t('git.allBranches') : t('git.currentBranch') })) : null, diffView !== null ? createElement(DiffViewer, { diff: diffView, onClose: () => setDiffView(null), t }) : null, fileDiff !== null ? createElement(FileDiffViewer, { path: fileDiff.path, staged: fileDiff.staged, diff: fileDiff.diff, onClose: () => setFileDiff(null), t }) : null, status !== null && status.snapshot.enabled !== false ? createElement('div', { ref: contentGridRef, style: contentGridStyle }, singleColumn && activeColumn !== 'files' ? null : createElement('div', { style: columnStyle }, createElement('section', { style: commitSectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, t('git.commitChanges')), createElement('span', { style: mutedStyle }, staged.length === 0 ? t('git.stagingEmpty') : t('git.stagedCount', { count: staged.length }))), createElement('div', { style: commitEditorRowStyle }, createElement('textarea', { value: subject, disabled: busy || workspaceId === undefined, className: gitPanelClass.field, onChange: (event) => setSubject(event.currentTarget.value), onKeyDown: (event) => { if (event.key === 'Enter')
|
|
338
|
+
event.preventDefault(); }, placeholder: t('git.commitPlaceholder'), rows: 1, style: commitSubjectStyle }), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => notify('info', t('git.draftUnavailable')), className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: draftButtonStyle, title: t('git.draftMessage'), 'aria-label': t('git.draftMessage') }, '✦')), createElement('div', { style: commitActionsStyle }, createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => void run('git/status', {}, (value) => setStatus(value)), className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: refreshActionStyle }, t('git.refresh')), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined || staged.length === 0 || subject.trim().length === 0, onClick: commit, className: `${gitPanelClass.button} ${gitPanelClass.buttonPrimary}`, style: submitActionStyle }, t('git.commit')))), staged.length > 0 ? createElement(ChangeSection, { title: t('git.stagedFiles'), staged: true, items: staged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/unstage', { targets: staged.map((item) => item.path) }), t }) : null, unstaged.length > 0 ? createElement(ChangeSection, { title: t('git.unstagedFiles'), staged: false, items: unstaged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/stage', { targets: unstaged.map((item) => item.path) }), t }) : null), singleColumn && activeColumn !== 'history' ? null : createElement('div', { style: columnStyle }, createElement(HistorySection, { history, totalCount: historyTotalCount, hasMore: history.length < historyTotalCount, loadingMore: historyLoadingMore, onLoadMore: loadMoreHistory, branches, busy, scope: historyScope, hasRemote: Boolean(status?.snapshot.hasRemote || branches?.remote.length), onScopeChange: setHistoryScope, onSwitch: (branchName) => void run('git/switch', { branchName, create: false }, (value) => setBranches(normalizeBranchSnapshot(value))), onCopy: copyCommitHash, onCopyMessage: copyCommitMessage, onViewDiff: openCommitDiff, onUndo: () => runGitOperation('undo'), t }))) : null);
|
|
339
|
+
}
|
|
340
|
+
function ChangeSection({ title, staged, items, busy, onOpenDiff, onAction, onBatchAction, onBulkAction, t }) {
|
|
299
341
|
const [hoveredPath, setHoveredPath] = useState(null);
|
|
300
342
|
const nodes = buildChangeTree(items);
|
|
301
|
-
const staged = title === '暂存文件';
|
|
302
343
|
const renderNode = (node, depth) => {
|
|
303
344
|
if (node.kind === 'directory') {
|
|
304
345
|
const directoryKey = `dir:${node.path}`;
|
|
305
346
|
const directoryTargets = collectTreeTargets(node);
|
|
306
347
|
const isHovered = hoveredPath === directoryKey;
|
|
307
|
-
return createElement('details', { key: `dir:${node.path}`, open: true, style: treeDirectoryStyle }, createElement('summary', { style: { ...treeRowStyle, paddingLeft: 8 + depth * 14 }, onMouseEnter: () => setHoveredPath(directoryKey), onMouseLeave: () => setHoveredPath(null) }, createElement('span', { style: treeChevronStyle }, '⌄'), createElement('span', { style: folderIconStyle }, '▰'), createElement('span', { style: fileNameStyle, title: node.path }, node.name), createElement('span', { style: mutedStyle }, countTreeFiles(node)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction(staged ? 'unstage' : 'stage', directoryTargets); }, style:
|
|
348
|
+
return createElement('details', { key: `dir:${node.path}`, open: true, style: treeDirectoryStyle }, createElement('summary', { className: gitPanelClass.row, style: { ...treeRowStyle, paddingLeft: 8 + depth * 14 }, onMouseEnter: () => setHoveredPath(directoryKey), onMouseLeave: () => setHoveredPath(null) }, createElement('span', { style: treeChevronStyle }, '⌄'), createElement('span', { style: folderIconStyle }, '▰'), createElement('span', { style: fileNameStyle, title: node.path }, node.name), createElement('span', { style: mutedStyle }, countTreeFiles(node)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction(staged ? 'unstage' : 'stage', directoryTargets); }, className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageDirectory') : t('git.stageDirectory'), 'aria-label': staged ? t('git.unstageDirectory') : t('git.stageDirectory') }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction('discard', directoryTargets); }, className: `${gitPanelClass.action} ${gitPanelClass.actionDanger}`, style: iconActionStyle, title: t('git.discardDirectory'), 'aria-label': t('git.discardDirectory') }, '×') : null) : null), createElement('div', undefined, ...node.children.map((child) => renderNode(child, depth + 1))));
|
|
308
349
|
}
|
|
309
350
|
const isHovered = hoveredPath === node.path;
|
|
310
|
-
return createElement('div', { key: `file:${node.path}`, style: { ...treeRowStyle, paddingLeft: 28 + depth * 14 }, onMouseEnter: () => setHoveredPath(node.path), onMouseLeave: () => setHoveredPath(null), onDoubleClick: () => onOpenDiff(node.path, staged) }, createElement('span', { style: fileIconStyle }, fileIcon(node.name)), createElement('span', { title: node.path, style: fileNameStyle }, node.name), createElement('span', { style: fileStatusStyle }, changeStatus(node.item, staged)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: () => onAction(staged ? 'unstage' : 'stage', node.path), style:
|
|
351
|
+
return createElement('div', { key: `file:${node.path}`, className: gitPanelClass.row, style: { ...treeRowStyle, paddingLeft: 28 + depth * 14 }, onMouseEnter: () => setHoveredPath(node.path), onMouseLeave: () => setHoveredPath(null), onDoubleClick: () => onOpenDiff(node.path, staged) }, createElement('span', { style: fileIconStyle }, fileIcon(node.name)), createElement('span', { title: node.path, style: fileNameStyle }, node.name), createElement('span', { style: fileStatusStyle }, changeStatus(node.item, staged)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: () => onAction(staged ? 'unstage' : 'stage', node.path), className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageFile') : t('git.stageFile'), 'aria-label': staged ? t('git.unstageFile') : t('git.stageFile') }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: () => onAction('discard', node.path), className: `${gitPanelClass.action} ${gitPanelClass.actionDanger}`, style: iconActionStyle, title: t('git.discardFile'), 'aria-label': t('git.discardFile') }, '×') : null) : null);
|
|
311
352
|
};
|
|
312
|
-
return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `${title} (${items.length})`), createElement('button', { type: 'button', disabled: busy, onClick: onBulkAction, style:
|
|
313
|
-
}
|
|
314
|
-
function GitOperationsMenu({ busy, hasRemote, canUndo, hasMoreVersions, stagedCount, unstagedCount, onStageAll, onDiscardAll, onLoadMore, onOperation }) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
353
|
+
return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `${title} (${items.length})`), createElement('button', { type: 'button', disabled: busy, onClick: onBulkAction, className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageAll') : t('git.addAllToStaging'), 'aria-label': staged ? t('git.unstageAll') : t('git.addAllToStaging') }, staged ? '↶' : '+')), createElement('div', { style: treeStyle }, ...nodes.map((node) => renderNode(node, 0))));
|
|
354
|
+
}
|
|
355
|
+
function GitOperationsMenu({ busy, activeOperation, hasRemote, canUndo, hasMoreVersions, stagedCount, unstagedCount, onStageAll, onDiscardAll, onLoadMore, onOperation, t }) {
|
|
356
|
+
const [open, setOpen] = useState(false);
|
|
357
|
+
const rootRef = useRef(null);
|
|
358
|
+
useDismissOnOutsidePointer(rootRef, open, () => setOpen(false));
|
|
359
|
+
// 菜单项统一在点击后收起;关闭动作与具体操作解耦,避免每个按钮各写一次。
|
|
360
|
+
const run = (action) => () => { setOpen(false); action(); };
|
|
361
|
+
const operationText = activeOperation === null ? null : t('git.operationInProgress', { operation: gitOperationLabel(activeOperation, t) });
|
|
362
|
+
const operationBadge = operationText === null ? null : createElement('span', { role: 'status', 'aria-live': 'polite', style: operationStatusStyle }, createElement('span', { className: gitPanelClass.progress, 'aria-hidden': 'true' }, '⟳'), operationText);
|
|
363
|
+
return createElement('div', { ref: rootRef, style: menuStyle }, operationBadge, createElement('button', { type: 'button', disabled: busy, className: gitPanelClass.menuTrigger, style: iconActionStyle, title: t('git.operationsMenu'), 'aria-label': t('git.operationsMenu'), 'aria-haspopup': 'menu', 'aria-expanded': open, onClick: () => setOpen((value) => !value) }, '⋯'), open && createElement('div', { role: 'menu', 'aria-label': t('git.operationsMenu'), className: gitPanelClass.menu, style: menuPopupStyle }, createElement('button', { type: 'button', role: 'menuitem', disabled: busy || unstagedCount === 0, onClick: run(onStageAll), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.stageAll')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || stagedCount + unstagedCount === 0, onClick: run(onDiscardAll), className: `${gitPanelClass.menuItem} ${gitPanelClass.menuItemDanger}`, style: menuItemStyle }, t('git.discardAllChanges')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, onClick: run(() => onOperation('fetch')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.opFetch')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, 'aria-busy': activeOperation === 'pull', onClick: run(() => onOperation('pull')), className: gitPanelClass.menuItem, style: menuItemStyle }, activeOperation === 'pull' ? t('git.pullRunning') : t('git.opPull')),
|
|
364
|
+
// 工作区有未提交改动不影响已提交对象的 Push;Git Push 只发送提交记录。
|
|
365
|
+
createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, 'aria-busy': activeOperation === 'push', onClick: run(() => onOperation('push')), className: gitPanelClass.menuItem, style: menuItemStyle }, activeOperation === 'push' ? t('git.pushRunning') : t('git.opPush')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasMoreVersions, onClick: run(onLoadMore), className: gitPanelClass.menuItem, style: menuItemStyle, title: t('git.viewAllVersions') }, t('git.loadMoreVersions')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !canUndo, onClick: run(() => onOperation('undo')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.undoLastCommit')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy, onClick: run(() => onOperation('refresh')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.refresh'))));
|
|
366
|
+
}
|
|
367
|
+
function DiffViewer({ diff, onClose, t }) {
|
|
318
368
|
const providedFiles = diff.files ?? [];
|
|
319
369
|
const files = providedFiles.length > 0 ? providedFiles : parseDiffFiles(diff.content);
|
|
320
|
-
return createElement('div', { style: diffOverlayStyle }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': '
|
|
370
|
+
return createElement('div', { style: diffOverlayStyle, onPointerDown: backdropPointerDownHandler(onClose) }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': t('git.commitDiff'), style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, t('git.commitDiffTitle', { hash: diff.commitHash.slice(0, 8) })), createElement('button', { type: 'button', onClick: onClose, className: gitPanelClass.action, style: iconActionStyle, title: t('git.closeDiff'), 'aria-label': t('git.closeDiff') }, '×')), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffFilesSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, t('git.changedFiles')), createElement('span', { style: diffCountStyle }, String(files.length))), files.length === 0 ? createElement('div', { style: diffEmptyStyle }, t('git.noFileChanges')) : createElement('div', { style: diffFileListStyle }, ...files.map((file) => createElement('div', { key: `${file.status}:${file.oldPath ?? ''}:${file.path}`, style: diffFileRowStyle }, createElement('span', { style: diffFileStatusStyle, 'data-status': file.status }, diffFileStatusLabel(file.status, t)), createElement('div', { style: diffFileNameStyle }, createElement('strong', undefined, file.path), file.oldPath ? createElement('span', { style: diffFileOldPathStyle }, t('git.originalPath', { path: file.oldPath })) : null), file.binary ? createElement('span', { style: diffBinaryStyle }, t('git.binary')) : null)))), createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, 'Diff'), diff.truncated ? createElement('span', { style: diffTruncatedStyle }, t('git.truncated')) : null), createElement(DiffLines, { content: diff.content, t })))));
|
|
321
371
|
}
|
|
322
|
-
function DiffLines({ content }) {
|
|
372
|
+
function DiffLines({ content, t }) {
|
|
323
373
|
const lines = parseDiffLines(content);
|
|
324
374
|
if (lines.length === 0)
|
|
325
|
-
return createElement('div', { style: diffEmptyStyle }, '
|
|
375
|
+
return createElement('div', { style: diffEmptyStyle }, t('git.noTextDiff'));
|
|
326
376
|
return createElement('div', { style: diffLinesStyle }, ...lines.map((line, index) => createElement('div', { key: `${index}:${line.kind}:${line.text}`, style: diffLineStyle(line.kind) }, createElement('span', { style: diffLineNumberStyle }, line.oldLineNo === null ? '' : String(line.oldLineNo)), createElement('span', { style: diffLineNumberStyle }, line.newLineNo === null ? '' : String(line.newLineNo)), createElement('code', { style: diffCodeStyle }, `${diffLinePrefix(line.kind)}${line.text}`))));
|
|
327
377
|
}
|
|
328
|
-
function FileDiffViewer({ path, staged, diff, onClose }) {
|
|
329
|
-
return createElement('div', { style: diffOverlayStyle }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': '
|
|
378
|
+
function FileDiffViewer({ path, staged, diff, onClose, t }) {
|
|
379
|
+
return createElement('div', { style: diffOverlayStyle, onPointerDown: backdropPointerDownHandler(onClose) }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': t('git.fileDiff'), style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', { style: fileDiffTitleStyle, title: path }, t('git.fileDiffTitle', { path })), createElement('div', { style: rowActionsStyle }, createElement('span', { style: diffCountStyle }, staged ? t('git.staged') : t('git.unstaged')), createElement('button', { type: 'button', onClick: onClose, className: gitPanelClass.action, style: iconActionStyle, title: t('git.closeDiff'), 'aria-label': t('git.closeDiff') }, '×'))), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, staged ? t('git.stagedDiffHead') : t('git.worktreeDiff')), diff.binary ? createElement('span', { style: diffBinaryStyle }, t('git.binaryFile')) : null, diff.truncated ? createElement('span', { style: diffTruncatedStyle }, t('git.truncated')) : null), createElement(DiffLines, { content: diff.content, t })))));
|
|
330
380
|
}
|
|
331
381
|
function parseDiffLines(content) {
|
|
332
382
|
const lines = [];
|
|
@@ -377,28 +427,135 @@ function parseDiffFiles(content) {
|
|
|
377
427
|
}
|
|
378
428
|
return result;
|
|
379
429
|
}
|
|
380
|
-
function diffFileStatusLabel(status) { return status === 'A' ? '
|
|
430
|
+
function diffFileStatusLabel(status, t) { return status === 'A' ? t('git.statusAdded') : status === 'D' ? t('git.statusDeleted') : status === 'R' ? t('git.statusRenamed') : status === 'C' ? t('git.statusCopied') : t('git.statusModified'); }
|
|
381
431
|
function diffLinePrefix(kind) { return kind === 'add' ? '+' : kind === 'remove' ? '-' : kind === 'context' ? ' ' : ''; }
|
|
432
|
+
/** Diff 行的配色与 DSH 内置 DiffBlock 完全对齐:同一组状态色 + 行底色 + 左侧 3px 色条。 */
|
|
382
433
|
function diffLineStyle(kind) {
|
|
383
434
|
if (kind === 'add')
|
|
384
|
-
return { ...diffLineBaseStyle, color:
|
|
435
|
+
return { ...diffLineBaseStyle, color: dshThemeColor.success, background: dshThemeColor.diffAddedBackground, boxShadow: `inset 3px 0 0 ${dshThemeColor.success}` };
|
|
385
436
|
if (kind === 'remove')
|
|
386
|
-
return { ...diffLineBaseStyle, color:
|
|
437
|
+
return { ...diffLineBaseStyle, color: dshThemeColor.error, background: dshThemeColor.diffDeletedBackground, boxShadow: `inset 3px 0 0 ${dshThemeColor.error}` };
|
|
387
438
|
if (kind === 'hunk')
|
|
388
|
-
return { ...diffLineBaseStyle, color: dshThemeColor.accent, background:
|
|
439
|
+
return { ...diffLineBaseStyle, color: dshThemeColor.accent, background: dshThemeColor.surfaceSubtle, fontWeight: 600 };
|
|
389
440
|
if (kind === 'meta')
|
|
390
441
|
return { ...diffLineBaseStyle, color: dshThemeColor.labelTertiary };
|
|
391
442
|
return diffLineBaseStyle;
|
|
392
443
|
}
|
|
393
|
-
function HistorySection({ history, totalCount, hasMore, loadingMore, onLoadMore, branches, busy, onSwitch, onCopy, onCopyMessage, onViewDiff, onUndo }) {
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}),
|
|
400
|
-
|
|
401
|
-
|
|
444
|
+
function HistorySection({ history, totalCount, hasMore, loadingMore, onLoadMore, branches, busy, scope, hasRemote, onScopeChange, onSwitch, onCopy, onCopyMessage, onViewDiff, onUndo, t }) {
|
|
445
|
+
const graph = buildHistoryGraph(history);
|
|
446
|
+
const graphWidth = graph.laneCount * GRAPH_LANE_WIDTH;
|
|
447
|
+
const rows = [];
|
|
448
|
+
for (const group of groupHistoryByDate(history, t)) {
|
|
449
|
+
const firstIndex = group.items[0]?.index ?? 0;
|
|
450
|
+
rows.push(createElement('div', { key: `date:${group.key}`, style: historyDateHeaderStyle }, createElement(GitGraphRails, { lanes: graph.rows[firstIndex]?.top ?? [], width: graphWidth, minHeight: 16 }), createElement('time', { dateTime: group.key, style: historyDateHeaderTextStyle }, group.label)));
|
|
451
|
+
for (const { item, index, timeLabel } of group.items) {
|
|
452
|
+
rows.push(createElement(HistoryGraphRow, {
|
|
453
|
+
key: item.commitHash, item, timeLabel, row: graph.rows[index] ?? EMPTY_GRAPH_ROW, width: graphWidth,
|
|
454
|
+
busy, hasRemote, isHead: hasHeadRef(item), onCopy, onCopyMessage, onViewDiff, onUndo, t,
|
|
455
|
+
}));
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', { title: t('git.graphLegend') }, t('git.versionCount', { count: totalCount })), createElement('div', { style: historyHeaderActionsStyle }, createElement('select', {
|
|
459
|
+
value: scope, disabled: busy, className: gitPanelClass.select, style: scopeSelectStyle, title: t('git.scopeHint'), 'aria-label': t('git.scopeLabel'),
|
|
460
|
+
onChange: (event) => onScopeChange(event.currentTarget.value === 'all' ? 'all' : 'head'),
|
|
461
|
+
}, createElement('option', { value: 'head' }, t('git.currentBranch')), createElement('option', { value: 'all' }, t('git.allBranches'))), branches === null ? null : createElement('select', { value: branches.currentBranch, disabled: busy, className: gitPanelClass.select, style: branchSelectStyle, title: t('git.switchBranch'), 'aria-label': t('git.switchBranch'), onChange: (event) => onSwitch(event.currentTarget.value) }, ...branches.local.map((branch) => createElement('option', { key: branch.name, value: branch.name }, branch.name))))), history.length === 0
|
|
462
|
+
? createElement('div', { style: mutedStyle }, t('git.noCommits'))
|
|
463
|
+
// 行间不能留间距:每行的竖线只画到行底,一旦行与行之间有缝隙,泳道就会断成一段一段。
|
|
464
|
+
: createElement('div', { style: historyListStyle }, ...rows), hasMore ? createElement('button', { type: 'button', disabled: busy || loadingMore, onClick: onLoadMore, className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: loadMoreButtonStyle }, loadingMore ? t('git.loading') : t('git.loadMoreVersions')) : null);
|
|
465
|
+
}
|
|
466
|
+
const EMPTY_GRAPH_ROW = { lane: 0, color: 0, through: [], merges: [], branches: [], top: [], bottom: [] };
|
|
467
|
+
function HistoryGraphRow({ item, timeLabel, row, width, busy, hasRemote, isHead, onCopy, onCopyMessage, onViewDiff, onUndo, t }) {
|
|
468
|
+
const refs = sortHistoryRefs(item.refs ?? []);
|
|
469
|
+
const nodeTitle = describeCommitNode(item, refs, hasRemote, t);
|
|
470
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
471
|
+
const menuRef = useRef(null);
|
|
472
|
+
useDismissOnOutsidePointer(menuRef, menuOpen, () => setMenuOpen(false));
|
|
473
|
+
const runMenu = (action) => () => { setMenuOpen(false); action(); };
|
|
474
|
+
return createElement('div', { className: gitPanelClass.row, style: historyRowStyle }, createElement('div', { style: { ...graphGutterStyle, width }, 'aria-hidden': 'true' }, createElement(GitGraphTrack, { row, width, head: isHead, title: nodeTitle }), refs.length === 0 ? null : createElement(GitGraphRails, { lanes: row.bottom, width, fill: true })), createElement('div', { style: historyRowBodyStyle }, createElement('div', { style: historyRowMainStyle }, createElement('code', { style: hashStyle }, item.commitHash.slice(0, 8)), createElement('span', { style: fileNameStyle, title: item.subject }, item.subject), createElement('time', {
|
|
475
|
+
style: historyTimeStyle, dateTime: item.authoredAt,
|
|
476
|
+
title: item.authorName === '' ? item.authoredAt : t('git.authorSuffix', { date: item.authoredAt, author: item.authorName }),
|
|
477
|
+
}, timeLabel), createElement('div', { ref: menuRef, style: menuStyle }, createElement('button', { type: 'button', className: gitPanelClass.menuTrigger, style: iconActionStyle, title: t('git.versionMenu'), 'aria-label': t('git.versionMenu'), 'aria-haspopup': 'menu', 'aria-expanded': menuOpen, onClick: () => setMenuOpen((value) => !value) }, '⋯'), menuOpen && createElement('div', { role: 'menu', 'aria-label': t('git.versionMenu'), className: gitPanelClass.menu, style: menuPopupStyle }, createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onViewDiff(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.viewChangesAndDiff')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopy(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyCommitHash')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopyMessage(buildCommitMessageText(item.subject, item.body))), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyCommitMessage')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopy(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyVersionHash')), isHead ? createElement('button', { type: 'button', role: 'menuitem', disabled: busy, onClick: runMenu(onUndo), className: `${gitPanelClass.menuItem} ${gitPanelClass.menuItemDanger}`, style: menuItemStyle }, t('git.undoLastCommit')) : null))), refs.length === 0 ? null : createElement('div', { style: historyRefListStyle }, ...refs.map((ref) => createElement('span', { key: `${ref.kind}:${ref.name}`, title: refTitle(ref, t), className: gitPanelClass.ref, style: historyRefPillStyle(ref.kind, ref.remoteName) }, `${refGlyph(ref.kind)} ${ref.name}`)))));
|
|
478
|
+
}
|
|
479
|
+
/** 标签顺序对齐 VS Code:当前分支 → 本地分支 → 远程分支 → 标签,同一提交的多个引用顺序稳定。 */
|
|
480
|
+
function sortHistoryRefs(refs) {
|
|
481
|
+
const rank = (kind) => kind === 'head' ? 0 : kind === 'local' ? 1 : kind === 'remote' ? 2 : 3;
|
|
482
|
+
return [...refs].sort((left, right) => rank(left.kind) - rank(right.kind) || left.name.localeCompare(right.name));
|
|
483
|
+
}
|
|
484
|
+
/** 未推送的线段画虚线:颜色说明「是谁的提交」,线型说明「还没进任何远程」。 */
|
|
485
|
+
function dashProps(origin) {
|
|
486
|
+
return isUnpushed(origin) ? { strokeDasharray: GRAPH_DASH_ARRAY } : {};
|
|
487
|
+
}
|
|
488
|
+
/** 提交节点与它这一行的连线;坐标按 GRAPH_ROW_HEIGHT 计算,与主行高度严格对齐。 */
|
|
489
|
+
function GitGraphTrack({ row, width, head, title }) {
|
|
490
|
+
const mid = GRAPH_ROW_HEIGHT / 2;
|
|
491
|
+
const nodeX = laneCenterX(row.lane);
|
|
492
|
+
// 节点保持泳道色:颜色负责拓扑,蓝虚线负责「未推送」,两者不互相覆盖。
|
|
493
|
+
const color = laneColor(row.color);
|
|
494
|
+
const children = [];
|
|
495
|
+
if (row.top.some((lane) => lane.lane === row.lane)) {
|
|
496
|
+
children.push(createElement('line', { key: 'node-in', x1: nodeX, y1: 0, x2: nodeX, y2: mid, stroke: segmentStroke(row.incomingOrigin, row.color), strokeWidth: 1.5, ...dashProps(row.incomingOrigin) }));
|
|
497
|
+
}
|
|
498
|
+
for (const lane of row.through) {
|
|
499
|
+
const x = laneCenterX(lane.lane);
|
|
500
|
+
children.push(createElement('line', { key: `through:${lane.lane}`, x1: x, y1: 0, x2: x, y2: GRAPH_ROW_HEIGHT, stroke: laneStroke(lane), strokeWidth: 1.5, ...dashProps(lane.origin) }));
|
|
501
|
+
}
|
|
502
|
+
for (const merge of row.merges) {
|
|
503
|
+
const x = laneCenterX(merge.lane);
|
|
504
|
+
children.push(createElement('path', { key: `merge:${merge.lane}`, d: `M ${x} 0 C ${x} 5 ${nodeX} ${mid - 5} ${nodeX} ${mid}`, fill: 'none', stroke: laneStroke(merge), strokeWidth: 1.5, strokeLinecap: 'round', ...dashProps(merge.origin) }));
|
|
505
|
+
}
|
|
506
|
+
for (const branch of row.branches) {
|
|
507
|
+
const x = laneCenterX(branch.lane);
|
|
508
|
+
if (branch.lane === row.lane)
|
|
509
|
+
children.push(createElement('line', { key: `branch:${branch.lane}`, x1: x, y1: mid, x2: x, y2: GRAPH_ROW_HEIGHT, stroke: laneStroke(branch), strokeWidth: 1.5, ...dashProps(branch.origin) }));
|
|
510
|
+
else
|
|
511
|
+
children.push(createElement('path', { key: `branch:${branch.lane}`, d: `M ${nodeX} ${mid} C ${nodeX} ${mid + 5} ${x} ${GRAPH_ROW_HEIGHT - 5} ${x} ${GRAPH_ROW_HEIGHT}`, fill: 'none', stroke: laneStroke(branch), strokeWidth: 1.5, strokeLinecap: 'round', ...dashProps(branch.origin) }));
|
|
512
|
+
}
|
|
513
|
+
// 与 VS Code 一致:普通提交是实心圆点,当前提交(HEAD)是带外环的靶心,一眼可辨。
|
|
514
|
+
const nodeTitle = title === null ? undefined : createElement('title', { key: 'node-title' }, title);
|
|
515
|
+
if (head) {
|
|
516
|
+
children.push(createElement('circle', { key: 'head-ring', cx: nodeX, cy: mid, r: 6, fill: 'none', stroke: color, strokeWidth: 1.5 }));
|
|
517
|
+
children.push(createElement('circle', { key: 'node', cx: nodeX, cy: mid, r: 3, fill: color, stroke: dshThemeColor.menuBackground, strokeWidth: 1.5 }, nodeTitle));
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
children.push(createElement('circle', { key: 'node', cx: nodeX, cy: mid, r: 3.6, fill: color, stroke: dshThemeColor.menuBackground, strokeWidth: 1.5 }, nodeTitle));
|
|
521
|
+
}
|
|
522
|
+
return createElement('svg', { width, height: GRAPH_ROW_HEIGHT, viewBox: `0 0 ${width} ${GRAPH_ROW_HEIGHT}`, 'aria-hidden': 'true', style: graphTrackStyle }, ...children);
|
|
523
|
+
}
|
|
524
|
+
/** 只画竖直贯穿线:日期分隔行与分支标签行用它延续泳道,避免提交图被行高切断。 */
|
|
525
|
+
function GitGraphRails({ lanes, width, minHeight, fill = false }) {
|
|
526
|
+
return createElement('div', { style: { ...graphRailsStyle, width, ...(minHeight === undefined ? {} : { minHeight }), ...(fill ? { flex: '1 1 auto' } : {}) }, 'aria-hidden': 'true' }, ...lanes.map((lane) => createElement('span', { key: lane.lane, style: graphRailStyle(lane.lane, laneStroke(lane), laneDashed(lane)) })));
|
|
527
|
+
}
|
|
528
|
+
function hasHeadRef(item) {
|
|
529
|
+
return (item.refs ?? []).some((ref) => ref.kind === 'head');
|
|
530
|
+
}
|
|
531
|
+
function refGlyph(kind) {
|
|
532
|
+
return kind === 'head' ? '●' : kind === 'remote' ? '☁' : kind === 'tag' ? '⚑' : '⑂';
|
|
533
|
+
}
|
|
534
|
+
function refTitle(ref, t) {
|
|
535
|
+
const kind = ref.kind === 'head' ? t('git.currentBranch') : ref.kind === 'remote' ? t('git.remoteBranch') : ref.kind === 'tag' ? t('git.tag') : t('git.localBranch');
|
|
536
|
+
return t('git.refTitle', { kind, name: ref.name });
|
|
537
|
+
}
|
|
538
|
+
/** 归属不单独显示文字,只作为节点 tooltip:颜色与虚实已经表达了归属,说明放在悬浮提示里。 */
|
|
539
|
+
function describeCommitOrigin(origin, hasRemote, t) {
|
|
540
|
+
if (origin === undefined)
|
|
541
|
+
return null;
|
|
542
|
+
if (origin === 'local')
|
|
543
|
+
return hasRemote ? t('git.originLocalWithRemote') : t('git.originLocalOnly');
|
|
544
|
+
if (origin === 'synced')
|
|
545
|
+
return t('git.originSynced');
|
|
546
|
+
if (origin === 'remote')
|
|
547
|
+
return t('git.originRemote');
|
|
548
|
+
return t('git.originOtherBranch');
|
|
549
|
+
}
|
|
550
|
+
/** 悬浮节点时显示:短哈希、归属状态、该提交上的分支与标签名称。 */
|
|
551
|
+
function describeCommitNode(item, refs, hasRemote, t) {
|
|
552
|
+
const status = describeCommitOrigin(item.origin, hasRemote, t) ?? t('git.originUnknown');
|
|
553
|
+
const parts = [`${item.commitHash.slice(0, 8)} ${item.subject}`, status];
|
|
554
|
+
if (refs.length > 0)
|
|
555
|
+
parts.push(t('git.branchesAndTags', { refs: refs.map((ref) => refTitle(ref, t)).join(t('git.refSeparator')) }));
|
|
556
|
+
if (item.authorName !== '')
|
|
557
|
+
parts.push(t('git.author', { name: item.authorName }));
|
|
558
|
+
return parts.join('\n');
|
|
402
559
|
}
|
|
403
560
|
function buildChangeTree(items) {
|
|
404
561
|
const root = new Map();
|
|
@@ -722,10 +879,10 @@ async function copyText(value) { try {
|
|
|
722
879
|
catch {
|
|
723
880
|
return false;
|
|
724
881
|
} }
|
|
725
|
-
function groupHistoryByDate(history) {
|
|
882
|
+
function groupHistoryByDate(history, t) {
|
|
726
883
|
const groups = [];
|
|
727
884
|
for (const [index, item] of history.entries()) {
|
|
728
|
-
const timestamp = formatHistoryTimestamp(item.authoredAt);
|
|
885
|
+
const timestamp = formatHistoryTimestamp(item.authoredAt, t);
|
|
729
886
|
const current = groups.at(-1);
|
|
730
887
|
if (current?.key === timestamp.key) {
|
|
731
888
|
current.items.push({ item, index, timeLabel: timestamp.timeLabel });
|
|
@@ -735,13 +892,13 @@ function groupHistoryByDate(history) {
|
|
|
735
892
|
}
|
|
736
893
|
return groups;
|
|
737
894
|
}
|
|
738
|
-
function formatHistoryTimestamp(value) {
|
|
895
|
+
function formatHistoryTimestamp(value, t) {
|
|
739
896
|
const timestamp = Date.parse(value);
|
|
740
897
|
if (Number.isNaN(timestamp))
|
|
741
|
-
return { key: 'unknown', dateLabel: '
|
|
898
|
+
return { key: 'unknown', dateLabel: t('git.unknownDate'), timeLabel: t('git.unknownTime') };
|
|
742
899
|
const parts = new Intl.DateTimeFormat('zh-CN', { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }).formatToParts(timestamp);
|
|
743
900
|
const get = (type) => parts.find((part) => part.type === type)?.value ?? '';
|
|
744
|
-
return { key: `${get('year')}-${get('month')}-${get('day')}`, dateLabel:
|
|
901
|
+
return { key: `${get('year')}-${get('month')}-${get('day')}`, dateLabel: t('git.dateLabel', { month: get('month'), day: get('day') }), timeLabel: `${get('hour')}:${get('minute')}` };
|
|
745
902
|
}
|
|
746
903
|
function buildCommitMessageText(subject, body) { const normalizedSubject = subject.trim(); const normalizedBody = body.trim(); return normalizedBody ? `${normalizedSubject}\n\n${normalizedBody}` : normalizedSubject; }
|
|
747
904
|
const REMOTE_REF_PALETTE = ['#8b5cf6', '#ef4444', '#10b981', '#f59e0b', '#06b6d4', '#ec4899'];
|
|
@@ -753,58 +910,74 @@ function resolveRemotePaletteIndex(remoteName) {
|
|
|
753
910
|
hash = (hash * 33 + character.charCodeAt(0)) >>> 0;
|
|
754
911
|
return hash % REMOTE_REF_PALETTE.length;
|
|
755
912
|
}
|
|
913
|
+
/**
|
|
914
|
+
* 分支标签的配色按「在哪」分色,而不是按名称:当前分支=品牌蓝,本地分支=绿,
|
|
915
|
+
* 远程分支=按远程名散列到固定调色板,标签=琥珀。色相拉开后,一眼就能区分本地与远程。
|
|
916
|
+
*/
|
|
756
917
|
function historyRefPillStyle(kind, remoteName) {
|
|
757
918
|
if (kind === 'remote') {
|
|
758
919
|
const color = REMOTE_REF_PALETTE[resolveRemotePaletteIndex(remoteName)];
|
|
759
|
-
return { ...historyRefPillBaseStyle, border:
|
|
920
|
+
return { ...historyRefPillBaseStyle, border: `.5px solid color-mix(in srgb, ${color} 40%, transparent)`, background: `color-mix(in srgb, ${color} 14%, transparent)`, color };
|
|
760
921
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
922
|
+
if (kind === 'tag')
|
|
923
|
+
return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #d98324 42%, transparent)', background: 'color-mix(in srgb, #d98324 15%, transparent)', color: '#b26a12' };
|
|
924
|
+
// 本地分支用绿色,与远程调色板中的绿区分开:本地分支恒为绿,远程绿只出现在同名远程上。
|
|
925
|
+
if (kind === 'local')
|
|
926
|
+
return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #10b981 40%, transparent)', background: 'color-mix(in srgb, #10b981 14%, transparent)', color: '#0f8a63' };
|
|
927
|
+
return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #4f9cff 42%, transparent)', background: 'color-mix(in srgb, #4f9cff 16%, transparent)', color: '#2b74d8' };
|
|
928
|
+
}
|
|
929
|
+
function graphRailStyle(lane, stroke, dashed = false) {
|
|
930
|
+
const background = dashed ? `repeating-linear-gradient(to bottom, ${stroke} 0 3px, transparent 3px 6px)` : stroke;
|
|
931
|
+
return { position: 'absolute', top: 0, bottom: 0, left: laneCenterX(lane) - 0.75, width: 1.5, borderRadius: dashed ? 0 : 1, background };
|
|
932
|
+
}
|
|
933
|
+
// 面板根节点不再铺底色:DSH 右侧栏的其它面板都是透明的,继承 Sidebar 表面色才不会出现色块接缝。
|
|
934
|
+
const panelStyle = { position: 'relative', userSelect: 'none', boxSizing: 'border-box', display: 'flex', flexDirection: 'column', gap: 12, minHeight: '100%', padding: '12px 14px 20px', overflow: 'auto', color: dshThemeColor.labelPrimary };
|
|
935
|
+
const headerStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, minHeight: 28 };
|
|
768
936
|
const tabTitleStyle = { display: 'inline-flex', alignItems: 'center', minWidth: 0, color: dshThemeColor.labelPrimary, fontSize: 12 };
|
|
769
937
|
const headerActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 4 };
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
const columnSwitchActiveButtonStyle = { ...columnSwitchButtonStyle, color: dshThemeColor.accent, background: 'color-mix(in srgb, currentColor 12%, transparent)', fontWeight: 600 };
|
|
938
|
+
// SegmentedControl 自带 indicator 与键盘走查;外层占满面板宽度后再将控件居中。
|
|
939
|
+
const columnSwitchStyle = { display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', minWidth: 0 };
|
|
773
940
|
const summaryStyle = { color: dshThemeColor.labelSecondary, fontSize: 12 };
|
|
774
941
|
const contentGridStyle = { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', alignItems: 'start', gap: 12 };
|
|
775
942
|
const columnStyle = { display: 'flex', flexDirection: 'column', gap: 12, minWidth: 0 };
|
|
776
|
-
|
|
777
|
-
const
|
|
943
|
+
// 卡片用 layer-1:与 DSH 内置卡片同层,暗色下只比侧栏表面亮一档。
|
|
944
|
+
const sectionStyle = { display: 'flex', flexDirection: 'column', gap: 8, padding: 10, border: `.5px solid ${dshThemeColor.menuBorder}`, borderRadius: 8, background: dshThemeColor.cardBackground };
|
|
945
|
+
const sectionHeaderStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, minHeight: 24, fontSize: 12 };
|
|
778
946
|
const treeStyle = { display: 'flex', flexDirection: 'column', gap: 1 };
|
|
779
947
|
const treeDirectoryStyle = { minWidth: 0 };
|
|
780
|
-
const treeRowStyle = { display: 'flex', alignItems: 'center', gap: 7, minHeight: 28, fontSize: 12 };
|
|
948
|
+
const treeRowStyle = { display: 'flex', alignItems: 'center', gap: 7, minHeight: 28, paddingLeft: 4, paddingRight: 2, borderRadius: 4, fontSize: 12 };
|
|
781
949
|
const treeChevronStyle = { width: 12, color: dshThemeColor.labelTertiary, fontSize: 12 };
|
|
782
950
|
const folderIconStyle = { color: dshThemeColor.accent, fontSize: 11 };
|
|
783
951
|
const fileIconStyle = { width: 12, color: dshThemeColor.labelTertiary, fontSize: 12, textAlign: 'center' };
|
|
784
952
|
const fileNameStyle = { minWidth: 0, flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
785
|
-
const fileStatusStyle = { color: dshThemeColor.labelTertiary, fontFamily:
|
|
786
|
-
const
|
|
787
|
-
const
|
|
953
|
+
const fileStatusStyle = { color: dshThemeColor.labelTertiary, fontFamily: dshThemeColor.codeFont, fontSize: 11 };
|
|
954
|
+
const historyListStyle = { display: 'flex', flexDirection: 'column', gap: 0, minWidth: 0 };
|
|
955
|
+
const historyRowStyle = { display: 'flex', alignItems: 'stretch', minWidth: 0, fontSize: 12 };
|
|
956
|
+
const historyRowBodyStyle = { display: 'flex', flexDirection: 'column', gap: 3, minWidth: 0, flex: '1 1 auto' };
|
|
957
|
+
const historyRowMainStyle = { display: 'flex', alignItems: 'center', gap: 8, minWidth: 0, minHeight: 28, paddingLeft: 4, paddingRight: 2, borderRadius: 4 };
|
|
958
|
+
const graphGutterStyle = { display: 'flex', flexDirection: 'column', flex: '0 0 auto', alignSelf: 'stretch', marginRight: 6 };
|
|
959
|
+
const graphTrackStyle = { display: 'block', flex: '0 0 auto', overflow: 'visible' };
|
|
960
|
+
const graphRailsStyle = { position: 'relative', flex: '0 0 auto', alignSelf: 'stretch', minHeight: 0 };
|
|
961
|
+
const historyHeaderActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 6, flexWrap: 'wrap', justifyContent: 'flex-end' };
|
|
788
962
|
const historyRefListStyle = { display: 'flex', flexWrap: 'wrap', gap: '4px 6px', paddingLeft: 2 };
|
|
789
|
-
|
|
790
|
-
const
|
|
791
|
-
const
|
|
792
|
-
const
|
|
963
|
+
// 尺寸对齐 DSH Pill:20px 高、11px 字号;颜色仍按来源区分,颜色是唯一的语义载体。
|
|
964
|
+
const historyRefPillBaseStyle = { justifyContent: 'center', height: 20, padding: '0 8px', fontSize: 11, lineHeight: '17px' };
|
|
965
|
+
const historyDateHeaderStyle = { display: 'flex', alignItems: 'stretch', color: dshThemeColor.labelSecondary, fontSize: 11, fontWeight: 600 };
|
|
966
|
+
const historyDateHeaderTextStyle = { display: 'block', minWidth: 0, paddingTop: 8 };
|
|
967
|
+
const hashStyle = { color: dshThemeColor.labelTertiary, fontFamily: dshThemeColor.codeFont, fontSize: 11 };
|
|
793
968
|
const rowActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 2, flex: '0 0 auto' };
|
|
794
|
-
const iconButtonStyle = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 24, height: 24, border: 0, borderRadius: 4, padding: 0, color: dshThemeColor.labelSecondary, background: 'transparent', cursor: 'pointer', fontSize: 16 };
|
|
795
|
-
const dangerIconButtonStyle = { ...iconButtonStyle, color: dshThemeColor.error };
|
|
796
969
|
const mutedStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
|
|
797
970
|
const historyTimeStyle = { ...mutedStyle, flex: '0 0 auto', fontVariantNumeric: 'tabular-nums' };
|
|
798
971
|
const emptyStyle = { padding: 16, color: dshThemeColor.labelSecondary, fontSize: 12 };
|
|
799
|
-
const diffOverlayStyle = { position: 'fixed', inset: 0, zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 20, boxSizing: 'border-box', background:
|
|
800
|
-
const diffStyle = { ...sectionStyle, width: 'min(1000px, 100%)', maxHeight: 'min(88vh, 760px)', overflow: 'hidden', boxShadow: dshThemeColor.
|
|
972
|
+
const diffOverlayStyle = { position: 'fixed', inset: 0, zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 20, boxSizing: 'border-box', background: dshThemeColor.overlay };
|
|
973
|
+
const diffStyle = { ...sectionStyle, width: 'min(1000px, 100%)', maxHeight: 'min(88vh, 760px)', overflow: 'hidden', background: dshThemeColor.menuBackground, boxShadow: dshThemeColor.prominentShadow };
|
|
801
974
|
const diffBodyStyle = { display: 'flex', flexDirection: 'column', gap: 12, minHeight: 0, overflow: 'auto', paddingRight: 2 };
|
|
802
975
|
const diffFilesSectionStyle = { ...sectionStyle, gap: 6, padding: 10, background: dshThemeColor.pageBackground };
|
|
803
976
|
const diffDiffSectionStyle = { ...sectionStyle, gap: 6, padding: 10, background: dshThemeColor.pageBackground };
|
|
804
977
|
const diffSectionHeaderStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, minHeight: 24, fontSize: 12 };
|
|
805
|
-
const diffCountStyle = { minWidth: 20, padding: '2px 6px', borderRadius:
|
|
978
|
+
const diffCountStyle = { minWidth: 20, padding: '2px 6px', borderRadius: 999, color: dshThemeColor.labelSecondary, background: dshThemeColor.surfaceSubtle, fontSize: 11, textAlign: 'center' };
|
|
806
979
|
const diffFileListStyle = { display: 'flex', flexDirection: 'column', gap: 2 };
|
|
807
|
-
const diffFileRowStyle = { display: 'flex', alignItems: 'center', gap: 8, minHeight: 30, padding: '4px 6px', borderRadius: 4, background: dshThemeColor.
|
|
980
|
+
const diffFileRowStyle = { display: 'flex', alignItems: 'center', gap: 8, minHeight: 30, padding: '4px 6px', borderRadius: 4, background: dshThemeColor.surfaceSubtle, fontSize: 12 };
|
|
808
981
|
const diffFileStatusStyle = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 42, flex: '0 0 auto', color: dshThemeColor.accent, fontSize: 11, fontWeight: 700 };
|
|
809
982
|
const diffFileNameStyle = { display: 'flex', flexDirection: 'column', minWidth: 0, flex: 1, overflow: 'hidden' };
|
|
810
983
|
const diffFileOldPathStyle = { overflow: 'hidden', color: dshThemeColor.labelTertiary, textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: 11 };
|
|
@@ -812,35 +985,38 @@ const diffBinaryStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
|
|
|
812
985
|
const fileDiffTitleStyle = { ...fileNameStyle, fontSize: 12 };
|
|
813
986
|
const diffTruncatedStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
|
|
814
987
|
const diffEmptyStyle = { padding: 10, color: dshThemeColor.labelTertiary, fontSize: 12 };
|
|
815
|
-
const diffLinesStyle = { overflow: 'auto', border:
|
|
988
|
+
const diffLinesStyle = { overflow: 'auto', border: `.5px solid ${dshThemeColor.menuBorder}`, borderRadius: 8, background: dshThemeColor.pageBackground, fontFamily: dshThemeColor.codeFont, fontSize: 12 };
|
|
816
989
|
const diffLineBaseStyle = { display: 'grid', gridTemplateColumns: '42px 42px minmax(0, 1fr)', minHeight: 21, alignItems: 'stretch', padding: '0 8px', whiteSpace: 'pre', overflowWrap: 'normal', lineHeight: 1.5 };
|
|
817
|
-
const diffLineNumberStyle = { paddingRight: 8, color: dshThemeColor.labelTertiary, borderRight:
|
|
990
|
+
const diffLineNumberStyle = { paddingRight: 8, color: dshThemeColor.labelTertiary, borderRight: `.5px solid ${dshThemeColor.menuBorder}`, textAlign: 'right', userSelect: 'none' };
|
|
818
991
|
const diffCodeStyle = { minWidth: 0, paddingLeft: 10, color: 'inherit', font: 'inherit', overflow: 'visible' };
|
|
819
|
-
const commitSectionStyle = { ...sectionStyle, gap:
|
|
820
|
-
|
|
821
|
-
const
|
|
822
|
-
const
|
|
992
|
+
const commitSectionStyle = { ...sectionStyle, gap: 10 };
|
|
993
|
+
/** 提交框与「生成提交信息」按钮同高,输入面沿用面板的表单风格(边框 + 输入底色 + 8px 圆角)。 */
|
|
994
|
+
const commitEditorRowStyle = { display: 'flex', alignItems: 'stretch', gap: 8, minWidth: 0 };
|
|
995
|
+
const commitSubjectStyle = { width: '100%', minHeight: 34, boxSizing: 'border-box', resize: 'none', padding: '7px 10px', borderRadius: 8, font: 'inherit', fontSize: 12, lineHeight: '16px' };
|
|
996
|
+
const draftButtonStyle = { width: 34, flex: '0 0 auto', padding: 0, borderRadius: 8, fontSize: 16, lineHeight: 1 };
|
|
823
997
|
const commitActionsStyle = { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 };
|
|
824
|
-
const refreshActionStyle = { minHeight:
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
const
|
|
828
|
-
const
|
|
998
|
+
const refreshActionStyle = { minHeight: 32, padding: '6px 12px', borderRadius: 8, fontSize: 12, lineHeight: '16px' };
|
|
999
|
+
// 主按钮沿用 DSH 品牌填充与前景色,暗色下自动变成浅底深字,与内置主按钮一致。
|
|
1000
|
+
const submitActionStyle = { ...refreshActionStyle };
|
|
1001
|
+
const primaryButtonStyle = { minHeight: 30, padding: '5px 12px', borderRadius: 8, fontSize: 12 };
|
|
1002
|
+
const branchSelectStyle = { maxWidth: 150, borderRadius: 8, padding: '3px 5px', fontSize: 11 };
|
|
1003
|
+
const scopeSelectStyle = { ...branchSelectStyle, maxWidth: 92 };
|
|
1004
|
+
const loadMoreButtonStyle = { minHeight: 30, borderRadius: 8, padding: '4px 9px', fontSize: 12 };
|
|
829
1005
|
const menuStyle = { position: 'relative', flex: '0 0 auto' };
|
|
830
|
-
const
|
|
831
|
-
const menuPopupStyle = { position: 'absolute', right: 0, zIndex: 2, display: 'flex', flexDirection: 'column', gap: 2, minWidth:
|
|
832
|
-
const
|
|
833
|
-
const
|
|
1006
|
+
const operationStatusStyle = { display: 'inline-flex', alignItems: 'center', gap: 5, color: dshThemeColor.labelSecondary, fontSize: 11, whiteSpace: 'nowrap' };
|
|
1007
|
+
const menuPopupStyle = { position: 'absolute', right: 0, zIndex: 2, display: 'flex', flexDirection: 'column', gap: 2, minWidth: 120, padding: 4 };
|
|
1008
|
+
const iconActionStyle = { width: 28, height: 28 };
|
|
1009
|
+
const menuItemStyle = { padding: '6px 8px' };
|
|
834
1010
|
export const gitManagementFeature = {
|
|
835
1011
|
descriptor: {
|
|
836
1012
|
name: 'gitManagement', version: '0.1.0', enabledByDefault: true, dependencies: [], runtime: 'client',
|
|
837
|
-
ui: { label: 'Git
|
|
1013
|
+
ui: { label: 'Git repository management', labelKey: 'feature.gitManagement.label', description: 'View changes and manage commits', descriptionKey: 'feature.gitManagement.description', order: 40, defaultOpen: false },
|
|
838
1014
|
},
|
|
839
1015
|
start(context) {
|
|
840
1016
|
const uiContext = context.services.uiContext;
|
|
841
1017
|
if (uiContext === undefined)
|
|
842
1018
|
throw new Error('Git 管理模块缺少 DSH UI 上下文');
|
|
843
|
-
context.resources.add(registerGitManagementUi(uiContext, { rpc: context.services.rpc, remote: context.services.remote }));
|
|
1019
|
+
context.resources.add(registerGitManagementUi(uiContext, { rpc: context.services.rpc, remote: context.services.remote, locale: context.services.locale }));
|
|
844
1020
|
},
|
|
845
1021
|
};
|
|
846
1022
|
//# sourceMappingURL=git-management.js.map
|