@songtonyli/dsh-cli 0.1.75 → 0.1.77
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.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh/package.json +117 -116
- package/node_modules/@deepseek-ai/dsh-acp/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-agent/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +3 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.host.js +7 -6
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.remote-client.js +7 -6
- package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +9 -10
- package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +7 -8
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +490 -62
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +3 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +42 -41
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +72 -73
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/client.js +166 -21
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/client/index.js +36 -9
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/client/inventory.js +101 -0
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/client/model.js +23 -7
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +18 -19
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +12 -13
- package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-app-boot/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +40 -26
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-base/package.json +94 -94
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +237 -11
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +5 -4
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +7 -10
- package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +10 -7
- package/node_modules/@deepseek-ai/dsh-client-modules/README.md +8 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +9 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +136 -6
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +25 -6
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +3 -4
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.md +22 -4
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.zh.md +22 -4
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/index.js +238 -6
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/typert.host.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/typert.remote-client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +12 -11
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +3 -5
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +6 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +14 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +11 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +8 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +3 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +34 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +12 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +356 -124
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +30 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +11 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +25 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +5 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +12 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +18 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +9 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +8 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +7 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +13 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +3 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +8 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +8 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +34 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +13 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +16 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +12 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +17 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +314 -85
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +13 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.i18n.yaml +34 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.md +72 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.zh.md +72 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/lib/client.js +1637 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/lib/index.js +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +62 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +13 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +1 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +17 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +4 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +7 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +4 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +117 -66
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +13 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +6 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +176 -39
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +15 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +324 -36
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +8 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +9 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +5 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +6 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +6 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +4 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +6 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +6 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +7 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +9 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +8 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +15 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +11 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +12 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +12 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +14 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +15 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +9 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +75 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +25 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +14 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +18 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +11 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +23 -26
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-commands/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +95 -8
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +9 -7
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/index.js +15 -13
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/details.js +10 -4
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-deque/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +38 -38
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +9 -22
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +18 -26
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +14 -32
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/index.js +70 -17
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/worker.js +16 -12
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +14 -20
- package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/README.i18n.yaml +34 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/README.md +68 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/README.zh.md +68 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/cordis.patch.yml +10 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/icon.svg +9 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +50 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +10 -13
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/worker.js +26 -12
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-fs/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-goal/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-headless/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-hmr/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-otel/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-persona/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +4 -3
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +14 -14
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +13 -13
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/failure.js +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +3 -3
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/tools.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.i18n.yaml +43 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.md +117 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.zh.md +117 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/index.js +661 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/typert.host.js +407 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/typert.remote-client.js +259 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/index-url.js +27 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/index.js +351 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/parse-thread.js +61 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/parse.js +36 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/search.js +135 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/tools.js +128 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/worker.js +8 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/worker.cjs +1759 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +89 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market-index/README.i18n.yaml +34 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market-index/README.md +74 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market-index/README.zh.md +74 -0
- package/node_modules/@deepseek-ai/dsh-plugin-market-index/lib/index.js +320 -0
- package/node_modules/@deepseek-ai/{dsh-client-ui-slots → dsh-plugin-market-index}/package.json +15 -12
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +5 -0
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +34 -34
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +18 -21
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +35 -35
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-settings/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-shell/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-skill/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-skill-office/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-skill-office/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-office/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-export-pdf/SKILL.md +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-render/SKILL.md +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-spill/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +46 -46
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/index.js +252 -47
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +32 -32
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +125 -4
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-tools/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tools/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-tools/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +45 -26
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ptc.js +20 -10
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ts-types.js +26 -9
- package/node_modules/@deepseek-ai/dsh-tools/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +10 -10
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +10 -10
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +347 -136
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +78 -78
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +140 -139
- package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +18 -20
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +36 -36
- package/node_modules/@deepseek-ai/dsh-working-directory/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +18 -18
- package/node_modules/@earendil-works/pi-ai/README.md +5 -34
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +59 -54
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +29 -27
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +15 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +21 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +28 -15
- package/node_modules/@earendil-works/pi-ai/dist/index.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js +26 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +3 -0
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/minisearch/LICENSE.txt +7 -0
- package/node_modules/minisearch/README.md +347 -0
- package/node_modules/minisearch/dist/cjs/SearchableMap.cjs +549 -0
- package/node_modules/minisearch/dist/cjs/index.cjs +2007 -0
- package/node_modules/minisearch/dist/es/SearchableMap.js +547 -0
- package/node_modules/minisearch/dist/es/index.js +2005 -0
- package/node_modules/minisearch/dist/umd/SearchableMap.js +555 -0
- package/node_modules/minisearch/dist/umd/index.js +2013 -0
- package/node_modules/minisearch/package.json +90 -0
- package/node_modules/minisearch/src/MiniSearch.test.js +1997 -0
- package/node_modules/minisearch/src/MiniSearch.ts +2261 -0
- package/node_modules/minisearch/src/SearchableMap/SearchableMap.test.js +314 -0
- package/node_modules/minisearch/src/SearchableMap/SearchableMap.ts +424 -0
- package/node_modules/minisearch/src/SearchableMap/TreeIterator.ts +103 -0
- package/node_modules/minisearch/src/SearchableMap/fuzzySearch.ts +130 -0
- package/node_modules/minisearch/src/SearchableMap/types.ts +18 -0
- package/node_modules/minisearch/src/index.ts +4 -0
- package/node_modules/minisearch/src/testSetup/jest.js +1 -0
- package/package.json +305 -301
- package/node_modules/@deepseek-ai/dsh-client-store/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-client-store/README.i18n.yaml +0 -28
- package/node_modules/@deepseek-ai/dsh-client-store/README.md +0 -46
- package/node_modules/@deepseek-ai/dsh-client-store/README.zh.md +0 -46
- package/node_modules/@deepseek-ai/dsh-client-store/lib/index.js +0 -180
- package/node_modules/@deepseek-ai/dsh-client-store/lib/types/contract.d.ts +0 -121
- package/node_modules/@deepseek-ai/dsh-client-store/lib/types/index.d.ts +0 -92
- package/node_modules/@deepseek-ai/dsh-client-store/package.json +0 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +0 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +0 -221
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +0 -221
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Button.module.css +0 -77
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Checkbox.module.css +0 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/CodeCard.module.css +0 -83
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/CommandText.module.css +0 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ConnectionIndicator.module.css +0 -118
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DiffBlock.module.css +0 -80
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DisclosureRow.module.css +0 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/FileTypeIcon.module.css +0 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/HoverCard.module.css +0 -90
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ImageLightbox.module.css +0 -54
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ImagePreview.module.css +0 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/InlineEditor.module.css +0 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Input.module.css +0 -38
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/JsonTree.module.css +0 -345
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Menu.module.css +0 -285
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuGroup.module.css +0 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuSurface.module.css +0 -49
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Modal.module.css +0 -129
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/OnboardingSurface.module.css +0 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/PathLabel.module.css +0 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Pill.module.css +0 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ReadBlock.module.css +0 -43
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/RiskConfirmation.module.css +0 -73
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SearchBlock.module.css +0 -112
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedControl.module.css +0 -76
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedTabs.module.css +0 -55
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ShortcutKeys.module.css +0 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/StateDot.module.css +0 -100
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Switch.module.css +0 -49
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tag.module.css +0 -57
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TerminalBlock.module.css +0 -205
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TextShimmer.module.css +0 -88
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Toast.module.css +0 -101
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tooltip.module.css +0 -63
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/WebBlock.module.css +0 -141
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +0 -12583
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css +0 -145
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/JsonBlock.module.css +0 -32
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +0 -467
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/SettingsForm.module.css +0 -53
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/fields.module.css +0 -145
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/BrandWordmark.d.ts +0 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Button.d.ts +0 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Checkbox.d.ts +0 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/CodeFileIcon.d.ts +0 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/CodeToolbar.d.ts +0 -30
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/CommandText.d.ts +0 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ConfigField.d.ts +0 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ConnectionIndicator.d.ts +0 -26
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DiffBlock.d.ts +0 -52
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +0 -38
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/FileTypeIcon.d.ts +0 -43
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/FishLogo.d.ts +0 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/FoldToggle.d.ts +0 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/HoverCard.d.ts +0 -40
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/HoverCardGroup.d.ts +0 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ImageLightbox.d.ts +0 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ImagePreview.d.ts +0 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/InlineEditor.d.ts +0 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Input.d.ts +0 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/JsonTree.d.ts +0 -59
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/LinkIcon.d.ts +0 -34
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Menu.d.ts +0 -143
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuGroup.d.ts +0 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuSurface.d.ts +0 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Modal.d.ts +0 -44
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/OnboardingSurface.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PathLabel.d.ts +0 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PermissionIcon.d.ts +0 -51
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Pill.d.ts +0 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ReadBlock.d.ts +0 -48
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ReferenceIcon.d.ts +0 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/RiskConfirmation.d.ts +0 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SearchBlock.d.ts +0 -72
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedControl.d.ts +0 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedTabs.d.ts +0 -26
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ShortcutKeys.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SiteGlyph.d.ts +0 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/StateDot.d.ts +0 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Switch.d.ts +0 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Tag.d.ts +0 -32
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TerminalBlock.d.ts +0 -86
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TextShimmer.d.ts +0 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Toast.d.ts +0 -49
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Tooltip.d.ts +0 -63
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/WebBlock.d.ts +0 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ansi.d.ts +0 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/clipboard.d.ts +0 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-file-icon-artwork.d.ts +0 -54
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-file-types.d.ts +0 -30
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-highlighting.d.ts +0 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/darwin-desktop.d.ts +0 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/file-size.d.ts +0 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/focus.d.ts +0 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/guide-artwork.d.ts +0 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/head-tail-cap.d.ts +0 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/index.d.ts +0 -385
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/props.d.ts +0 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/shared-artwork.d.ts +0 -43
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +0 -102
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/input-modality.d.ts +0 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/keyboard-composition.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/CodeBlock.d.ts +0 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/JsonBlock.d.ts +0 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/MarkdownDelegate.d.ts +0 -46
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/MarkdownText.d.ts +0 -49
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/cjkFriendlyStrong.d.ts +0 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/file-link.d.ts +0 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/highlight.d.ts +0 -148
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/incremental.d.ts +0 -80
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/katex.d.ts +0 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/local-image-syntax.d.ts +0 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/mathCompatibility.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/parse.d.ts +0 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/plain-text.d.ts +0 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/render.d.ts +0 -141
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/useViewportHighlighting.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/overlay-top-margin.d.ts +0 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/plugin-artwork.d.ts +0 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/pointer-grace.d.ts +0 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/rank-by-name.d.ts +0 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/relative-time.d.ts +0 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/SettingsForm.d.ts +0 -46
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/fields.d.ts +0 -70
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/form-model.d.ts +0 -214
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/use-copy-feedback.d.ts +0 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredMaxHeight.d.ts +0 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredPosition.d.ts +0 -36
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useDismissOnOutsidePointer.d.ts +0 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useModalLayer.d.ts +0 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/user-text.d.ts +0 -29
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/user-text.module.css +0 -46
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +0 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/README.i18n.yaml +0 -55
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/README.md +0 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/README.zh.md +0 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/index.js +0 -577
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/types/index.d.ts +0 -955
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/types/renderer.d.ts +0 -271
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/types/store.d.ts +0 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -425
|
@@ -0,0 +1,1637 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@deepseek-ai/dsh-client-ui-plugin-market",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let react = require("react");
|
|
9
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10
|
+
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
11
|
+
//#region lib/types/client/presentation.js
|
|
12
|
+
/** The query a newly selected index starts with. */
|
|
13
|
+
const INITIAL_QUERY = {
|
|
14
|
+
text: "",
|
|
15
|
+
category: null,
|
|
16
|
+
labels: [],
|
|
17
|
+
sort: { kind: "index" }
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Replace the query text. Index order becomes relevance order when blank text gains words, and returns when the text
|
|
21
|
+
* becomes blank; an order chosen while text is present stays.
|
|
22
|
+
* @param query - the current query.
|
|
23
|
+
* @param text - the new text.
|
|
24
|
+
* @returns the query with the text and its order.
|
|
25
|
+
*/
|
|
26
|
+
function withText(query, text) {
|
|
27
|
+
const [was, blank] = [query.text.trim() === "", text.trim() === ""];
|
|
28
|
+
const sort = was && !blank && query.sort.kind === "index" ? { kind: "relevance" } : blank && query.sort.kind === "relevance" ? { kind: "index" } : query.sort;
|
|
29
|
+
return {
|
|
30
|
+
...query,
|
|
31
|
+
text,
|
|
32
|
+
sort
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Drop filters and the sort key the index no longer declares, so every active choice stays visible in the toolbar.
|
|
37
|
+
* @param query - the current query.
|
|
38
|
+
* @param metadata - the declarations of the index that answered it.
|
|
39
|
+
* @returns the query itself when every id is declared, otherwise a reduced copy.
|
|
40
|
+
*/
|
|
41
|
+
function declaredQuery(query, metadata) {
|
|
42
|
+
const category = query.category !== null && !Object.hasOwn(metadata.categories, query.category) ? null : query.category;
|
|
43
|
+
const labels = query.labels.filter((label) => Object.hasOwn(metadata.labels, label));
|
|
44
|
+
const sort = query.sort.kind === "key" && !Object.hasOwn(metadata.sortKeys, query.sort.id) ? { kind: "index" } : query.sort;
|
|
45
|
+
return category === query.category && labels.length === query.labels.length && sort === query.sort ? query : {
|
|
46
|
+
...query,
|
|
47
|
+
category,
|
|
48
|
+
labels,
|
|
49
|
+
sort
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Order declarations by their localized title, then by id code points.
|
|
54
|
+
* @param declarations - id → declaration with a `title`.
|
|
55
|
+
* @param resolveText - current-language text resolution.
|
|
56
|
+
* @param language - current UI language for collation.
|
|
57
|
+
* @returns declarations in display order.
|
|
58
|
+
*/
|
|
59
|
+
function displayDeclarations(declarations, resolveText, language) {
|
|
60
|
+
const collator = new Intl.Collator(language);
|
|
61
|
+
return Object.entries(declarations).map(([id, declaration]) => ({
|
|
62
|
+
id,
|
|
63
|
+
title: resolveText(declaration.title),
|
|
64
|
+
declaration
|
|
65
|
+
})).sort((a, b) => collator.compare(a.title, b.title) || (a.id < b.id ? -1 : 1));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The version an entry presents and installs by default: its default version, or its highest version when none is compatible.
|
|
69
|
+
* @param entry - the market entry.
|
|
70
|
+
* @returns the presented version.
|
|
71
|
+
*/
|
|
72
|
+
function presentedVersion(entry) {
|
|
73
|
+
return entry.versions.find((version) => version.version === entry.defaultVersion) ?? entry.versions[0];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* List where a version installs from, so users can check its origin before installing.
|
|
77
|
+
* @param name - the entry's package name.
|
|
78
|
+
* @param version - the version to install.
|
|
79
|
+
* @returns the npm package and registry, or the repository, full commit, and package directory.
|
|
80
|
+
*/
|
|
81
|
+
function sourceFacts(name, version) {
|
|
82
|
+
const { source } = version;
|
|
83
|
+
if (source.type === "npm") return [{
|
|
84
|
+
kind: "package",
|
|
85
|
+
value: `${name}@${version.version}`
|
|
86
|
+
}, ...source.registry === void 0 ? [] : [{
|
|
87
|
+
kind: "registry",
|
|
88
|
+
value: source.registry
|
|
89
|
+
}]];
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
kind: "repository",
|
|
93
|
+
value: source.url
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
kind: "commit",
|
|
97
|
+
value: source.commit
|
|
98
|
+
},
|
|
99
|
+
...source.path === void 0 ? [] : [{
|
|
100
|
+
kind: "directory",
|
|
101
|
+
value: source.path
|
|
102
|
+
}]
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Name an index source: its market title once read, otherwise its host.
|
|
107
|
+
* @param index - the configured source.
|
|
108
|
+
* @param resolveText - current-language text resolution.
|
|
109
|
+
* @returns the display name; a URL the browser cannot parse is shown as written.
|
|
110
|
+
*/
|
|
111
|
+
function indexLabel(index, resolveText) {
|
|
112
|
+
if (index.title !== void 0) return resolveText(index.title);
|
|
113
|
+
return URL.canParse(index.url) ? new URL(index.url).host : index.url;
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region \0dsh-css:/Users/songli/deepseek-harness/packages/client/ui-plugin-market/src/client/DiscoverSection.module.css.mjs
|
|
117
|
+
const css = ".dtOKlq_section{flex-direction:column;gap:16px;display:flex}.dtOKlq_toolbar{align-items:center;gap:8px;display:flex}.dtOKlq_marketButton{max-width:240px;margin-left:-8px;font-weight:500}.dtOKlq_marketName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dtOKlq_search{flex:1;min-width:120px}.dtOKlq_categories{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.dtOKlq_muted,.dtOKlq_meta{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}.dtOKlq_meta{overflow-wrap:anywhere;font-size:12px;line-height:18px}.dtOKlq_strong{overflow-wrap:anywhere;font-size:14px;font-weight:500;line-height:20px}.dtOKlq_error{color:var(--dsw-alias-state-error-primary);align-items:center;gap:6px;margin:0;font-size:13px;line-height:20px;display:inline-flex}.dtOKlq_failure{align-items:center;gap:10px;display:flex}.dtOKlq_notice{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-label-secondary);align-items:flex-start;gap:8px;margin:0;padding:10px 12px;font-size:12px;line-height:18px;display:flex}.dtOKlq_notice>svg{color:var(--dsw-alias-state-warn-primary);flex:none;margin-top:2px}.dtOKlq_cards{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}.dtOKlq_card{border-radius:var(--dsw-radius-xl);align-items:center;gap:14px;margin:0 -8px;padding:8px;display:flex;position:relative}.dtOKlq_card:hover{background:var(--dsw-alias-interactive-bg-hover)}.dtOKlq_icon{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:48px;height:48px;color:var(--dsw-alias-label-secondary);flex:none;justify-content:center;align-items:center;display:inline-flex}.dtOKlq_image{object-fit:contain}.dtOKlq_main{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.dtOKlq_titleRow{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}.dtOKlq_cardOpen{max-width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;padding:0;font-size:14px;font-weight:500;line-height:20px;overflow:hidden}.dtOKlq_cardOpen:after{content:\"\";border-radius:var(--dsw-radius-xl);position:absolute;inset:0}.dtOKlq_cardOpen:focus-visible{outline:none}.dtOKlq_cardOpen:focus-visible:after{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.dtOKlq_description{color:var(--dsw-alias-label-tertiary);-webkit-line-clamp:1;-webkit-box-orient:vertical;font-size:13px;line-height:18px;display:-webkit-box;overflow:hidden}.dtOKlq_cardEnd{z-index:1;flex:none;align-items:center;gap:8px;display:inline-flex;position:relative}.dtOKlq_blocked{opacity:.5;cursor:not-allowed}.dtOKlq_more{align-self:center}.dtOKlq_empty{text-align:center;flex-direction:column;align-items:center;gap:8px;padding:64px 0;display:flex}.dtOKlq_emptyTitle{margin:8px 0 0;font-size:14px;font-weight:500;line-height:20px}.dtOKlq_empty>button{margin-top:8px}.dtOKlq_detail{flex-direction:column;gap:16px;display:flex}.dtOKlq_crumb{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;align-self:flex-start;align-items:center;gap:6px;padding:0;font-size:12.5px;display:inline-flex}.dtOKlq_crumb:hover{color:var(--dsw-alias-label-primary)}.dtOKlq_crumb:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.dtOKlq_crumbIcon{transform:rotate(90deg)}.dtOKlq_detailHead{align-items:center;gap:14px;display:flex}.dtOKlq_detailTitle{margin:0;font-size:20px;font-weight:500;line-height:28px}.dtOKlq_detailDescription{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0;font-size:14px;line-height:22px}.dtOKlq_detailSection{flex-direction:column;gap:12px;margin-top:16px;display:flex}.dtOKlq_sectionTitle{margin:0;font-size:14px;font-weight:500;line-height:20px}.dtOKlq_facts{margin:0}.dtOKlq_facts div{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:16px;min-height:44px;padding:8px 2px;display:flex}.dtOKlq_facts dt{color:var(--dsw-alias-label-secondary);flex:none;font-size:13px;line-height:20px}.dtOKlq_facts dd{text-align:end;overflow-wrap:anywhere;min-width:0;margin:0;font-size:13px;line-height:20px}.dtOKlq_facts code{background:var(--dsw-alias-bg-module-platform);box-decoration-break:clone;font-family:var(--ds-font-family-code);border-radius:4px;padding:2px 6px;font-size:12px}.dtOKlq_tags{flex-wrap:wrap;justify-content:flex-end;gap:6px;display:flex}.dtOKlq_dialog{width:min(480px,100vw - 32px)}.dtOKlq_dialogBody{flex-direction:column;gap:12px;display:flex}.dtOKlq_sourceList,.dtOKlq_versions{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.dtOKlq_sourceRow,.dtOKlq_versionRow{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:8px 0;display:flex}.dtOKlq_sourceError{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.dtOKlq_sourceForm{align-items:center;gap:8px;display:flex}.dtOKlq_grow{flex:1;min-width:0}.dtOKlq_confirmHead{align-items:center;gap:14px;display:flex}.dtOKlq_skeletonFill{background:var(--dsw-alias-bg-skeleton);animation:2s cubic-bezier(.36,0,.64,1) infinite dtOKlq_dsh-market-skeleton}.dtOKlq_icon.dtOKlq_skeletonFill{border-color:#0000}.dtOKlq_skeletonBar{border-radius:var(--dsw-radius-xs);height:12px;margin:4px 0;display:block}.dtOKlq_skeletonTitle{width:min(144px,60%)}.dtOKlq_skeletonDescription{width:min(280px,85%)}@keyframes dtOKlq_dsh-market-skeleton{0%{opacity:1}40%{opacity:.6}80%,to{opacity:1}}@media (prefers-reduced-motion:reduce){.dtOKlq_skeletonFill{animation:none}}.dtOKlq_link{color:var(--dsw-alias-link);overflow-wrap:anywhere;text-decoration:none}.dtOKlq_link:hover{text-decoration:underline}";
|
|
118
|
+
const tagId = "@deepseek-ai/dsh-client-ui-plugin-market/DiscoverSection.module.css";
|
|
119
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
120
|
+
const tag = document.createElement("style");
|
|
121
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-plugin-market";
|
|
122
|
+
tag.dataset.pluginCss = tagId;
|
|
123
|
+
tag.textContent = css;
|
|
124
|
+
document.head.appendChild(tag);
|
|
125
|
+
}
|
|
126
|
+
var DiscoverSection_module_css_default = {
|
|
127
|
+
"blocked": "dtOKlq_blocked",
|
|
128
|
+
"card": "dtOKlq_card",
|
|
129
|
+
"cardEnd": "dtOKlq_cardEnd",
|
|
130
|
+
"cardOpen": "dtOKlq_cardOpen",
|
|
131
|
+
"cards": "dtOKlq_cards",
|
|
132
|
+
"categories": "dtOKlq_categories",
|
|
133
|
+
"confirmHead": "dtOKlq_confirmHead",
|
|
134
|
+
"crumb": "dtOKlq_crumb",
|
|
135
|
+
"crumbIcon": "dtOKlq_crumbIcon",
|
|
136
|
+
"description": "dtOKlq_description",
|
|
137
|
+
"detail": "dtOKlq_detail",
|
|
138
|
+
"detailDescription": "dtOKlq_detailDescription",
|
|
139
|
+
"detailHead": "dtOKlq_detailHead",
|
|
140
|
+
"detailSection": "dtOKlq_detailSection",
|
|
141
|
+
"detailTitle": "dtOKlq_detailTitle",
|
|
142
|
+
"dialog": "dtOKlq_dialog",
|
|
143
|
+
"dialogBody": "dtOKlq_dialogBody",
|
|
144
|
+
"dsh-market-skeleton": "dtOKlq_dsh-market-skeleton",
|
|
145
|
+
"empty": "dtOKlq_empty",
|
|
146
|
+
"emptyTitle": "dtOKlq_emptyTitle",
|
|
147
|
+
"error": "dtOKlq_error",
|
|
148
|
+
"facts": "dtOKlq_facts",
|
|
149
|
+
"failure": "dtOKlq_failure",
|
|
150
|
+
"grow": "dtOKlq_grow",
|
|
151
|
+
"icon": "dtOKlq_icon",
|
|
152
|
+
"image": "dtOKlq_image",
|
|
153
|
+
"link": "dtOKlq_link",
|
|
154
|
+
"main": "dtOKlq_main",
|
|
155
|
+
"marketButton": "dtOKlq_marketButton",
|
|
156
|
+
"marketName": "dtOKlq_marketName",
|
|
157
|
+
"meta": "dtOKlq_meta",
|
|
158
|
+
"more": "dtOKlq_more",
|
|
159
|
+
"muted": "dtOKlq_muted",
|
|
160
|
+
"notice": "dtOKlq_notice",
|
|
161
|
+
"search": "dtOKlq_search",
|
|
162
|
+
"section": "dtOKlq_section",
|
|
163
|
+
"sectionTitle": "dtOKlq_sectionTitle",
|
|
164
|
+
"skeletonBar": "dtOKlq_skeletonBar",
|
|
165
|
+
"skeletonDescription": "dtOKlq_skeletonDescription",
|
|
166
|
+
"skeletonFill": "dtOKlq_skeletonFill",
|
|
167
|
+
"skeletonTitle": "dtOKlq_skeletonTitle",
|
|
168
|
+
"sourceError": "dtOKlq_sourceError",
|
|
169
|
+
"sourceForm": "dtOKlq_sourceForm",
|
|
170
|
+
"sourceList": "dtOKlq_sourceList",
|
|
171
|
+
"sourceRow": "dtOKlq_sourceRow",
|
|
172
|
+
"strong": "dtOKlq_strong",
|
|
173
|
+
"tags": "dtOKlq_tags",
|
|
174
|
+
"titleRow": "dtOKlq_titleRow",
|
|
175
|
+
"toolbar": "dtOKlq_toolbar",
|
|
176
|
+
"versionRow": "dtOKlq_versionRow",
|
|
177
|
+
"versions": "dtOKlq_versions"
|
|
178
|
+
};
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region lib/types/client/DiscoverSection.js
|
|
181
|
+
/** Discover: search one plugin market index, read an entry's page, and install a version. */
|
|
182
|
+
/** Typing pause before the query text is sent. */
|
|
183
|
+
const TEXT_DELAY_MS = 250;
|
|
184
|
+
/** Artwork size inside the 48px icon frame, as on the Installed tab. */
|
|
185
|
+
const ICON = 36;
|
|
186
|
+
const FAILURE_KEYS = {
|
|
187
|
+
fetch: "readFailed",
|
|
188
|
+
invalid: "readInvalid",
|
|
189
|
+
changed: "readChanged"
|
|
190
|
+
};
|
|
191
|
+
const FACT_KEYS = {
|
|
192
|
+
package: "factPackage",
|
|
193
|
+
registry: "factRegistry",
|
|
194
|
+
repository: "factRepository",
|
|
195
|
+
commit: "factCommit",
|
|
196
|
+
directory: "factDirectory"
|
|
197
|
+
};
|
|
198
|
+
function MarketIcon({ src, size }) {
|
|
199
|
+
const [failed, setFailed] = (0, react.useState)();
|
|
200
|
+
return src === void 0 || src === failed ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PluginArtworkDefault, { size }) : (0, react_jsx_runtime.jsx)("img", {
|
|
201
|
+
className: DiscoverSection_module_css_default.image,
|
|
202
|
+
src,
|
|
203
|
+
width: size,
|
|
204
|
+
height: size,
|
|
205
|
+
alt: "",
|
|
206
|
+
loading: "lazy",
|
|
207
|
+
referrerPolicy: "no-referrer",
|
|
208
|
+
onError: () => {
|
|
209
|
+
setFailed(src);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function sourceFailureText(failure, t) {
|
|
214
|
+
switch (failure.kind) {
|
|
215
|
+
case "invalid": return t("sourceInvalid");
|
|
216
|
+
case "duplicate": return t("sourceDuplicate");
|
|
217
|
+
case "unavailable": return t("sourceUnavailable");
|
|
218
|
+
case "other": return t("sourceFailed");
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function entryTitle(entry, face) {
|
|
222
|
+
return entry.title === void 0 ? entry.name : face.resolveText(entry.title);
|
|
223
|
+
}
|
|
224
|
+
/** Whether installation accepts a version: compatible, or covered by an exemption. */
|
|
225
|
+
function installable(compatibility) {
|
|
226
|
+
return compatibility.compatible || compatibility.exempted;
|
|
227
|
+
}
|
|
228
|
+
function formatDate(timestamp, language, style) {
|
|
229
|
+
return new Intl.DateTimeFormat(language, { dateStyle: style }).format(/* @__PURE__ */ new Date(timestamp * 1e3));
|
|
230
|
+
}
|
|
231
|
+
/** The one action an entry offers in its current state; Install chooses its default version. */
|
|
232
|
+
function EntryAction({ entry, title, t, onInstall, onOpenInstalled }) {
|
|
233
|
+
const { status } = entry.installation;
|
|
234
|
+
if (status !== "not-installed") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
235
|
+
variant: "ghost",
|
|
236
|
+
size: "sm",
|
|
237
|
+
"aria-label": t("openInstalled", { name: title }),
|
|
238
|
+
onClick: onOpenInstalled,
|
|
239
|
+
children: t(status === "update-available" ? "statusUpdate" : status === "provided" ? "statusProvided" : "statusInstalled")
|
|
240
|
+
});
|
|
241
|
+
const version = presentedVersion(entry);
|
|
242
|
+
if (!version.compatibility.compatible && !version.compatibility.exempted) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
243
|
+
label: t("noCompatibleVersion", { runtime: version.compatibility.runtimeVersion }),
|
|
244
|
+
side: "bottom",
|
|
245
|
+
portal: true,
|
|
246
|
+
delayMs: 300,
|
|
247
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
248
|
+
variant: "outline",
|
|
249
|
+
size: "sm",
|
|
250
|
+
className: DiscoverSection_module_css_default.blocked,
|
|
251
|
+
"aria-disabled": "true",
|
|
252
|
+
"aria-label": t("installTitle", { name: title }),
|
|
253
|
+
children: t("install")
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
257
|
+
variant: "outline",
|
|
258
|
+
size: "sm",
|
|
259
|
+
"aria-label": t("installTitle", { name: title }),
|
|
260
|
+
onClick: () => {
|
|
261
|
+
onInstall(version);
|
|
262
|
+
},
|
|
263
|
+
children: t("install")
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function EntryCard({ entry, t, face, language, labels, onOpen, onInstall, onOpenInstalled }) {
|
|
267
|
+
const title = entryTitle(entry, face);
|
|
268
|
+
const version = presentedVersion(entry);
|
|
269
|
+
const date = formatDate(version.publishTimestamp, language, "medium");
|
|
270
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
271
|
+
className: DiscoverSection_module_css_default.card,
|
|
272
|
+
"data-market-entry": entry.name,
|
|
273
|
+
children: [
|
|
274
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
275
|
+
className: DiscoverSection_module_css_default.icon,
|
|
276
|
+
"aria-hidden": "true",
|
|
277
|
+
children: (0, react_jsx_runtime.jsx)(MarketIcon, {
|
|
278
|
+
src: entry.icon,
|
|
279
|
+
size: ICON
|
|
280
|
+
})
|
|
281
|
+
}),
|
|
282
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
283
|
+
className: DiscoverSection_module_css_default.main,
|
|
284
|
+
children: [
|
|
285
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
286
|
+
className: DiscoverSection_module_css_default.titleRow,
|
|
287
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
288
|
+
type: "button",
|
|
289
|
+
className: DiscoverSection_module_css_default.cardOpen,
|
|
290
|
+
"aria-label": t("openEntry", { name: title }),
|
|
291
|
+
onClick: onOpen,
|
|
292
|
+
children: title
|
|
293
|
+
}), labels.filter((label) => entry.metadata.labels.includes(label.id)).map((label) => (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { children: label.title }, label.id))]
|
|
294
|
+
}),
|
|
295
|
+
entry.description === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
296
|
+
className: DiscoverSection_module_css_default.description,
|
|
297
|
+
children: face.resolveText(entry.description)
|
|
298
|
+
}),
|
|
299
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
300
|
+
className: DiscoverSection_module_css_default.meta,
|
|
301
|
+
children: entry.author === void 0 ? t("entryMeta", {
|
|
302
|
+
version: version.version,
|
|
303
|
+
date
|
|
304
|
+
}) : t("entryMetaAuthor", {
|
|
305
|
+
version: version.version,
|
|
306
|
+
author: entry.author,
|
|
307
|
+
date
|
|
308
|
+
})
|
|
309
|
+
})
|
|
310
|
+
]
|
|
311
|
+
}),
|
|
312
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
313
|
+
className: DiscoverSection_module_css_default.cardEnd,
|
|
314
|
+
children: (0, react_jsx_runtime.jsx)(EntryAction, {
|
|
315
|
+
entry,
|
|
316
|
+
title,
|
|
317
|
+
t,
|
|
318
|
+
onInstall,
|
|
319
|
+
onOpenInstalled
|
|
320
|
+
})
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
/** One row of the version list: its state tags and an Install button when installation accepts it. */
|
|
326
|
+
function VersionRow({ entry, version, title, t, language, onInstall }) {
|
|
327
|
+
const current = entry.installation.installedVersion === version.version;
|
|
328
|
+
const offered = !current && entry.installation.status !== "provided" && installable(version.compatibility);
|
|
329
|
+
const { compatibility } = version;
|
|
330
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
331
|
+
className: DiscoverSection_module_css_default.versionRow,
|
|
332
|
+
"data-market-version": version.version,
|
|
333
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
334
|
+
className: DiscoverSection_module_css_default.main,
|
|
335
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
336
|
+
className: DiscoverSection_module_css_default.titleRow,
|
|
337
|
+
children: [
|
|
338
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
339
|
+
className: DiscoverSection_module_css_default.strong,
|
|
340
|
+
children: version.version
|
|
341
|
+
}),
|
|
342
|
+
version.version === entry.defaultVersion ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
343
|
+
tone: "info",
|
|
344
|
+
children: t("versionDefault")
|
|
345
|
+
}) : null,
|
|
346
|
+
version.version.split("+")[0]?.includes("-") === true ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
347
|
+
tone: "neutral",
|
|
348
|
+
children: t("versionPrerelease")
|
|
349
|
+
}) : null,
|
|
350
|
+
current ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
351
|
+
tone: "success",
|
|
352
|
+
children: t("versionInstalled")
|
|
353
|
+
}) : null,
|
|
354
|
+
compatibility.compatible ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
355
|
+
tone: "warning",
|
|
356
|
+
children: t(compatibility.exempted ? "versionExempted" : "versionIncompatible")
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
360
|
+
className: DiscoverSection_module_css_default.meta,
|
|
361
|
+
children: compatibility.compatible ? formatDate(version.publishTimestamp, language, "medium") : compatibility.exempted ? t("exempted") : t("incompatible", {
|
|
362
|
+
runtime: compatibility.runtimeVersion,
|
|
363
|
+
range: Object.values(compatibility.requirements).join(" ")
|
|
364
|
+
})
|
|
365
|
+
})]
|
|
366
|
+
}), !offered ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
367
|
+
variant: "ghost",
|
|
368
|
+
size: "sm",
|
|
369
|
+
"aria-label": t("installVersionTitle", {
|
|
370
|
+
name: title,
|
|
371
|
+
version: version.version
|
|
372
|
+
}),
|
|
373
|
+
onClick: () => {
|
|
374
|
+
onInstall(version);
|
|
375
|
+
},
|
|
376
|
+
children: t("install")
|
|
377
|
+
})]
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
function EntryDetail({ entry, listing, t, face, language, onBack, onInstall, onOpenInstalled }) {
|
|
381
|
+
const title = entryTitle(entry, face);
|
|
382
|
+
const version = presentedVersion(entry);
|
|
383
|
+
const date = formatDate(version.publishTimestamp, language, "long");
|
|
384
|
+
const categoryId = entry.metadata.category;
|
|
385
|
+
const category = categoryId === void 0 ? void 0 : listing.metadata.categories[categoryId];
|
|
386
|
+
const labels = displayDeclarations(listing.metadata.labels, face.resolveText, language).filter((label) => entry.metadata.labels.includes(label.id));
|
|
387
|
+
const { compatibility } = version;
|
|
388
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
389
|
+
className: DiscoverSection_module_css_default.detail,
|
|
390
|
+
"data-market-detail": entry.name,
|
|
391
|
+
children: [
|
|
392
|
+
(0, react_jsx_runtime.jsxs)("button", {
|
|
393
|
+
type: "button",
|
|
394
|
+
className: DiscoverSection_module_css_default.crumb,
|
|
395
|
+
onClick: onBack,
|
|
396
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {
|
|
397
|
+
className: DiscoverSection_module_css_default.crumbIcon,
|
|
398
|
+
"aria-hidden": "true"
|
|
399
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t("backToList") })]
|
|
400
|
+
}),
|
|
401
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
402
|
+
className: DiscoverSection_module_css_default.detailHead,
|
|
403
|
+
children: [
|
|
404
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
405
|
+
className: DiscoverSection_module_css_default.icon,
|
|
406
|
+
"aria-hidden": "true",
|
|
407
|
+
children: (0, react_jsx_runtime.jsx)(MarketIcon, {
|
|
408
|
+
src: entry.icon,
|
|
409
|
+
size: ICON
|
|
410
|
+
})
|
|
411
|
+
}),
|
|
412
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
413
|
+
className: DiscoverSection_module_css_default.main,
|
|
414
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
415
|
+
className: DiscoverSection_module_css_default.titleRow,
|
|
416
|
+
children: [(0, react_jsx_runtime.jsx)("h3", {
|
|
417
|
+
className: DiscoverSection_module_css_default.detailTitle,
|
|
418
|
+
children: title
|
|
419
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
420
|
+
tone: "neutral",
|
|
421
|
+
children: version.version
|
|
422
|
+
})]
|
|
423
|
+
}), title === entry.name ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
424
|
+
className: DiscoverSection_module_css_default.meta,
|
|
425
|
+
children: entry.name
|
|
426
|
+
})]
|
|
427
|
+
}),
|
|
428
|
+
(0, react_jsx_runtime.jsx)(EntryAction, {
|
|
429
|
+
entry,
|
|
430
|
+
title,
|
|
431
|
+
t,
|
|
432
|
+
onInstall,
|
|
433
|
+
onOpenInstalled
|
|
434
|
+
})
|
|
435
|
+
]
|
|
436
|
+
}),
|
|
437
|
+
entry.description === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
438
|
+
className: DiscoverSection_module_css_default.detailDescription,
|
|
439
|
+
children: face.resolveText(entry.description)
|
|
440
|
+
}),
|
|
441
|
+
compatibility.compatible ? null : (0, react_jsx_runtime.jsxs)("p", {
|
|
442
|
+
className: DiscoverSection_module_css_default.notice,
|
|
443
|
+
role: "note",
|
|
444
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {
|
|
445
|
+
size: 14,
|
|
446
|
+
"aria-hidden": "true"
|
|
447
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: compatibility.exempted ? t("exempted") : t("incompatible", {
|
|
448
|
+
runtime: compatibility.runtimeVersion,
|
|
449
|
+
range: Object.values(compatibility.requirements).join(" ")
|
|
450
|
+
}) })]
|
|
451
|
+
}),
|
|
452
|
+
(0, react_jsx_runtime.jsxs)("section", {
|
|
453
|
+
className: DiscoverSection_module_css_default.detailSection,
|
|
454
|
+
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
455
|
+
className: DiscoverSection_module_css_default.sectionTitle,
|
|
456
|
+
children: t("factSource")
|
|
457
|
+
}), (0, react_jsx_runtime.jsxs)("dl", {
|
|
458
|
+
className: DiscoverSection_module_css_default.facts,
|
|
459
|
+
children: [
|
|
460
|
+
entry.author === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factAuthor") }), (0, react_jsx_runtime.jsx)("dd", { children: entry.author })] }),
|
|
461
|
+
entry.homepage === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factHomepage") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("a", {
|
|
462
|
+
className: DiscoverSection_module_css_default.link,
|
|
463
|
+
href: entry.homepage,
|
|
464
|
+
target: "_blank",
|
|
465
|
+
rel: "noopener noreferrer",
|
|
466
|
+
children: entry.homepage
|
|
467
|
+
}) })] }),
|
|
468
|
+
entry.repository === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factSourceCode") }), (0, react_jsx_runtime.jsxs)("dd", { children: [(0, react_jsx_runtime.jsx)("a", {
|
|
469
|
+
className: DiscoverSection_module_css_default.link,
|
|
470
|
+
href: entry.repository.url,
|
|
471
|
+
target: "_blank",
|
|
472
|
+
rel: "noopener noreferrer",
|
|
473
|
+
children: entry.repository.url
|
|
474
|
+
}), entry.repository.directory === void 0 ? null : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" ", (0, react_jsx_runtime.jsx)("code", { children: entry.repository.directory })] })] })] }),
|
|
475
|
+
sourceFacts(entry.name, version).map((fact) => (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t(FACT_KEYS[fact.kind]) }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: fact.value }) })] }, fact.kind)),
|
|
476
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factPublished") }), (0, react_jsx_runtime.jsx)("dd", { children: date })] }),
|
|
477
|
+
category === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factCategory") }), (0, react_jsx_runtime.jsx)("dd", { children: face.resolveText(category.title) })] }),
|
|
478
|
+
labels.length === 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factLabels") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
479
|
+
className: DiscoverSection_module_css_default.tags,
|
|
480
|
+
children: labels.map((label) => (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { children: label.title }, label.id))
|
|
481
|
+
})] }),
|
|
482
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factMarket") }), (0, react_jsx_runtime.jsx)("dd", { children: face.resolveText(listing.title) })] })
|
|
483
|
+
]
|
|
484
|
+
})]
|
|
485
|
+
}),
|
|
486
|
+
(0, react_jsx_runtime.jsxs)("section", {
|
|
487
|
+
className: DiscoverSection_module_css_default.detailSection,
|
|
488
|
+
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
489
|
+
className: DiscoverSection_module_css_default.sectionTitle,
|
|
490
|
+
children: t("versionsTitle")
|
|
491
|
+
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
492
|
+
className: DiscoverSection_module_css_default.versions,
|
|
493
|
+
"aria-label": t("versionsLabel", { name: title }),
|
|
494
|
+
children: entry.versions.map((item) => (0, react_jsx_runtime.jsx)(VersionRow, {
|
|
495
|
+
entry,
|
|
496
|
+
version: item,
|
|
497
|
+
title,
|
|
498
|
+
t,
|
|
499
|
+
language,
|
|
500
|
+
onInstall
|
|
501
|
+
}, item.version))
|
|
502
|
+
})]
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
function SourcesDialog({ state, t, face }) {
|
|
508
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
509
|
+
open: state.editing,
|
|
510
|
+
onClose: face.toggleSources,
|
|
511
|
+
title: t("sourcesTitle"),
|
|
512
|
+
closeLabel: t("close"),
|
|
513
|
+
description: t("sourcesDescription"),
|
|
514
|
+
className: DiscoverSection_module_css_default.dialog,
|
|
515
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
516
|
+
className: DiscoverSection_module_css_default.dialogBody,
|
|
517
|
+
children: [
|
|
518
|
+
state.indexes.length === 0 ? null : (0, react_jsx_runtime.jsx)("ul", {
|
|
519
|
+
className: DiscoverSection_module_css_default.sourceList,
|
|
520
|
+
"aria-label": t("sourcesLabel"),
|
|
521
|
+
children: state.indexes.map((index) => (0, react_jsx_runtime.jsxs)("li", {
|
|
522
|
+
className: DiscoverSection_module_css_default.sourceRow,
|
|
523
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
524
|
+
className: DiscoverSection_module_css_default.main,
|
|
525
|
+
children: [
|
|
526
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
527
|
+
className: DiscoverSection_module_css_default.strong,
|
|
528
|
+
children: indexLabel(index, face.resolveText)
|
|
529
|
+
}),
|
|
530
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
531
|
+
className: DiscoverSection_module_css_default.meta,
|
|
532
|
+
children: index.url
|
|
533
|
+
}),
|
|
534
|
+
index.error === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
535
|
+
className: DiscoverSection_module_css_default.sourceError,
|
|
536
|
+
children: index.error
|
|
537
|
+
})
|
|
538
|
+
]
|
|
539
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
540
|
+
label: t("removeSource"),
|
|
541
|
+
side: "bottom",
|
|
542
|
+
portal: true,
|
|
543
|
+
delayMs: 300,
|
|
544
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
545
|
+
variant: "ghost",
|
|
546
|
+
size: "sm",
|
|
547
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 13 }),
|
|
548
|
+
"aria-label": t("removeSourceNamed", { url: index.url }),
|
|
549
|
+
disabled: state.saving,
|
|
550
|
+
onClick: () => {
|
|
551
|
+
face.removeSource(index.url);
|
|
552
|
+
}
|
|
553
|
+
})
|
|
554
|
+
})]
|
|
555
|
+
}, index.url))
|
|
556
|
+
}),
|
|
557
|
+
(0, react_jsx_runtime.jsxs)("form", {
|
|
558
|
+
className: DiscoverSection_module_css_default.sourceForm,
|
|
559
|
+
onSubmit: (event) => {
|
|
560
|
+
event.preventDefault();
|
|
561
|
+
face.addSource();
|
|
562
|
+
},
|
|
563
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
564
|
+
className: DiscoverSection_module_css_default.grow,
|
|
565
|
+
value: state.draft,
|
|
566
|
+
placeholder: t("sourcePlaceholder"),
|
|
567
|
+
"aria-label": t("sourceUrl"),
|
|
568
|
+
"aria-invalid": state.sourceFailure !== null,
|
|
569
|
+
"data-modal-autofocus": true,
|
|
570
|
+
onChange: (event) => {
|
|
571
|
+
face.editDraft(event.target.value);
|
|
572
|
+
}
|
|
573
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
574
|
+
type: "submit",
|
|
575
|
+
variant: "primary",
|
|
576
|
+
size: "sm",
|
|
577
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 13 }),
|
|
578
|
+
disabled: state.saving || state.draft.trim() === "",
|
|
579
|
+
children: t("addSource")
|
|
580
|
+
})]
|
|
581
|
+
}),
|
|
582
|
+
state.sourceFailure === null ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
583
|
+
className: DiscoverSection_module_css_default.error,
|
|
584
|
+
role: "alert",
|
|
585
|
+
children: sourceFailureText(state.sourceFailure, t)
|
|
586
|
+
}),
|
|
587
|
+
(0, react_jsx_runtime.jsxs)("p", {
|
|
588
|
+
className: DiscoverSection_module_css_default.notice,
|
|
589
|
+
role: "note",
|
|
590
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {
|
|
591
|
+
size: 14,
|
|
592
|
+
"aria-hidden": "true"
|
|
593
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t("sourcesTrust") })]
|
|
594
|
+
})
|
|
595
|
+
]
|
|
596
|
+
})
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
function ConfirmDialog({ choice, t, face, onCancel, onConfirm }) {
|
|
600
|
+
if (choice === null) return null;
|
|
601
|
+
const { entry, version } = choice;
|
|
602
|
+
const title = entryTitle(entry, face);
|
|
603
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
604
|
+
open: true,
|
|
605
|
+
onClose: onCancel,
|
|
606
|
+
title: t("confirmTitle", { name: title }),
|
|
607
|
+
closeLabel: t("close"),
|
|
608
|
+
className: DiscoverSection_module_css_default.dialog,
|
|
609
|
+
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
610
|
+
variant: "outline",
|
|
611
|
+
onClick: onCancel,
|
|
612
|
+
children: t("cancel")
|
|
613
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
614
|
+
variant: "primary",
|
|
615
|
+
autoFocus: true,
|
|
616
|
+
onClick: () => {
|
|
617
|
+
onConfirm(choice);
|
|
618
|
+
},
|
|
619
|
+
children: t("install")
|
|
620
|
+
})] }),
|
|
621
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
622
|
+
className: DiscoverSection_module_css_default.dialogBody,
|
|
623
|
+
children: [
|
|
624
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
625
|
+
className: DiscoverSection_module_css_default.confirmHead,
|
|
626
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
627
|
+
className: DiscoverSection_module_css_default.icon,
|
|
628
|
+
"aria-hidden": "true",
|
|
629
|
+
children: (0, react_jsx_runtime.jsx)(MarketIcon, {
|
|
630
|
+
src: entry.icon,
|
|
631
|
+
size: ICON
|
|
632
|
+
})
|
|
633
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
634
|
+
className: DiscoverSection_module_css_default.main,
|
|
635
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
636
|
+
className: DiscoverSection_module_css_default.strong,
|
|
637
|
+
children: title
|
|
638
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
639
|
+
className: DiscoverSection_module_css_default.meta,
|
|
640
|
+
children: version.version
|
|
641
|
+
})]
|
|
642
|
+
})]
|
|
643
|
+
}),
|
|
644
|
+
(0, react_jsx_runtime.jsxs)("dl", {
|
|
645
|
+
className: DiscoverSection_module_css_default.facts,
|
|
646
|
+
children: [entry.author === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("factAuthor") }), (0, react_jsx_runtime.jsx)("dd", { children: entry.author })] }), sourceFacts(entry.name, version).map((fact) => (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t(FACT_KEYS[fact.kind]) }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: fact.value }) })] }, fact.kind))]
|
|
647
|
+
}),
|
|
648
|
+
version.compatibility.compatible ? null : (0, react_jsx_runtime.jsxs)("p", {
|
|
649
|
+
className: DiscoverSection_module_css_default.notice,
|
|
650
|
+
role: "note",
|
|
651
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {
|
|
652
|
+
size: 14,
|
|
653
|
+
"aria-hidden": "true"
|
|
654
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t("exempted") })]
|
|
655
|
+
}),
|
|
656
|
+
(0, react_jsx_runtime.jsxs)("p", {
|
|
657
|
+
className: DiscoverSection_module_css_default.notice,
|
|
658
|
+
role: "note",
|
|
659
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {
|
|
660
|
+
size: 14,
|
|
661
|
+
"aria-hidden": "true"
|
|
662
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t("installTrust") })]
|
|
663
|
+
})
|
|
664
|
+
]
|
|
665
|
+
})
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
function ListSkeleton({ label }) {
|
|
669
|
+
return (0, react_jsx_runtime.jsx)("ul", {
|
|
670
|
+
className: DiscoverSection_module_css_default.cards,
|
|
671
|
+
role: "status",
|
|
672
|
+
"aria-label": label,
|
|
673
|
+
"aria-busy": "true",
|
|
674
|
+
children: [
|
|
675
|
+
0,
|
|
676
|
+
1,
|
|
677
|
+
2,
|
|
678
|
+
3
|
|
679
|
+
].map((index) => (0, react_jsx_runtime.jsxs)("li", {
|
|
680
|
+
className: DiscoverSection_module_css_default.card,
|
|
681
|
+
"aria-hidden": "true",
|
|
682
|
+
children: [(0, react_jsx_runtime.jsx)("span", { className: `${DiscoverSection_module_css_default.icon} ${DiscoverSection_module_css_default.skeletonFill}` }), (0, react_jsx_runtime.jsxs)("div", {
|
|
683
|
+
className: DiscoverSection_module_css_default.main,
|
|
684
|
+
children: [(0, react_jsx_runtime.jsx)("span", { className: `${DiscoverSection_module_css_default.skeletonBar} ${DiscoverSection_module_css_default.skeletonTitle} ${DiscoverSection_module_css_default.skeletonFill}` }), (0, react_jsx_runtime.jsx)("span", { className: `${DiscoverSection_module_css_default.skeletonBar} ${DiscoverSection_module_css_default.skeletonDescription} ${DiscoverSection_module_css_default.skeletonFill}` })]
|
|
685
|
+
})]
|
|
686
|
+
}, index))
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
/** The sort menu id of a sort. */
|
|
690
|
+
function sortMenuId(sort) {
|
|
691
|
+
return sort.kind === "key" ? `key:${sort.id}` : sort.kind;
|
|
692
|
+
}
|
|
693
|
+
/** Whether a query selects every plugin of the index. */
|
|
694
|
+
function unfiltered(query) {
|
|
695
|
+
return query.text.trim() === "" && query.category === null && query.labels.length === 0;
|
|
696
|
+
}
|
|
697
|
+
function Browser({ state, listing, t, face, language, onInstall, openPackage }) {
|
|
698
|
+
const { query, value } = listing;
|
|
699
|
+
const [text, setText] = (0, react.useState)(query.text);
|
|
700
|
+
const [menu, setMenu] = (0, react.useState)(null);
|
|
701
|
+
const [opened, setOpened] = (0, react.useState)(null);
|
|
702
|
+
(0, react.useEffect)(() => {
|
|
703
|
+
if (text === query.text) return void 0;
|
|
704
|
+
const timer = setTimeout(() => {
|
|
705
|
+
face.search(withText(query, text));
|
|
706
|
+
}, TEXT_DELAY_MS);
|
|
707
|
+
return () => {
|
|
708
|
+
clearTimeout(timer);
|
|
709
|
+
};
|
|
710
|
+
}, [
|
|
711
|
+
text,
|
|
712
|
+
query,
|
|
713
|
+
face
|
|
714
|
+
]);
|
|
715
|
+
const declarations = (0, react.useMemo)(() => ({
|
|
716
|
+
categories: value === null ? [] : displayDeclarations(value.metadata.categories, face.resolveText, language),
|
|
717
|
+
labels: value === null ? [] : displayDeclarations(value.metadata.labels, face.resolveText, language),
|
|
718
|
+
sortKeys: value === null ? [] : displayDeclarations(value.metadata.sortKeys, face.resolveText, language)
|
|
719
|
+
}), [
|
|
720
|
+
value,
|
|
721
|
+
face,
|
|
722
|
+
language
|
|
723
|
+
]);
|
|
724
|
+
const openEntry = opened === null ? void 0 : value?.entries.find((entry) => entry.name === opened.name) ?? opened;
|
|
725
|
+
if (openEntry !== void 0 && value !== null) return (0, react_jsx_runtime.jsx)(EntryDetail, {
|
|
726
|
+
entry: openEntry,
|
|
727
|
+
listing: value,
|
|
728
|
+
t,
|
|
729
|
+
face,
|
|
730
|
+
language,
|
|
731
|
+
onBack: () => {
|
|
732
|
+
setOpened(null);
|
|
733
|
+
},
|
|
734
|
+
onInstall: (version) => {
|
|
735
|
+
onInstall({
|
|
736
|
+
entry: openEntry,
|
|
737
|
+
version
|
|
738
|
+
});
|
|
739
|
+
},
|
|
740
|
+
onOpenInstalled: () => {
|
|
741
|
+
openPackage(openEntry.name);
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
const market = indexLabel(state.indexes.find((index) => index.url === listing.url) ?? { url: listing.url }, face.resolveText);
|
|
745
|
+
const { sort } = query;
|
|
746
|
+
const sortOptions = [
|
|
747
|
+
...query.text.trim() === "" ? [] : [{
|
|
748
|
+
id: "relevance",
|
|
749
|
+
label: t("sortRelevance")
|
|
750
|
+
}],
|
|
751
|
+
{
|
|
752
|
+
id: "index",
|
|
753
|
+
label: t("sortDefault")
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
id: "published",
|
|
757
|
+
label: t("sortPublished")
|
|
758
|
+
},
|
|
759
|
+
...declarations.sortKeys.map((item) => ({
|
|
760
|
+
id: `key:${item.id}`,
|
|
761
|
+
label: item.title
|
|
762
|
+
}))
|
|
763
|
+
];
|
|
764
|
+
const sortName = sortOptions.find((option) => option.id === sortMenuId(sort)).label;
|
|
765
|
+
const directed = sort.kind === "published" || sort.kind === "key";
|
|
766
|
+
const chooseSort = (id) => {
|
|
767
|
+
setMenu(null);
|
|
768
|
+
if (id === "direction" && directed) {
|
|
769
|
+
face.search({
|
|
770
|
+
...query,
|
|
771
|
+
sort: {
|
|
772
|
+
...sort,
|
|
773
|
+
direction: sort.direction === "asc" ? "desc" : "asc"
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
if (id === "index" || id === "relevance") {
|
|
779
|
+
face.search({
|
|
780
|
+
...query,
|
|
781
|
+
sort: { kind: id }
|
|
782
|
+
});
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
if (id === "published") {
|
|
786
|
+
face.search({
|
|
787
|
+
...query,
|
|
788
|
+
sort: {
|
|
789
|
+
kind: "published",
|
|
790
|
+
direction: "desc"
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
const key = declarations.sortKeys.find((item) => `key:${item.id}` === id);
|
|
796
|
+
/* v8 ignore next -- every other menu id names a declared sort key */
|
|
797
|
+
if (key !== void 0) face.search({
|
|
798
|
+
...query,
|
|
799
|
+
sort: {
|
|
800
|
+
kind: "key",
|
|
801
|
+
id: key.id,
|
|
802
|
+
direction: key.declaration.order
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
};
|
|
806
|
+
const toggleMenu = (name) => {
|
|
807
|
+
setMenu(menu === name ? null : name);
|
|
808
|
+
};
|
|
809
|
+
const busy = listing.status === "loading" && value !== null;
|
|
810
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
811
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
812
|
+
className: DiscoverSection_module_css_default.toolbar,
|
|
813
|
+
children: [
|
|
814
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
815
|
+
open: menu === "market",
|
|
816
|
+
onClose: () => {
|
|
817
|
+
setMenu(null);
|
|
818
|
+
},
|
|
819
|
+
portal: true,
|
|
820
|
+
autoFocus: true,
|
|
821
|
+
selectedId: listing.url,
|
|
822
|
+
items: state.indexes.map((index) => ({
|
|
823
|
+
id: index.url,
|
|
824
|
+
label: indexLabel(index, face.resolveText)
|
|
825
|
+
})),
|
|
826
|
+
footer: [{
|
|
827
|
+
id: "manage",
|
|
828
|
+
label: t("manageSources"),
|
|
829
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSlidersTwoOutlineRegular, { size: 14 })
|
|
830
|
+
}],
|
|
831
|
+
onSelect: (id) => {
|
|
832
|
+
setMenu(null);
|
|
833
|
+
if (id === "manage") face.toggleSources();
|
|
834
|
+
else face.select(id);
|
|
835
|
+
},
|
|
836
|
+
anchor: (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
837
|
+
variant: "ghost",
|
|
838
|
+
size: "sm",
|
|
839
|
+
className: DiscoverSection_module_css_default.marketButton,
|
|
840
|
+
"aria-haspopup": "menu",
|
|
841
|
+
"aria-expanded": menu === "market",
|
|
842
|
+
"aria-label": t("marketMenu", { market }),
|
|
843
|
+
onClick: () => {
|
|
844
|
+
toggleMenu("market");
|
|
845
|
+
},
|
|
846
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
847
|
+
className: DiscoverSection_module_css_default.marketName,
|
|
848
|
+
children: market
|
|
849
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {
|
|
850
|
+
size: 12,
|
|
851
|
+
"aria-hidden": "true"
|
|
852
|
+
})]
|
|
853
|
+
})
|
|
854
|
+
}),
|
|
855
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
856
|
+
className: DiscoverSection_module_css_default.search,
|
|
857
|
+
type: "search",
|
|
858
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 14 }),
|
|
859
|
+
value: text,
|
|
860
|
+
placeholder: t("search"),
|
|
861
|
+
"aria-label": t("search"),
|
|
862
|
+
onChange: (event) => {
|
|
863
|
+
setText(event.target.value);
|
|
864
|
+
}
|
|
865
|
+
}),
|
|
866
|
+
declarations.labels.length === 0 ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
867
|
+
open: menu === "filter",
|
|
868
|
+
onClose: () => {
|
|
869
|
+
setMenu(null);
|
|
870
|
+
},
|
|
871
|
+
portal: true,
|
|
872
|
+
autoFocus: true,
|
|
873
|
+
align: "end",
|
|
874
|
+
selectedIds: query.labels,
|
|
875
|
+
items: declarations.labels.map((item) => ({
|
|
876
|
+
id: item.id,
|
|
877
|
+
label: item.title
|
|
878
|
+
})),
|
|
879
|
+
onSelect: (id) => {
|
|
880
|
+
const labels = query.labels.includes(id) ? query.labels.filter((label) => label !== id) : [...query.labels, id];
|
|
881
|
+
face.search({
|
|
882
|
+
...query,
|
|
883
|
+
labels
|
|
884
|
+
});
|
|
885
|
+
},
|
|
886
|
+
anchor: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
887
|
+
variant: "ghost",
|
|
888
|
+
size: "sm",
|
|
889
|
+
"aria-haspopup": "menu",
|
|
890
|
+
"aria-expanded": menu === "filter",
|
|
891
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSlidersTwoOutlineRegular, { size: 13 }),
|
|
892
|
+
onClick: () => {
|
|
893
|
+
toggleMenu("filter");
|
|
894
|
+
},
|
|
895
|
+
children: query.labels.length === 0 ? t("filter") : t("filterCount", { count: String(query.labels.length) })
|
|
896
|
+
})
|
|
897
|
+
}),
|
|
898
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
899
|
+
open: menu === "sort",
|
|
900
|
+
onClose: () => {
|
|
901
|
+
setMenu(null);
|
|
902
|
+
},
|
|
903
|
+
portal: true,
|
|
904
|
+
autoFocus: true,
|
|
905
|
+
align: "end",
|
|
906
|
+
selectedId: sortMenuId(sort),
|
|
907
|
+
items: sortOptions,
|
|
908
|
+
...directed ? { footer: [{
|
|
909
|
+
id: "direction",
|
|
910
|
+
label: t(sort.direction === "asc" ? "switchToDescending" : "switchToAscending")
|
|
911
|
+
}] } : {},
|
|
912
|
+
onSelect: chooseSort,
|
|
913
|
+
anchor: (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
914
|
+
variant: "ghost",
|
|
915
|
+
size: "sm",
|
|
916
|
+
"aria-haspopup": "menu",
|
|
917
|
+
"aria-expanded": menu === "sort",
|
|
918
|
+
onClick: () => {
|
|
919
|
+
toggleMenu("sort");
|
|
920
|
+
},
|
|
921
|
+
children: [t("sortBy", { sort: sortName }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {
|
|
922
|
+
size: 12,
|
|
923
|
+
"aria-hidden": "true"
|
|
924
|
+
})]
|
|
925
|
+
})
|
|
926
|
+
}),
|
|
927
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
928
|
+
label: t("refresh"),
|
|
929
|
+
side: "bottom",
|
|
930
|
+
portal: true,
|
|
931
|
+
delayMs: 500,
|
|
932
|
+
focusDelayMs: 500,
|
|
933
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
934
|
+
variant: "ghost",
|
|
935
|
+
size: "sm",
|
|
936
|
+
"aria-label": t("refresh"),
|
|
937
|
+
disabled: listing.status === "loading",
|
|
938
|
+
onClick: face.refresh,
|
|
939
|
+
icon: busy ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 14 })
|
|
940
|
+
})
|
|
941
|
+
})
|
|
942
|
+
]
|
|
943
|
+
}),
|
|
944
|
+
declarations.categories.length === 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
945
|
+
className: DiscoverSection_module_css_default.categories,
|
|
946
|
+
role: "group",
|
|
947
|
+
"aria-label": t("categoriesLabel"),
|
|
948
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
949
|
+
active: query.category === null,
|
|
950
|
+
"aria-pressed": query.category === null,
|
|
951
|
+
onClick: () => {
|
|
952
|
+
face.search({
|
|
953
|
+
...query,
|
|
954
|
+
category: null
|
|
955
|
+
});
|
|
956
|
+
},
|
|
957
|
+
children: t("allCategories")
|
|
958
|
+
}), declarations.categories.map((item) => (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
959
|
+
active: query.category === item.id,
|
|
960
|
+
"aria-pressed": query.category === item.id,
|
|
961
|
+
onClick: () => {
|
|
962
|
+
face.search({
|
|
963
|
+
...query,
|
|
964
|
+
category: item.id
|
|
965
|
+
});
|
|
966
|
+
},
|
|
967
|
+
children: item.title
|
|
968
|
+
}, item.id))]
|
|
969
|
+
}),
|
|
970
|
+
listing.failure === null ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
971
|
+
className: DiscoverSection_module_css_default.failure,
|
|
972
|
+
children: [(0, react_jsx_runtime.jsxs)("p", {
|
|
973
|
+
className: DiscoverSection_module_css_default.error,
|
|
974
|
+
role: "alert",
|
|
975
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" }), t(FAILURE_KEYS[listing.failure])]
|
|
976
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
977
|
+
variant: "outline",
|
|
978
|
+
size: "sm",
|
|
979
|
+
onClick: face.retry,
|
|
980
|
+
children: t("retry")
|
|
981
|
+
})]
|
|
982
|
+
}),
|
|
983
|
+
value === null ? listing.status === "loading" ? (0, react_jsx_runtime.jsx)(ListSkeleton, { label: t("loading") }) : null : value.total === 0 ? (0, react_jsx_runtime.jsx)("p", {
|
|
984
|
+
className: DiscoverSection_module_css_default.muted,
|
|
985
|
+
children: t(unfiltered(listing.answered) ? "emptyIndex" : "noMatches")
|
|
986
|
+
}) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("ul", {
|
|
987
|
+
className: DiscoverSection_module_css_default.cards,
|
|
988
|
+
"aria-busy": busy,
|
|
989
|
+
children: value.entries.map((entry) => (0, react_jsx_runtime.jsx)(EntryCard, {
|
|
990
|
+
entry,
|
|
991
|
+
t,
|
|
992
|
+
face,
|
|
993
|
+
language,
|
|
994
|
+
labels: declarations.labels,
|
|
995
|
+
onOpen: () => {
|
|
996
|
+
setOpened(entry);
|
|
997
|
+
},
|
|
998
|
+
onInstall: (version) => {
|
|
999
|
+
onInstall({
|
|
1000
|
+
entry,
|
|
1001
|
+
version
|
|
1002
|
+
});
|
|
1003
|
+
},
|
|
1004
|
+
onOpenInstalled: () => {
|
|
1005
|
+
openPackage(entry.name);
|
|
1006
|
+
}
|
|
1007
|
+
}, entry.name))
|
|
1008
|
+
}), value.nextOffset === null ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1009
|
+
variant: "outline",
|
|
1010
|
+
size: "sm",
|
|
1011
|
+
className: DiscoverSection_module_css_default.more,
|
|
1012
|
+
disabled: listing.status !== "ready",
|
|
1013
|
+
onClick: face.more,
|
|
1014
|
+
children: t("showMore")
|
|
1015
|
+
})] })
|
|
1016
|
+
] });
|
|
1017
|
+
}
|
|
1018
|
+
/** Render the Discover tab of the Plugins page. */
|
|
1019
|
+
function DiscoverSection(props) {
|
|
1020
|
+
const { t, install, openPackage } = props;
|
|
1021
|
+
const face = props;
|
|
1022
|
+
const state = props.useDiscover((snapshot) => snapshot);
|
|
1023
|
+
const language = props.useLocale((snapshot) => snapshot.active);
|
|
1024
|
+
const [confirming, setConfirming] = (0, react.useState)(null);
|
|
1025
|
+
(0, react.useEffect)(() => {
|
|
1026
|
+
props.ensure();
|
|
1027
|
+
}, [props.ensure]);
|
|
1028
|
+
let body;
|
|
1029
|
+
if (state.status === "idle" || state.status === "loading") body = (0, react_jsx_runtime.jsx)(ListSkeleton, { label: t("loading") });
|
|
1030
|
+
else if (state.status === "error") body = (0, react_jsx_runtime.jsxs)("div", {
|
|
1031
|
+
className: DiscoverSection_module_css_default.failure,
|
|
1032
|
+
children: [(0, react_jsx_runtime.jsxs)("p", {
|
|
1033
|
+
className: DiscoverSection_module_css_default.error,
|
|
1034
|
+
role: "alert",
|
|
1035
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" }), t("sourcesFailed")]
|
|
1036
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1037
|
+
variant: "outline",
|
|
1038
|
+
size: "sm",
|
|
1039
|
+
onClick: props.reload,
|
|
1040
|
+
children: t("retry")
|
|
1041
|
+
})]
|
|
1042
|
+
});
|
|
1043
|
+
else if (state.listing === null) body = (0, react_jsx_runtime.jsxs)("div", {
|
|
1044
|
+
className: DiscoverSection_module_css_default.empty,
|
|
1045
|
+
children: [
|
|
1046
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PluginArtworkDefault, { size: 48 }),
|
|
1047
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
1048
|
+
className: DiscoverSection_module_css_default.emptyTitle,
|
|
1049
|
+
children: t("emptyTitle")
|
|
1050
|
+
}),
|
|
1051
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
1052
|
+
className: DiscoverSection_module_css_default.muted,
|
|
1053
|
+
children: t("emptyDescription")
|
|
1054
|
+
}),
|
|
1055
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1056
|
+
variant: "primary",
|
|
1057
|
+
size: "sm",
|
|
1058
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 13 }),
|
|
1059
|
+
onClick: props.toggleSources,
|
|
1060
|
+
children: t("addFirstSource")
|
|
1061
|
+
})
|
|
1062
|
+
]
|
|
1063
|
+
});
|
|
1064
|
+
else body = (0, react_jsx_runtime.jsx)(Browser, {
|
|
1065
|
+
state,
|
|
1066
|
+
listing: state.listing,
|
|
1067
|
+
t,
|
|
1068
|
+
face,
|
|
1069
|
+
language,
|
|
1070
|
+
onInstall: (choice) => {
|
|
1071
|
+
setConfirming(choice);
|
|
1072
|
+
},
|
|
1073
|
+
openPackage
|
|
1074
|
+
}, state.listing.url);
|
|
1075
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
1076
|
+
className: DiscoverSection_module_css_default.section,
|
|
1077
|
+
"data-plugin-tab": "discover",
|
|
1078
|
+
children: [
|
|
1079
|
+
body,
|
|
1080
|
+
(0, react_jsx_runtime.jsx)(SourcesDialog, {
|
|
1081
|
+
state,
|
|
1082
|
+
t,
|
|
1083
|
+
face
|
|
1084
|
+
}),
|
|
1085
|
+
(0, react_jsx_runtime.jsx)(ConfirmDialog, {
|
|
1086
|
+
choice: confirming,
|
|
1087
|
+
t,
|
|
1088
|
+
face,
|
|
1089
|
+
onCancel: () => {
|
|
1090
|
+
setConfirming(null);
|
|
1091
|
+
},
|
|
1092
|
+
onConfirm: ({ entry, version }) => {
|
|
1093
|
+
setConfirming(null);
|
|
1094
|
+
install({
|
|
1095
|
+
...version.install,
|
|
1096
|
+
title: entryTitle(entry, face),
|
|
1097
|
+
version: version.version
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
})
|
|
1101
|
+
]
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
//#endregion
|
|
1105
|
+
//#region lib/types/client/locales.js
|
|
1106
|
+
/** Discover tab copy. */
|
|
1107
|
+
/** Simplified Chinese dictionary and key source of truth. */
|
|
1108
|
+
const zh = {
|
|
1109
|
+
title: "发现",
|
|
1110
|
+
refresh: "刷新",
|
|
1111
|
+
loading: "正在读取索引",
|
|
1112
|
+
retry: "重试",
|
|
1113
|
+
close: "关闭",
|
|
1114
|
+
cancel: "取消",
|
|
1115
|
+
emptyTitle: "还没有插件市场",
|
|
1116
|
+
emptyDescription: "添加一个插件市场索引,即可在这里浏览和安装其中的插件",
|
|
1117
|
+
addFirstSource: "添加索引源",
|
|
1118
|
+
sourcesFailed: "无法读取索引源",
|
|
1119
|
+
manageSources: "管理索引源…",
|
|
1120
|
+
marketMenu: "切换插件市场,当前为 {market}",
|
|
1121
|
+
sourcesTitle: "索引源",
|
|
1122
|
+
sourcesDescription: "插件市场以一个索引文件的 URL 提供,「发现」从这里列出的索引浏览插件",
|
|
1123
|
+
sourcesLabel: "已添加的索引源",
|
|
1124
|
+
sourceUrl: "索引 URL",
|
|
1125
|
+
sourcePlaceholder: "https://example.com/index.json",
|
|
1126
|
+
addSource: "添加",
|
|
1127
|
+
removeSource: "移除",
|
|
1128
|
+
removeSourceNamed: "移除 {url}",
|
|
1129
|
+
sourcesTrust: "索引由第三方提供。只添加你信任的来源:其中的插件安装后以你的权限运行",
|
|
1130
|
+
sourceInvalid: "请使用 http 或 https 地址,且不要包含用户名、密码或 # 片段",
|
|
1131
|
+
sourceDuplicate: "已添加过这个索引源",
|
|
1132
|
+
sourceUnavailable: "当前环境无法保存索引源",
|
|
1133
|
+
sourceFailed: "无法保存索引源",
|
|
1134
|
+
readFailed: "无法读取此索引",
|
|
1135
|
+
readInvalid: "此索引的格式无效",
|
|
1136
|
+
readChanged: "此索引在加载过程中发生了变化",
|
|
1137
|
+
search: "搜索插件",
|
|
1138
|
+
filter: "标签",
|
|
1139
|
+
filterCount: "标签 · {count}",
|
|
1140
|
+
sortBy: "排序:{sort}",
|
|
1141
|
+
sortRelevance: "最佳匹配",
|
|
1142
|
+
sortDefault: "默认顺序",
|
|
1143
|
+
sortPublished: "发布时间",
|
|
1144
|
+
switchToAscending: "改为升序",
|
|
1145
|
+
switchToDescending: "改为降序",
|
|
1146
|
+
categoriesLabel: "分类",
|
|
1147
|
+
allCategories: "全部",
|
|
1148
|
+
emptyIndex: "此索引没有插件",
|
|
1149
|
+
noMatches: "没有符合条件的插件",
|
|
1150
|
+
showMore: "显示更多",
|
|
1151
|
+
entryMeta: "{version} · {date}",
|
|
1152
|
+
entryMetaAuthor: "{version} · {author} · {date}",
|
|
1153
|
+
openEntry: "查看 {name}",
|
|
1154
|
+
install: "安装",
|
|
1155
|
+
installTitle: "安装 {name}",
|
|
1156
|
+
installVersionTitle: "安装 {name} {version}",
|
|
1157
|
+
openInstalled: "在已安装中查看 {name}",
|
|
1158
|
+
statusInstalled: "已安装",
|
|
1159
|
+
statusUpdate: "有新版本",
|
|
1160
|
+
statusProvided: "随 DSH 提供",
|
|
1161
|
+
incompatible: "此版本与当前的 DSH {runtime} 不兼容,它要求 DSH {range}",
|
|
1162
|
+
noCompatibleVersion: "没有与当前 DSH {runtime} 兼容的版本",
|
|
1163
|
+
exempted: "此版本与当前 DSH 不兼容,但你已为它设置了兼容性豁免",
|
|
1164
|
+
backToList: "发现",
|
|
1165
|
+
factSource: "来源",
|
|
1166
|
+
factPackage: "软件包",
|
|
1167
|
+
factRegistry: "注册表",
|
|
1168
|
+
factRepository: "仓库",
|
|
1169
|
+
factCommit: "提交",
|
|
1170
|
+
factDirectory: "目录",
|
|
1171
|
+
factPublished: "发布时间",
|
|
1172
|
+
factAuthor: "作者",
|
|
1173
|
+
factHomepage: "主页",
|
|
1174
|
+
factSourceCode: "源代码",
|
|
1175
|
+
factCategory: "分类",
|
|
1176
|
+
factLabels: "标签",
|
|
1177
|
+
factMarket: "插件市场",
|
|
1178
|
+
versionsTitle: "版本",
|
|
1179
|
+
versionsLabel: "{name} 的版本",
|
|
1180
|
+
versionDefault: "推荐",
|
|
1181
|
+
versionInstalled: "当前已安装",
|
|
1182
|
+
versionIncompatible: "不兼容",
|
|
1183
|
+
versionExempted: "已豁免",
|
|
1184
|
+
versionPrerelease: "预发布",
|
|
1185
|
+
confirmTitle: "安装「{name}」?",
|
|
1186
|
+
installTrust: "插件在本机以你的权限运行。请确认你信任它的来源"
|
|
1187
|
+
};
|
|
1188
|
+
/** English dictionary. */
|
|
1189
|
+
const en = {
|
|
1190
|
+
title: "Discover",
|
|
1191
|
+
refresh: "Refresh",
|
|
1192
|
+
loading: "Reading the index",
|
|
1193
|
+
retry: "Retry",
|
|
1194
|
+
close: "Close",
|
|
1195
|
+
cancel: "Cancel",
|
|
1196
|
+
emptyTitle: "No plugin markets yet",
|
|
1197
|
+
emptyDescription: "Add a plugin market index to browse and install its plugins here.",
|
|
1198
|
+
addFirstSource: "Add index source",
|
|
1199
|
+
sourcesFailed: "Could not read the index sources.",
|
|
1200
|
+
manageSources: "Manage index sources…",
|
|
1201
|
+
marketMenu: "Switch plugin market, currently {market}",
|
|
1202
|
+
sourcesTitle: "Index sources",
|
|
1203
|
+
sourcesDescription: "A plugin market is published as the URL of one index file. Discover browses the indexes listed here.",
|
|
1204
|
+
sourcesLabel: "Added index sources",
|
|
1205
|
+
sourceUrl: "Index URL",
|
|
1206
|
+
sourcePlaceholder: "https://example.com/index.json",
|
|
1207
|
+
addSource: "Add",
|
|
1208
|
+
removeSource: "Remove",
|
|
1209
|
+
removeSourceNamed: "Remove {url}",
|
|
1210
|
+
sourcesTrust: "Indexes come from third parties. Add only sources you trust: their plugins run with your permissions once installed.",
|
|
1211
|
+
sourceInvalid: "Use an http or https address without a user name, password, or # fragment.",
|
|
1212
|
+
sourceDuplicate: "This index source is already added.",
|
|
1213
|
+
sourceUnavailable: "Index sources cannot be saved here.",
|
|
1214
|
+
sourceFailed: "Could not save the index sources.",
|
|
1215
|
+
readFailed: "Could not read this index.",
|
|
1216
|
+
readInvalid: "This index is not in a valid format.",
|
|
1217
|
+
readChanged: "This index changed while loading.",
|
|
1218
|
+
search: "Search plugins",
|
|
1219
|
+
filter: "Labels",
|
|
1220
|
+
filterCount: "Labels · {count}",
|
|
1221
|
+
sortBy: "Sort: {sort}",
|
|
1222
|
+
sortRelevance: "Best match",
|
|
1223
|
+
sortDefault: "Default order",
|
|
1224
|
+
sortPublished: "Publish date",
|
|
1225
|
+
switchToAscending: "Sort ascending",
|
|
1226
|
+
switchToDescending: "Sort descending",
|
|
1227
|
+
categoriesLabel: "Categories",
|
|
1228
|
+
allCategories: "All",
|
|
1229
|
+
emptyIndex: "This index lists no plugins.",
|
|
1230
|
+
noMatches: "No plugins match.",
|
|
1231
|
+
showMore: "Show more",
|
|
1232
|
+
entryMeta: "{version} · {date}",
|
|
1233
|
+
entryMetaAuthor: "{version} · {author} · {date}",
|
|
1234
|
+
openEntry: "View {name}",
|
|
1235
|
+
install: "Install",
|
|
1236
|
+
installTitle: "Install {name}",
|
|
1237
|
+
installVersionTitle: "Install {name} {version}",
|
|
1238
|
+
openInstalled: "View {name} in Installed",
|
|
1239
|
+
statusInstalled: "Installed",
|
|
1240
|
+
statusUpdate: "Update available",
|
|
1241
|
+
statusProvided: "Provided by DSH",
|
|
1242
|
+
incompatible: "This version is not compatible with the running DSH {runtime}; it requires DSH {range}.",
|
|
1243
|
+
noCompatibleVersion: "No version is compatible with DSH {runtime}",
|
|
1244
|
+
exempted: "This version is not compatible with the running DSH, but you set a compatibility exemption for it.",
|
|
1245
|
+
backToList: "Discover",
|
|
1246
|
+
factSource: "Source",
|
|
1247
|
+
factPackage: "Package",
|
|
1248
|
+
factRegistry: "Registry",
|
|
1249
|
+
factRepository: "Repository",
|
|
1250
|
+
factCommit: "Commit",
|
|
1251
|
+
factDirectory: "Directory",
|
|
1252
|
+
factPublished: "Published",
|
|
1253
|
+
factAuthor: "Author",
|
|
1254
|
+
factHomepage: "Homepage",
|
|
1255
|
+
factSourceCode: "Source code",
|
|
1256
|
+
factCategory: "Category",
|
|
1257
|
+
factLabels: "Labels",
|
|
1258
|
+
factMarket: "Plugin market",
|
|
1259
|
+
versionsTitle: "Versions",
|
|
1260
|
+
versionsLabel: "Versions of {name}",
|
|
1261
|
+
versionDefault: "Recommended",
|
|
1262
|
+
versionInstalled: "Installed",
|
|
1263
|
+
versionIncompatible: "Incompatible",
|
|
1264
|
+
versionExempted: "Exempted",
|
|
1265
|
+
versionPrerelease: "Prerelease",
|
|
1266
|
+
confirmTitle: "Install \"{name}\"?",
|
|
1267
|
+
installTrust: "Plugins run on this machine with your permissions. Make sure you trust where this one comes from."
|
|
1268
|
+
};
|
|
1269
|
+
/** Largest page the Host returns, the `limit` bound of `pluginMarket.search`. */
|
|
1270
|
+
const MAX_PAGE = 100;
|
|
1271
|
+
const INITIAL = {
|
|
1272
|
+
status: "idle",
|
|
1273
|
+
indexes: [],
|
|
1274
|
+
selected: null,
|
|
1275
|
+
listing: null,
|
|
1276
|
+
editing: false,
|
|
1277
|
+
draft: "",
|
|
1278
|
+
saving: false,
|
|
1279
|
+
sourceFailure: null
|
|
1280
|
+
};
|
|
1281
|
+
function sourceFailure(failure) {
|
|
1282
|
+
if (failure.code === "plugin-market/invalid-index-url") return { kind: failure.details.reason === "duplicate" ? "duplicate" : "invalid" };
|
|
1283
|
+
if (failure.code === "plugin-market/settings-unavailable") return { kind: "unavailable" };
|
|
1284
|
+
return {
|
|
1285
|
+
kind: "other",
|
|
1286
|
+
reason: failure.message
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
function listingFailure(failure) {
|
|
1290
|
+
return failure.code === "plugin-market/invalid-index" ? "invalid" : "fetch";
|
|
1291
|
+
}
|
|
1292
|
+
/** Owns Discover reads and source edits for one Client. */
|
|
1293
|
+
var DiscoverController = class {
|
|
1294
|
+
ctx;
|
|
1295
|
+
/** Shared Discover state published to the tab. */
|
|
1296
|
+
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(INITIAL);
|
|
1297
|
+
disposed = false;
|
|
1298
|
+
indexRead = 0;
|
|
1299
|
+
listingRead = 0;
|
|
1300
|
+
/** Select the last source once the list it was added to arrives. */
|
|
1301
|
+
selectAdded = false;
|
|
1302
|
+
/** Runs the listing read that failed last. */
|
|
1303
|
+
failed = () => {};
|
|
1304
|
+
/** @param ctx - the plugin context whose `remote.pluginMarket` namespace answers. */
|
|
1305
|
+
constructor(ctx) {
|
|
1306
|
+
this.ctx = ctx;
|
|
1307
|
+
}
|
|
1308
|
+
/** Stop publishing late settlements. */
|
|
1309
|
+
dispose() {
|
|
1310
|
+
this.disposed = true;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Build the tab's injected face.
|
|
1314
|
+
* @param resolveText - current-language text resolution from the locale service.
|
|
1315
|
+
* @returns the tab's injected state sources and actions.
|
|
1316
|
+
*/
|
|
1317
|
+
face(resolveText) {
|
|
1318
|
+
return {
|
|
1319
|
+
hooks: {
|
|
1320
|
+
discover: this.store,
|
|
1321
|
+
locale: this.ctx.locale
|
|
1322
|
+
},
|
|
1323
|
+
resolveText,
|
|
1324
|
+
ensure: () => {
|
|
1325
|
+
if (this.state().status === "idle") this.loadIndexes();
|
|
1326
|
+
},
|
|
1327
|
+
reload: () => {
|
|
1328
|
+
this.loadIndexes();
|
|
1329
|
+
},
|
|
1330
|
+
select: (url) => {
|
|
1331
|
+
if (this.state().selected === url) return;
|
|
1332
|
+
this.patch({ selected: url });
|
|
1333
|
+
this.load(url, INITIAL_QUERY, 50, false);
|
|
1334
|
+
},
|
|
1335
|
+
search: (query) => {
|
|
1336
|
+
const listing = this.state().listing;
|
|
1337
|
+
if (listing !== null) this.load(listing.url, query, 50, false);
|
|
1338
|
+
},
|
|
1339
|
+
more: () => {
|
|
1340
|
+
this.loadMore();
|
|
1341
|
+
},
|
|
1342
|
+
retry: () => {
|
|
1343
|
+
this.failed();
|
|
1344
|
+
},
|
|
1345
|
+
refresh: () => {
|
|
1346
|
+
const listing = this.state().listing;
|
|
1347
|
+
if (listing !== null) this.load(listing.url, listing.query, 50, true);
|
|
1348
|
+
},
|
|
1349
|
+
toggleSources: () => {
|
|
1350
|
+
this.patch({
|
|
1351
|
+
editing: !this.state().editing,
|
|
1352
|
+
sourceFailure: null
|
|
1353
|
+
});
|
|
1354
|
+
},
|
|
1355
|
+
editDraft: (text) => {
|
|
1356
|
+
this.patch({
|
|
1357
|
+
draft: text,
|
|
1358
|
+
sourceFailure: null
|
|
1359
|
+
});
|
|
1360
|
+
},
|
|
1361
|
+
addSource: () => {
|
|
1362
|
+
const draft = this.state().draft.trim();
|
|
1363
|
+
if (draft === "") return;
|
|
1364
|
+
this.selectAdded = true;
|
|
1365
|
+
this.saveSources([...this.state().indexes.map((index) => index.url), draft], true);
|
|
1366
|
+
},
|
|
1367
|
+
removeSource: (url) => {
|
|
1368
|
+
this.saveSources(this.state().indexes.map((index) => index.url).filter((item) => item !== url), false);
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
/** Re-read the sources after the Host announced a change or the connection reset; an unrendered tab stays idle. */
|
|
1373
|
+
sourcesChanged() {
|
|
1374
|
+
if (this.state().status !== "idle") this.loadIndexes();
|
|
1375
|
+
}
|
|
1376
|
+
/** Recompute installation status of every loaded plugin after the profile's bundles changed; the Host reuses its cached document. */
|
|
1377
|
+
bundlesChanged() {
|
|
1378
|
+
const { listing } = this.state();
|
|
1379
|
+
if (listing?.status === "ready") this.load(listing.url, listing.query, Math.max(listing.value.entries.length, 50), false);
|
|
1380
|
+
}
|
|
1381
|
+
state() {
|
|
1382
|
+
return this.store.getSnapshot();
|
|
1383
|
+
}
|
|
1384
|
+
patch(next) {
|
|
1385
|
+
this.store.set({
|
|
1386
|
+
...this.state(),
|
|
1387
|
+
...next
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
async loadIndexes() {
|
|
1391
|
+
const read = ++this.indexRead;
|
|
1392
|
+
if (this.state().status === "idle") this.patch({ status: "loading" });
|
|
1393
|
+
const answer = await this.ctx.remote.pluginMarket.listIndexes();
|
|
1394
|
+
if (this.disposed || read !== this.indexRead) return;
|
|
1395
|
+
if (!answer.ok) {
|
|
1396
|
+
this.patch({ status: "error" });
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1399
|
+
const indexes = answer.value;
|
|
1400
|
+
const previous = this.state().selected;
|
|
1401
|
+
const last = indexes.at(-1);
|
|
1402
|
+
const selected = this.selectAdded && last !== void 0 ? last.url : indexes.some((index) => index.url === previous) ? previous : indexes[0]?.url ?? null;
|
|
1403
|
+
this.selectAdded = false;
|
|
1404
|
+
this.patch({
|
|
1405
|
+
status: "ready",
|
|
1406
|
+
indexes,
|
|
1407
|
+
selected,
|
|
1408
|
+
...indexes.length === 0 ? { editing: false } : {}
|
|
1409
|
+
});
|
|
1410
|
+
if (selected === null) this.patch({ listing: null });
|
|
1411
|
+
else if (selected !== this.state().listing?.url) this.load(selected, INITIAL_QUERY, 50, false);
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Load the first `count` results of a query in pages the Host accepts, replacing the shown results at once. Later
|
|
1415
|
+
* pages pin the first page's document; when the Host answers from a replaced document the read restarts once, and
|
|
1416
|
+
* fails if the document is replaced again. The index's undeclared ids leave the query.
|
|
1417
|
+
*/
|
|
1418
|
+
async load(url, query, count, refresh) {
|
|
1419
|
+
const read = ++this.listingRead;
|
|
1420
|
+
const current = this.state().listing;
|
|
1421
|
+
const [kept, answered] = current?.url === url ? [current.value, current.answered] : [null, null];
|
|
1422
|
+
this.patch({ listing: {
|
|
1423
|
+
url,
|
|
1424
|
+
query,
|
|
1425
|
+
status: "loading",
|
|
1426
|
+
value: kept,
|
|
1427
|
+
answered,
|
|
1428
|
+
failure: null
|
|
1429
|
+
} });
|
|
1430
|
+
const fail = (failure) => {
|
|
1431
|
+
this.failed = () => {
|
|
1432
|
+
this.load(url, query, count, refresh);
|
|
1433
|
+
};
|
|
1434
|
+
return {
|
|
1435
|
+
url,
|
|
1436
|
+
query,
|
|
1437
|
+
status: "error",
|
|
1438
|
+
value: kept,
|
|
1439
|
+
answered,
|
|
1440
|
+
failure
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
let value = null;
|
|
1444
|
+
let restarted = false;
|
|
1445
|
+
while (value === null || value.entries.length < count && value.nextOffset !== null) {
|
|
1446
|
+
const offset = value?.entries.length ?? 0;
|
|
1447
|
+
const limit = Math.min(count - offset, MAX_PAGE);
|
|
1448
|
+
const answer = await this.page(url, query, offset, limit, value?.fetchedAt, refresh && value === null && !restarted);
|
|
1449
|
+
if (this.disposed || read !== this.listingRead) return;
|
|
1450
|
+
if (!answer.ok) {
|
|
1451
|
+
this.settle(url, fail(listingFailure(answer.error)), answer);
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
if (value === null || answer.value.fetchedAt === value.fetchedAt) value = value === null ? answer.value : {
|
|
1455
|
+
...answer.value,
|
|
1456
|
+
entries: [...value.entries, ...answer.value.entries]
|
|
1457
|
+
};
|
|
1458
|
+
else if (restarted) {
|
|
1459
|
+
this.patch({ listing: fail("changed") });
|
|
1460
|
+
return;
|
|
1461
|
+
} else {
|
|
1462
|
+
restarted = true;
|
|
1463
|
+
value = null;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
const declared = declaredQuery(query, value.metadata);
|
|
1467
|
+
if (declared !== query) {
|
|
1468
|
+
this.load(url, declared, count, false);
|
|
1469
|
+
return;
|
|
1470
|
+
}
|
|
1471
|
+
this.settle(url, {
|
|
1472
|
+
url,
|
|
1473
|
+
query,
|
|
1474
|
+
status: "ready",
|
|
1475
|
+
value,
|
|
1476
|
+
answered: query,
|
|
1477
|
+
failure: null
|
|
1478
|
+
}, {
|
|
1479
|
+
ok: true,
|
|
1480
|
+
value
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
/** Load the page after the shown results; a replaced document reloads them from the first page. */
|
|
1484
|
+
async loadMore() {
|
|
1485
|
+
const listing = this.state().listing;
|
|
1486
|
+
if (listing === null || listing.status !== "ready" && listing.status !== "error" || listing.answered !== listing.query) return;
|
|
1487
|
+
if (listing.value?.nextOffset == null) return;
|
|
1488
|
+
const { url, query, value } = listing;
|
|
1489
|
+
const read = ++this.listingRead;
|
|
1490
|
+
this.patch({ listing: {
|
|
1491
|
+
...listing,
|
|
1492
|
+
status: "more",
|
|
1493
|
+
failure: null
|
|
1494
|
+
} });
|
|
1495
|
+
const answer = await this.page(url, query, value.entries.length, 50, value.fetchedAt, false);
|
|
1496
|
+
if (this.disposed || read !== this.listingRead) return;
|
|
1497
|
+
if (!answer.ok) {
|
|
1498
|
+
this.failed = () => {
|
|
1499
|
+
this.loadMore();
|
|
1500
|
+
};
|
|
1501
|
+
this.settle(url, {
|
|
1502
|
+
...listing,
|
|
1503
|
+
status: "error",
|
|
1504
|
+
failure: listingFailure(answer.error)
|
|
1505
|
+
}, answer);
|
|
1506
|
+
return;
|
|
1507
|
+
}
|
|
1508
|
+
if (answer.value.fetchedAt !== value.fetchedAt) {
|
|
1509
|
+
this.load(url, query, value.entries.length + 50, false);
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1512
|
+
const next = {
|
|
1513
|
+
...answer.value,
|
|
1514
|
+
entries: [...value.entries, ...answer.value.entries]
|
|
1515
|
+
};
|
|
1516
|
+
this.settle(url, {
|
|
1517
|
+
...listing,
|
|
1518
|
+
status: "ready",
|
|
1519
|
+
value: next,
|
|
1520
|
+
failure: null
|
|
1521
|
+
}, {
|
|
1522
|
+
ok: true,
|
|
1523
|
+
value: next
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
page(url, query, offset, limit, fetchedAt, refresh) {
|
|
1527
|
+
return this.ctx.remote.pluginMarket.search(url, {
|
|
1528
|
+
...query.text.trim() === "" ? {} : { text: query.text },
|
|
1529
|
+
...query.category === null ? {} : { category: query.category },
|
|
1530
|
+
...query.labels.length === 0 ? {} : { labels: query.labels },
|
|
1531
|
+
sort: query.sort,
|
|
1532
|
+
offset,
|
|
1533
|
+
limit,
|
|
1534
|
+
...fetchedAt === void 0 ? {} : { fetchedAt },
|
|
1535
|
+
...refresh ? { refresh: true } : {}
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
/** Publish a settled read and the index title or error it taught about its source. */
|
|
1539
|
+
settle(url, listing, answer) {
|
|
1540
|
+
const indexes = this.state().indexes.map((index) => {
|
|
1541
|
+
if (index.url !== url) return index;
|
|
1542
|
+
if (!answer.ok) return {
|
|
1543
|
+
...index,
|
|
1544
|
+
error: answer.error.message
|
|
1545
|
+
};
|
|
1546
|
+
const { title, description } = answer.value;
|
|
1547
|
+
return {
|
|
1548
|
+
url,
|
|
1549
|
+
title,
|
|
1550
|
+
...description === void 0 ? {} : { description }
|
|
1551
|
+
};
|
|
1552
|
+
});
|
|
1553
|
+
this.patch({
|
|
1554
|
+
listing,
|
|
1555
|
+
indexes
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
async saveSources(urls, adding) {
|
|
1559
|
+
this.patch({
|
|
1560
|
+
saving: true,
|
|
1561
|
+
sourceFailure: null
|
|
1562
|
+
});
|
|
1563
|
+
const answer = await this.ctx.remote.pluginMarket.setIndexes(urls);
|
|
1564
|
+
if (this.disposed) return;
|
|
1565
|
+
if (!answer.ok) {
|
|
1566
|
+
this.selectAdded = false;
|
|
1567
|
+
this.patch({
|
|
1568
|
+
saving: false,
|
|
1569
|
+
sourceFailure: sourceFailure(answer.error)
|
|
1570
|
+
});
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
this.patch({
|
|
1574
|
+
saving: false,
|
|
1575
|
+
...adding ? { draft: "" } : {}
|
|
1576
|
+
});
|
|
1577
|
+
await this.loadIndexes();
|
|
1578
|
+
}
|
|
1579
|
+
};
|
|
1580
|
+
//#endregion
|
|
1581
|
+
//#region lib/types/client/index.js
|
|
1582
|
+
/** Dictionary namespace owned by this plugin. */
|
|
1583
|
+
const NS = "pluginMarket";
|
|
1584
|
+
/** Services the section reads. */
|
|
1585
|
+
const inject = [
|
|
1586
|
+
"slots",
|
|
1587
|
+
"locale",
|
|
1588
|
+
"remote",
|
|
1589
|
+
"remote.pluginMarket"
|
|
1590
|
+
];
|
|
1591
|
+
/**
|
|
1592
|
+
* Contribute Discover to the Plugins page and keep it current on Host changes.
|
|
1593
|
+
* @param ctx - the browser plugin context.
|
|
1594
|
+
*/
|
|
1595
|
+
function apply(ctx) {
|
|
1596
|
+
ctx.effect(() => ctx.locale.register(NS, {
|
|
1597
|
+
zh,
|
|
1598
|
+
en
|
|
1599
|
+
}), "ui-plugin-market: dictionaries");
|
|
1600
|
+
const controller = new DiscoverController(ctx);
|
|
1601
|
+
ctx.effect(() => () => {
|
|
1602
|
+
controller.dispose();
|
|
1603
|
+
}, "ui-plugin-market: controller");
|
|
1604
|
+
ctx.effect(() => {
|
|
1605
|
+
const disposers = [
|
|
1606
|
+
ctx.remote.$on("plugin-market/changed", () => {
|
|
1607
|
+
controller.sourcesChanged();
|
|
1608
|
+
}),
|
|
1609
|
+
ctx.remote.$on("plugin-manager/changed", () => {
|
|
1610
|
+
controller.bundlesChanged();
|
|
1611
|
+
}),
|
|
1612
|
+
ctx.on("connection/reset", () => {
|
|
1613
|
+
controller.sourcesChanged();
|
|
1614
|
+
})
|
|
1615
|
+
];
|
|
1616
|
+
return () => {
|
|
1617
|
+
for (const dispose of disposers) dispose();
|
|
1618
|
+
};
|
|
1619
|
+
}, "ui-plugin-market: host invalidations");
|
|
1620
|
+
const face = controller.face((text) => ctx.locale.resolveText(text));
|
|
1621
|
+
const t = ctx.locale.bind(NS);
|
|
1622
|
+
ctx.slots.inject("plugins.tab", () => ctx.slots.register({
|
|
1623
|
+
name: "plugins.tab",
|
|
1624
|
+
id: "discover",
|
|
1625
|
+
label: () => t("title"),
|
|
1626
|
+
locale: NS,
|
|
1627
|
+
inject: () => face
|
|
1628
|
+
}, DiscoverSection));
|
|
1629
|
+
}
|
|
1630
|
+
//#endregion
|
|
1631
|
+
exports.apply = apply;
|
|
1632
|
+
exports.inject = inject;
|
|
1633
|
+
return module.exports;
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
|
|
1637
|
+
//# sourceMappingURL=client.js.map
|