@jingyi0605/codingns4dsh 0.2.1-beta.12 → 0.2.1-beta.13
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 +3 -3
- package/README.md +3 -3
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +24 -70
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.js +2 -2
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -1
- package/data/build/dist/client/bundle.js +30007 -15931
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-management-dialog.d.ts +21 -0
- package/data/build/dist/client/cli-management-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-dialog.js +215 -0
- package/data/build/dist/client/cli-management-dialog.js.map +1 -0
- package/data/build/dist/client/cli-management-terminal.d.ts +9 -0
- package/data/build/dist/client/cli-management-terminal.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-terminal.js +30 -0
- package/data/build/dist/client/cli-management-terminal.js.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts +9 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.js +45 -0
- package/data/build/dist/client/cli-settings-dialog.js.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.js +1 -1
- package/data/build/dist/client/cli-settings-rpc.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts +4 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +15 -7
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.editor-engine.js +4 -1
- package/data/build/dist/client/client.editor-engine.js.map +1 -1
- package/data/build/dist/client/client.native-workspace-store.js +1 -1
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.primitives-adapter.js +53 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +16 -0
- package/data/build/dist/client/client.session-translation.js.map +1 -1
- package/data/build/dist/client/client.transport.js +459 -44
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts +2 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.js +7 -5
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +457 -42
- package/data/build/dist/client/editor-engine.d.ts +1 -1
- package/data/build/dist/client/editor-engine.d.ts.map +1 -1
- package/data/build/dist/client/editor-engine.js +4 -1
- package/data/build/dist/client/editor-engine.js.map +1 -1
- package/data/build/dist/client/features/cli-adapters.d.ts +3 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +181 -105
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/file-management.d.ts.map +1 -1
- package/data/build/dist/client/features/file-management.js +2 -0
- package/data/build/dist/client/features/file-management.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +2 -0
- package/data/build/dist/client/features/index.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +3 -0
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/quick-apps.d.ts +3 -0
- package/data/build/dist/client/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/client/features/quick-apps.js +14 -0
- package/data/build/dist/client/features/quick-apps.js.map +1 -0
- package/data/build/dist/client/html-workspace-files.d.ts +4 -0
- package/data/build/dist/client/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/client/html-workspace-files.js +114 -0
- package/data/build/dist/client/html-workspace-files.js.map +1 -0
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +6 -0
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/cliManagement.d.ts +3 -0
- package/data/build/dist/client/locales/cliManagement.d.ts.map +1 -0
- package/data/build/dist/client/locales/cliManagement.js +139 -0
- package/data/build/dist/client/locales/cliManagement.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.js +4 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/panels.js +2 -2
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/locales/quickApps.d.ts +130 -0
- package/data/build/dist/client/locales/quickApps.d.ts.map +1 -0
- package/data/build/dist/client/locales/quickApps.js +150 -0
- package/data/build/dist/client/locales/quickApps.js.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts.map +1 -1
- package/data/build/dist/client/native-model-translation-menu.js +3 -1
- package/data/build/dist/client/native-model-translation-menu.js.map +1 -1
- package/data/build/dist/client/quick-apps/client.d.ts +29 -0
- package/data/build/dist/client/quick-apps/client.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/client.js +68 -0
- package/data/build/dist/client/quick-apps/client.js.map +1 -0
- package/data/build/dist/client/quick-apps/document.d.ts +26 -0
- package/data/build/dist/client/quick-apps/document.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/document.js +110 -0
- package/data/build/dist/client/quick-apps/document.js.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts +14 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.js +51 -0
- package/data/build/dist/client/quick-apps/file-picker.js.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts +7 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.js +252 -0
- package/data/build/dist/client/quick-apps/launcher.js.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts +16 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.js +31 -0
- package/data/build/dist/client/quick-apps/presentation.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts +6 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js +50 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts +26 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.js +128 -0
- package/data/build/dist/client/quick-apps/reorder.js.map +1 -0
- package/data/build/dist/client/quick-apps/styles.d.ts +3 -0
- package/data/build/dist/client/quick-apps/styles.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/styles.js +143 -0
- package/data/build/dist/client/quick-apps/styles.js.map +1 -0
- package/data/build/dist/client/quick-apps/ui.d.ts +20 -0
- package/data/build/dist/client/quick-apps/ui.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/ui.js +21 -0
- package/data/build/dist/client/quick-apps/ui.js.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts +16 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.js +155 -0
- package/data/build/dist/client/quick-apps/viewer.js.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts +19 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js +30 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +1 -1
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-chat.js +26 -22
- package/data/build/dist/client/session-translation-chat.js.map +1 -1
- package/data/build/dist/client/sidebar-footer-style.d.ts +13 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.js +54 -0
- package/data/build/dist/client/sidebar-footer-style.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts.map +1 -1
- package/data/build/dist/client/terminal/model.js +2 -1
- package/data/build/dist/client/terminal/model.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +18 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +21 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts +18 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +100 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts +11 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js +97 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js +164 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts +44 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js +240 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts +37 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js +35 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js +30 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js +132 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js +33 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js +18 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js +24 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +7 -1
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +16 -0
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.js +7 -3
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +179 -20
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +18 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +97 -5
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts +91 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js +8 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js +81 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +17 -4
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +37 -8
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +161 -25
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +47 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js +197 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.js +131 -0
- package/data/build/dist/host/cli-adapters/management-installation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.js +135 -0
- package/data/build/dist/host/cli-adapters/management-methods.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.js +51 -0
- package/data/build/dist/host/cli-adapters/management-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management.js +172 -0
- package/data/build/dist/host/cli-adapters/management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.js +62 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +22 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js +105 -17
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.js +16 -11
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +33 -5
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts +74 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js +83 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +2 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -1
- package/data/build/dist/host/cli-adapters/update-check.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.js +263 -0
- package/data/build/dist/host/cli-adapters/update-check.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -1
- package/data/build/dist/host/features/file-management.js +8 -0
- package/data/build/dist/host/features/file-management.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +2 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/lan-access-dsh.js +1 -1
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/host/features/peer-host.js +7 -0
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/quick-apps.d.ts +4 -0
- package/data/build/dist/host/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/host/features/quick-apps.js +158 -0
- package/data/build/dist/host/features/quick-apps.js.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts +1 -1
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -1
- package/data/build/dist/host/features/session-prompt-translation.js +2 -1
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -1
- package/data/build/dist/host/features/session-translation-protection.d.ts +6 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-protection.js +21 -0
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -1
- package/data/build/dist/host/features/session-translation-recovery.d.ts +3 -2
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-recovery.js +6 -3
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -1
- package/data/build/dist/host/features/session-translation-service.d.ts +3 -0
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-service.js +14 -8
- package/data/build/dist/host/features/session-translation-service.js.map +1 -1
- package/data/build/dist/host/features/types.d.ts +10 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/html-workspace-files.d.ts +3 -0
- package/data/build/dist/host/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/host/html-workspace-files.js +135 -0
- package/data/build/dist/host/html-workspace-files.js.map +1 -0
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +27 -2
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts +5 -1
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +43 -2
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts +5 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js +27 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts +5 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.js +37 -0
- package/data/build/dist/host/modules/quick-apps/browse.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts +4 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js +39 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.js +87 -0
- package/data/build/dist/host/modules/quick-apps/documents.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.js +15 -0
- package/data/build/dist/host/modules/quick-apps/errors.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js +149 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.js +80 -0
- package/data/build/dist/host/modules/quick-apps/launches.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.js +72 -0
- package/data/build/dist/host/modules/quick-apps/paths.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.js +186 -0
- package/data/build/dist/host/modules/quick-apps/registry.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts +38 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.js +237 -0
- package/data/build/dist/host/modules/quick-apps/remote.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts +27 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.js +170 -0
- package/data/build/dist/host/modules/quick-apps/service.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js +181 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +5 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +3 -0
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +8 -3
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +13 -0
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/workspace-file-mutations.d.ts +2 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.js +15 -0
- package/data/build/dist/host/workspace-file-mutations.js.map +1 -0
- package/data/build/dist/shared/codex-performance.d.ts +3 -0
- package/data/build/dist/shared/codex-performance.d.ts.map +1 -0
- package/data/build/dist/shared/codex-performance.js +2 -0
- package/data/build/dist/shared/codex-performance.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +25 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/cli-management.d.ts +29 -0
- package/data/build/dist/shared/contracts/cli-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-management.js +2 -0
- package/data/build/dist/shared/contracts/cli-management.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +2 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/quick-apps.d.ts +68 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.js +4 -0
- package/data/build/dist/shared/contracts/quick-apps.js.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts +8 -3
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/session-translation.js +14 -0
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +1 -1
- package/data/build/dist/shared/contracts/version.js +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +4 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.js +4 -0
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -1
- package/data/build/dist/shared/quick-app-proxy-path.d.ts +6 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.js +18 -0
- package/data/build/dist/shared/quick-app-proxy-path.js.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts +7 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js +10 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js.map +1 -0
- package/data/build/dist/shared/request-performance.d.ts +15 -0
- package/data/build/dist/shared/request-performance.d.ts.map +1 -0
- package/data/build/dist/shared/request-performance.js +3 -0
- package/data/build/dist/shared/request-performance.js.map +1 -0
- package/package.json +1 -1
- package/profile/README.md +2 -2
- package/profile/package.json +2 -2
- package/profile/version.json +1 -1
- package/version.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EditorView } from 'codemirror';
|
|
2
2
|
/** 叶子引擎只依赖 CodeMirror;预览控制器在用户点击编辑后才加载本模块。 */
|
|
3
|
-
export declare function createFileEditor(parent: HTMLElement, content: string, path: string): EditorView;
|
|
3
|
+
export declare function createFileEditor(parent: HTMLElement, content: string, path: string, onChange?: (content: string) => void): EditorView;
|
|
4
4
|
//# sourceMappingURL=editor-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-engine.d.ts","sourceRoot":"","sources":["../../../../src/client/editor-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,YAAY,CAAA;AASnD,8CAA8C;AAC9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"editor-engine.d.ts","sourceRoot":"","sources":["../../../../src/client/editor-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,YAAY,CAAA;AASnD,8CAA8C;AAC9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,UAAU,CAMrI"}
|
|
@@ -7,11 +7,14 @@ import { markdown } from '@codemirror/lang-markdown';
|
|
|
7
7
|
import { python } from '@codemirror/lang-python';
|
|
8
8
|
import { sql } from '@codemirror/lang-sql';
|
|
9
9
|
/** 叶子引擎只依赖 CodeMirror;预览控制器在用户点击编辑后才加载本模块。 */
|
|
10
|
-
export function createFileEditor(parent, content, path) {
|
|
10
|
+
export function createFileEditor(parent, content, path, onChange) {
|
|
11
11
|
const language = editorLanguageForPath(path);
|
|
12
12
|
const extensions = [basicSetup, editorTheme, EditorView.lineWrapping];
|
|
13
13
|
if (language !== undefined)
|
|
14
14
|
extensions.push(language);
|
|
15
|
+
if (onChange)
|
|
16
|
+
extensions.push(EditorView.updateListener.of(update => { if (update.docChanged)
|
|
17
|
+
onChange(update.state.doc.toString()); }));
|
|
15
18
|
return new EditorView({ doc: content, extensions, parent });
|
|
16
19
|
}
|
|
17
20
|
// 编辑器只覆盖文件预览区域,颜色使用 DSH 主题变量。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-engine.js","sourceRoot":"","sources":["../../../../src/client/editor-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAE1C,8CAA8C;AAC9C,MAAM,UAAU,gBAAgB,CAAC,MAAmB,EAAE,OAAe,EAAE,IAAY;
|
|
1
|
+
{"version":3,"file":"editor-engine.js","sourceRoot":"","sources":["../../../../src/client/editor-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAE1C,8CAA8C;AAC9C,MAAM,UAAU,gBAAgB,CAAC,MAAmB,EAAE,OAAe,EAAE,IAAY,EAAE,QAAoC;IACvH,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IACrE,IAAI,QAAQ,KAAK,SAAS;QAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACrD,IAAI,QAAQ;QAAE,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,MAAM,CAAC,UAAU;YAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC,CAAA;IACvI,OAAO,IAAI,UAAU,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAA;AAC7D,CAAC;AAED,8BAA8B;AAC9B,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC;IACnC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,yCAAyC,EAAE,eAAe,EAAE,0CAA0C,EAAE,QAAQ,EAAE,MAAM,EAAE;IAC5K,cAAc,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,sEAAsE,EAAE,UAAU,EAAE,MAAM,EAAE;IAC5I,aAAa,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;IACpC,UAAU,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;IACjC,aAAa,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,0CAA0C,EAAE,KAAK,EAAE,0CAA0C,EAAE,WAAW,EAAE,4CAA4C,EAAE;IAC/M,mBAAmB,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE;IACnE,gBAAgB,EAAE,EAAE,eAAe,EAAE,8DAA8D,EAAE;IACrG,sBAAsB,EAAE,EAAE,eAAe,EAAE,8DAA8D,EAAE;IAC3G,sCAAsC,EAAE,EAAE,eAAe,EAAE,2EAA2E,EAAE;IACxI,YAAY,EAAE,EAAE,eAAe,EAAE,8CAA8C,EAAE;CAClF,CAAC,CAAA;AAEF,SAAS,qBAAqB,CAAC,IAAY;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAA;IACjE,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,UAAU;QAAE,OAAO,QAAQ,EAAE,CAAA;IACrE,IAAI,SAAS,KAAK,MAAM;QAAE,OAAO,IAAI,EAAE,CAAA;IACvC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,UAAU,CAAC,EAAE,GAAG,EAAE,SAAS,KAAK,KAAK,EAAE,CAAC,CAAA;IACpG,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,UAAU,CAAC,EAAE,GAAG,EAAE,SAAS,KAAK,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;IACtH,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,EAAE,CAAA;IAC7D,IAAI,SAAS,KAAK,KAAK;QAAE,OAAO,GAAG,EAAE,CAAA;IACrC,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,MAAM,EAAE,CAAA;IACvC,IAAI,SAAS,KAAK,KAAK;QAAE,OAAO,GAAG,EAAE,CAAA;IACrC,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -8,5 +8,7 @@ export declare const cliAdaptersFeature: CodingNsClientFeatureModule;
|
|
|
8
8
|
* 面板只管理 Agent 本身:安装状态、版本、命令、启用开关与模型目录。外部会话由
|
|
9
9
|
* DSH 原生侧栏和工作区归档入口承载,这里不再重复一份会话列表。
|
|
10
10
|
*/
|
|
11
|
-
export declare function CliAdaptersPanel(
|
|
11
|
+
export declare function CliAdaptersPanel(props: FeaturePanelProps): ReactElement;
|
|
12
|
+
export declare function CliDelegationSettings({ services, enabled, snapshot, notify }: FeaturePanelProps): ReactElement;
|
|
13
|
+
export declare function CliAdaptersContent({ services, enabled, snapshot, notify }: FeaturePanelProps): ReactElement;
|
|
12
14
|
//# sourceMappingURL=cli-adapters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-adapters.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/cli-adapters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAMxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"cli-adapters.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/cli-adapters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAMxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;AA2FhF,mDAAmD;AACnD,eAAO,MAAM,kBAAkB,EAAE,2BAqDhC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAoBvE;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,GAAG,YAAY,CA0E9G;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,GAAG,YAAY,CA4O3G"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { createElement, useEffect, useMemo, useRef, useState } from 'react';
|
|
1
|
+
import { createElement, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
2
2
|
import { createVirtualSessionId } from '../../shared/contracts/peer-host.js';
|
|
3
3
|
import { normalizeSubagentBridgeSettings, SUBAGENT_BRIDGE_MAX_CONCURRENT_LIMITS } from '../../shared/contracts/config.js';
|
|
4
4
|
import { adapterDetectionLabel, callCliRpc, catalogRefreshErrorMessage, errorMessage } from '../cli-catalog.js';
|
|
5
|
-
import { dshFormRootStyle,
|
|
5
|
+
import { dshFormRootStyle, dshSettingsButtonStyle, dshSettingsFieldStyle, dshSettingsHelpStyle, dshSettingsListRowStyle, dshThemeColor } from '../theme.js';
|
|
6
6
|
import { useCodingNsTranslator } from '../locale.js';
|
|
7
|
-
import {
|
|
7
|
+
import { CliSettingsDialog } from '../cli-settings-dialog.js';
|
|
8
8
|
import { registerExternalToolStreamUi } from '../external-tool-stream.js';
|
|
9
9
|
import { readNativeTranslationDefault } from '../native-translation-default.js';
|
|
10
10
|
import { startContextBreakdownDom } from '../context-breakdown-dom.js';
|
|
11
|
-
import { fetchSessionAdapters, replaceSessionAdapters, sessionAdapterId } from '../session-adapter-cache.js';
|
|
11
|
+
import { fetchSessionAdapters, replaceSessionAdapters, sessionAdapterId, subscribeSessionAdapters } from '../session-adapter-cache.js';
|
|
12
|
+
import { createDshCapabilityRegistry } from '../../dsh-capabilities/routes.js';
|
|
12
13
|
import { providerIconUrl } from '../provider-icons.js';
|
|
13
14
|
import { notifyAdapterCatalogChanged, watchAdapterCatalog } from '../adapter-catalog-watch.js';
|
|
14
15
|
import { invalidateModelCatalogCache } from '../model-catalog-cache.js';
|
|
@@ -17,11 +18,11 @@ import { createCliSettingsRpc } from '../cli-settings-rpc.js';
|
|
|
17
18
|
import { createPeerHostManagementApi } from '../peer-host-management-api.js';
|
|
18
19
|
import { SettingsSwitch } from '../settings-controls.js';
|
|
19
20
|
import { uiFontSize } from '../font-scale.js';
|
|
21
|
+
import { CliManagementDialog, cliManagementAction } from '../cli-management-dialog.js';
|
|
20
22
|
const CLI_ADAPTER_STYLE_ID = 'codingns4dsh-cli-adapter-settings-style';
|
|
21
23
|
const cliAdapterClass = {
|
|
22
24
|
panel: 'codingns4dsh-cli-adapter-panel',
|
|
23
25
|
listHeader: 'codingns4dsh-cli-adapter-list-header',
|
|
24
|
-
listCard: 'codingns4dsh-cli-adapter-list-card',
|
|
25
26
|
row: 'codingns4dsh-cli-adapter-row',
|
|
26
27
|
main: 'codingns4dsh-cli-adapter-main',
|
|
27
28
|
identity: 'codingns4dsh-cli-adapter-identity',
|
|
@@ -32,6 +33,8 @@ const cliAdapterClass = {
|
|
|
32
33
|
version: 'codingns4dsh-cli-adapter-version',
|
|
33
34
|
toggle: 'codingns4dsh-cli-adapter-toggle',
|
|
34
35
|
detectButton: 'codingns4dsh-cli-adapter-detect-button',
|
|
36
|
+
actions: 'codingns4dsh-cli-adapter-actions',
|
|
37
|
+
manageButton: 'codingns4dsh-cli-adapter-manage-button',
|
|
35
38
|
};
|
|
36
39
|
/** 设置页 Agent 行的响应式布局;内联样式无法表达移动端换行规则,因此集中注入。 */
|
|
37
40
|
function installCliAdapterStyles() {
|
|
@@ -41,36 +44,42 @@ function installCliAdapterStyles() {
|
|
|
41
44
|
style.dataset.plugin = 'codingns4dsh';
|
|
42
45
|
style.dataset.pluginCss = CLI_ADAPTER_STYLE_ID;
|
|
43
46
|
style.textContent = `
|
|
44
|
-
.${cliAdapterClass.panel}{display:flex;flex-direction:column;
|
|
45
|
-
.${cliAdapterClass.
|
|
46
|
-
.${cliAdapterClass.
|
|
47
|
-
.${cliAdapterClass.row}{display:flex;align-items:center;width:100%;min-width:0;min-height:76px;gap:16px;padding:13px 18px;box-sizing:border-box;background:transparent}
|
|
47
|
+
.${cliAdapterClass.panel}{display:flex;flex-direction:column;width:100%;min-width:0}
|
|
48
|
+
.${cliAdapterClass.listHeader}{display:flex;align-items:center;gap:8px;margin-top:12px;padding:0 0 8px;color:var(--dsw-alias-label-tertiary,GrayText);border-bottom:1px solid var(--dsw-alias-border-l4,#eef0f2);font-size:12px;font-weight:500}
|
|
49
|
+
.${cliAdapterClass.row}{display:flex;align-items:center;width:100%;min-width:0;min-height:60px;gap:10px;padding:9px 0;box-sizing:border-box;background:transparent}
|
|
48
50
|
.${cliAdapterClass.row}+.${cliAdapterClass.row}{border-top:1px solid var(--dsw-alias-border-l4,#eef0f2)}
|
|
49
|
-
.${cliAdapterClass.main}{display:flex;align-items:center;gap:
|
|
50
|
-
.${cliAdapterClass.
|
|
51
|
-
.${cliAdapterClass.
|
|
51
|
+
.${cliAdapterClass.main}{display:flex;align-items:center;gap:9px;flex:1 1 auto;min-width:0;min-height:40px;padding:0;border:0;border-radius:6px;color:inherit;text-align:left;background:transparent;cursor:pointer}
|
|
52
|
+
.${cliAdapterClass.main}:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#1677ff);outline-offset:2px}
|
|
53
|
+
.${cliAdapterClass.identity}{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0}
|
|
54
|
+
.${cliAdapterClass.icon}{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;box-sizing:border-box;object-fit:contain;border-radius:7px}
|
|
52
55
|
.${cliAdapterClass.name}{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.25}
|
|
53
|
-
.${cliAdapterClass.metadata}{display:
|
|
56
|
+
.${cliAdapterClass.metadata}{display:flex;align-items:center;flex-wrap:wrap;gap:3px 6px;min-width:0;color:var(--dsw-alias-label-tertiary,GrayText);font-size:11px;line-height:1.3}
|
|
54
57
|
.${cliAdapterClass.status},.${cliAdapterClass.version}{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
55
|
-
.${cliAdapterClass.
|
|
56
|
-
.${cliAdapterClass.
|
|
57
|
-
.${cliAdapterClass.
|
|
58
|
+
.${cliAdapterClass.version}{font-variant-numeric:tabular-nums}
|
|
59
|
+
.${cliAdapterClass.status}{display:inline-flex;align-items:center;gap:4px;flex-shrink:0}
|
|
60
|
+
.${cliAdapterClass.status}:before{content:'';width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor}
|
|
61
|
+
.${cliAdapterClass.toggle}{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;min-height:36px}
|
|
62
|
+
.${cliAdapterClass.toggle}>span{margin-left:0!important}
|
|
63
|
+
.${cliAdapterClass.actions}{display:flex;align-items:center;gap:2px;flex:0 0 auto}
|
|
64
|
+
.${cliAdapterClass.detectButton}{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--dsw-alias-label-secondary,GrayText);cursor:pointer;transition:background .15s,color .15s}
|
|
58
65
|
.${cliAdapterClass.detectButton}:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.08));color:var(--dsw-alias-label-primary,CanvasText)}
|
|
66
|
+
.${cliAdapterClass.manageButton}[data-action="install"],.${cliAdapterClass.manageButton}[data-action="install"]:hover:not(:disabled){color:var(--dsw-alias-state-business-primary,#1677ff)}
|
|
67
|
+
.${cliAdapterClass.manageButton}[data-action="update"],.${cliAdapterClass.manageButton}[data-action="update"]:hover:not(:disabled){color:var(--dsw-alias-state-success-primary,#16803c)}
|
|
59
68
|
.${cliAdapterClass.detectButton}:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#1677ff);outline-offset:2px}
|
|
60
69
|
.${cliAdapterClass.detectButton}:disabled{opacity:.45;cursor:not-allowed}
|
|
61
70
|
.${cliAdapterClass.detectButton}[aria-busy="true"] svg{animation:codingns-cli-detect-spin 1s linear infinite}
|
|
62
71
|
@keyframes codingns-cli-detect-spin{to{transform:rotate(360deg)}}
|
|
63
72
|
@media (prefers-reduced-motion:reduce){.${cliAdapterClass.detectButton}[aria-busy="true"] svg{animation:none}}
|
|
64
73
|
@media (max-width:768px){
|
|
65
|
-
.${cliAdapterClass.row}{
|
|
66
|
-
.${cliAdapterClass.
|
|
67
|
-
.${cliAdapterClass.
|
|
68
|
-
.${cliAdapterClass.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
.${cliAdapterClass.
|
|
72
|
-
.${cliAdapterClass.
|
|
73
|
-
.${cliAdapterClass.
|
|
74
|
+
.${cliAdapterClass.row}{gap:4px;padding:8px 0}
|
|
75
|
+
.${cliAdapterClass.name}{font-size:13px;white-space:normal;overflow-wrap:anywhere}
|
|
76
|
+
.${cliAdapterClass.detectButton}{width:38px;height:40px}
|
|
77
|
+
.${cliAdapterClass.toggle}{flex-basis:32px;min-height:40px}
|
|
78
|
+
}
|
|
79
|
+
@media (max-width:260px){
|
|
80
|
+
.${cliAdapterClass.row}{flex-wrap:wrap;gap:2px}
|
|
81
|
+
.${cliAdapterClass.main}{flex-basis:100%}
|
|
82
|
+
.${cliAdapterClass.actions}{margin-left:auto}
|
|
74
83
|
}
|
|
75
84
|
`;
|
|
76
85
|
document.head.appendChild(style);
|
|
@@ -83,6 +92,7 @@ export const cliAdaptersFeature = {
|
|
|
83
92
|
enabledByDefault: true,
|
|
84
93
|
dependencies: [],
|
|
85
94
|
runtime: 'client',
|
|
95
|
+
requires: [{ capability: 'session.external-performance', required: false, fallback: 'degrade' }],
|
|
86
96
|
ui: {
|
|
87
97
|
label: 'External Agent integration',
|
|
88
98
|
description: 'View installed external Agents, versions, command paths, available models, and enable them independently. External Agent context panels keep only the occupancy percentage and totals.',
|
|
@@ -106,6 +116,10 @@ export const cliAdaptersFeature = {
|
|
|
106
116
|
// 因此这里不把它挂在 slots 可用性之后。
|
|
107
117
|
const uiContext = context.services.uiContext;
|
|
108
118
|
if (uiContext !== undefined) {
|
|
119
|
+
const performance = createDshCapabilityRegistry(context.services.dshVersion, 'client', uiContext)
|
|
120
|
+
.getProfile(uiContext).capabilities.get('session.external-performance')?.value;
|
|
121
|
+
if (performance !== undefined)
|
|
122
|
+
context.resources.add(performance.install(sessionId => useSyncExternalStore(subscribeSessionAdapters, () => sessionAdapterId(sessionId), () => sessionAdapterId(sessionId)), createElement));
|
|
109
123
|
const { registerDelegateCommand } = await import('../delegate-command.js');
|
|
110
124
|
context.resources.add(registerDelegateCommand(uiContext, {
|
|
111
125
|
rpc: context.services.rpc,
|
|
@@ -131,7 +145,83 @@ export const cliAdaptersFeature = {
|
|
|
131
145
|
* 面板只管理 Agent 本身:安装状态、版本、命令、启用开关与模型目录。外部会话由
|
|
132
146
|
* DSH 原生侧栏和工作区归档入口承载,这里不再重复一份会话列表。
|
|
133
147
|
*/
|
|
134
|
-
export function CliAdaptersPanel(
|
|
148
|
+
export function CliAdaptersPanel(props) {
|
|
149
|
+
const t = useCodingNsTranslator(props.services.locale);
|
|
150
|
+
const [open, setOpen] = useState(false);
|
|
151
|
+
useEffect(() => { installCliAdapterStyles(); }, []);
|
|
152
|
+
useEffect(() => { if (!props.enabled)
|
|
153
|
+
setOpen(false); }, [props.enabled]);
|
|
154
|
+
return createElement('div', { style: dshFormRootStyle }, createElement(CliDelegationSettings, props), createElement('button', {
|
|
155
|
+
type: 'button', disabled: !props.enabled, 'aria-haspopup': 'dialog', 'aria-expanded': open,
|
|
156
|
+
onClick: () => setOpen(true), style: { ...dshSettingsButtonStyle, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 },
|
|
157
|
+
}, t('cli.manage.open'), createElement('span', { 'aria-hidden': true }, '↗')), open && props.enabled && createElement(CliSettingsDialog, { titleId: 'codingns-agent-list-title', wide: true, onClose: () => setOpen(false) }, createElement('header', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexShrink: 0, padding: '10px 16px', borderBottom: `1px solid ${dshThemeColor.fieldBorder}` } }, createElement('h2', { id: 'codingns-agent-list-title', style: { margin: 0, fontSize: uiFontSize(17) } }, t('cli.manage.listTitle')), createElement('button', { type: 'button', autoFocus: true, className: cliAdapterClass.detectButton, 'aria-label': t('cli.manage.close'), title: t('cli.manage.close'), onClick: () => setOpen(false) }, createElement('svg', { width: 20, height: 20, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.8, strokeLinecap: 'round', 'aria-hidden': true }, createElement('path', { d: 'm6 6 12 12M18 6 6 18' })))), createElement('div', { style: { padding: '0 16px 12px', overflow: 'auto', minHeight: 0, overscrollBehavior: 'contain' } }, createElement(CliAdaptersContent, props))));
|
|
158
|
+
}
|
|
159
|
+
export function CliDelegationSettings({ services, enabled, snapshot, notify }) {
|
|
160
|
+
const t = useCodingNsTranslator(services.locale);
|
|
161
|
+
const [bridgeBusy, setBridgeBusy] = useState(false);
|
|
162
|
+
const bridgeEnabled = snapshot.value?.subagentBridge?.enabled === true;
|
|
163
|
+
const bridgeWritable = enabled && snapshot.status !== 'loading' && snapshot.writable;
|
|
164
|
+
const bridgeConcurrency = normalizeSubagentBridgeSettings(snapshot.value?.subagentBridge).maxConcurrentSubagents;
|
|
165
|
+
const [concurrencyText, setConcurrencyText] = useState(() => String(bridgeConcurrency));
|
|
166
|
+
// Sync external settings changes without overwriting in-progress input.
|
|
167
|
+
useEffect(() => { setConcurrencyText(String(bridgeConcurrency)); }, [bridgeConcurrency]);
|
|
168
|
+
const toggleSubagentBridge = async (next) => {
|
|
169
|
+
setBridgeBusy(true);
|
|
170
|
+
try {
|
|
171
|
+
const accepted = await services.settings.mutate([{ op: 'set', path: ['subagentBridge', 'enabled'], value: next }]);
|
|
172
|
+
if (!accepted) {
|
|
173
|
+
notify({ kind: 'error', message: t('settings.moduleWriteRejected') });
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
notify({ kind: 'success', message: t(next ? 'cli.subagentBridgeEnabled' : 'cli.subagentBridgeDisabled') });
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
notify({ kind: 'error', message: errorMessage(error) });
|
|
180
|
+
}
|
|
181
|
+
finally {
|
|
182
|
+
setBridgeBusy(false);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const saveBridgeConcurrency = async () => {
|
|
186
|
+
// Clamp invalid input before persisting the concurrency limit.
|
|
187
|
+
const next = normalizeSubagentBridgeSettings({ maxConcurrentSubagents: Number(concurrencyText) }).maxConcurrentSubagents;
|
|
188
|
+
setConcurrencyText(String(next));
|
|
189
|
+
if (next === bridgeConcurrency)
|
|
190
|
+
return;
|
|
191
|
+
setBridgeBusy(true);
|
|
192
|
+
try {
|
|
193
|
+
const accepted = await services.settings.mutate([{ op: 'set', path: ['subagentBridge', 'maxConcurrentSubagents'], value: next }]);
|
|
194
|
+
if (!accepted) {
|
|
195
|
+
notify({ kind: 'error', message: t('settings.moduleWriteRejected') });
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
notify({ kind: 'success', message: t('cli.subagentBridgeConcurrencySaved') });
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
notify({ kind: 'error', message: errorMessage(error) });
|
|
202
|
+
}
|
|
203
|
+
finally {
|
|
204
|
+
setBridgeBusy(false);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
return createElement('div', { style: dshFormRootStyle }, createElement('label', { style: dshSettingsListRowStyle }, createElement('span', { style: { flex: '1 1 auto', minWidth: 0 } }, createElement('strong', { style: { display: 'block', fontSize: uiFontSize(13), lineHeight: 1.4 } }, t('cli.subagentBridge')), createElement('span', { style: { display: 'block', marginTop: 3, ...dshSettingsHelpStyle, opacity: 0.75 } }, t('cli.subagentBridgeDescription'))), createElement(SettingsSwitch, {
|
|
208
|
+
'aria-label': t('cli.subagentBridgeToggle'),
|
|
209
|
+
checked: bridgeEnabled,
|
|
210
|
+
disabled: !bridgeWritable || bridgeBusy,
|
|
211
|
+
onChange: (event) => { void toggleSubagentBridge(event.currentTarget.checked); },
|
|
212
|
+
})), createElement('label', { style: { ...dshSettingsListRowStyle, opacity: bridgeEnabled ? 1 : 0.5 } }, createElement('span', { style: { flex: '1 1 auto', minWidth: 0 } }, createElement('strong', { style: { display: 'block', fontSize: uiFontSize(13), lineHeight: 1.4 } }, t('cli.subagentBridgeConcurrency')), createElement('span', { style: { display: 'block', marginTop: 3, ...dshSettingsHelpStyle, opacity: 0.75 } }, t('cli.subagentBridgeConcurrencyHelp'))), createElement('input', {
|
|
213
|
+
type: 'number',
|
|
214
|
+
min: SUBAGENT_BRIDGE_MAX_CONCURRENT_LIMITS.min,
|
|
215
|
+
max: SUBAGENT_BRIDGE_MAX_CONCURRENT_LIMITS.max,
|
|
216
|
+
'aria-label': t('cli.subagentBridgeConcurrency'),
|
|
217
|
+
value: concurrencyText,
|
|
218
|
+
disabled: !bridgeWritable || bridgeBusy,
|
|
219
|
+
onChange: (event) => { setConcurrencyText(event.currentTarget.value); },
|
|
220
|
+
onBlur: () => { void saveBridgeConcurrency(); },
|
|
221
|
+
style: { ...dshSettingsFieldStyle, flex: '0 0 auto', width: 96, minHeight: 32, padding: '5px 8px', fontSize: uiFontSize(13) },
|
|
222
|
+
})));
|
|
223
|
+
}
|
|
224
|
+
export function CliAdaptersContent({ services, enabled, snapshot, notify }) {
|
|
135
225
|
const t = useCodingNsTranslator(services.locale);
|
|
136
226
|
const disabled = !enabled;
|
|
137
227
|
const [peerHosts, setPeerHosts] = useState([]);
|
|
@@ -149,13 +239,16 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
149
239
|
currentRequest.current = requestContext;
|
|
150
240
|
const [catalog, setCatalog] = useState([]);
|
|
151
241
|
const [selected, setSelected] = useState(null);
|
|
242
|
+
const [managementAdapter, setManagementAdapter] = useState(null);
|
|
243
|
+
const [managementVisible, setManagementVisible] = useState(false);
|
|
152
244
|
const [models, setModels] = useState(null);
|
|
153
245
|
const [loading, setLoading] = useState(false);
|
|
154
246
|
const [busyAdapterId, setBusyAdapterId] = useState(null);
|
|
155
|
-
const [bridgeBusy, setBridgeBusy] = useState(false);
|
|
156
247
|
const [modelsError, setModelsError] = useState('');
|
|
157
248
|
const [catalogError, setCatalogError] = useState('');
|
|
158
249
|
const [detecting, setDetecting] = useState(null);
|
|
250
|
+
const checkingUpdates = catalog.some(adapter => adapter.update?.state === 'checking');
|
|
251
|
+
const updateCheckUnsupported = catalog.some(adapter => adapter.installed && (adapter.detectionState === undefined || adapter.detectionState === 'ready') && !adapter.detectionFailure && adapter.update === undefined);
|
|
159
252
|
useEffect(() => { installCliAdapterStyles(); }, []);
|
|
160
253
|
useEffect(() => {
|
|
161
254
|
currentRequest.current = requestContext;
|
|
@@ -201,6 +294,7 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
201
294
|
useEffect(() => {
|
|
202
295
|
setCatalog([]);
|
|
203
296
|
setSelected(null);
|
|
297
|
+
setManagementAdapter(null);
|
|
204
298
|
setModels(null);
|
|
205
299
|
setModelsError('');
|
|
206
300
|
setCatalogError('');
|
|
@@ -239,12 +333,41 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
239
333
|
return () => { active = false; };
|
|
240
334
|
}, [disabled, selected, requestContext, catalogAvailable]);
|
|
241
335
|
const buttonStyle = { ...dshSettingsButtonStyle, cursor: disabled ? 'not-allowed' : 'pointer' };
|
|
336
|
+
const refreshManagedCatalog = async (operation) => {
|
|
337
|
+
if (currentRequest.current !== requestContext || peerHostId !== null)
|
|
338
|
+
return;
|
|
339
|
+
const succeeded = operation?.state === 'succeeded';
|
|
340
|
+
const detected = operation?.adapter;
|
|
341
|
+
const adapterId = operation?.adapterId ?? managementAdapter?.id;
|
|
342
|
+
invalidateModelCatalogCache(services.rpc, adapterId);
|
|
343
|
+
// Show the Host-verified version immediately while the explicit refresh runs.
|
|
344
|
+
if (succeeded && detected) {
|
|
345
|
+
const updated = { ...detected, update: { state: 'unchecked' } };
|
|
346
|
+
setCatalog(current => current.map(entry => entry.id === updated.id ? updated : entry));
|
|
347
|
+
setSelected(current => current?.id === updated.id ? updated : current);
|
|
348
|
+
}
|
|
349
|
+
try {
|
|
350
|
+
const value = await callCliRpc(catalogRpc, succeeded ? 'catalog/refresh' : 'catalog', succeeded ? { adapterId, checkUpdates: true } : {}, AbortSignal.timeout(120_000));
|
|
351
|
+
if (currentRequest.current !== requestContext)
|
|
352
|
+
return;
|
|
353
|
+
setCatalog(value);
|
|
354
|
+
setCatalogError('');
|
|
355
|
+
setSelected((current) => current === null ? null : value.find((entry) => entry.id === current.id) ?? null);
|
|
356
|
+
notifyAdapterCatalogChanged(services.rpc);
|
|
357
|
+
notifyAdapterCatalogChanged(catalogRpc);
|
|
358
|
+
}
|
|
359
|
+
catch (error) {
|
|
360
|
+
if (currentRequest.current === requestContext)
|
|
361
|
+
setCatalogError(errorMessage(error));
|
|
362
|
+
throw error;
|
|
363
|
+
}
|
|
364
|
+
};
|
|
242
365
|
const redetect = async (adapterId) => {
|
|
243
366
|
if (disabled || !catalogAvailable || detecting !== null)
|
|
244
367
|
return;
|
|
245
368
|
setDetecting(adapterId ?? '*');
|
|
246
369
|
try {
|
|
247
|
-
const value = await callCliRpc(catalogRpc, 'catalog/refresh', adapterId === undefined ? {} : { adapterId }, AbortSignal.timeout(120_000));
|
|
370
|
+
const value = await callCliRpc(catalogRpc, 'catalog/refresh', { ...(adapterId === undefined ? {} : { adapterId }), checkUpdates: true }, AbortSignal.timeout(120_000));
|
|
248
371
|
invalidateModelCatalogCache(services.rpc, adapterId, peerHostId === null ? undefined : createVirtualSessionId(peerHostId, '__catalog__'));
|
|
249
372
|
notifyAdapterCatalogChanged(services.rpc);
|
|
250
373
|
if (currentRequest.current !== requestContext)
|
|
@@ -266,51 +389,6 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
266
389
|
setDetecting(null);
|
|
267
390
|
}
|
|
268
391
|
};
|
|
269
|
-
const bridgeEnabled = snapshot.value?.subagentBridge?.enabled === true;
|
|
270
|
-
const bridgeWritable = snapshot.status !== 'loading' && snapshot.writable;
|
|
271
|
-
const bridgeConcurrency = normalizeSubagentBridgeSettings(snapshot.value?.subagentBridge).maxConcurrentSubagents;
|
|
272
|
-
const [concurrencyText, setConcurrencyText] = useState(() => String(bridgeConcurrency));
|
|
273
|
-
// 设置被外部改写(例如另一个页面保存)时同步输入框,但不在用户输入过程中反复覆盖。
|
|
274
|
-
useEffect(() => { setConcurrencyText(String(bridgeConcurrency)); }, [bridgeConcurrency]);
|
|
275
|
-
const toggleSubagentBridge = async (next) => {
|
|
276
|
-
setBridgeBusy(true);
|
|
277
|
-
try {
|
|
278
|
-
const accepted = await services.settings.mutate([{ op: 'set', path: ['subagentBridge', 'enabled'], value: next }]);
|
|
279
|
-
if (!accepted) {
|
|
280
|
-
notify({ kind: 'error', message: t('settings.moduleWriteRejected') });
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
notify({ kind: 'success', message: t(next ? 'cli.subagentBridgeEnabled' : 'cli.subagentBridgeDisabled') });
|
|
284
|
-
}
|
|
285
|
-
catch (error) {
|
|
286
|
-
notify({ kind: 'error', message: errorMessage(error) });
|
|
287
|
-
}
|
|
288
|
-
finally {
|
|
289
|
-
setBridgeBusy(false);
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
const saveBridgeConcurrency = async () => {
|
|
293
|
-
// 越界或非数值输入按上下限收敛,避免把 NaN/0 写进设置后彻底锁死派发。
|
|
294
|
-
const next = normalizeSubagentBridgeSettings({ maxConcurrentSubagents: Number(concurrencyText) }).maxConcurrentSubagents;
|
|
295
|
-
setConcurrencyText(String(next));
|
|
296
|
-
if (next === bridgeConcurrency)
|
|
297
|
-
return;
|
|
298
|
-
setBridgeBusy(true);
|
|
299
|
-
try {
|
|
300
|
-
const accepted = await services.settings.mutate([{ op: 'set', path: ['subagentBridge', 'maxConcurrentSubagents'], value: next }]);
|
|
301
|
-
if (!accepted) {
|
|
302
|
-
notify({ kind: 'error', message: t('settings.moduleWriteRejected') });
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
notify({ kind: 'success', message: t('cli.subagentBridgeConcurrencySaved') });
|
|
306
|
-
}
|
|
307
|
-
catch (error) {
|
|
308
|
-
notify({ kind: 'error', message: errorMessage(error) });
|
|
309
|
-
}
|
|
310
|
-
finally {
|
|
311
|
-
setBridgeBusy(false);
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
392
|
const toggleAdapter = async (adapter, next) => {
|
|
315
393
|
if (disabled || peerHostId !== null)
|
|
316
394
|
return;
|
|
@@ -334,22 +412,7 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
334
412
|
setBusyAdapterId(null);
|
|
335
413
|
}
|
|
336
414
|
};
|
|
337
|
-
return createElement('div', { className: cliAdapterClass.panel, 'aria-disabled': disabled, style: { ...dshFormRootStyle, opacity: disabled ? 0.5 : 1, pointerEvents: disabled ? 'none' : 'auto' } },
|
|
338
|
-
'aria-label': t('cli.subagentBridgeToggle'),
|
|
339
|
-
checked: bridgeEnabled,
|
|
340
|
-
disabled: !bridgeWritable || bridgeBusy,
|
|
341
|
-
onChange: (event) => { void toggleSubagentBridge(event.currentTarget.checked); },
|
|
342
|
-
})), peerHostId === null && createElement('label', { style: { ...dshSettingsListRowStyle, opacity: bridgeEnabled ? 1 : 0.5 } }, createElement('span', { style: { flex: '1 1 auto', minWidth: 0 } }, createElement('strong', { style: { display: 'block', fontSize: uiFontSize(13), lineHeight: 1.4 } }, t('cli.subagentBridgeConcurrency')), createElement('span', { style: { display: 'block', marginTop: 3, ...dshSettingsHelpStyle, opacity: 0.75 } }, t('cli.subagentBridgeConcurrencyHelp'))), createElement('input', {
|
|
343
|
-
type: 'number',
|
|
344
|
-
min: SUBAGENT_BRIDGE_MAX_CONCURRENT_LIMITS.min,
|
|
345
|
-
max: SUBAGENT_BRIDGE_MAX_CONCURRENT_LIMITS.max,
|
|
346
|
-
'aria-label': t('cli.subagentBridgeConcurrency'),
|
|
347
|
-
value: concurrencyText,
|
|
348
|
-
disabled: !bridgeWritable || bridgeBusy,
|
|
349
|
-
onChange: (event) => { setConcurrencyText(event.currentTarget.value); },
|
|
350
|
-
onBlur: () => { void saveBridgeConcurrency(); },
|
|
351
|
-
style: { ...dshSettingsFieldStyle, flex: '0 0 auto', width: 96, minHeight: 32, padding: '5px 8px', fontSize: uiFontSize(13) },
|
|
352
|
-
})), createElement('div', { className: cliAdapterClass.listHeader }, createElement('span', undefined, t('cli.agentList')), createElement('select', {
|
|
415
|
+
return createElement('div', { className: cliAdapterClass.panel, 'aria-disabled': disabled, style: { ...dshFormRootStyle, opacity: disabled ? 0.5 : 1, pointerEvents: disabled ? 'none' : 'auto' } }, createElement('div', { className: cliAdapterClass.listHeader }, createElement('select', {
|
|
353
416
|
'aria-label': t('cli.agentHost'), value: peerHostId ?? '', disabled,
|
|
354
417
|
onFocus: () => refreshHosts.current(),
|
|
355
418
|
onChange: (event) => {
|
|
@@ -360,18 +423,24 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
360
423
|
setModelsError('');
|
|
361
424
|
setCatalogError('');
|
|
362
425
|
},
|
|
363
|
-
style: { ...dshSettingsFieldStyle, flex: '1 1
|
|
364
|
-
}, createElement('option', { value: '' }, t('cli.localHost')), ...peerHosts.map((host) => createElement('option', { key: host.id, value: host.id }, host.displayName))), createElement('
|
|
426
|
+
style: { ...dshSettingsFieldStyle, flex: '1 1 auto', width: 'auto', minWidth: 0, minHeight: 36, padding: '5px 8px', fontSize: uiFontSize(13) },
|
|
427
|
+
}, createElement('option', { value: '' }, t('cli.localHost')), ...peerHosts.map((host) => createElement('option', { key: host.id, value: host.id }, host.displayName))), catalog.length > 0 && createElement('span', { title: t('cli.agentCount', { count: catalog.length }), 'aria-label': t('cli.agentCount', { count: catalog.length }), style: { fontVariantNumeric: 'tabular-nums' } }, catalog.length), createElement(AdapterDetectButton, { label: t(detecting === '*' ? 'cli.detecting' : checkingUpdates ? 'cli.manage.checking' : 'cli.redetectAll'), busy: detecting === '*' || checkingUpdates, disabled: disabled || !catalogAvailable || detecting !== null || checkingUpdates, onClick: () => { void redetect(); } })), updateCheckUnsupported && createElement('div', { role: 'alert', style: { ...dshSettingsHelpStyle, padding: '8px 0', color: dshThemeColor.warning } }, t('cli.manage.hostUnsupported')), hostsError && createElement('div', { role: 'alert', style: dshSettingsHelpStyle }, t('cli.peerHostListError', { message: hostsError })), peerHostId !== null && createElement('div', { style: dshSettingsHelpStyle }, t('cli.peerHostReadOnly', { name: hostLabel })), !catalogAvailable && createElement('div', { role: 'status', style: dshSettingsHelpStyle }, t('cli.peerHostUnavailable', { name: hostLabel })), catalogError && createElement('div', { role: 'alert', style: { ...dshSettingsHelpStyle, color: dshThemeColor.error } }, catalogError), loading && createElement('div', { role: 'status' }, t('cli.readingAgents')), !loading && catalogAvailable && !catalogError && catalog.length === 0 && createElement('div', { role: 'status', style: { opacity: 0.7 } }, t('cli.noAgents')), ...catalog.map((adapter) => createElement('div', { key: adapter.id, className: cliAdapterClass.row }, createElement('button', {
|
|
365
428
|
type: 'button',
|
|
366
429
|
className: cliAdapterClass.main,
|
|
367
430
|
onClick: () => setSelected(adapter),
|
|
368
|
-
style: { flex: '1 1 auto', minWidth: 0, display: 'flex', alignItems: 'center', gap: 12, padding: 0, border: 0, color: 'inherit', textAlign: 'left', background: 'transparent', cursor: 'pointer' },
|
|
369
431
|
'aria-label': t('cli.viewDetails', { name: adapter.name }),
|
|
370
432
|
}, createElement(AdapterIcon, { adapter }), createElement('div', { className: cliAdapterClass.identity }, createElement('span', { className: cliAdapterClass.name, style: { fontWeight: 600 } }, adapter.name), createElement('div', { className: cliAdapterClass.metadata }, createElement('span', { className: cliAdapterClass.status, style: {
|
|
371
433
|
color: adapter.installed ? (adapter.runtimeState === 'installed' ? dshThemeColor.labelSecondary : dshThemeColor.success) : dshThemeColor.labelTertiary,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
adapter:
|
|
434
|
+
} }, adapterStatus(adapter, t)), adapter.version && createElement('span', { className: cliAdapterClass.version, title: updateCheckLabel(adapter, t) }, adapter.version), adapter.update?.state === 'available' && createElement('span', { className: cliAdapterClass.version, title: updateCheckLabel(adapter, t), style: { color: dshThemeColor.success } }, `↑ ${adapter.update.latestVersion}`), adapter.update?.state === 'available' && adapter.update.manualUpdate && createElement('span', { className: cliAdapterClass.version }, t('cli.manage.updateInApp')), adapter.installed && adapter.update && adapter.update.state !== 'available' && createElement('span', {
|
|
435
|
+
className: cliAdapterClass.version, title: updateCheckLabel(adapter, t),
|
|
436
|
+
style: { color: adapter.update.state === 'error' ? dshThemeColor.warning : dshThemeColor.labelTertiary },
|
|
437
|
+
}, t(adapter.update.state === 'unavailable' && adapter.update.reason ? `cli.manage.reasonLabel.${adapter.update.reason}` : `cli.manage.state.${adapter.update.state}`))))), createElement('div', { className: cliAdapterClass.actions }, peerHostId === null && cliManagementAction(adapter) !== null && createElement('button', {
|
|
438
|
+
type: 'button', className: `${cliAdapterClass.detectButton} ${cliAdapterClass.manageButton}`, 'data-action': cliManagementAction(adapter), disabled: disabled || detecting !== null,
|
|
439
|
+
title: adapter.installed ? updateCheckLabel(adapter, t) : t('cli.manage.title', { action: t('cli.manage.install'), name: adapter.name }),
|
|
440
|
+
'aria-label': t('cli.manage.title', { action: t(`cli.manage.${cliManagementAction(adapter)}`), name: adapter.name }),
|
|
441
|
+
onClick: () => { setManagementAdapter(adapter); setManagementVisible(true); },
|
|
442
|
+
}, createElement('svg', { width: 18, height: 18, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.8, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true }, createElement('path', { d: adapter.installed ? 'M12 16V4m-4 4 4-4 4 4M5 14v5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5' : 'M12 3v12m-4-4 4 4 4-4M5 16v4a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4' }))), createElement(AdapterDetectButton, { label: `${adapter.name} · ${t(detecting === adapter.id || detecting === '*' ? 'cli.detecting' : adapter.update?.state === 'checking' ? 'cli.manage.checking' : 'cli.redetect')}`, busy: detecting === adapter.id || detecting === '*' || adapter.update?.state === 'checking', disabled: disabled || detecting !== null || adapter.update?.state === 'checking', onClick: () => { void redetect(adapter.id); } })), createElement('label', { className: cliAdapterClass.toggle, title: adapter.enabled ? t('cli.enabled') : t('cli.disabled') }, createElement(SettingsSwitch, { 'aria-label': t('cli.adapterToggle', { name: adapter.name }), checked: adapter.enabled, disabled: disabled || peerHostId !== null || !adapter.installed || busyAdapterId === adapter.id, onChange: (event) => { void toggleAdapter(adapter, event.currentTarget.checked); } })))), selected !== null && createElement(AdapterDetailsDialog, {
|
|
443
|
+
adapter: catalog.find(adapter => adapter.id === selected.id) ?? selected,
|
|
375
444
|
models,
|
|
376
445
|
hostLabel,
|
|
377
446
|
modelsError,
|
|
@@ -379,6 +448,10 @@ export function CliAdaptersPanel({ services, enabled, snapshot, notify }) {
|
|
|
379
448
|
onClose: () => setSelected(null),
|
|
380
449
|
buttonStyle,
|
|
381
450
|
t,
|
|
451
|
+
}), !disabled && peerHostId === null && managementAdapter !== null && createElement(CliManagementDialog, {
|
|
452
|
+
key: `management:${managementAdapter.id}`, adapter: managementAdapter, rpc: catalogRpc, hostLabel, t, visible: managementVisible,
|
|
453
|
+
onClose: (keepTracking) => { setManagementVisible(false); if (!keepTracking)
|
|
454
|
+
setManagementAdapter(null); }, onCatalogChanged: refreshManagedCatalog,
|
|
382
455
|
}));
|
|
383
456
|
}
|
|
384
457
|
const CIRCULAR_ADAPTER_ICON_IDS = new Set(['gemini', 'grok']);
|
|
@@ -389,6 +462,16 @@ function AdapterDetectButton({ label, busy, disabled, onClick }) {
|
|
|
389
462
|
function adapterStatus(adapter, t) {
|
|
390
463
|
return t(adapterDetectionLabel(adapter));
|
|
391
464
|
}
|
|
465
|
+
function updateCheckLabel(adapter, t) {
|
|
466
|
+
const state = adapter.update?.state ?? 'unchecked';
|
|
467
|
+
if (state === 'error' && adapter.update?.failure)
|
|
468
|
+
return t(`cli.manage.failure.${adapter.update.failure}`, { status: adapter.update.httpStatus ?? '' });
|
|
469
|
+
if (state === 'unavailable' && adapter.update?.reason)
|
|
470
|
+
return t(`cli.manage.reason.${adapter.update.reason}`);
|
|
471
|
+
if (state === 'available' && adapter.update?.manualUpdate)
|
|
472
|
+
return t('cli.manage.availableInApp', { version: adapter.update.latestVersion ?? '', name: adapter.name });
|
|
473
|
+
return t(`cli.manage.${state}`, { version: adapter.update?.latestVersion ?? '' });
|
|
474
|
+
}
|
|
392
475
|
/** 设置页列表中的 Agent logo;资产缺失时用首字母占位,避免出现破图或空白。 */
|
|
393
476
|
function AdapterIcon({ adapter }) {
|
|
394
477
|
const icon = providerIconUrl(adapter.id);
|
|
@@ -408,16 +491,9 @@ function AdapterIcon({ adapter }) {
|
|
|
408
491
|
});
|
|
409
492
|
}
|
|
410
493
|
function AdapterDetailsDialog({ adapter, hostLabel, models, modelsError, loading, onClose, buttonStyle, t }) {
|
|
411
|
-
return createElement('div', {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
style: { position: 'fixed', inset: 0, zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 24, background: dshThemeColor.overlay },
|
|
415
|
-
}, createElement('div', {
|
|
416
|
-
role: 'dialog',
|
|
417
|
-
'aria-modal': true,
|
|
418
|
-
'aria-labelledby': 'codingns-cli-adapter-title',
|
|
419
|
-
style: { ...dshPopupSurfaceStyle, width: 'min(100%, 620px)', maxHeight: 'min(720px, 90vh)', overflow: 'auto', boxSizing: 'border-box', padding: 24, borderRadius: 8 },
|
|
420
|
-
}, createElement('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 } }, createElement('h3', { id: 'codingns-cli-adapter-title', style: { margin: 0, fontSize: uiFontSize(18) } }, adapter.name), createElement('button', { type: 'button', onClick: onClose, style: buttonStyle, 'aria-label': t('cli.closeDetails') }, t('cli.closeDetails'))), createElement('dl', { style: { display: 'grid', gridTemplateColumns: 'max-content 1fr', gap: '8px 16px', margin: '20px 0' } }, createElement('dt', undefined, t('cli.agentHost')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, hostLabel), createElement('dt', undefined, t('cli.installStatus')), createElement('dd', { style: { margin: 0 } }, adapterStatus(adapter, t)), createElement('dt', undefined, t('cli.enabledStatus')), createElement('dd', { style: { margin: 0 } }, adapter.enabled ? t('cli.enabled') : t('cli.disabled')), createElement('dt', undefined, t('cli.version')), createElement('dd', { style: { margin: 0 } }, adapter.version ?? t('cli.notDetectedVersion')), createElement('dt', undefined, t('cli.commandPath')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, adapter.command ?? t('cli.notDetectedCommand')), adapter.diagnostic && createElement('dt', undefined, t('cli.diagnostic')), adapter.diagnostic && createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere', color: dshThemeColor.labelSecondary } }, adapter.diagnostic), createElement('dt', undefined, t('cli.protocol')), createElement('dd', { style: { margin: 0 } }, adapter.protocol ?? t('cli.undeclared')), createElement('dt', undefined, t('cli.capabilities')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, adapter.capabilities?.join(t('common.listSeparator')) ?? t('cli.undeclared'))), createElement('h4', { style: { margin: '16px 0 8px' } }, t('cli.modelCatalog')), modelsError && createElement('div', { role: 'alert', style: { color: dshThemeColor.error } }, modelsError), !adapter.installed && createElement('div', { style: { opacity: 0.7 } }, adapter.diagnostic ?? adapterStatus(adapter, t)), adapter.installed && !adapter.enabled && createElement('div', { style: { opacity: 0.7 } }, t('cli.agentDisabled')), adapter.installed && loading && createElement('div', { role: 'status' }, t('cli.readingModels')), adapter.installed && !loading && models !== null && createElement(ModelCatalog, { catalog: models, t }), createElement('div', { style: { display: 'flex', justifyContent: 'flex-end', marginTop: 20 } }, createElement('button', { type: 'button', onClick: onClose, style: buttonStyle }, t('cli.done')))));
|
|
494
|
+
return createElement(CliSettingsDialog, { titleId: 'codingns-cli-adapter-title', onClose }, createElement('div', {
|
|
495
|
+
style: { padding: 20 },
|
|
496
|
+
}, createElement('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 } }, createElement('h3', { id: 'codingns-cli-adapter-title', style: { margin: 0, fontSize: uiFontSize(18) } }, adapter.name), createElement('button', { type: 'button', onClick: onClose, style: buttonStyle, 'aria-label': t('cli.closeDetails') }, t('cli.closeDetails'))), createElement('dl', { style: { display: 'grid', gridTemplateColumns: 'max-content 1fr', gap: '8px 16px', margin: '20px 0' } }, createElement('dt', undefined, t('cli.agentHost')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, hostLabel), createElement('dt', undefined, t('cli.installStatus')), createElement('dd', { style: { margin: 0 } }, adapterStatus(adapter, t)), createElement('dt', undefined, t('cli.enabledStatus')), createElement('dd', { style: { margin: 0 } }, adapter.enabled ? t('cli.enabled') : t('cli.disabled')), createElement('dt', undefined, t('cli.version')), createElement('dd', { style: { margin: 0 } }, adapter.version ?? t('cli.notDetectedVersion')), adapter.installed && createElement('dt', undefined, t('cli.manage.update')), adapter.installed && createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, updateCheckLabel(adapter, t), adapter.update?.sourceUrl && createElement('a', { href: adapter.update.sourceUrl, target: '_blank', rel: 'noopener noreferrer', style: { display: 'block', marginTop: 4 } }, t('cli.manage.source'))), createElement('dt', undefined, t('cli.commandPath')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, adapter.command ?? t('cli.notDetectedCommand')), adapter.diagnostic && createElement('dt', undefined, t('cli.diagnostic')), adapter.diagnostic && createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere', color: dshThemeColor.labelSecondary } }, adapter.diagnostic), createElement('dt', undefined, t('cli.protocol')), createElement('dd', { style: { margin: 0 } }, adapter.protocol ?? t('cli.undeclared')), createElement('dt', undefined, t('cli.capabilities')), createElement('dd', { style: { margin: 0, overflowWrap: 'anywhere' } }, adapter.capabilities?.join(t('common.listSeparator')) ?? t('cli.undeclared'))), createElement('h4', { style: { margin: '16px 0 8px' } }, t('cli.modelCatalog')), modelsError && createElement('div', { role: 'alert', style: { color: dshThemeColor.error } }, modelsError), !adapter.installed && createElement('div', { style: { opacity: 0.7 } }, adapter.diagnostic ?? adapterStatus(adapter, t)), adapter.installed && !adapter.enabled && createElement('div', { style: { opacity: 0.7 } }, t('cli.agentDisabled')), adapter.installed && loading && createElement('div', { role: 'status' }, t('cli.readingModels')), adapter.installed && !loading && models !== null && createElement(ModelCatalog, { catalog: models, t }), createElement('div', { style: { display: 'flex', justifyContent: 'flex-end', marginTop: 20 } }, createElement('button', { type: 'button', onClick: onClose, style: buttonStyle }, t('cli.done')))));
|
|
421
497
|
}
|
|
422
498
|
function ModelCatalog({ catalog, t }) {
|
|
423
499
|
if (catalog.groups.length === 0)
|