@jingyi0605/codingns4dsh 0.2.1-beta.4 → 0.2.1-beta.6
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 +134 -159
- package/README.md +128 -261
- package/assets/provider-icons/doubao.png +0 -0
- package/data/build/dist/client/account-bar.d.ts +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +22 -14
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +8 -0
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -0
- package/data/build/dist/client/adapter-catalog-watch.js +79 -0
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -0
- package/data/build/dist/client/avatar/catalog-panel.d.ts +1 -1
- package/data/build/dist/client/avatar/catalog-panel.d.ts.map +1 -1
- package/data/build/dist/client/avatar/catalog-panel.js +13 -11
- package/data/build/dist/client/avatar/catalog-panel.js.map +1 -1
- package/data/build/dist/client/avatar/engine.d.ts.map +1 -1
- package/data/build/dist/client/avatar/engine.js +26 -7
- package/data/build/dist/client/avatar/engine.js.map +1 -1
- package/data/build/dist/client/avatar/live2d.d.ts +2 -0
- package/data/build/dist/client/avatar/live2d.d.ts.map +1 -1
- package/data/build/dist/client/avatar/live2d.js +16 -6
- package/data/build/dist/client/avatar/live2d.js.map +1 -1
- package/data/build/dist/client/avatar/manager.d.ts.map +1 -1
- package/data/build/dist/client/avatar/manager.js +8 -2
- package/data/build/dist/client/avatar/manager.js.map +1 -1
- package/data/build/dist/client/avatar/slot.d.ts.map +1 -1
- package/data/build/dist/client/avatar/slot.js +4 -1
- package/data/build/dist/client/avatar/slot.js.map +1 -1
- package/data/build/dist/client/bundle.js +48459 -98385
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-catalog.d.ts +5 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -1
- package/data/build/dist/client/cli-catalog.js +15 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +7 -45
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +4526 -0
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -0
- package/data/build/dist/client/client.assistant-debug-workbench.js +764 -0
- package/data/build/dist/client/client.assistant-debug-workbench.js.map +1 -0
- package/data/build/dist/client/client.assistant-prompt-editor.js +76 -0
- package/data/build/dist/client/client.assistant-prompt-editor.js.map +1 -0
- package/data/build/dist/client/client.assistant-prompts.js +44 -0
- package/data/build/dist/client/client.assistant-prompts.js.map +1 -0
- package/data/build/dist/client/client.assistant-voice-sessions.js +144 -0
- package/data/build/dist/client/client.assistant-voice-sessions.js.map +1 -0
- package/data/build/dist/client/client.assistant-workbench.js +2929 -0
- package/data/build/dist/client/client.assistant-workbench.js.map +1 -0
- package/data/build/dist/client/client.delegate-command.js +1315 -0
- package/data/build/dist/client/client.delegate-command.js.map +1 -0
- package/data/build/dist/client/client.editor-engine.js +32486 -0
- package/data/build/dist/client/client.editor-engine.js.map +1 -0
- package/data/build/dist/client/client.manager.js +3454 -0
- package/data/build/dist/client/client.manager.js.map +1 -0
- package/data/build/dist/client/client.model-catalog-cache.js +543 -0
- package/data/build/dist/client/client.model-catalog-cache.js.map +1 -0
- package/data/build/dist/client/client.native-workspace-store.js +689 -0
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -0
- package/data/build/dist/client/client.primitives-adapter.js +333 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -0
- package/data/build/dist/client/client.react-dom.js +7286 -0
- package/data/build/dist/client/client.react-dom.js.map +1 -0
- package/data/build/dist/client/client.rolldown-runtime.js +59 -0
- package/data/build/dist/client/client.theme.js +386 -0
- package/data/build/dist/client/client.theme.js.map +1 -0
- package/data/build/dist/client/client.transport.js +3323 -0
- package/data/build/dist/client/client.transport.js.map +1 -0
- package/data/build/dist/client/client.xterm-engine.js +13064 -0
- package/data/build/dist/client/client.xterm-engine.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts.map +1 -1
- package/data/build/dist/client/debug/ui.js +14 -5
- package/data/build/dist/client/debug/ui.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +19 -5
- package/data/build/dist/client/editor-engine.d.ts +4 -0
- package/data/build/dist/client/editor-engine.d.ts.map +1 -0
- package/data/build/dist/client/editor-engine.js +50 -0
- package/data/build/dist/client/editor-engine.js.map +1 -0
- package/data/build/dist/client/engine-loader.d.ts +5 -0
- package/data/build/dist/client/engine-loader.d.ts.map +1 -0
- package/data/build/dist/client/engine-loader.js +35 -0
- package/data/build/dist/client/engine-loader.js.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-loader.d.ts +14 -0
- package/data/build/dist/client/features/assistant-configuration-loader.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-loader.js +13 -0
- package/data/build/dist/client/features/assistant-configuration-loader.js.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-session.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-session.js +13 -4
- package/data/build/dist/client/features/assistant-configuration-session.js.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-view.d.ts +66 -0
- package/data/build/dist/client/features/assistant-configuration-view.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-view.js +133 -0
- package/data/build/dist/client/features/assistant-configuration-view.js.map +1 -0
- package/data/build/dist/client/features/assistant-debug-workbench.d.ts +4 -11
- package/data/build/dist/client/features/assistant-debug-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-debug-workbench.js +41 -68
- package/data/build/dist/client/features/assistant-debug-workbench.js.map +1 -1
- package/data/build/dist/client/features/assistant-display-store.d.ts +57 -0
- package/data/build/dist/client/features/assistant-display-store.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-display-store.js +189 -0
- package/data/build/dist/client/features/assistant-display-store.js.map +1 -0
- package/data/build/dist/client/features/assistant-prompt-editor.d.ts +12 -0
- package/data/build/dist/client/features/assistant-prompt-editor.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-prompt-editor.js +14 -0
- package/data/build/dist/client/features/assistant-prompt-editor.js.map +1 -0
- package/data/build/dist/client/features/assistant-view-loader.d.ts +17 -0
- package/data/build/dist/client/features/assistant-view-loader.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-view-loader.js +49 -0
- package/data/build/dist/client/features/assistant-view-loader.js.map +1 -0
- package/data/build/dist/client/features/assistant-workbench.d.ts +1 -60
- package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.js +41 -169
- package/data/build/dist/client/features/assistant-workbench.js.map +1 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +44 -13
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.js +33 -27
- package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts +2 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +124 -58
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.js +37 -10
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -1
- package/data/build/dist/client/file-management-dom.d.ts +3 -1
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -1
- package/data/build/dist/client/file-management-dom.js +85 -79
- package/data/build/dist/client/file-management-dom.js.map +1 -1
- package/data/build/dist/client/git-management.d.ts +1 -1
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +46 -27
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +10 -0
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/assistantAvatar.d.ts +1 -1
- package/data/build/dist/client/locales/assistantAvatar.js +2 -2
- package/data/build/dist/client/locales/assistantAvatar.js.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.js +2 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +4 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/peerHostWorkspace.js +2 -2
- package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +4 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -1
- package/data/build/dist/client/model-catalog-cache.js +9 -2
- package/data/build/dist/client/model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/peer-host-management-api.d.ts +2 -2
- package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-management-api.js +8 -5
- package/data/build/dist/client/peer-host-management-api.js.map +1 -1
- package/data/build/dist/client/provider-icon-assets.js +5 -39
- package/data/build/dist/client/provider-icon-assets.js.map +1 -1
- package/data/build/dist/client/provider-icon-bridge.d.ts +6 -0
- package/data/build/dist/client/provider-icon-bridge.d.ts.map +1 -0
- package/data/build/dist/client/provider-icon-bridge.js +65 -0
- package/data/build/dist/client/provider-icon-bridge.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +1 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +2 -1
- package/data/build/dist/client/provider-icons.js.map +1 -1
- package/data/build/dist/client/remote-web-context.d.ts +2 -0
- package/data/build/dist/client/remote-web-context.d.ts.map +1 -1
- package/data/build/dist/client/remote-web-context.js +50 -2
- package/data/build/dist/client/remote-web-context.js.map +1 -1
- package/data/build/dist/client/rpc-call.d.ts +4 -0
- package/data/build/dist/client/rpc-call.d.ts.map +1 -0
- package/data/build/dist/client/rpc-call.js +23 -0
- package/data/build/dist/client/rpc-call.js.map +1 -0
- package/data/build/dist/client/serial-polling.d.ts +15 -0
- package/data/build/dist/client/serial-polling.d.ts.map +1 -0
- package/data/build/dist/client/serial-polling.js +48 -0
- package/data/build/dist/client/serial-polling.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -1
- package/data/build/dist/client/session-adapter-cache.js +11 -1
- package/data/build/dist/client/session-adapter-cache.js.map +1 -1
- package/data/build/dist/client/settings-section.js +8 -2
- package/data/build/dist/client/settings-section.js.map +1 -1
- package/data/build/dist/client/sherpa-voice-adapter.d.ts.map +1 -1
- package/data/build/dist/client/sherpa-voice-adapter.js +8 -8
- package/data/build/dist/client/sherpa-voice-adapter.js.map +1 -1
- package/data/build/dist/client/subscription-slot.d.ts +11 -0
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +42 -15
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/xterm-engine.d.ts +4 -0
- package/data/build/dist/client/terminal/xterm-engine.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-engine.js +5 -0
- package/data/build/dist/client/terminal/xterm-engine.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -1
- package/data/build/dist/client/terminal/xterm-view.js +33 -25
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -1
- package/data/build/dist/host/avatar/temporary-previews.d.ts +3 -1
- package/data/build/dist/host/avatar/temporary-previews.d.ts.map +1 -1
- package/data/build/dist/host/avatar/temporary-previews.js +7 -2
- package/data/build/dist/host/avatar/temporary-previews.js.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +1 -1
- 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 +3 -10
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js +10 -10
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts +19 -0
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/binary-detection.js +71 -0
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +2 -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 +11 -5
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-model-options.js +2 -1
- package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/claude-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-process.js +59 -0
- package/data/build/dist/host/cli-adapters/claude-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js +26 -12
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +0 -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 +10 -32
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/cursor-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/cursor-driver.js +4 -3
- package/data/build/dist/host/cli-adapters/cursor-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +5 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +2 -4
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -1
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts +27 -0
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-app.js +110 -0
- package/data/build/dist/host/cli-adapters/doubao-app.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.js +142 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.js +34 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.d.ts +49 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.js +177 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.d.ts +33 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.js +291 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-events.d.ts +21 -0
- package/data/build/dist/host/cli-adapters/doubao-events.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-events.js +126 -0
- package/data/build/dist/host/cli-adapters/doubao-events.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.d.ts +6 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.js +176 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.js +139 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.js.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +30 -36
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +2 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +3 -1
- package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -1
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/kimi-driver.js +4 -3
- 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 +2 -0
- 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 +11 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/log-files.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/log-files.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/log-files.js +32 -0
- package/data/build/dist/host/cli-adapters/log-files.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +2 -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 +10 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +1 -1
- 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 +11 -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 +132 -49
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +471 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +2 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +12 -4
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.js +151 -17
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-driver.js +63 -100
- package/data/build/dist/host/cli-adapters/qoder-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts +6 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.js +37 -10
- package/data/build/dist/host/cli-adapters/qoder-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +13 -21
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +102 -131
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts +2 -10
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js +1 -28
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts +5 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.js +68 -11
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +3 -3
- 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 +14 -38
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/windows-command-environment.d.ts +12 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.js +53 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.js.map +1 -0
- 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/debug.d.ts.map +1 -1
- package/data/build/dist/host/debug.js +5 -4
- package/data/build/dist/host/debug.js.map +1 -1
- package/data/build/dist/host/dsh-runtime-version.d.ts +1 -1
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -1
- package/data/build/dist/host/dsh-runtime-version.js +22 -17
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -1
- package/data/build/dist/host/features/assistant-avatar-runtime.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-avatar-runtime.js +43 -19
- package/data/build/dist/host/features/assistant-avatar-runtime.js.map +1 -1
- package/data/build/dist/host/features/assistant-background.d.ts +44 -0
- package/data/build/dist/host/features/assistant-background.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-background.js +116 -0
- package/data/build/dist/host/features/assistant-background.js.map +1 -0
- package/data/build/dist/host/features/assistant-index-updates.d.ts +5 -0
- package/data/build/dist/host/features/assistant-index-updates.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-index-updates.js +29 -6
- package/data/build/dist/host/features/assistant-index-updates.js.map +1 -1
- package/data/build/dist/host/features/assistant-source-cache.d.ts +12 -0
- package/data/build/dist/host/features/assistant-source-cache.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-source-cache.js +58 -0
- package/data/build/dist/host/features/assistant-source-cache.js.map +1 -0
- package/data/build/dist/host/features/global-voice-coordinator.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-coordinator.js +15 -10
- package/data/build/dist/host/features/global-voice-coordinator.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 +288 -114
- package/data/build/dist/host/features/global-voice-rpc.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 +61 -21
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/sherpa-voice-worker.d.ts +18 -0
- package/data/build/dist/host/features/sherpa-voice-worker.d.ts.map +1 -0
- package/data/build/dist/host/features/sherpa-voice-worker.js +40 -0
- package/data/build/dist/host/features/sherpa-voice-worker.js.map +1 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.d.ts +41 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.js +200 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +6 -4
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/index.d.ts +1 -1
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +31 -21
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +5 -22
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +6 -46
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +48 -28
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +4 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +7 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +40 -13
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -1
- package/data/build/dist/host/provider-icon-assets.d.ts +5 -0
- package/data/build/dist/host/provider-icon-assets.d.ts.map +1 -0
- package/data/build/dist/host/provider-icon-assets.js +61 -0
- package/data/build/dist/host/provider-icon-assets.js.map +1 -0
- package/data/build/dist/host/rpc.js +2 -2
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/session-migration-repair.d.ts +4 -0
- package/data/build/dist/host/session-migration-repair.d.ts.map +1 -1
- package/data/build/dist/host/session-migration-repair.js +75 -2
- package/data/build/dist/host/session-migration-repair.js.map +1 -1
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts +1 -1
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -1
- package/data/build/dist/host/terminal/backends/tmux-backend.js +15 -14
- package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -1
- package/data/build/dist/shared/assistant-avatar-engine.d.ts +5 -0
- package/data/build/dist/shared/assistant-avatar-engine.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-avatar-engine.js +14 -0
- package/data/build/dist/shared/assistant-avatar-engine.js.map +1 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +6 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/errors.js +1 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -1
- package/data/build/dist/shared/contracts/peer-host.d.ts +1 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/peer-host.js +1 -0
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +3 -1
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +20 -7
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +62 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -0
- package/data/build/dist/shared/peer-host-http-routes.js +31 -0
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -0
- package/data/build/dist/shared/provider-icon-resources.d.ts +4 -0
- package/data/build/dist/shared/provider-icon-resources.d.ts.map +1 -0
- package/data/build/dist/shared/provider-icon-resources.js +24 -0
- package/data/build/dist/shared/provider-icon-resources.js.map +1 -0
- package/package.json +2 -2
- package/profile/README.md +2 -2
- package/profile/package.json +2 -2
- package/profile/version.json +1 -1
- package/version.json +1 -1
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@jingyi0605/codingns4dsh",
|
|
3
|
+
chunk: "client.model-catalog-cache.js",
|
|
4
|
+
factory: (require) => {
|
|
5
|
+
var module = { exports: {} };
|
|
6
|
+
var exports = module.exports;
|
|
7
|
+
const require_transport = require("@jingyi0605/codingns4dsh/client.transport.js");
|
|
8
|
+
const require_primitives_adapter = require("@jingyi0605/codingns4dsh/client.primitives-adapter.js");
|
|
9
|
+
//#region src/client/provider-icons.ts
|
|
10
|
+
/** 未绑定和未知 Agent 使用中性灰,绝不冒充任一已知品牌色。 */
|
|
11
|
+
const PROVIDER_NEUTRAL_COLOR = "#71717a";
|
|
12
|
+
/**
|
|
13
|
+
* 外部 Agent 标识、显示名称与标签颜色的唯一映射。浏览器入口另行安装内联资产。
|
|
14
|
+
*
|
|
15
|
+
* 标签颜色用于会话行/归档列表的彩色标识:优先贴近本地图标或品牌色,
|
|
16
|
+
* 并保持在浅色与深色主题下都可读的中等明度区间。
|
|
17
|
+
*/
|
|
18
|
+
const PROVIDER_DEFINITIONS = {
|
|
19
|
+
dsh: {
|
|
20
|
+
adapterId: "dsh",
|
|
21
|
+
displayName: "DeepSeek Harness",
|
|
22
|
+
color: "#2563eb"
|
|
23
|
+
},
|
|
24
|
+
"command-code": {
|
|
25
|
+
adapterId: "command-code",
|
|
26
|
+
displayName: "Command Code",
|
|
27
|
+
color: "#8b5cf6"
|
|
28
|
+
},
|
|
29
|
+
"claude-code": {
|
|
30
|
+
adapterId: "claude-code",
|
|
31
|
+
displayName: "Claude Code",
|
|
32
|
+
color: "#d97757"
|
|
33
|
+
},
|
|
34
|
+
kimi: {
|
|
35
|
+
adapterId: "kimi",
|
|
36
|
+
displayName: "Kimi",
|
|
37
|
+
color: "#0ea5e9"
|
|
38
|
+
},
|
|
39
|
+
gemini: {
|
|
40
|
+
adapterId: "gemini",
|
|
41
|
+
displayName: "Gemini CLI",
|
|
42
|
+
color: "#4285f4"
|
|
43
|
+
},
|
|
44
|
+
pi: {
|
|
45
|
+
adapterId: "pi",
|
|
46
|
+
displayName: "Pi",
|
|
47
|
+
color: "#f59e0b"
|
|
48
|
+
},
|
|
49
|
+
codex: {
|
|
50
|
+
adapterId: "codex",
|
|
51
|
+
displayName: "Codex",
|
|
52
|
+
color: "#10a37f"
|
|
53
|
+
},
|
|
54
|
+
opencode: {
|
|
55
|
+
adapterId: "opencode",
|
|
56
|
+
displayName: "OpenCode",
|
|
57
|
+
color: "#14b8a6"
|
|
58
|
+
},
|
|
59
|
+
grok: {
|
|
60
|
+
adapterId: "grok",
|
|
61
|
+
displayName: "Grok",
|
|
62
|
+
color: "#71717a"
|
|
63
|
+
},
|
|
64
|
+
mcode: {
|
|
65
|
+
adapterId: "mcode",
|
|
66
|
+
displayName: "MiniMax Code",
|
|
67
|
+
color: "#f97316"
|
|
68
|
+
},
|
|
69
|
+
zcode: {
|
|
70
|
+
adapterId: "zcode",
|
|
71
|
+
displayName: "ZCode",
|
|
72
|
+
color: "#38bdf8"
|
|
73
|
+
},
|
|
74
|
+
codebuddy: {
|
|
75
|
+
adapterId: "codebuddy",
|
|
76
|
+
displayName: "CodeBuddy",
|
|
77
|
+
color: "#2563eb"
|
|
78
|
+
},
|
|
79
|
+
workbuddy: {
|
|
80
|
+
adapterId: "workbuddy",
|
|
81
|
+
displayName: "WorkBuddy",
|
|
82
|
+
color: "#0f766e"
|
|
83
|
+
},
|
|
84
|
+
"cursor-cli": {
|
|
85
|
+
adapterId: "cursor-cli",
|
|
86
|
+
displayName: "Cursor CLI",
|
|
87
|
+
color: "#111827"
|
|
88
|
+
},
|
|
89
|
+
"kiro-cli": {
|
|
90
|
+
adapterId: "kiro-cli",
|
|
91
|
+
displayName: "Kiro CLI",
|
|
92
|
+
color: "#7c3aed"
|
|
93
|
+
},
|
|
94
|
+
qoder: {
|
|
95
|
+
adapterId: "qoder",
|
|
96
|
+
displayName: "Qoder",
|
|
97
|
+
color: "#ea580c"
|
|
98
|
+
},
|
|
99
|
+
"qoder-cn": {
|
|
100
|
+
adapterId: "qoder-cn",
|
|
101
|
+
displayName: "Qoder CN",
|
|
102
|
+
color: "#c2410c"
|
|
103
|
+
},
|
|
104
|
+
antigravity: {
|
|
105
|
+
adapterId: "antigravity",
|
|
106
|
+
displayName: "Antigravity",
|
|
107
|
+
color: "#1d4ed8"
|
|
108
|
+
},
|
|
109
|
+
doubao: {
|
|
110
|
+
adapterId: "doubao",
|
|
111
|
+
displayName: "Doubao App",
|
|
112
|
+
displayNameKey: "provider.doubao",
|
|
113
|
+
color: "#477fe8"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const PROVIDER_ICONS = {};
|
|
117
|
+
/** 只由浏览器入口调用,使普通 Node 测试不需要加载 png/svg。 */
|
|
118
|
+
function installProviderIcons(icons) {
|
|
119
|
+
for (const adapterId of Object.keys(PROVIDER_ICONS)) delete PROVIDER_ICONS[adapterId];
|
|
120
|
+
for (const adapterId of Object.keys(PROVIDER_DEFINITIONS)) {
|
|
121
|
+
const iconUrl = icons[adapterId];
|
|
122
|
+
if (iconUrl !== void 0) PROVIDER_ICONS[adapterId] = iconUrl;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function providerIconUrl(adapterId) {
|
|
126
|
+
return PROVIDER_ICONS[normalizeProviderAdapterId(adapterId)];
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* 未绑定和未知值都返回中性占位,绝不冒充任一已知品牌。
|
|
130
|
+
*
|
|
131
|
+
* 第二个参数是 Codingns4DSH 词典翻译函数;未提供时退回内置中文词典,
|
|
132
|
+
* 保证不接 locale 的调用方与单测仍能拿到稳定的展示名。
|
|
133
|
+
*/
|
|
134
|
+
function providerVisual(adapterId, t) {
|
|
135
|
+
const translate = t ?? require_transport.resolveCodingNsTranslator();
|
|
136
|
+
if (adapterId === void 0 || adapterId.trim() === "") return {
|
|
137
|
+
adapterId: null,
|
|
138
|
+
displayName: translate("provider.unbound"),
|
|
139
|
+
iconUrl: void 0,
|
|
140
|
+
color: PROVIDER_NEUTRAL_COLOR
|
|
141
|
+
};
|
|
142
|
+
const normalizedAdapterId = normalizeProviderAdapterId(adapterId);
|
|
143
|
+
const definition = PROVIDER_DEFINITIONS[normalizedAdapterId];
|
|
144
|
+
if (definition === void 0) return {
|
|
145
|
+
adapterId,
|
|
146
|
+
displayName: translate("provider.unknown", { adapterId }),
|
|
147
|
+
iconUrl: void 0,
|
|
148
|
+
color: PROVIDER_NEUTRAL_COLOR
|
|
149
|
+
};
|
|
150
|
+
return {
|
|
151
|
+
...definition,
|
|
152
|
+
displayName: definition.displayNameKey ? translate(definition.displayNameKey) : definition.displayName,
|
|
153
|
+
iconUrl: PROVIDER_ICONS[normalizedAdapterId]
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/** 兼容旧版 CN profile 的会话快照,但不重新暴露第二个 Provider。 */
|
|
157
|
+
function normalizeProviderAdapterId(adapterId) {
|
|
158
|
+
return adapterId === "codebuddy-cn" ? "codebuddy" : adapterId;
|
|
159
|
+
}
|
|
160
|
+
const CODINGNS4DSH_DEBUG_LEVEL_ENV = "CODINGNS4DSH_DEBUG_LEVEL";
|
|
161
|
+
const LEGACY_DEBUG_ENV = "CODINGNS4DSH_TUNNEL_DEBUG";
|
|
162
|
+
/** 当前运行环境是否明确要求输出调试日志。 */
|
|
163
|
+
function resolveCodingNsDebugEnabled() {
|
|
164
|
+
return resolveCodingNsDebugLevel() !== "off";
|
|
165
|
+
}
|
|
166
|
+
/** 解析调试日志级别;`warn` 会过滤普通追踪信息,只保留警告和错误。 */
|
|
167
|
+
function resolveCodingNsDebugLevel() {
|
|
168
|
+
const globals = globalThis;
|
|
169
|
+
if (globals.__CODINGNS4DSH_DEBUG_LEVEL__ !== void 0) return parseDebugLevel(globals.__CODINGNS4DSH_DEBUG_LEVEL__);
|
|
170
|
+
const globalValue = globals.__CODINGNS4DSH_DEBUG_ENABLED__ ?? globals.__CODINGNS4DSH_TUNNEL_DEBUG__;
|
|
171
|
+
if (globalValue !== void 0) return parseDebugValue(globalValue) ? "info" : "off";
|
|
172
|
+
if (typeof location !== "undefined") {
|
|
173
|
+
const searchParams = new URL(location.href).searchParams;
|
|
174
|
+
const queryValue = searchParams.get("dshDebugLevel") ?? searchParams.get("dshDebug");
|
|
175
|
+
if (queryValue !== null) return parseDebugLevel(queryValue);
|
|
176
|
+
}
|
|
177
|
+
if (typeof localStorage !== "undefined") try {
|
|
178
|
+
const storedLevel = localStorage.getItem("codingns4dsh-debug-level");
|
|
179
|
+
if (storedLevel !== null) return parseDebugLevel(storedLevel);
|
|
180
|
+
const storedWarn = localStorage.getItem("codingns4dsh-debug-warn");
|
|
181
|
+
if (storedWarn !== null && parseDebugValue(storedWarn)) return "warn";
|
|
182
|
+
const stored = localStorage.getItem("codingns4dsh-debug") ?? localStorage.getItem("codingns4dsh-tunnel-debug");
|
|
183
|
+
if (stored !== null) return parseDebugLevel(stored);
|
|
184
|
+
} catch {}
|
|
185
|
+
if (typeof process !== "undefined") {
|
|
186
|
+
const level = process.env[CODINGNS4DSH_DEBUG_LEVEL_ENV];
|
|
187
|
+
if (level !== void 0) return parseDebugLevel(level);
|
|
188
|
+
if (parseDebugValue(process.env["CODINGNS4DSH_DEBUG_WARN"])) return "warn";
|
|
189
|
+
return parseDebugLevel(process.env["CODINGNS4DSH_DEBUG"] ?? process.env[LEGACY_DEBUG_ENV]);
|
|
190
|
+
}
|
|
191
|
+
return "off";
|
|
192
|
+
}
|
|
193
|
+
/** 输出受统一开关控制的调试信息。 */
|
|
194
|
+
function debugInfo(message, ...args) {
|
|
195
|
+
if (resolveCodingNsDebugLevel() === "info") console.info(message, ...args);
|
|
196
|
+
}
|
|
197
|
+
/** 输出受统一开关控制的调试警告。 */
|
|
198
|
+
function debugWarn(message, ...args) {
|
|
199
|
+
if (resolveCodingNsDebugEnabled()) console.warn(message, ...args);
|
|
200
|
+
}
|
|
201
|
+
function parseDebugValue(value) {
|
|
202
|
+
if (typeof value === "boolean") return value;
|
|
203
|
+
if (typeof value !== "string") return false;
|
|
204
|
+
return /^(1|true|yes|on)$/iu.test(value.trim());
|
|
205
|
+
}
|
|
206
|
+
function parseDebugLevel(value) {
|
|
207
|
+
if (typeof value === "boolean") return value ? "info" : "off";
|
|
208
|
+
if (typeof value !== "string") return "off";
|
|
209
|
+
const normalized = value.trim().toLowerCase();
|
|
210
|
+
if (/^(warn|warning|error)$/u.test(normalized)) return "warn";
|
|
211
|
+
if (/^(1|true|yes|on|info|debug)$/u.test(normalized)) return "info";
|
|
212
|
+
return "off";
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/client/cli-catalog.ts
|
|
216
|
+
/** 设置页和选择器使用同一状态文案,检测中或失败都不能显示成未安装。 */
|
|
217
|
+
function adapterDetectionLabel(adapter) {
|
|
218
|
+
if (adapter.detectionState === "pending" || adapter.detectionState === "running") return "cli.detecting";
|
|
219
|
+
if (adapter.detectionState === "error") return "cli.detectionFailed";
|
|
220
|
+
return adapter.installed ? "cli.installed" : "cli.notInstalled";
|
|
221
|
+
}
|
|
222
|
+
/** Client 侧访问 Host CLI 命名空间的统一入口。 */
|
|
223
|
+
async function callCliRpc(rpc, action, payload, signal) {
|
|
224
|
+
let response;
|
|
225
|
+
try {
|
|
226
|
+
debugInfo("codingns4dsh: cli rpc request", {
|
|
227
|
+
channel: require_transport.CODINGNS_RPC_CHANNEL,
|
|
228
|
+
action
|
|
229
|
+
});
|
|
230
|
+
response = await rpc.call(require_transport.CODINGNS_RPC_CHANNEL, `cli/${action}`, payload, signal);
|
|
231
|
+
} catch (error) {
|
|
232
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
233
|
+
if (!/HTTP (?:404|405)\b/u.test(message)) throw error;
|
|
234
|
+
debugWarn("codingns4dsh: cli rpc fallback", {
|
|
235
|
+
action,
|
|
236
|
+
error: message
|
|
237
|
+
});
|
|
238
|
+
try {
|
|
239
|
+
response = await rpc.call("/api", `codingns/cli/${action}`, payload, signal);
|
|
240
|
+
} catch (fallbackError) {
|
|
241
|
+
console.error("codingns4dsh: cli rpc fallback failed", {
|
|
242
|
+
action,
|
|
243
|
+
error: fallbackError
|
|
244
|
+
});
|
|
245
|
+
throw fallbackError;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (!response.ok) {
|
|
249
|
+
console.error("codingns4dsh: cli rpc response error", {
|
|
250
|
+
action,
|
|
251
|
+
error: response.error
|
|
252
|
+
});
|
|
253
|
+
throw new Error(response.error.message);
|
|
254
|
+
}
|
|
255
|
+
debugInfo("codingns4dsh: cli rpc response success", { action });
|
|
256
|
+
return response.value;
|
|
257
|
+
}
|
|
258
|
+
function adapterCatalogWithDsh(catalog, dshVersion) {
|
|
259
|
+
const available = catalog.filter((adapter) => adapter.installed && adapter.enabled);
|
|
260
|
+
const version = dshVersion?.trim();
|
|
261
|
+
const existingDsh = available.find((adapter) => adapter.id === "dsh");
|
|
262
|
+
if (existingDsh !== void 0) {
|
|
263
|
+
if (version === void 0 || version === "" || existingDsh.version === version) return available;
|
|
264
|
+
return available.map((adapter) => adapter.id === "dsh" ? {
|
|
265
|
+
...adapter,
|
|
266
|
+
version
|
|
267
|
+
} : adapter);
|
|
268
|
+
}
|
|
269
|
+
return [{
|
|
270
|
+
id: "dsh",
|
|
271
|
+
name: "DeepSeek Harness",
|
|
272
|
+
installed: true,
|
|
273
|
+
enabled: true,
|
|
274
|
+
version: version === void 0 || version === "" ? null : version,
|
|
275
|
+
command: null
|
|
276
|
+
}, ...available];
|
|
277
|
+
}
|
|
278
|
+
function firstModel(catalog) {
|
|
279
|
+
for (const group of catalog.groups) {
|
|
280
|
+
const model = group.models[0];
|
|
281
|
+
if (model !== void 0) return model;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function findModel(catalog, modelId) {
|
|
285
|
+
if (modelId === void 0) return void 0;
|
|
286
|
+
for (const group of catalog.groups) {
|
|
287
|
+
const model = group.models.find((item) => item.id === modelId);
|
|
288
|
+
if (model !== void 0) return model;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function errorMessage(error) {
|
|
292
|
+
return error instanceof Error ? error.message : String(error);
|
|
293
|
+
}
|
|
294
|
+
/** 旧 Host 缺少重新检测动作时给出版本提示;网络和检测错误仍保留原始原因。 */
|
|
295
|
+
function catalogRefreshErrorMessage(error, t) {
|
|
296
|
+
const message = errorMessage(error);
|
|
297
|
+
return /^未知 CLI RPC: cli\/catalog\/refresh$/u.test(message) ? t("cli.redetectHostUnsupported") : message;
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/client/model-catalog-cache.ts
|
|
301
|
+
/**
|
|
302
|
+
* Client 侧模型目录缓存。
|
|
303
|
+
*
|
|
304
|
+
* Agent 选择器、模型选择器和委派弹层共享同一份 RPC 结果。缓存只属于当前
|
|
305
|
+
* RPC 客户端实例与会话所属 Host,同一 Host 的会话共享目录,跨 Host 不复用。
|
|
306
|
+
*/
|
|
307
|
+
const modelCatalogCaches = /* @__PURE__ */ new WeakMap();
|
|
308
|
+
const modelCatalogLoads = /* @__PURE__ */ new WeakMap();
|
|
309
|
+
/** PeerHost 复用页面 RPC 实例,用稳定的 Host 身份隔离目录、请求与复检节流。 */
|
|
310
|
+
const modelCatalogHostKeys = /* @__PURE__ */ new WeakMap();
|
|
311
|
+
function modelCatalogKey(rpc, sessionId) {
|
|
312
|
+
const hostId = sessionId === void 0 ? void 0 : require_primitives_adapter.parseVirtualSessionId(sessionId)?.hostId;
|
|
313
|
+
if (hostId === void 0) return rpc;
|
|
314
|
+
let hosts = modelCatalogHostKeys.get(rpc);
|
|
315
|
+
if (hosts === void 0) {
|
|
316
|
+
hosts = /* @__PURE__ */ new Map();
|
|
317
|
+
modelCatalogHostKeys.set(rpc, hosts);
|
|
318
|
+
}
|
|
319
|
+
let key = hosts.get(hostId);
|
|
320
|
+
if (key === void 0) {
|
|
321
|
+
key = {};
|
|
322
|
+
hosts.set(hostId, key);
|
|
323
|
+
}
|
|
324
|
+
return key;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Client 缓存有效期。
|
|
328
|
+
*
|
|
329
|
+
* 目录里既有模型清单,也有账号级事实(例如 Codex 的 `officialSubscription`
|
|
330
|
+
* 与 `defaultServiceTier`)。后者会随用户在外部工具里切换供应商或登录状态而
|
|
331
|
+
* 变化,而页面不会因此重新挂载。若 Client 永久持有第一次的结果,依赖这些事实
|
|
332
|
+
* 的控件(Codex 官方订阅的 Fast 档位开关)就会在整场会话里一直缺失。
|
|
333
|
+
*
|
|
334
|
+
* 因此这里给出一个短 TTL:命中即用(不阻塞渲染),过期后重新请求。Host 侧还会
|
|
335
|
+
* 比对 Provider 配置指纹,配置真正变化时立即失效,不依赖这个 TTL。
|
|
336
|
+
*/
|
|
337
|
+
const MODEL_CATALOG_CACHE_TTL_MS = 6e4;
|
|
338
|
+
const modelCatalogCacheTimes = /* @__PURE__ */ new WeakMap();
|
|
339
|
+
function cacheEntry(rpc, adapterId, sessionId) {
|
|
340
|
+
return cacheTimesFor(rpc, sessionId).get(adapterId);
|
|
341
|
+
}
|
|
342
|
+
function cacheTimesFor(rpc, sessionId) {
|
|
343
|
+
const key = modelCatalogKey(rpc, sessionId);
|
|
344
|
+
let times = modelCatalogCacheTimes.get(key);
|
|
345
|
+
if (times === void 0) {
|
|
346
|
+
times = /* @__PURE__ */ new Map();
|
|
347
|
+
modelCatalogCacheTimes.set(key, times);
|
|
348
|
+
}
|
|
349
|
+
return times;
|
|
350
|
+
}
|
|
351
|
+
function storeCatalog(rpc, adapterId, value, sessionId) {
|
|
352
|
+
getModelCatalogCache(rpc, sessionId).set(adapterId, value);
|
|
353
|
+
cacheTimesFor(rpc, sessionId).set(adapterId, {
|
|
354
|
+
value,
|
|
355
|
+
storedAt: Date.now()
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/** 指定会话时只作废其 Host;旧调用不传会话时仍清理整个 RPC 的指定目录。 */
|
|
359
|
+
function invalidateModelCatalogCache(rpc, adapterId, sessionId) {
|
|
360
|
+
const keys = sessionId === void 0 ? [rpc, ...modelCatalogHostKeys.get(rpc)?.values() ?? []] : [modelCatalogKey(rpc, sessionId)];
|
|
361
|
+
for (const key of keys) {
|
|
362
|
+
const cache = modelCatalogCaches.get(key);
|
|
363
|
+
const times = modelCatalogCacheTimes.get(key);
|
|
364
|
+
const loads = modelCatalogLoads.get(key);
|
|
365
|
+
if (adapterId === void 0) loads?.clear();
|
|
366
|
+
else loads?.delete(adapterId);
|
|
367
|
+
if (adapterId === void 0) {
|
|
368
|
+
cache?.clear();
|
|
369
|
+
times?.clear();
|
|
370
|
+
} else {
|
|
371
|
+
cache?.delete(adapterId);
|
|
372
|
+
times?.delete(adapterId);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const modelCatalogRevalidations = /* @__PURE__ */ new WeakMap();
|
|
377
|
+
function shouldRevalidateModelCatalog(rpc, adapterId, needsRevalidation, sessionId) {
|
|
378
|
+
if (!needsRevalidation) return false;
|
|
379
|
+
const key = modelCatalogKey(rpc, sessionId);
|
|
380
|
+
let times = modelCatalogRevalidations.get(key);
|
|
381
|
+
if (times === void 0) {
|
|
382
|
+
times = /* @__PURE__ */ new Map();
|
|
383
|
+
modelCatalogRevalidations.set(key, times);
|
|
384
|
+
}
|
|
385
|
+
const last = times.get(adapterId);
|
|
386
|
+
const now = Date.now();
|
|
387
|
+
if (last !== void 0 && now - last < 6e4) return false;
|
|
388
|
+
times.set(adapterId, now);
|
|
389
|
+
return true;
|
|
390
|
+
}
|
|
391
|
+
function getModelCatalogCache(rpc, sessionId) {
|
|
392
|
+
const key = modelCatalogKey(rpc, sessionId);
|
|
393
|
+
let cache = modelCatalogCaches.get(key);
|
|
394
|
+
if (cache === void 0) {
|
|
395
|
+
cache = /* @__PURE__ */ new Map();
|
|
396
|
+
modelCatalogCaches.set(key, cache);
|
|
397
|
+
}
|
|
398
|
+
return cache;
|
|
399
|
+
}
|
|
400
|
+
function loadModelCatalog(rpc, adapterId, sessionId) {
|
|
401
|
+
const cached = getModelCatalogCache(rpc, sessionId).get(adapterId);
|
|
402
|
+
if (cached !== void 0 && cached.fallback !== true && isFreshCacheEntry(rpc, adapterId, cached, sessionId)) return Promise.resolve(cached);
|
|
403
|
+
if (cached !== void 0) invalidateModelCatalogCache(rpc, adapterId, sessionId);
|
|
404
|
+
const loads = getModelCatalogLoadCache(rpc, sessionId);
|
|
405
|
+
const running = loads.get(adapterId);
|
|
406
|
+
if (running !== void 0) return running;
|
|
407
|
+
const request = callCliRpc(rpc, "models", {
|
|
408
|
+
adapterId,
|
|
409
|
+
...sessionId === void 0 ? {} : { sessionId }
|
|
410
|
+
}).then((value) => {
|
|
411
|
+
if (loads.get(adapterId) !== request) return loadModelCatalog(rpc, adapterId, sessionId);
|
|
412
|
+
if (value.fallback === true) invalidateModelCatalogCache(rpc, adapterId, sessionId);
|
|
413
|
+
else storeCatalog(rpc, adapterId, value, sessionId);
|
|
414
|
+
return value;
|
|
415
|
+
}).finally(() => {
|
|
416
|
+
if (loads.get(adapterId) === request) loads.delete(adapterId);
|
|
417
|
+
});
|
|
418
|
+
loads.set(adapterId, request);
|
|
419
|
+
return request;
|
|
420
|
+
}
|
|
421
|
+
/** 缓存条目是否仍在有效期内;没有时间戳的旧条目按过期处理并触发一次重新读取。 */
|
|
422
|
+
function isFreshCacheEntry(rpc, adapterId, cached, sessionId) {
|
|
423
|
+
const entry = cacheEntry(rpc, adapterId, sessionId);
|
|
424
|
+
if (entry === void 0 || entry.value !== cached) return false;
|
|
425
|
+
return Date.now() - entry.storedAt < MODEL_CATALOG_CACHE_TTL_MS;
|
|
426
|
+
}
|
|
427
|
+
function getModelCatalogLoadCache(rpc, sessionId) {
|
|
428
|
+
const key = modelCatalogKey(rpc, sessionId);
|
|
429
|
+
let cache = modelCatalogLoads.get(key);
|
|
430
|
+
if (cache === void 0) {
|
|
431
|
+
cache = /* @__PURE__ */ new Map();
|
|
432
|
+
modelCatalogLoads.set(key, cache);
|
|
433
|
+
}
|
|
434
|
+
return cache;
|
|
435
|
+
}
|
|
436
|
+
//#endregion
|
|
437
|
+
Object.defineProperty(exports, "adapterCatalogWithDsh", {
|
|
438
|
+
enumerable: true,
|
|
439
|
+
get: function() {
|
|
440
|
+
return adapterCatalogWithDsh;
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperty(exports, "adapterDetectionLabel", {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function() {
|
|
446
|
+
return adapterDetectionLabel;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(exports, "callCliRpc", {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
get: function() {
|
|
452
|
+
return callCliRpc;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, "catalogRefreshErrorMessage", {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function() {
|
|
458
|
+
return catalogRefreshErrorMessage;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
Object.defineProperty(exports, "debugInfo", {
|
|
462
|
+
enumerable: true,
|
|
463
|
+
get: function() {
|
|
464
|
+
return debugInfo;
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
Object.defineProperty(exports, "debugWarn", {
|
|
468
|
+
enumerable: true,
|
|
469
|
+
get: function() {
|
|
470
|
+
return debugWarn;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
Object.defineProperty(exports, "errorMessage", {
|
|
474
|
+
enumerable: true,
|
|
475
|
+
get: function() {
|
|
476
|
+
return errorMessage;
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
Object.defineProperty(exports, "findModel", {
|
|
480
|
+
enumerable: true,
|
|
481
|
+
get: function() {
|
|
482
|
+
return findModel;
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
Object.defineProperty(exports, "firstModel", {
|
|
486
|
+
enumerable: true,
|
|
487
|
+
get: function() {
|
|
488
|
+
return firstModel;
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
Object.defineProperty(exports, "getModelCatalogCache", {
|
|
492
|
+
enumerable: true,
|
|
493
|
+
get: function() {
|
|
494
|
+
return getModelCatalogCache;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
Object.defineProperty(exports, "installProviderIcons", {
|
|
498
|
+
enumerable: true,
|
|
499
|
+
get: function() {
|
|
500
|
+
return installProviderIcons;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
Object.defineProperty(exports, "invalidateModelCatalogCache", {
|
|
504
|
+
enumerable: true,
|
|
505
|
+
get: function() {
|
|
506
|
+
return invalidateModelCatalogCache;
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
Object.defineProperty(exports, "loadModelCatalog", {
|
|
510
|
+
enumerable: true,
|
|
511
|
+
get: function() {
|
|
512
|
+
return loadModelCatalog;
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
Object.defineProperty(exports, "providerIconUrl", {
|
|
516
|
+
enumerable: true,
|
|
517
|
+
get: function() {
|
|
518
|
+
return providerIconUrl;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
Object.defineProperty(exports, "providerVisual", {
|
|
522
|
+
enumerable: true,
|
|
523
|
+
get: function() {
|
|
524
|
+
return providerVisual;
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
Object.defineProperty(exports, "resolveCodingNsDebugLevel", {
|
|
528
|
+
enumerable: true,
|
|
529
|
+
get: function() {
|
|
530
|
+
return resolveCodingNsDebugLevel;
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
Object.defineProperty(exports, "shouldRevalidateModelCatalog", {
|
|
534
|
+
enumerable: true,
|
|
535
|
+
get: function() {
|
|
536
|
+
return shouldRevalidateModelCatalog;
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
return module.exports;
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
//# sourceMappingURL=client.model-catalog-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.model-catalog-cache.js","names":["resolveCodingNsTranslator","CODINGNS_RPC_CHANNEL","parseVirtualSessionId"],"sources":["../../../../src/client/provider-icons.ts","../../../../src/shared/debug.ts","../../../../src/client/cli-catalog.ts","../../../../src/client/model-catalog-cache.ts"],"sourcesContent":["import { resolveCodingNsTranslator, type CodingNsTranslator } from './locale.js'\n\nexport interface ProviderVisual {\n readonly adapterId: string | null\n readonly displayName: string\n readonly iconUrl: string | undefined\n readonly color: string\n}\n\ninterface ProviderDefinition {\n readonly adapterId: string\n readonly displayName: string\n readonly displayNameKey?: string\n readonly color: string\n}\n\n/** 未绑定和未知 Agent 使用中性灰,绝不冒充任一已知品牌色。 */\nexport const PROVIDER_NEUTRAL_COLOR = '#71717a'\n\n/**\n * 外部 Agent 标识、显示名称与标签颜色的唯一映射。浏览器入口另行安装内联资产。\n *\n * 标签颜色用于会话行/归档列表的彩色标识:优先贴近本地图标或品牌色,\n * 并保持在浅色与深色主题下都可读的中等明度区间。\n */\nconst PROVIDER_DEFINITIONS: Readonly<Record<string, ProviderDefinition>> = {\n dsh: { adapterId: 'dsh', displayName: 'DeepSeek Harness', color: '#2563eb' },\n 'command-code': { adapterId: 'command-code', displayName: 'Command Code', color: '#8b5cf6' },\n 'claude-code': { adapterId: 'claude-code', displayName: 'Claude Code', color: '#d97757' },\n kimi: { adapterId: 'kimi', displayName: 'Kimi', color: '#0ea5e9' },\n gemini: { adapterId: 'gemini', displayName: 'Gemini CLI', color: '#4285f4' },\n pi: { adapterId: 'pi', displayName: 'Pi', color: '#f59e0b' },\n codex: { adapterId: 'codex', displayName: 'Codex', color: '#10a37f' },\n opencode: { adapterId: 'opencode', displayName: 'OpenCode', color: '#14b8a6' },\n grok: { adapterId: 'grok', displayName: 'Grok', color: '#71717a' },\n mcode: { adapterId: 'mcode', displayName: 'MiniMax Code', color: '#f97316' },\n zcode: { adapterId: 'zcode', displayName: 'ZCode', color: '#38bdf8' },\n codebuddy: { adapterId: 'codebuddy', displayName: 'CodeBuddy', color: '#2563eb' },\n workbuddy: { adapterId: 'workbuddy', displayName: 'WorkBuddy', color: '#0f766e' },\n 'cursor-cli': { adapterId: 'cursor-cli', displayName: 'Cursor CLI', color: '#111827' },\n 'kiro-cli': { adapterId: 'kiro-cli', displayName: 'Kiro CLI', color: '#7c3aed' },\n qoder: { adapterId: 'qoder', displayName: 'Qoder', color: '#ea580c' },\n 'qoder-cn': { adapterId: 'qoder-cn', displayName: 'Qoder CN', color: '#c2410c' },\n antigravity: { adapterId: 'antigravity', displayName: 'Antigravity', color: '#1d4ed8' },\n doubao: { adapterId: 'doubao', displayName: 'Doubao App', displayNameKey: 'provider.doubao', color: '#477fe8' },\n}\n\nconst PROVIDER_ICONS: Record<string, string> = {}\n\n/** 只由浏览器入口调用,使普通 Node 测试不需要加载 png/svg。 */\nexport function installProviderIcons(icons: Readonly<Record<string, string>>): void {\n for (const adapterId of Object.keys(PROVIDER_ICONS)) delete PROVIDER_ICONS[adapterId]\n for (const adapterId of Object.keys(PROVIDER_DEFINITIONS)) {\n const iconUrl = icons[adapterId]\n if (iconUrl !== undefined) PROVIDER_ICONS[adapterId] = iconUrl\n }\n}\n\nexport function providerIconUrl(adapterId: string): string | undefined {\n return PROVIDER_ICONS[normalizeProviderAdapterId(adapterId)]\n}\n\n/**\n * 未绑定和未知值都返回中性占位,绝不冒充任一已知品牌。\n *\n * 第二个参数是 Codingns4DSH 词典翻译函数;未提供时退回内置中文词典,\n * 保证不接 locale 的调用方与单测仍能拿到稳定的展示名。\n */\nexport function providerVisual(adapterId: string | undefined, t?: CodingNsTranslator): ProviderVisual {\n const translate = t ?? resolveCodingNsTranslator()\n if (adapterId === undefined || adapterId.trim() === '') {\n return { adapterId: null, displayName: translate('provider.unbound'), iconUrl: undefined, color: PROVIDER_NEUTRAL_COLOR }\n }\n const normalizedAdapterId = normalizeProviderAdapterId(adapterId)\n const definition = PROVIDER_DEFINITIONS[normalizedAdapterId]\n if (definition === undefined) {\n return { adapterId, displayName: translate('provider.unknown', { adapterId }), iconUrl: undefined, color: PROVIDER_NEUTRAL_COLOR }\n }\n return { ...definition, displayName: definition.displayNameKey ? translate(definition.displayNameKey) : definition.displayName, iconUrl: PROVIDER_ICONS[normalizedAdapterId] }\n}\n\n/** 兼容旧版 CN profile 的会话快照,但不重新暴露第二个 Provider。 */\nfunction normalizeProviderAdapterId(adapterId: string): string {\n return adapterId === 'codebuddy-cn' ? 'codebuddy' : adapterId\n}\n\nexport { PROVIDER_DEFINITIONS, PROVIDER_ICONS }\n","/**\n * Codingns4DSH 调试日志开关。\n *\n * 调试输出默认关闭。需要查看启动或 RPC 追踪时,使用\n * `CODINGNS4DSH_DEBUG=1 dsh ...` 启动 DSH;浏览器侧同时支持 `?dshDebug=1`。\n * 只看警告和错误时使用 `CODINGNS4DSH_DEBUG_LEVEL=warn`,也接受\n * `CODINGNS4DSH_DEBUG=warn` 作为简写。\n */\nexport const CODINGNS4DSH_DEBUG_ENV = 'CODINGNS4DSH_DEBUG'\nexport const CODINGNS4DSH_DEBUG_LEVEL_ENV = 'CODINGNS4DSH_DEBUG_LEVEL'\n/** 兼容脚本化启动器的显式警告模式开关。 */\nexport const CODINGNS4DSH_DEBUG_WARN_ENV = 'CODINGNS4DSH_DEBUG_WARN'\n\nconst LEGACY_DEBUG_ENV = 'CODINGNS4DSH_TUNNEL_DEBUG'\n\nexport type CodingNsDebugLevel = 'off' | 'warn' | 'info'\n\n/** 当前运行环境是否明确要求输出调试日志。 */\nexport function resolveCodingNsDebugEnabled(): boolean {\n return resolveCodingNsDebugLevel() !== 'off'\n}\n\n/** 解析调试日志级别;`warn` 会过滤普通追踪信息,只保留警告和错误。 */\nexport function resolveCodingNsDebugLevel(): CodingNsDebugLevel {\n const globals = globalThis as typeof globalThis & {\n __CODINGNS4DSH_DEBUG_ENABLED__?: unknown\n __CODINGNS4DSH_DEBUG_LEVEL__?: unknown\n __CODINGNS4DSH_TUNNEL_DEBUG__?: unknown\n }\n if (globals.__CODINGNS4DSH_DEBUG_LEVEL__ !== undefined) {\n return parseDebugLevel(globals.__CODINGNS4DSH_DEBUG_LEVEL__)\n }\n const globalValue = globals.__CODINGNS4DSH_DEBUG_ENABLED__ ?? globals.__CODINGNS4DSH_TUNNEL_DEBUG__\n if (globalValue !== undefined) return parseDebugValue(globalValue) ? 'info' : 'off'\n\n if (typeof location !== 'undefined') {\n const searchParams = new URL(location.href).searchParams\n const queryValue = searchParams.get('dshDebugLevel') ?? searchParams.get('dshDebug')\n if (queryValue !== null) return parseDebugLevel(queryValue)\n }\n\n if (typeof localStorage !== 'undefined') {\n try {\n const storedLevel = localStorage.getItem('codingns4dsh-debug-level')\n if (storedLevel !== null) return parseDebugLevel(storedLevel)\n const storedWarn = localStorage.getItem('codingns4dsh-debug-warn')\n if (storedWarn !== null && parseDebugValue(storedWarn)) return 'warn'\n const stored = localStorage.getItem('codingns4dsh-debug')\n ?? localStorage.getItem('codingns4dsh-tunnel-debug')\n if (stored !== null) return parseDebugLevel(stored)\n } catch {\n // 隐私模式或受限 iframe 可能禁止读取 localStorage,继续检查进程环境变量。\n }\n }\n\n if (typeof process !== 'undefined') {\n const level = process.env[CODINGNS4DSH_DEBUG_LEVEL_ENV]\n if (level !== undefined) return parseDebugLevel(level)\n if (parseDebugValue(process.env[CODINGNS4DSH_DEBUG_WARN_ENV])) return 'warn'\n return parseDebugLevel(process.env[CODINGNS4DSH_DEBUG_ENV] ?? process.env[LEGACY_DEBUG_ENV])\n }\n return 'off'\n}\n\n/** 输出受统一开关控制的调试信息。 */\nexport function debugInfo(message: unknown, ...args: unknown[]): void {\n if (resolveCodingNsDebugLevel() === 'info') console.info(message, ...args)\n}\n\n/** 输出受统一开关控制的调试警告。 */\nexport function debugWarn(message: unknown, ...args: unknown[]): void {\n if (resolveCodingNsDebugEnabled()) console.warn(message, ...args)\n}\n\nfunction parseDebugValue(value: unknown): boolean {\n if (typeof value === 'boolean') return value\n if (typeof value !== 'string') return false\n return /^(1|true|yes|on)$/iu.test(value.trim())\n}\n\nfunction parseDebugLevel(value: unknown): CodingNsDebugLevel {\n if (typeof value === 'boolean') return value ? 'info' : 'off'\n if (typeof value !== 'string') return 'off'\n const normalized = value.trim().toLowerCase()\n if (/^(warn|warning|error)$/u.test(normalized)) return 'warn'\n if (/^(1|true|yes|on|info|debug)$/u.test(normalized)) return 'info'\n return 'off'\n}\n","import type {\n CodingNsCliAdapterDescriptor,\n CodingNsCliModel,\n CodingNsCliModelCatalog,\n CodingNsCliSessionRecord,\n} from '../shared/contracts/cli-adapter.js'\nimport { CODINGNS_RPC_CHANNEL } from '../shared/contracts/transport.js'\nimport { debugInfo, debugWarn } from '../shared/debug.js'\nimport type { CodingNsRpcClient } from './features/types.js'\nimport type { CodingNsTranslator } from './locale.js'\n\n/** 设置页和选择器使用同一状态文案,检测中或失败都不能显示成未安装。 */\nexport function adapterDetectionLabel(adapter: CodingNsCliAdapterDescriptor): 'cli.detecting' | 'cli.detectionFailed' | 'cli.installed' | 'cli.notInstalled' {\n if (adapter.detectionState === 'pending' || adapter.detectionState === 'running') return 'cli.detecting'\n if (adapter.detectionState === 'error') return 'cli.detectionFailed'\n return adapter.installed ? 'cli.installed' : 'cli.notInstalled'\n}\n\n/** Client 侧访问 Host CLI 命名空间的统一入口。 */\nexport async function callCliRpc<T>(rpc: CodingNsRpcClient, action: string, payload: unknown, signal?: AbortSignal): Promise<T> {\n let response\n try {\n debugInfo('codingns4dsh: cli rpc request', { channel: CODINGNS_RPC_CHANNEL, action })\n response = await rpc.call(CODINGNS_RPC_CHANNEL, `cli/${action}`, payload, signal)\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n if (!/HTTP (?:404|405)\\b/u.test(message)) throw error\n debugWarn('codingns4dsh: cli rpc fallback', { action, error: message })\n try {\n response = await rpc.call('/api', `codingns/cli/${action}`, payload, signal)\n } catch (fallbackError) {\n console.error('codingns4dsh: cli rpc fallback failed', { action, error: fallbackError })\n throw fallbackError\n }\n }\n if (!response.ok) {\n console.error('codingns4dsh: cli rpc response error', { action, error: response.error })\n throw new Error(response.error.message)\n }\n debugInfo('codingns4dsh: cli rpc response success', { action })\n return response.value as T\n}\n\nexport function adapterCatalogWithDsh(catalog: readonly CodingNsCliAdapterDescriptor[], dshVersion?: string): CodingNsCliAdapterDescriptor[] {\n // 对话框只展示实际可用的适配器;未安装或已停用的适配器由设置页管理。\n const available = catalog.filter((adapter) => adapter.installed && adapter.enabled)\n const version = dshVersion?.trim()\n const existingDsh = available.find((adapter) => adapter.id === 'dsh')\n if (existingDsh !== undefined) {\n if (version === undefined || version === '' || existingDsh.version === version) return available\n return available.map((adapter) => adapter.id === 'dsh' ? { ...adapter, version } : adapter)\n }\n return [{ id: 'dsh', name: 'DeepSeek Harness', installed: true, enabled: true, version: version === undefined || version === '' ? null : version, command: null }, ...available]\n}\n\nexport function firstModel(catalog: CodingNsCliModelCatalog): CodingNsCliModel | undefined {\n for (const group of catalog.groups) {\n const model = group.models[0]\n if (model !== undefined) return model\n }\n return undefined\n}\n\nexport function findModel(catalog: CodingNsCliModelCatalog, modelId: string | undefined): CodingNsCliModel | undefined {\n if (modelId === undefined) return undefined\n for (const group of catalog.groups) {\n const model = group.models.find((item) => item.id === modelId)\n if (model !== undefined) return model\n }\n return undefined\n}\n\nexport function errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error)\n}\n\n/** 旧 Host 缺少重新检测动作时给出版本提示;网络和检测错误仍保留原始原因。 */\nexport function catalogRefreshErrorMessage(error: unknown, t: CodingNsTranslator): string {\n const message = errorMessage(error)\n return /^未知 CLI RPC: cli\\/catalog\\/refresh$/u.test(message)\n ? t('cli.redetectHostUnsupported')\n : message\n}\n\n/** 读取 Host 持久化的外部会话索引;兼容数组和带 items/sessions 的响应包装。 */\nexport async function listCliSessions(\n rpc: CodingNsRpcClient,\n options: { readonly includeArchived?: boolean; readonly adapterId?: string } = {},\n): Promise<readonly CodingNsCliSessionRecord[]> {\n const value = await callCliRpc<unknown>(rpc, 'session/list', options)\n const rows = Array.isArray(value)\n ? value\n : isRecord(value) && Array.isArray(value.items)\n ? value.items\n : isRecord(value) && Array.isArray(value.sessions)\n ? value.sessions\n : []\n return rows.filter(isCliSessionRecord).map(redactCliSessionRecord)\n}\n\n/** 把已存在的 DSH 会话恢复到原生会话页面;插件不接管消息列表。 */\nexport async function restoreCliSession(\n rpc: CodingNsRpcClient,\n record: CodingNsCliSessionRecord,\n): Promise<void> {\n await callCliRpc(rpc, 'session/set', {\n sessionId: record.dshSessionId,\n adapterId: record.adapterId,\n ...(record.modelId ? { modelId: record.modelId } : {}),\n ...(record.effortId ? { effortId: record.effortId } : {}),\n ...(record.serviceTierId ? { serviceTierId: record.serviceTierId } : {}),\n ...(record.providerId ? { providerId: record.providerId } : {}),\n ...(record.providerSessionId ? { providerSessionId: record.providerSessionId } : {}),\n })\n navigateToDshSession(record.dshSessionId)\n}\n\n/** 通过 Host 同步归档 DSH 原生会话和 Codingns4DSH 外部会话索引。 */\nexport async function archiveCliSession(\n rpc: CodingNsRpcClient,\n sessionId: string,\n): Promise<void> {\n await callCliRpc(rpc, 'session/archive', { sessionId })\n}\n\n/**\n * 使用 DSH 当前的会话路由,而不是在插件中复制会话消息组件。\n * 旧版 DSH 使用 `/sessions/:id`,新版 workspace 页面使用同一路径的 workspace 前缀,\n * 因此保留当前 workspace 段并只替换 session id。\n */\nexport function navigateToDshSession(sessionId: string): void {\n if (typeof window === 'undefined' || sessionId.trim() === '') return\n const encoded = encodeURIComponent(sessionId.trim())\n const pathname = window.location.pathname\n const nextPath = /^(\\/workspaces\\/[^/]+\\/sessions\\/)[^/]+(?:\\/.*)?$/u.test(pathname)\n ? pathname.replace(/^(\\/workspaces\\/[^/]+\\/sessions\\/)[^/]+(?:\\/.*)?$/u, `$1${encoded}`)\n : /^\\/sessions\\/[^/]+(?:\\/.*)?$/u.test(pathname)\n ? pathname.replace(/^\\/sessions\\/[^/]+(?:\\/.*)?$/u, `/sessions/${encoded}`)\n : `/sessions/${encoded}`\n if (`${window.location.pathname}${window.location.search}${window.location.hash}` === `${nextPath}${window.location.search}${window.location.hash}`) return\n window.history.pushState({}, '', nextPath)\n window.dispatchEvent(new PopStateEvent('popstate'))\n}\n\nfunction isCliSessionRecord(value: unknown): value is CodingNsCliSessionRecord {\n if (!isRecord(value)) return false\n return typeof value.dshSessionId === 'string'\n && value.dshSessionId.trim() !== ''\n && typeof value.adapterId === 'string'\n && value.adapterId.trim() !== ''\n && (value.status === 'active' || value.status === 'idle' || value.status === 'error' || value.status === 'archived')\n && typeof value.createdAt === 'string'\n && typeof value.updatedAt === 'string'\n}\n\n/** 双重防护:即使旧 Host 错误返回 rawStoreRef,浏览器也不会把它留在状态中。 */\nfunction redactCliSessionRecord(record: CodingNsCliSessionRecord): CodingNsCliSessionRecord {\n const { rawStoreRef: _rawStoreRef, ...safe } = record\n return safe\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n","import type { CodingNsCliModelCatalog } from '../shared/contracts/cli-adapter.js'\nimport type { CodingNsRpcClient } from './features/types.js'\nimport { callCliRpc } from './cli-catalog.js'\nimport { parseVirtualSessionId } from '../shared/contracts/peer-host.js'\n\n/**\n * Client 侧模型目录缓存。\n *\n * Agent 选择器、模型选择器和委派弹层共享同一份 RPC 结果。缓存只属于当前\n * RPC 客户端实例与会话所属 Host,同一 Host 的会话共享目录,跨 Host 不复用。\n */\nconst modelCatalogCaches = new WeakMap<object, Map<string, CodingNsCliModelCatalog>>()\nconst modelCatalogLoads = new WeakMap<object, Map<string, Promise<CodingNsCliModelCatalog>>>()\n/** PeerHost 复用页面 RPC 实例,用稳定的 Host 身份隔离目录、请求与复检节流。 */\nconst modelCatalogHostKeys = new WeakMap<object, Map<string, object>>()\n\nfunction modelCatalogKey(rpc: CodingNsRpcClient, sessionId?: string): object {\n const hostId = sessionId === undefined ? undefined : parseVirtualSessionId(sessionId)?.hostId\n if (hostId === undefined) return rpc as object\n let hosts = modelCatalogHostKeys.get(rpc as object)\n if (hosts === undefined) {\n hosts = new Map()\n modelCatalogHostKeys.set(rpc as object, hosts)\n }\n let key = hosts.get(hostId)\n if (key === undefined) { key = {}; hosts.set(hostId, key) }\n return key\n}\n\n/**\n * Client 缓存有效期。\n *\n * 目录里既有模型清单,也有账号级事实(例如 Codex 的 `officialSubscription`\n * 与 `defaultServiceTier`)。后者会随用户在外部工具里切换供应商或登录状态而\n * 变化,而页面不会因此重新挂载。若 Client 永久持有第一次的结果,依赖这些事实\n * 的控件(Codex 官方订阅的 Fast 档位开关)就会在整场会话里一直缺失。\n *\n * 因此这里给出一个短 TTL:命中即用(不阻塞渲染),过期后重新请求。Host 侧还会\n * 比对 Provider 配置指纹,配置真正变化时立即失效,不依赖这个 TTL。\n */\nexport const MODEL_CATALOG_CACHE_TTL_MS = 60_000\n\ninterface CachedCatalog {\n readonly value: CodingNsCliModelCatalog\n readonly storedAt: number\n}\n\nconst modelCatalogCacheTimes = new WeakMap<object, Map<string, CachedCatalog>>()\n\nfunction cacheEntry(rpc: CodingNsRpcClient, adapterId: string, sessionId?: string): CachedCatalog | undefined {\n return cacheTimesFor(rpc, sessionId).get(adapterId)\n}\n\nfunction cacheTimesFor(rpc: CodingNsRpcClient, sessionId?: string): Map<string, CachedCatalog> {\n const key = modelCatalogKey(rpc, sessionId)\n let times = modelCatalogCacheTimes.get(key)\n if (times === undefined) {\n times = new Map()\n modelCatalogCacheTimes.set(key, times)\n }\n return times\n}\n\nfunction storeCatalog(rpc: CodingNsRpcClient, adapterId: string, value: CodingNsCliModelCatalog, sessionId?: string): void {\n getModelCatalogCache(rpc, sessionId).set(adapterId, value)\n cacheTimesFor(rpc, sessionId).set(adapterId, { value, storedAt: Date.now() })\n}\n\n/** 指定会话时只作废其 Host;旧调用不传会话时仍清理整个 RPC 的指定目录。 */\nexport function invalidateModelCatalogCache(rpc: CodingNsRpcClient, adapterId?: string, sessionId?: string): void {\n const keys = sessionId === undefined\n ? [rpc as object, ...(modelCatalogHostKeys.get(rpc as object)?.values() ?? [])]\n : [modelCatalogKey(rpc, sessionId)]\n for (const key of keys) {\n const cache = modelCatalogCaches.get(key)\n const times = modelCatalogCacheTimes.get(key)\n const loads = modelCatalogLoads.get(key)\n if (adapterId === undefined) loads?.clear()\n else loads?.delete(adapterId)\n if (adapterId === undefined) { cache?.clear(); times?.clear() }\n else { cache?.delete(adapterId); times?.delete(adapterId) }\n }\n}\n\n/**\n * 「判定可能过期」时的复检节流。\n *\n * 目录声明了服务档位却未确认官方订阅时,值得再探测一次;但真实第三方接入会\n * 长期停在这个状态,不能每次挂载都发一次请求。这里按适配器记录最近一次复检\n * 时间,只有超过间隔才允许再次作废缓存。\n */\nexport const MODEL_CATALOG_REVALIDATE_INTERVAL_MS = 60_000\n\nconst modelCatalogRevalidations = new WeakMap<object, Map<string, number>>()\n\nexport function shouldRevalidateModelCatalog(\n rpc: CodingNsRpcClient,\n adapterId: string,\n needsRevalidation: boolean,\n sessionId?: string,\n): boolean {\n if (!needsRevalidation) return false\n const key = modelCatalogKey(rpc, sessionId)\n let times = modelCatalogRevalidations.get(key)\n if (times === undefined) {\n times = new Map()\n modelCatalogRevalidations.set(key, times)\n }\n const last = times.get(adapterId)\n const now = Date.now()\n if (last !== undefined && now - last < MODEL_CATALOG_REVALIDATE_INTERVAL_MS) return false\n times.set(adapterId, now)\n return true\n}\n\nexport function getModelCatalogCache(rpc: CodingNsRpcClient, sessionId?: string): Map<string, CodingNsCliModelCatalog> {\n const key = modelCatalogKey(rpc, sessionId)\n let cache = modelCatalogCaches.get(key)\n if (cache === undefined) {\n cache = new Map()\n modelCatalogCaches.set(key, cache)\n }\n return cache\n}\n\nexport function loadModelCatalog(rpc: CodingNsRpcClient, adapterId: string, sessionId?: string): Promise<CodingNsCliModelCatalog> {\n const cached = getModelCatalogCache(rpc, sessionId).get(adapterId)\n // 回退目录由 Host 保存;用户重新检测后清理此缓存并读取最新结果。\n if (cached !== undefined && cached.fallback !== true && isFreshCacheEntry(rpc, adapterId, cached, sessionId)) {\n return Promise.resolve(cached)\n }\n if (cached !== undefined) invalidateModelCatalogCache(rpc, adapterId, sessionId)\n const loads = getModelCatalogLoadCache(rpc, sessionId)\n const running = loads.get(adapterId)\n if (running !== undefined) return running\n const request = callCliRpc<CodingNsCliModelCatalog>(rpc, 'models', {\n adapterId,\n ...(sessionId === undefined ? {} : { sessionId }),\n }).then((value) => {\n // 手动重新检测已替换请求时,迟到结果不能复活被作废的目录。\n if (loads.get(adapterId) !== request) return loadModelCatalog(rpc, adapterId, sessionId)\n if (value.fallback === true) invalidateModelCatalogCache(rpc, adapterId, sessionId)\n else storeCatalog(rpc, adapterId, value, sessionId)\n return value\n }).finally(() => {\n if (loads.get(adapterId) === request) loads.delete(adapterId)\n })\n loads.set(adapterId, request)\n return request\n}\n\n/** 缓存条目是否仍在有效期内;没有时间戳的旧条目按过期处理并触发一次重新读取。 */\nfunction isFreshCacheEntry(rpc: CodingNsRpcClient, adapterId: string, cached: CodingNsCliModelCatalog, sessionId?: string): boolean {\n const entry = cacheEntry(rpc, adapterId, sessionId)\n if (entry === undefined || entry.value !== cached) return false\n return Date.now() - entry.storedAt < MODEL_CATALOG_CACHE_TTL_MS\n}\n\nfunction getModelCatalogLoadCache(rpc: CodingNsRpcClient, sessionId?: string): Map<string, Promise<CodingNsCliModelCatalog>> {\n const key = modelCatalogKey(rpc, sessionId)\n let cache = modelCatalogLoads.get(key)\n if (cache === undefined) {\n cache = new Map()\n modelCatalogLoads.set(key, cache)\n }\n return cache\n}\n"],"mappings":";;;;;;;;;;EAiBA,MAAa,yBAAyB;;;;;;;EAQtC,MAAM,uBAAqE;GACzE,KAAK;IAAE,WAAW;IAAO,aAAa;IAAoB,OAAO;GAAU;GAC3E,gBAAgB;IAAE,WAAW;IAAgB,aAAa;IAAgB,OAAO;GAAU;GAC3F,eAAe;IAAE,WAAW;IAAe,aAAa;IAAe,OAAO;GAAU;GACxF,MAAM;IAAE,WAAW;IAAQ,aAAa;IAAQ,OAAO;GAAU;GACjE,QAAQ;IAAE,WAAW;IAAU,aAAa;IAAc,OAAO;GAAU;GAC3E,IAAI;IAAE,WAAW;IAAM,aAAa;IAAM,OAAO;GAAU;GAC3D,OAAO;IAAE,WAAW;IAAS,aAAa;IAAS,OAAO;GAAU;GACpE,UAAU;IAAE,WAAW;IAAY,aAAa;IAAY,OAAO;GAAU;GAC7E,MAAM;IAAE,WAAW;IAAQ,aAAa;IAAQ,OAAO;GAAU;GACjE,OAAO;IAAE,WAAW;IAAS,aAAa;IAAgB,OAAO;GAAU;GAC3E,OAAO;IAAE,WAAW;IAAS,aAAa;IAAS,OAAO;GAAU;GACpE,WAAW;IAAE,WAAW;IAAa,aAAa;IAAa,OAAO;GAAU;GAChF,WAAW;IAAE,WAAW;IAAa,aAAa;IAAa,OAAO;GAAU;GAChF,cAAc;IAAE,WAAW;IAAc,aAAa;IAAc,OAAO;GAAU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