@qqbrowser/qbot-dsh 0.0.10 → 0.0.12
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/lib/bin.js +1 -1
- package/lib/{dump-config-BD79jvHi.js → dump-config-xQTUTTDD.js} +1 -1
- package/lib/{plugin-B3Ecl7VN.js → plugin-DNAeLZbb.js} +1 -1
- package/lib/profile-boot-BkordgJK.js +1 -0
- package/node_modules/@deepseek-ai/cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +4 -4
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
- 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 +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web-react/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/worker.cjs +4 -2
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/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 +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/worker.cjs +9 -7
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-output-retention/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-D2_FQYSK.js +1 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-policy/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/lib/index.js +6 -6
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +26 -26
- package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dqw48FrP.js → index-BQQQ5Qt-.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DddhVWhK.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-9bx0az3O.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-DEItuUFs.js → ruby-HDLHRjSL.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-C2oV4EkX.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-CeMKrCZm.js} +24 -24
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/LICENSE +21 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/invariant.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +3 -4
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
- package/package.json +1 -1
- package/lib/profile-boot-_PCyp_wB.js +0 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-BjBvdldw.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DIPi6g--.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-D82vCrfD.js +0 -1
- /package/lib/{profile-boot-B71dQloK.js → profile-boot-DDo03lXi.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var ke=Object.defineProperty;var c=(v,j)=>ke(v,"name",{value:j,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-theme",factory:c(v=>{var j={exports:{}},x=j.exports;Object.defineProperty(x,Symbol.toStringTag,{value:"Module"});let O=v("react/jsx-runtime"),D=v("@deepseek-ai/dsh-client-ui-primitives"),Q=v("@deepseek-ai/dsh-client-runtime/client");function B(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=B(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}c(B,"r");function X(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=B(e))&&(n&&(n+=" "),n+=t);return n}c(X,"clsx");const Z=".gO7-zq_group{border-bottom:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;padding:16px 0;display:flex}.gO7-zq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.gO7-zq_cubeRow{flex-wrap:wrap;align-items:stretch;gap:8px;display:flex}.gO7-zq_themeCube{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:16px;flex-direction:column;flex:180px;justify-content:center;align-items:center;gap:4px;padding:20px 32px;font-size:14px;line-height:22px;display:flex}.gO7-zq_themeCube:hover:not(.gO7-zq_selected){background:var(--dsw-alias-interactive-bg-hover)}.gO7-zq_selected{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}",P="@deepseek-ai/dsh-client-ui-theme/AppearanceRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(P)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-theme",e.dataset.pluginCss=P,e.textContent=Z,document.head.appendChild(e)}var k={themeCube:"gO7-zq_themeCube",selected:"gO7-zq_selected",cubeRow:"gO7-zq_cubeRow",group:"gO7-zq_group",title:"gO7-zq_title"};const ee=[{id:"light",labelKey:"appearance.light",Icon:D.IconLightOutline16},{id:"dark",labelKey:"appearance.dark",Icon:D.IconDarkOutline16},{id:"system",labelKey:"appearance.system",Icon:D.IconFollowsystemOutline16}];function te({t:e,setTheme:t,useStore:r}){const n=r(i=>i.preference);return(0,O.jsxs)("div",{className:k.group,children:[(0,O.jsx)("div",{className:k.title,children:e("appearance.title")}),(0,O.jsx)("div",{className:k.cubeRow,children:ee.map(({id:i,labelKey:a,Icon:s})=>(0,O.jsxs)("button",{type:"button",className:X(k.themeCube,n===i&&k.selected),"aria-pressed":n===i,onClick:c(()=>{t(i)},"onClick"),children:[(0,O.jsx)(s,{}),e(a)]},i))})]})}c(te,"AppearanceRow");function re(){return(0,Q.defineStore)({init:c(()=>({preference:"system",revision:-1}),"init"),actions:{sync:c((e,t,r)=>{r<=e.revision||(e.preference=t,e.revision=r)},"sync")}})}c(re,"createAppearanceRowStore");const ne={"appearance.title":"外观","appearance.light":"浅色","appearance.dark":"深色","appearance.system":"跟随系统"},ie={"appearance.title":"Appearance","appearance.light":"Light","appearance.dark":"Dark","appearance.system":"System"};function y(e){return e==null}c(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}c(N,"isPlainObject");function se(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}c(se,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}c(b,"mapValues");function oe(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}c(oe,"pick");function w(e,t){return arguments.length===1?r=>w(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}c(w,"is");function E(e){return w("ArrayBuffer",e)||w("SharedArrayBuffer",e)}c(E,"isArrayBufferLike");function ae(e){return E(e)||ArrayBuffer.isView(e)}c(ae,"isArrayBufferSource");let m;(function(e){e.is=E,e.isSource=ae;function t(s){return ArrayBuffer.isView(s)?s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength):s}c(t,"fromSource"),e.fromSource=t;function r(s){if(s=t(s),typeof Buffer<"u")return Buffer.from(s).toString("base64");let f="";const d=new Uint8Array(s);for(let g=0;g<d.byteLength;g++)f+=String.fromCharCode(d[g]);return btoa(f)}c(r,"toBase64"),e.toBase64=r;function n(s){return typeof Buffer<"u"?t(Buffer.from(s,"base64")):Uint8Array.from(atob(s),f=>f.charCodeAt(0))}c(n,"fromBase64"),e.fromBase64=n;function i(s){return s=t(s),typeof Buffer<"u"?Buffer.from(s).toString("hex"):Array.from(new Uint8Array(s),f=>f.toString(16).padStart(2,"0")).join("")}c(i,"toHex"),e.toHex=i;function a(s){if(typeof Buffer<"u")return t(Buffer.from(s,"hex"));const f=s.length%2===0?s:s.slice(0,s.length-1),d=[];for(let g=0;g<f.length;g+=2)d.push(parseInt(`${f[g]}${f[g+1]}`,16));return Uint8Array.from(d).buffer}c(a,"fromHex"),e.fromHex=a})(m||(m={})),m.fromBase64,m.toBase64,m.fromHex,m.toHex;function q(e,t=new Map){if(!e||typeof e!="object")return e;if(w("Date",e))return new Date(e.valueOf());if(w("RegExp",e))return new RegExp(e.source,e.flags);if(E(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((a,s)=>{i[s]=Reflect.apply(q,null,[a,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const a={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in a&&(a.value=Reflect.apply(q,null,[a.value,t])),Reflect.defineProperty(n,i,a)}return n}c(q,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,a){return i(e)?i(t)?a(e,t):!1:i(t)?!1:void 0}return c(n,"check"),n(Array.isArray,(i,a)=>i.length===a.length&&i.every((s,f)=>$(s,a[f])))??n(w("Date"),(i,a)=>i.valueOf()===a.valueOf())??n(w("RegExp"),(i,a)=>i.source===a.source&&i.flags===a.flags)??n(E,(i,a)=>{if(i.byteLength!==a.byteLength)return!1;const s=new Uint8Array(i),f=new Uint8Array(a);for(let d=0;d<s.length;d++)if(s[d]!==f[d])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}c($,"deepEqual");let V;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,a=e.week=i*7;let s=new Date().getTimezoneOffset();function f(l){s=l}c(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function d(){return s}c(d,"getTimezoneOffset"),e.getTimezoneOffset=d;function g(l=new Date,u){return typeof l=="number"&&(l=new Date(l)),u===void 0&&(u=s),Math.floor((l.valueOf()/r-u)/1440)}c(g,"getDateNumber"),e.getDateNumber=g;function ge(l,u){const Oe=new Date(l*i);return u===void 0&&(u=s),new Date(+Oe+u*r)}c(ge,"fromDateNumber"),e.fromDateNumber=ge;const be=/\d+(?:\.\d+)?/.source,we=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(l=>`(${be}${l})?`).join("")}$`);function Y(l){const u=we.exec(l);return u?(parseFloat(u[1])*a||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}c(Y,"parseTime"),e.parseTime=Y;function Se(l){const u=Y(l);return u?l=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(l)?l=`${new Date().toLocaleDateString()}-${l}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(l)&&(l=`${new Date().getFullYear()}-${l}`),l?new Date(l):new Date}c(Se,"parseDate"),e.parseDate=Se;function ve(l){const u=Math.abs(l);return u>=i-n/2?Math.round(l/i)+"d":u>=n-r/2?Math.round(l/n)+"h":u>=r-t/2?Math.round(l/r)+"m":u>=t?Math.round(l/t)+"s":l+"ms"}c(ve,"format"),e.format=ve;function S(l,u=2){return l.toString().padStart(u,"0")}c(S,"toDigits"),e.toDigits=S;function xe(l,u=new Date){return l.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",S(u.getMonth()+1)).replace("dd",S(u.getDate())).replace("hh",S(u.getHours())).replace("mm",S(u.getMinutes())).replace("ss",S(u.getSeconds())).replace("SSS",S(u.getMilliseconds(),3))}c(xe,"template"),e.template=xe})(V||(V={}));const A=Symbol.for("schemastery"),I=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{c(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[I]}};Object.defineProperty(p.prototype,I,{value:!0});const o=c(function(e){const t=c(function(r,n={}){return o.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new o(i)),n=c(i=>r[i],"getRef");for(const i in r){const a=r[i];a.sKey=n(a.sKey),a.inner=n(a.inner),a.list=a.list&&a.list.map(n),a.dict=a.dict&&b(a.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,o.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");o.prototype=Object.create(Function.prototype),o.prototype[A]=!0,Object.defineProperty(o.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:c(e=>{try{return{value:o.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),o.ValidationError=p,o.prototype.toJSON=c(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),o.prototype.set=c(function(t,r){return this.dict[t]=r,this},"set"),o.prototype.push=c(function(t){return this.list.push(t),this},"push");function ce(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}c(ce,"mergeDesc");function _(e){return e?.$value??e?.$inner}c(_,"getInner");function F(e){return se(e??{},t=>!t.startsWith("$"))}c(F,"extractKeys"),o.prototype.i18n=c(function(t){const r=o(this),n=ce(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,a)=>i.i18n(b(t,s=>_(s)?.[a]??s?.[a])))),r.list&&(r.list=r.list.map((i,a)=>i.i18n(b(t,(s={})=>Array.isArray(_(s))?_(s)[a]:Array.isArray(s)?s[a]:F(s))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>_(i)?_(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),o.prototype.extra=c(function(t,r){const n=o(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(o.prototype,{[e](t=!0){const r=o(this);return r.meta={...r.meta,[e]:t},r}});o.prototype.deprecated=c(function(){const t=o(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),o.prototype.experimental=c(function(){const t=o(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),o.prototype.pattern=c(function(t){const r=o(this),n=oe(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),o.prototype.simplify=c(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const a=this.type==="array"?this.inner:this.list[i],s=a?a.simplify(n):n;r.push(s)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return o.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),o.prototype.toString=c(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),o.prototype.role=c(function(e,t){const r=o(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(o.prototype,{[e](t){const r=o(this);return r.meta={...r.meta,[e]:t},r}});const J={};o.extend=c(function(t,r){J[t]=r},"extend"),o.resolve=c(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let s=r,f=r.meta.default;for(;s?.type==="intersect"&&y(f);)s=s.list[0],f=s?.meta.default;if(y(f))return[t];t=q(f)}const a=J[r.type];if(!a)throw new p(`unsupported type "${r.type}"`,n);try{return a(t,r,n,i)}catch(s){if(!r.meta.loose)throw s;return[r.meta.default]}},"resolve"),o.from=c(function(t){if(y(t))return o.any();if(["string","number","boolean"].includes(typeof t))return o.const(t).required();if(t[A])return t;if(typeof t=="function")switch(t){case String:return o.string().required();case Number:return o.number().required();case Boolean:return o.boolean().required();case Function:return o.function().required();default:return o.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),o.lazy=c(function(t){const r=c(()=>(n.inner[A]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new o({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),o.natural=c(function(){return o.number().step(1).min(0)},"natural"),o.percent=c(function(){return o.number().step(.01).min(0).max(1).role("slider")},"percent"),o.date=c(function(){return o.union([o.is(Date),o.transform(o.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),o.regExp=c(function(t=""){return o.union([o.is(RegExp),o.transform(o.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),o.arrayBuffer=c(function(t){return o.union([o.is(ArrayBuffer),o.is(SharedArrayBuffer),o.transform(o.any(),(r,n)=>{if(m.isSource(r))return m.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[o.transform(o.string(),(r,n)=>{try{return t==="base64"?m.fromBase64(r):m.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),o.extend("lazy",(e,t,r,n)=>(t.inner[A]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),o.resolve(e,t.inner,r,n))),o.extend("any",e=>[e]),o.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),o.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function z(e,t,r,n,i=!1){const{max:a=1/0,min:s=-1/0}=t;if(e>a)throw new p(`expected ${r} <= ${a} but got ${e}`,n);if(e<s&&!i)throw new p(`expected ${r} >= ${s} but got ${e}`,n)}c(z,"checkWithinRange"),o.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return z(e.length,t,"string length",r),[e]});function C(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),a=r.slice(0,n);return i.length<=t?+(a+i.padEnd(t,"0")):+(a+i.slice(0,t)+"."+i.slice(t))}c(C,"decimalShift");function fe(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(C(e,i)-C(t,i))%C(r,i)===0}c(fe,"isMultipleOf"),o.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);z(e,t,"number",r);const{step:n}=t;if(n&&!fe(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),o.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),o.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,a=[];if(typeof e=="number"){i=e;for(const s in t)e&t[s]&&a.push(s)}else if(Array.isArray(e)){a=e;for(const s of a){if(typeof s!="string")throw new p(`expected string but got ${s}`,n);s in t&&(i|=t[s])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,a]}),o.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),o.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function T(e,t,r,n){try{const[i,a]=o.resolve(e[t],r,{...n,path:[...n.path||[],t]});return a!==void 0&&(e[t]=a),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}c(T,"property"),o.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return z(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,a)=>T(e,a,t,n))]}),o.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const a={};for(const s in e){let f;try{f=o.resolve(s,r,n)[0]}catch(d){if(i)continue;throw d}a[f]=T(e,s,t,n),e[f]=e[s],s!==f&&delete e[s]}return[a]}),o.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((a,s)=>T(e,s,a,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function R(e,t){for(const r in t)r in e||(e[r]=t[r])}c(R,"merge"),o.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const a in t){const s=T(e,a,t[a],r);(!y(s)||a in e)&&(i[a]=s)}return n||R(i,e),[i]}),o.extend("union",(e,{list:t,toString:r},n,i)=>{const a=[];for(const s of t)try{return o.resolve(e,s,n,i)}catch(f){a.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),o.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let a;for(const s of t){const f=o.resolve(e,s,n,!0)[0];if(!y(f))if(y(a))a=f;else{if(typeof a!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")R(a??={},f);else if(a!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&R(a,e),[a]}),o.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[a,s=e]=o.resolve(e,t,i,!0);return n?[r(a)]:[r(a),r(s)]});const K={};function h(e,t,r){K[e]=r,Object.assign(o,{[e](...n){const i=new o({type:e});return t.forEach((a,s)=>{switch(a){case"sKey":i.sKey=n[s]??o.string();break;case"inner":i.inner=o.from(n[s]);break;case"list":i.list=n[s].map(o.from);break;case"dict":i.dict=b(n[s],o.from);break;case"bits":i.bits={};for(const f in n[s])typeof n[s][f]=="number"&&(i.bits[f]=n[s][f]);break;case"callback":{const f=i.callback=n[s];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[s];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[a]=n[s]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}c(h,"defineMethod"),h("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),h("any",[],()=>"any"),h("never",[],()=>"never"),h("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),h("string",[],()=>"string"),h("number",[],()=>"number"),h("boolean",[],()=>"boolean"),h("bitset",["bits"],()=>"bitset"),h("function",[],()=>"function"),h("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),h("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),h("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),h("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),h("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),h("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),h("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const H=["light","dark","system"],le="ui-theme",U="preference",L="system";o.object({[U]:o.union([...H]).default(L)});function ue(e){return H.some(t=>t===e)}c(ue,"isThemePreference");const M="settings.theme",pe=Object.freeze([Object.freeze({id:"light",colorScheme:"light",tokens:Object.freeze({})}),Object.freeze({id:"dark",colorScheme:"dark",tokens:Object.freeze({})})]),he=Object.freeze([{name:"--dsw-alias-bg-base",description:"Application base background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-base"},{name:"--dsw-alias-bg-layer-1",description:"Primary raised surface background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-layer-1"},{name:"--dsw-alias-bg-layer-2",description:"Secondary nested surface background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-layer-2"},{name:"--dsw-alias-bg-overlay",description:"Overlay and popover background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-overlay"},{name:"--dsw-alias-border-l1",description:"Primary subtle border.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-border-l1"},{name:"--dsw-alias-border-l2",description:"Secondary stronger border.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-border-l2"},{name:"--dsw-alias-brand-primary",description:"Primary brand accent.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-brand-primary"},{name:"--dsw-alias-label-primary",description:"Primary text color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-label-primary"},{name:"--dsw-alias-label-secondary",description:"Secondary text color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-label-secondary"},{name:"--dsw-alias-state-error-primary",description:"Primary error state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-error-primary"},{name:"--dsw-alias-state-success-primary",description:"Primary success state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-success-primary"},{name:"--dsw-alias-state-warn-primary",description:"Primary warning state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-warn-primary"},{name:"--dsw-specific-sidebar-fill",description:"Sidebar column and title-row background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-specific-sidebar-fill"}]);var W=class{static{c(this,"ThemeRuntime")}ctx;host;themes=[...pe];preference;revision=0;snapshot;media;overrides=new Map;overrideSeq=0;constructor(e,t){if(this.ctx=e,this.host=t,this.preference=L,this.media=typeof matchMedia>"u"?void 0:matchMedia("(prefers-color-scheme: dark)"),this.snapshot=this.buildSnapshot(),this.media!==void 0){const r=this.media,n=c(()=>{this.preference==="system"&&this.publish()},"onChange");e.effect(()=>(r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}),"ui-theme: prefers-color-scheme listener")}e.effect(()=>t.subscribe(()=>{this.adopt()}),"ui-theme: settings scope adoption"),this.adopt()}getTheme(){return this.snapshot}exportInspectTokens(){const e=new Map(he.map(t=>[t.name,t]));for(const t of this.themes)for(const r of Object.keys(t.tokens))e.has(r)||e.set(r,G(r));for(const t of this.overrides.values())for(const r of Object.keys(t.tokens))e.has(r)||e.set(r,G(r));return[...e.values()].map(t=>({...t})).sort((t,r)=>t.name.localeCompare(r.name))}setTheme(e){if(e!=="system"&&!this.themes.some(t=>t.id===e))throw new Error(`theme "${e}" is not registered`);this.preference!==e&&(this.preference=e,ue(e)&&this.host.set(U,e),this.publish())}adopt(){const e=this.host.getSnapshot().value;e===void 0||this.preference===e.preference||(this.preference=e.preference,this.publish())}register(e){if(e.id==="system")throw new Error('"system" is a preference, not a registrable theme id');if(this.themes.some(t=>t.id===e.id))throw new Error(`theme "${e.id}" is already registered`);return this.themes=[...this.themes,e],this.publish(),()=>{this.themes.some(t=>t.id===e.id)&&(this.themes=this.themes.filter(t=>t.id!==e.id),this.preference===e.id&&(this.preference=L),this.publish())}}overrideTokens(e,t){const r={seq:this.overrideSeq++,tokens:de(e,t)};return this.overrides.set(e,r),this.publish(),()=>{this.overrides.get(e)===r&&(this.overrides.delete(e),this.publish())}}buildSnapshot(){const e=this.preference==="system"?this.media?.matches===!0?"dark":"light":this.preference,t=this.themes.find(r=>r.id===e);if(t===void 0)throw new Error(`theme registry lost "${e}"`);return Object.freeze({preference:this.preference,active:this.composeActive(t),themes:Object.freeze([...this.themes]),revision:this.revision})}composeActive(e){if(this.overrides.size===0)return e;const t={...e.tokens};for(const r of[...this.overrides.values()].sort((n,i)=>n.seq-i.seq))for(const[n,i]of Object.entries(r.tokens))t[n]=i[e.colorScheme];return Object.freeze({...e,tokens:Object.freeze(t)})}publish(){this.revision+=1,this.snapshot=this.buildSnapshot(),this.ctx.emit("theme/change",this.snapshot)}};function de(e,t){const r={};for(const[n,i]of Object.entries(t)){if(typeof i=="string")throw new TypeError(`theme override "${n}" from "${e}" is a bare string — pass { light: ${JSON.stringify(i)}, dark: ${JSON.stringify(i)} } (repeat the value when it is the same in both palettes); a single value goes illegible when the user switches color scheme`);if(typeof i!="object"||i===null||typeof i.light!="string"||typeof i.dark!="string")throw new TypeError(`theme override "${n}" from "${e}" must map to a { light, dark } pair of strings — one value per color scheme`);const a=i;r[n]={light:a.light,dark:a.dark}}return r}c(de,"validateOverrides");function G(e){return{name:e,description:"Theme token registered by the current Client composition.",valueType:"CSS value",requiresLightAndDark:!0,...e.startsWith("--")?{cssVariable:e}:{}}}c(G,"dynamicToken");const ye=["slots","locale","connection","remote","settingsScope"];function me(e){const t=new W(e,e.settingsScope.bind({namespace:le}));e.provide("theme",t),e.effect(()=>e.locale.register(M,{zh:ne,en:ie}),"ui-theme: settings row dictionaries");const r=re();let n;const i=c(s=>{n?.sync(s.preference,s.revision)},"sync");e.on("theme/change",i);const a=c(s=>(n=s,i(t.getTheme()),{setTheme:c(f=>{t.setTheme(f)},"setTheme")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"appearance",order:10,store:r,locale:M,inject:a},te))}return c(me,"apply"),x.SETTINGS_NS=M,x.ThemeRuntime=W,x.apply=me,x.inject=ye,j.exports},"factory")});
|
|
1
|
+
var ke=Object.defineProperty;var c=(v,j)=>ke(v,"name",{value:j,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-theme",factory:c(v=>{var j={exports:{}},x=j.exports;Object.defineProperty(x,Symbol.toStringTag,{value:"Module"});let O=v("react/jsx-runtime"),D=v("@deepseek-ai/dsh-client-ui-primitives"),Q=v("@deepseek-ai/dsh-client-runtime/client");function B(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=B(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}c(B,"r");function X(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=B(e))&&(n&&(n+=" "),n+=t);return n}c(X,"clsx");const Z=".gO7-zq_group{border-bottom:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;padding:16px 0;display:flex}.gO7-zq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.gO7-zq_cubeRow{flex-wrap:wrap;align-items:stretch;gap:8px;display:flex}.gO7-zq_themeCube{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:16px;flex-direction:column;flex:180px;justify-content:center;align-items:center;gap:4px;padding:20px 32px;font-size:14px;line-height:22px;display:flex}.gO7-zq_themeCube:hover:not(.gO7-zq_selected){background:var(--dsw-alias-interactive-bg-hover)}.gO7-zq_selected{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}",P="@deepseek-ai/dsh-client-ui-theme/AppearanceRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(P)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-theme",e.dataset.pluginCss=P,e.textContent=Z,document.head.appendChild(e)}var k={group:"gO7-zq_group",cubeRow:"gO7-zq_cubeRow",selected:"gO7-zq_selected",title:"gO7-zq_title",themeCube:"gO7-zq_themeCube"};const ee=[{id:"light",labelKey:"appearance.light",Icon:D.IconLightOutline16},{id:"dark",labelKey:"appearance.dark",Icon:D.IconDarkOutline16},{id:"system",labelKey:"appearance.system",Icon:D.IconFollowsystemOutline16}];function te({t:e,setTheme:t,useStore:r}){const n=r(i=>i.preference);return(0,O.jsxs)("div",{className:k.group,children:[(0,O.jsx)("div",{className:k.title,children:e("appearance.title")}),(0,O.jsx)("div",{className:k.cubeRow,children:ee.map(({id:i,labelKey:a,Icon:s})=>(0,O.jsxs)("button",{type:"button",className:X(k.themeCube,n===i&&k.selected),"aria-pressed":n===i,onClick:c(()=>{t(i)},"onClick"),children:[(0,O.jsx)(s,{}),e(a)]},i))})]})}c(te,"AppearanceRow");function re(){return(0,Q.defineStore)({init:c(()=>({preference:"system",revision:-1}),"init"),actions:{sync:c((e,t,r)=>{r<=e.revision||(e.preference=t,e.revision=r)},"sync")}})}c(re,"createAppearanceRowStore");const ne={"appearance.title":"外观","appearance.light":"浅色","appearance.dark":"深色","appearance.system":"跟随系统"},ie={"appearance.title":"Appearance","appearance.light":"Light","appearance.dark":"Dark","appearance.system":"System"};function y(e){return e==null}c(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}c(N,"isPlainObject");function se(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}c(se,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}c(b,"mapValues");function oe(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}c(oe,"pick");function w(e,t){return arguments.length===1?r=>w(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}c(w,"is");function E(e){return w("ArrayBuffer",e)||w("SharedArrayBuffer",e)}c(E,"isArrayBufferLike");function ae(e){return E(e)||ArrayBuffer.isView(e)}c(ae,"isArrayBufferSource");let m;(function(e){e.is=E,e.isSource=ae;function t(s){return ArrayBuffer.isView(s)?s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength):s}c(t,"fromSource"),e.fromSource=t;function r(s){if(s=t(s),typeof Buffer<"u")return Buffer.from(s).toString("base64");let f="";const d=new Uint8Array(s);for(let g=0;g<d.byteLength;g++)f+=String.fromCharCode(d[g]);return btoa(f)}c(r,"toBase64"),e.toBase64=r;function n(s){return typeof Buffer<"u"?t(Buffer.from(s,"base64")):Uint8Array.from(atob(s),f=>f.charCodeAt(0))}c(n,"fromBase64"),e.fromBase64=n;function i(s){return s=t(s),typeof Buffer<"u"?Buffer.from(s).toString("hex"):Array.from(new Uint8Array(s),f=>f.toString(16).padStart(2,"0")).join("")}c(i,"toHex"),e.toHex=i;function a(s){if(typeof Buffer<"u")return t(Buffer.from(s,"hex"));const f=s.length%2===0?s:s.slice(0,s.length-1),d=[];for(let g=0;g<f.length;g+=2)d.push(parseInt(`${f[g]}${f[g+1]}`,16));return Uint8Array.from(d).buffer}c(a,"fromHex"),e.fromHex=a})(m||(m={})),m.fromBase64,m.toBase64,m.fromHex,m.toHex;function q(e,t=new Map){if(!e||typeof e!="object")return e;if(w("Date",e))return new Date(e.valueOf());if(w("RegExp",e))return new RegExp(e.source,e.flags);if(E(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((a,s)=>{i[s]=Reflect.apply(q,null,[a,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const a={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in a&&(a.value=Reflect.apply(q,null,[a.value,t])),Reflect.defineProperty(n,i,a)}return n}c(q,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,a){return i(e)?i(t)?a(e,t):!1:i(t)?!1:void 0}return c(n,"check"),n(Array.isArray,(i,a)=>i.length===a.length&&i.every((s,f)=>$(s,a[f])))??n(w("Date"),(i,a)=>i.valueOf()===a.valueOf())??n(w("RegExp"),(i,a)=>i.source===a.source&&i.flags===a.flags)??n(E,(i,a)=>{if(i.byteLength!==a.byteLength)return!1;const s=new Uint8Array(i),f=new Uint8Array(a);for(let d=0;d<s.length;d++)if(s[d]!==f[d])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}c($,"deepEqual");let V;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,a=e.week=i*7;let s=new Date().getTimezoneOffset();function f(l){s=l}c(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function d(){return s}c(d,"getTimezoneOffset"),e.getTimezoneOffset=d;function g(l=new Date,u){return typeof l=="number"&&(l=new Date(l)),u===void 0&&(u=s),Math.floor((l.valueOf()/r-u)/1440)}c(g,"getDateNumber"),e.getDateNumber=g;function ge(l,u){const Oe=new Date(l*i);return u===void 0&&(u=s),new Date(+Oe+u*r)}c(ge,"fromDateNumber"),e.fromDateNumber=ge;const be=/\d+(?:\.\d+)?/.source,we=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(l=>`(${be}${l})?`).join("")}$`);function Y(l){const u=we.exec(l);return u?(parseFloat(u[1])*a||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}c(Y,"parseTime"),e.parseTime=Y;function Se(l){const u=Y(l);return u?l=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(l)?l=`${new Date().toLocaleDateString()}-${l}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(l)&&(l=`${new Date().getFullYear()}-${l}`),l?new Date(l):new Date}c(Se,"parseDate"),e.parseDate=Se;function ve(l){const u=Math.abs(l);return u>=i-n/2?Math.round(l/i)+"d":u>=n-r/2?Math.round(l/n)+"h":u>=r-t/2?Math.round(l/r)+"m":u>=t?Math.round(l/t)+"s":l+"ms"}c(ve,"format"),e.format=ve;function S(l,u=2){return l.toString().padStart(u,"0")}c(S,"toDigits"),e.toDigits=S;function xe(l,u=new Date){return l.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",S(u.getMonth()+1)).replace("dd",S(u.getDate())).replace("hh",S(u.getHours())).replace("mm",S(u.getMinutes())).replace("ss",S(u.getSeconds())).replace("SSS",S(u.getMilliseconds(),3))}c(xe,"template"),e.template=xe})(V||(V={}));const A=Symbol.for("schemastery"),I=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{c(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[I]}};Object.defineProperty(p.prototype,I,{value:!0});const o=c(function(e){const t=c(function(r,n={}){return o.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new o(i)),n=c(i=>r[i],"getRef");for(const i in r){const a=r[i];a.sKey=n(a.sKey),a.inner=n(a.inner),a.list=a.list&&a.list.map(n),a.dict=a.dict&&b(a.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,o.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");o.prototype=Object.create(Function.prototype),o.prototype[A]=!0,Object.defineProperty(o.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:c(e=>{try{return{value:o.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),o.ValidationError=p,o.prototype.toJSON=c(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),o.prototype.set=c(function(t,r){return this.dict[t]=r,this},"set"),o.prototype.push=c(function(t){return this.list.push(t),this},"push");function ce(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}c(ce,"mergeDesc");function _(e){return e?.$value??e?.$inner}c(_,"getInner");function F(e){return se(e??{},t=>!t.startsWith("$"))}c(F,"extractKeys"),o.prototype.i18n=c(function(t){const r=o(this),n=ce(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,a)=>i.i18n(b(t,s=>_(s)?.[a]??s?.[a])))),r.list&&(r.list=r.list.map((i,a)=>i.i18n(b(t,(s={})=>Array.isArray(_(s))?_(s)[a]:Array.isArray(s)?s[a]:F(s))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>_(i)?_(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),o.prototype.extra=c(function(t,r){const n=o(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(o.prototype,{[e](t=!0){const r=o(this);return r.meta={...r.meta,[e]:t},r}});o.prototype.deprecated=c(function(){const t=o(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),o.prototype.experimental=c(function(){const t=o(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),o.prototype.pattern=c(function(t){const r=o(this),n=oe(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),o.prototype.simplify=c(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const a=this.type==="array"?this.inner:this.list[i],s=a?a.simplify(n):n;r.push(s)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return o.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),o.prototype.toString=c(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),o.prototype.role=c(function(e,t){const r=o(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(o.prototype,{[e](t){const r=o(this);return r.meta={...r.meta,[e]:t},r}});const J={};o.extend=c(function(t,r){J[t]=r},"extend"),o.resolve=c(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let s=r,f=r.meta.default;for(;s?.type==="intersect"&&y(f);)s=s.list[0],f=s?.meta.default;if(y(f))return[t];t=q(f)}const a=J[r.type];if(!a)throw new p(`unsupported type "${r.type}"`,n);try{return a(t,r,n,i)}catch(s){if(!r.meta.loose)throw s;return[r.meta.default]}},"resolve"),o.from=c(function(t){if(y(t))return o.any();if(["string","number","boolean"].includes(typeof t))return o.const(t).required();if(t[A])return t;if(typeof t=="function")switch(t){case String:return o.string().required();case Number:return o.number().required();case Boolean:return o.boolean().required();case Function:return o.function().required();default:return o.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),o.lazy=c(function(t){const r=c(()=>(n.inner[A]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new o({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),o.natural=c(function(){return o.number().step(1).min(0)},"natural"),o.percent=c(function(){return o.number().step(.01).min(0).max(1).role("slider")},"percent"),o.date=c(function(){return o.union([o.is(Date),o.transform(o.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),o.regExp=c(function(t=""){return o.union([o.is(RegExp),o.transform(o.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),o.arrayBuffer=c(function(t){return o.union([o.is(ArrayBuffer),o.is(SharedArrayBuffer),o.transform(o.any(),(r,n)=>{if(m.isSource(r))return m.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[o.transform(o.string(),(r,n)=>{try{return t==="base64"?m.fromBase64(r):m.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),o.extend("lazy",(e,t,r,n)=>(t.inner[A]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),o.resolve(e,t.inner,r,n))),o.extend("any",e=>[e]),o.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),o.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function z(e,t,r,n,i=!1){const{max:a=1/0,min:s=-1/0}=t;if(e>a)throw new p(`expected ${r} <= ${a} but got ${e}`,n);if(e<s&&!i)throw new p(`expected ${r} >= ${s} but got ${e}`,n)}c(z,"checkWithinRange"),o.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return z(e.length,t,"string length",r),[e]});function C(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),a=r.slice(0,n);return i.length<=t?+(a+i.padEnd(t,"0")):+(a+i.slice(0,t)+"."+i.slice(t))}c(C,"decimalShift");function fe(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(C(e,i)-C(t,i))%C(r,i)===0}c(fe,"isMultipleOf"),o.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);z(e,t,"number",r);const{step:n}=t;if(n&&!fe(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),o.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),o.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,a=[];if(typeof e=="number"){i=e;for(const s in t)e&t[s]&&a.push(s)}else if(Array.isArray(e)){a=e;for(const s of a){if(typeof s!="string")throw new p(`expected string but got ${s}`,n);s in t&&(i|=t[s])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,a]}),o.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),o.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function T(e,t,r,n){try{const[i,a]=o.resolve(e[t],r,{...n,path:[...n.path||[],t]});return a!==void 0&&(e[t]=a),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}c(T,"property"),o.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return z(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,a)=>T(e,a,t,n))]}),o.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const a={};for(const s in e){let f;try{f=o.resolve(s,r,n)[0]}catch(d){if(i)continue;throw d}a[f]=T(e,s,t,n),e[f]=e[s],s!==f&&delete e[s]}return[a]}),o.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((a,s)=>T(e,s,a,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function R(e,t){for(const r in t)r in e||(e[r]=t[r])}c(R,"merge"),o.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const a in t){const s=T(e,a,t[a],r);(!y(s)||a in e)&&(i[a]=s)}return n||R(i,e),[i]}),o.extend("union",(e,{list:t,toString:r},n,i)=>{const a=[];for(const s of t)try{return o.resolve(e,s,n,i)}catch(f){a.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),o.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let a;for(const s of t){const f=o.resolve(e,s,n,!0)[0];if(!y(f))if(y(a))a=f;else{if(typeof a!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")R(a??={},f);else if(a!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&R(a,e),[a]}),o.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[a,s=e]=o.resolve(e,t,i,!0);return n?[r(a)]:[r(a),r(s)]});const K={};function h(e,t,r){K[e]=r,Object.assign(o,{[e](...n){const i=new o({type:e});return t.forEach((a,s)=>{switch(a){case"sKey":i.sKey=n[s]??o.string();break;case"inner":i.inner=o.from(n[s]);break;case"list":i.list=n[s].map(o.from);break;case"dict":i.dict=b(n[s],o.from);break;case"bits":i.bits={};for(const f in n[s])typeof n[s][f]=="number"&&(i.bits[f]=n[s][f]);break;case"callback":{const f=i.callback=n[s];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[s];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[a]=n[s]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}c(h,"defineMethod"),h("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),h("any",[],()=>"any"),h("never",[],()=>"never"),h("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),h("string",[],()=>"string"),h("number",[],()=>"number"),h("boolean",[],()=>"boolean"),h("bitset",["bits"],()=>"bitset"),h("function",[],()=>"function"),h("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),h("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),h("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),h("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),h("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),h("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),h("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const H=["light","dark","system"],le="ui-theme",U="preference",L="system";o.object({[U]:o.union([...H]).default(L)});function ue(e){return H.some(t=>t===e)}c(ue,"isThemePreference");const M="settings.theme",pe=Object.freeze([Object.freeze({id:"light",colorScheme:"light",tokens:Object.freeze({})}),Object.freeze({id:"dark",colorScheme:"dark",tokens:Object.freeze({})})]),he=Object.freeze([{name:"--dsw-alias-bg-base",description:"Application base background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-base"},{name:"--dsw-alias-bg-layer-1",description:"Primary raised surface background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-layer-1"},{name:"--dsw-alias-bg-layer-2",description:"Secondary nested surface background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-layer-2"},{name:"--dsw-alias-bg-overlay",description:"Overlay and popover background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-bg-overlay"},{name:"--dsw-alias-border-l1",description:"Primary subtle border.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-border-l1"},{name:"--dsw-alias-border-l2",description:"Secondary stronger border.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-border-l2"},{name:"--dsw-alias-brand-primary",description:"Primary brand accent.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-brand-primary"},{name:"--dsw-alias-label-primary",description:"Primary text color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-label-primary"},{name:"--dsw-alias-label-secondary",description:"Secondary text color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-label-secondary"},{name:"--dsw-alias-state-error-primary",description:"Primary error state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-error-primary"},{name:"--dsw-alias-state-success-primary",description:"Primary success state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-success-primary"},{name:"--dsw-alias-state-warn-primary",description:"Primary warning state color.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-alias-state-warn-primary"},{name:"--dsw-specific-sidebar-fill",description:"Sidebar column and title-row background.",valueType:"CSS color",requiresLightAndDark:!0,cssVariable:"--dsw-specific-sidebar-fill"}]);var W=class{static{c(this,"ThemeRuntime")}ctx;host;themes=[...pe];preference;revision=0;snapshot;media;overrides=new Map;overrideSeq=0;constructor(e,t){if(this.ctx=e,this.host=t,this.preference=L,this.media=typeof matchMedia>"u"?void 0:matchMedia("(prefers-color-scheme: dark)"),this.snapshot=this.buildSnapshot(),this.media!==void 0){const r=this.media,n=c(()=>{this.preference==="system"&&this.publish()},"onChange");e.effect(()=>(r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}),"ui-theme: prefers-color-scheme listener")}e.effect(()=>t.subscribe(()=>{this.adopt()}),"ui-theme: settings scope adoption"),this.adopt()}getTheme(){return this.snapshot}exportInspectTokens(){const e=new Map(he.map(t=>[t.name,t]));for(const t of this.themes)for(const r of Object.keys(t.tokens))e.has(r)||e.set(r,G(r));for(const t of this.overrides.values())for(const r of Object.keys(t.tokens))e.has(r)||e.set(r,G(r));return[...e.values()].map(t=>({...t})).sort((t,r)=>t.name.localeCompare(r.name))}setTheme(e){if(e!=="system"&&!this.themes.some(t=>t.id===e))throw new Error(`theme "${e}" is not registered`);this.preference!==e&&(this.preference=e,ue(e)&&this.host.set(U,e),this.publish())}adopt(){const e=this.host.getSnapshot().value;e===void 0||this.preference===e.preference||(this.preference=e.preference,this.publish())}register(e){if(e.id==="system")throw new Error('"system" is a preference, not a registrable theme id');if(this.themes.some(t=>t.id===e.id))throw new Error(`theme "${e.id}" is already registered`);return this.themes=[...this.themes,e],this.publish(),()=>{this.themes.some(t=>t.id===e.id)&&(this.themes=this.themes.filter(t=>t.id!==e.id),this.preference===e.id&&(this.preference=L),this.publish())}}overrideTokens(e,t){const r={seq:this.overrideSeq++,tokens:de(e,t)};return this.overrides.set(e,r),this.publish(),()=>{this.overrides.get(e)===r&&(this.overrides.delete(e),this.publish())}}buildSnapshot(){const e=this.preference==="system"?this.media?.matches===!0?"dark":"light":this.preference,t=this.themes.find(r=>r.id===e);if(t===void 0)throw new Error(`theme registry lost "${e}"`);return Object.freeze({preference:this.preference,active:this.composeActive(t),themes:Object.freeze([...this.themes]),revision:this.revision})}composeActive(e){if(this.overrides.size===0)return e;const t={...e.tokens};for(const r of[...this.overrides.values()].sort((n,i)=>n.seq-i.seq))for(const[n,i]of Object.entries(r.tokens))t[n]=i[e.colorScheme];return Object.freeze({...e,tokens:Object.freeze(t)})}publish(){this.revision+=1,this.snapshot=this.buildSnapshot(),this.ctx.emit("theme/change",this.snapshot)}};function de(e,t){const r={};for(const[n,i]of Object.entries(t)){if(typeof i=="string")throw new TypeError(`theme override "${n}" from "${e}" is a bare string — pass { light: ${JSON.stringify(i)}, dark: ${JSON.stringify(i)} } (repeat the value when it is the same in both palettes); a single value goes illegible when the user switches color scheme`);if(typeof i!="object"||i===null||typeof i.light!="string"||typeof i.dark!="string")throw new TypeError(`theme override "${n}" from "${e}" must map to a { light, dark } pair of strings — one value per color scheme`);const a=i;r[n]={light:a.light,dark:a.dark}}return r}c(de,"validateOverrides");function G(e){return{name:e,description:"Theme token registered by the current Client composition.",valueType:"CSS value",requiresLightAndDark:!0,...e.startsWith("--")?{cssVariable:e}:{}}}c(G,"dynamicToken");const ye=["slots","locale","connection","remote","settingsScope"];function me(e){const t=new W(e,e.settingsScope.bind({namespace:le}));e.provide("theme",t),e.effect(()=>e.locale.register(M,{zh:ne,en:ie}),"ui-theme: settings row dictionaries");const r=re();let n;const i=c(s=>{n?.sync(s.preference,s.revision)},"sync");e.on("theme/change",i);const a=c(s=>(n=s,i(t.getTheme()),{setTheme:c(f=>{t.setTheme(f)},"setTheme")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"appearance",order:10,store:r,locale:M,inject:a},te))}return c(me,"apply"),x.SETTINGS_NS=M,x.ThemeRuntime=W,x.apply=me,x.inject=ye,j.exports},"factory")});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-client-ui-theme","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-client-ui-theme","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./styles/*":"./lib/styles/*","./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"platform":"web","immediately":true}},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/dsh-client-connection":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-ui-primitives":"^0.0.12","@deepseek-ai/dsh-client-runtime":"^0.0.12","@deepseek-ai/dsh-client-ui-slots":"^0.0.12","@deepseek-ai/dsh-client-ui-settings":"^0.0.12","@deepseek-ai/dsh-api-remotes":"^0.0.12","@deepseek-ai/dsh-client-locale":"^0.0.12","@deepseek-ai/dsh-host-webserver":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12"},"dependencies":{"clsx":"^2.0.0","@deepseek-ai/dsh-settings":"^0.0.12","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var vt=Object.defineProperty;var l=(C,W)=>vt(C,"name",{value:W,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-tool",factory:l(C=>{var W={exports:{}},R=W.exports;Object.defineProperty(R,Symbol.toStringTag,{value:"Module"});let n=C("react/jsx-runtime"),S=C("react"),d=C("@deepseek-ai/dsh-client-ui-primitives"),we=C("@deepseek-ai/dsh-client-runtime/client");const ge={search:"Search",read:"Read",bash:"Bash",write:"Write",edit:"Edit",code:"Code",others:"Tool call"},_e={bash:"bash",pwsh:"bash",read:"read",web_fetch:"read",web_search:"search",grep:"search",glob:"search",write:"write",edit:"edit",run_code:"code",cordis_package_inspect:"read",cordis_runtime_inspect:"read",cordis_run:"others",cordis_stop:"others",cordis_undefine:"others"},be={cordis_package_inspect:"Inspect",cordis_runtime_inspect:"Inspect",cordis_run:"Run Cordis Plugin",cordis_stop:"Stop Cordis Plugin",cordis_undefine:"Remove Cordis Plugin",pwsh:"Pwsh"};function ke(e){return _e[e]??"others"}l(ke,"classifyTool");function $(e){const t=[];for(const r of e.content)r.type==="text"?t.push(r.text):t.push(JSON.stringify(r,null,2));return t.length===0&&e.error!==void 0&&t.push(`${e.error.name}: ${e.error.code}`),t.join(`
|
|
2
2
|
`)}l($,"resultText");function D(e){try{return JSON.parse(e)}catch{return}}l(D,"parseArgs");function O(e){const t=e.indexOf(`
|
|
3
3
|
`);return t===-1?e:e.slice(0,t)}l(O,"firstLine");function X(e,t){for(const r of t){const o=e[r];if(typeof o=="string"&&o!=="")return o}}l(X,"pickString");const je={bash:["description","command"],read:["path","file_path","url"],search:["query","pattern","url"],write:["path","file_path"],edit:["path","file_path"],code:["description"],others:[]};function ee(e,t){if(t===void 0||t==="")return e;const r=t.replace(/[/\\]+$/,"");return e.startsWith(`${r}/`)||e.startsWith(`${r}\\`)?e.slice(r.length+1):e}l(ee,"relativizeToCwd");function Ce(e,t){const r=D(t);if(typeof r!="object"||r===null)return O(t);const o=r,i=X(o,je[e]);if(i!==void 0)return O(i);for(const s of Object.values(o))if(typeof s=="string"&&s!=="")return O(s);return O(t)}l(Ce,"deriveSummary");const Oe=["path","file_path"],He=new Set(["read","write","edit"]);function Se(e,t){if(!He.has(e))return;const r=D(t);if(typeof r!="object"||r===null)return;const o=X(r,Oe);return o===void 0?void 0:O(o)}l(Se,"deriveFilePath");function Ge(e,t){if(t==="")return null;const r=D(t);if(r===void 0)return t;if(e==="code"&&typeof r=="object"&&r!==null){const o=r.code;if(typeof o=="string"&&o!=="")return o}return JSON.stringify(r,null,2)}l(Ge,"deriveBody");function _(e,t,r){const o=ke(e),i="kind"in t,s=(i?t.call?.argsRaw:t.argsRaw)??"",a=i?t.error?.code==="interrupted"?"stopped":t.isError?"error":"ok":"running",c=s===""?t.callId:ee(Ce(o,s),r),p=be[e],v=o==="others"&&e!==""&&p===void 0?`${e} · ${c}`:c,f=i&&$(t)||null,h=a==="error"&&f!==null?O(f):null;return{variant:o,title:p??ge[o],summary:v,filePath:Se(o,s),body:Ge(o,s),output:f,errorSummary:h,state:a}}l(_,"toolRowModel");function z(e,t){if(!("kind"in e))return null;const r=e.resultView?.card==="read"?e.resultView:null;if(r===null)return null;const o=r.lines.map(i=>({number:i.number,text:i.text}));return{label:r.title??ee(r.path,t),lines:o,totalLines:r.totalLines,lang:r.lang}}l(z,"readCardModel");function te(e){if(!Array.isArray(e)||e.length===0)return null;const t=[];for(const r of e){if(typeof r!="object"||r===null)return null;const{path:o,oldText:i,newText:s}=r;if(typeof o!="string"||i!==null&&typeof i!="string"||typeof s!="string")return null;t.push({path:o,oldText:i,newText:s})}return t}l(te,"narrowDiffs");function F(e){if(!("kind"in e)){const o=e.callView?.card==="diff"?e.callView:null,i=o===null?null:te(o.diffs);return i===null?null:{card:{diffs:i}}}const t=e.resultView?.card==="diff"?e.resultView:null,r=t===null?null:te(t.diffs);return r===null?null:{card:{diffs:r}}}l(F,"diffCardModel");function Ee(e){return Array.isArray(e)&&e.every(t=>typeof t=="object"&&t!==null&&typeof t.path=="string"&&Array.isArray(t.matches)&&t.matches.every(r=>typeof r=="object"&&r!==null&&typeof r.lineNumber=="number"&&typeof r.line=="string"))}l(Ee,"isValidFiles");function Be(e){const t=e.filter(r=>r.type==="text"&&typeof r.text=="string").map(r=>r.text).join(`
|
|
4
|
-
`);return t===""?void 0:t}l(Be,"flattenContent");function V(e){if(!("kind"in e))return null;const t=e.resultView?.card==="search"?e.resultView:null;if(t===null)return null;const r={truncated:t.truncated,total:t.total},o=t.truncated?Be(e.content):void 0;return t.shape==="matches"?Ee(t.files)?{title:t.title,recovery:o,card:{kind:"matches",files:t.files,...r}}:null:t.shape!=="paths"||!Array.isArray(t.paths)||!t.paths.every(i=>typeof i=="string")?null:{title:t.title,recovery:o,card:{kind:"paths",paths:t.paths,...r}}}l(V,"searchCardModel");function P(e){return{signal:l(t=>e("terminal.signal",{signal:t}),"signal"),exitCode:l(t=>e("terminal.exitCode",{code:t}),"exitCode"),running:e("terminal.running"),failed:e("terminal.failed"),done:e("terminal.done"),copy:e("copy"),copied:e("copied"),noOutput:e("terminal.noOutput"),collapseAria:e("terminal.collapseAria"),collapse:e("collapse"),expandAria:l(t=>e("terminal.expandAria",{n:t}),"expandAria"),expand:l(t=>e("terminal.expandRest",{n:t}),"expand")}}l(P,"terminalBlockLabels");function re(e){const{exitCode:t,signal:r,running:o}=e.card;return o!==!0&&(t!==void 0&&t!==0||r!==void 0)}l(re,"terminalFailed");function oe(e,t){return e===void 0||e===""?t:ne(t===void 0||t===""?e:(0,we.resolveWorkspacePath)(t,e))}l(oe,"resolveTerminalCwd");function ne(e){if(!/(?:^|[/\\])\.\.?(?:[/\\]|$)/.test(e))return e;const t=/^[/\\]{2}([^/\\]+)[/\\]+([^/\\]+)/.exec(e);if(t!==null){const[c,p,v]=t,f=`\\\\${String(p)}\\${String(v)}`,h=ie(e.slice(c.length),!0);return h===""?f:`${f}\\${h}`}const r=e.includes("\\")&&!e.includes("/")?"\\":"/",o=/^[/\\]/.test(e),i=/^[A-Za-z]:/.exec(e)?.[0]??"",s=ie(e.slice(i.length),o||i!=="",r),a=o?r:"";return i===""?`${a}${s}`:`${i}${o?a:r}${s}`}l(ne,"normalizeSegments");function ie(e,t,r="/"){const o=[];for(const i of e.split(/[/\\]/))if(!(i===""||i===".")){if(i===".."){o.length>0&&o[o.length-1]!==".."?o.pop():t||o.push(i);continue}o.push(i)}return o.join(r)}l(ie,"collapse");function M(e,t){const r=e.callView?.card==="terminal"?e.callView:null;if(!("kind"in e))return r===null?null:{description:r.description,card:{command:r.title,cwd:oe(r.cwd,t),output:void 0,exitCode:void 0,signal:void 0,running:!0}};const o=e.resultView?.card==="terminal"?e.resultView:null;return o===null?null:{description:r?.description,card:{command:o.title??r?.title??"",cwd:r===null?void 0:oe(r.cwd,t),output:o.output,exitCode:o.exitCode,signal:o.signal,running:!1}}}l(M,"terminalCardModel");function q(e){if(!("kind"in e))return null;const t=e.resultView;return t?.card!=="web"?null:t.kind==="search"?{kind:"search",answer:t.answer,sources:t.sources.map(r=>({url:r.url,title:r.title,snippet:r.snippet,publishedAt:r.publishedAt})),truncated:t.truncated}:t.kind==="fetch"?{kind:"fetch",url:t.url,statusCode:t.statusCode,truncated:t.truncated}:null}l(q,"webCardModel");function ae(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=ae(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}l(ae,"r");function J(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=ae(e))&&(o&&(o+=" "),o+=t);return o}l(J,"clsx");const Te='.i0cOkG_root{flex-direction:column;display:flex}.i0cOkG_row{position:relative;overflow:hidden}.i0cOkG_root[data-state=running] .i0cOkG_row:after{content:"";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite i0cOkG_dsh-tool-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes i0cOkG_dsh-tool-row-sweep{0%{left:-300px}90%,to{left:100%}}.i0cOkG_leading{flex-shrink:0}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_leading,.i0cOkG_root[data-tool^=cordis_] .i0cOkG_title{color:var(--dsw-alias-state-business-primary)}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_title{font-weight:500}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_sep{background:var(--dsw-alias-state-business-primary)}.i0cOkG_chevron{color:var(--dsw-alias-label-secondary)}.i0cOkG_title{font-weight:400}.i0cOkG_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.i0cOkG_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-size:14px;line-height:24px;overflow:hidden}.i0cOkG_summarySuffix{white-space:nowrap;color:var(--dsw-alias-label-tertiary);flex:none;margin-left:4px;font-size:14px;line-height:24px}.i0cOkG_fileLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:inherit;text-align:left;color:var(--dsw-alias-label-secondary);text-decoration:underline;text-decoration-color:var(--dsw-alias-label-quaternary);text-underline-offset:3px;cursor:pointer;background:0 0;border:none;flex:auto;margin:0;padding:0;font-size:14px;line-height:24px;overflow:hidden}.i0cOkG_fileLink:hover{color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}.i0cOkG_errorSummary{color:var(--dsw-alias-state-error-primary)}.i0cOkG_bodyWrap{flex-direction:column;display:flex}.i0cOkG_inspectButton{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.i0cOkG_root:hover .i0cOkG_inspectButton,.i0cOkG_inspectButton:focus-visible{opacity:1}.i0cOkG_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.i0cOkG_bodyScroll{max-height:260px;overflow-y:auto}.i0cOkG_ioCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);border-radius:12px;flex-direction:column;margin:4px 0 4px 4px;display:flex}.i0cOkG_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.i0cOkG_ioSection::-webkit-scrollbar-thumb{background-clip:padding-box;border:2px solid #0000;border-radius:6px}.i0cOkG_ioSection::-webkit-scrollbar-track{margin:6px 0}.i0cOkG_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.i0cOkG_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:1px}.i0cOkG_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.i0cOkG_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.i0cOkG_codeBody,.i0cOkG_terminalBody,.i0cOkG_diffBody,.i0cOkG_readBody,.i0cOkG_searchBody,.i0cOkG_webBody{margin:4px 0 4px 4px}.i0cOkG_searchRecovery{white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary);margin:4px 0 4px 4px}.i0cOkG_codeBody{--dsl-code-block-content-font:var(--dsw-font-markdown-code-block-small)}.i0cOkG_terminalBody{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:1px solid var(--dsw-alias-border-l1)}.i0cOkG_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}',le="@deepseek-ai/dsh-client-ui-tool/ToolRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(le)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=le,e.textContent=Te,document.head.appendChild(e)}var u={title:"i0cOkG_title",root:"i0cOkG_root",terminalBody:"i0cOkG_terminalBody",summary:"i0cOkG_summary",sep:"i0cOkG_sep",inspectButton:"i0cOkG_inspectButton",codeBody:"i0cOkG_codeBody",summarySuffix:"i0cOkG_summarySuffix",bodyScroll:"i0cOkG_bodyScroll",chevron:"i0cOkG_chevron",ioCard:"i0cOkG_ioCard",row:"i0cOkG_row",diffBody:"i0cOkG_diffBody",ioText:"i0cOkG_ioText",leading:"i0cOkG_leading",bodyWrap:"i0cOkG_bodyWrap",ioLabel:"i0cOkG_ioLabel",errorSummary:"i0cOkG_errorSummary",searchBody:"i0cOkG_searchBody",webBody:"i0cOkG_webBody",ioSection:"i0cOkG_ioSection",ioDivider:"i0cOkG_ioDivider",visuallyHidden:"i0cOkG_visuallyHidden","dsh-tool-row-sweep":"i0cOkG_dsh-tool-row-sweep",fileLink:"i0cOkG_fileLink",searchRecovery:"i0cOkG_searchRecovery",readBody:"i0cOkG_readBody"};function We(e,t){switch(e){case"error":return(0,n.jsx)(d.StateDot,{state:"error"});case"stopped":return(0,n.jsx)(d.StateDot,{state:"warning"});default:return t}}l(We,"leadingFor$1");function Ne(e,t){switch(e){case"running":return t("row.running");case"error":return t("row.failed");case"stopped":return t("row.stopped");default:return null}}l(Ne,"stateStatus$1");function k({t:e,variant:t,toolName:r,icon:o,title:i,summary:s,summarySuffix:a,body:c,output:p,errorSummary:v,terminal:f,diff:h,read:G,search:y,web:E,state:b,filePath:H,onOpenFile:N,inspect:I}){const[g,pt]=(0,S.useState)(!1),K=f??null,Q=h??null,U=G??null,B=y??null,Y=E??null,T=p??null,he=c!==null||T!==null||(K??Q??U??B??Y)!==null,mt=g&&he,xe=Ne(b,e),A=b==="error"?v??null:null,Z=A??s,ve=A===null?a??null:null,ft=H!==void 0&&N!==void 0&&A===null,yt=l(()=>{pt(j=>!j)},"toggleExpand"),ht=l(j=>{j.stopPropagation(),H!==void 0&&N?.(H)},"openFile"),xt=l(j=>{(j.key==="Enter"||j.key===" ")&&j.stopPropagation()},"fileLinkKeyDown"),L=t==="code"?null:c;return(0,n.jsxs)("div",{className:u.root,"data-variant":t,"data-tool":r,"data-state":b,children:[xe!==null&&(0,n.jsx)("span",{className:u.visuallyHidden,children:xe}),(0,n.jsx)(d.DisclosureRow,{rowClassName:u.row,leadingClassName:u.leading,titleClassName:u.title,chevronClassName:u.chevron,icon:We(b,o),title:i,open:mt,expandable:he,expandOnRowClick:!0,keepContentWhenOpen:!0,onToggle:yt,collapsedContent:Z!==""&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:u.sep,"aria-hidden":!0}),ft?(0,n.jsx)("button",{type:"button",className:u.fileLink,onClick:ht,onKeyDown:xt,children:Z}):(0,n.jsx)("span",{className:J(u.summary,A!==null&&u.errorSummary),children:Z}),ve!==null&&(0,n.jsx)("span",{className:u.summarySuffix,children:ve})]}),children:(0,n.jsxs)("div",{className:u.bodyWrap,children:[K!==null?(0,n.jsx)(d.TerminalBlock,{...K.card,maxLines:1/0,labels:P(e),className:u.terminalBody}):Q!==null?(0,n.jsx)(d.DiffBlock,{...Q.card,maxLines:8,className:u.diffBody}):U!==null?(0,n.jsx)(d.ReadBlock,{...U,maxLines:8,className:u.readBody}):B!==null?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.SearchBlock,{...B.card,maxLines:8,className:u.searchBody}),B.recovery!==void 0&&(0,n.jsx)("div",{className:u.searchRecovery,children:B.recovery})]}):Y!==null?(0,n.jsx)(d.WebBlock,{...Y,className:u.webBody}):(0,n.jsxs)(n.Fragment,{children:[t==="code"&&c!==null&&(0,n.jsx)("div",{className:u.bodyScroll,children:(0,n.jsx)(d.CodeBlock,{code:c,lang:"typescript",copyLabel:e("copy"),copiedLabel:e("copied"),className:u.codeBody})}),(L!==null||T!==null)&&(0,n.jsxs)("div",{className:u.ioCard,children:[L!==null&&(0,n.jsxs)("div",{className:u.ioSection,children:[(0,n.jsx)("span",{className:u.ioLabel,children:"IN"}),(0,n.jsx)("span",{className:u.ioText,children:L})]}),L!==null&&T!==null&&(0,n.jsx)("span",{className:u.ioDivider,"aria-hidden":!0}),T!==null&&(0,n.jsxs)("div",{className:u.ioSection,children:[(0,n.jsx)("span",{className:u.ioLabel,children:"OUT"}),(0,n.jsx)("span",{className:u.ioText,"data-error":b==="error"||void 0,children:T})]})]})]}),I!==void 0&&(0,n.jsxs)("button",{type:"button",className:u.inspectButton,onClick:I,children:[(0,n.jsx)(d.IconInspectOutline12,{}),"Inspect"]})]})})]})}l(k,"ToolRow");const Ie={search:(0,n.jsx)(d.IconSearchOutline16,{size:14}),read:(0,n.jsx)(d.IconBrowseOutline16,{size:14}),bash:(0,n.jsx)(d.IconApiOutline14,{size:14}),write:(0,n.jsx)(d.IconEditOutline16,{size:14}),edit:(0,n.jsx)(d.IconEditOutline16,{size:14}),code:(0,n.jsx)(d.IconCodeOutline16,{size:14}),others:(0,n.jsx)(d.IconSparkle16,{size:14})};function Ae({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=M(t,r),p=z(t,r),v=F(t),f=V(t),h=q(t),G=a.state==="ok"&&c!==null&&re(c)?"error":a.state,y=a.filePath!==void 0;return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:Ie[a.variant],title:a.title,summary:c?.description??f?.title??a.summary,body:y?null:a.body,output:a.output,errorSummary:a.errorSummary,terminal:c,diff:v,read:p,search:f,web:h,state:G,filePath:a.filePath,onOpenFile:y?o:void 0,inspect:i})}l(Ae,"GenericToolCard");const Le=".qLcl5a_callRow{border-radius:6px}.qLcl5a_subCalls{border-left:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:4px;margin:4px 0 2px 22px;padding-left:8px;display:flex}",se="@deepseek-ai/dsh-client-ui-tool/ToolCallTree.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(se)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=se,e.textContent=Le,document.head.appendChild(e)}var ce={callRow:"qLcl5a_callRow",subCalls:"qLcl5a_subCalls"};function Re(e){return"kind"in e?e.call?.name??"":e.name}l(Re,"callName");const $e=(0,S.memo)(l(function({renderSlot:t,callId:r,toolName:o,block:i,openFile:s,selected:a,cwd:c,inspectCall:p,t:v,children:f}){const h=(0,S.useMemo)(()=>({callId:r,toolName:o,block:i,openFile:s,cwd:c,inspect:l(()=>{p(r)},"inspect")}),[r,o,i,s,c,p]);return(0,n.jsxs)("div",{className:ce.callRow,"data-chat-anchor-key":`call:${r}`,"data-chat-call-id":r,"data-selected":a||void 0,children:[t("tool.call.toolview",h,{entryKey:o,fallback:(0,n.jsx)(Ae,{...h,t:v})}),f]})},"ToolCall")),De=(0,S.memo)(l(function e({renderSlot:t,block:r,selectedCallId:o,cwd:i,openFile:s,inspectCall:a,t:c}){return(0,n.jsx)($e,{renderSlot:t,callId:r.callId,toolName:Re(r),block:r,openFile:s,selected:r.callId===o,cwd:i,inspectCall:a,t:c,children:r.subCalls.length>0?(0,n.jsx)("div",{className:ce.subCalls,"data-subcalls":!0,children:r.subCalls.map(p=>(0,n.jsx)(e,{renderSlot:t,block:p,selectedCallId:o,cwd:i,openFile:s,inspectCall:a,t:c},p.callId))}):null})},"ToolCallBranch"));function ze({renderSlot:e,node:t,selectedCallId:r,cwd:o,openFile:i,inspectCall:s,t:a}){const c=t.data.root;return(0,n.jsx)(De,{renderSlot:e,block:c,selectedCallId:r,cwd:o,openFile:i,inspectCall:s,t:a})}l(ze,"ToolCallTree");const Fe=".HlHH-G_description{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:0 0 6px}.HlHH-G_cardBody{margin:0}.HlHH-G_recovery{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);margin:6px 0 0}.HlHH-G_code{background:var(--dsw-alias-markdown-code-block);font-family:var(--ds-font-family-code);color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;border-radius:12px;margin:0;padding:16px;font-size:13px;line-height:22px}.HlHH-G_code[data-error]{color:var(--dsw-alias-state-error-primary)}.HlHH-G_read,.HlHH-G_web{margin:0}.HlHH-G_empty{color:var(--dsw-alias-label-tertiary);padding:8px 0;font-size:13px;line-height:20px}",de="@deepseek-ai/dsh-client-ui-tool/ToolDetails.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(de)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=de,e.textContent=Fe,document.head.appendChild(e)}var w={description:"HlHH-G_description",read:"HlHH-G_read",web:"HlHH-G_web",empty:"HlHH-G_empty",recovery:"HlHH-G_recovery",code:"HlHH-G_code",cardBody:"HlHH-G_cardBody"};function Ve({block:e,cwd:t,t:r}){const o=M(e,t);if(o!==null)return(0,n.jsxs)(n.Fragment,{children:[o.description!==void 0?(0,n.jsx)("div",{className:w.description,children:o.description}):null,(0,n.jsx)(d.TerminalBlock,{...o.card,labels:P(r),className:w.cardBody})]});const i=z(e,t);if(i!==null)return(0,n.jsx)(d.ReadBlock,{...i,className:w.read});const s=F(e);if(s!==null)return(0,n.jsx)(d.DiffBlock,{...s.card,className:w.cardBody});const a=V(e);if(a!==null)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.SearchBlock,{...a.card,className:w.cardBody}),a.recovery!==void 0?(0,n.jsx)("div",{className:w.recovery,children:a.recovery}):null]});const c=q(e);if(c!==null){const p="kind"in e?$(e):"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.WebBlock,{...c,className:w.web}),p!==""?(0,n.jsx)("pre",{className:w.code,children:p}):null]})}return"kind"in e?(0,n.jsx)("pre",{className:w.code,"data-error":e.isError||void 0,children:$(e)}):(0,n.jsx)("div",{className:w.empty,children:r("details.running")})}l(Ve,"ToolDetails");const x="conversation";function Pe(e){return typeof e=="object"&&e!==null}l(Pe,"isAnswer");function Me(e,t){let r;try{r=JSON.parse(e)}catch{return null}if(typeof r!="object"||r===null)return null;const o=r.answers;if(!Array.isArray(o)||!o.every(Pe))return null;const i=o.filter(s=>Array.isArray(s.selected)&&s.selected.length>0||typeof s.custom=="string"&&s.custom!=="").length;return t("ask.answered",{answered:i,total:o.length})}l(Me,"answeredSummary");function qe({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s="kind"in t?t.error?.code:void 0;let a=i.summary,c=i.state;return s==="ASK_CANCELLED"?a=o("ask.cancelled"):s==="ASK_ABORTED"?(a=o("ask.interrupted"),c="stopped"):i.state==="running"?a=o("ask.waiting"):"kind"in t&&i.state==="ok"&&(a=Me(t.content.filter(p=>p.type==="text").map(p=>p.text).join(""),o)??i.summary),(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconQuestionOutline14,{}),title:o("ask.rowTitle"),summary:a,body:i.body,output:i.output,state:c,inspect:r})}l(qe,"AskQuestionRow");const Je={name:"ask-question-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"ask_user_question",locale:x},qe))}},Ke='.EuCmHW_card{flex-direction:column;display:flex}.EuCmHW_terminal{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:1px solid var(--dsw-alias-border-l1);margin:4px 0 4px 4px}.EuCmHW_ioCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);border-radius:12px;flex-direction:column;margin:4px 0 4px 4px;display:flex}.EuCmHW_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.EuCmHW_ioSection::-webkit-scrollbar-thumb{background-clip:padding-box;border:2px solid #0000;border-radius:6px}.EuCmHW_ioSection::-webkit-scrollbar-track{margin:6px 0}.EuCmHW_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.EuCmHW_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:1px}.EuCmHW_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.EuCmHW_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.EuCmHW_root[data-expandable]{cursor:pointer}.EuCmHW_root{align-items:center;min-width:0;height:24px;display:flex;position:relative;overflow:hidden}.EuCmHW_root[data-state=running]:after{content:"";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite EuCmHW_dsh-bash-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes EuCmHW_dsh-bash-row-sweep{0%{left:-300px}90%,to{left:100%}}.EuCmHW_leading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex;position:relative}.EuCmHW_chevron{color:var(--dsw-alias-label-secondary)}.EuCmHW_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}.EuCmHW_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}.EuCmHW_root:hover .EuCmHW_iconIdle{opacity:0}.EuCmHW_root:hover .EuCmHW_chevronHover{opacity:1}.EuCmHW_title{color:var(--dsw-alias-label-secondary);flex:none;font-size:14px;line-height:24px}.EuCmHW_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.EuCmHW_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-size:14px;line-height:24px;overflow:hidden}.EuCmHW_errorSummary{color:var(--dsw-alias-state-error-primary)}.EuCmHW_bodyWrap{flex-direction:column;display:flex}.EuCmHW_inspectButton{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.EuCmHW_card:hover .EuCmHW_inspectButton,.EuCmHW_inspectButton:focus-visible{opacity:1}.EuCmHW_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.EuCmHW_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}',ue="@deepseek-ai/dsh-client-ui-tool/bash-sample.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(ue)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=ue,e.textContent=Ke,document.head.appendChild(e)}var m={ioLabel:"EuCmHW_ioLabel",title:"EuCmHW_title",bodyWrap:"EuCmHW_bodyWrap",card:"EuCmHW_card",ioSection:"EuCmHW_ioSection",chevron:"EuCmHW_chevron",errorSummary:"EuCmHW_errorSummary",ioDivider:"EuCmHW_ioDivider",iconIdle:"EuCmHW_iconIdle",leading:"EuCmHW_leading",inspectButton:"EuCmHW_inspectButton",summary:"EuCmHW_summary","dsh-bash-row-sweep":"EuCmHW_dsh-bash-row-sweep",ioText:"EuCmHW_ioText",ioCard:"EuCmHW_ioCard",root:"EuCmHW_root",sep:"EuCmHW_sep",visuallyHidden:"EuCmHW_visuallyHidden",terminal:"EuCmHW_terminal",chevronHover:"EuCmHW_chevronHover"};function pe(e){switch(e){case"error":return(0,n.jsx)(d.StateDot,{state:"error"});case"stopped":return(0,n.jsx)(d.StateDot,{state:"warning"});default:return(0,n.jsx)(d.IconApiOutline14,{size:14})}}l(pe,"leadingFor");function Qe(e,t){switch(e){case"running":return t("bash.running");case"error":return t("bash.failed");case"stopped":return t("bash.stopped");default:return null}}l(Qe,"stateStatus");function Ue({toolName:e,block:t,sessionId:r,useSessions:o,inspect:i,t:s}){const a=_(e,t),c=M(t,o(g=>g.byId[r]?.cwd)),p=a.state==="ok"&&c!==null&&re(c)?"error":a.state,v=Qe(p,s),[f,h]=(0,S.useState)(!1),G=c===null&&a.state==="error"&&(a.body!==null||a.output!==null),y=c!==null||G,E=f&&y,b=a.state==="error"?a.errorSummary:null,H=l(()=>{h(g=>!g)},"toggleExpand"),N=l(g=>{!y||g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),H())},"toggleFromKeyboard"),I=E?(0,n.jsx)(d.IconChevronDownOutline14,{className:m.chevron}):y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:m.iconIdle,children:pe(p)}),(0,n.jsx)(d.IconChevronDownOutline14,{className:J(m.chevron,m.chevronHover)})]}):pe(p);return(0,n.jsxs)("div",{className:m.card,children:[(0,n.jsxs)("div",{className:m.root,"data-sample":"bash","data-variant":"bash","data-state":p,"data-expandable":y||void 0,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-expanded":y?E:void 0,onClick:y?H:void 0,onKeyDown:y?N:void 0,children:[(0,n.jsx)("span",{className:m.leading,children:I}),v!==null&&(0,n.jsx)("span",{className:m.visuallyHidden,children:v}),(0,n.jsx)("span",{className:m.title,children:a.title}),(0,n.jsx)("span",{className:m.sep,"aria-hidden":!0}),(0,n.jsx)("span",{className:J(m.summary,b!==null&&m.errorSummary),children:b??c?.description??a.summary})]}),E&&(0,n.jsxs)("div",{className:m.bodyWrap,children:[c!==null?(0,n.jsx)(d.TerminalBlock,{...c.card,maxLines:1/0,labels:P(s),className:m.terminal}):(0,n.jsxs)("div",{className:m.ioCard,children:[a.body!==null&&(0,n.jsxs)("div",{className:m.ioSection,children:[(0,n.jsx)("span",{className:m.ioLabel,children:"IN"}),(0,n.jsx)("span",{className:m.ioText,children:a.body})]}),a.body!==null&&a.output!==null&&(0,n.jsx)("span",{className:m.ioDivider,"aria-hidden":!0}),a.output!==null&&(0,n.jsxs)("div",{className:m.ioSection,children:[(0,n.jsx)("span",{className:m.ioLabel,children:"OUT"}),(0,n.jsx)("span",{className:m.ioText,"data-error":!0,children:a.output})]})]}),i!==void 0&&(0,n.jsxs)("button",{type:"button",className:m.inspectButton,onClick:i,children:[(0,n.jsx)(d.IconInspectOutline12,{}),"Inspect"]})]})]})}l(Ue,"BashRow");const Ye={name:"bash-toolview-sample",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"bash",locale:x},Ue))}};function me({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=F(t);return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:(0,n.jsx)(d.IconEditOutline16,{size:14}),title:a.title,summary:a.summary,body:null,output:a.output,errorSummary:a.errorSummary,diff:c,state:a.state,filePath:a.filePath,onOpenFile:o,inspect:i})}l(me,"FileMutationRow");const Ze={name:"file-mutation-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"edit",locale:x},me),yield e.slots.register({name:"tool.call.toolview",key:"write",locale:x},me)})}};function Xe({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=z(t,r);return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:(0,n.jsx)(d.IconBrowseOutline16,{size:14}),title:a.title,summary:a.summary,body:null,output:a.output,errorSummary:a.errorSummary,read:c,state:a.state,filePath:a.filePath,onOpenFile:o,inspect:i})}l(Xe,"ReadRow");const et={name:"read-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"read",locale:x},Xe))}},tt={grep:"Grep",glob:"Glob"};function fe({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=V(t);return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconSearchOutline16,{size:14}),title:tt[e]??i.title,summary:s?.title??i.summary,body:null,output:i.output,errorSummary:i.errorSummary,search:s,state:i.state,inspect:r})}l(fe,"SearchRow");const rt={name:"search-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"grep",locale:x},fe),yield e.slots.register({name:"tool.call.toolview",key:"glob",locale:x},fe)})}};function ot(e){const t=e.filter(i=>i.status==="in_progress"),r=t[0]?.content,o=typeof r=="string"&&r.trim()!=="";return{done:e.filter(i=>i.status==="completed").length,total:e.length,activeContent:o?r:null,activeExtra:o?t.length-1:0}}l(ot,"planSummary");function nt(e){return typeof e=="object"&&e!==null}l(nt,"isItem");function it(e,t){let r;try{r=JSON.parse(e)}catch{return null}if(typeof r!="object"||r===null)return null;const o=r.todos;if(!Array.isArray(o)||!o.every(nt))return null;const{done:i,total:s,activeContent:a,activeExtra:c}=ot(o),p=t("todo.completed",{done:i,total:s});return{text:a===null?p:`${p} · ${a}`,extra:c}}l(it,"summarize");function at({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=it(("kind"in t?t.call?.argsRaw:t.argsRaw)??"",o)??{text:i.summary,extra:0};return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconChecklistOutline14,{}),title:o("todo.rowTitle"),summary:s.text,summarySuffix:s.extra>0?`+${s.extra}`:null,body:i.body,output:i.output,errorSummary:i.errorSummary,state:i.state,inspect:r})}l(at,"TodoRow");const lt={name:"todo-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"todo_write",locale:x},at))}},st={web_search:"Search",web_fetch:"Fetch"};function ye({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=q(t),a=e==="web_fetch"?(0,n.jsx)(d.IconBrowseOutline16,{size:14}):(0,n.jsx)(d.IconGlobeOutline14,{size:14});return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:a,title:st[e]??i.title,summary:i.summary,body:null,output:i.output,errorSummary:i.errorSummary,web:s,state:i.state,inspect:r})}l(ye,"WebRow");const ct={name:"web-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"web_search",locale:x},ye),yield e.slots.register({name:"tool.call.toolview",key:"web_fetch",locale:x},ye)})}},dt=["slots"];function ut(e){e.slots.inject("conversation.chat.node",()=>e.slots.register({name:"conversation.chat.node",key:"tool-call",locale:x,children:{"tool.call.toolview":{kind:"keyed",scope:"session"}}},ze)),e.slots.inject("conversation.details.tool",()=>e.slots.register({name:"conversation.details.tool",locale:x},Ve)),e.plugin(Ye),e.plugin(et),e.plugin(Ze),e.plugin(rt),e.plugin(ct),e.plugin(lt),e.plugin(Je)}return l(ut,"apply"),R.apply=ut,R.inject=dt,W.exports},"factory")});
|
|
4
|
+
`);return t===""?void 0:t}l(Be,"flattenContent");function V(e){if(!("kind"in e))return null;const t=e.resultView?.card==="search"?e.resultView:null;if(t===null)return null;const r={truncated:t.truncated,total:t.total},o=t.truncated?Be(e.content):void 0;return t.shape==="matches"?Ee(t.files)?{title:t.title,recovery:o,card:{kind:"matches",files:t.files,...r}}:null:t.shape!=="paths"||!Array.isArray(t.paths)||!t.paths.every(i=>typeof i=="string")?null:{title:t.title,recovery:o,card:{kind:"paths",paths:t.paths,...r}}}l(V,"searchCardModel");function P(e){return{signal:l(t=>e("terminal.signal",{signal:t}),"signal"),exitCode:l(t=>e("terminal.exitCode",{code:t}),"exitCode"),running:e("terminal.running"),failed:e("terminal.failed"),done:e("terminal.done"),copy:e("copy"),copied:e("copied"),noOutput:e("terminal.noOutput"),collapseAria:e("terminal.collapseAria"),collapse:e("collapse"),expandAria:l(t=>e("terminal.expandAria",{n:t}),"expandAria"),expand:l(t=>e("terminal.expandRest",{n:t}),"expand")}}l(P,"terminalBlockLabels");function re(e){const{exitCode:t,signal:r,running:o}=e.card;return o!==!0&&(t!==void 0&&t!==0||r!==void 0)}l(re,"terminalFailed");function oe(e,t){return e===void 0||e===""?t:ne(t===void 0||t===""?e:(0,we.resolveWorkspacePath)(t,e))}l(oe,"resolveTerminalCwd");function ne(e){if(!/(?:^|[/\\])\.\.?(?:[/\\]|$)/.test(e))return e;const t=/^[/\\]{2}([^/\\]+)[/\\]+([^/\\]+)/.exec(e);if(t!==null){const[c,p,v]=t,f=`\\\\${String(p)}\\${String(v)}`,h=ie(e.slice(c.length),!0);return h===""?f:`${f}\\${h}`}const r=e.includes("\\")&&!e.includes("/")?"\\":"/",o=/^[/\\]/.test(e),i=/^[A-Za-z]:/.exec(e)?.[0]??"",s=ie(e.slice(i.length),o||i!=="",r),a=o?r:"";return i===""?`${a}${s}`:`${i}${o?a:r}${s}`}l(ne,"normalizeSegments");function ie(e,t,r="/"){const o=[];for(const i of e.split(/[/\\]/))if(!(i===""||i===".")){if(i===".."){o.length>0&&o[o.length-1]!==".."?o.pop():t||o.push(i);continue}o.push(i)}return o.join(r)}l(ie,"collapse");function M(e,t){const r=e.callView?.card==="terminal"?e.callView:null;if(!("kind"in e))return r===null?null:{description:r.description,card:{command:r.title,cwd:oe(r.cwd,t),output:void 0,exitCode:void 0,signal:void 0,running:!0}};const o=e.resultView?.card==="terminal"?e.resultView:null;return o===null?null:{description:r?.description,card:{command:o.title??r?.title??"",cwd:r===null?void 0:oe(r.cwd,t),output:o.output,exitCode:o.exitCode,signal:o.signal,running:!1}}}l(M,"terminalCardModel");function q(e){if(!("kind"in e))return null;const t=e.resultView;return t?.card!=="web"?null:t.kind==="search"?{kind:"search",answer:t.answer,sources:t.sources.map(r=>({url:r.url,title:r.title,snippet:r.snippet,publishedAt:r.publishedAt})),truncated:t.truncated}:t.kind==="fetch"?{kind:"fetch",url:t.url,statusCode:t.statusCode,truncated:t.truncated}:null}l(q,"webCardModel");function ae(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=ae(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}l(ae,"r");function J(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=ae(e))&&(o&&(o+=" "),o+=t);return o}l(J,"clsx");const Te='.i0cOkG_root{flex-direction:column;display:flex}.i0cOkG_row{position:relative;overflow:hidden}.i0cOkG_root[data-state=running] .i0cOkG_row:after{content:"";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite i0cOkG_dsh-tool-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes i0cOkG_dsh-tool-row-sweep{0%{left:-300px}90%,to{left:100%}}.i0cOkG_leading{flex-shrink:0}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_leading,.i0cOkG_root[data-tool^=cordis_] .i0cOkG_title{color:var(--dsw-alias-state-business-primary)}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_title{font-weight:500}.i0cOkG_root[data-tool^=cordis_] .i0cOkG_sep{background:var(--dsw-alias-state-business-primary)}.i0cOkG_chevron{color:var(--dsw-alias-label-secondary)}.i0cOkG_title{font-weight:400}.i0cOkG_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.i0cOkG_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-size:14px;line-height:24px;overflow:hidden}.i0cOkG_summarySuffix{white-space:nowrap;color:var(--dsw-alias-label-tertiary);flex:none;margin-left:4px;font-size:14px;line-height:24px}.i0cOkG_fileLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:inherit;text-align:left;color:var(--dsw-alias-label-secondary);text-decoration:underline;text-decoration-color:var(--dsw-alias-label-quaternary);text-underline-offset:3px;cursor:pointer;background:0 0;border:none;flex:auto;margin:0;padding:0;font-size:14px;line-height:24px;overflow:hidden}.i0cOkG_fileLink:hover{color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}.i0cOkG_errorSummary{color:var(--dsw-alias-state-error-primary)}.i0cOkG_bodyWrap{flex-direction:column;display:flex}.i0cOkG_inspectButton{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.i0cOkG_root:hover .i0cOkG_inspectButton,.i0cOkG_inspectButton:focus-visible{opacity:1}.i0cOkG_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.i0cOkG_bodyScroll{max-height:260px;overflow-y:auto}.i0cOkG_ioCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);border-radius:12px;flex-direction:column;margin:4px 0 4px 4px;display:flex}.i0cOkG_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.i0cOkG_ioSection::-webkit-scrollbar-thumb{background-clip:padding-box;border:2px solid #0000;border-radius:6px}.i0cOkG_ioSection::-webkit-scrollbar-track{margin:6px 0}.i0cOkG_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.i0cOkG_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:1px}.i0cOkG_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.i0cOkG_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.i0cOkG_codeBody,.i0cOkG_terminalBody,.i0cOkG_diffBody,.i0cOkG_readBody,.i0cOkG_searchBody,.i0cOkG_webBody{margin:4px 0 4px 4px}.i0cOkG_searchRecovery{white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary);margin:4px 0 4px 4px}.i0cOkG_codeBody{--dsl-code-block-content-font:var(--dsw-font-markdown-code-block-small)}.i0cOkG_terminalBody{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:1px solid var(--dsw-alias-border-l1)}.i0cOkG_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}',le="@deepseek-ai/dsh-client-ui-tool/ToolRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(le)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=le,e.textContent=Te,document.head.appendChild(e)}var u={webBody:"i0cOkG_webBody",row:"i0cOkG_row",inspectButton:"i0cOkG_inspectButton",summarySuffix:"i0cOkG_summarySuffix",bodyScroll:"i0cOkG_bodyScroll",readBody:"i0cOkG_readBody",searchRecovery:"i0cOkG_searchRecovery",summary:"i0cOkG_summary",bodyWrap:"i0cOkG_bodyWrap",ioText:"i0cOkG_ioText",visuallyHidden:"i0cOkG_visuallyHidden",title:"i0cOkG_title",ioCard:"i0cOkG_ioCard",chevron:"i0cOkG_chevron",leading:"i0cOkG_leading",ioLabel:"i0cOkG_ioLabel",root:"i0cOkG_root","dsh-tool-row-sweep":"i0cOkG_dsh-tool-row-sweep",fileLink:"i0cOkG_fileLink",errorSummary:"i0cOkG_errorSummary",ioDivider:"i0cOkG_ioDivider",codeBody:"i0cOkG_codeBody",sep:"i0cOkG_sep",ioSection:"i0cOkG_ioSection",terminalBody:"i0cOkG_terminalBody",diffBody:"i0cOkG_diffBody",searchBody:"i0cOkG_searchBody"};function We(e,t){switch(e){case"error":return(0,n.jsx)(d.StateDot,{state:"error"});case"stopped":return(0,n.jsx)(d.StateDot,{state:"warning"});default:return t}}l(We,"leadingFor$1");function Ne(e,t){switch(e){case"running":return t("row.running");case"error":return t("row.failed");case"stopped":return t("row.stopped");default:return null}}l(Ne,"stateStatus$1");function k({t:e,variant:t,toolName:r,icon:o,title:i,summary:s,summarySuffix:a,body:c,output:p,errorSummary:v,terminal:f,diff:h,read:G,search:y,web:E,state:b,filePath:H,onOpenFile:N,inspect:I}){const[g,pt]=(0,S.useState)(!1),K=f??null,Q=h??null,U=G??null,B=y??null,Y=E??null,T=p??null,he=c!==null||T!==null||(K??Q??U??B??Y)!==null,mt=g&&he,xe=Ne(b,e),A=b==="error"?v??null:null,Z=A??s,ve=A===null?a??null:null,ft=H!==void 0&&N!==void 0&&A===null,yt=l(()=>{pt(j=>!j)},"toggleExpand"),ht=l(j=>{j.stopPropagation(),H!==void 0&&N?.(H)},"openFile"),xt=l(j=>{(j.key==="Enter"||j.key===" ")&&j.stopPropagation()},"fileLinkKeyDown"),L=t==="code"?null:c;return(0,n.jsxs)("div",{className:u.root,"data-variant":t,"data-tool":r,"data-state":b,children:[xe!==null&&(0,n.jsx)("span",{className:u.visuallyHidden,children:xe}),(0,n.jsx)(d.DisclosureRow,{rowClassName:u.row,leadingClassName:u.leading,titleClassName:u.title,chevronClassName:u.chevron,icon:We(b,o),title:i,open:mt,expandable:he,expandOnRowClick:!0,keepContentWhenOpen:!0,onToggle:yt,collapsedContent:Z!==""&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:u.sep,"aria-hidden":!0}),ft?(0,n.jsx)("button",{type:"button",className:u.fileLink,onClick:ht,onKeyDown:xt,children:Z}):(0,n.jsx)("span",{className:J(u.summary,A!==null&&u.errorSummary),children:Z}),ve!==null&&(0,n.jsx)("span",{className:u.summarySuffix,children:ve})]}),children:(0,n.jsxs)("div",{className:u.bodyWrap,children:[K!==null?(0,n.jsx)(d.TerminalBlock,{...K.card,maxLines:1/0,labels:P(e),className:u.terminalBody}):Q!==null?(0,n.jsx)(d.DiffBlock,{...Q.card,maxLines:8,className:u.diffBody}):U!==null?(0,n.jsx)(d.ReadBlock,{...U,maxLines:8,className:u.readBody}):B!==null?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.SearchBlock,{...B.card,maxLines:8,className:u.searchBody}),B.recovery!==void 0&&(0,n.jsx)("div",{className:u.searchRecovery,children:B.recovery})]}):Y!==null?(0,n.jsx)(d.WebBlock,{...Y,className:u.webBody}):(0,n.jsxs)(n.Fragment,{children:[t==="code"&&c!==null&&(0,n.jsx)("div",{className:u.bodyScroll,children:(0,n.jsx)(d.CodeBlock,{code:c,lang:"typescript",copyLabel:e("copy"),copiedLabel:e("copied"),className:u.codeBody})}),(L!==null||T!==null)&&(0,n.jsxs)("div",{className:u.ioCard,children:[L!==null&&(0,n.jsxs)("div",{className:u.ioSection,children:[(0,n.jsx)("span",{className:u.ioLabel,children:"IN"}),(0,n.jsx)("span",{className:u.ioText,children:L})]}),L!==null&&T!==null&&(0,n.jsx)("span",{className:u.ioDivider,"aria-hidden":!0}),T!==null&&(0,n.jsxs)("div",{className:u.ioSection,children:[(0,n.jsx)("span",{className:u.ioLabel,children:"OUT"}),(0,n.jsx)("span",{className:u.ioText,"data-error":b==="error"||void 0,children:T})]})]})]}),I!==void 0&&(0,n.jsxs)("button",{type:"button",className:u.inspectButton,onClick:I,children:[(0,n.jsx)(d.IconInspectOutline12,{}),"Inspect"]})]})})]})}l(k,"ToolRow");const Ie={search:(0,n.jsx)(d.IconSearchOutline16,{size:14}),read:(0,n.jsx)(d.IconBrowseOutline16,{size:14}),bash:(0,n.jsx)(d.IconApiOutline14,{size:14}),write:(0,n.jsx)(d.IconEditOutline16,{size:14}),edit:(0,n.jsx)(d.IconEditOutline16,{size:14}),code:(0,n.jsx)(d.IconCodeOutline16,{size:14}),others:(0,n.jsx)(d.IconSparkle16,{size:14})};function Ae({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=M(t,r),p=z(t,r),v=F(t),f=V(t),h=q(t),G=a.state==="ok"&&c!==null&&re(c)?"error":a.state,y=a.filePath!==void 0;return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:Ie[a.variant],title:a.title,summary:c?.description??f?.title??a.summary,body:y?null:a.body,output:a.output,errorSummary:a.errorSummary,terminal:c,diff:v,read:p,search:f,web:h,state:G,filePath:a.filePath,onOpenFile:y?o:void 0,inspect:i})}l(Ae,"GenericToolCard");const Le=".qLcl5a_callRow{border-radius:6px}.qLcl5a_subCalls{border-left:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:4px;margin:4px 0 2px 22px;padding-left:8px;display:flex}",se="@deepseek-ai/dsh-client-ui-tool/ToolCallTree.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(se)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=se,e.textContent=Le,document.head.appendChild(e)}var ce={subCalls:"qLcl5a_subCalls",callRow:"qLcl5a_callRow"};function Re(e){return"kind"in e?e.call?.name??"":e.name}l(Re,"callName");const $e=(0,S.memo)(l(function({renderSlot:t,callId:r,toolName:o,block:i,openFile:s,selected:a,cwd:c,inspectCall:p,t:v,children:f}){const h=(0,S.useMemo)(()=>({callId:r,toolName:o,block:i,openFile:s,cwd:c,inspect:l(()=>{p(r)},"inspect")}),[r,o,i,s,c,p]);return(0,n.jsxs)("div",{className:ce.callRow,"data-chat-anchor-key":`call:${r}`,"data-chat-call-id":r,"data-selected":a||void 0,children:[t("tool.call.toolview",h,{entryKey:o,fallback:(0,n.jsx)(Ae,{...h,t:v})}),f]})},"ToolCall")),De=(0,S.memo)(l(function e({renderSlot:t,block:r,selectedCallId:o,cwd:i,openFile:s,inspectCall:a,t:c}){return(0,n.jsx)($e,{renderSlot:t,callId:r.callId,toolName:Re(r),block:r,openFile:s,selected:r.callId===o,cwd:i,inspectCall:a,t:c,children:r.subCalls.length>0?(0,n.jsx)("div",{className:ce.subCalls,"data-subcalls":!0,children:r.subCalls.map(p=>(0,n.jsx)(e,{renderSlot:t,block:p,selectedCallId:o,cwd:i,openFile:s,inspectCall:a,t:c},p.callId))}):null})},"ToolCallBranch"));function ze({renderSlot:e,node:t,selectedCallId:r,cwd:o,openFile:i,inspectCall:s,t:a}){const c=t.data.root;return(0,n.jsx)(De,{renderSlot:e,block:c,selectedCallId:r,cwd:o,openFile:i,inspectCall:s,t:a})}l(ze,"ToolCallTree");const Fe=".HlHH-G_description{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:0 0 6px}.HlHH-G_cardBody{margin:0}.HlHH-G_recovery{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);margin:6px 0 0}.HlHH-G_code{background:var(--dsw-alias-markdown-code-block);font-family:var(--ds-font-family-code);color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;border-radius:12px;margin:0;padding:16px;font-size:13px;line-height:22px}.HlHH-G_code[data-error]{color:var(--dsw-alias-state-error-primary)}.HlHH-G_read,.HlHH-G_web{margin:0}.HlHH-G_empty{color:var(--dsw-alias-label-tertiary);padding:8px 0;font-size:13px;line-height:20px}",de="@deepseek-ai/dsh-client-ui-tool/ToolDetails.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(de)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=de,e.textContent=Fe,document.head.appendChild(e)}var w={description:"HlHH-G_description",code:"HlHH-G_code",web:"HlHH-G_web",recovery:"HlHH-G_recovery",cardBody:"HlHH-G_cardBody",read:"HlHH-G_read",empty:"HlHH-G_empty"};function Ve({block:e,cwd:t,t:r}){const o=M(e,t);if(o!==null)return(0,n.jsxs)(n.Fragment,{children:[o.description!==void 0?(0,n.jsx)("div",{className:w.description,children:o.description}):null,(0,n.jsx)(d.TerminalBlock,{...o.card,labels:P(r),className:w.cardBody})]});const i=z(e,t);if(i!==null)return(0,n.jsx)(d.ReadBlock,{...i,className:w.read});const s=F(e);if(s!==null)return(0,n.jsx)(d.DiffBlock,{...s.card,className:w.cardBody});const a=V(e);if(a!==null)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.SearchBlock,{...a.card,className:w.cardBody}),a.recovery!==void 0?(0,n.jsx)("div",{className:w.recovery,children:a.recovery}):null]});const c=q(e);if(c!==null){const p="kind"in e?$(e):"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.WebBlock,{...c,className:w.web}),p!==""?(0,n.jsx)("pre",{className:w.code,children:p}):null]})}return"kind"in e?(0,n.jsx)("pre",{className:w.code,"data-error":e.isError||void 0,children:$(e)}):(0,n.jsx)("div",{className:w.empty,children:r("details.running")})}l(Ve,"ToolDetails");const x="conversation";function Pe(e){return typeof e=="object"&&e!==null}l(Pe,"isAnswer");function Me(e,t){let r;try{r=JSON.parse(e)}catch{return null}if(typeof r!="object"||r===null)return null;const o=r.answers;if(!Array.isArray(o)||!o.every(Pe))return null;const i=o.filter(s=>Array.isArray(s.selected)&&s.selected.length>0||typeof s.custom=="string"&&s.custom!=="").length;return t("ask.answered",{answered:i,total:o.length})}l(Me,"answeredSummary");function qe({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s="kind"in t?t.error?.code:void 0;let a=i.summary,c=i.state;return s==="ASK_CANCELLED"?a=o("ask.cancelled"):s==="ASK_ABORTED"?(a=o("ask.interrupted"),c="stopped"):i.state==="running"?a=o("ask.waiting"):"kind"in t&&i.state==="ok"&&(a=Me(t.content.filter(p=>p.type==="text").map(p=>p.text).join(""),o)??i.summary),(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconQuestionOutline14,{}),title:o("ask.rowTitle"),summary:a,body:i.body,output:i.output,state:c,inspect:r})}l(qe,"AskQuestionRow");const Je={name:"ask-question-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"ask_user_question",locale:x},qe))}},Ke='.EuCmHW_card{flex-direction:column;display:flex}.EuCmHW_terminal{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:1px solid var(--dsw-alias-border-l1);margin:4px 0 4px 4px}.EuCmHW_ioCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);border-radius:12px;flex-direction:column;margin:4px 0 4px 4px;display:flex}.EuCmHW_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.EuCmHW_ioSection::-webkit-scrollbar-thumb{background-clip:padding-box;border:2px solid #0000;border-radius:6px}.EuCmHW_ioSection::-webkit-scrollbar-track{margin:6px 0}.EuCmHW_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.EuCmHW_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:1px}.EuCmHW_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.EuCmHW_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.EuCmHW_root[data-expandable]{cursor:pointer}.EuCmHW_root{align-items:center;min-width:0;height:24px;display:flex;position:relative;overflow:hidden}.EuCmHW_root[data-state=running]:after{content:"";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite EuCmHW_dsh-bash-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes EuCmHW_dsh-bash-row-sweep{0%{left:-300px}90%,to{left:100%}}.EuCmHW_leading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex;position:relative}.EuCmHW_chevron{color:var(--dsw-alias-label-secondary)}.EuCmHW_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}.EuCmHW_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}.EuCmHW_root:hover .EuCmHW_iconIdle{opacity:0}.EuCmHW_root:hover .EuCmHW_chevronHover{opacity:1}.EuCmHW_title{color:var(--dsw-alias-label-secondary);flex:none;font-size:14px;line-height:24px}.EuCmHW_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.EuCmHW_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-size:14px;line-height:24px;overflow:hidden}.EuCmHW_errorSummary{color:var(--dsw-alias-state-error-primary)}.EuCmHW_bodyWrap{flex-direction:column;display:flex}.EuCmHW_inspectButton{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.EuCmHW_card:hover .EuCmHW_inspectButton,.EuCmHW_inspectButton:focus-visible{opacity:1}.EuCmHW_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.EuCmHW_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}',ue="@deepseek-ai/dsh-client-ui-tool/bash-sample.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(ue)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-tool",e.dataset.pluginCss=ue,e.textContent=Ke,document.head.appendChild(e)}var m={iconIdle:"EuCmHW_iconIdle",terminal:"EuCmHW_terminal",title:"EuCmHW_title",summary:"EuCmHW_summary",card:"EuCmHW_card",ioDivider:"EuCmHW_ioDivider",ioLabel:"EuCmHW_ioLabel",ioCard:"EuCmHW_ioCard","dsh-bash-row-sweep":"EuCmHW_dsh-bash-row-sweep",ioText:"EuCmHW_ioText",sep:"EuCmHW_sep",inspectButton:"EuCmHW_inspectButton",errorSummary:"EuCmHW_errorSummary",leading:"EuCmHW_leading",ioSection:"EuCmHW_ioSection",root:"EuCmHW_root",chevronHover:"EuCmHW_chevronHover",chevron:"EuCmHW_chevron",bodyWrap:"EuCmHW_bodyWrap",visuallyHidden:"EuCmHW_visuallyHidden"};function pe(e){switch(e){case"error":return(0,n.jsx)(d.StateDot,{state:"error"});case"stopped":return(0,n.jsx)(d.StateDot,{state:"warning"});default:return(0,n.jsx)(d.IconApiOutline14,{size:14})}}l(pe,"leadingFor");function Qe(e,t){switch(e){case"running":return t("bash.running");case"error":return t("bash.failed");case"stopped":return t("bash.stopped");default:return null}}l(Qe,"stateStatus");function Ue({toolName:e,block:t,sessionId:r,useSessions:o,inspect:i,t:s}){const a=_(e,t),c=M(t,o(g=>g.byId[r]?.cwd)),p=a.state==="ok"&&c!==null&&re(c)?"error":a.state,v=Qe(p,s),[f,h]=(0,S.useState)(!1),G=c===null&&a.state==="error"&&(a.body!==null||a.output!==null),y=c!==null||G,E=f&&y,b=a.state==="error"?a.errorSummary:null,H=l(()=>{h(g=>!g)},"toggleExpand"),N=l(g=>{!y||g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),H())},"toggleFromKeyboard"),I=E?(0,n.jsx)(d.IconChevronDownOutline14,{className:m.chevron}):y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:m.iconIdle,children:pe(p)}),(0,n.jsx)(d.IconChevronDownOutline14,{className:J(m.chevron,m.chevronHover)})]}):pe(p);return(0,n.jsxs)("div",{className:m.card,children:[(0,n.jsxs)("div",{className:m.root,"data-sample":"bash","data-variant":"bash","data-state":p,"data-expandable":y||void 0,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-expanded":y?E:void 0,onClick:y?H:void 0,onKeyDown:y?N:void 0,children:[(0,n.jsx)("span",{className:m.leading,children:I}),v!==null&&(0,n.jsx)("span",{className:m.visuallyHidden,children:v}),(0,n.jsx)("span",{className:m.title,children:a.title}),(0,n.jsx)("span",{className:m.sep,"aria-hidden":!0}),(0,n.jsx)("span",{className:J(m.summary,b!==null&&m.errorSummary),children:b??c?.description??a.summary})]}),E&&(0,n.jsxs)("div",{className:m.bodyWrap,children:[c!==null?(0,n.jsx)(d.TerminalBlock,{...c.card,maxLines:1/0,labels:P(s),className:m.terminal}):(0,n.jsxs)("div",{className:m.ioCard,children:[a.body!==null&&(0,n.jsxs)("div",{className:m.ioSection,children:[(0,n.jsx)("span",{className:m.ioLabel,children:"IN"}),(0,n.jsx)("span",{className:m.ioText,children:a.body})]}),a.body!==null&&a.output!==null&&(0,n.jsx)("span",{className:m.ioDivider,"aria-hidden":!0}),a.output!==null&&(0,n.jsxs)("div",{className:m.ioSection,children:[(0,n.jsx)("span",{className:m.ioLabel,children:"OUT"}),(0,n.jsx)("span",{className:m.ioText,"data-error":!0,children:a.output})]})]}),i!==void 0&&(0,n.jsxs)("button",{type:"button",className:m.inspectButton,onClick:i,children:[(0,n.jsx)(d.IconInspectOutline12,{}),"Inspect"]})]})]})}l(Ue,"BashRow");const Ye={name:"bash-toolview-sample",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"bash",locale:x},Ue))}};function me({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=F(t);return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:(0,n.jsx)(d.IconEditOutline16,{size:14}),title:a.title,summary:a.summary,body:null,output:a.output,errorSummary:a.errorSummary,diff:c,state:a.state,filePath:a.filePath,onOpenFile:o,inspect:i})}l(me,"FileMutationRow");const Ze={name:"file-mutation-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"edit",locale:x},me),yield e.slots.register({name:"tool.call.toolview",key:"write",locale:x},me)})}};function Xe({toolName:e,block:t,cwd:r,openFile:o,inspect:i,t:s}){const a=_(e,t,r),c=z(t,r);return(0,n.jsx)(k,{t:s,variant:a.variant,toolName:e,icon:(0,n.jsx)(d.IconBrowseOutline16,{size:14}),title:a.title,summary:a.summary,body:null,output:a.output,errorSummary:a.errorSummary,read:c,state:a.state,filePath:a.filePath,onOpenFile:o,inspect:i})}l(Xe,"ReadRow");const et={name:"read-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"read",locale:x},Xe))}},tt={grep:"Grep",glob:"Glob"};function fe({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=V(t);return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconSearchOutline16,{size:14}),title:tt[e]??i.title,summary:s?.title??i.summary,body:null,output:i.output,errorSummary:i.errorSummary,search:s,state:i.state,inspect:r})}l(fe,"SearchRow");const rt={name:"search-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"grep",locale:x},fe),yield e.slots.register({name:"tool.call.toolview",key:"glob",locale:x},fe)})}};function ot(e){const t=e.filter(i=>i.status==="in_progress"),r=t[0]?.content,o=typeof r=="string"&&r.trim()!=="";return{done:e.filter(i=>i.status==="completed").length,total:e.length,activeContent:o?r:null,activeExtra:o?t.length-1:0}}l(ot,"planSummary");function nt(e){return typeof e=="object"&&e!==null}l(nt,"isItem");function it(e,t){let r;try{r=JSON.parse(e)}catch{return null}if(typeof r!="object"||r===null)return null;const o=r.todos;if(!Array.isArray(o)||!o.every(nt))return null;const{done:i,total:s,activeContent:a,activeExtra:c}=ot(o),p=t("todo.completed",{done:i,total:s});return{text:a===null?p:`${p} · ${a}`,extra:c}}l(it,"summarize");function at({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=it(("kind"in t?t.call?.argsRaw:t.argsRaw)??"",o)??{text:i.summary,extra:0};return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:(0,n.jsx)(d.IconChecklistOutline14,{}),title:o("todo.rowTitle"),summary:s.text,summarySuffix:s.extra>0?`+${s.extra}`:null,body:i.body,output:i.output,errorSummary:i.errorSummary,state:i.state,inspect:r})}l(at,"TodoRow");const lt={name:"todo-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",()=>e.slots.register({name:"tool.call.toolview",key:"todo_write",locale:x},at))}},st={web_search:"Search",web_fetch:"Fetch"};function ye({toolName:e,block:t,inspect:r,t:o}){const i=_(e,t),s=q(t),a=e==="web_fetch"?(0,n.jsx)(d.IconBrowseOutline16,{size:14}):(0,n.jsx)(d.IconGlobeOutline14,{size:14});return(0,n.jsx)(k,{t:o,variant:i.variant,toolName:e,icon:a,title:st[e]??i.title,summary:i.summary,body:null,output:i.output,errorSummary:i.errorSummary,web:s,state:i.state,inspect:r})}l(ye,"WebRow");const ct={name:"web-toolview",inject:["slots"],apply(e){e.slots.inject("tool.call.toolview",function*(){yield e.slots.register({name:"tool.call.toolview",key:"web_search",locale:x},ye),yield e.slots.register({name:"tool.call.toolview",key:"web_fetch",locale:x},ye)})}},dt=["slots"];function ut(e){e.slots.inject("conversation.chat.node",()=>e.slots.register({name:"conversation.chat.node",key:"tool-call",locale:x,children:{"tool.call.toolview":{kind:"keyed",scope:"session"}}},ze)),e.slots.inject("conversation.details.tool",()=>e.slots.register({name:"conversation.details.tool",locale:x},Ve)),e.plugin(Ye),e.plugin(et),e.plugin(Ze),e.plugin(rt),e.plugin(ct),e.plugin(lt),e.plugin(Je)}return l(ut,"apply"),R.apply=ut,R.inject=dt,W.exports},"factory")});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-client-ui-tool","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-client-ui-tool","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"clsx":"^2.0.0"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-runtime":"^0.0.12","@deepseek-ai/dsh-api-remotes":"^0.0.12","@deepseek-ai/dsh-client-ui-primitives":"^0.0.12","@deepseek-ai/dsh-client-ui-conversation":"^0.0.12","@deepseek-ai/dsh-client-ui-slots":"^0.0.12","@deepseek-ai/dsh-client-locale":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12"}}
|