@jingyi0605/codingns4dsh 0.2.1-beta.9 → 0.2.1-rc.3
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 +10 -6
- package/README.md +12 -9
- package/assets/provider-icons/magpie.png +0 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -1
- package/data/build/dist/bootstrap/index.d.ts +1 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +24 -70
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +10 -2
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.js +16 -4
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -1
- package/data/build/dist/client/bundle.js +55627 -31591
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-management-dialog.d.ts +21 -0
- package/data/build/dist/client/cli-management-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-dialog.js +215 -0
- package/data/build/dist/client/cli-management-dialog.js.map +1 -0
- package/data/build/dist/client/cli-management-terminal.d.ts +9 -0
- package/data/build/dist/client/cli-management-terminal.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-terminal.js +30 -0
- package/data/build/dist/client/cli-management-terminal.js.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts +9 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.js +45 -0
- package/data/build/dist/client/cli-settings-dialog.js.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.js +1 -1
- package/data/build/dist/client/cli-settings-rpc.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts +17 -3
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +300 -41
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +4 -3
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/client.delegate-command.js +44 -26
- package/data/build/dist/client/client.delegate-command.js.map +1 -1
- package/data/build/dist/client/client.editor-engine.js +4 -1
- package/data/build/dist/client/client.editor-engine.js.map +1 -1
- package/data/build/dist/client/{client.model-catalog-cache.js → client.magpie-model-tag.js} +393 -14
- package/data/build/dist/client/client.magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/client.moss-voice-output.js +415 -0
- package/data/build/dist/client/client.moss-voice-output.js.map +1 -0
- package/data/build/dist/client/client.native-workspace-store.js +91 -15
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.primitives-adapter.js +128 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -1
- package/data/build/dist/client/client.react-dom.js +0 -404
- package/data/build/dist/client/client.react-dom.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +121 -2
- package/data/build/dist/client/client.session-translation.js.map +1 -1
- package/data/build/dist/client/client.transport.js +1415 -57
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts +11 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.js +54 -0
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -1
- package/data/build/dist/client/delegate-command.js +36 -7
- package/data/build/dist/client/delegate-command.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +1948 -494
- 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/feature-requirement.d.ts +43 -0
- package/data/build/dist/client/feature-requirement.d.ts.map +1 -0
- package/data/build/dist/client/feature-requirement.js +105 -0
- package/data/build/dist/client/feature-requirement.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts +3 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +207 -112
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/file-management.d.ts.map +1 -1
- package/data/build/dist/client/features/file-management.js +18 -0
- package/data/build/dist/client/features/file-management.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts +1 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +5 -0
- package/data/build/dist/client/features/index.js.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.js +1 -0
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -1
- package/data/build/dist/client/features/magpie-management-controls.d.ts +46 -0
- package/data/build/dist/client/features/magpie-management-controls.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management-controls.js +759 -0
- package/data/build/dist/client/features/magpie-management-controls.js.map +1 -0
- package/data/build/dist/client/features/magpie-management-page.d.ts +124 -0
- package/data/build/dist/client/features/magpie-management-page.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management-page.js +1256 -0
- package/data/build/dist/client/features/magpie-management-page.js.map +1 -0
- package/data/build/dist/client/features/magpie-management.d.ts +7 -0
- package/data/build/dist/client/features/magpie-management.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management.js +154 -0
- package/data/build/dist/client/features/magpie-management.js.map +1 -0
- package/data/build/dist/client/features/magpie-mark.d.ts +10 -0
- package/data/build/dist/client/features/magpie-mark.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-mark.js +21 -0
- package/data/build/dist/client/features/magpie-mark.js.map +1 -0
- package/data/build/dist/client/features/magpie-provider-logo.d.ts +11 -0
- package/data/build/dist/client/features/magpie-provider-logo.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-provider-logo.js +35 -0
- package/data/build/dist/client/features/magpie-provider-logo.js.map +1 -0
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -1
- package/data/build/dist/client/features/mobile-access.js +7 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +6 -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/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/client/features/session-translation.js +50 -49
- package/data/build/dist/client/features/session-translation.js.map +1 -1
- package/data/build/dist/client/features/subscription-quota-groups.d.ts +193 -0
- package/data/build/dist/client/features/subscription-quota-groups.d.ts.map +1 -0
- package/data/build/dist/client/features/subscription-quota-groups.js +548 -0
- package/data/build/dist/client/features/subscription-quota-groups.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.js +6 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -1
- package/data/build/dist/client/file-management-dom.d.ts +20 -1
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -1
- package/data/build/dist/client/file-management-dom.js +94 -18
- package/data/build/dist/client/file-management-dom.js.map +1 -1
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts +27 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts.map +1 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js +101 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js.map +1 -0
- package/data/build/dist/client/git-management-settings.d.ts +4 -0
- package/data/build/dist/client/git-management-settings.d.ts.map +1 -0
- package/data/build/dist/client/git-management-settings.js +73 -0
- package/data/build/dist/client/git-management-settings.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts +2 -1
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +64 -41
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/git-panel-styles.d.ts +4 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -1
- package/data/build/dist/client/git-panel-styles.js +15 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -1
- package/data/build/dist/client/html-workspace-files.d.ts +4 -0
- package/data/build/dist/client/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/client/html-workspace-files.js +114 -0
- package/data/build/dist/client/html-workspace-files.js.map +1 -0
- package/data/build/dist/client/index.d.ts +1 -1
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +1 -1
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +29 -2
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/cliManagement.d.ts +3 -0
- package/data/build/dist/client/locales/cliManagement.d.ts.map +1 -0
- package/data/build/dist/client/locales/cliManagement.js +155 -0
- package/data/build/dist/client/locales/cliManagement.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.js +8 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/git.d.ts.map +1 -1
- package/data/build/dist/client/locales/git.js +30 -2
- package/data/build/dist/client/locales/git.js.map +1 -1
- package/data/build/dist/client/locales/magpie.d.ts +4 -0
- package/data/build/dist/client/locales/magpie.d.ts.map +1 -0
- package/data/build/dist/client/locales/magpie.js +622 -0
- package/data/build/dist/client/locales/magpie.js.map +1 -0
- package/data/build/dist/client/locales/panels.d.ts.map +1 -1
- package/data/build/dist/client/locales/panels.js +103 -11
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +2 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/quickApps.d.ts +136 -0
- package/data/build/dist/client/locales/quickApps.d.ts.map +1 -0
- package/data/build/dist/client/locales/quickApps.js +162 -0
- package/data/build/dist/client/locales/quickApps.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +150 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/magpie-model-tag.d.ts +16 -0
- package/data/build/dist/client/magpie-model-tag.d.ts.map +1 -0
- package/data/build/dist/client/magpie-model-tag.js +62 -0
- package/data/build/dist/client/magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts +14 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.js +164 -0
- package/data/build/dist/client/mobile-team-panel-dom.js.map +1 -0
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -1
- package/data/build/dist/client/model-catalog-cache.js +66 -12
- package/data/build/dist/client/model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/model-priority-pool.d.ts +23 -0
- package/data/build/dist/client/model-priority-pool.d.ts.map +1 -0
- package/data/build/dist/client/model-priority-pool.js +245 -0
- package/data/build/dist/client/model-priority-pool.js.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts +13 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.js +159 -0
- package/data/build/dist/client/native-model-translation-menu.js.map +1 -0
- package/data/build/dist/client/native-translation-default.d.ts +6 -0
- package/data/build/dist/client/native-translation-default.d.ts.map +1 -0
- package/data/build/dist/client/native-translation-default.js +30 -0
- package/data/build/dist/client/native-translation-default.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +8 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +125 -3
- package/data/build/dist/client/provider-icons.js.map +1 -1
- package/data/build/dist/client/quick-apps/browser-storage.d.ts +24 -0
- package/data/build/dist/client/quick-apps/browser-storage.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/browser-storage.js +114 -0
- package/data/build/dist/client/quick-apps/browser-storage.js.map +1 -0
- package/data/build/dist/client/quick-apps/client.d.ts +31 -0
- package/data/build/dist/client/quick-apps/client.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/client.js +68 -0
- package/data/build/dist/client/quick-apps/client.js.map +1 -0
- package/data/build/dist/client/quick-apps/document.d.ts +26 -0
- package/data/build/dist/client/quick-apps/document.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/document.js +110 -0
- package/data/build/dist/client/quick-apps/document.js.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts +14 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.js +51 -0
- package/data/build/dist/client/quick-apps/file-picker.js.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts +7 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.js +267 -0
- package/data/build/dist/client/quick-apps/launcher.js.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts +16 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.js +47 -0
- package/data/build/dist/client/quick-apps/presentation.js.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts +5 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.js +19 -0
- package/data/build/dist/client/quick-apps/rail-preference.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts +6 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js +50 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts +26 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.js +128 -0
- package/data/build/dist/client/quick-apps/reorder.js.map +1 -0
- package/data/build/dist/client/quick-apps/styles.d.ts +3 -0
- package/data/build/dist/client/quick-apps/styles.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/styles.js +153 -0
- package/data/build/dist/client/quick-apps/styles.js.map +1 -0
- package/data/build/dist/client/quick-apps/ui.d.ts +20 -0
- package/data/build/dist/client/quick-apps/ui.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/ui.js +21 -0
- package/data/build/dist/client/quick-apps/ui.js.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts +16 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.js +165 -0
- package/data/build/dist/client/quick-apps/viewer.js.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts +19 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js +30 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +68 -2
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-chat.js +297 -109
- package/data/build/dist/client/session-translation-chat.js.map +1 -1
- package/data/build/dist/client/session-translation-interactions.d.ts +31 -0
- package/data/build/dist/client/session-translation-interactions.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-interactions.js +158 -0
- package/data/build/dist/client/session-translation-interactions.js.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts +8 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.js +58 -0
- package/data/build/dist/client/session-translation-pending-dom.js.map +1 -0
- package/data/build/dist/client/session-translation-retry.d.ts +16 -0
- package/data/build/dist/client/session-translation-retry.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-retry.js +66 -0
- package/data/build/dist/client/session-translation-retry.js.map +1 -0
- package/data/build/dist/client/session-translation-rules.d.ts +13 -0
- package/data/build/dist/client/session-translation-rules.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-rules.js +58 -0
- package/data/build/dist/client/session-translation-rules.js.map +1 -0
- package/data/build/dist/client/settings-bridge.d.ts +1 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -1
- package/data/build/dist/client/settings-bridge.js +29 -10
- package/data/build/dist/client/settings-bridge.js.map +1 -1
- package/data/build/dist/client/settings-section.d.ts.map +1 -1
- package/data/build/dist/client/settings-section.js +21 -3
- package/data/build/dist/client/settings-section.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/style.css +279 -276
- package/data/build/dist/client/subscription-slot.d.ts +26 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +679 -24
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/model.d.ts.map +1 -1
- package/data/build/dist/client/terminal/model.js +2 -1
- package/data/build/dist/client/terminal/model.js.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.js +68 -8
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.js +12 -21
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +3 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +43 -10
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js +71 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.d.ts +27 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts +30 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js +93 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts +12 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js +181 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +39 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js +27 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +88 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts +20 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js +65 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts +18 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +75 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts +32 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js +90 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts +52 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js +34 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts +11 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js +97 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js +164 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts +44 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js +240 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts +37 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js +35 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js +30 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js +132 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js +33 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js +37 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js +18 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts +28 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js +31 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts +2 -1
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js +32 -2
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js.map +1 -1
- 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 +23 -5
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +50 -3
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +27 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +94 -16
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.js +9 -8
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.js +7 -3
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +184 -21
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +28 -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 +158 -22
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts +91 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js +8 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js +81 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +6 -2
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +198 -26
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +33 -5
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +41 -4
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -1
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +5 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +65 -17
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +972 -102
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.js +5 -3
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +463 -59
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +48 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js +197 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +20 -3
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-detection.d.ts +72 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.js +298 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-management.d.ts +50 -0
- package/data/build/dist/host/cli-adapters/magpie-management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-management.js +1268 -0
- package/data/build/dist/host/cli-adapters/magpie-management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts +9 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js +90 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-update.d.ts +59 -0
- package/data/build/dist/host/cli-adapters/magpie-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-update.js +249 -0
- package/data/build/dist/host/cli-adapters/magpie-update.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts +148 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js +1710 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-web.d.ts +54 -0
- package/data/build/dist/host/cli-adapters/magpie-web.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-web.js +407 -0
- package/data/build/dist/host/cli-adapters/magpie-web.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.js +131 -0
- package/data/build/dist/host/cli-adapters/management-installation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts +37 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.js +144 -0
- package/data/build/dist/host/cli-adapters/management-methods.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.js +62 -0
- package/data/build/dist/host/cli-adapters/management-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management.js +177 -0
- package/data/build/dist/host/cli-adapters/management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/mcode-driver.js +12 -5
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.js +70 -7
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +13 -5
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +7 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +6 -3
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +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/opencode-v2-protocol.js +4 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +45 -11
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +4 -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 +20 -11
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +7 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +141 -51
- 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/standard-stream-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +4 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +2 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts +26 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js +30 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool.js +7 -6
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -1
- package/data/build/dist/host/cli-adapters/team-input.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/team-input.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/team-input.js +67 -0
- package/data/build/dist/host/cli-adapters/team-input.js.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.js +263 -0
- package/data/build/dist/host/cli-adapters/update-check.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-driver.js +7 -2
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js +149 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +14 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-holder.js +53 -6
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +8 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.js +63 -6
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.js +128 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts +23 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js +73 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +14 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.js +69 -7
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +102 -7
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js +9 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts +52 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js +311 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts +20 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js +61 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts +11 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js +23 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js +208 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.js +18 -0
- package/data/build/dist/host/cli-bridge/team-tool.js.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -1
- package/data/build/dist/host/dsh-gateway-feature.js +26 -3
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -1
- package/data/build/dist/host/features/file-management.d.ts.map +1 -1
- package/data/build/dist/host/features/file-management.js +10 -1
- package/data/build/dist/host/features/file-management.js.map +1 -1
- package/data/build/dist/host/features/git-commit-message.d.ts +5 -0
- package/data/build/dist/host/features/git-commit-message.d.ts.map +1 -0
- package/data/build/dist/host/features/git-commit-message.js +66 -0
- package/data/build/dist/host/features/git-commit-message.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts +11 -2
- package/data/build/dist/host/features/git-management.d.ts.map +1 -1
- package/data/build/dist/host/features/git-management.js +61 -7
- package/data/build/dist/host/features/git-management.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +2 -3
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/host-status.d.ts +25 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -1
- package/data/build/dist/host/features/host-status.js +60 -6
- package/data/build/dist/host/features/host-status.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/interaction-translation.d.ts +10 -0
- package/data/build/dist/host/features/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/interaction-translation.js +219 -0
- package/data/build/dist/host/features/interaction-translation.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/features/lan-access-dsh.js +64 -13
- 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 +13 -6
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/quick-apps.d.ts +4 -0
- package/data/build/dist/host/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/host/features/quick-apps.js +158 -0
- package/data/build/dist/host/features/quick-apps.js.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts +10 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.js +227 -0
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts +22 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.js +205 -0
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts +21 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.js +125 -0
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts +16 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.js +85 -0
- package/data/build/dist/host/features/session-translation-runtime.js.map +1 -0
- package/data/build/dist/host/features/session-translation-service.d.ts +19 -4
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-service.js +249 -210
- package/data/build/dist/host/features/session-translation-service.js.map +1 -1
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation.js +6 -3
- package/data/build/dist/host/features/session-translation.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 +32 -39
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts +14 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +87 -15
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +2 -2
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +10 -9
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts +3 -3
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js +26 -14
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts +5 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js +27 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +2 -1
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -1
- package/data/build/dist/host/modules/quick-apps/browse.d.ts +5 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.js +37 -0
- package/data/build/dist/host/modules/quick-apps/browse.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts +4 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js +39 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.js +87 -0
- package/data/build/dist/host/modules/quick-apps/documents.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.js +244 -0
- package/data/build/dist/host/modules/quick-apps/egress.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.js +15 -0
- package/data/build/dist/host/modules/quick-apps/errors.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js +149 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.js +80 -0
- package/data/build/dist/host/modules/quick-apps/launches.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.js +72 -0
- package/data/build/dist/host/modules/quick-apps/paths.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.js +195 -0
- package/data/build/dist/host/modules/quick-apps/registry.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts +38 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.js +238 -0
- package/data/build/dist/host/modules/quick-apps/remote.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts +27 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.js +174 -0
- package/data/build/dist/host/modules/quick-apps/service.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js +213 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +7 -1
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +10 -15
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts +15 -2
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +67 -15
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/session-changes.d.ts.map +1 -1
- package/data/build/dist/host/session-changes.js +6 -2
- package/data/build/dist/host/session-changes.js.map +1 -1
- package/data/build/dist/host/session-migration-repair.js +48 -35
- package/data/build/dist/host/session-migration-repair.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +36 -2
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/workspace-file-mutations.d.ts +2 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.js +15 -0
- package/data/build/dist/host/workspace-file-mutations.js.map +1 -0
- package/data/build/dist/host/workspace-root.d.ts +14 -0
- package/data/build/dist/host/workspace-root.d.ts.map +1 -0
- package/data/build/dist/host/workspace-root.js +99 -0
- package/data/build/dist/host/workspace-root.js.map +1 -0
- package/data/build/dist/shared/attachment-prompts.d.ts +11 -0
- package/data/build/dist/shared/attachment-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/attachment-prompts.js +17 -0
- package/data/build/dist/shared/attachment-prompts.js.map +1 -0
- package/data/build/dist/shared/cli-provider-route.d.ts +7 -0
- package/data/build/dist/shared/cli-provider-route.d.ts.map +1 -0
- package/data/build/dist/shared/cli-provider-route.js +13 -0
- package/data/build/dist/shared/cli-provider-route.js.map +1 -0
- package/data/build/dist/shared/codex-performance.d.ts +3 -0
- package/data/build/dist/shared/codex-performance.d.ts.map +1 -0
- package/data/build/dist/shared/codex-performance.js +2 -0
- package/data/build/dist/shared/codex-performance.js.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts +14 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.js +48 -0
- package/data/build/dist/shared/contracts/agent-team.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +62 -1
- 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 +25 -1
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +11 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/feature.d.ts +7 -0
- package/data/build/dist/shared/contracts/feature.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.d.ts +17 -0
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.js +27 -1
- package/data/build/dist/shared/contracts/git.js.map +1 -1
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts +32 -0
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js +2 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts +53 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.js +44 -0
- package/data/build/dist/shared/contracts/interaction-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/magpie-management.d.ts +395 -0
- package/data/build/dist/shared/contracts/magpie-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/magpie-management.js +2 -0
- package/data/build/dist/shared/contracts/magpie-management.js.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts +70 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.js +4 -0
- package/data/build/dist/shared/contracts/quick-apps.js.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts +82 -9
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/session-translation.js +146 -2
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -1
- package/data/build/dist/shared/contracts/subscription.d.ts +161 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/subscription.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +9 -15
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +8 -14
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/index.d.ts +4 -2
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js +3 -2
- package/data/build/dist/shared/index.js.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +4 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.js +4 -0
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.d.ts.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.js +1 -0
- package/data/build/dist/shared/provider-icon-resources.js.map +1 -1
- package/data/build/dist/shared/quick-app-browser-storage.d.ts +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-browser-storage.js +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts +8 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.js +192 -0
- package/data/build/dist/shared/quick-app-network-allow.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js +134 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts +6 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.js +18 -0
- package/data/build/dist/shared/quick-app-proxy-path.js.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js +189 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts +7 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js +10 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js.map +1 -0
- package/data/build/dist/shared/request-performance.d.ts +15 -0
- package/data/build/dist/shared/request-performance.d.ts.map +1 -0
- package/data/build/dist/shared/request-performance.js +3 -0
- package/data/build/dist/shared/request-performance.js.map +1 -0
- package/data/build/dist/shared/session-title.d.ts.map +1 -1
- package/data/build/dist/shared/session-title.js +10 -4
- package/data/build/dist/shared/session-title.js.map +1 -1
- package/data/build/dist/shared/translation-indicator.d.ts +26 -0
- package/data/build/dist/shared/translation-indicator.d.ts.map +1 -0
- package/data/build/dist/shared/translation-indicator.js +29 -0
- package/data/build/dist/shared/translation-indicator.js.map +1 -0
- package/package.json +35 -34
- package/profile/README.md +2 -2
- package/profile/package.json +3 -3
- package/profile/version.json +3 -3
- package/version.json +3 -3
- package/data/build/dist/client/client.model-catalog-cache.js.map +0 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { startSerialPolling } from './serial-polling.js';
|
|
2
|
-
import { createElement, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { createElement, Fragment, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
import { isSubscriptionUsageFresh } from '../shared/contracts/subscription.js';
|
|
4
4
|
import { DEFAULT_SUBSCRIPTION_USAGE_SETTINGS } from '../shared/contracts/config.js';
|
|
5
5
|
import { callCliRpc } from './cli-catalog.js';
|
|
6
6
|
import { resolveCodingNsTranslator, useCodingNsTranslator } from './locale.js';
|
|
7
7
|
import { providerIconUrl } from './provider-icons.js';
|
|
8
|
+
import { MagpieProviderLogo } from './features/magpie-provider-logo.js';
|
|
9
|
+
import { MAGPIE_REQUESTS_PAGE_SIZE, RequestsPage, installMagpiePageStyles } from './features/magpie-management-page.js';
|
|
10
|
+
import { createQuotaAccountBlock, createQuotaGroupHeader, formatQuotaCredits, formatQuotaNumber, groupQuotasByProvider, readWindowCreditBalance, resolveQuotaBalanceLabel, resolveQuotaCreditBalance, } from './features/subscription-quota-groups.js';
|
|
8
11
|
import { subscribeSessionAdapters } from './session-adapter-cache.js';
|
|
9
12
|
import { loadCliSessionConfig } from './cli-session-config-cache.js';
|
|
10
13
|
import { dshPopupSurfaceStyle, dshSettingsButtonStyle, dshSettingsPrimaryButtonStyle, dshThemeColor } from './theme.js';
|
|
11
|
-
import { useDismissOnOutsidePointer } from './popup-dismiss.js';
|
|
14
|
+
import { backdropPointerDownHandler, useDismissOnOutsidePointer } from './popup-dismiss.js';
|
|
15
|
+
import { callCodingNsRpcResult } from './rpc-call.js';
|
|
12
16
|
import { uiFontSize } from './font-scale.js';
|
|
13
17
|
const SUBSCRIPTION_STYLE_ID = 'codingns4dsh-subscription-responsive-style';
|
|
14
18
|
/**
|
|
@@ -48,6 +52,7 @@ function loadUsage(rpc, key, payload) {
|
|
|
48
52
|
if (existing !== undefined)
|
|
49
53
|
return existing;
|
|
50
54
|
const request = callCliRpc(rpc, 'subscription', payload, AbortSignal.timeout(30_000))
|
|
55
|
+
.then(normalizeSubscriptionSnapshot)
|
|
51
56
|
.finally(() => { if (loads.get(key) === request)
|
|
52
57
|
loads.delete(key); });
|
|
53
58
|
loads.set(key, request);
|
|
@@ -55,14 +60,28 @@ function loadUsage(rpc, key, payload) {
|
|
|
55
60
|
}
|
|
56
61
|
/** 图标重置按钮的悬停/按下/聚焦/禁用只能由注入样式表表达,内联样式无法命中伪类。 */
|
|
57
62
|
const RESET_BUTTON_CSS = '.codingns4dsh-subscription-reset{display:inline-flex;align-items:center;justify-content:center;flex:none;width:26px;height:26px;padding:0;border:1px solid var(--dsw-alias-border-l2,#d9d9d9);border-radius:50%;background:transparent;color:var(--dsw-alias-label-secondary,GrayText);cursor:pointer;transition:background .15s ease,color .15s ease}.codingns4dsh-subscription-reset:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.08));color:var(--dsw-alias-label-primary,CanvasText)}.codingns4dsh-subscription-reset:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active,rgba(127,127,127,.14))}.codingns4dsh-subscription-reset:focus-visible{outline:none;box-shadow:0 0 0 var(--dsw-focus-ring-width,2px) var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary,#1677ff))}.codingns4dsh-subscription-reset:disabled{opacity:.4;cursor:not-allowed}@media (prefers-reduced-motion: reduce){.codingns4dsh-subscription-reset{transition:none}}';
|
|
58
|
-
|
|
63
|
+
const MAGPIE_ROUTE_CSS = '@keyframes codingns4dsh-magpie-route-pulse{0%{transform:translateY(-120%);opacity:0}20%{opacity:1}80%{opacity:1}100%{transform:translateY(320%);opacity:0}}@keyframes codingns4dsh-magpie-route-breathe{0%,100%{box-shadow:0 0 0 0 rgba(22,119,255,0)}50%{box-shadow:0 0 0 4px rgba(22,119,255,.16)}}@keyframes codingns4dsh-magpie-route-step{from{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.codingns4dsh-magpie-route-pulse{animation:codingns4dsh-magpie-route-pulse 1.8s ease-in-out infinite}.codingns4dsh-magpie-route-node-active{animation:codingns4dsh-magpie-route-breathe 2s ease-in-out infinite}.codingns4dsh-magpie-route-step{animation:codingns4dsh-magpie-route-step .38s cubic-bezier(.2,.75,.25,1) both;transition:background .16s ease}.codingns4dsh-magpie-route-step:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.07))}.codingns4dsh-magpie-route-step:hover .codingns4dsh-magpie-route-node{box-shadow:0 0 0 1px var(--dsw-alias-state-business-primary,#1677ff),0 0 0 4px rgba(22,119,255,.1)}.codingns4dsh-magpie-route-node{transition:box-shadow .16s ease}.codingns4dsh-magpie-tab:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary,#1677ff)) inset}@media (prefers-reduced-motion:reduce){.codingns4dsh-magpie-route-pulse,.codingns4dsh-magpie-route-node-active,.codingns4dsh-magpie-route-step,.codingns4dsh-magpie-route-node{animation:none;transition:none}}';
|
|
64
|
+
const MAGPIE_REQUESTS_CSS = '.codingns4dsh-magpie-route-requests:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.08));color:var(--dsw-alias-label-primary,CanvasText)}.codingns4dsh-magpie-route-requests:focus-visible,.codingns4dsh-magpie-requests-close:focus-visible,.codingns4dsh-magpie-requests-retry:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary,#1677ff))}.codingns4dsh-magpie-requests-close:hover,.codingns4dsh-magpie-requests-retry:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.08));color:var(--dsw-alias-label-primary,CanvasText)}.codingns4dsh-magpie-requests-dialog:focus,.codingns4dsh-magpie-requests-dialog:focus-visible{outline:none}.codingns4dsh-magpie-requests-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}.codingns4dsh-magpie-requests-view{display:block!important;width:100%;height:auto!important;min-height:0;padding-left:0!important;background:transparent}.codingns4dsh-magpie-requests-view .codingns-magpie-view{max-width:none;padding:0}@media (max-width:768px){.codingns4dsh-magpie-requests-overlay{align-items:flex-end!important;padding:12px!important}.codingns4dsh-magpie-requests-dialog{width:100%!important;max-height:78vh!important;max-height:78dvh!important}}@media (prefers-reduced-motion:reduce){.codingns4dsh-magpie-route-requests{transition:none}}';
|
|
65
|
+
export function calculateMagpiePopoverPlacement(rootLeft, viewportWidth, sidebarLeft) {
|
|
66
|
+
const margin = 12;
|
|
67
|
+
const boundary = Math.min(viewportWidth - margin, sidebarLeft === null ? viewportWidth - margin : sidebarLeft - margin);
|
|
68
|
+
const width = Math.max(0, Math.min(400, boundary - margin));
|
|
69
|
+
const left = Math.max(margin, Math.min(rootLeft, boundary - width));
|
|
70
|
+
return { left: left - rootLeft, width };
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 移动端订阅入口只保留图标,完整数据仍可在点击后的弹层中查看。
|
|
74
|
+
* 弹层高度上限固定为浏览器可视高度的 75%:先写 `vh` 兜底,再由 `dvh` 覆盖,
|
|
75
|
+
* 使移动端工具栏收展后仍按真实可视区计算;超出部分在弹层内部纵向滚动。
|
|
76
|
+
*/
|
|
77
|
+
export const SUBSCRIPTION_RESPONSIVE_CSS = '@media (max-width: 768px){.codingns4dsh-subscription-trigger{gap:0!important;padding-left:4px!important;padding-right:4px!important}.codingns4dsh-subscription-label,.codingns4dsh-subscription-value{display:none!important}.codingns4dsh-subscription-popover{position:fixed!important;left:12px!important;right:12px!important;bottom:48px!important;width:auto!important;min-width:0!important;max-width:none!important;max-height:75vh!important;max-height:75dvh!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;box-sizing:border-box!important}}';
|
|
59
78
|
function installSubscriptionStyles() {
|
|
60
79
|
if (typeof document === 'undefined' || document.querySelector(`style[data-plugin-css="${SUBSCRIPTION_STYLE_ID}"]`) !== null)
|
|
61
80
|
return;
|
|
62
81
|
const style = document.createElement('style');
|
|
63
82
|
style.dataset.plugin = 'codingns4dsh';
|
|
64
83
|
style.dataset.pluginCss = SUBSCRIPTION_STYLE_ID;
|
|
65
|
-
style.textContent =
|
|
84
|
+
style.textContent = SUBSCRIPTION_RESPONSIVE_CSS + RESET_BUTTON_CSS + MAGPIE_ROUTE_CSS + MAGPIE_REQUESTS_CSS;
|
|
66
85
|
document.head.appendChild(style);
|
|
67
86
|
}
|
|
68
87
|
/** 在 DSH 原生步骤统计左侧显示当前 Agent 的订阅余量。 */
|
|
@@ -85,31 +104,93 @@ export function registerSubscriptionSlot(slots, rpc, getRefreshIntervalMins, loc
|
|
|
85
104
|
function CommandCodeSubscriptionSlot(props) {
|
|
86
105
|
const t = useCodingNsTranslator(props.locale ?? FALLBACK_LOCALE);
|
|
87
106
|
const subscriptionUsageCache = usageCache(props.rpc);
|
|
88
|
-
const [
|
|
107
|
+
const [snapshot, setSnapshot] = useState(null);
|
|
89
108
|
const [adapterId, setAdapterId] = useState(null);
|
|
90
109
|
const [providerId, setProviderId] = useState(null);
|
|
91
110
|
const [eligible, setEligible] = useState(false);
|
|
92
111
|
const [open, setOpen] = useState(false);
|
|
93
112
|
const [loading, setLoading] = useState(false);
|
|
113
|
+
const [magpieTab, setMagpieTab] = useState('usage');
|
|
114
|
+
// 多账号厂商默认只展开会话实际使用的账号;展开状态挂在根组件上,
|
|
115
|
+
// 弹层内容本身不持有 Hook,便于无浏览器的组件测试直接展开内容树。
|
|
116
|
+
const [expandedQuotaGroups, setExpandedQuotaGroups] = useState([]);
|
|
117
|
+
const toggleQuotaGroup = (provider) => {
|
|
118
|
+
setExpandedQuotaGroups((current) => current.includes(provider)
|
|
119
|
+
? current.filter((item) => item !== provider)
|
|
120
|
+
: [...current, provider]);
|
|
121
|
+
};
|
|
122
|
+
const [magpiePlacement, setMagpiePlacement] = useState({ left: 0, width: 400 });
|
|
94
123
|
const [clock, setClock] = useState(() => Date.now());
|
|
95
124
|
const rootRef = useRef(null);
|
|
125
|
+
const magpiePopoverRef = useRef(null);
|
|
96
126
|
const resetDialogRef = useRef(null);
|
|
97
127
|
// 重置成功后的刷新不能重跑加载 effect,否则 usage 会被清空导致底部入口闪断。
|
|
98
128
|
const refreshRef = useRef(null);
|
|
129
|
+
const routeRefreshControllerRef = useRef(null);
|
|
99
130
|
const [resetOpen, setResetOpen] = useState(false);
|
|
100
131
|
const [resetPending, setResetPending] = useState(false);
|
|
101
132
|
const [resetResult, setResetResult] = useState(null);
|
|
102
133
|
const [resetError, setResetError] = useState(null);
|
|
103
|
-
|
|
134
|
+
// Agent-native session bindings are written by Host during a turn. Refresh
|
|
135
|
+
// at turn state changes so a snapshot loaded before the binding is not kept.
|
|
136
|
+
const modelSelectionRevision = props.useSession?.((value) => JSON.stringify([value.modelSelection, value.running]));
|
|
104
137
|
// Agent、模型或 Provider 切换可能只改变 Host 侧会话配置,DSH 会话快照不一定会更新;
|
|
105
138
|
// 订阅适配器缓存的通知才能真正触发重新查询,否则底部会一直显示旧上游的数据。
|
|
106
139
|
const [adapterRevision, bumpAdapterRevision] = useState(0);
|
|
140
|
+
const openRef = useRef(open);
|
|
141
|
+
openRef.current = open;
|
|
142
|
+
const snapshotRef = useRef(snapshot);
|
|
143
|
+
snapshotRef.current = snapshot;
|
|
144
|
+
const hasMagpieSnapshot = snapshot?.magpie != null;
|
|
107
145
|
useEffect(() => subscribeSessionAdapters(() => { bumpAdapterRevision((value) => value + 1); }), []);
|
|
146
|
+
useLayoutEffect(() => {
|
|
147
|
+
if (!open || !hasMagpieSnapshot || typeof document === 'undefined' || typeof window === 'undefined')
|
|
148
|
+
return;
|
|
149
|
+
const root = rootRef.current;
|
|
150
|
+
const popover = magpiePopoverRef.current;
|
|
151
|
+
if (root === null || popover === null)
|
|
152
|
+
return;
|
|
153
|
+
const getOpenSidebar = () => [...document.querySelectorAll('[data-sidebar-right-session][data-sidebar-right-open]')]
|
|
154
|
+
.find((element) => element.closest('[hidden]') === null && element.getBoundingClientRect().width > 0);
|
|
155
|
+
let observedSidebar;
|
|
156
|
+
let resizeObserver;
|
|
157
|
+
const updatePlacement = () => {
|
|
158
|
+
const sidebar = getOpenSidebar();
|
|
159
|
+
if (sidebar !== observedSidebar) {
|
|
160
|
+
if (observedSidebar !== undefined)
|
|
161
|
+
resizeObserver?.unobserve(observedSidebar);
|
|
162
|
+
observedSidebar = sidebar;
|
|
163
|
+
if (observedSidebar !== undefined)
|
|
164
|
+
resizeObserver?.observe(observedSidebar);
|
|
165
|
+
}
|
|
166
|
+
if (window.innerWidth <= 768) {
|
|
167
|
+
setMagpiePlacement((current) => current.left === 0 && current.width === 400 ? current : { left: 0, width: 400 });
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const sidebarLeft = sidebar?.getBoundingClientRect().left ?? null;
|
|
171
|
+
const next = calculateMagpiePopoverPlacement(root.getBoundingClientRect().left, window.innerWidth, sidebarLeft);
|
|
172
|
+
setMagpiePlacement((current) => current.left === next.left && current.width === next.width ? current : next);
|
|
173
|
+
};
|
|
174
|
+
resizeObserver = typeof globalThis.ResizeObserver === 'function' ? new globalThis.ResizeObserver(updatePlacement) : undefined;
|
|
175
|
+
resizeObserver?.observe(root);
|
|
176
|
+
resizeObserver?.observe(popover);
|
|
177
|
+
updatePlacement();
|
|
178
|
+
const mutationObserver = typeof globalThis.MutationObserver === 'function' ? new globalThis.MutationObserver(updatePlacement) : undefined;
|
|
179
|
+
mutationObserver?.observe(document.documentElement, { attributes: true, attributeFilter: ['data-sidebar-right-open', 'hidden'], childList: true, subtree: true });
|
|
180
|
+
window.addEventListener('resize', updatePlacement);
|
|
181
|
+
document.addEventListener('scroll', updatePlacement, true);
|
|
182
|
+
return () => {
|
|
183
|
+
resizeObserver?.disconnect();
|
|
184
|
+
mutationObserver?.disconnect();
|
|
185
|
+
window.removeEventListener('resize', updatePlacement);
|
|
186
|
+
document.removeEventListener('scroll', updatePlacement, true);
|
|
187
|
+
};
|
|
188
|
+
}, [open, hasMagpieSnapshot]);
|
|
108
189
|
useEffect(() => {
|
|
109
190
|
const sessionId = props.sessionId?.trim();
|
|
110
191
|
if (!sessionId) {
|
|
111
192
|
setEligible(false);
|
|
112
|
-
|
|
193
|
+
setSnapshot(null);
|
|
113
194
|
setAdapterId(null);
|
|
114
195
|
setProviderId(null);
|
|
115
196
|
setOpen(false);
|
|
@@ -117,11 +198,15 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
117
198
|
setResetPending(false);
|
|
118
199
|
setResetResult(null);
|
|
119
200
|
setResetError(null);
|
|
201
|
+
setMagpieTab('usage');
|
|
120
202
|
return;
|
|
121
203
|
}
|
|
122
204
|
let active = true;
|
|
205
|
+
// 未解析的 Magpie 配额必须快速补读:官方余额一旦抢先显示,用户要等到下一次
|
|
206
|
+
// 轮询(默认 5 分钟)或整页刷新才会切到 Magpie。
|
|
207
|
+
let upstreamUnresolved = false;
|
|
123
208
|
setEligible(false);
|
|
124
|
-
|
|
209
|
+
setSnapshot(null);
|
|
125
210
|
setAdapterId(null);
|
|
126
211
|
setProviderId(null);
|
|
127
212
|
setOpen(false);
|
|
@@ -129,7 +214,9 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
129
214
|
setResetPending(false);
|
|
130
215
|
setResetResult(null);
|
|
131
216
|
setResetError(null);
|
|
132
|
-
|
|
217
|
+
setMagpieTab('usage');
|
|
218
|
+
const refresh = async (signal) => {
|
|
219
|
+
let routeSignal;
|
|
133
220
|
setLoading(true);
|
|
134
221
|
try {
|
|
135
222
|
// 订阅入口必须读取当前会话的真实 Provider;模型选择器切换后不能复用
|
|
@@ -139,12 +226,14 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
139
226
|
if (!active || !isSubscriptionAdapter(adapterId)) {
|
|
140
227
|
if (active) {
|
|
141
228
|
setEligible(false);
|
|
142
|
-
|
|
229
|
+
setSnapshot(null);
|
|
143
230
|
setAdapterId(null);
|
|
144
231
|
setProviderId(null);
|
|
145
232
|
}
|
|
146
233
|
return;
|
|
147
234
|
}
|
|
235
|
+
if (signal.aborted)
|
|
236
|
+
return false;
|
|
148
237
|
if (active) {
|
|
149
238
|
setEligible(true);
|
|
150
239
|
setAdapterId(adapterId);
|
|
@@ -154,31 +243,43 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
154
243
|
// 模型也是读取键的一部分:Antigravity 的 Gemini 与 Claude/GPT 是两个独立配额组。
|
|
155
244
|
// 会话 ID 同时承担 PeerHost 的路由身份;缓存也必须按会话隔离,
|
|
156
245
|
// 否则本机与远端使用相同 Agent/Provider/模型时会互相复用上游结果。
|
|
157
|
-
const cacheKey =
|
|
246
|
+
const cacheKey = JSON.stringify([adapterId, selection.providerId ?? '', selection.modelId ?? '', sessionId, selection.providerSessionId ?? '']);
|
|
247
|
+
const magpieSnapshot = snapshotRef.current?.magpie;
|
|
248
|
+
const includeRoute = magpieSnapshot !== null && magpieSnapshot !== undefined
|
|
249
|
+
&& (openRef.current || shouldResolveMagpieQuota(magpieSnapshot));
|
|
158
250
|
const cached = subscriptionUsageCache.get(cacheKey);
|
|
159
251
|
// New-API 的余额和 Token 日志可能随 Key/钱包状态快速变化,且旧结果
|
|
160
252
|
// 容易把历史日志投影到当前站点;每次刷新都重新读取,Sub2API 仍复用原缓存。
|
|
161
|
-
const canReuseCachedUsage = cached !== undefined && cached.usage.provider?.capability !== 'new-api';
|
|
162
|
-
if (canReuseCachedUsage && isSubscriptionUsageFresh(cached.capturedAt, Date.now(), intervalMins)) {
|
|
253
|
+
const canReuseCachedUsage = cached !== undefined && cached.usage.providerUsage?.provider?.capability !== 'new-api';
|
|
254
|
+
if (!includeRoute && canReuseCachedUsage && isSubscriptionUsageFresh(cached.capturedAt, Date.now(), intervalMins)) {
|
|
163
255
|
if (active)
|
|
164
|
-
|
|
256
|
+
setSnapshot(cached.usage);
|
|
165
257
|
return;
|
|
166
258
|
}
|
|
167
|
-
const
|
|
259
|
+
const payload = {
|
|
168
260
|
sessionId,
|
|
169
261
|
adapterId,
|
|
170
262
|
...(selection.providerId ? { providerId: selection.providerId } : {}),
|
|
171
263
|
...(selection.modelId ? { modelId: selection.modelId } : {}),
|
|
172
|
-
|
|
264
|
+
...(includeRoute ? { includeRoute: true } : {}),
|
|
265
|
+
};
|
|
266
|
+
routeSignal = includeRoute ? routeRefreshControllerRef.current?.signal : undefined;
|
|
267
|
+
const requestSignal = routeSignal === undefined ? signal : AbortSignal.any([signal, routeSignal]);
|
|
268
|
+
const next = includeRoute
|
|
269
|
+
? normalizeSubscriptionSnapshot(await callCliRpc(props.rpc, 'subscription', payload, requestSignal))
|
|
270
|
+
: await loadUsage(props.rpc, cacheKey, payload);
|
|
173
271
|
if (next !== null)
|
|
174
272
|
subscriptionUsageCache.set(cacheKey, { usage: next, capturedAt: Date.now() });
|
|
273
|
+
upstreamUnresolved = shouldResolveMagpieQuota(next?.magpie);
|
|
175
274
|
if (active)
|
|
176
|
-
|
|
275
|
+
setSnapshot(next);
|
|
177
276
|
}
|
|
178
277
|
catch {
|
|
278
|
+
if (signal.aborted || routeSignal?.aborted === true)
|
|
279
|
+
return false;
|
|
179
280
|
if (active) {
|
|
180
281
|
setEligible(false);
|
|
181
|
-
|
|
282
|
+
setSnapshot(null);
|
|
182
283
|
}
|
|
183
284
|
return false;
|
|
184
285
|
}
|
|
@@ -188,20 +289,46 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
188
289
|
}
|
|
189
290
|
};
|
|
190
291
|
const intervalMins = props.getRefreshIntervalMins?.() ?? DEFAULT_SUBSCRIPTION_USAGE_SETTINGS.refreshIntervalMins;
|
|
191
|
-
const
|
|
292
|
+
const pollIntervalMs = Math.max(0, intervalMins) * 60_000;
|
|
293
|
+
const poll = startSerialPolling(refresh, pollIntervalMs, {
|
|
294
|
+
timeoutMs: 30_000,
|
|
295
|
+
getIntervalMs: () => upstreamUnresolved ? Math.min(pollIntervalMs, MAGPIE_QUOTA_RETRY_MS) : pollIntervalMs,
|
|
296
|
+
});
|
|
192
297
|
refreshRef.current = poll.refresh;
|
|
193
298
|
return () => {
|
|
194
299
|
active = false;
|
|
300
|
+
routeRefreshControllerRef.current?.abort();
|
|
301
|
+
routeRefreshControllerRef.current = null;
|
|
195
302
|
refreshRef.current = null;
|
|
196
303
|
poll.dispose();
|
|
197
304
|
};
|
|
198
305
|
}, [props.rpc, props.sessionId, props.getRefreshIntervalMins, modelSelectionRevision, adapterRevision]);
|
|
306
|
+
// Route history is also required to resolve quotas for automatic models.
|
|
307
|
+
// The serial poller owns timing; this controller bounds the extra read to
|
|
308
|
+
// the panel lifetime or the period while the quota's upstream is unknown.
|
|
309
|
+
const magpieQuotaNeedsResolution = shouldResolveMagpieQuota(snapshot?.magpie);
|
|
310
|
+
const shouldLoadMagpieRoute = open || magpieQuotaNeedsResolution;
|
|
199
311
|
useEffect(() => {
|
|
200
|
-
if (!
|
|
312
|
+
if (!shouldLoadMagpieRoute || !hasMagpieSnapshot) {
|
|
313
|
+
routeRefreshControllerRef.current?.abort();
|
|
314
|
+
routeRefreshControllerRef.current = null;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
const controller = new AbortController();
|
|
318
|
+
routeRefreshControllerRef.current = controller;
|
|
319
|
+
void refreshRef.current?.({ afterPending: true });
|
|
320
|
+
return () => {
|
|
321
|
+
controller.abort();
|
|
322
|
+
if (routeRefreshControllerRef.current === controller)
|
|
323
|
+
routeRefreshControllerRef.current = null;
|
|
324
|
+
};
|
|
325
|
+
}, [shouldLoadMagpieRoute, hasMagpieSnapshot]);
|
|
326
|
+
useEffect(() => {
|
|
327
|
+
if (!eligible || snapshot === null)
|
|
201
328
|
return;
|
|
202
329
|
const timer = globalThis.setInterval(() => setClock(Date.now()), 60_000);
|
|
203
330
|
return () => globalThis.clearInterval(timer);
|
|
204
|
-
}, [eligible,
|
|
331
|
+
}, [eligible, snapshot]);
|
|
205
332
|
const closeResetDialog = () => {
|
|
206
333
|
if (resetPending)
|
|
207
334
|
return;
|
|
@@ -236,8 +363,40 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
236
363
|
};
|
|
237
364
|
useDismissOnOutsidePointer(rootRef, open, () => setOpen(false));
|
|
238
365
|
useDismissOnOutsidePointer(resetDialogRef, resetOpen && !resetPending, closeResetDialog);
|
|
366
|
+
if (!eligible || snapshot === null)
|
|
367
|
+
return null;
|
|
368
|
+
if (snapshot.magpie !== null) {
|
|
369
|
+
const magpie = snapshot.magpie;
|
|
370
|
+
const readout = resolveMagpieTriggerReadout(magpie);
|
|
371
|
+
const label = t('usage.magpieUsageLabel');
|
|
372
|
+
return createElement('div', { ref: rootRef, style: subscriptionRootStyle }, createElement('button', {
|
|
373
|
+
type: 'button',
|
|
374
|
+
className: 'codingns4dsh-subscription-trigger',
|
|
375
|
+
onClick: () => setOpen((value) => !value),
|
|
376
|
+
'aria-label': label,
|
|
377
|
+
'aria-expanded': open,
|
|
378
|
+
style: subscriptionTriggerStyle,
|
|
379
|
+
}, createElement('span', { style: magpieTriggerIconStyle, 'aria-hidden': true }, createElement('img', {
|
|
380
|
+
src: providerIconUrl('magpie') ?? '/api/codingns/provider-icons/magpie.png',
|
|
381
|
+
alt: '',
|
|
382
|
+
width: 20,
|
|
383
|
+
height: 20,
|
|
384
|
+
style: magpieTriggerImageStyle,
|
|
385
|
+
})), createMagpieTriggerReadout(readout, t)), open && createElement(MagpieUsagePopover, {
|
|
386
|
+
rpc: props.rpc,
|
|
387
|
+
usage: magpie,
|
|
388
|
+
t,
|
|
389
|
+
tab: magpieTab,
|
|
390
|
+
onTabChange: setMagpieTab,
|
|
391
|
+
expandedGroups: expandedQuotaGroups,
|
|
392
|
+
onToggleGroup: toggleQuotaGroup,
|
|
393
|
+
placement: magpiePlacement,
|
|
394
|
+
popoverRef: magpiePopoverRef,
|
|
395
|
+
}));
|
|
396
|
+
}
|
|
397
|
+
const usage = snapshot.providerUsage;
|
|
239
398
|
// 未拿到真实订阅数据时不占用底部栏空间;加载状态不能伪装成订阅存在。
|
|
240
|
-
if (
|
|
399
|
+
if (usage === null || (usage.sub2api === undefined && usage.deepseek === undefined && usage.providerBalance === undefined && resolveDisplayWindow(usage) === null))
|
|
241
400
|
return null;
|
|
242
401
|
const sub2api = usage.sub2api;
|
|
243
402
|
const deepseek = usage.deepseek;
|
|
@@ -314,6 +473,365 @@ function CommandCodeSubscriptionSlot(props) {
|
|
|
314
473
|
dialogRef: resetDialogRef,
|
|
315
474
|
}));
|
|
316
475
|
}
|
|
476
|
+
function MagpieUsagePopover({ rpc, usage, t, tab = 'usage', onTabChange = () => { }, expandedGroups = [], onToggleGroup = () => { }, placement = { left: 0, width: 400 }, popoverRef }) {
|
|
477
|
+
const aggregateRows = usage.aggregate === null ? [] : [
|
|
478
|
+
[t('usage.magpieRequests'), formatMagpieNumber(usage.aggregate.calls)],
|
|
479
|
+
[t('usage.magpieErrors'), formatMagpieNumber(usage.aggregate.errors)],
|
|
480
|
+
[t('usage.magpieInputTokens'), formatMagpieTokenCount(usage.aggregate.inputTokens)],
|
|
481
|
+
[t('usage.magpieOutputTokens'), formatMagpieTokenCount(usage.aggregate.outputTokens)],
|
|
482
|
+
[t('usage.magpieCacheReadTokens'), formatMagpieTokenCount(usage.aggregate.cacheReadTokens)],
|
|
483
|
+
[t('usage.magpieCacheWriteTokens'), formatMagpieTokenCount(usage.aggregate.cacheWriteTokens)],
|
|
484
|
+
[t('usage.magpieTotalTokens'), formatMagpieTokenCount(sumKnownCounts(usage.aggregate.inputTokens, usage.aggregate.outputTokens))],
|
|
485
|
+
[t('usage.magpieCacheHitRate'), formatMagpieCacheHitRate(usage.aggregate.inputTokens, usage.aggregate.cacheReadTokens)],
|
|
486
|
+
[t('usage.magpieCost'), formatMagpieCost(usage.aggregate.costUsd)],
|
|
487
|
+
];
|
|
488
|
+
const sessionRows = usage.session === null ? [] : [
|
|
489
|
+
[t('usage.magpieRequests'), formatMagpieNumber(usage.session.calls)],
|
|
490
|
+
[t('usage.magpieErrors'), formatMagpieNumber(usage.session.errors)],
|
|
491
|
+
[t('usage.magpieInputTokens'), formatMagpieTokenCount(usage.session.inputTokens)],
|
|
492
|
+
[t('usage.magpieOutputTokens'), formatMagpieTokenCount(usage.session.outputTokens)],
|
|
493
|
+
[t('usage.magpieCacheReadTokens'), formatMagpieTokenCount(usage.session.cacheReadTokens)],
|
|
494
|
+
[t('usage.magpieCacheWriteTokens'), formatMagpieTokenCount(usage.session.cacheWriteTokens)],
|
|
495
|
+
[t('usage.magpieTotalTokens'), formatMagpieTokenCount(sumKnownCounts(usage.session.inputTokens, usage.session.outputTokens))],
|
|
496
|
+
[t('usage.magpieCacheHitRate'), formatMagpieCacheHitRate(usage.session.inputTokens, usage.session.cacheReadTokens)],
|
|
497
|
+
[t('usage.magpieCost'), formatMagpieCost(usage.session.costUsd)],
|
|
498
|
+
];
|
|
499
|
+
const quotas = usage.quotas ?? [];
|
|
500
|
+
const tabs = [
|
|
501
|
+
{ id: 'usage', label: t('usage.magpieTabUsage') },
|
|
502
|
+
{ id: 'route', label: t('usage.magpieTabRoute') },
|
|
503
|
+
];
|
|
504
|
+
return createElement('div', {
|
|
505
|
+
ref: popoverRef,
|
|
506
|
+
className: 'codingns4dsh-subscription-popover',
|
|
507
|
+
role: 'dialog',
|
|
508
|
+
'aria-label': t('usage.magpieUsageLabel'),
|
|
509
|
+
style: { ...magpiePopoverStyle, left: placement.left, width: placement.width, maxWidth: placement.width },
|
|
510
|
+
}, createElement('div', { style: magpiePopoverHeadingStyle }, createElement('div', { style: magpiePopoverHeadingTextStyle }, createElement('strong', undefined, t('usage.magpieTitle'))), createElement('span', { style: magpieHeaderMetaStyle }, createElement('span', { style: magpieHeaderMutedStyle }, t('usage.magpieUpdated', { time: formatMagpieTimestamp(usage.capturedAt) })))), createElement('div', { role: 'tablist', 'aria-label': t('usage.magpieUsageLabel'), style: magpieTabsStyle }, ...tabs.map((entry) => createElement('button', {
|
|
511
|
+
key: entry.id,
|
|
512
|
+
type: 'button',
|
|
513
|
+
role: 'tab',
|
|
514
|
+
id: `codingns4dsh-magpie-tab-${entry.id}`,
|
|
515
|
+
'aria-selected': tab === entry.id,
|
|
516
|
+
'aria-controls': `codingns4dsh-magpie-panel-${entry.id}`,
|
|
517
|
+
className: 'codingns4dsh-magpie-tab',
|
|
518
|
+
onClick: () => onTabChange(entry.id),
|
|
519
|
+
style: { ...magpieTabStyle, ...(tab === entry.id ? magpieTabActiveStyle : {}) },
|
|
520
|
+
}, entry.label))), createElement('div', {
|
|
521
|
+
role: 'tabpanel',
|
|
522
|
+
id: `codingns4dsh-magpie-panel-${tab}`,
|
|
523
|
+
'aria-labelledby': `codingns4dsh-magpie-tab-${tab}`,
|
|
524
|
+
style: magpieTabPanelStyle,
|
|
525
|
+
}, tab === 'usage' ? MagpieUsagePanel({ usage, aggregateRows, sessionRows, t })
|
|
526
|
+
: MagpieRoutePanel({ rpc, usage, quotas, t, expandedGroups, onToggleGroup })));
|
|
527
|
+
}
|
|
528
|
+
function MagpieUsagePanel({ usage, aggregateRows, sessionRows, t }) {
|
|
529
|
+
return createElement('div', undefined, createElement('section', { style: magpieUsageSectionStyle }, createElement('strong', { style: magpieSectionTitleStyle }, t('usage.magpieAggregateTitle')), usage.usageStatus === 'available'
|
|
530
|
+
? createMagpieRows(aggregateRows)
|
|
531
|
+
: createElement('div', { style: magpieMutedTextStyle }, t('usage.magpieUsageUnavailable'))), createElement('section', { style: magpieUsageSectionStyle }, createElement('strong', { style: magpieSectionTitleStyle }, t('usage.magpieSessionTitle')), usage.sessionId !== null && createElement('div', { style: magpieSessionIdentityStyle }, createElement('span', undefined, t('usage.magpieAgent', { agent: usage.agent })), usage.sessionName !== undefined && createElement('strong', { style: magpieSessionNameStyle, title: usage.sessionName }, usage.sessionName), createElement('code', { style: magpieSessionIdStyle }, usage.sessionId)), usage.session === null
|
|
532
|
+
? createElement('div', { style: magpieMutedTextStyle }, usage.sessionId === null ? t('usage.magpieSessionIdUnavailable') : t('usage.magpieSessionNoUsage'))
|
|
533
|
+
: createMagpieRows(sessionRows)));
|
|
534
|
+
}
|
|
535
|
+
function magpieQuotaUnavailableMessage(usage, quotas, t) {
|
|
536
|
+
return usage.quotaStatus === 'unavailable'
|
|
537
|
+
? t('usage.magpieQuotaUnavailable')
|
|
538
|
+
: usage.quotaStatus === 'provider-unavailable'
|
|
539
|
+
? t('usage.magpieQuotaProviderUnavailable')
|
|
540
|
+
: quotas.length === 0 ? t('usage.magpieQuotaNoData') : null;
|
|
541
|
+
}
|
|
542
|
+
function createMagpieProviderBadges(usage, style) {
|
|
543
|
+
const providers = usage.upstreamProviders ?? (usage.upstreamProvider === null ? [] : [usage.upstreamProvider]);
|
|
544
|
+
if (providers.length === 0)
|
|
545
|
+
return null;
|
|
546
|
+
return createElement('span', { style }, ...providers.map((provider) => createElement('span', { key: provider, style: magpieProviderBadgeStyle }, provider)));
|
|
547
|
+
}
|
|
548
|
+
function createMagpieQuotaCard(quota, t, index) {
|
|
549
|
+
return createElement('div', { key: `${quota.provider}-${quota.user ?? 'account'}-${index}`, style: magpieQuotaCardStyle }, createElement('div', { style: magpieQuotaCardHeadingStyle }, createElement('span', { style: magpieQuotaNameWithLogoStyle }, createElement(MagpieProviderLogo, { identities: [quota.provider, quota.name], logoDataUrl: quota.logoDataUrl, size: 20, className: 'codingns4dsh-magpie-quota-logo', fallback: 'none' }), createElement('span', { style: magpieQuotaNameStyle }, quota.alias ?? quota.name)), createElement('span', { style: magpieQuotaHeadingMetaStyle }, quota.plan ?? quota.provider)), (quota.user !== null || quota.balance !== null) && createElement('div', { style: magpieQuotaIdentityStyle }, quota.user !== null && createElement('span', { title: quota.user }, t('usage.magpieQuotaAccount', { account: quota.user })), quota.balance !== null && createElement('span', undefined, t('usage.magpieQuotaBalance', { balance: quota.balance }))), quota.windows.length === 0
|
|
550
|
+
? createElement('div', { style: magpieQuotaMetaStyle }, t('usage.magpieQuotaNoWindows'))
|
|
551
|
+
: quota.windows.map((window, windowIndex) => {
|
|
552
|
+
const remaining = window.remainingPercent;
|
|
553
|
+
// 积分窗口(WorkBuddy 的 `0 / 350`)按数量读更准确:百分比在这里没有意义。
|
|
554
|
+
const credits = formatQuotaWindowCredits(window);
|
|
555
|
+
const amount = window.display ?? (window.amount !== null && window.limit !== null ? `${window.amount} / ${window.limit}${window.unit === null ? '' : ` ${window.unit}`}` : null);
|
|
556
|
+
return createElement('div', { key: `${window.name}-${windowIndex}`, style: magpieQuotaWindowStyle }, createElement('div', { style: windowHeadingStyle }, createElement('span', undefined, window.name), credits !== null
|
|
557
|
+
? createElement('strong', undefined, credits)
|
|
558
|
+
: remaining === null ? amount : createElement('strong', undefined, `${formatPercent(remaining)}%`)),
|
|
559
|
+
// 积分窗口用满格数量条展示已用比例,避免"0% 还能用"的误读。
|
|
560
|
+
remaining !== null && createElement('div', { role: 'progressbar', 'aria-label': t('usage.magpieQuotaRemaining', { name: window.name, percent: formatPercent(remaining) }), 'aria-valuemin': 0, 'aria-valuemax': 100, 'aria-valuenow': remaining, style: barStyle }, createElement('span', { style: { ...barFillStyle, width: `${remaining}%` } })), (amount !== null || window.resetsAt !== null) && createElement('div', { style: magpieQuotaFooterStyle }, amount !== null && createElement('span', undefined, amount), window.resetsAt !== null && createElement('span', undefined, t('usage.magpieQuotaResets', { time: formatMagpieTimestamp(window.resetsAt) }))));
|
|
561
|
+
}));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* 单个窗口若是按积分计量,返回"剩余 / 上限"文本;普通百分比窗口返回 null。
|
|
565
|
+
*
|
|
566
|
+
* 卡片会为每个窗口单独调用一次,所以这里按窗口自治判断,不依赖账号整体状态。
|
|
567
|
+
*/
|
|
568
|
+
function formatQuotaWindowCredits(window) {
|
|
569
|
+
const credits = readWindowCreditBalance(window);
|
|
570
|
+
return credits === null ? null : formatQuotaCredits(credits);
|
|
571
|
+
}
|
|
572
|
+
function MagpieRoutePanel({ rpc, usage, quotas, t, expandedGroups, onToggleGroup }) {
|
|
573
|
+
const route = usage.route;
|
|
574
|
+
const groups = groupQuotasByProvider(quotas);
|
|
575
|
+
const sessionAccount = route?.providerAccount ?? null;
|
|
576
|
+
const quotaMessage = magpieQuotaUnavailableMessage(usage, quotas, t);
|
|
577
|
+
const routeStatus = usage.routeStatus === 'no-route'
|
|
578
|
+
? t('usage.magpieRouteNoRequests')
|
|
579
|
+
: usage.routeStatus === 'session-unavailable'
|
|
580
|
+
? t('usage.magpieSessionIdUnavailable')
|
|
581
|
+
: t('usage.magpieRouteUnavailable');
|
|
582
|
+
const routeStages = route === null ? [] : [
|
|
583
|
+
[t('usage.magpieAskedModel'), route.asked],
|
|
584
|
+
[t('usage.magpieRoutedModel'), route.model],
|
|
585
|
+
[t('usage.magpieServedModel'), route.served],
|
|
586
|
+
].filter((stage, index, all) => stage[1] !== null && all.findIndex((item) => item[1] === stage[1]) === index);
|
|
587
|
+
const active = route?.done === false;
|
|
588
|
+
const routeRows = route === null ? [] : [
|
|
589
|
+
[t('usage.magpieRouteGroup'), route.group],
|
|
590
|
+
[t('usage.magpieRouteRule'), route.rule],
|
|
591
|
+
[t('usage.magpieRouteAccount'), route.providerAccount ?? null],
|
|
592
|
+
[t('usage.magpieEffort'), route.effort],
|
|
593
|
+
[t('usage.magpieRequestStatus'), route.status === null ? null : `${route.done === true ? t('usage.magpieRouteDone') : route.done === false ? t('usage.magpieRouteRunning') : ''}${route.status}`],
|
|
594
|
+
];
|
|
595
|
+
return createElement('div', undefined, createElement('section', { style: magpieSectionStyle }, createElement('div', { style: magpieQuotaHeadingStyle }, createElement('strong', { style: magpieSectionTitleStyle }, t('usage.magpieQuotaTitle')), createMagpieProviderBadges(usage, magpieProviderBadgesStyle)), quotaMessage !== null
|
|
596
|
+
? createElement('div', { style: magpieEmptyStateStyle }, quotaMessage)
|
|
597
|
+
: groups.map((group) => {
|
|
598
|
+
const expanded = expandedGroups.includes(group.provider);
|
|
599
|
+
const multiple = group.accounts.length > 1;
|
|
600
|
+
return createElement('div', { key: group.provider, style: magpieQuotaCardStyle }, createQuotaGroupHeader({
|
|
601
|
+
group,
|
|
602
|
+
t,
|
|
603
|
+
expanded,
|
|
604
|
+
onToggle: multiple ? () => onToggleGroup(group.provider) : null,
|
|
605
|
+
}), group.accounts.map((quota, index) => createElement('div', { key: `${group.provider}-${quota.user ?? 'account'}-${index}` }, createQuotaAccountBlock(quota, {
|
|
606
|
+
t,
|
|
607
|
+
nowMs: Date.now(),
|
|
608
|
+
// 单账号厂商由组头承担名称,账号块不再重复。
|
|
609
|
+
showAccountName: multiple,
|
|
610
|
+
// 组未展开时只留会话账号的明细,其余账号折叠成余量行。
|
|
611
|
+
compact: multiple && !expanded && quota.active !== true && (sessionAccount === null || quota.user !== sessionAccount),
|
|
612
|
+
fallbackName: group.name === '' ? group.provider : group.name,
|
|
613
|
+
}))));
|
|
614
|
+
})), createElement('section', { style: magpieSectionStyle }, createElement('div', { style: magpieRouteHeadingStyle }, createElement('strong', { style: magpieSectionTitleStyle }, t('usage.magpieRouteTitle')), route !== null && createElement('div', { style: magpieRouteHeadingActionsStyle },
|
|
615
|
+
// “查看请求”入口与状态徽标同高、同排:入口在左,状态在右。
|
|
616
|
+
createElement(MagpieRouteRequests, {
|
|
617
|
+
rpc,
|
|
618
|
+
sessionId: usage.sessionId,
|
|
619
|
+
sessionName: usage.sessionName ?? null,
|
|
620
|
+
agent: usage.agent,
|
|
621
|
+
t,
|
|
622
|
+
}), createElement('span', { className: active ? 'codingns4dsh-magpie-route-node-active' : undefined, style: magpieRouteStatusStyle }, createElement('span', { style: magpieRouteStatusDotStyle }), createElement('strong', undefined, route.done === true ? t('usage.magpieRouteComplete') : route.done === false ? t('usage.magpieRouteRunning').replace(/\s*·\s*$/u, '') : route.status ?? '--')))), route === null
|
|
623
|
+
? createElement('div', { style: magpieEmptyStateStyle }, routeStatus)
|
|
624
|
+
: createElement('div', { style: magpieRouteHeroStyle }, createElement('div', { style: magpieRouteTrackStyle, 'aria-label': t('usage.magpieRouteFlowTitle'), role: 'list' }, ...routeStages.map(([label, model], index) => createElement('div', {
|
|
625
|
+
key: `step-${index}`,
|
|
626
|
+
className: 'codingns4dsh-magpie-route-step',
|
|
627
|
+
role: 'listitem',
|
|
628
|
+
style: { ...magpieRouteTrackItemStyle, animationDelay: `${index * 90}ms` },
|
|
629
|
+
}, createElement('div', { style: magpieRouteMarkerColumnStyle, 'aria-hidden': true }, createElement('div', { className: 'codingns4dsh-magpie-route-node', style: magpieRouteNodeStyle }, createElement('span', { style: magpieRouteNodeDotStyle })), index < routeStages.length - 1 && createElement('div', { style: magpieRouteConnectorStyle }, active && createElement('span', { className: 'codingns4dsh-magpie-route-pulse', style: magpieRoutePulseStyle }))), createElement('div', { style: magpieRouteStageCopyStyle }, createElement('span', { style: magpieRouteStageLabelStyle }, label), createElement('strong', { style: magpieRouteStageValueStyle, title: model }, model))))), routeRows.length > 0 && createElement('div', { style: magpieRouteMetaStyle }, ...routeRows.filter((row) => row[1] !== null).map(([label, value]) => createElement('div', { key: label, style: magpieRouteMetaItemStyle }, createElement('span', { style: magpieRouteMetaLabelStyle }, label), createElement('strong', { style: magpieRouteMetaValueStyle, title: value }, value)))), route.tries.length > 0 && createElement('div', { style: magpieAttemptsStyle }, ...route.tries.map((attempt, index) => createElement('div', { key: `${attempt.model ?? 'model'}-${index}`, style: magpieAttemptRowStyle }, createElement('span', { style: magpieAttemptModelStyle }, attempt.model ?? t('usage.magpieUnknownModel')), attempt.failed && createElement('span', { style: magpieFailedStyle }, t('usage.magpieFallback'))))))));
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* 路由标题栏的“查看请求”入口:按钮、模态框与读取状态放在同一个子组件里。
|
|
633
|
+
*
|
|
634
|
+
* 弹层内容本身不持有 Hook(无浏览器测试会直接展开内容树),因此这里只由
|
|
635
|
+
* `MagpieRoutePanel` 渲染元素,真正的状态留在本组件内部。模态框内的请求明细
|
|
636
|
+
* 直接复用管理页的 `RequestsPage`,只把会话筛选固定为当前会话。
|
|
637
|
+
*/
|
|
638
|
+
export function MagpieRouteRequests({ rpc, sessionId, sessionName, agent, t }) {
|
|
639
|
+
const enabled = canReadMagpieSessionRequests(sessionId, agent);
|
|
640
|
+
const [open, setOpen] = useState(false);
|
|
641
|
+
const [page, setPage] = useState(null);
|
|
642
|
+
const [offset, setOffset] = useState(0);
|
|
643
|
+
const [loading, setLoading] = useState(false);
|
|
644
|
+
const [error, setError] = useState(false);
|
|
645
|
+
const [reloadKey, setReloadKey] = useState(0);
|
|
646
|
+
const controllerRef = useRef(null);
|
|
647
|
+
useEffect(() => {
|
|
648
|
+
if (!open || !enabled)
|
|
649
|
+
return;
|
|
650
|
+
const controller = new AbortController();
|
|
651
|
+
controllerRef.current = controller;
|
|
652
|
+
setLoading(true);
|
|
653
|
+
setError(false);
|
|
654
|
+
void readMagpieSessionRequestPage(rpc, sessionId, agent, offset, controller.signal).then((next) => {
|
|
655
|
+
if (controller.signal.aborted)
|
|
656
|
+
return;
|
|
657
|
+
if (next === null) {
|
|
658
|
+
setError(true);
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
setPage(next);
|
|
662
|
+
}).catch(() => {
|
|
663
|
+
if (!controller.signal.aborted)
|
|
664
|
+
setError(true);
|
|
665
|
+
}).finally(() => {
|
|
666
|
+
if (!controller.signal.aborted)
|
|
667
|
+
setLoading(false);
|
|
668
|
+
});
|
|
669
|
+
return () => {
|
|
670
|
+
controller.abort();
|
|
671
|
+
if (controllerRef.current === controller)
|
|
672
|
+
controllerRef.current = null;
|
|
673
|
+
};
|
|
674
|
+
}, [open, enabled, offset, reloadKey, rpc, sessionId, agent]);
|
|
675
|
+
// 模态框覆盖整个视口,Esc 是移动端之外唯一的键盘关闭方式。
|
|
676
|
+
useEffect(() => {
|
|
677
|
+
if (!open || typeof document === 'undefined')
|
|
678
|
+
return;
|
|
679
|
+
// 捕获阶段拦截 Esc:只关闭模态框,不再让底部弹层的关闭监听把整个弹层一起收起。
|
|
680
|
+
const onKeyDown = (event) => {
|
|
681
|
+
if (event.key !== 'Escape')
|
|
682
|
+
return;
|
|
683
|
+
event.stopPropagation();
|
|
684
|
+
setOpen(false);
|
|
685
|
+
};
|
|
686
|
+
document.addEventListener('keydown', onKeyDown, true);
|
|
687
|
+
return () => document.removeEventListener('keydown', onKeyDown, true);
|
|
688
|
+
}, [open]);
|
|
689
|
+
const close = () => {
|
|
690
|
+
controllerRef.current?.abort();
|
|
691
|
+
controllerRef.current = null;
|
|
692
|
+
setOpen(false);
|
|
693
|
+
};
|
|
694
|
+
const openRequests = () => {
|
|
695
|
+
controllerRef.current?.abort();
|
|
696
|
+
setPage(null);
|
|
697
|
+
setOffset(0);
|
|
698
|
+
setError(false);
|
|
699
|
+
setLoading(true);
|
|
700
|
+
// 请求明细复用管理页组件,需要先装上管理页自己的样式表。
|
|
701
|
+
installMagpiePageStyles();
|
|
702
|
+
setOpen(true);
|
|
703
|
+
};
|
|
704
|
+
return createElement(Fragment, undefined, enabled && createElement('button', {
|
|
705
|
+
type: 'button',
|
|
706
|
+
className: 'codingns4dsh-magpie-route-requests',
|
|
707
|
+
onClick: openRequests,
|
|
708
|
+
'aria-haspopup': 'dialog',
|
|
709
|
+
title: t('usage.magpieViewRequests'),
|
|
710
|
+
style: magpieRouteRequestsButtonStyle,
|
|
711
|
+
}, t('usage.magpieViewRequests')), enabled && open && createElement(MagpieSessionRequestsDialog, {
|
|
712
|
+
sessionId,
|
|
713
|
+
sessionName,
|
|
714
|
+
agent,
|
|
715
|
+
page,
|
|
716
|
+
offset,
|
|
717
|
+
loading,
|
|
718
|
+
error,
|
|
719
|
+
t,
|
|
720
|
+
onClose: close,
|
|
721
|
+
onOffsetChange: setOffset,
|
|
722
|
+
onRetry: () => { setLoading(true); setError(false); setReloadKey((value) => value + 1); },
|
|
723
|
+
}));
|
|
724
|
+
}
|
|
725
|
+
/** Host 只接受小写 Agent ID;会话与 Agent 必须成对出现,缺一不可。 */
|
|
726
|
+
function canReadMagpieSessionRequests(sessionId, agent) {
|
|
727
|
+
return sessionId !== null && sessionId.trim() !== '' && sessionId.length <= 512 && /^[a-z0-9][a-z0-9-]*$/u.test(agent);
|
|
728
|
+
}
|
|
729
|
+
/** 只读取今天的会话请求,与路由卡片和“当前 Agent 会话”用量保持同一时间口径。 */
|
|
730
|
+
async function readMagpieSessionRequestPage(rpc, sessionId, agent, offset, signal) {
|
|
731
|
+
const result = await callCodingNsRpcResult(rpc, 'magpie/usage/requests', {
|
|
732
|
+
period: 'today',
|
|
733
|
+
offset,
|
|
734
|
+
limit: MAGPIE_REQUESTS_PAGE_SIZE,
|
|
735
|
+
sessionId,
|
|
736
|
+
sessionAgent: agent,
|
|
737
|
+
}, signal);
|
|
738
|
+
if (!result.ok)
|
|
739
|
+
throw new Error(result.error.message);
|
|
740
|
+
const value = result.value;
|
|
741
|
+
return isRecord(value) && Array.isArray(value.items)
|
|
742
|
+
? value
|
|
743
|
+
: null;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* 请求模态框:外壳(遮罩、标题、关闭)由弹层提供,明细直接复用管理页的请求用量视图。
|
|
747
|
+
*
|
|
748
|
+
* 管理页视图自带统计条、桌面表格 / 移动卡片、分页和空状态,这里只负责把会话固定住,
|
|
749
|
+
* 不再维护一套重复的请求卡片渲染。
|
|
750
|
+
*/
|
|
751
|
+
function MagpieSessionRequestsDialog({ sessionId, sessionName, agent, page, offset, loading, error, t, onClose, onOffsetChange, onRetry }) {
|
|
752
|
+
return createElement('div', {
|
|
753
|
+
className: 'codingns4dsh-magpie-requests-overlay',
|
|
754
|
+
role: 'presentation',
|
|
755
|
+
style: magpieRequestsOverlayStyle,
|
|
756
|
+
// 只有按在遮罩自身时才关闭;从内容内部按下再拖到遮罩上不会误关。
|
|
757
|
+
onPointerDown: backdropPointerDownHandler(onClose),
|
|
758
|
+
}, createElement('div', {
|
|
759
|
+
role: 'dialog',
|
|
760
|
+
'aria-modal': true,
|
|
761
|
+
'aria-label': t('usage.magpieRequestsTitle'),
|
|
762
|
+
className: 'codingns4dsh-magpie-requests-dialog',
|
|
763
|
+
tabIndex: -1,
|
|
764
|
+
autoFocus: true,
|
|
765
|
+
style: magpieRequestsDialogStyle,
|
|
766
|
+
}, createElement('div', { style: magpieRequestsHeadingStyle }, createElement('strong', { style: magpieRequestsTitleStyle }, t('usage.magpieRequestsTitle')), createElement('div', { style: magpieRequestsHeadingActionsStyle }, error && createElement('button', {
|
|
767
|
+
type: 'button',
|
|
768
|
+
className: 'codingns4dsh-magpie-requests-retry',
|
|
769
|
+
onClick: onRetry,
|
|
770
|
+
style: magpieRequestsRetryStyle,
|
|
771
|
+
}, t('magpie.refresh')), createElement('button', {
|
|
772
|
+
type: 'button',
|
|
773
|
+
className: 'codingns4dsh-magpie-requests-close',
|
|
774
|
+
onClick: onClose,
|
|
775
|
+
'aria-label': t('usage.magpieRequestsClose'),
|
|
776
|
+
style: magpieRequestsCloseStyle,
|
|
777
|
+
}, '×'))), createElement('div', { className: 'codingns4dsh-magpie-requests-body', style: magpieRequestsBodyStyle },
|
|
778
|
+
// `.codingns-magpie-page` 提供管理页的 `--mp-*` 主题变量;外层样式再把它压进弹层尺寸。
|
|
779
|
+
createElement('div', { className: 'codingns-magpie-page codingns4dsh-magpie-requests-view' }, createElement(RequestsPage, {
|
|
780
|
+
page,
|
|
781
|
+
loading,
|
|
782
|
+
error,
|
|
783
|
+
selectedSession: { id: sessionId, agent, ...(sessionName === null ? {} : { dshSessionName: sessionName }) },
|
|
784
|
+
offset,
|
|
785
|
+
onOffsetChange,
|
|
786
|
+
onClearSession: null,
|
|
787
|
+
t,
|
|
788
|
+
})))));
|
|
789
|
+
}
|
|
790
|
+
function createMagpieRows(rows) {
|
|
791
|
+
if (rows.length === 0)
|
|
792
|
+
return createElement('div', { style: magpieMutedTextStyle }, '--');
|
|
793
|
+
return createElement('div', { style: magpieStatsGridStyle }, ...rows.map(([label, value]) => createElement('div', { key: label, style: magpieStatStyle }, createElement('span', { style: magpieStatLabelStyle }, label), createElement('strong', { style: magpieRowValueStyle }, value ?? '--'))));
|
|
794
|
+
}
|
|
795
|
+
function formatMagpieNumber(value) {
|
|
796
|
+
return value === null ? null : formatInteger(value);
|
|
797
|
+
}
|
|
798
|
+
function formatMagpieTokenCount(value) {
|
|
799
|
+
return value === null ? null : formatCompactTokenCount(value);
|
|
800
|
+
}
|
|
801
|
+
function formatMagpieCost(value) {
|
|
802
|
+
return value === null ? null : `$${value.toFixed(value >= 0.01 ? 2 : 4)}`;
|
|
803
|
+
}
|
|
804
|
+
function formatMagpieCacheHitRate(inputTokens, cacheReadTokens) {
|
|
805
|
+
if (inputTokens === null || cacheReadTokens === null)
|
|
806
|
+
return null;
|
|
807
|
+
const totalPromptTokens = inputTokens + cacheReadTokens;
|
|
808
|
+
return totalPromptTokens <= 0 ? null : formatSub2ApiPercent(cacheReadTokens / totalPromptTokens * 100);
|
|
809
|
+
}
|
|
810
|
+
function sumKnownCounts(left, right) {
|
|
811
|
+
if (left === null && right === null)
|
|
812
|
+
return null;
|
|
813
|
+
return (left ?? 0) + (right ?? 0);
|
|
814
|
+
}
|
|
815
|
+
function formatMagpieTimestamp(value) {
|
|
816
|
+
const timestamp = Date.parse(value);
|
|
817
|
+
return Number.isFinite(timestamp) ? new Intl.DateTimeFormat(undefined, { hour: '2-digit', minute: '2-digit' }).format(timestamp) : value;
|
|
818
|
+
}
|
|
819
|
+
function normalizeSubscriptionSnapshot(value) {
|
|
820
|
+
if (value === null || value === undefined)
|
|
821
|
+
return null;
|
|
822
|
+
if (!isRecord(value))
|
|
823
|
+
return null;
|
|
824
|
+
if ('providerUsage' in value || 'magpie' in value) {
|
|
825
|
+
const providerUsage = isRecord(value.providerUsage) ? value.providerUsage : null;
|
|
826
|
+
const magpie = isRecord(value.magpie) ? value.magpie : null;
|
|
827
|
+
return { providerUsage, magpie };
|
|
828
|
+
}
|
|
829
|
+
// Compatibility with Hosts that returned the provider usage directly.
|
|
830
|
+
return { providerUsage: value, magpie: null };
|
|
831
|
+
}
|
|
832
|
+
function isRecord(value) {
|
|
833
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
834
|
+
}
|
|
317
835
|
function SubscriptionPopover({ usage, providerName, t, nowMs, reset }) {
|
|
318
836
|
if (usage.sub2api !== undefined)
|
|
319
837
|
return createElement(Sub2ApiPopover, { usage: usage.sub2api, providerName, t });
|
|
@@ -671,12 +1189,79 @@ function createModelRow(model, unit) {
|
|
|
671
1189
|
function resolveDisplayWindow(usage) {
|
|
672
1190
|
return usage.primary ?? usage.secondary ?? usage.monthly;
|
|
673
1191
|
}
|
|
1192
|
+
/** 配额解析完成前的补读间隔;与弹层打开时的路由读取共用串行轮询。 */
|
|
1193
|
+
const MAGPIE_QUOTA_RETRY_MS = 3_000;
|
|
1194
|
+
/**
|
|
1195
|
+
* Magpie 用量入口是否还需要带路由补读。
|
|
1196
|
+
*
|
|
1197
|
+
* Host 会为「已确认属于 Magpie、但会话身份还没写进账本」的模型下发带会话数据的
|
|
1198
|
+
* `provider-unavailable` 占位快照;还在启动中的网关则是 `unavailable`。
|
|
1199
|
+
* 两种状态都表示上游未知,必须按 `MAGPIE_QUOTA_RETRY_MS` 快速重新解析,否则首屏
|
|
1200
|
+
* 会一直停在官方余额或 Magpie 标签上,直到整页刷新。
|
|
1201
|
+
*
|
|
1202
|
+
* 上游已解析(`provider-unavailable` 但 `upstreamProvider` 有值,例如该厂商本来
|
|
1203
|
+
* 就不上报任何配额窗口)不再补读——再读也只是重复确认同一个结论。没有上游信息的
|
|
1204
|
+
* 占位快照才有资格要求补读,Host 也只在这种情况下才下发它。
|
|
1205
|
+
*/
|
|
1206
|
+
function shouldResolveMagpieQuota(usage) {
|
|
1207
|
+
if (usage === null || usage === undefined)
|
|
1208
|
+
return false;
|
|
1209
|
+
if (usage.quotaStatus !== 'available')
|
|
1210
|
+
return usage.upstreamProvider === null;
|
|
1211
|
+
return usage.sessionId !== null && usage.session !== null && usage.quotas.length === 0;
|
|
1212
|
+
}
|
|
1213
|
+
function resolveMagpieQuotaRemaining(usage) {
|
|
1214
|
+
if (usage.quotaStatus !== 'available')
|
|
1215
|
+
return null;
|
|
1216
|
+
for (const quota of usage.quotas) {
|
|
1217
|
+
for (const window of quota.windows) {
|
|
1218
|
+
if (window.remainingPercent !== null)
|
|
1219
|
+
return window.remainingPercent;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
return null;
|
|
1223
|
+
}
|
|
1224
|
+
function resolveMagpieTriggerReadout(usage) {
|
|
1225
|
+
const remaining = resolveMagpieQuotaRemaining(usage);
|
|
1226
|
+
if (remaining !== null)
|
|
1227
|
+
return { kind: 'ring', percent: remaining };
|
|
1228
|
+
const quotas = usage.quotas ?? [];
|
|
1229
|
+
const balance = resolveQuotaBalanceLabel(quotas);
|
|
1230
|
+
if (balance !== null)
|
|
1231
|
+
return { kind: 'money', text: balance };
|
|
1232
|
+
const credits = resolveQuotaCreditsLabel(quotas);
|
|
1233
|
+
if (credits !== null)
|
|
1234
|
+
return { kind: 'credits', text: credits };
|
|
1235
|
+
return { kind: 'label' };
|
|
1236
|
+
}
|
|
1237
|
+
/** 积分余额的展示文本:只给数量,单位放在 title 里,不占用底部栏宽度。 */
|
|
1238
|
+
function resolveQuotaCreditsLabel(quotas) {
|
|
1239
|
+
for (const quota of quotas) {
|
|
1240
|
+
const credits = resolveQuotaCreditBalance(quota);
|
|
1241
|
+
if (credits === null || !(credits.remaining > 0))
|
|
1242
|
+
continue;
|
|
1243
|
+
return formatQuotaNumber(credits.remaining);
|
|
1244
|
+
}
|
|
1245
|
+
return null;
|
|
1246
|
+
}
|
|
1247
|
+
function createMagpieTriggerReadout(readout, t) {
|
|
1248
|
+
switch (readout.kind) {
|
|
1249
|
+
case 'ring':
|
|
1250
|
+
return createRemainingRing(readout.percent);
|
|
1251
|
+
case 'money':
|
|
1252
|
+
return createElement('span', { className: 'codingns4dsh-subscription-value', style: magpieBalanceStyle, title: t('usage.accountBalance') }, readout.text);
|
|
1253
|
+
case 'credits':
|
|
1254
|
+
return createElement('span', { className: 'codingns4dsh-subscription-value', style: magpieBalanceStyle, title: t('usage.creditBalanceLabel') }, readout.text);
|
|
1255
|
+
default:
|
|
1256
|
+
return createElement('span', { className: 'codingns4dsh-subscription-label', style: subscriptionLabelStyle }, t('usage.magpieShortLabel'));
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
674
1259
|
function selectDeepseekBalance(usage) {
|
|
675
1260
|
return usage.balances.find((balance) => balance.currency.toUpperCase() === 'USD') ?? usage.balances[0] ?? null;
|
|
676
1261
|
}
|
|
677
1262
|
/** 已具备用量读取契约的适配器才挂载底部订阅入口。 */
|
|
678
1263
|
function isSubscriptionAdapter(adapterId) {
|
|
679
|
-
return adapterId === 'antigravity' || adapterId === 'command-code' || adapterId === 'codex' || adapterId === 'claude-code' || adapterId === 'codebuddy' || adapterId === 'codebuddy-cn' || adapterId === 'dsh' || adapterId === 'grok' || adapterId === 'kimi' || adapterId === 'opencode' || adapterId === 'qoder' || adapterId === 'qoder-cn' || adapterId === 'workbuddy' || adapterId === 'zcode';
|
|
1264
|
+
return adapterId === 'antigravity' || adapterId === 'command-code' || adapterId === 'codex' || adapterId === 'claude-code' || adapterId === 'codebuddy' || adapterId === 'codebuddy-cn' || adapterId === 'dsh' || adapterId === 'grok' || adapterId === 'kimi' || adapterId === 'opencode' || adapterId === 'pi' || adapterId === 'qoder' || adapterId === 'qoder-cn' || adapterId === 'workbuddy' || adapterId === 'zcode';
|
|
680
1265
|
}
|
|
681
1266
|
function isRemoteWebContext() {
|
|
682
1267
|
return globalThis.__CODINGNS4DSH_REMOTE_WEB_CONTEXT__ === true;
|
|
@@ -806,6 +1391,75 @@ function formatCreditBalance(value) {
|
|
|
806
1391
|
const subscriptionRootStyle = { position: 'relative', minWidth: 0, display: 'inline-flex', alignItems: 'center' };
|
|
807
1392
|
const subscriptionTriggerStyle = { display: 'inline-flex', alignItems: 'center', gap: 6, height: 28, border: 0, borderRadius: 14, padding: '0 8px 0 4px', color: dshThemeColor.labelSecondary, background: 'transparent', cursor: 'pointer', fontSize: uiFontSize(13), lineHeight: '20px' };
|
|
808
1393
|
const subscriptionLabelStyle = { whiteSpace: 'nowrap' };
|
|
1394
|
+
// 余额金额与积分和百分比环并排/替换显示:数字用等宽字形,避免刷新时抖动。
|
|
1395
|
+
const magpieBalanceStyle = { display: 'inline-flex', alignItems: 'center', whiteSpace: 'nowrap', color: dshThemeColor.labelSecondary, fontSize: uiFontSize(12), fontWeight: 600, fontVariantNumeric: 'tabular-nums' };
|
|
1396
|
+
const magpieTriggerIconStyle = { display: 'inline-flex', width: 20, height: 20, alignItems: 'center', justifyContent: 'center', overflow: 'hidden', borderRadius: 6, background: dshThemeColor.surfaceSubtle };
|
|
1397
|
+
const magpieTriggerImageStyle = { display: 'block', width: '100%', height: '100%', objectFit: 'cover' };
|
|
1398
|
+
const magpieMutedTextStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(12), lineHeight: '17px', overflowWrap: 'anywhere' };
|
|
1399
|
+
const magpieHeaderMutedStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(12), lineHeight: '17px', overflowWrap: 'anywhere' };
|
|
1400
|
+
const magpieHeaderMetaStyle = { display: 'grid', justifyItems: 'end', gap: 3, minWidth: 0, textAlign: 'right' };
|
|
1401
|
+
const magpiePopoverHeadingStyle = { display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 22, paddingBottom: 12, borderBottom: `1px solid ${dshThemeColor.border}`, fontSize: uiFontSize(15) };
|
|
1402
|
+
const magpiePopoverHeadingTextStyle = { display: 'grid', gap: 3, minWidth: 0 };
|
|
1403
|
+
const magpieSectionTitleStyle = { fontSize: uiFontSize(13), color: dshThemeColor.labelSecondary };
|
|
1404
|
+
const magpieTabsStyle = { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: 4, marginTop: 8, padding: 3, borderRadius: 9, background: dshThemeColor.surfaceSubtle };
|
|
1405
|
+
const magpieTabStyle = { minWidth: 0, padding: '6px 8px', border: 0, borderRadius: 8, background: 'transparent', color: dshThemeColor.labelTertiary, cursor: 'pointer', fontSize: uiFontSize(12), lineHeight: '16px', whiteSpace: 'nowrap' };
|
|
1406
|
+
const magpieTabActiveStyle = { background: dshThemeColor.menuBackground, color: dshThemeColor.labelPrimary, boxShadow: `0 1px 3px ${dshThemeColor.border}` };
|
|
1407
|
+
const magpieTabPanelStyle = { minHeight: 0 };
|
|
1408
|
+
const magpieSectionStyle = { display: 'grid', gap: 8, paddingTop: 11, marginTop: 10, borderTop: `1px solid ${dshThemeColor.border}` };
|
|
1409
|
+
const magpieUsageSectionStyle = { display: 'grid', gap: 5, paddingTop: 8, marginTop: 7, borderTop: `1px solid ${dshThemeColor.border}` };
|
|
1410
|
+
const magpieStatsGridStyle = { display: 'grid', gridTemplateColumns: 'repeat(3, minmax(0, 1fr))', gap: 6, paddingTop: 0 };
|
|
1411
|
+
const magpieStatStyle = { display: 'grid', alignContent: 'space-between', gap: 1, minWidth: 0, minHeight: 40, boxSizing: 'border-box', padding: '5px 7px', borderRadius: 8, background: dshThemeColor.surfaceSubtle };
|
|
1412
|
+
const magpieStatLabelStyle = { minWidth: 0, color: dshThemeColor.labelTertiary, fontSize: uiFontSize(10), lineHeight: '13px', overflowWrap: 'anywhere' };
|
|
1413
|
+
const magpieRowValueStyle = { color: dshThemeColor.labelPrimary, fontSize: uiFontSize(14), fontWeight: 650, lineHeight: '18px', textAlign: 'right', overflowWrap: 'anywhere' };
|
|
1414
|
+
const magpieSessionIdentityStyle = { display: 'flex', flexWrap: 'wrap', alignItems: 'baseline', gap: '2px 10px', minWidth: 0, color: dshThemeColor.labelSecondary, fontSize: uiFontSize(12), lineHeight: '16px' };
|
|
1415
|
+
const magpieSessionNameStyle = { maxWidth: '100%', overflow: 'hidden', color: dshThemeColor.labelPrimary, fontSize: uiFontSize(12), fontWeight: 650, textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
1416
|
+
const magpieSessionIdStyle = { flex: '1 1 120px', minWidth: 0, color: dshThemeColor.labelTertiary, fontSize: uiFontSize(10), lineHeight: '14px', whiteSpace: 'normal', overflowWrap: 'anywhere' };
|
|
1417
|
+
const magpieAttemptsStyle = { display: 'grid', gap: 5, paddingTop: 6 };
|
|
1418
|
+
const magpieAttemptRowStyle = { display: 'flex', justifyContent: 'space-between', gap: 14, fontSize: uiFontSize(12) };
|
|
1419
|
+
const magpieAttemptModelStyle = { color: dshThemeColor.labelSecondary, overflowWrap: 'anywhere' };
|
|
1420
|
+
const magpieFailedStyle = { flex: 'none', color: dshThemeColor.error, fontSize: uiFontSize(11) };
|
|
1421
|
+
const magpieQuotaHeadingStyle = { display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 10 };
|
|
1422
|
+
const magpieProviderBadgesStyle = { display: 'flex', justifyContent: 'flex-end', flexWrap: 'wrap', gap: 5, minWidth: 0 };
|
|
1423
|
+
const magpieProviderBadgeStyle = { flex: 'none', maxWidth: 220, overflow: 'hidden', padding: '4px 8px', borderRadius: 999, background: dshThemeColor.surfaceSubtle, color: dshThemeColor.labelSecondary, fontSize: uiFontSize(11), textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
1424
|
+
const magpieEmptyStateStyle = { display: 'grid', placeItems: 'center', minHeight: 36, padding: '8px 10px', color: dshThemeColor.labelTertiary, fontSize: uiFontSize(12), lineHeight: '17px', textAlign: 'center' };
|
|
1425
|
+
const magpieQuotaCardStyle = { display: 'grid', gap: 5, marginTop: 7, padding: '9px 10px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 9, background: dshThemeColor.surfaceSubtle };
|
|
1426
|
+
const magpieQuotaCardHeadingStyle = { display: 'flex', justifyContent: 'space-between', alignItems: 'baseline', gap: 10 };
|
|
1427
|
+
const magpieQuotaNameWithLogoStyle = { display: 'inline-flex', alignItems: 'center', gap: 6, minWidth: 0, overflow: 'hidden' };
|
|
1428
|
+
const magpieQuotaNameStyle = { minWidth: 0, overflow: 'hidden', color: dshThemeColor.labelPrimary, fontSize: uiFontSize(13), fontWeight: 650, textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
1429
|
+
const magpieQuotaHeadingMetaStyle = { flex: 'none', maxWidth: 160, overflow: 'hidden', color: dshThemeColor.labelTertiary, fontSize: uiFontSize(11), textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
1430
|
+
const magpieQuotaIdentityStyle = { display: 'flex', flexWrap: 'wrap', gap: '3px 12px', color: dshThemeColor.labelTertiary, fontSize: uiFontSize(11), lineHeight: '15px', overflowWrap: 'anywhere' };
|
|
1431
|
+
const magpieQuotaMetaStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(11), lineHeight: '15px', overflowWrap: 'anywhere' };
|
|
1432
|
+
const magpieQuotaWindowStyle = { display: 'grid', gap: 4, paddingTop: 3 };
|
|
1433
|
+
const magpieQuotaFooterStyle = { display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap', gap: '3px 10px', color: dshThemeColor.labelTertiary, fontSize: uiFontSize(11), lineHeight: '15px' };
|
|
1434
|
+
const magpieRouteHeadingStyle = { display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 10 };
|
|
1435
|
+
const magpieRouteHeroStyle = { display: 'grid', gap: 11, padding: '12px 13px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 12, background: `linear-gradient(145deg, ${dshThemeColor.surfaceSubtle}, transparent)` };
|
|
1436
|
+
const magpieRouteStatusStyle = { display: 'inline-flex', alignItems: 'center', gap: 6, width: 'fit-content', boxSizing: 'border-box', padding: '3px 8px', borderRadius: 999, background: dshThemeColor.surfaceSubtle, color: dshThemeColor.labelSecondary, fontSize: uiFontSize(11), lineHeight: '15px', whiteSpace: 'nowrap' };
|
|
1437
|
+
const magpieRouteStatusDotStyle = { width: 8, height: 8, borderRadius: '50%', background: dshThemeColor.accent };
|
|
1438
|
+
const magpieRouteTrackStyle = { display: 'grid', gap: 0, minWidth: 0, padding: '3px 0' };
|
|
1439
|
+
const magpieRouteTrackItemStyle = { display: 'grid', gridTemplateColumns: '18px minmax(0, 1fr)', alignItems: 'start', gap: 12, minWidth: 0, padding: '5px 8px', margin: '0 -8px', borderRadius: 8 };
|
|
1440
|
+
const magpieRouteMarkerColumnStyle = { display: 'flex', flexDirection: 'column', alignItems: 'center', minHeight: 18 };
|
|
1441
|
+
const magpieRouteNodeStyle = { display: 'grid', flex: '0 0 18px', placeItems: 'center', width: 18, height: 18, borderRadius: '50%', background: dshThemeColor.menuBackground, boxShadow: `0 0 0 1px ${dshThemeColor.border}` };
|
|
1442
|
+
const magpieRouteNodeDotStyle = { width: 7, height: 7, borderRadius: '50%', background: dshThemeColor.accent };
|
|
1443
|
+
const magpieRouteStageCopyStyle = { display: 'grid', gap: 3, minWidth: 0, padding: '2px 0 3px' };
|
|
1444
|
+
const magpieRouteStageLabelStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(10), lineHeight: '13px', letterSpacing: '.025em' };
|
|
1445
|
+
const magpieRouteStageValueStyle = { color: dshThemeColor.labelPrimary, fontSize: uiFontSize(12), fontWeight: 620, lineHeight: '16px', overflowWrap: 'anywhere' };
|
|
1446
|
+
const magpieRouteConnectorStyle = { width: 2, height: 28, marginTop: 4, overflow: 'hidden', borderRadius: 2, background: `linear-gradient(180deg, ${dshThemeColor.accent}, ${dshThemeColor.border})` };
|
|
1447
|
+
const magpieRoutePulseStyle = { display: 'block', width: '100%', height: 9, borderRadius: 2, background: dshThemeColor.accent, boxShadow: `0 0 6px ${dshThemeColor.accent}` };
|
|
1448
|
+
const magpieRouteMetaStyle = { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: 6 };
|
|
1449
|
+
const magpieRouteMetaItemStyle = { display: 'grid', alignContent: 'start', gap: 3, minWidth: 0, padding: '6px 8px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 8, background: dshThemeColor.menuBackground };
|
|
1450
|
+
const magpieRouteMetaLabelStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(10), lineHeight: '13px' };
|
|
1451
|
+
const magpieRouteMetaValueStyle = { color: dshThemeColor.labelSecondary, fontSize: uiFontSize(11), fontWeight: 550, lineHeight: '15px', overflowWrap: 'anywhere' };
|
|
1452
|
+
// 请求入口与请求模态框:入口与状态徽标同高并排在标题栏,模态框覆盖视口并在内部滚动。
|
|
1453
|
+
const magpieRouteHeadingActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 8, minWidth: 0 };
|
|
1454
|
+
const magpieRouteRequestsButtonStyle = { flex: 'none', display: 'inline-flex', alignItems: 'center', gap: 4, boxSizing: 'border-box', padding: '2px 8px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 999, background: dshThemeColor.menuBackground, color: dshThemeColor.labelSecondary, fontFamily: 'inherit', fontSize: uiFontSize(11), lineHeight: '15px', cursor: 'pointer', whiteSpace: 'nowrap', transition: 'background .15s ease,color .15s ease' };
|
|
1455
|
+
const magpieRequestsOverlayStyle = { position: 'fixed', inset: 0, zIndex: 1500, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 16, boxSizing: 'border-box', background: dshThemeColor.overlay };
|
|
1456
|
+
const magpieRequestsDialogStyle = { ...dshPopupSurfaceStyle, display: 'flex', flexDirection: 'column', gap: 10, width: 'min(96vw, 1320px)', maxHeight: 'min(88vh, 820px)', boxSizing: 'border-box', padding: 14, borderRadius: 14 };
|
|
1457
|
+
const magpieRequestsHeadingStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, paddingBottom: 10, borderBottom: `1px solid ${dshThemeColor.border}` };
|
|
1458
|
+
const magpieRequestsHeadingActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 8, flex: 'none' };
|
|
1459
|
+
const magpieRequestsTitleStyle = { fontSize: uiFontSize(15), lineHeight: '20px' };
|
|
1460
|
+
const magpieRequestsCloseStyle = { flex: 'none', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 28, height: 28, padding: 0, border: 0, borderRadius: '50%', background: 'transparent', color: dshThemeColor.labelSecondary, fontSize: uiFontSize(18), lineHeight: 1, cursor: 'pointer' };
|
|
1461
|
+
const magpieRequestsBodyStyle = { flex: '1 1 auto', minHeight: 0, overflowY: 'auto', overscrollBehavior: 'contain' };
|
|
1462
|
+
const magpieRequestsRetryStyle = { padding: '5px 12px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 999, background: dshThemeColor.menuBackground, color: dshThemeColor.labelSecondary, fontFamily: 'inherit', fontSize: uiFontSize(11), lineHeight: '15px', cursor: 'pointer' };
|
|
809
1463
|
const sub2apiIdentityStyle = { display: 'inline-flex', alignItems: 'center', gap: 5, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' };
|
|
810
1464
|
const sub2apiLogoStyle = { display: 'block', borderRadius: 4, objectFit: 'contain' };
|
|
811
1465
|
const deepseekBalanceIdentityStyle = { display: 'inline-flex', alignItems: 'center', gap: 5, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' };
|
|
@@ -846,7 +1500,8 @@ const barStyle = { height: 7, overflow: 'hidden', borderRadius: 4, background: d
|
|
|
846
1500
|
const barFillStyle = { display: 'block', height: '100%', borderRadius: 4, background: dshThemeColor.accent, transition: 'width .2s ease' };
|
|
847
1501
|
const resetStyle = { color: dshThemeColor.labelTertiary, fontSize: uiFontSize(12) };
|
|
848
1502
|
const quotaGroupTitleStyle = { paddingTop: 12, color: dshThemeColor.labelSecondary, fontSize: uiFontSize(12), fontWeight: 600, letterSpacing: '.02em' };
|
|
849
|
-
const subscriptionPopoverStyle = { ...dshPopupSurfaceStyle, position: 'absolute', zIndex: 1200, bottom: 'calc(100% + 8px)', left: 0, width: 'max-content', minWidth: 280, maxWidth: 'min(400px, calc(100vw - 24px))', boxSizing: 'border-box', padding: 14, borderRadius: 12 };
|
|
1503
|
+
const subscriptionPopoverStyle = { ...dshPopupSurfaceStyle, position: 'absolute', zIndex: 1200, bottom: 'calc(100% + 8px)', left: 0, width: 'max-content', minWidth: 280, maxWidth: 'min(400px, calc(100vw - 24px))', maxHeight: 'min(70vh, 560px)', overflowY: 'auto', boxSizing: 'border-box', padding: 14, borderRadius: 12 };
|
|
1504
|
+
const magpiePopoverStyle = { ...subscriptionPopoverStyle, width: 400, minWidth: 0, maxWidth: 'min(400px, calc(100vw - 24px))', maxHeight: 'min(78vh, 640px)', padding: 12, borderRadius: 14 };
|
|
850
1505
|
const resetCreditsSectionStyle = { display: 'grid', gap: 6, marginTop: 10, padding: '10px 12px', border: `1px solid ${dshThemeColor.border}`, borderRadius: 10, background: dshThemeColor.surfaceSubtle };
|
|
851
1506
|
const resetCreditsRowStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, color: dshThemeColor.labelSecondary, fontSize: uiFontSize(13) };
|
|
852
1507
|
const resetCreditsValueGroupStyle = { display: 'inline-flex', alignItems: 'center', gap: 8 };
|