@qqbrowser/qbot-dsh 0.0.13 → 0.0.15

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.
Files changed (223) hide show
  1. package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +1 -1
  2. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  3. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  4. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  5. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  6. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  7. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  10. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  12. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  15. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  16. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  17. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  19. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  21. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  23. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  25. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  28. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  31. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +7 -7
  33. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  39. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +2 -2
  79. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  89. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  91. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  93. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  95. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +4 -4
  127. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +3 -3
  140. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  222. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  223. package/package.json +1 -1
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-ui-trajectory","version":"0.0.13","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"@tanstack/react-virtual":"^3.14.9","diff":"^9.0.0"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/dsh-agent":"^0.0.13","@deepseek-ai/dsh-client-locale":"^0.0.13","@deepseek-ai/dsh-client-runtime":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-compaction":"^0.0.13","@deepseek-ai/dsh-tools":"^0.0.13","@deepseek-ai/dsh-client-ui-primitives":"^0.0.13"}}
1
+ {"name":"@deepseek-ai/dsh-client-ui-trajectory","version":"0.0.15","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"@tanstack/react-virtual":"^3.14.9","diff":"^9.0.0"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.0.15","@deepseek-ai/dsh-client-locale":"^0.0.15","@deepseek-ai/dsh-tools":"^0.0.15","@deepseek-ai/dsh-client-runtime":"^0.0.15","@deepseek-ai/dsh-compaction":"^0.0.15"}}
@@ -1 +1 @@
1
- var oe=Object.defineProperty;var o=(_,k)=>oe(_,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-user-questions",factory:o(_=>{var k={exports:{}},I=k.exports;Object.defineProperty(I,Symbol.toStringTag,{value:"Module"});let a=_("react/jsx-runtime"),v=_("react"),h=_("@deepseek-ai/dsh-client-ui-primitives");function Z(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var p=e.length;for(t=0;t<p;t++)e[t]&&(n=Z(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}o(Z,"r");function A(){for(var e,t,n=0,r="",p=arguments.length;n<p;n++)(e=arguments[n])&&(t=Z(e))&&(r&&(r+=" "),r+=t);return r}o(A,"clsx");function M(e){if(e.length!==1)return;const t=e[0],n=t.intent;if(n?.kind!=="plan-review"||t.detail===void 0||t.multiSelect===!0)return;const r=t.options??[];if(r.length>2)return;const p=r.find(g=>g.label===n.approve);if(p===void 0)return;const b=r.find(g=>g.label!==n.approve);return{id:t.id,question:t.question,plan:t.detail,approve:p,...b===void 0?{}:{decline:b}}}o(M,"planReviewOf");var z=class{static{o(this,"PendingQuestion")}wait;constructor(e){this.wait=e}get key(){return this.wait.key}get questions(){return this.wait.payload.questions}async answer(e){const t=await this.wait.respond({ok:!0,value:{sessionId:this.wait.sessionId,answer:e}});if(!t.accepted)throw new Error(`question response rejected: ${t.reason}`)}async cancel(){const e=await this.wait.respond({ok:!1,error:{code:"cancelled",message:"the user closed this question request",details:{}}});if(!e.accepted)throw new Error(`question cancellation rejected: ${e.reason}`)}};const F=".xl7ZBq_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.xl7ZBq_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-state-warn-secondary);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:20px;flex-direction:column;display:flex;overflow:hidden}.xl7ZBq_card,.xl7ZBq_card *{box-sizing:border-box}.xl7ZBq_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);flex-shrink:0;align-items:center;gap:8px;padding:10px 16px;font-size:13px;line-height:18px;display:flex}.xl7ZBq_dot{background:var(--dsw-alias-state-warn-primary);border-radius:50%;width:8px;height:8px}.xl7ZBq_body{overscroll-behavior:contain;flex:auto;min-height:0;padding:12px 16px 4px;font-size:14px;line-height:22px;overflow-y:auto}.xl7ZBq_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px 12px;display:flex}.xl7ZBq_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);font-size:11px;line-height:16px}.xl7ZBq_actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.xl7ZBq_discuss{color:var(--dsw-alias-label-secondary);gap:6px}.xl7ZBq_discuss:hover:not(:disabled){color:var(--dsw-alias-label-primary)}@media (width<=720px){.xl7ZBq_card{border-radius:16px}.xl7ZBq_body{padding:10px 12px 4px}.xl7ZBq_footer{align-items:flex-end;padding:8px 12px 10px}}",R="@deepseek-ai/dsh-client-ui-user-questions/PlanReviewPanel.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(R)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-user-questions",e.dataset.pluginCss=R,e.textContent=F,document.head.appendChild(e)}var f={discuss:"xl7ZBq_discuss",feedback:"xl7ZBq_feedback",frame:"xl7ZBq_frame",body:"xl7ZBq_body",footer:"xl7ZBq_footer",strip:"xl7ZBq_strip",dot:"xl7ZBq_dot",card:"xl7ZBq_card",actions:"xl7ZBq_actions"};function E(e){return e===void 0?{}:{title:e}}o(E,"tooltip");function K({pending:e,review:t,t:n}){const[r,p]=(0,v.useState)(!1),[b,g]=(0,v.useState)(null),m=o(u=>{p(!0),g(null),u().catch(d=>{p(!1),g(d instanceof Error?d.message:String(d))})},"settle"),y=o(u=>{m(()=>e.answer({answers:[{id:t.id,selected:[u]}]}))},"decide"),w=t.decline;return(0,a.jsx)("div",{className:f.frame,"data-plan-review-key":e.key,children:(0,a.jsxs)("section",{className:f.card,"aria-label":t.question,children:[(0,a.jsxs)("div",{className:f.strip,children:[(0,a.jsx)("span",{className:f.dot}),n("plan.header")]}),(0,a.jsx)("div",{className:f.body,"data-plan-review-scroll":!0,children:(0,a.jsx)(h.MarkdownText,{text:t.plan})}),(0,a.jsxs)("div",{className:f.footer,children:[(0,a.jsx)("div",{className:f.feedback,role:"status",children:b}),(0,a.jsxs)("div",{className:f.actions,children:[(0,a.jsx)(h.Button,{variant:"ghost",className:f.discuss,icon:(0,a.jsx)(h.IconEditOutline16,{size:14}),disabled:r,onClick:o(()=>{m(()=>e.cancel())},"onClick"),children:n("plan.discuss")}),w!==void 0&&(0,a.jsx)(h.Button,{variant:"outline",...E(w.description),disabled:r,onClick:o(()=>{y(w.label)},"onClick"),children:n("plan.decline")}),(0,a.jsx)(h.Button,{variant:"primary",...E(t.approve.description),disabled:r,onClick:o(()=>{y(t.approve.label)},"onClick"),children:n("plan.approve")})]})]})]})})}o(K,"PlanReviewPanel");const J='.IAaxrq_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.IAaxrq_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:20px;flex-direction:column;padding:0 0 10px;display:flex;overflow:hidden}.IAaxrq_card,.IAaxrq_card *{box-sizing:border-box}.IAaxrq_header{flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 16px 0 24px;display:flex}.IAaxrq_headingBlock{min-width:0}.IAaxrq_eyebrow{color:var(--dsw-alias-label-tertiary);margin-bottom:5px;font-size:11px;line-height:16px}.IAaxrq_title{margin:0;font-size:16px;font-weight:500;line-height:22px}.IAaxrq_detail{margin:0 2px 8px}.IAaxrq_footerActions{flex-shrink:0;align-items:center;gap:12px;display:flex}.IAaxrq_pager{flex-shrink:0;align-items:center;gap:6px;display:flex}.IAaxrq_progress{color:var(--dsw-alias-label-secondary);white-space:nowrap;word-spacing:-2px;padding:0 4px;font-size:14px;font-weight:500;line-height:24px}.IAaxrq_iconButton{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;place-items:center;padding:0;display:grid}.IAaxrq_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.IAaxrq_iconButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}.IAaxrq_body{overscroll-behavior:contain;flex-direction:column;flex:auto;min-height:0;display:flex;overflow-y:auto}.IAaxrq_options{flex-direction:column;gap:1px;margin:8px 0 0;padding:4px 12px;display:flex}.IAaxrq_option{width:100%;min-height:40px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:12px;flex-shrink:0;align-items:flex-start;gap:8px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}.IAaxrq_option:hover:not(:disabled),.IAaxrq_optionSelected{background:var(--dsw-alias-interactive-bg-hover)}.IAaxrq_optionSelected{border-color:var(--dsw-alias-border-l2)}.IAaxrq_option:disabled{cursor:default}.IAaxrq_number{background:var(--dsw-alias-bg-overlay);width:20px;height:20px;color:var(--dsw-alias-label-secondary);border-radius:6px;flex:0 0 20px;place-items:center;margin-top:2px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IAaxrq_checkbox{flex:0 0 20px;place-items:center;width:20px;height:20px;margin-top:2px;display:grid}.IAaxrq_checkbox:before{content:"";border:1px solid var(--dsw-alias-border-l4);border-radius:4px;grid-area:1/1;width:14px;height:14px;transition:background-color .12s,border-color .12s}.IAaxrq_checkbox>svg{grid-area:1/1}.IAaxrq_checkboxChecked{color:var(--dsw-alias-label-primary-foreground)}.IAaxrq_checkboxChecked:before{border-color:var(--dsw-alias-label-primary);background:var(--dsw-alias-label-primary)}.IAaxrq_optionCopy{flex:1;min-width:0}.IAaxrq_optionLine{flex-wrap:wrap;align-items:baseline;gap:2px 6px;display:flex}.IAaxrq_optionLabel{font-size:14px;font-weight:500;line-height:24px}.IAaxrq_badge{background:var(--dsw-specific-sidebar-nav-item-active-accent);color:var(--dsw-alias-button-info-fill);border-radius:6px;padding:0 4px;font-size:11px;font-weight:600;line-height:18px}.IAaxrq_description{color:var(--dsw-alias-label-tertiary);font-size:14px;font-weight:400;line-height:24px}.IAaxrq_customRow{border:1px solid #0000;border-radius:12px;flex-shrink:0;align-items:flex-start;gap:8px;width:100%;min-height:40px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}.IAaxrq_customRow:hover,.IAaxrq_customRow:focus-within,.IAaxrq_customRowActive{background:var(--dsw-alias-interactive-bg-hover)}.IAaxrq_customRow:focus-within,.IAaxrq_customRowActive{border-color:var(--dsw-alias-border-l2)}.IAaxrq_customInput{min-width:0;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font:inherit;background:0 0;border:none;outline:none;flex:1;padding:0;font-size:14px;line-height:24px}.IAaxrq_customInput::placeholder{color:var(--dsw-alias-label-caption)}.IAaxrq_customTextarea{resize:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);min-height:64px;max-height:140px;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font:inherit;border-radius:10px;outline:none;flex-shrink:0;margin:0 12px;padding:8px 12px;font-size:14px;line-height:24px;display:block}.IAaxrq_customTextarea:focus{border-color:var(--dsw-alias-state-business-primary)}.IAaxrq_customTextarea::placeholder{color:var(--dsw-alias-label-caption)}.IAaxrq_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:0 10px 0 18px;display:flex}.IAaxrq_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);text-align:right;flex:1;font-size:11px;line-height:16px}@media (width<=720px){.IAaxrq_card{border-radius:16px}.IAaxrq_header{padding:10px 12px 0 18px}.IAaxrq_options{padding:4px 8px}.IAaxrq_title{font-size:15px;line-height:21px}.IAaxrq_option,.IAaxrq_customRow{padding:8px 6px}.IAaxrq_footer{align-items:flex-end;padding:0 10px}.IAaxrq_footerActions{flex-shrink:0}}@media (prefers-reduced-motion:reduce){.IAaxrq_option,.IAaxrq_customRow{transition:none}}',P="@deepseek-ai/dsh-client-ui-user-questions/QuestionComposer.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-user-questions",e.dataset.pluginCss=P,e.textContent=J,document.head.appendChild(e)}var i={options:"IAaxrq_options",optionSelected:"IAaxrq_optionSelected",progress:"IAaxrq_progress",headingBlock:"IAaxrq_headingBlock",optionLine:"IAaxrq_optionLine",header:"IAaxrq_header",title:"IAaxrq_title",feedback:"IAaxrq_feedback",frame:"IAaxrq_frame",badge:"IAaxrq_badge",detail:"IAaxrq_detail",checkboxChecked:"IAaxrq_checkboxChecked",pager:"IAaxrq_pager",customTextarea:"IAaxrq_customTextarea",customRow:"IAaxrq_customRow",description:"IAaxrq_description",optionCopy:"IAaxrq_optionCopy",option:"IAaxrq_option",card:"IAaxrq_card",iconButton:"IAaxrq_iconButton",customInput:"IAaxrq_customInput",number:"IAaxrq_number",body:"IAaxrq_body",customRowActive:"IAaxrq_customRowActive",footerActions:"IAaxrq_footerActions",checkbox:"IAaxrq_checkbox",footer:"IAaxrq_footer",eyebrow:"IAaxrq_eyebrow",optionLabel:"IAaxrq_optionLabel"};function G(e){const t=/\s*(?:\((?:recommended|推荐)\)|((?:recommended|推荐)))\s*$/i;return t.test(e)?{label:e.replace(t,""),recommended:!0}:{label:e,recommended:!1}}o(G,"parseRecommendedLabel");function H(e){return e.nativeEvent.isComposing||e.nativeEvent.keyCode===229}o(H,"isComposing");function U(e){const t=(0,v.useMemo)(()=>new z(e.matched),[e.matched]),n=(0,v.useMemo)(()=>M(t.questions),[t]);return n===void 0?(0,a.jsx)(V,{pending:t,t:e.t},t.key):(0,a.jsx)(K,{pending:t,review:n,t:e.t},t.key)}o(U,"QuestionComposer");function V({pending:e,t}){const n=e.questions,[r,p]=(0,v.useState)(0),[b,g]=(0,v.useState)(()=>n.map(()=>({selected:[],custom:"",skipped:!1}))),[m,y]=(0,v.useState)(null),[w,u]=(0,v.useState)(null),d=n[r],q=b[r],te=(d.options?.length??0)>0,se=o(()=>{y("cancel"),u(null),e.cancel().catch(s=>{y(null),u({text:s instanceof Error?s.message:String(s)})})},"cancelFlow"),L=o(s=>{g(l=>l.map((x,c)=>c===r?s(x):x)),u(null)},"updateDraft"),re=o(s=>{L(l=>{if(d.multiSelect===!0){const x=l.selected.includes(s)?l.selected.filter(c=>c!==s):[...l.selected,s];return{...l,selected:x,skipped:!1}}return{selected:[s],custom:"",skipped:!1}}),d.multiSelect!==!0&&r<n.length-1&&p(l=>l+1)},"choose"),N=o(s=>s.selected.length>0||s.custom.trim()!=="","answered"),$=o(s=>N(s)||s.skipped,"completed"),B=o(s=>{const l=s.findIndex(c=>!$(c));if(l>=0){p(l),u({key:"error.incomplete"});return}const x={answers:n.map((c,j)=>{const C=s[j];if(C.skipped)return{id:c.id,selected:[]};const S=C.custom.trim();return{id:c.id,selected:S===""||c.multiSelect===!0?C.selected:[],...S===""?{}:{custom:S}}})};y("answer"),u(null),e.answer(x).catch(c=>{y(null),u({text:c instanceof Error?c.message:String(c)})})},"submitDrafts"),D=o(()=>{if(!N(q)){u({key:"error.unanswered"});return}if(r<n.length-1){p(s=>s+1),u(null);return}B(b)},"continueFlow"),T=o(s=>{const l=s.target.value;L(x=>({...x,selected:d.multiSelect===!0?x.selected:[],custom:l,skipped:!1}))},"draftCustom"),Q=o(s=>{s.key!=="Enter"||s.shiftKey||H(s)||(s.preventDefault(),D())},"continueFromCustom"),ie=o(()=>{const s=b.map((l,x)=>x===r?{selected:[],custom:"",skipped:!0}:l);if(g(s),u(null),r<n.length-1){p(l=>l+1);return}B(s)},"skipQuestion");return(0,a.jsx)("div",{className:i.frame,"data-question-key":e.key,children:(0,a.jsxs)("section",{className:i.card,"aria-labelledby":`question-${e.key}-${String(r)}`,children:[(0,a.jsxs)("header",{className:i.header,children:[(0,a.jsxs)("div",{className:i.headingBlock,children:[d.header!==void 0&&(0,a.jsx)("div",{className:i.eyebrow,children:d.header}),(0,a.jsx)("h2",{className:i.title,id:`question-${e.key}-${String(r)}`,children:d.question})]}),(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.cancel"),title:t("nav.cancel"),disabled:m!==null,onClick:se,children:(0,a.jsx)(h.IconCloseOutline16,{})})]}),(0,a.jsxs)("div",{className:i.body,"data-question-scroll":!0,children:[d.detail!==void 0&&(0,a.jsx)("div",{className:i.detail,children:(0,a.jsx)(h.MarkdownText,{text:d.detail})}),(0,a.jsxs)("div",{className:i.options,role:d.multiSelect===!0?"group":"radiogroup",children:[(d.options??[]).map((s,l)=>{const x=q.selected.includes(s.label),c=G(s.label);return(0,a.jsxs)("button",{type:"button",className:A(i.option,x&&d.multiSelect!==!0&&i.optionSelected),role:d.multiSelect===!0?"checkbox":"radio","aria-checked":x,"aria-label":c.label,disabled:m!==null,onClick:o(()=>{re(s.label)},"onClick"),onKeyDown:o(j=>{j.key!=="Enter"||!b.every($)||(j.preventDefault(),B(b))},"onKeyDown"),children:[d.multiSelect===!0?(0,a.jsx)("span",{className:A(i.checkbox,x&&i.checkboxChecked),"aria-hidden":"true",children:x&&(0,a.jsx)(h.IconCheckOutline14,{size:12})}):(0,a.jsx)("span",{className:i.number,children:l+1}),(0,a.jsx)("span",{className:i.optionCopy,children:(0,a.jsxs)("span",{className:i.optionLine,children:[(0,a.jsx)("span",{className:i.optionLabel,children:c.label}),c.recommended&&(0,a.jsx)("span",{className:i.badge,children:t("option.recommended")}),s.description!==void 0&&(0,a.jsx)("span",{className:i.description,children:s.description})]})})]},`${s.label}-${String(l)}`)}),te?(0,a.jsxs)("div",{className:A(i.customRow,q.custom!==""&&i.customRowActive),children:[d.multiSelect===!0?(0,a.jsx)("span",{className:A(i.checkbox,q.custom!==""&&i.checkboxChecked),"aria-hidden":"true",children:q.custom!==""&&(0,a.jsx)(h.IconCheckOutline14,{size:12})}):(0,a.jsx)("span",{className:i.number,"aria-hidden":"true",children:(0,a.jsx)(h.IconEditOutline16,{size:12})}),(0,a.jsx)("input",{type:"text",className:i.customInput,value:q.custom,disabled:m!==null,placeholder:t("custom.placeholder"),onChange:T,onKeyDown:Q})]}):(0,a.jsx)("textarea",{autoFocus:!0,className:i.customTextarea,value:q.custom,disabled:m!==null,rows:2,placeholder:t("custom.placeholder"),onChange:T,onKeyDown:Q})]})]}),(0,a.jsxs)("footer",{className:i.footer,children:[(0,a.jsxs)("div",{className:i.pager,children:[(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.prev"),disabled:r===0||m!==null,onClick:o(()=>{p(r-1),u(null)},"onClick"),children:(0,a.jsx)(h.IconChevronLeftOutline14,{})}),(0,a.jsxs)("span",{className:i.progress,children:[r+1," / ",n.length]}),(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.next"),disabled:r===n.length-1||m!==null,onClick:o(()=>{p(r+1),u(null)},"onClick"),children:(0,a.jsx)(h.IconChevronRightOutline14,{})})]}),(0,a.jsx)("div",{className:i.feedback,role:"status",children:w===null?null:"key"in w?t(w.key):w.text}),(0,a.jsxs)("div",{className:i.footerActions,children:[(0,a.jsx)(h.Button,{variant:"outline",disabled:m!==null,onClick:ie,children:t("action.skip")}),(0,a.jsx)(h.Button,{variant:"primary",disabled:m!==null||!N(q),onClick:D,children:m==="answer"?t("submitting"):r===n.length-1?t("submit"):t("action.next")})]})]})]})})}o(V,"QuestionFlow");const W={"error.incomplete":"请先完成这道问题。","error.unanswered":"请选择一个选项或填写自定义答案。","nav.prev":"上一题","nav.next":"下一题","nav.cancel":"放弃整组问题","option.recommended":"推荐","custom.placeholder":"输入你的答案","action.skip":"跳过本题","action.next":"下一题","plan.header":"计划待审","plan.approve":"确认执行","plan.decline":"拒绝","plan.discuss":"去聊天里说"},X={"error.incomplete":"Please complete this question first.","error.unanswered":"Please select an option or enter a custom answer.","nav.prev":"Previous question","nav.next":"Next question","nav.cancel":"Dismiss all questions","option.recommended":"Recommended","custom.placeholder":"Type your answer","action.skip":"Skip this question","action.next":"Next","plan.header":"Plan review","plan.approve":"Approve","plan.decline":"Refuse","plan.discuss":"Chat about it"},O="question",Y=["slots","locale"];function ee({interactions:e}){return e.find(t=>t.kind==="question")??null}o(ee,"selectQuestion");function ae(e){e.effect(()=>e.locale.register(O,{zh:W,en:X}),"ui-user-questions: dictionaries"),e.slots.inject("conversation.composer",()=>e.slots.register({name:"conversation.composer",select:ee,locale:O},U))}return o(ae,"apply"),I.PendingQuestion=z,I.apply=ae,I.inject=Y,k.exports},"factory")});
1
+ var oe=Object.defineProperty;var o=(_,k)=>oe(_,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-user-questions",factory:o(_=>{var k={exports:{}},I=k.exports;Object.defineProperty(I,Symbol.toStringTag,{value:"Module"});let a=_("react/jsx-runtime"),v=_("react"),h=_("@deepseek-ai/dsh-client-ui-primitives");function Z(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var p=e.length;for(t=0;t<p;t++)e[t]&&(n=Z(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}o(Z,"r");function A(){for(var e,t,n=0,r="",p=arguments.length;n<p;n++)(e=arguments[n])&&(t=Z(e))&&(r&&(r+=" "),r+=t);return r}o(A,"clsx");function M(e){if(e.length!==1)return;const t=e[0],n=t.intent;if(n?.kind!=="plan-review"||t.detail===void 0||t.multiSelect===!0)return;const r=t.options??[];if(r.length>2)return;const p=r.find(g=>g.label===n.approve);if(p===void 0)return;const b=r.find(g=>g.label!==n.approve);return{id:t.id,question:t.question,plan:t.detail,approve:p,...b===void 0?{}:{decline:b}}}o(M,"planReviewOf");var z=class{static{o(this,"PendingQuestion")}wait;constructor(e){this.wait=e}get key(){return this.wait.key}get questions(){return this.wait.payload.questions}async answer(e){const t=await this.wait.respond({ok:!0,value:{sessionId:this.wait.sessionId,answer:e}});if(!t.accepted)throw new Error(`question response rejected: ${t.reason}`)}async cancel(){const e=await this.wait.respond({ok:!1,error:{code:"cancelled",message:"the user closed this question request",details:{}}});if(!e.accepted)throw new Error(`question cancellation rejected: ${e.reason}`)}};const F=".xl7ZBq_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.xl7ZBq_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-state-warn-secondary);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:20px;flex-direction:column;display:flex;overflow:hidden}.xl7ZBq_card,.xl7ZBq_card *{box-sizing:border-box}.xl7ZBq_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);flex-shrink:0;align-items:center;gap:8px;padding:10px 16px;font-size:13px;line-height:18px;display:flex}.xl7ZBq_dot{background:var(--dsw-alias-state-warn-primary);border-radius:50%;width:8px;height:8px}.xl7ZBq_body{overscroll-behavior:contain;flex:auto;min-height:0;padding:12px 16px 4px;font-size:14px;line-height:22px;overflow-y:auto}.xl7ZBq_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px 12px;display:flex}.xl7ZBq_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);font-size:11px;line-height:16px}.xl7ZBq_actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.xl7ZBq_discuss{color:var(--dsw-alias-label-secondary);gap:6px}.xl7ZBq_discuss:hover:not(:disabled){color:var(--dsw-alias-label-primary)}@media (width<=720px){.xl7ZBq_card{border-radius:16px}.xl7ZBq_body{padding:10px 12px 4px}.xl7ZBq_footer{align-items:flex-end;padding:8px 12px 10px}}",R="@deepseek-ai/dsh-client-ui-user-questions/PlanReviewPanel.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(R)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-user-questions",e.dataset.pluginCss=R,e.textContent=F,document.head.appendChild(e)}var f={discuss:"xl7ZBq_discuss",strip:"xl7ZBq_strip",dot:"xl7ZBq_dot",frame:"xl7ZBq_frame",actions:"xl7ZBq_actions",card:"xl7ZBq_card",feedback:"xl7ZBq_feedback",body:"xl7ZBq_body",footer:"xl7ZBq_footer"};function E(e){return e===void 0?{}:{title:e}}o(E,"tooltip");function K({pending:e,review:t,t:n}){const[r,p]=(0,v.useState)(!1),[b,g]=(0,v.useState)(null),m=o(u=>{p(!0),g(null),u().catch(d=>{p(!1),g(d instanceof Error?d.message:String(d))})},"settle"),y=o(u=>{m(()=>e.answer({answers:[{id:t.id,selected:[u]}]}))},"decide"),w=t.decline;return(0,a.jsx)("div",{className:f.frame,"data-plan-review-key":e.key,children:(0,a.jsxs)("section",{className:f.card,"aria-label":t.question,children:[(0,a.jsxs)("div",{className:f.strip,children:[(0,a.jsx)("span",{className:f.dot}),n("plan.header")]}),(0,a.jsx)("div",{className:f.body,"data-plan-review-scroll":!0,children:(0,a.jsx)(h.MarkdownText,{text:t.plan})}),(0,a.jsxs)("div",{className:f.footer,children:[(0,a.jsx)("div",{className:f.feedback,role:"status",children:b}),(0,a.jsxs)("div",{className:f.actions,children:[(0,a.jsx)(h.Button,{variant:"ghost",className:f.discuss,icon:(0,a.jsx)(h.IconEditOutline16,{size:14}),disabled:r,onClick:o(()=>{m(()=>e.cancel())},"onClick"),children:n("plan.discuss")}),w!==void 0&&(0,a.jsx)(h.Button,{variant:"outline",...E(w.description),disabled:r,onClick:o(()=>{y(w.label)},"onClick"),children:n("plan.decline")}),(0,a.jsx)(h.Button,{variant:"primary",...E(t.approve.description),disabled:r,onClick:o(()=>{y(t.approve.label)},"onClick"),children:n("plan.approve")})]})]})]})})}o(K,"PlanReviewPanel");const J='.IAaxrq_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.IAaxrq_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:20px;flex-direction:column;padding:0 0 10px;display:flex;overflow:hidden}.IAaxrq_card,.IAaxrq_card *{box-sizing:border-box}.IAaxrq_header{flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 16px 0 24px;display:flex}.IAaxrq_headingBlock{min-width:0}.IAaxrq_eyebrow{color:var(--dsw-alias-label-tertiary);margin-bottom:5px;font-size:11px;line-height:16px}.IAaxrq_title{margin:0;font-size:16px;font-weight:500;line-height:22px}.IAaxrq_detail{margin:0 2px 8px}.IAaxrq_footerActions{flex-shrink:0;align-items:center;gap:12px;display:flex}.IAaxrq_pager{flex-shrink:0;align-items:center;gap:6px;display:flex}.IAaxrq_progress{color:var(--dsw-alias-label-secondary);white-space:nowrap;word-spacing:-2px;padding:0 4px;font-size:14px;font-weight:500;line-height:24px}.IAaxrq_iconButton{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;place-items:center;padding:0;display:grid}.IAaxrq_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.IAaxrq_iconButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}.IAaxrq_body{overscroll-behavior:contain;flex-direction:column;flex:auto;min-height:0;display:flex;overflow-y:auto}.IAaxrq_options{flex-direction:column;gap:1px;margin:8px 0 0;padding:4px 12px;display:flex}.IAaxrq_option{width:100%;min-height:40px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:12px;flex-shrink:0;align-items:flex-start;gap:8px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}.IAaxrq_option:hover:not(:disabled),.IAaxrq_optionSelected{background:var(--dsw-alias-interactive-bg-hover)}.IAaxrq_optionSelected{border-color:var(--dsw-alias-border-l2)}.IAaxrq_option:disabled{cursor:default}.IAaxrq_number{background:var(--dsw-alias-bg-overlay);width:20px;height:20px;color:var(--dsw-alias-label-secondary);border-radius:6px;flex:0 0 20px;place-items:center;margin-top:2px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IAaxrq_checkbox{flex:0 0 20px;place-items:center;width:20px;height:20px;margin-top:2px;display:grid}.IAaxrq_checkbox:before{content:"";border:1px solid var(--dsw-alias-border-l4);border-radius:4px;grid-area:1/1;width:14px;height:14px;transition:background-color .12s,border-color .12s}.IAaxrq_checkbox>svg{grid-area:1/1}.IAaxrq_checkboxChecked{color:var(--dsw-alias-label-primary-foreground)}.IAaxrq_checkboxChecked:before{border-color:var(--dsw-alias-label-primary);background:var(--dsw-alias-label-primary)}.IAaxrq_optionCopy{flex:1;min-width:0}.IAaxrq_optionLine{flex-wrap:wrap;align-items:baseline;gap:2px 6px;display:flex}.IAaxrq_optionLabel{font-size:14px;font-weight:500;line-height:24px}.IAaxrq_badge{background:var(--dsw-specific-sidebar-nav-item-active-accent);color:var(--dsw-alias-button-info-fill);border-radius:6px;padding:0 4px;font-size:11px;font-weight:600;line-height:18px}.IAaxrq_description{color:var(--dsw-alias-label-tertiary);font-size:14px;font-weight:400;line-height:24px}.IAaxrq_customRow{border:1px solid #0000;border-radius:12px;flex-shrink:0;align-items:flex-start;gap:8px;width:100%;min-height:40px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}.IAaxrq_customRow:hover,.IAaxrq_customRow:focus-within,.IAaxrq_customRowActive{background:var(--dsw-alias-interactive-bg-hover)}.IAaxrq_customRow:focus-within,.IAaxrq_customRowActive{border-color:var(--dsw-alias-border-l2)}.IAaxrq_customInput{min-width:0;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font:inherit;background:0 0;border:none;outline:none;flex:1;padding:0;font-size:14px;line-height:24px}.IAaxrq_customInput::placeholder{color:var(--dsw-alias-label-caption)}.IAaxrq_customTextarea{resize:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);min-height:64px;max-height:140px;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font:inherit;border-radius:10px;outline:none;flex-shrink:0;margin:0 12px;padding:8px 12px;font-size:14px;line-height:24px;display:block}.IAaxrq_customTextarea:focus{border-color:var(--dsw-alias-state-business-primary)}.IAaxrq_customTextarea::placeholder{color:var(--dsw-alias-label-caption)}.IAaxrq_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:0 10px 0 18px;display:flex}.IAaxrq_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);text-align:right;flex:1;font-size:11px;line-height:16px}@media (width<=720px){.IAaxrq_card{border-radius:16px}.IAaxrq_header{padding:10px 12px 0 18px}.IAaxrq_options{padding:4px 8px}.IAaxrq_title{font-size:15px;line-height:21px}.IAaxrq_option,.IAaxrq_customRow{padding:8px 6px}.IAaxrq_footer{align-items:flex-end;padding:0 10px}.IAaxrq_footerActions{flex-shrink:0}}@media (prefers-reduced-motion:reduce){.IAaxrq_option,.IAaxrq_customRow{transition:none}}',P="@deepseek-ai/dsh-client-ui-user-questions/QuestionComposer.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-user-questions",e.dataset.pluginCss=P,e.textContent=J,document.head.appendChild(e)}var i={options:"IAaxrq_options",body:"IAaxrq_body",checkboxChecked:"IAaxrq_checkboxChecked",iconButton:"IAaxrq_iconButton",customInput:"IAaxrq_customInput",title:"IAaxrq_title",progress:"IAaxrq_progress",customTextarea:"IAaxrq_customTextarea",frame:"IAaxrq_frame",customRow:"IAaxrq_customRow",footer:"IAaxrq_footer",header:"IAaxrq_header",detail:"IAaxrq_detail",card:"IAaxrq_card",optionCopy:"IAaxrq_optionCopy",optionLabel:"IAaxrq_optionLabel",option:"IAaxrq_option",checkbox:"IAaxrq_checkbox",optionLine:"IAaxrq_optionLine",footerActions:"IAaxrq_footerActions",headingBlock:"IAaxrq_headingBlock",optionSelected:"IAaxrq_optionSelected",description:"IAaxrq_description",customRowActive:"IAaxrq_customRowActive",number:"IAaxrq_number",badge:"IAaxrq_badge",pager:"IAaxrq_pager",feedback:"IAaxrq_feedback",eyebrow:"IAaxrq_eyebrow"};function G(e){const t=/\s*(?:\((?:recommended|推荐)\)|((?:recommended|推荐)))\s*$/i;return t.test(e)?{label:e.replace(t,""),recommended:!0}:{label:e,recommended:!1}}o(G,"parseRecommendedLabel");function H(e){return e.nativeEvent.isComposing||e.nativeEvent.keyCode===229}o(H,"isComposing");function U(e){const t=(0,v.useMemo)(()=>new z(e.matched),[e.matched]),n=(0,v.useMemo)(()=>M(t.questions),[t]);return n===void 0?(0,a.jsx)(V,{pending:t,t:e.t},t.key):(0,a.jsx)(K,{pending:t,review:n,t:e.t},t.key)}o(U,"QuestionComposer");function V({pending:e,t}){const n=e.questions,[r,p]=(0,v.useState)(0),[b,g]=(0,v.useState)(()=>n.map(()=>({selected:[],custom:"",skipped:!1}))),[m,y]=(0,v.useState)(null),[w,u]=(0,v.useState)(null),d=n[r],q=b[r],te=(d.options?.length??0)>0,se=o(()=>{y("cancel"),u(null),e.cancel().catch(s=>{y(null),u({text:s instanceof Error?s.message:String(s)})})},"cancelFlow"),L=o(s=>{g(l=>l.map((x,c)=>c===r?s(x):x)),u(null)},"updateDraft"),re=o(s=>{L(l=>{if(d.multiSelect===!0){const x=l.selected.includes(s)?l.selected.filter(c=>c!==s):[...l.selected,s];return{...l,selected:x,skipped:!1}}return{selected:[s],custom:"",skipped:!1}}),d.multiSelect!==!0&&r<n.length-1&&p(l=>l+1)},"choose"),N=o(s=>s.selected.length>0||s.custom.trim()!=="","answered"),$=o(s=>N(s)||s.skipped,"completed"),B=o(s=>{const l=s.findIndex(c=>!$(c));if(l>=0){p(l),u({key:"error.incomplete"});return}const x={answers:n.map((c,j)=>{const C=s[j];if(C.skipped)return{id:c.id,selected:[]};const S=C.custom.trim();return{id:c.id,selected:S===""||c.multiSelect===!0?C.selected:[],...S===""?{}:{custom:S}}})};y("answer"),u(null),e.answer(x).catch(c=>{y(null),u({text:c instanceof Error?c.message:String(c)})})},"submitDrafts"),D=o(()=>{if(!N(q)){u({key:"error.unanswered"});return}if(r<n.length-1){p(s=>s+1),u(null);return}B(b)},"continueFlow"),T=o(s=>{const l=s.target.value;L(x=>({...x,selected:d.multiSelect===!0?x.selected:[],custom:l,skipped:!1}))},"draftCustom"),Q=o(s=>{s.key!=="Enter"||s.shiftKey||H(s)||(s.preventDefault(),D())},"continueFromCustom"),ie=o(()=>{const s=b.map((l,x)=>x===r?{selected:[],custom:"",skipped:!0}:l);if(g(s),u(null),r<n.length-1){p(l=>l+1);return}B(s)},"skipQuestion");return(0,a.jsx)("div",{className:i.frame,"data-question-key":e.key,children:(0,a.jsxs)("section",{className:i.card,"aria-labelledby":`question-${e.key}-${String(r)}`,children:[(0,a.jsxs)("header",{className:i.header,children:[(0,a.jsxs)("div",{className:i.headingBlock,children:[d.header!==void 0&&(0,a.jsx)("div",{className:i.eyebrow,children:d.header}),(0,a.jsx)("h2",{className:i.title,id:`question-${e.key}-${String(r)}`,children:d.question})]}),(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.cancel"),title:t("nav.cancel"),disabled:m!==null,onClick:se,children:(0,a.jsx)(h.IconCloseOutline16,{})})]}),(0,a.jsxs)("div",{className:i.body,"data-question-scroll":!0,children:[d.detail!==void 0&&(0,a.jsx)("div",{className:i.detail,children:(0,a.jsx)(h.MarkdownText,{text:d.detail})}),(0,a.jsxs)("div",{className:i.options,role:d.multiSelect===!0?"group":"radiogroup",children:[(d.options??[]).map((s,l)=>{const x=q.selected.includes(s.label),c=G(s.label);return(0,a.jsxs)("button",{type:"button",className:A(i.option,x&&d.multiSelect!==!0&&i.optionSelected),role:d.multiSelect===!0?"checkbox":"radio","aria-checked":x,"aria-label":c.label,disabled:m!==null,onClick:o(()=>{re(s.label)},"onClick"),onKeyDown:o(j=>{j.key!=="Enter"||!b.every($)||(j.preventDefault(),B(b))},"onKeyDown"),children:[d.multiSelect===!0?(0,a.jsx)("span",{className:A(i.checkbox,x&&i.checkboxChecked),"aria-hidden":"true",children:x&&(0,a.jsx)(h.IconCheckOutline14,{size:12})}):(0,a.jsx)("span",{className:i.number,children:l+1}),(0,a.jsx)("span",{className:i.optionCopy,children:(0,a.jsxs)("span",{className:i.optionLine,children:[(0,a.jsx)("span",{className:i.optionLabel,children:c.label}),c.recommended&&(0,a.jsx)("span",{className:i.badge,children:t("option.recommended")}),s.description!==void 0&&(0,a.jsx)("span",{className:i.description,children:s.description})]})})]},`${s.label}-${String(l)}`)}),te?(0,a.jsxs)("div",{className:A(i.customRow,q.custom!==""&&i.customRowActive),children:[d.multiSelect===!0?(0,a.jsx)("span",{className:A(i.checkbox,q.custom!==""&&i.checkboxChecked),"aria-hidden":"true",children:q.custom!==""&&(0,a.jsx)(h.IconCheckOutline14,{size:12})}):(0,a.jsx)("span",{className:i.number,"aria-hidden":"true",children:(0,a.jsx)(h.IconEditOutline16,{size:12})}),(0,a.jsx)("input",{type:"text",className:i.customInput,value:q.custom,disabled:m!==null,placeholder:t("custom.placeholder"),onChange:T,onKeyDown:Q})]}):(0,a.jsx)("textarea",{autoFocus:!0,className:i.customTextarea,value:q.custom,disabled:m!==null,rows:2,placeholder:t("custom.placeholder"),onChange:T,onKeyDown:Q})]})]}),(0,a.jsxs)("footer",{className:i.footer,children:[(0,a.jsxs)("div",{className:i.pager,children:[(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.prev"),disabled:r===0||m!==null,onClick:o(()=>{p(r-1),u(null)},"onClick"),children:(0,a.jsx)(h.IconChevronLeftOutline14,{})}),(0,a.jsxs)("span",{className:i.progress,children:[r+1," / ",n.length]}),(0,a.jsx)("button",{type:"button",className:i.iconButton,"aria-label":t("nav.next"),disabled:r===n.length-1||m!==null,onClick:o(()=>{p(r+1),u(null)},"onClick"),children:(0,a.jsx)(h.IconChevronRightOutline14,{})})]}),(0,a.jsx)("div",{className:i.feedback,role:"status",children:w===null?null:"key"in w?t(w.key):w.text}),(0,a.jsxs)("div",{className:i.footerActions,children:[(0,a.jsx)(h.Button,{variant:"outline",disabled:m!==null,onClick:ie,children:t("action.skip")}),(0,a.jsx)(h.Button,{variant:"primary",disabled:m!==null||!N(q),onClick:D,children:m==="answer"?t("submitting"):r===n.length-1?t("submit"):t("action.next")})]})]})]})})}o(V,"QuestionFlow");const W={"error.incomplete":"请先完成这道问题。","error.unanswered":"请选择一个选项或填写自定义答案。","nav.prev":"上一题","nav.next":"下一题","nav.cancel":"放弃整组问题","option.recommended":"推荐","custom.placeholder":"输入你的答案","action.skip":"跳过本题","action.next":"下一题","plan.header":"计划待审","plan.approve":"确认执行","plan.decline":"拒绝","plan.discuss":"去聊天里说"},X={"error.incomplete":"Please complete this question first.","error.unanswered":"Please select an option or enter a custom answer.","nav.prev":"Previous question","nav.next":"Next question","nav.cancel":"Dismiss all questions","option.recommended":"Recommended","custom.placeholder":"Type your answer","action.skip":"Skip this question","action.next":"Next","plan.header":"Plan review","plan.approve":"Approve","plan.decline":"Refuse","plan.discuss":"Chat about it"},O="question",Y=["slots","locale"];function ee({interactions:e}){return e.find(t=>t.kind==="question")??null}o(ee,"selectQuestion");function ae(e){e.effect(()=>e.locale.register(O,{zh:W,en:X}),"ui-user-questions: dictionaries"),e.slots.inject("conversation.composer",()=>e.slots.register({name:"conversation.composer",select:ee,locale:O},U))}return o(ae,"apply"),I.PendingQuestion=z,I.apply=ae,I.inject=Y,k.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-ui-user-questions","version":"0.0.13","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-locale","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"clsx":"^2.0.0","react":"^18.2.0","@deepseek-ai/dsh-client-connection":"^0.0.13","@deepseek-ai/dsh-client-ui-primitives":"^0.0.13","@deepseek-ai/dsh-client-ui-conversation":"^0.0.13","@deepseek-ai/dsh-client-ui-slots":"^0.0.13","@deepseek-ai/dsh-client-runtime":"^0.0.13"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-api-remotes":"^0.0.13"}}
1
+ {"name":"@deepseek-ai/dsh-client-ui-user-questions","version":"0.0.15","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-locale","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"clsx":"^2.0.0","react":"^18.2.0","@deepseek-ai/dsh-client-ui-conversation":"^0.0.15","@deepseek-ai/dsh-client-connection":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/dsh-client-runtime":"^0.0.15","@deepseek-ai/dsh-client-ui-slots":"^0.0.15"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.0.15","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-api-remotes":"^0.0.15"}}
@@ -1 +1 @@
1
- var V=Object.defineProperty;var s=(p,f)=>V(p,"name",{value:f,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-workflow-run",factory:s(p=>{var f={exports:{}},w=f.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let n=p("react/jsx-runtime"),Q=p("react"),c=p("@deepseek-ai/dsh-client-ui-primitives"),k=p("@deepseek-ai/dsh-client-runtime/client");const j="._23AQmG_root{width:100%;min-width:0}._23AQmG_runHeader{box-sizing:border-box;background:var(--dsw-alias-bg-module-platform);border-radius:8px;align-items:center;gap:6px;width:100%;min-width:0;height:32px;padding:0 8px;display:flex}._23AQmG_runHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}._23AQmG_runLeading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:0;display:inline-flex}._23AQmG_runTitle{max-width:42%;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:14px;font-weight:510;line-height:24px;overflow:hidden}._23AQmG_runSummary{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:18px;overflow:hidden}._23AQmG_statusTail{height:20px;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex:none;align-items:center;gap:4px;font-size:11px;font-weight:510;line-height:16px;display:inline-flex;overflow:hidden}._23AQmG_phaseHeader{box-sizing:border-box;align-items:center;gap:6px;width:100%;min-width:0;height:32px;display:flex}._23AQmG_phaseHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px;border-radius:4px}._23AQmG_phaseLeading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:0;display:inline-flex}._23AQmG_phaseTitle{min-width:0;max-width:42%;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;font-size:14px;line-height:24px;overflow:hidden}._23AQmG_phaseCount{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_phaseStatus{width:132px;color:var(--dsw-alias-label-secondary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_separator{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:2px;height:2px}._23AQmG_phaseList{flex-direction:column;gap:4px;min-width:0;padding:4px 0 0 16px;display:flex}._23AQmG_phase{min-width:0}._23AQmG_members{flex-direction:column;gap:2px;min-width:0;padding:0 0 0 16px;display:flex}._23AQmG_memberRow,._23AQmG_memberButton{width:100%;min-width:0;min-height:24px;color:var(--dsw-alias-label-secondary);font:inherit;text-align:left;background:0 0;border:0;border-radius:4px;align-items:center;gap:12px;padding:0;display:flex}._23AQmG_memberButton{cursor:pointer}._23AQmG_memberButton ._23AQmG_memberLabel{color:var(--dsw-alias-state-business-primary);text-underline-position:from-font;text-decoration:underline}._23AQmG_dotSlot{flex:none;justify-content:center;align-items:center;width:16px;height:24px;display:inline-flex;overflow:hidden}._23AQmG_memberButton:focus-visible{outline:none}._23AQmG_memberButton:focus-visible ._23AQmG_memberLabelWrap{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}._23AQmG_memberLabelWrap{border-radius:4px;flex:1;align-items:center;min-width:0;height:24px;padding:0 2px;display:flex;overflow:hidden}._23AQmG_memberLabel{min-width:0;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;line-height:24px;overflow:hidden}._23AQmG_memberStatus{width:64px;color:var(--dsw-alias-label-secondary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_empty{color:var(--dsw-alias-label-tertiary);padding:0;font-size:13px;line-height:20px}@media (width<=560px){._23AQmG_phaseList,._23AQmG_members{padding-left:12px}}",b="@deepseek-ai/dsh-client-ui-workflow-run/WorkflowRunPanel.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(b)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workflow-run",e.dataset.pluginCss=b,e.textContent=j,document.head.appendChild(e)}var o={phaseLeading:"_23AQmG_phaseLeading",phaseStatus:"_23AQmG_phaseStatus",root:"_23AQmG_root",phaseList:"_23AQmG_phaseList",runTitle:"_23AQmG_runTitle",phaseTitle:"_23AQmG_phaseTitle",runLeading:"_23AQmG_runLeading",members:"_23AQmG_members",runHeader:"_23AQmG_runHeader",memberButton:"_23AQmG_memberButton",dotSlot:"_23AQmG_dotSlot",memberRow:"_23AQmG_memberRow",phaseCount:"_23AQmG_phaseCount",phase:"_23AQmG_phase",runSummary:"_23AQmG_runSummary",separator:"_23AQmG_separator",memberLabelWrap:"_23AQmG_memberLabelWrap",memberLabel:"_23AQmG_memberLabel",memberStatus:"_23AQmG_memberStatus",empty:"_23AQmG_empty",statusTail:"_23AQmG_statusTail",phaseHeader:"_23AQmG_phaseHeader"};const g={running:"status.running",completed:"status.completed",failed:"status.failed",cancelled:"status.cancelled",interrupted:"status.interrupted"};function x(e){switch(e){case"running":return"ongoing";case"completed":return"done";case"failed":return"error";case"cancelled":case"interrupted":return"warning";default:return e}}s(x,"dotState");function C(e,t){return e===null?t("phase.unassigned"):e===""?t("phase.empty"):e}s(C,"readablePhase");function S(e,t){return e===""?t("member.empty"):e}s(S,"readableMember");function _(e,t,a){return a(`statusCount.${e}`,{count:t})}s(_,"statusCount");function y(e,t){return t(e===1?"run.members.one":"run.members.other",{count:e})}s(y,"memberCount");function v(e){return e.members.some(t=>t.status!=="completed")}s(v,"phaseRequiresExpansion");const N=s(()=>{},"forcedOpenToggle");function R(e){const[t,a]=(0,Q.useState)(!1);return(0,n.jsx)(c.DisclosureRow,{...e,open:t,expandable:!0,onToggle:s(()=>{a(i=>!i)},"onToggle")})}s(R,"ManualDisclosure");function A({cleanCycleKey:e,requiresExpansion:t,...a}){return t?(0,n.jsx)(c.DisclosureRow,{...a,open:!0,expandable:!1,onToggle:N}):(0,n.jsx)(R,{...a},e)}s(A,"StatusDisclosure");function L(e,t){const a=new Map;for(const l of e)a.set(l.status,(a.get(l.status)??0)+1);const i=s(l=>a.get(l)??0,"count"),r=["running","failed","cancelled","interrupted"].filter(l=>i(l)>0);return r.length===0?_("completed",i("completed"),t):(r.includes("interrupted")&&i("completed")>0?["completed",...r]:r).map(l=>_(l,i(l),t)).join(" · ")}s(L,"phaseStatusSummary");function I(e,t,a){const i=new Set(e.ids),r=[];for(const l of t)for(const u of l.members){const d=e.byId[u.childId];u.status==="running"&&i.has(u.childId)&&d?.origin==="subagent"&&d.parentId===a&&d.running&&r.push(u.childId)}return r}s(I,"navigableMembers");function T({children:e,count:t,name:a,requiresExpansion:i,status:r,t:l}){return(0,n.jsx)(A,{icon:(0,n.jsx)(c.IconChevronRightOutline14,{}),title:l("run.title",{name:a}),requiresExpansion:i,expandOnRowClick:!0,previewChevron:!1,keepContentWhenOpen:!0,rowClassName:o.runHeader,leadingClassName:o.runLeading,titleClassName:o.runTitle,collapsedContent:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.separator,"aria-hidden":!0}),(0,n.jsx)("span",{className:o.runSummary,children:y(t,l)}),(0,n.jsxs)("span",{className:o.statusTail,"data-status":r,children:[(0,n.jsx)(c.StateDot,{state:x(r)}),(0,n.jsx)("span",{children:l(g[r])})]})]}),children:e})}s(T,"RunHeader");function q({member:e,navigable:t,openSession:a,t:i}){const r=S(e.label,i),l=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.dotSlot,children:(0,n.jsx)(c.StateDot,{state:x(e.status)})}),(0,n.jsx)("span",{className:o.memberLabelWrap,"data-member-label-wrap":!0,children:(0,n.jsx)("span",{className:o.memberLabel,"data-member-label":!0,children:r})}),(0,n.jsx)("span",{className:o.memberStatus,"data-member-status-text":!0,children:i(g[e.status])})]});return t?(0,n.jsx)("button",{type:"button",className:o.memberButton,"data-member-status":e.status,"aria-label":i("member.open",{name:r}),onClick:s(()=>{a(e.childId)},"onClick"),children:l}):(0,n.jsx)("div",{className:o.memberRow,"data-member-status":e.status,children:l})}s(q,"MemberRow");function z({phase:e,navigable:t,openSession:a,t:i}){return(0,n.jsx)(A,{icon:(0,n.jsx)(c.IconChevronRightOutline14,{}),title:C(e.phase,i),cleanCycleKey:e.members.length,requiresExpansion:v(e),expandOnRowClick:!0,previewChevron:!1,keepContentWhenOpen:!0,className:o.phase,rowClassName:o.phaseHeader,leadingClassName:o.phaseLeading,titleClassName:o.phaseTitle,collapsedContent:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.separator,"aria-hidden":!0}),(0,n.jsx)("span",{className:o.phaseCount,"data-phase-count":!0,children:y(e.members.length,i)}),(0,n.jsx)("span",{className:o.phaseStatus,"data-phase-status-text":!0,children:L(e.members,i)})]}),children:(0,n.jsx)("div",{className:o.members,children:e.members.map(r=>(0,n.jsx)(q,{member:r,navigable:t.includes(r.childId),openSession:a,t:i},r.seq))})})}s(z,"PhaseSection");function E({node:e,sessionId:t,useSessions:a,openSession:i,t:r}){const l=e.data.phases.reduce((m,h)=>m+h.members.length,0),u=e.data.status!=="completed"||e.data.phases.some(v),d=a(m=>I(m,e.data.phases,t),k.shallowEqual);return(0,n.jsx)("section",{className:o.root,"data-workflow-run":!0,"data-run-status":e.data.status,children:(0,n.jsx)(T,{count:l,name:e.data.name,requiresExpansion:u,status:e.data.status,t:r,children:(0,n.jsx)("div",{className:o.phaseList,children:e.data.phases.length===0?(0,n.jsx)("span",{className:o.empty,children:r("run.empty")}):e.data.phases.map(m=>(0,n.jsx)(z,{phase:m,navigable:d,openSession:i,t:r},m.key))})})})}s(E,"WorkflowRunPanel");const G="workflowRun",O={"run.title":"{name}","run.members.one":"{count} 个成员","run.members.other":"{count} 个成员","run.empty":"没有启动成员","phase.unassigned":"未分阶段","phase.empty":"空阶段名","statusCount.running":"运行中 {count}","statusCount.completed":"已完成 {count}","statusCount.failed":"失败 {count}","statusCount.cancelled":"已取消 {count}","statusCount.interrupted":"已中断 {count}","member.empty":"空成员名","member.open":"打开 {name}","status.running":"运行中","status.completed":"已完成","status.failed":"失败","status.cancelled":"已取消","status.interrupted":"已中断"},H={"run.title":"{name}","run.members.one":"{count} member","run.members.other":"{count} members","run.empty":"No members started","phase.unassigned":"Unphased","phase.empty":"Empty phase name","statusCount.running":"Running {count}","statusCount.completed":"Completed {count}","statusCount.failed":"Failed {count}","statusCount.cancelled":"Cancelled {count}","statusCount.interrupted":"Interrupted {count}","member.empty":"Empty member name","member.open":"Open {name}","status.running":"Running","status.completed":"Completed","status.failed":"Failed","status.cancelled":"Cancelled","status.interrupted":"Interrupted"};function W(e){return e===null?"missing":`value:${e.length}:${e}`}s(W,"workflowPhaseKey");function M(e){switch(e){case"completed":return"completed";case"cancelled":return"cancelled";case"error":return"failed";default:return e}}s(M,"statusFromStopReason");function B(e){switch(e){case"completed":return"completed";case"cancelled":return"cancelled";case"failed":return"failed";default:return e}}s(B,"statusFromOutcome");function P(e){return e.kind==="step"?e.step.status==="closed"||e.turn.status==="closed":e.kind==="turn"&&e.turn.status==="closed"}s(P,"locationClosed");function D(e,t){const a=e.state,i=a.stopReason===void 0&&P(t),r=new Map;for(const u of a.members){const d=u.phase===void 0?null:u.phase,m=W(d);let h=r.get(m);h===void 0&&(h={phase:d,members:[]},r.set(m,h)),h.members.push({seq:u.seq,label:u.label,childId:u.childId,status:u.outcome===void 0?i?"interrupted":"running":B(u.outcome)})}const l=[...r].map(([u,d])=>({key:u,phase:d.phase,members:d.members}));return{name:a.name,status:a.stopReason===void 0?i?"interrupted":"running":M(a.stopReason),phases:l}}s(D,"projectWorkflow");function F(e,t){const a={seq:t.seq,label:t.label,...t.phase===void 0?{}:{phase:t.phase},childId:t.childId};return{...e,members:[...e.members,a]}}s(F,"updateAgentStart");function K(e,t){return{...e,members:e.members.map(a=>a.seq===t.seq?{...a,outcome:t.outcome}:a)}}s(K,"updateAgentEnd");const $={kind:"workflow-run",target:"chat",match:s(e=>e.type==="tool-workflow/run-start"?{id:String(e.data.runId),role:"start"}:e.type==="tool-workflow/agent-start"||e.type==="tool-workflow/agent-end"||e.type==="tool-workflow/run-end"?{id:String(e.data.runId),role:"update"}:null,"match"),start:s((e,t)=>{if(t.event.type!=="tool-workflow/run-start")throw new Error("workflow-run start requires tool-workflow/run-start");return{name:t.event.data.name,members:[]}},"start"),update:s((e,t)=>t.event.type==="tool-workflow/agent-start"?F(e.state,t.event.data):t.event.type==="tool-workflow/agent-end"?K(e.state,t.event.data):t.event.type==="tool-workflow/run-end"?{...e.state,stopReason:t.event.data.stopReason}:e.state,"update"),buildViewNode:s(e=>{if(e.start===void 0)return null;const t=D(e,e.start.location);return{key:e.key,kind:"workflow-run",id:e.id,target:"chat",anchorSeq:e.start.event.seq,location:e.start.location,visibility:"visible",data:t}},"buildViewNode")},U=["conversationEvents","slots","sessions","locale"];function J(e){e.conversationEvents.register($),e.effect(()=>e.locale.register(G,{zh:O,en:H}),"ui-workflow-run: dictionaries"),e.slots.inject("conversation.chat.node",()=>e.slots.register({name:"conversation.chat.node",key:"workflow-run",locale:G,inject:s(()=>({openSession:s(t=>{e.sessions.open(t)},"openSession")}),"inject")},E))}return s(J,"apply"),w.apply=J,w.inject=U,f.exports},"factory")});
1
+ var V=Object.defineProperty;var s=(p,f)=>V(p,"name",{value:f,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-workflow-run",factory:s(p=>{var f={exports:{}},w=f.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let n=p("react/jsx-runtime"),Q=p("react"),c=p("@deepseek-ai/dsh-client-ui-primitives"),k=p("@deepseek-ai/dsh-client-runtime/client");const j="._23AQmG_root{width:100%;min-width:0}._23AQmG_runHeader{box-sizing:border-box;background:var(--dsw-alias-bg-module-platform);border-radius:8px;align-items:center;gap:6px;width:100%;min-width:0;height:32px;padding:0 8px;display:flex}._23AQmG_runHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}._23AQmG_runLeading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:0;display:inline-flex}._23AQmG_runTitle{max-width:42%;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:14px;font-weight:510;line-height:24px;overflow:hidden}._23AQmG_runSummary{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:18px;overflow:hidden}._23AQmG_statusTail{height:20px;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex:none;align-items:center;gap:4px;font-size:11px;font-weight:510;line-height:16px;display:inline-flex;overflow:hidden}._23AQmG_phaseHeader{box-sizing:border-box;align-items:center;gap:6px;width:100%;min-width:0;height:32px;display:flex}._23AQmG_phaseHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px;border-radius:4px}._23AQmG_phaseLeading{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:0;display:inline-flex}._23AQmG_phaseTitle{min-width:0;max-width:42%;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;font-size:14px;line-height:24px;overflow:hidden}._23AQmG_phaseCount{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_phaseStatus{width:132px;color:var(--dsw-alias-label-secondary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_separator{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:2px;height:2px}._23AQmG_phaseList{flex-direction:column;gap:4px;min-width:0;padding:4px 0 0 16px;display:flex}._23AQmG_phase{min-width:0}._23AQmG_members{flex-direction:column;gap:2px;min-width:0;padding:0 0 0 16px;display:flex}._23AQmG_memberRow,._23AQmG_memberButton{width:100%;min-width:0;min-height:24px;color:var(--dsw-alias-label-secondary);font:inherit;text-align:left;background:0 0;border:0;border-radius:4px;align-items:center;gap:12px;padding:0;display:flex}._23AQmG_memberButton{cursor:pointer}._23AQmG_memberButton ._23AQmG_memberLabel{color:var(--dsw-alias-state-business-primary);text-underline-position:from-font;text-decoration:underline}._23AQmG_dotSlot{flex:none;justify-content:center;align-items:center;width:16px;height:24px;display:inline-flex;overflow:hidden}._23AQmG_memberButton:focus-visible{outline:none}._23AQmG_memberButton:focus-visible ._23AQmG_memberLabelWrap{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}._23AQmG_memberLabelWrap{border-radius:4px;flex:1;align-items:center;min-width:0;height:24px;padding:0 2px;display:flex;overflow:hidden}._23AQmG_memberLabel{min-width:0;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;line-height:24px;overflow:hidden}._23AQmG_memberStatus{width:64px;color:var(--dsw-alias-label-secondary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:13px;line-height:20px;overflow:hidden}._23AQmG_empty{color:var(--dsw-alias-label-tertiary);padding:0;font-size:13px;line-height:20px}@media (width<=560px){._23AQmG_phaseList,._23AQmG_members{padding-left:12px}}",b="@deepseek-ai/dsh-client-ui-workflow-run/WorkflowRunPanel.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(b)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workflow-run",e.dataset.pluginCss=b,e.textContent=j,document.head.appendChild(e)}var o={memberLabelWrap:"_23AQmG_memberLabelWrap",phaseTitle:"_23AQmG_phaseTitle",phaseList:"_23AQmG_phaseList",runHeader:"_23AQmG_runHeader",phase:"_23AQmG_phase",runTitle:"_23AQmG_runTitle",members:"_23AQmG_members",dotSlot:"_23AQmG_dotSlot",separator:"_23AQmG_separator",root:"_23AQmG_root",phaseCount:"_23AQmG_phaseCount",statusTail:"_23AQmG_statusTail",phaseHeader:"_23AQmG_phaseHeader",empty:"_23AQmG_empty",memberLabel:"_23AQmG_memberLabel",memberStatus:"_23AQmG_memberStatus",phaseStatus:"_23AQmG_phaseStatus",memberRow:"_23AQmG_memberRow",memberButton:"_23AQmG_memberButton",runLeading:"_23AQmG_runLeading",phaseLeading:"_23AQmG_phaseLeading",runSummary:"_23AQmG_runSummary"};const g={running:"status.running",completed:"status.completed",failed:"status.failed",cancelled:"status.cancelled",interrupted:"status.interrupted"};function x(e){switch(e){case"running":return"ongoing";case"completed":return"done";case"failed":return"error";case"cancelled":case"interrupted":return"warning";default:return e}}s(x,"dotState");function C(e,t){return e===null?t("phase.unassigned"):e===""?t("phase.empty"):e}s(C,"readablePhase");function S(e,t){return e===""?t("member.empty"):e}s(S,"readableMember");function _(e,t,a){return a(`statusCount.${e}`,{count:t})}s(_,"statusCount");function y(e,t){return t(e===1?"run.members.one":"run.members.other",{count:e})}s(y,"memberCount");function v(e){return e.members.some(t=>t.status!=="completed")}s(v,"phaseRequiresExpansion");const N=s(()=>{},"forcedOpenToggle");function R(e){const[t,a]=(0,Q.useState)(!1);return(0,n.jsx)(c.DisclosureRow,{...e,open:t,expandable:!0,onToggle:s(()=>{a(i=>!i)},"onToggle")})}s(R,"ManualDisclosure");function A({cleanCycleKey:e,requiresExpansion:t,...a}){return t?(0,n.jsx)(c.DisclosureRow,{...a,open:!0,expandable:!1,onToggle:N}):(0,n.jsx)(R,{...a},e)}s(A,"StatusDisclosure");function L(e,t){const a=new Map;for(const l of e)a.set(l.status,(a.get(l.status)??0)+1);const i=s(l=>a.get(l)??0,"count"),r=["running","failed","cancelled","interrupted"].filter(l=>i(l)>0);return r.length===0?_("completed",i("completed"),t):(r.includes("interrupted")&&i("completed")>0?["completed",...r]:r).map(l=>_(l,i(l),t)).join(" · ")}s(L,"phaseStatusSummary");function I(e,t,a){const i=new Set(e.ids),r=[];for(const l of t)for(const u of l.members){const d=e.byId[u.childId];u.status==="running"&&i.has(u.childId)&&d?.origin==="subagent"&&d.parentId===a&&d.running&&r.push(u.childId)}return r}s(I,"navigableMembers");function T({children:e,count:t,name:a,requiresExpansion:i,status:r,t:l}){return(0,n.jsx)(A,{icon:(0,n.jsx)(c.IconChevronRightOutline14,{}),title:l("run.title",{name:a}),requiresExpansion:i,expandOnRowClick:!0,previewChevron:!1,keepContentWhenOpen:!0,rowClassName:o.runHeader,leadingClassName:o.runLeading,titleClassName:o.runTitle,collapsedContent:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.separator,"aria-hidden":!0}),(0,n.jsx)("span",{className:o.runSummary,children:y(t,l)}),(0,n.jsxs)("span",{className:o.statusTail,"data-status":r,children:[(0,n.jsx)(c.StateDot,{state:x(r)}),(0,n.jsx)("span",{children:l(g[r])})]})]}),children:e})}s(T,"RunHeader");function q({member:e,navigable:t,openSession:a,t:i}){const r=S(e.label,i),l=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.dotSlot,children:(0,n.jsx)(c.StateDot,{state:x(e.status)})}),(0,n.jsx)("span",{className:o.memberLabelWrap,"data-member-label-wrap":!0,children:(0,n.jsx)("span",{className:o.memberLabel,"data-member-label":!0,children:r})}),(0,n.jsx)("span",{className:o.memberStatus,"data-member-status-text":!0,children:i(g[e.status])})]});return t?(0,n.jsx)("button",{type:"button",className:o.memberButton,"data-member-status":e.status,"aria-label":i("member.open",{name:r}),onClick:s(()=>{a(e.childId)},"onClick"),children:l}):(0,n.jsx)("div",{className:o.memberRow,"data-member-status":e.status,children:l})}s(q,"MemberRow");function z({phase:e,navigable:t,openSession:a,t:i}){return(0,n.jsx)(A,{icon:(0,n.jsx)(c.IconChevronRightOutline14,{}),title:C(e.phase,i),cleanCycleKey:e.members.length,requiresExpansion:v(e),expandOnRowClick:!0,previewChevron:!1,keepContentWhenOpen:!0,className:o.phase,rowClassName:o.phaseHeader,leadingClassName:o.phaseLeading,titleClassName:o.phaseTitle,collapsedContent:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.separator,"aria-hidden":!0}),(0,n.jsx)("span",{className:o.phaseCount,"data-phase-count":!0,children:y(e.members.length,i)}),(0,n.jsx)("span",{className:o.phaseStatus,"data-phase-status-text":!0,children:L(e.members,i)})]}),children:(0,n.jsx)("div",{className:o.members,children:e.members.map(r=>(0,n.jsx)(q,{member:r,navigable:t.includes(r.childId),openSession:a,t:i},r.seq))})})}s(z,"PhaseSection");function E({node:e,sessionId:t,useSessions:a,openSession:i,t:r}){const l=e.data.phases.reduce((m,h)=>m+h.members.length,0),u=e.data.status!=="completed"||e.data.phases.some(v),d=a(m=>I(m,e.data.phases,t),k.shallowEqual);return(0,n.jsx)("section",{className:o.root,"data-workflow-run":!0,"data-run-status":e.data.status,children:(0,n.jsx)(T,{count:l,name:e.data.name,requiresExpansion:u,status:e.data.status,t:r,children:(0,n.jsx)("div",{className:o.phaseList,children:e.data.phases.length===0?(0,n.jsx)("span",{className:o.empty,children:r("run.empty")}):e.data.phases.map(m=>(0,n.jsx)(z,{phase:m,navigable:d,openSession:i,t:r},m.key))})})})}s(E,"WorkflowRunPanel");const G="workflowRun",O={"run.title":"{name}","run.members.one":"{count} 个成员","run.members.other":"{count} 个成员","run.empty":"没有启动成员","phase.unassigned":"未分阶段","phase.empty":"空阶段名","statusCount.running":"运行中 {count}","statusCount.completed":"已完成 {count}","statusCount.failed":"失败 {count}","statusCount.cancelled":"已取消 {count}","statusCount.interrupted":"已中断 {count}","member.empty":"空成员名","member.open":"打开 {name}","status.running":"运行中","status.completed":"已完成","status.failed":"失败","status.cancelled":"已取消","status.interrupted":"已中断"},H={"run.title":"{name}","run.members.one":"{count} member","run.members.other":"{count} members","run.empty":"No members started","phase.unassigned":"Unphased","phase.empty":"Empty phase name","statusCount.running":"Running {count}","statusCount.completed":"Completed {count}","statusCount.failed":"Failed {count}","statusCount.cancelled":"Cancelled {count}","statusCount.interrupted":"Interrupted {count}","member.empty":"Empty member name","member.open":"Open {name}","status.running":"Running","status.completed":"Completed","status.failed":"Failed","status.cancelled":"Cancelled","status.interrupted":"Interrupted"};function W(e){return e===null?"missing":`value:${e.length}:${e}`}s(W,"workflowPhaseKey");function M(e){switch(e){case"completed":return"completed";case"cancelled":return"cancelled";case"error":return"failed";default:return e}}s(M,"statusFromStopReason");function B(e){switch(e){case"completed":return"completed";case"cancelled":return"cancelled";case"failed":return"failed";default:return e}}s(B,"statusFromOutcome");function P(e){return e.kind==="step"?e.step.status==="closed"||e.turn.status==="closed":e.kind==="turn"&&e.turn.status==="closed"}s(P,"locationClosed");function D(e,t){const a=e.state,i=a.stopReason===void 0&&P(t),r=new Map;for(const u of a.members){const d=u.phase===void 0?null:u.phase,m=W(d);let h=r.get(m);h===void 0&&(h={phase:d,members:[]},r.set(m,h)),h.members.push({seq:u.seq,label:u.label,childId:u.childId,status:u.outcome===void 0?i?"interrupted":"running":B(u.outcome)})}const l=[...r].map(([u,d])=>({key:u,phase:d.phase,members:d.members}));return{name:a.name,status:a.stopReason===void 0?i?"interrupted":"running":M(a.stopReason),phases:l}}s(D,"projectWorkflow");function F(e,t){const a={seq:t.seq,label:t.label,...t.phase===void 0?{}:{phase:t.phase},childId:t.childId};return{...e,members:[...e.members,a]}}s(F,"updateAgentStart");function K(e,t){return{...e,members:e.members.map(a=>a.seq===t.seq?{...a,outcome:t.outcome}:a)}}s(K,"updateAgentEnd");const $={kind:"workflow-run",target:"chat",match:s(e=>e.type==="tool-workflow/run-start"?{id:String(e.data.runId),role:"start"}:e.type==="tool-workflow/agent-start"||e.type==="tool-workflow/agent-end"||e.type==="tool-workflow/run-end"?{id:String(e.data.runId),role:"update"}:null,"match"),start:s((e,t)=>{if(t.event.type!=="tool-workflow/run-start")throw new Error("workflow-run start requires tool-workflow/run-start");return{name:t.event.data.name,members:[]}},"start"),update:s((e,t)=>t.event.type==="tool-workflow/agent-start"?F(e.state,t.event.data):t.event.type==="tool-workflow/agent-end"?K(e.state,t.event.data):t.event.type==="tool-workflow/run-end"?{...e.state,stopReason:t.event.data.stopReason}:e.state,"update"),buildViewNode:s(e=>{if(e.start===void 0)return null;const t=D(e,e.start.location);return{key:e.key,kind:"workflow-run",id:e.id,target:"chat",anchorSeq:e.start.event.seq,location:e.start.location,visibility:"visible",data:t}},"buildViewNode")},U=["conversationEvents","slots","sessions","locale"];function J(e){e.conversationEvents.register($),e.effect(()=>e.locale.register(G,{zh:O,en:H}),"ui-workflow-run: dictionaries"),e.slots.inject("conversation.chat.node",()=>e.slots.register({name:"conversation.chat.node",key:"workflow-run",locale:G,inject:s(()=>({openSession:s(t=>{e.sessions.open(t)},"openSession")}),"inject")},E))}return s(J,"apply"),w.apply=J,w.inject=U,f.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-ui-workflow-run","version":"0.0.13","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"react":"^18.2.0"},"peerDependencies":{"@deepseek-ai/dsh-client-locale":"^0.0.13","@deepseek-ai/dsh-client-runtime":"^0.0.13","@deepseek-ai/dsh-client-ui-conversation":"^0.0.13","@deepseek-ai/dsh-client-ui-primitives":"^0.0.13","@deepseek-ai/dsh-client-ui-slots":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-session":"^0.0.13","@deepseek-ai/dsh-tool-workflow":"^0.0.13","@deepseek-ai/dsh-workflow":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-ui-workflow-run","version":"0.0.15","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"license":"MIT","dependencies":{"react":"^18.2.0"},"peerDependencies":{"@deepseek-ai/dsh-client-runtime":"^0.0.15","@deepseek-ai/dsh-client-ui-conversation":"^0.0.15","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-client-ui-slots":"^0.0.15","@deepseek-ai/dsh-client-locale":"^0.0.15","@deepseek-ai/dsh-tool-workflow":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/dsh-session":"^0.0.15","@deepseek-ai/dsh-workflow":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- var Ks=Object.defineProperty;var s=(ae,fe)=>Ks(ae,"name",{value:fe,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-workspace",factory:s(ae=>{var fe={exports:{}},_e=fe.exports;Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"});let me=ae("@deepseek-ai/dsh-client-runtime/client"),n=ae("react/jsx-runtime"),h=ae("react"),x=ae("@deepseek-ai/dsh-client-ui-primitives");const ie="__flat_session_order__";function ws(){return(0,me.defineStore)({init:s(()=>({groupBy:"workspace",orderBy:"updated",groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:"dsh.workspace.view.v5",actions:{setGroupBy:s((e,t)=>{e.groupBy=t},"setGroupBy"),setOrderBy:s((e,t)=>{e.orderBy=t},"setOrderBy"),setGroupExpanded:s((e,t,o)=>{e.groupExpansion[t]=o},"setGroupExpanded"),retainAccountKeys:s((e,t)=>{const o=new Set(t);e.groupExpansion=Object.fromEntries(Object.entries(e.groupExpansion).filter(([r])=>o.has(r))),e.sessionOrderByAccount=Object.fromEntries(Object.entries(e.sessionOrderByAccount).filter(([r])=>o.has(r))),e.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(e.sessionUpdatedAtByAccount).filter(([r])=>o.has(r)))},"retainAccountKeys"),syncSessionOrderAccount:s((e,t,o,r)=>{e.sessionOrderByAccount[t]=o,e.sessionUpdatedAtByAccount[t]=r},"syncSessionOrderAccount"),setSessionOrder:s((e,t,o)=>{e.sessionOrderByAccount[t]=o},"setSessionOrder")}})}s(ws,"createWorkspaceViewStore");function Ee(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(o=Ee(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}s(Ee,"r");function M(){for(var e,t,o=0,r="",i=arguments.length;o<i;o++)(e=arguments[o])&&(t=Ee(e))&&(r&&(r+=" "),r+=t);return r}s(M,"clsx");const Be="Ungrouped";function bs(e){if(e===void 0||e==="")return Be;const t=e.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return t!==void 0&&t!==""?t:e}s(bs,"workspaceLabel");function we(e,t){return t.updatedAt!==e.updatedAt?t.updatedAt-e.updatedAt:e.id<t.id?-1:1}s(we,"byRecency");function ce(e,t,o){return e.origin!=="subagent"&&!o.has(e.id)&&(!e.blank||e.id===t)}s(ce,"sessionVisible");function ke(e){return e.blank?"New Session":e.displayTitle}s(ke,"sessionTitle");function Oe(e,t,o,r,i,l,d){const a=[...l];return d==="recency"&&a.sort(we),{key:e,workspaceId:t,cwd:o,createdAt:r,label:i,sessions:a}}s(Oe,"buildGroup");function gs(e,t){const o=new Map(e.map(l=>[l.id,l])),r=new Set,i=[];for(const l of t){const d=o.get(l);d===void 0||r.has(l)||(i.push(d),r.add(l))}for(const l of[...e].sort(we))r.has(l.id)||i.push(l);return i}s(gs,"orderedUngrouped");function xs(e,t,o,r){const i=[],l=new Set;for(const a of t){const g=[];for(const u of a.sessionIds){const b=e.byId[u];b!==void 0&&(l.add(u),ce(b,e.current,o)&&g.push(b))}i.push(Oe(a.workspaceId,a.workspaceId,a.path,Date.parse(a.createdAt),a.title,g,"account"))}const d=e.ids.map(a=>e.byId[a]).filter(a=>a!==void 0&&!l.has(a.id)&&ce(a,e.current,o));return d.length>0&&i.push(Oe("",void 0,void 0,void 0,Be,r===void 0?d:gs(d,r),r===void 0?"recency":"account")),i}s(xs,"groupByWorkspace");function Ce(e,t){return{id:e.id,title:ke(e),blank:e.blank,running:e.running,runningSubagentCount:t.get(e.id)?.runningCount??0,completed:e.completed===!0,updatedAt:e.updatedAt,...e.pendingInteraction===void 0?{}:{pendingInteraction:e.pendingInteraction}}}s(Ce,"sessionNode");function vs(e,t,o,r){const i=new Set(o),l=new Set(r.expandedGroups),d=(0,me.indexSubagentDescendants)(e.byId),a=e.current===void 0?void 0:t.find(u=>u.sessionIds.includes(e.current))?.workspaceId??"",g=[];for(const u of xs(e,t,i,r.ungroupedOrder)){const b=l.has(u.key);g.push({key:u.key,workspaceId:u.workspaceId,cwd:u.cwd,createdAt:u.createdAt,label:u.label,sessionCount:u.sessions.length,expanded:b,containsCurrent:u.key===a,sessions:b?u.sessions.map(y=>Ce(y,d)):[]})}return g}s(vs,"deriveGroups");function ys(e,t){const o=new Set(t),r=(0,me.indexSubagentDescendants)(e.byId),i=[];for(const l of e.ids){const d=e.byId[l];d===void 0||!ce(d,e.current,o)||i.push(d)}return i.sort(we),i.map(l=>Ce(l,r))}s(ys,"deriveFlat");function _s(e,t,o,r,i,l){const d=o.trim().toLowerCase();if(d==="")return{items:[],hasMore:!1};const a=new Set(r),g=(0,me.indexSubagentDescendants)(e.byId),u=new Map;for(const w of t)for(const q of w.sessionIds)u.has(q)||u.set(q,w.title);const b=s(w=>u.get(w.id)??bs(w.cwd),"labelOf"),y=new Map;for(const w of i.items)y.has(w.sessionId)||y.set(w.sessionId,w);const _=[];for(const w of e.ids){const q=e.byId[w];q===void 0||q.blank||!ce(q,e.current,a)||(ke(q).toLowerCase().includes(d)||b(q).toLowerCase().includes(d))&&_.push(q)}_.sort(we);const k=[],B=new Set,V=s(w=>{B.has(w.id)||(B.add(w.id),k.push(w))},"include");for(const w of _)V(w);for(const w of i.items){const q=e.byId[w.sessionId];q!==void 0&&!q.blank&&ce(q,e.current,a)&&V(q)}return{items:k.slice(0,l).map(w=>{const q=y.get(w.id);return{id:w.id,title:ke(w),workspace:b(w),running:w.running,runningSubagentCount:g.get(w.id)?.runningCount??0,...w.pendingInteraction===void 0?{}:{pendingInteraction:w.pendingInteraction},completed:w.completed===!0,...q===void 0?{}:{snippet:q.snippet}}}),hasMore:i.hasMore||k.length>l}}s(_s,"deriveSearchResults");function Te(e,t){const l=Math.max(0,t-e);return l<6e4?{unit:"now",n:0}:l<36e5?{unit:"minutes",n:Math.floor(l/6e4)}:l<864e5?{unit:"hours",n:Math.floor(l/36e5)}:l<30*864e5?{unit:"days",n:Math.floor(l/864e5)}:l<365*864e5?{unit:"months",n:Math.floor(l/(30*864e5))}:{unit:"years",n:Math.floor(l/(365*864e5))}}s(Te,"relativeTime");const ks='.wDdVUq_projectRow,.wDdVUq_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.wDdVUq_projectRow:hover,.wDdVUq_sessionRow:hover,.wDdVUq_sessionRow.wDdVUq_selected{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.wDdVUq_searchResultRow:hover,.wDdVUq_searchResultRow.wDdVUq_selected{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_searchResultHeading{align-items:center;min-width:0;display:flex}.wDdVUq_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.wDdVUq_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.wDdVUq_searchResultWorkspace,.wDdVUq_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.wDdVUq_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.wDdVUq_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.wDdVUq_projectRow{box-sizing:border-box;align-items:center;height:34px}.wDdVUq_projectRow .wDdVUq_rowActions{height:20px}.wDdVUq_sessionRow{height:32px;animation:wDdVUq_row-in .15s var(--ds-ease-in-out);gap:0}.wDdVUq_sessionRow .wDdVUq_title{margin:0 6px 0 4px}.wDdVUq_flatSessionRowWithoutStatus .wDdVUq_title{margin-left:0}@keyframes wDdVUq_row-in{0%{opacity:0}}.wDdVUq_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.wDdVUq_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.wDdVUq_folderActive{color:var(--dsw-alias-state-business-primary)}.wDdVUq_projectRow .wDdVUq_chevron{display:none}.wDdVUq_projectRow:hover .wDdVUq_chevron{display:inline-flex}.wDdVUq_projectRow:hover .wDdVUq_folder{display:none}.wDdVUq_arrow{transition:transform .15s var(--ds-ease-in-out)}.wDdVUq_arrowOpen{transform:rotate(90deg)}.wDdVUq_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.wDdVUq_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.wDdVUq_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.wDdVUq_sessionRow .wDdVUq_title{flex:1}.wDdVUq_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.wDdVUq_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.wDdVUq_dot{flex:none}.wDdVUq_rowActions{flex:none;align-items:center;gap:12px;display:none}.wDdVUq_projectRow:hover .wDdVUq_rowActions,.wDdVUq_sessionRow:hover .wDdVUq_rowActions,.wDdVUq_projectRow.wDdVUq_menuOpen .wDdVUq_rowActions,.wDdVUq_sessionRow.wDdVUq_menuOpen .wDdVUq_rowActions{display:inline-flex}.wDdVUq_sessionRow:hover .wDdVUq_time,.wDdVUq_sessionRow.wDdVUq_menuOpen .wDdVUq_time{display:none}.wDdVUq_projectRow.wDdVUq_menuOpen,.wDdVUq_sessionRow.wDdVUq_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_sessionRow.wDdVUq_dropBefore,.wDdVUq_sessionRow.wDdVUq_dropAfter{position:relative}.wDdVUq_sessionRow.wDdVUq_dropBefore:before,.wDdVUq_sessionRow.wDdVUq_dropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.wDdVUq_sessionRow.wDdVUq_dropBefore:before{top:-7px}.wDdVUq_sessionRow.wDdVUq_dropAfter:after{bottom:-7px}.wDdVUq_hoverContent{flex-direction:column;gap:8px;display:flex}.wDdVUq_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.wDdVUq_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.wDdVUq_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.wDdVUq_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.wDdVUq_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.wDdVUq_iconButton:hover{color:var(--dsw-alias-label-primary)}.wDdVUq_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.wDdVUq_sessionRow,.wDdVUq_arrow{transition:none;animation:none}}',Me="@deepseek-ai/dsh-client-ui-workspace/Rows.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(Me)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=Me,e.textContent=ks,document.head.appendChild(e)}var v={searchResultMeta:"wDdVUq_searchResultMeta",sessionRow:"wDdVUq_sessionRow",slot:"wDdVUq_slot",folderActive:"wDdVUq_folderActive",hoverContent:"wDdVUq_hoverContent",dropAfter:"wDdVUq_dropAfter",searchResultWorkspace:"wDdVUq_searchResultWorkspace",hoverTime:"wDdVUq_hoverTime",folder:"wDdVUq_folder",searchResultTitle:"wDdVUq_searchResultTitle",menuOpen:"wDdVUq_menuOpen",iconButton:"wDdVUq_iconButton",searchResultRow:"wDdVUq_searchResultRow",chevron:"wDdVUq_chevron",projectText:"wDdVUq_projectText",arrow:"wDdVUq_arrow",searchResultSnippet:"wDdVUq_searchResultSnippet",rowActions:"wDdVUq_rowActions",title:"wDdVUq_title",time:"wDdVUq_time",hoverStatus:"wDdVUq_hoverStatus",flatSessionRowWithoutStatus:"wDdVUq_flatSessionRowWithoutStatus",searchResultHeading:"wDdVUq_searchResultHeading",renameInput:"wDdVUq_renameInput",dot:"wDdVUq_dot",arrowOpen:"wDdVUq_arrowOpen",dropBefore:"wDdVUq_dropBefore",hoverPath:"wDdVUq_hoverPath",meta:"wDdVUq_meta",visuallyHidden:"wDdVUq_visuallyHidden",selected:"wDdVUq_selected",projectRow:"wDdVUq_projectRow","row-in":"wDdVUq_row-in",hoverTitle:"wDdVUq_hoverTitle"};function We(e,t){return e.blank?t("session.new"):e.title}s(We,"displayTitle");function qs(e,t,o){const{unit:r,n:i}=Te(e,t);return r==="now"?o("time.now"):o(`time.${r}`,{n:i})}s(qs,"timeLabel");function Ns(e,t,o){const{unit:r,n:i}=Te(e,t);return r==="now"?o("time.now"):o("time.ago",{t:o(`time.${r}`,{n:i})})}s(Ns,"hoverTimeLabel");function Ss(e,t){const o=new Date(e),r=s(i=>String(i).padStart(2,"0"),"pad2");return t("hover.created",{time:`${t("date.ymd",{y:o.getFullYear(),m:o.getMonth()+1,d:o.getDate()})} ${r(o.getHours())}:${r(o.getMinutes())}`})}s(Ss,"createdLabel");function Ds({label:e,cwd:t,createdAt:o,t:r}){return(0,n.jsxs)("div",{className:v.hoverContent,children:[(0,n.jsx)("div",{className:v.hoverTitle,children:e}),(0,n.jsx)("div",{className:v.hoverPath,children:t}),(0,n.jsx)("div",{className:v.hoverTime,children:Ss(o,r)})]})}s(Ds,"WorkspaceHoverContent");function Fe(e){const t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?"before":"after"}s(Fe,"rowHalf");function js({group:e,onToggle:t,onCreate:o,actions:r,drag:i,t:l}){const d=e,a=d.workspaceId===void 0?l("group.ungrouped"):d.label,g=e.expanded&&e.containsCurrent,[u,b]=(0,h.useState)(!1),y=[{id:"rename",label:l("rename"),icon:(0,n.jsx)(x.IconEditOutline16,{})},{id:"delete",label:l("delete.workspace"),icon:(0,n.jsx)(x.IconTrashOutline16,{}),danger:!0}],_=(0,n.jsxs)("div",{className:M(v.projectRow,u&&v.menuOpen),role:"treeitem","aria-expanded":d.expanded,onClick:t,draggable:i!==void 0,onDragStart:i===void 0?void 0:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",d.key),i.start()},onDragEnd:i?.end,children:[(0,n.jsx)("span",{className:M(v.slot,v.folder,g&&v.folderActive),children:d.expanded?(0,n.jsx)(x.IconFolderOpen16,{}):(0,n.jsx)(x.IconFolderClose16,{})}),(0,n.jsx)("span",{className:M(v.slot,v.chevron),children:(0,n.jsx)(x.IconTriangleRightFill14,{className:M(v.arrow,d.expanded&&v.arrowOpen)})}),(0,n.jsx)("span",{className:v.projectText,children:(0,n.jsx)("span",{className:v.title,children:a})}),(0,n.jsxs)("span",{className:v.rowActions,children:[r!==void 0&&(0,n.jsx)(x.Menu,{open:u,onClose:s(()=>{b(!1)},"onClose"),items:y,onSelect:s(k=>{b(!1),!(k!=="rename"&&k!=="delete")&&(k==="rename"?r.rename():r.delete())},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":l("actions.workspace.aria",{name:a}),onClick:s(k=>{k.stopPropagation(),b(B=>!B)},"onClick"),children:(0,n.jsx)(x.IconEllipsisOutline16,{})})}),(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":l("actions.newSession.aria",{name:a}),onClick:s(k=>{k.stopPropagation(),o()},"onClick"),children:(0,n.jsx)(x.IconPlusOutline16,{})})]})]});return d.createdAt===void 0?_:(0,n.jsx)(x.HoverCard,{anchor:_,content:(0,n.jsx)(Ds,{label:d.label,cwd:d.cwd,createdAt:d.createdAt,t:l}),disabled:u,copyText:d.cwd,copyLabel:l("copy"),copiedLabel:l("hover.copied")})}s(js,"ProjectRowItem");function Is(e){throw new Error(`unknown pending interaction: ${String(e)}`)}s(Is,"assertNever");function qe(e,t){const o=e.runningSubagentCount===0?void 0:{state:"ongoing",label:t(e.runningSubagentCount===1?"status.subagentsRunning.one":"status.subagentsRunning.other",{n:e.runningSubagentCount})};let r;switch(e.pendingInteraction){case"approval":r={state:"warning",label:t("status.waitingApproval")};break;case"plan-review":r={state:"warning",label:t("status.planReview")};break;case"question":r={state:"warning",label:t("status.waitingAnswer")};break;case void 0:break;default:return Is(e.pendingInteraction)}if(r!==void 0)return o===void 0?[r]:[r,o];if(e.running){const i={state:"ongoing",label:t("status.running")};return o===void 0?[i]:[i,o]}return o!==void 0?[o]:e.completed?[{state:"done",label:t("status.completed")}]:[{state:"done",label:t("status.idle")}]}s(qe,"sessionStatuses");function ze({statuses:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.StateDot,{state:e[0].state}),e.map(t=>(0,n.jsx)("span",{className:v.visuallyHidden,children:t.label},t.label))]})}s(ze,"SessionStatusDots");function Ls({node:e,now:t,t:o}){const r=qe(e,o);return(0,n.jsxs)("div",{className:v.hoverContent,children:[(0,n.jsx)("div",{className:v.hoverTitle,children:We(e,o)}),!e.blank&&(0,n.jsx)("div",{className:v.hoverTime,children:Ns(e.updatedAt,t,o)}),r.map(i=>(0,n.jsxs)("div",{className:v.hoverStatus,children:[(0,n.jsx)(x.StateDot,{state:i.state}),(0,n.jsx)("span",{children:i.label})]},i.label))]})}s(Ls,"SessionHoverContent");function Rs({result:e,currentId:t,onOpen:o,t:r}){const i=e.id===t,l=qe(e,r),d=l[0];return(0,n.jsxs)("button",{type:"button",className:M(v.searchResultRow,i&&v.selected),role:"treeitem","aria-selected":i,onClick:s(()=>{o(e.id)},"onClick"),children:[(0,n.jsxs)("span",{className:v.searchResultHeading,children:[(0,n.jsx)("span",{className:v.slot,children:(d.state!=="done"||e.completed)&&(0,n.jsx)(ze,{statuses:l})}),(0,n.jsx)("span",{className:v.searchResultTitle,children:e.title})]}),(0,n.jsxs)("span",{className:v.searchResultMeta,children:[(0,n.jsx)("span",{className:v.searchResultWorkspace,children:e.workspace}),e.snippet!==void 0&&(0,n.jsx)("span",{className:v.searchResultSnippet,children:e.snippet})]})]})}s(Rs,"SearchResultItem");function Pe({node:e,currentId:t,now:o,onOpen:r,onRename:i,onFork:l,onArchive:d,drag:a,flat:g=!1,t:u}){const b=e,y=We(e,u),_=e.id===t,k=qe(e,u),B=k[0].state!=="done"||b.completed,[V,w]=(0,h.useState)(!1),q=[{id:"rename",label:u("rename"),icon:(0,n.jsx)(x.IconEditOutline16,{})},{id:"fork",label:u("menu.fork"),icon:(0,n.jsx)(x.IconBranchOutline16,{})},{id:"archive",label:u("menu.archiveSession"),icon:(0,n.jsx)(x.IconArchiveOutline20,{size:16})}],H=(0,n.jsxs)("div",{className:M(v.sessionRow,_&&v.selected,V&&v.menuOpen,g&&!B&&v.flatSessionRowWithoutStatus,a?.marker==="before"&&v.dropBefore,a?.marker==="after"&&v.dropAfter),role:"treeitem","aria-selected":_,onClick:s(()=>{r(e.id)},"onClick"),draggable:a!==void 0,onDragStart:a===void 0?void 0:S=>{S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",e.id),a.start()},onDragEnd:a?.end,onDragOver:a===void 0?void 0:S=>{a.active&&(S.preventDefault(),S.dataTransfer.dropEffect="move",a.hover(Fe(S)))},onDrop:a===void 0?void 0:S=>{a.active&&(S.preventDefault(),a.drop(Fe(S)))},children:[(!g||B)&&(0,n.jsx)("span",{className:v.slot,children:B&&(0,n.jsx)(ze,{statuses:k})}),(0,n.jsx)("span",{className:v.title,children:y}),!b.blank&&(0,n.jsx)("span",{className:v.time,children:qs(b.updatedAt,o,u)}),!b.blank&&(0,n.jsx)("span",{className:v.rowActions,children:(0,n.jsx)(x.Menu,{open:V,onClose:s(()=>{w(!1)},"onClose"),items:q,onSelect:s(S=>{w(!1),S==="rename"&&i(e.id,b.title),S==="fork"&&l(e.id),S==="archive"&&d(e.id)},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":u("actions.session.aria",{name:y}),onClick:s(S=>{S.stopPropagation(),w(m=>!m)},"onClick"),children:(0,n.jsx)(x.IconEllipsisOutline16,{})})})})]});return(0,n.jsx)(x.HoverCard,{anchor:H,content:(0,n.jsx)(Ls,{node:e,now:o,t:u}),disabled:V||a?.active===!0,copyText:b.blank?void 0:b.title,copyLabel:u("copy"),copiedLabel:u("hover.copied")})}s(Pe,"SessionNodeItem");const Us=".eBk4YW_modalAction{min-width:72px}.eBk4YW_modalError,.eBk4YW_menuStatus{margin-top:8px;font-size:12px;line-height:18px}.eBk4YW_modalError{color:var(--dsw-alias-state-error-primary)}.eBk4YW_menuStatus{color:var(--dsw-alias-label-secondary)}",He="@deepseek-ai/dsh-client-ui-workspace/WorkspacePicker.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(He)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=He,e.textContent=Us,document.head.appendChild(e)}var be={modalAction:"eBk4YW_modalAction",modalError:"eBk4YW_modalError",menuStatus:"eBk4YW_menuStatus"};const Ye="::add-workspace";function Ge({t:e,open:t,anchorRef:o,useWorkspaces:r,createWorkspace:i,useDirectoryFlow:l,renderDirectoryFlow:d,onPick:a,onClose:g,addOnly:u=!1,side:b="bottom",selectedId:y}){const _=r(R=>R),k=_.items,B=(0,h.useCallback)(()=>o?.current?.getBoundingClientRect()??null,[o]),[V,w]=(0,h.useState)(!1),[q,H]=(0,h.useState)(null),[S,m]=(0,h.useState)(!1),[W,j]=(0,h.useState)(!1),A=S||W,I=l(R=>R);(0,h.useEffect)(()=>{S&&!I&&m(!1)},[S,I]);const L=I?[{id:Ye,label:e("menu.addWorkspace"),icon:(0,n.jsx)(x.IconPlusOutline16,{size:16}),disabled:A}]:[],F=!u&&k.length>0,C=F?k.map(R=>({id:R.workspaceId,label:R.title,icon:(0,n.jsx)(x.IconFolderClose16,{size:16}),disabled:A})):L,Y=C.length===0,X=s(()=>{w(!1),H(null)},"closeModal"),T=s(R=>i({path:R}).then(se=>{m(!1),a(se.workspaceId)}).catch(se=>{H(se instanceof Error?se.message:String(se)),m(!1),w(!0)}),"adoptDirectory"),Z=(0,h.useCallback)(()=>{g(),w(!1),H(null),m(!0)},[g]),z=u||_.phase==="ready",G=!F&&z&&L.length===1;(0,h.useEffect)(()=>{t&&G&&!A&&Z()},[t,G,A,Z]);const K={open:S,busy:W,onPicked:s(R=>{j(!0),T(R).finally(()=>{j(!1)})},"onPicked"),onCancel:s(()=>{m(!1)},"onCancel"),onError:s(R=>{m(!1),H(R),w(!0)},"onError")},de=s(R=>{if(R===Ye){Z();return}a(R)},"handleSelect");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Menu,{open:t&&!G&&!Y,anchor:null,items:C,...F?{footer:L}:{},selectedId:y,onSelect:de,onClose:g,side:b,portal:!0,getAnchorRect:B}),t&&!G&&!Y&&_.phase==="pending"&&(0,n.jsx)("div",{className:be.menuStatus,role:"status",children:e("picker.loading")}),d(K),(0,n.jsx)(x.Modal,{open:V,onClose:X,closeLabel:e("close"),title:e("folderError.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",className:be.modalAction,onClick:X,children:e("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",className:be.modalAction,disabled:!I,onClick:Z,children:e("folderError.retry")})]}),children:(0,n.jsx)("div",{className:be.modalError,role:"alert",children:q})})]})}s(Ge,"WorkspacePickFlow");function As({open:e,anchorRef:t,useWorkspaces:o,selectedId:r,onPick:i,onClose:l,createWorkspace:d,useDirectoryFlow:a,renderSlot:g,t:u}){return(0,n.jsx)(Ge,{t:u,open:e,anchorRef:t,useWorkspaces:o,createWorkspace:d,useDirectoryFlow:a,renderDirectoryFlow:s(b=>g("conversation.hero.workspace.directoryFlow",b),"renderDirectoryFlow"),selectedId:r,onPick:i,onClose:l})}s(As,"WorkspacePicker");const Vs='.LauNbq_root{--dsh-session-list-edge-inset:var(--dsh-sidebar-inline-padding);--dsh-session-list-scrollbar-width:8px;--dsh-session-list-scrollbar-offset:2px;box-sizing:border-box;min-height:0;padding-right:var(--dsh-session-list-edge-inset);flex-direction:column;flex:1;display:flex}.LauNbq_root.LauNbq_rail{padding-right:0}.LauNbq_iconButton{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_sectionHeader{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}.LauNbq_root:not(.LauNbq_rail) .LauNbq_sectionHeader{margin-top:2px;margin-right:-4px}.LauNbq_sectionLabel{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}.LauNbq_sectionLabelHidden{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}.LauNbq_searchSlot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}.LauNbq_searchSlotExpanded{max-width:100%;padding-left:0}.LauNbq_headerActions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}.LauNbq_headerActionsHidden{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}.LauNbq_search{box-sizing:border-box;cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;border-radius:50%;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}.LauNbq_searchExpanded{border:1px solid var(--dsw-alias-border-l2);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;border-radius:10px;margin-inline:-2px;padding:0 4px 0 0}.LauNbq_searchButton{cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_searchExpanded .LauNbq_searchButton{width:28px;height:30px}.LauNbq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_searchExpanded .LauNbq_searchButton:hover{background:0 0}.LauNbq_searchInput{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}.LauNbq_searchExpanded .LauNbq_searchInput{opacity:1;pointer-events:auto;margin-left:-2px}.LauNbq_searchInput::placeholder{color:var(--dsw-alias-label-tertiary)}.LauNbq_clearButton{cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_clearButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_rail .LauNbq_sectionHeader{justify-content:flex-start;gap:0;margin-bottom:12px;padding-left:0}.LauNbq_rail .LauNbq_headerActions{max-width:none}.LauNbq_rail .LauNbq_iconButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.LauNbq_rail .LauNbq_search{background:0 0;border-color:#0000;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.LauNbq_rail .LauNbq_searchButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.LauNbq_rail .LauNbq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_listArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-session-list-edge-inset));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:visible}.LauNbq_rail .LauNbq_listArea{margin-left:0;margin-right:0;padding-left:0}.LauNbq_treeBody{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.LauNbq_fade{left:0;right:var(--dsh-session-list-edge-inset);background:linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));pointer-events:none;height:24px;position:absolute;bottom:0}.LauNbq_wide{animation:LauNbq_wide-in .2s var(--ds-ease-in-out)}@keyframes LauNbq_wide-in{0%{opacity:0}}.LauNbq_list{min-height:0;margin-left:-4px;margin-right:var(--dsh-session-list-scrollbar-offset);padding-left:4px;padding-right:calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));scrollbar-gutter:stable;flex:1;padding-bottom:16px;overflow-y:auto}.LauNbq_flatList>*+*,.LauNbq_searchTree>[role=treeitem]+[role=treeitem],.LauNbq_groupSection>*+*{margin-top:2px}.LauNbq_searchStatus,.LauNbq_searchWarning{color:var(--dsw-alias-label-tertiary);padding:10px 12px;font-size:12px;line-height:18px}.LauNbq_searchWarning{color:var(--dsw-alias-label-secondary)}.LauNbq_groupSection{position:relative}.LauNbq_groupSection+.LauNbq_groupSection{margin-top:4px}.LauNbq_listTopDropIndicator,.LauNbq_workspaceDropBefore:before,.LauNbq_workspaceDropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:0}.LauNbq_listTopDropIndicator{top:-8px;left:0;right:var(--dsh-session-list-edge-inset)}.LauNbq_listTopDropActive>.LauNbq_workspaceDropBefore:first-child:before{display:none}.LauNbq_workspaceDropBefore:before{top:-8px}.LauNbq_workspaceDropAfter:after{bottom:-8px}.LauNbq_sessionOverflowButton{cursor:pointer;text-align:left;width:100%;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:8px;padding:0 12px 0 28px;font-size:12px}.LauNbq_groupSection>.LauNbq_sessionOverflowButton{margin-top:0}.LauNbq_sessionOverflowButton:hover{color:var(--dsw-alias-label-secondary);background:0 0}.LauNbq_empty{color:var(--dsw-alias-label-tertiary);padding:16px 12px;font-size:13px}.LauNbq_renameInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.LauNbq_renameInput:disabled{color:var(--dsw-alias-label-dimmed)}.LauNbq_renameError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}.LauNbq_deleteAction:not(:disabled){color:var(--dsw-alias-state-error-primary)}.LauNbq_deleteStatus{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.LauNbq_wide{animation:none}.LauNbq_search,.LauNbq_sectionLabel,.LauNbq_searchSlot,.LauNbq_searchInput,.LauNbq_headerActions{transition:none}}',Ke="@deepseek-ai/dsh-client-ui-workspace/WorkspaceBrowser.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(Ke)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=Ke,e.textContent=Vs,document.head.appendChild(e)}var f={wide:"LauNbq_wide",searchWarning:"LauNbq_searchWarning",workspaceDropBefore:"LauNbq_workspaceDropBefore",listTopDropIndicator:"LauNbq_listTopDropIndicator",renameError:"LauNbq_renameError",listArea:"LauNbq_listArea",groupSection:"LauNbq_groupSection",fade:"LauNbq_fade",treeBody:"LauNbq_treeBody",listTopDropActive:"LauNbq_listTopDropActive",searchExpanded:"LauNbq_searchExpanded",deleteStatus:"LauNbq_deleteStatus",searchStatus:"LauNbq_searchStatus",rail:"LauNbq_rail",root:"LauNbq_root",searchSlotExpanded:"LauNbq_searchSlotExpanded",list:"LauNbq_list",flatList:"LauNbq_flatList","wide-in":"LauNbq_wide-in",searchButton:"LauNbq_searchButton",sessionOverflowButton:"LauNbq_sessionOverflowButton",deleteAction:"LauNbq_deleteAction",sectionLabelHidden:"LauNbq_sectionLabelHidden",headerActionsHidden:"LauNbq_headerActionsHidden",headerActions:"LauNbq_headerActions",searchSlot:"LauNbq_searchSlot",search:"LauNbq_search",empty:"LauNbq_empty",iconButton:"LauNbq_iconButton",renameInput:"LauNbq_renameInput",sectionHeader:"LauNbq_sectionHeader",clearButton:"LauNbq_clearButton",searchTree:"LauNbq_searchTree",sectionLabel:"LauNbq_sectionLabel",workspaceDropAfter:"LauNbq_workspaceDropAfter",searchInput:"LauNbq_searchInput"};const Es=300,Bs=250,Ne=500,Se=5;function $e(e){const t=e.replaceAll("\0","");if(t.length<=Ne)return t;let o=Ne;const r=t.charCodeAt(o-1),i=t.charCodeAt(o);return r>=55296&&r<=56319&&i>=56320&&i<=57343&&o--,t.slice(0,o)}s($e,"sanitizeSearchQuery");function Os(e,t){return e.includes(t)?e.filter(o=>o!==t):[...e,t]}s(Os,"toggled");function Qe(e){(0,h.useEffect)(()=>{if(!e)return;const t=s(r=>{r.preventDefault(),r.dataTransfer!==null&&(r.dataTransfer.dropEffect="move")},"acceptDrag"),o=s(r=>{r.preventDefault()},"acceptDrop");return document.addEventListener("dragover",t),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",t),document.removeEventListener("drop",o)}},[e])}s(Qe,"useNativeDragAcceptance");function ge(e,t){if(t===void 0)return[...e];const o=new Map(e.map(l=>[l,l])),r=[],i=new Set;for(const l of t){const d=o.get(l);d===void 0||i.has(l)||(r.push(d),i.add(l))}for(const l of e)i.has(l)||r.push(l);return r}s(ge,"reconciledSessionOrder");function Je(e,t,o){const r=o[e]?.updatedAt??Number.NEGATIVE_INFINITY,i=o[t]?.updatedAt??Number.NEGATIVE_INFINITY;return r!==i?i-r:e<t?-1:1}s(Je,"compareSessionRecency");function Xe({sessionIds:e,previousOrder:t,previousUpdatedAt:o,list:r,orderBy:i,sortByRecency:l}){let d=ge(e,t);if(l)d.sort((b,y)=>Je(b,y,r.byId));else if(i==="updated"){const b=e.filter(y=>{const _=r.byId[y];return _!==void 0&&(o[y]===void 0||_.updatedAt>o[y])}).sort((y,_)=>Je(y,_,r.byId));if(b.length>0){const y=new Set(b);d=[...b,...d.filter(_=>!y.has(_))]}}const a={};for(const b of e){const y=r.byId[b];y!==void 0&&(a[b]=y.updatedAt)}const g=t===void 0||d.length!==t.length||d.some((b,y)=>b!==t[y]),u=Object.keys(a).length!==Object.keys(o).length||Object.entries(a).some(([b,y])=>o[b]!==y);return{order:d,updatedAt:a,changed:g||u}}s(Xe,"nextSessionOrderAccount");function Cs({groupBy:e,orderBy:t,onGroupPick:o,onOrderPick:r,t:i}){const[l,d]=(0,h.useState)(!1);return(0,n.jsx)(x.Menu,{open:l,onClose:s(()=>{d(!1)},"onClose"),items:[{type:"label",id:"group-by",text:i("groupBy.label")},{id:"workspace",label:i("groupBy.workspace")},{id:"flat",label:i("groupBy.flat")},{type:"separator",id:"order-by-separator"},{type:"label",id:"order-by",text:i("orderBy.label")},{id:"manual",label:i("orderBy.manual")},{id:"updated",label:i("orderBy.updated")}],selectedIds:[e,t],onSelect:s(a=>{a==="workspace"||a==="flat"?o(a):(a==="manual"||a==="updated")&&r(a),d(!1)},"onSelect"),align:"end",dense:!0,portal:!0,anchor:(0,n.jsx)(x.Tooltip,{label:i("viewOptions.label"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{type:"button",className:M(f.iconButton,f.wide),"aria-label":i("viewOptions.label"),onClick:s(()=>{d(a=>!a)},"onClick"),children:(0,n.jsx)(x.IconPersonalizationOutline16,{})})})})}s(Cs,"ViewOptionsMenu");function Ze(e){const t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?"before":"after"}s(Ze,"workspaceGroupHalf");function Ts({useSessions:e,startSession:t,open:o,forkSession:r,workspaces:i,archivedSessionIds:l,onRenameRequest:d,onDeleteRequest:a,onSessionRename:g,onSessionArchive:u,insertWorkspaceBefore:b,insertSessionBefore:y,orderBy:_,groupExpansion:k,setGroupExpanded:B,sessionOrderByAccount:V,sessionUpdatedAtByAccount:w,syncSessionOrderAccount:q,setSessionOrder:H,t:S}){const m=e(p=>p),W=m.current,[j,A]=(0,h.useState)([]),[I,L]=(0,h.useState)(null),F=(0,h.useRef)(!1),[C,Y]=(0,h.useState)(null),X=(0,h.useRef)(!1),T=(0,h.useRef)(_);Qe(I!==null||C!==null);const Z=W===void 0?void 0:i.find(p=>p.sessionIds.includes(W))?.workspaceId??"";(0,h.useEffect)(()=>{W===void 0||Z===void 0||Object.hasOwn(k,Z)||B(Z,!0)},[W,Z,B,k]);const z=(0,h.useMemo)(()=>Object.entries(k).filter(([,p])=>p).map(([p])=>p),[k]),G=(0,h.useMemo)(()=>{const p=new Set(i.flatMap(D=>D.sessionIds));return m.ids.filter(D=>m.byId[D]!==void 0&&!p.has(D))},[m,i]);(0,h.useEffect)(()=>{if(m.phase!=="ready")return;const p=T.current!=="updated"&&_==="updated";T.current=_;const D=[...i.map(U=>({key:U.workspaceId,sessionIds:U.sessionIds.filter($=>m.byId[$]!==void 0)})),{key:"",sessionIds:G}];for(const{key:U,sessionIds:$}of D){const E=V[U],P=Xe({sessionIds:$,previousOrder:E,previousUpdatedAt:w[U]??{},list:m,orderBy:_,sortByRecency:_==="updated"&&(E===void 0||p)});P.changed&&q(U,P.order.map(N=>N),P.updatedAt)}},[m,_,V,w,q,G,i]);const K=(0,h.useMemo)(()=>i.map(p=>{const D=V[p.workspaceId],U=ge(p.sessionIds,D);return{...p,sessionIds:U}}),[V,i]),de=(0,h.useMemo)(()=>ge(G,V[""]),[V,G]),R=(0,h.useMemo)(()=>vs(m,K,l,{expandedGroups:z,...V[""]===void 0?{}:{ungroupedOrder:V[""]}}),[m,K,l,z,V]),se=Date.now(),te=s((p,D)=>{if(F.current)return;F.current=!0,L(null);const U=R.find(O=>O.key===p.accountKey);if(U===void 0)return;const $=U.sessions.findIndex(O=>O.id===D.id);if($===-1)return;const E=D.half==="before"?D.id:U.sessions[$+1]?.id;if(E===p.sessionId)return;const P=U.sessions.findIndex(O=>O.id===p.sessionId),N=E===void 0?U.sessions.length:U.sessions.findIndex(O=>O.id===E);if(P!==-1&&(N===P||N===P+1))return;const Q=p.accountKey===""?de:K.find(O=>O.workspaceId===p.accountKey)?.sessionIds;if(Q===void 0)return;const ee=Q.filter(O=>O!==p.sessionId),ne=E===void 0?ee.length:ee.indexOf(E);ee.splice(ne===-1?ee.length:ne,0,p.sessionId),H(p.accountKey,ee.map(O=>O)),!(_==="updated"||p.accountKey==="")&&y(p.accountKey,p.sessionId,E).catch(O=>{console.warn("session reorder rejected:",O)})},"commitSessionDrag"),xe=s((p,D)=>{if(X.current)return;X.current=!0,Y(null);const U=i.findIndex(N=>N.workspaceId===D.id);if(U===-1)return;const $=D.half==="before"?D.id:i[U+1]?.workspaceId;if($===p.workspaceId)return;const E=i.findIndex(N=>N.workspaceId===p.workspaceId),P=$===void 0?i.length:i.findIndex(N=>N.workspaceId===$);E!==-1&&(P===E||P===E+1)||b(p.workspaceId,$).catch(N=>{console.warn("workspace reorder rejected:",N)})},"commitWorkspaceDrag"),oe=R[0]?.workspaceId!==void 0&&C?.over?.id===R[0].workspaceId&&C.over.half==="before";return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[oe&&(0,n.jsx)("span",{className:f.listTopDropIndicator,"aria-hidden":"true"}),(0,n.jsxs)("div",{className:M(f.list,oe&&f.listTopDropActive),role:"tree","aria-label":S("section.sessions"),children:[R.length===0&&(0,n.jsx)("div",{className:f.empty,children:S("empty.none")}),R.map(p=>{const D=p.workspaceId,U=D!==void 0&&C?.over?.id===D?C.over.half:null,$=D===void 0?void 0:{start:s(()=>{X.current=!1,Y({workspaceId:D,over:null})},"start"),end:s(()=>{C?.over!==null&&C?.over!==void 0?xe(C,C.over):Y(null),X.current=!1},"end")},E=D===void 0?void 0:N=>{Y(Q=>Q===null?Q:{...Q,over:{id:D,half:N}})},P=D===void 0?void 0:N=>{C!==null&&xe(C,{id:D,half:N})};return(0,n.jsxs)("div",{className:M(f.groupSection,U==="before"&&f.workspaceDropBefore,U==="after"&&f.workspaceDropAfter),onDragOver:C===null||E===void 0?void 0:N=>{N.preventDefault(),N.dataTransfer.dropEffect="move",E(Ze(N))},onDrop:C===null||P===void 0?void 0:N=>{N.preventDefault(),P(Ze(N))},children:[(0,n.jsx)(js,{group:p,t:S,onToggle:s(()=>{p.expanded&&A(N=>N.filter(Q=>Q!==p.key)),B(p.key,!p.expanded)},"onToggle"),onCreate:s(()=>{p.workspaceId!==void 0&&(B(p.key,!0),t(p.workspaceId))},"onCreate"),drag:$,actions:p.workspaceId===void 0?void 0:{rename:s(()=>{p.workspaceId!==void 0&&d(p.workspaceId,p.label)},"rename"),delete:s(()=>{p.workspaceId!==void 0&&a(p.workspaceId,p.label)},"delete")}}),(j.includes(p.key)?p.sessions:p.sessions.slice(0,Se)).map(N=>{const Q=I!==null&&I.accountKey===p.key,ee={start:s(()=>{F.current=!1,L({accountKey:p.key,sessionId:N.id,over:null})},"start"),active:Q,marker:Q&&I.over?.id===N.id?I.over.half:null,hover:s(ne=>{L(O=>O===null?O:{...O,over:{id:N.id,half:ne}})},"hover"),drop:s(ne=>{I!==null&&te(I,{id:N.id,half:ne})},"drop"),end:s(()=>{I?.over!==null&&I?.over!==void 0?te(I,I.over):L(null),F.current=!1},"end")};return(0,n.jsx)(Pe,{node:N,currentId:W,now:se,onOpen:o,onRename:g,onFork:r,onArchive:u,drag:ee,t:S},N.id)}),p.sessions.length>Se&&(0,n.jsx)("button",{type:"button",className:f.sessionOverflowButton,"aria-expanded":j.includes(p.key),onClick:s(()=>{A(N=>Os(N,p.key))},"onClick"),children:j.includes(p.key)?S("sessions.collapse"):S("sessions.expand",{n:p.sessions.length-Se})})]},p.key)})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ts,"SessionTree");function Ms({useSessions:e,open:t,forkSession:o,onSessionRename:r,onSessionArchive:i,archivedSessionIds:l,orderBy:d,sessionOrderByAccount:a,sessionUpdatedAtByAccount:g,syncSessionOrderAccount:u,setSessionOrder:b,t:y}){const _=e(j=>j),k=(0,h.useMemo)(()=>ys(_,l),[_,l]),B=(0,h.useMemo)(()=>k.map(j=>j.id),[k]),V=(0,h.useRef)(d);(0,h.useEffect)(()=>{if(_.phase!=="ready")return;const j=a[ie],A=g.__flat_session_order__??{},I=V.current!=="updated"&&d==="updated";V.current=d;const L=Xe({sessionIds:B,previousOrder:j,previousUpdatedAt:A,list:_,orderBy:d,sortByRecency:d==="updated"&&(j===void 0||I)});L.changed&&u(ie,L.order.map(F=>F),L.updatedAt)},[_,d,a,g,B,u]);const w=(0,h.useMemo)(()=>{const j=new Map(k.map(A=>[A.id,A]));return ge(B,a[ie]).flatMap(A=>{const I=j.get(A);return I===void 0?[]:[I]})},[k,a,B]),[q,H]=(0,h.useState)(null),S=(0,h.useRef)(!1);Qe(q!==null);const m=s((j,A)=>{if(S.current)return;S.current=!0,H(null);const I=w.findIndex(T=>T.id===A.id);if(I===-1)return;const L=A.half==="before"?A.id:w[I+1]?.id;if(L===j.sessionId)return;const F=w.findIndex(T=>T.id===j.sessionId),C=L===void 0?w.length:w.findIndex(T=>T.id===L);if(F!==-1&&(C===F||C===F+1))return;const Y=w.map(T=>T.id).filter(T=>T!==j.sessionId),X=L===void 0?Y.length:Y.indexOf(L);Y.splice(X===-1?Y.length:X,0,j.sessionId),b(ie,Y.map(T=>T))},"commitDrag"),W=Date.now();return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[(0,n.jsxs)("div",{className:M(f.list,f.flatList),role:"tree","aria-label":y("section.sessions"),children:[w.length===0&&(0,n.jsx)("div",{className:f.empty,children:y("empty.none")}),w.map(j=>{const A=q!==null;return(0,n.jsx)(Pe,{node:j,currentId:_.current,now:W,onOpen:t,onRename:r,onFork:o,onArchive:i,flat:!0,drag:{start:s(()=>{S.current=!1,H({accountKey:ie,sessionId:j.id,over:null})},"start"),active:A,marker:A&&q.over?.id===j.id?q.over.half:null,hover:s(I=>{H(L=>L===null?L:{...L,over:{id:j.id,half:I}})},"hover"),drop:s(I=>{q!==null&&m(q,{id:j.id,half:I})},"drop"),end:s(()=>{q?.over!==null&&q?.over!==void 0?m(q,q.over):H(null),S.current=!1},"end")},t:y},j.id)})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ms,"FlatList");function Ws({useSessions:e,open:t,workspaces:o,archivedSessionIds:r,query:i,remote:l,resultLimit:d,t:a}){const g=e(k=>k),u=l.query===i?l:{query:i,status:"loading",items:[],hasMore:!1},b=(0,h.useMemo)(()=>_s(g,o,i,r,u,d),[g,o,i,r,u,d]),y=u.status==="loading",_=u.status==="error";return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[(0,n.jsxs)("div",{className:f.list,children:[(0,n.jsx)("div",{className:f.searchTree,role:"tree","aria-label":a("search.results.aria"),children:b.items.map(k=>(0,n.jsx)(Rs,{result:k,currentId:g.current,onOpen:t,t:a},k.id))}),y&&(0,n.jsx)("div",{className:f.searchStatus,role:"status",children:a("search.pending")}),_&&(0,n.jsx)("div",{className:f.searchWarning,role:"status",children:a("search.unavailable")}),!y&&b.items.length===0&&(0,n.jsx)("div",{className:f.empty,children:a("search.noMatches")}),b.hasMore&&(0,n.jsx)("div",{className:f.searchStatus,children:a("search.hasMore",{n:d})})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ws,"SearchResults");function Fs({wide:e,expandSidebar:t,useSessions:o,useWorkspaces:r,useStore:i,actions:l,startSession:d,open:a,renameSession:g,forkSession:u,renameWorkspace:b,deleteWorkspace:y,insertWorkspaceBefore:_,archiveSession:k,insertSessionBefore:B,createWorkspace:V,searchSessions:w,searchResultLimit:q,useDirectoryFlow:H,renderSlot:S,t:m}){const W=r(c=>c.items),j=r(c=>c.phase),A=r(c=>c.archivedSessionIds),I=H(c=>c),L=i(c=>c.groupBy),F=i(c=>c.orderBy),C=i(c=>c.groupExpansion),Y=i(c=>c.sessionOrderByAccount),X=i(c=>c.sessionUpdatedAtByAccount);(0,h.useEffect)(()=>{j==="ready"&&l.retainAccountKeys(["",ie,...W.map(c=>c.workspaceId)])},[l.retainAccountKeys,j,W]);const[T,Z]=(0,h.useState)(""),[z,G]=(0,h.useState)(!1),K=$e(T).trim(),[de,R]=(0,h.useState)({query:"",status:"idle",items:[],hasMore:!1}),se=(0,h.useRef)(null),te=(0,h.useRef)(null),[xe,oe]=(0,h.useState)(!1),p=(0,h.useRef)(null),D=(0,h.useRef)(!1),[U,$]=(0,h.useState)(!1);(0,h.useEffect)(()=>{if(e&&U){const c=window.setTimeout(()=>{te.current?.focus({preventScroll:!0}),$(!1)},Es);return()=>{window.clearTimeout(c)}}},[e,U]),(0,h.useEffect)(()=>{!e||!z||U||te.current?.focus({preventScroll:!0})},[e,z,U]),(0,h.useEffect)(()=>{if(!e||!z)return;const c=s(J=>{!(J.target instanceof Node)||se.current?.contains(J.target)===!0||(te.current?.blur(),K===""&&G(!1))},"onClick");return document.addEventListener("click",c),()=>{document.removeEventListener("click",c)}},[K,e,z]),(0,h.useEffect)(()=>{if(K===""){R({query:"",status:"idle",items:[],hasMore:!1});return}const c=new AbortController;R({query:K,status:"loading",items:[],hasMore:!1});const J=window.setTimeout(()=>{w(K,c.signal).then(ms=>{c.signal.aborted||R({query:K,status:"ready",items:ms.items,hasMore:ms.hasMore})}).catch(()=>{c.signal.aborted||R({query:K,status:"error",items:[],hasMore:!1})})},Bs);return()=>{window.clearTimeout(J),c.abort()}},[K,w]);const[E,P]=(0,h.useState)(null),[N,Q]=(0,h.useState)(""),[ee,ne]=(0,h.useState)(!1),[O,ue]=(0,h.useState)(null),re=N.trim(),es=E!==null&&re!==""&&re!==E.currentTitle&&W.some(c=>c.title===re),ss=ee||re===""||E===null||re===E.currentTitle||es,ns=s(()=>{ee||(P(null),ue(null))},"closeRename"),ts=s(()=>{ss||(ne(!0),ue(null),b(E.workspaceId,re).then(()=>{ne(!1),P(null)}).catch(c=>{ne(!1),ue(c instanceof Error?c.message:String(c))}))},"confirmRename"),[je,Ie]=(0,h.useState)(null),[os,rs]=(0,h.useState)(""),[ve,Le]=(0,h.useState)(!1),[as,pe]=(0,h.useState)(null),is=os.trim(),ls=ve||is===""||je===null,cs=s(()=>{ve||(Ie(null),pe(null))},"closeSessionRename"),ds=s(()=>{ls||(Le(!0),pe(null),g(je.sessionId,is).then(()=>{Le(!1),Ie(null)}).catch(c=>{Le(!1),pe(c instanceof Error?c.message:String(c))}))},"confirmSessionRename"),us=s((c,J)=>{Ie({sessionId:c,currentTitle:J}),rs(J),pe(null)},"onSessionRename"),ps=s(c=>{k(c).catch(J=>{console.warn("session archive rejected:",J)})},"onSessionArchive"),[le,Re]=(0,h.useState)(null),[he,Ue]=(0,h.useState)(!1),[Ae,Ve]=(0,h.useState)(null),[hs,ye]=(0,h.useState)(null);(0,h.useEffect)(()=>{Ae===null||W.some(c=>c.workspaceId===Ae)||(Ue(!1),Ve(null),Re(null))},[Ae,W]);const fs=s(()=>{he||(Re(null),ye(null))},"closeDelete"),Gs=s(()=>{he||le===null||(Ue(!0),Ve(null),ye(null),y(le.workspaceId).then(()=>{Ve(le.workspaceId)}).catch(c=>{Ue(!1),ye(c instanceof Error?c.message:String(c))}))},"confirmDelete");return(0,n.jsxs)("div",{className:M(f.root,!e&&f.rail),children:[(0,n.jsxs)("div",{className:f.sectionHeader,children:[e&&(0,n.jsx)("span",{className:M(f.sectionLabel,f.wide,z&&f.sectionLabelHidden),children:m(L==="flat"?"section.sessions":"section.workspaces")}),e&&(0,n.jsx)("div",{className:M(f.searchSlot,z&&f.searchSlotExpanded),children:(0,n.jsxs)("div",{ref:se,className:M(f.search,z&&f.searchExpanded),onClick:s(()=>{oe(!1),G(!0),te.current?.focus()},"onClick"),children:[(0,n.jsx)(x.Tooltip,{label:m("search"),side:"bottom",delayMs:500,disabled:z,children:(0,n.jsx)("button",{type:"button",className:f.searchButton,"aria-label":m("search.sessions.aria"),"aria-expanded":z,onClick:s(()=>{oe(!1),G(!0)},"onClick"),children:(0,n.jsx)(x.IconSearchOutline16,{size:z?11:14})})}),(0,n.jsx)("input",{ref:te,className:f.searchInput,type:"text",placeholder:m("search.placeholder"),maxLength:Ne,value:T,tabIndex:z?0:-1,onChange:s(c=>{Z($e(c.target.value))},"onChange"),onKeyDown:s(c=>{c.key==="Escape"&&(Z(""),G(!1))},"onKeyDown")}),z&&(0,n.jsx)("button",{type:"button",className:f.clearButton,"aria-label":m("search.clear"),onClick:s(c=>{c.stopPropagation(),Z(""),G(!1)},"onClick"),children:(0,n.jsx)(x.IconCloseFill14,{})})]})}),(0,n.jsxs)("div",{className:M(f.headerActions,e&&z&&f.headerActionsHidden),children:[e&&(0,n.jsx)(Cs,{groupBy:L,orderBy:F,onGroupPick:s(c=>{l.setGroupBy(c)},"onGroupPick"),onOrderPick:s(c=>{l.setOrderBy(c)},"onOrderPick"),t:m}),I&&(0,n.jsx)(x.Tooltip,{label:m("workspace.add"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{ref:p,type:"button",className:f.iconButton,"aria-label":m("workspace.add"),onClick:s(()=>{oe(c=>!c)},"onClick"),children:(0,n.jsx)(x.IconProjectAddOutline16,{size:e?16:18})})})]}),(0,n.jsx)(Ge,{t:m,open:xe,anchorRef:p,useWorkspaces:r,createWorkspace:V,useDirectoryFlow:H,renderDirectoryFlow:s(c=>S("sidebar.workspaces.directoryFlow",c),"renderDirectoryFlow"),addOnly:!0,side:"right",onPick:s(c=>{oe(!1),d(c)},"onPick"),onClose:s(()=>{oe(!1)},"onClose")})]}),!e&&(0,n.jsx)("div",{className:f.search,children:(0,n.jsx)(x.Tooltip,{label:m("search"),children:(0,n.jsx)("button",{type:"button",className:f.searchButton,"aria-label":m("search.sessions.aria"),onClick:s(()=>{G(!0),$(!0),t()},"onClick"),children:(0,n.jsx)(x.IconSearchOutline16,{size:18})})})}),(0,n.jsx)("div",{className:f.listArea,children:e&&(K!==""?(0,n.jsx)(Ws,{useSessions:o,open:a,workspaces:W,archivedSessionIds:A,query:K,remote:de,resultLimit:q,t:m}):L==="flat"?(0,n.jsx)(Ms,{useSessions:o,open:a,forkSession:u,onSessionRename:us,onSessionArchive:ps,archivedSessionIds:A,orderBy:F,sessionOrderByAccount:Y,sessionUpdatedAtByAccount:X,syncSessionOrderAccount:l.syncSessionOrderAccount,setSessionOrder:l.setSessionOrder,t:m}):(0,n.jsx)(Ts,{useSessions:o,onSessionRename:us,onSessionArchive:ps,forkSession:u,workspaces:W,groupExpansion:C,setGroupExpanded:l.setGroupExpanded,sessionOrderByAccount:Y,sessionUpdatedAtByAccount:X,syncSessionOrderAccount:l.syncSessionOrderAccount,setSessionOrder:l.setSessionOrder,archivedSessionIds:A,startSession:d,open:a,insertWorkspaceBefore:_,insertSessionBefore:B,orderBy:F,t:m,onRenameRequest:s((c,J)=>{P({workspaceId:c,currentTitle:J}),Q(J),ue(null)},"onRenameRequest"),onDeleteRequest:s((c,J)=>{Re({workspaceId:c,title:J}),ye(null)},"onDeleteRequest")}))}),(0,n.jsxs)(x.Modal,{open:E!==null,onClose:ns,closeLabel:m("close"),title:m("rename.workspace.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:ee,onClick:ns,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",disabled:ss,onClick:ts,children:m("rename")})]}),children:[(0,n.jsx)("input",{className:f.renameInput,value:N,"aria-label":m("field.workspaceName"),autoFocus:!0,disabled:ee,onFocus:s(c=>{c.target.select()},"onFocus"),onChange:s(c=>{Q(c.target.value),ue(null)},"onChange"),onCompositionStart:s(()=>{D.current=!0},"onCompositionStart"),onCompositionEnd:s(()=>{D.current=!1},"onCompositionEnd"),onKeyDown:s(c=>{c.key==="Enter"&&!D.current&&(c.preventDefault(),ts())},"onKeyDown")}),es&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:m("conflict.named",{name:re})}),O!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:O})]}),(0,n.jsxs)(x.Modal,{open:je!==null,onClose:cs,closeLabel:m("close"),title:m("rename.session.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:ve,onClick:cs,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",disabled:ls,onClick:ds,children:m("rename")})]}),children:[(0,n.jsx)("input",{className:f.renameInput,value:os,"aria-label":m("field.sessionName"),autoFocus:!0,disabled:ve,onFocus:s(c=>{c.target.select()},"onFocus"),onChange:s(c=>{rs(c.target.value),pe(null)},"onChange"),onCompositionStart:s(()=>{D.current=!0},"onCompositionStart"),onCompositionEnd:s(()=>{D.current=!1},"onCompositionEnd"),onKeyDown:s(c=>{c.key==="Enter"&&!D.current&&(c.preventDefault(),ds())},"onKeyDown")}),as!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:as})]}),(0,n.jsxs)(x.Modal,{open:le!==null,onClose:fs,closeLabel:m("close"),title:m("delete.workspace"),...le===null?{}:{description:m("delete.desc",{name:le.title})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:he,onClick:fs,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"outline",className:f.deleteAction,disabled:he,onClick:Gs,children:m("delete.workspace")})]}),children:[he&&(0,n.jsx)("div",{className:f.deleteStatus,role:"status",children:m("delete.pending")}),hs!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:hs})]})]})}s(Fs,"WorkspaceBrowser");const zs={"group.ungrouped":"未分组","session.new":"新会话","section.workspaces":"工作区","section.sessions":"会话","viewOptions.label":"视图选项","groupBy.label":"分组方式","groupBy.workspace":"按工作区","groupBy.flat":"单列表","orderBy.label":"排序方式","orderBy.manual":"手动排序","orderBy.updated":"最近更新","sessions.expand":"展开其余 {n} 个会话","sessions.collapse":"收起","empty.none":"暂无会话","empty.noMatches":"无匹配结果","workspace.add":"添加工作区","search.sessions.aria":"搜索会话","search.placeholder":"搜索会话…","search.clear":"清除搜索","search.results.aria":"搜索结果","search.pending":"正在搜索会话历史…","search.unavailable":"内容搜索暂不可用,仅显示名称匹配。","search.noMatches":"无匹配会话","search.hasMore":"仅显示前 {n} 条结果,请缩小搜索范围。","menu.addWorkspace":"添加工作区…","picker.loading":"正在加载工作区…","conflict.named":"已存在名为“{name}”的工作区。","folderError.title":"无法打开文件夹","folderError.retry":"重新选择",rename:"重命名","rename.workspace.title":"重命名工作区","rename.session.title":"重命名会话","field.workspaceName":"工作区名称","field.sessionName":"会话名称","delete.workspace":"删除工作区","delete.desc":"将把“{name}”从工作区列表中移除。文件夹与会话记录会保留,其会话将显示在“未分组”下。","delete.pending":"正在删除工作区…","menu.fork":"分叉会话","menu.archiveSession":"归档会话","sessions.count.one":"{n} 个会话","sessions.count.other":"{n} 个会话","actions.workspace.aria":"工作区“{name}”的操作","actions.session.aria":"会话“{name}”的操作","actions.newSession.aria":"在“{name}”中新建会话","status.running":"进行中","status.subagentsRunning.one":"{n} 个子代理运行中","status.subagentsRunning.other":"{n} 个子代理运行中","status.idle":"空闲","status.waitingApproval":"等待审批","status.planReview":"计划待审","status.waitingAnswer":"等待回答","status.completed":"已完成","hover.created":"创建于 {time}","hover.copied":"已复制","date.ymd":"{y}年{m}月{d}日","time.now":"刚刚","time.minutes":"{n}分钟","time.hours":"{n}小时","time.days":"{n}天","time.months":"{n}个月","time.years":"{n}年","time.ago":"{t}前"},Ps={"group.ungrouped":"Ungrouped","session.new":"New Session","section.workspaces":"Workspaces","section.sessions":"Sessions","viewOptions.label":"View options","groupBy.label":"Group by","groupBy.workspace":"WorkSpace","groupBy.flat":"In one list","orderBy.label":"Order by","orderBy.manual":"Manual","orderBy.updated":"Last updated","sessions.expand":"Show {n} more sessions","sessions.collapse":"Show less","empty.none":"No sessions yet","empty.noMatches":"No matches","workspace.add":"Add workspace","search.sessions.aria":"Search sessions","search.placeholder":"Search sessions...","search.clear":"Clear search","search.results.aria":"Search results","search.pending":"Searching session history…","search.unavailable":"Content search is temporarily unavailable. Showing name matches.","search.noMatches":"No matching sessions","search.hasMore":"Showing the first {n} results. Narrow your search.","menu.addWorkspace":"Add workspace…","picker.loading":"Loading workspaces…","conflict.named":"A workspace named “{name}” already exists.","folderError.title":"Couldn’t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes “{name}” from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace…","menu.fork":"Fork session","menu.archiveSession":"Archive session","sessions.count.one":"{n} session","sessions.count.other":"{n} sessions","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},De="workspace",Hs=["slots","sessions","workspaces","locale"];function Ys(e){e.effect(()=>e.locale.register(De,{zh:zs,en:Ps}),"ui-workspace: dictionaries");const t=s(async(a,g)=>{const u=await e.sessions.search(a,g);if(!u.ok)throw new Error(u.error.message);return u.value},"searchSessions"),o=s(a=>({getSnapshot:s(()=>e.slots.entries(a).length>0,"getSnapshot"),subscribe:s(g=>e.slots.subscribe(a,g),"subscribe")}),"flowSource"),r=o("sidebar.workspaces.directoryFlow"),i=o("conversation.hero.workspace.directoryFlow"),l=s(()=>({startSession:s(a=>{e.workspaces.startSession(a)},"startSession"),open:s(a=>{e.sessions.open(a)},"open"),searchSessions:t,searchResultLimit:e.sessions.searchResultLimit,renameSession:s(async(a,g)=>{const u=e.sessions.binding(a)?.session;if(u===void 0)throw new Error(`unknown session "${a}"`);const b=await u.rename(g);if(!b.ok)throw new Error(b.error.message)},"renameSession"),forkSession:s(a=>{e.sessions.fork({sessionId:a,increaseTitle:!0}).then(g=>{e.sessions.open(g)}).catch(()=>{})},"forkSession"),renameWorkspace:s(async(a,g)=>{await e.workspaces.rename(a,g)},"renameWorkspace"),deleteWorkspace:s(async a=>{await e.workspaces.delete(a)},"deleteWorkspace"),insertWorkspaceBefore:s(async(a,g)=>{await e.workspaces.insertBefore(a,g)},"insertWorkspaceBefore"),archiveSession:s(async a=>{await e.workspaces.archiveSession(a)},"archiveSession"),insertSessionBefore:s(async(a,g,u)=>{await e.workspaces.insertSessionBefore(a,g,u)},"insertSessionBefore"),createWorkspace:s(a=>e.workspaces.create(a),"createWorkspace"),hooks:{directoryFlow:r}}),"browserInjected"),d=s(()=>({createWorkspace:s(a=>e.workspaces.create(a),"createWorkspace"),hooks:{directoryFlow:i}}),"pickerInjected");e.slots.inject("sidebar.workspaces",()=>e.slots.register({name:"sidebar.workspaces",children:{"sidebar.workspaces.directoryFlow":{kind:"single",scope:"root"}},store:ws(),inject:l,locale:De},Fs)),e.slots.inject("conversation.hero.workspace",()=>e.slots.register({name:"conversation.hero.workspace",children:{"conversation.hero.workspace.directoryFlow":{kind:"single",scope:"root"}},inject:d,locale:De},As))}return s(Ys,"apply"),_e.apply=Ys,_e.inject=Hs,fe.exports},"factory")});
1
+ var Ks=Object.defineProperty;var s=(ae,fe)=>Ks(ae,"name",{value:fe,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-ui-workspace",factory:s(ae=>{var fe={exports:{}},_e=fe.exports;Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"});let me=ae("@deepseek-ai/dsh-client-runtime/client"),n=ae("react/jsx-runtime"),h=ae("react"),x=ae("@deepseek-ai/dsh-client-ui-primitives");const ie="__flat_session_order__";function ws(){return(0,me.defineStore)({init:s(()=>({groupBy:"workspace",orderBy:"updated",groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:"dsh.workspace.view.v5",actions:{setGroupBy:s((e,t)=>{e.groupBy=t},"setGroupBy"),setOrderBy:s((e,t)=>{e.orderBy=t},"setOrderBy"),setGroupExpanded:s((e,t,o)=>{e.groupExpansion[t]=o},"setGroupExpanded"),retainAccountKeys:s((e,t)=>{const o=new Set(t);e.groupExpansion=Object.fromEntries(Object.entries(e.groupExpansion).filter(([r])=>o.has(r))),e.sessionOrderByAccount=Object.fromEntries(Object.entries(e.sessionOrderByAccount).filter(([r])=>o.has(r))),e.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(e.sessionUpdatedAtByAccount).filter(([r])=>o.has(r)))},"retainAccountKeys"),syncSessionOrderAccount:s((e,t,o,r)=>{e.sessionOrderByAccount[t]=o,e.sessionUpdatedAtByAccount[t]=r},"syncSessionOrderAccount"),setSessionOrder:s((e,t,o)=>{e.sessionOrderByAccount[t]=o},"setSessionOrder")}})}s(ws,"createWorkspaceViewStore");function Ee(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(o=Ee(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}s(Ee,"r");function M(){for(var e,t,o=0,r="",i=arguments.length;o<i;o++)(e=arguments[o])&&(t=Ee(e))&&(r&&(r+=" "),r+=t);return r}s(M,"clsx");const Be="Ungrouped";function bs(e){if(e===void 0||e==="")return Be;const t=e.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return t!==void 0&&t!==""?t:e}s(bs,"workspaceLabel");function we(e,t){return t.updatedAt!==e.updatedAt?t.updatedAt-e.updatedAt:e.id<t.id?-1:1}s(we,"byRecency");function ce(e,t,o){return e.origin!=="subagent"&&!o.has(e.id)&&(!e.blank||e.id===t)}s(ce,"sessionVisible");function ke(e){return e.blank?"New Session":e.displayTitle}s(ke,"sessionTitle");function Oe(e,t,o,r,i,l,d){const a=[...l];return d==="recency"&&a.sort(we),{key:e,workspaceId:t,cwd:o,createdAt:r,label:i,sessions:a}}s(Oe,"buildGroup");function gs(e,t){const o=new Map(e.map(l=>[l.id,l])),r=new Set,i=[];for(const l of t){const d=o.get(l);d===void 0||r.has(l)||(i.push(d),r.add(l))}for(const l of[...e].sort(we))r.has(l.id)||i.push(l);return i}s(gs,"orderedUngrouped");function xs(e,t,o,r){const i=[],l=new Set;for(const a of t){const g=[];for(const u of a.sessionIds){const b=e.byId[u];b!==void 0&&(l.add(u),ce(b,e.current,o)&&g.push(b))}i.push(Oe(a.workspaceId,a.workspaceId,a.path,Date.parse(a.createdAt),a.title,g,"account"))}const d=e.ids.map(a=>e.byId[a]).filter(a=>a!==void 0&&!l.has(a.id)&&ce(a,e.current,o));return d.length>0&&i.push(Oe("",void 0,void 0,void 0,Be,r===void 0?d:gs(d,r),r===void 0?"recency":"account")),i}s(xs,"groupByWorkspace");function Ce(e,t){return{id:e.id,title:ke(e),blank:e.blank,running:e.running,runningSubagentCount:t.get(e.id)?.runningCount??0,completed:e.completed===!0,updatedAt:e.updatedAt,...e.pendingInteraction===void 0?{}:{pendingInteraction:e.pendingInteraction}}}s(Ce,"sessionNode");function vs(e,t,o,r){const i=new Set(o),l=new Set(r.expandedGroups),d=(0,me.indexSubagentDescendants)(e.byId),a=e.current===void 0?void 0:t.find(u=>u.sessionIds.includes(e.current))?.workspaceId??"",g=[];for(const u of xs(e,t,i,r.ungroupedOrder)){const b=l.has(u.key);g.push({key:u.key,workspaceId:u.workspaceId,cwd:u.cwd,createdAt:u.createdAt,label:u.label,sessionCount:u.sessions.length,expanded:b,containsCurrent:u.key===a,sessions:b?u.sessions.map(y=>Ce(y,d)):[]})}return g}s(vs,"deriveGroups");function ys(e,t){const o=new Set(t),r=(0,me.indexSubagentDescendants)(e.byId),i=[];for(const l of e.ids){const d=e.byId[l];d===void 0||!ce(d,e.current,o)||i.push(d)}return i.sort(we),i.map(l=>Ce(l,r))}s(ys,"deriveFlat");function _s(e,t,o,r,i,l){const d=o.trim().toLowerCase();if(d==="")return{items:[],hasMore:!1};const a=new Set(r),g=(0,me.indexSubagentDescendants)(e.byId),u=new Map;for(const w of t)for(const q of w.sessionIds)u.has(q)||u.set(q,w.title);const b=s(w=>u.get(w.id)??bs(w.cwd),"labelOf"),y=new Map;for(const w of i.items)y.has(w.sessionId)||y.set(w.sessionId,w);const _=[];for(const w of e.ids){const q=e.byId[w];q===void 0||q.blank||!ce(q,e.current,a)||(ke(q).toLowerCase().includes(d)||b(q).toLowerCase().includes(d))&&_.push(q)}_.sort(we);const k=[],B=new Set,V=s(w=>{B.has(w.id)||(B.add(w.id),k.push(w))},"include");for(const w of _)V(w);for(const w of i.items){const q=e.byId[w.sessionId];q!==void 0&&!q.blank&&ce(q,e.current,a)&&V(q)}return{items:k.slice(0,l).map(w=>{const q=y.get(w.id);return{id:w.id,title:ke(w),workspace:b(w),running:w.running,runningSubagentCount:g.get(w.id)?.runningCount??0,...w.pendingInteraction===void 0?{}:{pendingInteraction:w.pendingInteraction},completed:w.completed===!0,...q===void 0?{}:{snippet:q.snippet}}}),hasMore:i.hasMore||k.length>l}}s(_s,"deriveSearchResults");function Te(e,t){const l=Math.max(0,t-e);return l<6e4?{unit:"now",n:0}:l<36e5?{unit:"minutes",n:Math.floor(l/6e4)}:l<864e5?{unit:"hours",n:Math.floor(l/36e5)}:l<30*864e5?{unit:"days",n:Math.floor(l/864e5)}:l<365*864e5?{unit:"months",n:Math.floor(l/(30*864e5))}:{unit:"years",n:Math.floor(l/(365*864e5))}}s(Te,"relativeTime");const ks='.wDdVUq_projectRow,.wDdVUq_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.wDdVUq_projectRow:hover,.wDdVUq_sessionRow:hover,.wDdVUq_sessionRow.wDdVUq_selected{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.wDdVUq_searchResultRow:hover,.wDdVUq_searchResultRow.wDdVUq_selected{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_searchResultHeading{align-items:center;min-width:0;display:flex}.wDdVUq_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.wDdVUq_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.wDdVUq_searchResultWorkspace,.wDdVUq_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.wDdVUq_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.wDdVUq_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.wDdVUq_projectRow{box-sizing:border-box;align-items:center;height:34px}.wDdVUq_projectRow .wDdVUq_rowActions{height:20px}.wDdVUq_sessionRow{height:32px;animation:wDdVUq_row-in .15s var(--ds-ease-in-out);gap:0}.wDdVUq_sessionRow .wDdVUq_title{margin:0 6px 0 4px}.wDdVUq_flatSessionRowWithoutStatus .wDdVUq_title{margin-left:0}@keyframes wDdVUq_row-in{0%{opacity:0}}.wDdVUq_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.wDdVUq_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.wDdVUq_folderActive{color:var(--dsw-alias-state-business-primary)}.wDdVUq_projectRow .wDdVUq_chevron{display:none}.wDdVUq_projectRow:hover .wDdVUq_chevron{display:inline-flex}.wDdVUq_projectRow:hover .wDdVUq_folder{display:none}.wDdVUq_arrow{transition:transform .15s var(--ds-ease-in-out)}.wDdVUq_arrowOpen{transform:rotate(90deg)}.wDdVUq_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.wDdVUq_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.wDdVUq_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.wDdVUq_sessionRow .wDdVUq_title{flex:1}.wDdVUq_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.wDdVUq_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.wDdVUq_dot{flex:none}.wDdVUq_rowActions{flex:none;align-items:center;gap:12px;display:none}.wDdVUq_projectRow:hover .wDdVUq_rowActions,.wDdVUq_sessionRow:hover .wDdVUq_rowActions,.wDdVUq_projectRow.wDdVUq_menuOpen .wDdVUq_rowActions,.wDdVUq_sessionRow.wDdVUq_menuOpen .wDdVUq_rowActions{display:inline-flex}.wDdVUq_sessionRow:hover .wDdVUq_time,.wDdVUq_sessionRow.wDdVUq_menuOpen .wDdVUq_time{display:none}.wDdVUq_projectRow.wDdVUq_menuOpen,.wDdVUq_sessionRow.wDdVUq_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.wDdVUq_sessionRow.wDdVUq_dropBefore,.wDdVUq_sessionRow.wDdVUq_dropAfter{position:relative}.wDdVUq_sessionRow.wDdVUq_dropBefore:before,.wDdVUq_sessionRow.wDdVUq_dropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.wDdVUq_sessionRow.wDdVUq_dropBefore:before{top:-7px}.wDdVUq_sessionRow.wDdVUq_dropAfter:after{bottom:-7px}.wDdVUq_hoverContent{flex-direction:column;gap:8px;display:flex}.wDdVUq_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.wDdVUq_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.wDdVUq_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.wDdVUq_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.wDdVUq_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.wDdVUq_iconButton:hover{color:var(--dsw-alias-label-primary)}.wDdVUq_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.wDdVUq_sessionRow,.wDdVUq_arrow{transition:none;animation:none}}',Me="@deepseek-ai/dsh-client-ui-workspace/Rows.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(Me)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=Me,e.textContent=ks,document.head.appendChild(e)}var v={time:"wDdVUq_time",arrow:"wDdVUq_arrow",hoverContent:"wDdVUq_hoverContent",hoverTitle:"wDdVUq_hoverTitle",flatSessionRowWithoutStatus:"wDdVUq_flatSessionRowWithoutStatus",renameInput:"wDdVUq_renameInput",searchResultRow:"wDdVUq_searchResultRow",searchResultHeading:"wDdVUq_searchResultHeading",title:"wDdVUq_title",slot:"wDdVUq_slot",dot:"wDdVUq_dot",hoverTime:"wDdVUq_hoverTime",projectText:"wDdVUq_projectText",searchResultMeta:"wDdVUq_searchResultMeta",folder:"wDdVUq_folder",searchResultSnippet:"wDdVUq_searchResultSnippet",hoverStatus:"wDdVUq_hoverStatus",searchResultTitle:"wDdVUq_searchResultTitle",sessionRow:"wDdVUq_sessionRow",selected:"wDdVUq_selected",projectRow:"wDdVUq_projectRow","row-in":"wDdVUq_row-in",dropBefore:"wDdVUq_dropBefore",menuOpen:"wDdVUq_menuOpen",dropAfter:"wDdVUq_dropAfter",rowActions:"wDdVUq_rowActions",chevron:"wDdVUq_chevron",folderActive:"wDdVUq_folderActive",hoverPath:"wDdVUq_hoverPath",searchResultWorkspace:"wDdVUq_searchResultWorkspace",visuallyHidden:"wDdVUq_visuallyHidden",meta:"wDdVUq_meta",arrowOpen:"wDdVUq_arrowOpen",iconButton:"wDdVUq_iconButton"};function We(e,t){return e.blank?t("session.new"):e.title}s(We,"displayTitle");function qs(e,t,o){const{unit:r,n:i}=Te(e,t);return r==="now"?o("time.now"):o(`time.${r}`,{n:i})}s(qs,"timeLabel");function Ns(e,t,o){const{unit:r,n:i}=Te(e,t);return r==="now"?o("time.now"):o("time.ago",{t:o(`time.${r}`,{n:i})})}s(Ns,"hoverTimeLabel");function Ss(e,t){const o=new Date(e),r=s(i=>String(i).padStart(2,"0"),"pad2");return t("hover.created",{time:`${t("date.ymd",{y:o.getFullYear(),m:o.getMonth()+1,d:o.getDate()})} ${r(o.getHours())}:${r(o.getMinutes())}`})}s(Ss,"createdLabel");function Ds({label:e,cwd:t,createdAt:o,t:r}){return(0,n.jsxs)("div",{className:v.hoverContent,children:[(0,n.jsx)("div",{className:v.hoverTitle,children:e}),(0,n.jsx)("div",{className:v.hoverPath,children:t}),(0,n.jsx)("div",{className:v.hoverTime,children:Ss(o,r)})]})}s(Ds,"WorkspaceHoverContent");function Fe(e){const t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?"before":"after"}s(Fe,"rowHalf");function js({group:e,onToggle:t,onCreate:o,actions:r,drag:i,t:l}){const d=e,a=d.workspaceId===void 0?l("group.ungrouped"):d.label,g=e.expanded&&e.containsCurrent,[u,b]=(0,h.useState)(!1),y=[{id:"rename",label:l("rename"),icon:(0,n.jsx)(x.IconEditOutline16,{})},{id:"delete",label:l("delete.workspace"),icon:(0,n.jsx)(x.IconTrashOutline16,{}),danger:!0}],_=(0,n.jsxs)("div",{className:M(v.projectRow,u&&v.menuOpen),role:"treeitem","aria-expanded":d.expanded,onClick:t,draggable:i!==void 0,onDragStart:i===void 0?void 0:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",d.key),i.start()},onDragEnd:i?.end,children:[(0,n.jsx)("span",{className:M(v.slot,v.folder,g&&v.folderActive),children:d.expanded?(0,n.jsx)(x.IconFolderOpen16,{}):(0,n.jsx)(x.IconFolderClose16,{})}),(0,n.jsx)("span",{className:M(v.slot,v.chevron),children:(0,n.jsx)(x.IconTriangleRightFill14,{className:M(v.arrow,d.expanded&&v.arrowOpen)})}),(0,n.jsx)("span",{className:v.projectText,children:(0,n.jsx)("span",{className:v.title,children:a})}),(0,n.jsxs)("span",{className:v.rowActions,children:[r!==void 0&&(0,n.jsx)(x.Menu,{open:u,onClose:s(()=>{b(!1)},"onClose"),items:y,onSelect:s(k=>{b(!1),!(k!=="rename"&&k!=="delete")&&(k==="rename"?r.rename():r.delete())},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":l("actions.workspace.aria",{name:a}),onClick:s(k=>{k.stopPropagation(),b(B=>!B)},"onClick"),children:(0,n.jsx)(x.IconEllipsisOutline16,{})})}),(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":l("actions.newSession.aria",{name:a}),onClick:s(k=>{k.stopPropagation(),o()},"onClick"),children:(0,n.jsx)(x.IconPlusOutline16,{})})]})]});return d.createdAt===void 0?_:(0,n.jsx)(x.HoverCard,{anchor:_,content:(0,n.jsx)(Ds,{label:d.label,cwd:d.cwd,createdAt:d.createdAt,t:l}),disabled:u,copyText:d.cwd,copyLabel:l("copy"),copiedLabel:l("hover.copied")})}s(js,"ProjectRowItem");function Is(e){throw new Error(`unknown pending interaction: ${String(e)}`)}s(Is,"assertNever");function qe(e,t){const o=e.runningSubagentCount===0?void 0:{state:"ongoing",label:t(e.runningSubagentCount===1?"status.subagentsRunning.one":"status.subagentsRunning.other",{n:e.runningSubagentCount})};let r;switch(e.pendingInteraction){case"approval":r={state:"warning",label:t("status.waitingApproval")};break;case"plan-review":r={state:"warning",label:t("status.planReview")};break;case"question":r={state:"warning",label:t("status.waitingAnswer")};break;case void 0:break;default:return Is(e.pendingInteraction)}if(r!==void 0)return o===void 0?[r]:[r,o];if(e.running){const i={state:"ongoing",label:t("status.running")};return o===void 0?[i]:[i,o]}return o!==void 0?[o]:e.completed?[{state:"done",label:t("status.completed")}]:[{state:"done",label:t("status.idle")}]}s(qe,"sessionStatuses");function ze({statuses:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.StateDot,{state:e[0].state}),e.map(t=>(0,n.jsx)("span",{className:v.visuallyHidden,children:t.label},t.label))]})}s(ze,"SessionStatusDots");function Ls({node:e,now:t,t:o}){const r=qe(e,o);return(0,n.jsxs)("div",{className:v.hoverContent,children:[(0,n.jsx)("div",{className:v.hoverTitle,children:We(e,o)}),!e.blank&&(0,n.jsx)("div",{className:v.hoverTime,children:Ns(e.updatedAt,t,o)}),r.map(i=>(0,n.jsxs)("div",{className:v.hoverStatus,children:[(0,n.jsx)(x.StateDot,{state:i.state}),(0,n.jsx)("span",{children:i.label})]},i.label))]})}s(Ls,"SessionHoverContent");function Rs({result:e,currentId:t,onOpen:o,t:r}){const i=e.id===t,l=qe(e,r),d=l[0];return(0,n.jsxs)("button",{type:"button",className:M(v.searchResultRow,i&&v.selected),role:"treeitem","aria-selected":i,onClick:s(()=>{o(e.id)},"onClick"),children:[(0,n.jsxs)("span",{className:v.searchResultHeading,children:[(0,n.jsx)("span",{className:v.slot,children:(d.state!=="done"||e.completed)&&(0,n.jsx)(ze,{statuses:l})}),(0,n.jsx)("span",{className:v.searchResultTitle,children:e.title})]}),(0,n.jsxs)("span",{className:v.searchResultMeta,children:[(0,n.jsx)("span",{className:v.searchResultWorkspace,children:e.workspace}),e.snippet!==void 0&&(0,n.jsx)("span",{className:v.searchResultSnippet,children:e.snippet})]})]})}s(Rs,"SearchResultItem");function Pe({node:e,currentId:t,now:o,onOpen:r,onRename:i,onFork:l,onArchive:d,drag:a,flat:g=!1,t:u}){const b=e,y=We(e,u),_=e.id===t,k=qe(e,u),B=k[0].state!=="done"||b.completed,[V,w]=(0,h.useState)(!1),q=[{id:"rename",label:u("rename"),icon:(0,n.jsx)(x.IconEditOutline16,{})},{id:"fork",label:u("menu.fork"),icon:(0,n.jsx)(x.IconBranchOutline16,{})},{id:"archive",label:u("menu.archiveSession"),icon:(0,n.jsx)(x.IconArchiveOutline20,{size:16})}],H=(0,n.jsxs)("div",{className:M(v.sessionRow,_&&v.selected,V&&v.menuOpen,g&&!B&&v.flatSessionRowWithoutStatus,a?.marker==="before"&&v.dropBefore,a?.marker==="after"&&v.dropAfter),role:"treeitem","aria-selected":_,onClick:s(()=>{r(e.id)},"onClick"),draggable:a!==void 0,onDragStart:a===void 0?void 0:S=>{S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",e.id),a.start()},onDragEnd:a?.end,onDragOver:a===void 0?void 0:S=>{a.active&&(S.preventDefault(),S.dataTransfer.dropEffect="move",a.hover(Fe(S)))},onDrop:a===void 0?void 0:S=>{a.active&&(S.preventDefault(),a.drop(Fe(S)))},children:[(!g||B)&&(0,n.jsx)("span",{className:v.slot,children:B&&(0,n.jsx)(ze,{statuses:k})}),(0,n.jsx)("span",{className:v.title,children:y}),!b.blank&&(0,n.jsx)("span",{className:v.time,children:qs(b.updatedAt,o,u)}),!b.blank&&(0,n.jsx)("span",{className:v.rowActions,children:(0,n.jsx)(x.Menu,{open:V,onClose:s(()=>{w(!1)},"onClose"),items:q,onSelect:s(S=>{w(!1),S==="rename"&&i(e.id,b.title),S==="fork"&&l(e.id),S==="archive"&&d(e.id)},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:v.iconButton,"aria-label":u("actions.session.aria",{name:y}),onClick:s(S=>{S.stopPropagation(),w(m=>!m)},"onClick"),children:(0,n.jsx)(x.IconEllipsisOutline16,{})})})})]});return(0,n.jsx)(x.HoverCard,{anchor:H,content:(0,n.jsx)(Ls,{node:e,now:o,t:u}),disabled:V||a?.active===!0,copyText:b.blank?void 0:b.title,copyLabel:u("copy"),copiedLabel:u("hover.copied")})}s(Pe,"SessionNodeItem");const Us=".eBk4YW_modalAction{min-width:72px}.eBk4YW_modalError,.eBk4YW_menuStatus{margin-top:8px;font-size:12px;line-height:18px}.eBk4YW_modalError{color:var(--dsw-alias-state-error-primary)}.eBk4YW_menuStatus{color:var(--dsw-alias-label-secondary)}",He="@deepseek-ai/dsh-client-ui-workspace/WorkspacePicker.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(He)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=He,e.textContent=Us,document.head.appendChild(e)}var be={modalAction:"eBk4YW_modalAction",menuStatus:"eBk4YW_menuStatus",modalError:"eBk4YW_modalError"};const Ye="::add-workspace";function Ge({t:e,open:t,anchorRef:o,useWorkspaces:r,createWorkspace:i,useDirectoryFlow:l,renderDirectoryFlow:d,onPick:a,onClose:g,addOnly:u=!1,side:b="bottom",selectedId:y}){const _=r(R=>R),k=_.items,B=(0,h.useCallback)(()=>o?.current?.getBoundingClientRect()??null,[o]),[V,w]=(0,h.useState)(!1),[q,H]=(0,h.useState)(null),[S,m]=(0,h.useState)(!1),[W,j]=(0,h.useState)(!1),A=S||W,I=l(R=>R);(0,h.useEffect)(()=>{S&&!I&&m(!1)},[S,I]);const L=I?[{id:Ye,label:e("menu.addWorkspace"),icon:(0,n.jsx)(x.IconPlusOutline16,{size:16}),disabled:A}]:[],F=!u&&k.length>0,C=F?k.map(R=>({id:R.workspaceId,label:R.title,icon:(0,n.jsx)(x.IconFolderClose16,{size:16}),disabled:A})):L,Y=C.length===0,X=s(()=>{w(!1),H(null)},"closeModal"),T=s(R=>i({path:R}).then(se=>{m(!1),a(se.workspaceId)}).catch(se=>{H(se instanceof Error?se.message:String(se)),m(!1),w(!0)}),"adoptDirectory"),Z=(0,h.useCallback)(()=>{g(),w(!1),H(null),m(!0)},[g]),z=u||_.phase==="ready",G=!F&&z&&L.length===1;(0,h.useEffect)(()=>{t&&G&&!A&&Z()},[t,G,A,Z]);const K={open:S,busy:W,onPicked:s(R=>{j(!0),T(R).finally(()=>{j(!1)})},"onPicked"),onCancel:s(()=>{m(!1)},"onCancel"),onError:s(R=>{m(!1),H(R),w(!0)},"onError")},de=s(R=>{if(R===Ye){Z();return}a(R)},"handleSelect");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Menu,{open:t&&!G&&!Y,anchor:null,items:C,...F?{footer:L}:{},selectedId:y,onSelect:de,onClose:g,side:b,portal:!0,getAnchorRect:B}),t&&!G&&!Y&&_.phase==="pending"&&(0,n.jsx)("div",{className:be.menuStatus,role:"status",children:e("picker.loading")}),d(K),(0,n.jsx)(x.Modal,{open:V,onClose:X,closeLabel:e("close"),title:e("folderError.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",className:be.modalAction,onClick:X,children:e("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",className:be.modalAction,disabled:!I,onClick:Z,children:e("folderError.retry")})]}),children:(0,n.jsx)("div",{className:be.modalError,role:"alert",children:q})})]})}s(Ge,"WorkspacePickFlow");function As({open:e,anchorRef:t,useWorkspaces:o,selectedId:r,onPick:i,onClose:l,createWorkspace:d,useDirectoryFlow:a,renderSlot:g,t:u}){return(0,n.jsx)(Ge,{t:u,open:e,anchorRef:t,useWorkspaces:o,createWorkspace:d,useDirectoryFlow:a,renderDirectoryFlow:s(b=>g("conversation.hero.workspace.directoryFlow",b),"renderDirectoryFlow"),selectedId:r,onPick:i,onClose:l})}s(As,"WorkspacePicker");const Vs='.LauNbq_root{--dsh-session-list-edge-inset:var(--dsh-sidebar-inline-padding);--dsh-session-list-scrollbar-width:8px;--dsh-session-list-scrollbar-offset:2px;box-sizing:border-box;min-height:0;padding-right:var(--dsh-session-list-edge-inset);flex-direction:column;flex:1;display:flex}.LauNbq_root.LauNbq_rail{padding-right:0}.LauNbq_iconButton{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_sectionHeader{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}.LauNbq_root:not(.LauNbq_rail) .LauNbq_sectionHeader{margin-top:2px;margin-right:-4px}.LauNbq_sectionLabel{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}.LauNbq_sectionLabelHidden{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}.LauNbq_searchSlot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}.LauNbq_searchSlotExpanded{max-width:100%;padding-left:0}.LauNbq_headerActions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}.LauNbq_headerActionsHidden{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}.LauNbq_search{box-sizing:border-box;cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;border-radius:50%;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}.LauNbq_searchExpanded{border:1px solid var(--dsw-alias-border-l2);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;border-radius:10px;margin-inline:-2px;padding:0 4px 0 0}.LauNbq_searchButton{cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_searchExpanded .LauNbq_searchButton{width:28px;height:30px}.LauNbq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_searchExpanded .LauNbq_searchButton:hover{background:0 0}.LauNbq_searchInput{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}.LauNbq_searchExpanded .LauNbq_searchInput{opacity:1;pointer-events:auto;margin-left:-2px}.LauNbq_searchInput::placeholder{color:var(--dsw-alias-label-tertiary)}.LauNbq_clearButton{cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.LauNbq_clearButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_rail .LauNbq_sectionHeader{justify-content:flex-start;gap:0;margin-bottom:12px;padding-left:0}.LauNbq_rail .LauNbq_headerActions{max-width:none}.LauNbq_rail .LauNbq_iconButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.LauNbq_rail .LauNbq_search{background:0 0;border-color:#0000;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.LauNbq_rail .LauNbq_searchButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.LauNbq_rail .LauNbq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.LauNbq_listArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-session-list-edge-inset));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:visible}.LauNbq_rail .LauNbq_listArea{margin-left:0;margin-right:0;padding-left:0}.LauNbq_treeBody{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.LauNbq_fade{left:0;right:var(--dsh-session-list-edge-inset);background:linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));pointer-events:none;height:24px;position:absolute;bottom:0}.LauNbq_wide{animation:LauNbq_wide-in .2s var(--ds-ease-in-out)}@keyframes LauNbq_wide-in{0%{opacity:0}}.LauNbq_list{min-height:0;margin-left:-4px;margin-right:var(--dsh-session-list-scrollbar-offset);padding-left:4px;padding-right:calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));scrollbar-gutter:stable;flex:1;padding-bottom:16px;overflow-y:auto}.LauNbq_flatList>*+*,.LauNbq_searchTree>[role=treeitem]+[role=treeitem],.LauNbq_groupSection>*+*{margin-top:2px}.LauNbq_searchStatus,.LauNbq_searchWarning{color:var(--dsw-alias-label-tertiary);padding:10px 12px;font-size:12px;line-height:18px}.LauNbq_searchWarning{color:var(--dsw-alias-label-secondary)}.LauNbq_groupSection{position:relative}.LauNbq_groupSection+.LauNbq_groupSection{margin-top:4px}.LauNbq_listTopDropIndicator,.LauNbq_workspaceDropBefore:before,.LauNbq_workspaceDropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:0}.LauNbq_listTopDropIndicator{top:-8px;left:0;right:var(--dsh-session-list-edge-inset)}.LauNbq_listTopDropActive>.LauNbq_workspaceDropBefore:first-child:before{display:none}.LauNbq_workspaceDropBefore:before{top:-8px}.LauNbq_workspaceDropAfter:after{bottom:-8px}.LauNbq_sessionOverflowButton{cursor:pointer;text-align:left;width:100%;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:8px;padding:0 12px 0 28px;font-size:12px}.LauNbq_groupSection>.LauNbq_sessionOverflowButton{margin-top:0}.LauNbq_sessionOverflowButton:hover{color:var(--dsw-alias-label-secondary);background:0 0}.LauNbq_empty{color:var(--dsw-alias-label-tertiary);padding:16px 12px;font-size:13px}.LauNbq_renameInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.LauNbq_renameInput:disabled{color:var(--dsw-alias-label-dimmed)}.LauNbq_renameError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}.LauNbq_deleteAction:not(:disabled){color:var(--dsw-alias-state-error-primary)}.LauNbq_deleteStatus{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.LauNbq_wide{animation:none}.LauNbq_search,.LauNbq_sectionLabel,.LauNbq_searchSlot,.LauNbq_searchInput,.LauNbq_headerActions{transition:none}}',Ke="@deepseek-ai/dsh-client-ui-workspace/WorkspaceBrowser.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(Ke)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-ui-workspace",e.dataset.pluginCss=Ke,e.textContent=Vs,document.head.appendChild(e)}var f={sessionOverflowButton:"LauNbq_sessionOverflowButton",list:"LauNbq_list",groupSection:"LauNbq_groupSection",iconButton:"LauNbq_iconButton",renameError:"LauNbq_renameError",searchSlotExpanded:"LauNbq_searchSlotExpanded",fade:"LauNbq_fade","wide-in":"LauNbq_wide-in",headerActionsHidden:"LauNbq_headerActionsHidden",searchInput:"LauNbq_searchInput",listTopDropIndicator:"LauNbq_listTopDropIndicator",empty:"LauNbq_empty",search:"LauNbq_search",searchSlot:"LauNbq_searchSlot",workspaceDropBefore:"LauNbq_workspaceDropBefore",flatList:"LauNbq_flatList",sectionLabel:"LauNbq_sectionLabel",treeBody:"LauNbq_treeBody",sectionLabelHidden:"LauNbq_sectionLabelHidden",listArea:"LauNbq_listArea",sectionHeader:"LauNbq_sectionHeader",searchStatus:"LauNbq_searchStatus",root:"LauNbq_root",wide:"LauNbq_wide",renameInput:"LauNbq_renameInput",headerActions:"LauNbq_headerActions",searchTree:"LauNbq_searchTree",deleteAction:"LauNbq_deleteAction",rail:"LauNbq_rail",searchWarning:"LauNbq_searchWarning",searchExpanded:"LauNbq_searchExpanded",clearButton:"LauNbq_clearButton",listTopDropActive:"LauNbq_listTopDropActive",deleteStatus:"LauNbq_deleteStatus",searchButton:"LauNbq_searchButton",workspaceDropAfter:"LauNbq_workspaceDropAfter"};const Es=300,Bs=250,Ne=500,Se=5;function $e(e){const t=e.replaceAll("\0","");if(t.length<=Ne)return t;let o=Ne;const r=t.charCodeAt(o-1),i=t.charCodeAt(o);return r>=55296&&r<=56319&&i>=56320&&i<=57343&&o--,t.slice(0,o)}s($e,"sanitizeSearchQuery");function Os(e,t){return e.includes(t)?e.filter(o=>o!==t):[...e,t]}s(Os,"toggled");function Qe(e){(0,h.useEffect)(()=>{if(!e)return;const t=s(r=>{r.preventDefault(),r.dataTransfer!==null&&(r.dataTransfer.dropEffect="move")},"acceptDrag"),o=s(r=>{r.preventDefault()},"acceptDrop");return document.addEventListener("dragover",t),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",t),document.removeEventListener("drop",o)}},[e])}s(Qe,"useNativeDragAcceptance");function ge(e,t){if(t===void 0)return[...e];const o=new Map(e.map(l=>[l,l])),r=[],i=new Set;for(const l of t){const d=o.get(l);d===void 0||i.has(l)||(r.push(d),i.add(l))}for(const l of e)i.has(l)||r.push(l);return r}s(ge,"reconciledSessionOrder");function Je(e,t,o){const r=o[e]?.updatedAt??Number.NEGATIVE_INFINITY,i=o[t]?.updatedAt??Number.NEGATIVE_INFINITY;return r!==i?i-r:e<t?-1:1}s(Je,"compareSessionRecency");function Xe({sessionIds:e,previousOrder:t,previousUpdatedAt:o,list:r,orderBy:i,sortByRecency:l}){let d=ge(e,t);if(l)d.sort((b,y)=>Je(b,y,r.byId));else if(i==="updated"){const b=e.filter(y=>{const _=r.byId[y];return _!==void 0&&(o[y]===void 0||_.updatedAt>o[y])}).sort((y,_)=>Je(y,_,r.byId));if(b.length>0){const y=new Set(b);d=[...b,...d.filter(_=>!y.has(_))]}}const a={};for(const b of e){const y=r.byId[b];y!==void 0&&(a[b]=y.updatedAt)}const g=t===void 0||d.length!==t.length||d.some((b,y)=>b!==t[y]),u=Object.keys(a).length!==Object.keys(o).length||Object.entries(a).some(([b,y])=>o[b]!==y);return{order:d,updatedAt:a,changed:g||u}}s(Xe,"nextSessionOrderAccount");function Cs({groupBy:e,orderBy:t,onGroupPick:o,onOrderPick:r,t:i}){const[l,d]=(0,h.useState)(!1);return(0,n.jsx)(x.Menu,{open:l,onClose:s(()=>{d(!1)},"onClose"),items:[{type:"label",id:"group-by",text:i("groupBy.label")},{id:"workspace",label:i("groupBy.workspace")},{id:"flat",label:i("groupBy.flat")},{type:"separator",id:"order-by-separator"},{type:"label",id:"order-by",text:i("orderBy.label")},{id:"manual",label:i("orderBy.manual")},{id:"updated",label:i("orderBy.updated")}],selectedIds:[e,t],onSelect:s(a=>{a==="workspace"||a==="flat"?o(a):(a==="manual"||a==="updated")&&r(a),d(!1)},"onSelect"),align:"end",dense:!0,portal:!0,anchor:(0,n.jsx)(x.Tooltip,{label:i("viewOptions.label"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{type:"button",className:M(f.iconButton,f.wide),"aria-label":i("viewOptions.label"),onClick:s(()=>{d(a=>!a)},"onClick"),children:(0,n.jsx)(x.IconPersonalizationOutline16,{})})})})}s(Cs,"ViewOptionsMenu");function Ze(e){const t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?"before":"after"}s(Ze,"workspaceGroupHalf");function Ts({useSessions:e,startSession:t,open:o,forkSession:r,workspaces:i,archivedSessionIds:l,onRenameRequest:d,onDeleteRequest:a,onSessionRename:g,onSessionArchive:u,insertWorkspaceBefore:b,insertSessionBefore:y,orderBy:_,groupExpansion:k,setGroupExpanded:B,sessionOrderByAccount:V,sessionUpdatedAtByAccount:w,syncSessionOrderAccount:q,setSessionOrder:H,t:S}){const m=e(p=>p),W=m.current,[j,A]=(0,h.useState)([]),[I,L]=(0,h.useState)(null),F=(0,h.useRef)(!1),[C,Y]=(0,h.useState)(null),X=(0,h.useRef)(!1),T=(0,h.useRef)(_);Qe(I!==null||C!==null);const Z=W===void 0?void 0:i.find(p=>p.sessionIds.includes(W))?.workspaceId??"";(0,h.useEffect)(()=>{W===void 0||Z===void 0||Object.hasOwn(k,Z)||B(Z,!0)},[W,Z,B,k]);const z=(0,h.useMemo)(()=>Object.entries(k).filter(([,p])=>p).map(([p])=>p),[k]),G=(0,h.useMemo)(()=>{const p=new Set(i.flatMap(D=>D.sessionIds));return m.ids.filter(D=>m.byId[D]!==void 0&&!p.has(D))},[m,i]);(0,h.useEffect)(()=>{if(m.phase!=="ready")return;const p=T.current!=="updated"&&_==="updated";T.current=_;const D=[...i.map(U=>({key:U.workspaceId,sessionIds:U.sessionIds.filter($=>m.byId[$]!==void 0)})),{key:"",sessionIds:G}];for(const{key:U,sessionIds:$}of D){const E=V[U],P=Xe({sessionIds:$,previousOrder:E,previousUpdatedAt:w[U]??{},list:m,orderBy:_,sortByRecency:_==="updated"&&(E===void 0||p)});P.changed&&q(U,P.order.map(N=>N),P.updatedAt)}},[m,_,V,w,q,G,i]);const K=(0,h.useMemo)(()=>i.map(p=>{const D=V[p.workspaceId],U=ge(p.sessionIds,D);return{...p,sessionIds:U}}),[V,i]),de=(0,h.useMemo)(()=>ge(G,V[""]),[V,G]),R=(0,h.useMemo)(()=>vs(m,K,l,{expandedGroups:z,...V[""]===void 0?{}:{ungroupedOrder:V[""]}}),[m,K,l,z,V]),se=Date.now(),te=s((p,D)=>{if(F.current)return;F.current=!0,L(null);const U=R.find(O=>O.key===p.accountKey);if(U===void 0)return;const $=U.sessions.findIndex(O=>O.id===D.id);if($===-1)return;const E=D.half==="before"?D.id:U.sessions[$+1]?.id;if(E===p.sessionId)return;const P=U.sessions.findIndex(O=>O.id===p.sessionId),N=E===void 0?U.sessions.length:U.sessions.findIndex(O=>O.id===E);if(P!==-1&&(N===P||N===P+1))return;const Q=p.accountKey===""?de:K.find(O=>O.workspaceId===p.accountKey)?.sessionIds;if(Q===void 0)return;const ee=Q.filter(O=>O!==p.sessionId),ne=E===void 0?ee.length:ee.indexOf(E);ee.splice(ne===-1?ee.length:ne,0,p.sessionId),H(p.accountKey,ee.map(O=>O)),!(_==="updated"||p.accountKey==="")&&y(p.accountKey,p.sessionId,E).catch(O=>{console.warn("session reorder rejected:",O)})},"commitSessionDrag"),xe=s((p,D)=>{if(X.current)return;X.current=!0,Y(null);const U=i.findIndex(N=>N.workspaceId===D.id);if(U===-1)return;const $=D.half==="before"?D.id:i[U+1]?.workspaceId;if($===p.workspaceId)return;const E=i.findIndex(N=>N.workspaceId===p.workspaceId),P=$===void 0?i.length:i.findIndex(N=>N.workspaceId===$);E!==-1&&(P===E||P===E+1)||b(p.workspaceId,$).catch(N=>{console.warn("workspace reorder rejected:",N)})},"commitWorkspaceDrag"),oe=R[0]?.workspaceId!==void 0&&C?.over?.id===R[0].workspaceId&&C.over.half==="before";return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[oe&&(0,n.jsx)("span",{className:f.listTopDropIndicator,"aria-hidden":"true"}),(0,n.jsxs)("div",{className:M(f.list,oe&&f.listTopDropActive),role:"tree","aria-label":S("section.sessions"),children:[R.length===0&&(0,n.jsx)("div",{className:f.empty,children:S("empty.none")}),R.map(p=>{const D=p.workspaceId,U=D!==void 0&&C?.over?.id===D?C.over.half:null,$=D===void 0?void 0:{start:s(()=>{X.current=!1,Y({workspaceId:D,over:null})},"start"),end:s(()=>{C?.over!==null&&C?.over!==void 0?xe(C,C.over):Y(null),X.current=!1},"end")},E=D===void 0?void 0:N=>{Y(Q=>Q===null?Q:{...Q,over:{id:D,half:N}})},P=D===void 0?void 0:N=>{C!==null&&xe(C,{id:D,half:N})};return(0,n.jsxs)("div",{className:M(f.groupSection,U==="before"&&f.workspaceDropBefore,U==="after"&&f.workspaceDropAfter),onDragOver:C===null||E===void 0?void 0:N=>{N.preventDefault(),N.dataTransfer.dropEffect="move",E(Ze(N))},onDrop:C===null||P===void 0?void 0:N=>{N.preventDefault(),P(Ze(N))},children:[(0,n.jsx)(js,{group:p,t:S,onToggle:s(()=>{p.expanded&&A(N=>N.filter(Q=>Q!==p.key)),B(p.key,!p.expanded)},"onToggle"),onCreate:s(()=>{p.workspaceId!==void 0&&(B(p.key,!0),t(p.workspaceId))},"onCreate"),drag:$,actions:p.workspaceId===void 0?void 0:{rename:s(()=>{p.workspaceId!==void 0&&d(p.workspaceId,p.label)},"rename"),delete:s(()=>{p.workspaceId!==void 0&&a(p.workspaceId,p.label)},"delete")}}),(j.includes(p.key)?p.sessions:p.sessions.slice(0,Se)).map(N=>{const Q=I!==null&&I.accountKey===p.key,ee={start:s(()=>{F.current=!1,L({accountKey:p.key,sessionId:N.id,over:null})},"start"),active:Q,marker:Q&&I.over?.id===N.id?I.over.half:null,hover:s(ne=>{L(O=>O===null?O:{...O,over:{id:N.id,half:ne}})},"hover"),drop:s(ne=>{I!==null&&te(I,{id:N.id,half:ne})},"drop"),end:s(()=>{I?.over!==null&&I?.over!==void 0?te(I,I.over):L(null),F.current=!1},"end")};return(0,n.jsx)(Pe,{node:N,currentId:W,now:se,onOpen:o,onRename:g,onFork:r,onArchive:u,drag:ee,t:S},N.id)}),p.sessions.length>Se&&(0,n.jsx)("button",{type:"button",className:f.sessionOverflowButton,"aria-expanded":j.includes(p.key),onClick:s(()=>{A(N=>Os(N,p.key))},"onClick"),children:j.includes(p.key)?S("sessions.collapse"):S("sessions.expand",{n:p.sessions.length-Se})})]},p.key)})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ts,"SessionTree");function Ms({useSessions:e,open:t,forkSession:o,onSessionRename:r,onSessionArchive:i,archivedSessionIds:l,orderBy:d,sessionOrderByAccount:a,sessionUpdatedAtByAccount:g,syncSessionOrderAccount:u,setSessionOrder:b,t:y}){const _=e(j=>j),k=(0,h.useMemo)(()=>ys(_,l),[_,l]),B=(0,h.useMemo)(()=>k.map(j=>j.id),[k]),V=(0,h.useRef)(d);(0,h.useEffect)(()=>{if(_.phase!=="ready")return;const j=a[ie],A=g.__flat_session_order__??{},I=V.current!=="updated"&&d==="updated";V.current=d;const L=Xe({sessionIds:B,previousOrder:j,previousUpdatedAt:A,list:_,orderBy:d,sortByRecency:d==="updated"&&(j===void 0||I)});L.changed&&u(ie,L.order.map(F=>F),L.updatedAt)},[_,d,a,g,B,u]);const w=(0,h.useMemo)(()=>{const j=new Map(k.map(A=>[A.id,A]));return ge(B,a[ie]).flatMap(A=>{const I=j.get(A);return I===void 0?[]:[I]})},[k,a,B]),[q,H]=(0,h.useState)(null),S=(0,h.useRef)(!1);Qe(q!==null);const m=s((j,A)=>{if(S.current)return;S.current=!0,H(null);const I=w.findIndex(T=>T.id===A.id);if(I===-1)return;const L=A.half==="before"?A.id:w[I+1]?.id;if(L===j.sessionId)return;const F=w.findIndex(T=>T.id===j.sessionId),C=L===void 0?w.length:w.findIndex(T=>T.id===L);if(F!==-1&&(C===F||C===F+1))return;const Y=w.map(T=>T.id).filter(T=>T!==j.sessionId),X=L===void 0?Y.length:Y.indexOf(L);Y.splice(X===-1?Y.length:X,0,j.sessionId),b(ie,Y.map(T=>T))},"commitDrag"),W=Date.now();return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[(0,n.jsxs)("div",{className:M(f.list,f.flatList),role:"tree","aria-label":y("section.sessions"),children:[w.length===0&&(0,n.jsx)("div",{className:f.empty,children:y("empty.none")}),w.map(j=>{const A=q!==null;return(0,n.jsx)(Pe,{node:j,currentId:_.current,now:W,onOpen:t,onRename:r,onFork:o,onArchive:i,flat:!0,drag:{start:s(()=>{S.current=!1,H({accountKey:ie,sessionId:j.id,over:null})},"start"),active:A,marker:A&&q.over?.id===j.id?q.over.half:null,hover:s(I=>{H(L=>L===null?L:{...L,over:{id:j.id,half:I}})},"hover"),drop:s(I=>{q!==null&&m(q,{id:j.id,half:I})},"drop"),end:s(()=>{q?.over!==null&&q?.over!==void 0?m(q,q.over):H(null),S.current=!1},"end")},t:y},j.id)})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ms,"FlatList");function Ws({useSessions:e,open:t,workspaces:o,archivedSessionIds:r,query:i,remote:l,resultLimit:d,t:a}){const g=e(k=>k),u=l.query===i?l:{query:i,status:"loading",items:[],hasMore:!1},b=(0,h.useMemo)(()=>_s(g,o,i,r,u,d),[g,o,i,r,u,d]),y=u.status==="loading",_=u.status==="error";return(0,n.jsxs)("div",{className:M(f.treeBody,f.wide),children:[(0,n.jsxs)("div",{className:f.list,children:[(0,n.jsx)("div",{className:f.searchTree,role:"tree","aria-label":a("search.results.aria"),children:b.items.map(k=>(0,n.jsx)(Rs,{result:k,currentId:g.current,onOpen:t,t:a},k.id))}),y&&(0,n.jsx)("div",{className:f.searchStatus,role:"status",children:a("search.pending")}),_&&(0,n.jsx)("div",{className:f.searchWarning,role:"status",children:a("search.unavailable")}),!y&&b.items.length===0&&(0,n.jsx)("div",{className:f.empty,children:a("search.noMatches")}),b.hasMore&&(0,n.jsx)("div",{className:f.searchStatus,children:a("search.hasMore",{n:d})})]}),(0,n.jsx)("span",{className:f.fade})]})}s(Ws,"SearchResults");function Fs({wide:e,expandSidebar:t,useSessions:o,useWorkspaces:r,useStore:i,actions:l,startSession:d,open:a,renameSession:g,forkSession:u,renameWorkspace:b,deleteWorkspace:y,insertWorkspaceBefore:_,archiveSession:k,insertSessionBefore:B,createWorkspace:V,searchSessions:w,searchResultLimit:q,useDirectoryFlow:H,renderSlot:S,t:m}){const W=r(c=>c.items),j=r(c=>c.phase),A=r(c=>c.archivedSessionIds),I=H(c=>c),L=i(c=>c.groupBy),F=i(c=>c.orderBy),C=i(c=>c.groupExpansion),Y=i(c=>c.sessionOrderByAccount),X=i(c=>c.sessionUpdatedAtByAccount);(0,h.useEffect)(()=>{j==="ready"&&l.retainAccountKeys(["",ie,...W.map(c=>c.workspaceId)])},[l.retainAccountKeys,j,W]);const[T,Z]=(0,h.useState)(""),[z,G]=(0,h.useState)(!1),K=$e(T).trim(),[de,R]=(0,h.useState)({query:"",status:"idle",items:[],hasMore:!1}),se=(0,h.useRef)(null),te=(0,h.useRef)(null),[xe,oe]=(0,h.useState)(!1),p=(0,h.useRef)(null),D=(0,h.useRef)(!1),[U,$]=(0,h.useState)(!1);(0,h.useEffect)(()=>{if(e&&U){const c=window.setTimeout(()=>{te.current?.focus({preventScroll:!0}),$(!1)},Es);return()=>{window.clearTimeout(c)}}},[e,U]),(0,h.useEffect)(()=>{!e||!z||U||te.current?.focus({preventScroll:!0})},[e,z,U]),(0,h.useEffect)(()=>{if(!e||!z)return;const c=s(J=>{!(J.target instanceof Node)||se.current?.contains(J.target)===!0||(te.current?.blur(),K===""&&G(!1))},"onClick");return document.addEventListener("click",c),()=>{document.removeEventListener("click",c)}},[K,e,z]),(0,h.useEffect)(()=>{if(K===""){R({query:"",status:"idle",items:[],hasMore:!1});return}const c=new AbortController;R({query:K,status:"loading",items:[],hasMore:!1});const J=window.setTimeout(()=>{w(K,c.signal).then(ms=>{c.signal.aborted||R({query:K,status:"ready",items:ms.items,hasMore:ms.hasMore})}).catch(()=>{c.signal.aborted||R({query:K,status:"error",items:[],hasMore:!1})})},Bs);return()=>{window.clearTimeout(J),c.abort()}},[K,w]);const[E,P]=(0,h.useState)(null),[N,Q]=(0,h.useState)(""),[ee,ne]=(0,h.useState)(!1),[O,ue]=(0,h.useState)(null),re=N.trim(),es=E!==null&&re!==""&&re!==E.currentTitle&&W.some(c=>c.title===re),ss=ee||re===""||E===null||re===E.currentTitle||es,ns=s(()=>{ee||(P(null),ue(null))},"closeRename"),ts=s(()=>{ss||(ne(!0),ue(null),b(E.workspaceId,re).then(()=>{ne(!1),P(null)}).catch(c=>{ne(!1),ue(c instanceof Error?c.message:String(c))}))},"confirmRename"),[je,Ie]=(0,h.useState)(null),[os,rs]=(0,h.useState)(""),[ve,Le]=(0,h.useState)(!1),[as,pe]=(0,h.useState)(null),is=os.trim(),ls=ve||is===""||je===null,cs=s(()=>{ve||(Ie(null),pe(null))},"closeSessionRename"),ds=s(()=>{ls||(Le(!0),pe(null),g(je.sessionId,is).then(()=>{Le(!1),Ie(null)}).catch(c=>{Le(!1),pe(c instanceof Error?c.message:String(c))}))},"confirmSessionRename"),us=s((c,J)=>{Ie({sessionId:c,currentTitle:J}),rs(J),pe(null)},"onSessionRename"),ps=s(c=>{k(c).catch(J=>{console.warn("session archive rejected:",J)})},"onSessionArchive"),[le,Re]=(0,h.useState)(null),[he,Ue]=(0,h.useState)(!1),[Ae,Ve]=(0,h.useState)(null),[hs,ye]=(0,h.useState)(null);(0,h.useEffect)(()=>{Ae===null||W.some(c=>c.workspaceId===Ae)||(Ue(!1),Ve(null),Re(null))},[Ae,W]);const fs=s(()=>{he||(Re(null),ye(null))},"closeDelete"),Gs=s(()=>{he||le===null||(Ue(!0),Ve(null),ye(null),y(le.workspaceId).then(()=>{Ve(le.workspaceId)}).catch(c=>{Ue(!1),ye(c instanceof Error?c.message:String(c))}))},"confirmDelete");return(0,n.jsxs)("div",{className:M(f.root,!e&&f.rail),children:[(0,n.jsxs)("div",{className:f.sectionHeader,children:[e&&(0,n.jsx)("span",{className:M(f.sectionLabel,f.wide,z&&f.sectionLabelHidden),children:m(L==="flat"?"section.sessions":"section.workspaces")}),e&&(0,n.jsx)("div",{className:M(f.searchSlot,z&&f.searchSlotExpanded),children:(0,n.jsxs)("div",{ref:se,className:M(f.search,z&&f.searchExpanded),onClick:s(()=>{oe(!1),G(!0),te.current?.focus()},"onClick"),children:[(0,n.jsx)(x.Tooltip,{label:m("search"),side:"bottom",delayMs:500,disabled:z,children:(0,n.jsx)("button",{type:"button",className:f.searchButton,"aria-label":m("search.sessions.aria"),"aria-expanded":z,onClick:s(()=>{oe(!1),G(!0)},"onClick"),children:(0,n.jsx)(x.IconSearchOutline16,{size:z?11:14})})}),(0,n.jsx)("input",{ref:te,className:f.searchInput,type:"text",placeholder:m("search.placeholder"),maxLength:Ne,value:T,tabIndex:z?0:-1,onChange:s(c=>{Z($e(c.target.value))},"onChange"),onKeyDown:s(c=>{c.key==="Escape"&&(Z(""),G(!1))},"onKeyDown")}),z&&(0,n.jsx)("button",{type:"button",className:f.clearButton,"aria-label":m("search.clear"),onClick:s(c=>{c.stopPropagation(),Z(""),G(!1)},"onClick"),children:(0,n.jsx)(x.IconCloseFill14,{})})]})}),(0,n.jsxs)("div",{className:M(f.headerActions,e&&z&&f.headerActionsHidden),children:[e&&(0,n.jsx)(Cs,{groupBy:L,orderBy:F,onGroupPick:s(c=>{l.setGroupBy(c)},"onGroupPick"),onOrderPick:s(c=>{l.setOrderBy(c)},"onOrderPick"),t:m}),I&&(0,n.jsx)(x.Tooltip,{label:m("workspace.add"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{ref:p,type:"button",className:f.iconButton,"aria-label":m("workspace.add"),onClick:s(()=>{oe(c=>!c)},"onClick"),children:(0,n.jsx)(x.IconProjectAddOutline16,{size:e?16:18})})})]}),(0,n.jsx)(Ge,{t:m,open:xe,anchorRef:p,useWorkspaces:r,createWorkspace:V,useDirectoryFlow:H,renderDirectoryFlow:s(c=>S("sidebar.workspaces.directoryFlow",c),"renderDirectoryFlow"),addOnly:!0,side:"right",onPick:s(c=>{oe(!1),d(c)},"onPick"),onClose:s(()=>{oe(!1)},"onClose")})]}),!e&&(0,n.jsx)("div",{className:f.search,children:(0,n.jsx)(x.Tooltip,{label:m("search"),children:(0,n.jsx)("button",{type:"button",className:f.searchButton,"aria-label":m("search.sessions.aria"),onClick:s(()=>{G(!0),$(!0),t()},"onClick"),children:(0,n.jsx)(x.IconSearchOutline16,{size:18})})})}),(0,n.jsx)("div",{className:f.listArea,children:e&&(K!==""?(0,n.jsx)(Ws,{useSessions:o,open:a,workspaces:W,archivedSessionIds:A,query:K,remote:de,resultLimit:q,t:m}):L==="flat"?(0,n.jsx)(Ms,{useSessions:o,open:a,forkSession:u,onSessionRename:us,onSessionArchive:ps,archivedSessionIds:A,orderBy:F,sessionOrderByAccount:Y,sessionUpdatedAtByAccount:X,syncSessionOrderAccount:l.syncSessionOrderAccount,setSessionOrder:l.setSessionOrder,t:m}):(0,n.jsx)(Ts,{useSessions:o,onSessionRename:us,onSessionArchive:ps,forkSession:u,workspaces:W,groupExpansion:C,setGroupExpanded:l.setGroupExpanded,sessionOrderByAccount:Y,sessionUpdatedAtByAccount:X,syncSessionOrderAccount:l.syncSessionOrderAccount,setSessionOrder:l.setSessionOrder,archivedSessionIds:A,startSession:d,open:a,insertWorkspaceBefore:_,insertSessionBefore:B,orderBy:F,t:m,onRenameRequest:s((c,J)=>{P({workspaceId:c,currentTitle:J}),Q(J),ue(null)},"onRenameRequest"),onDeleteRequest:s((c,J)=>{Re({workspaceId:c,title:J}),ye(null)},"onDeleteRequest")}))}),(0,n.jsxs)(x.Modal,{open:E!==null,onClose:ns,closeLabel:m("close"),title:m("rename.workspace.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:ee,onClick:ns,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",disabled:ss,onClick:ts,children:m("rename")})]}),children:[(0,n.jsx)("input",{className:f.renameInput,value:N,"aria-label":m("field.workspaceName"),autoFocus:!0,disabled:ee,onFocus:s(c=>{c.target.select()},"onFocus"),onChange:s(c=>{Q(c.target.value),ue(null)},"onChange"),onCompositionStart:s(()=>{D.current=!0},"onCompositionStart"),onCompositionEnd:s(()=>{D.current=!1},"onCompositionEnd"),onKeyDown:s(c=>{c.key==="Enter"&&!D.current&&(c.preventDefault(),ts())},"onKeyDown")}),es&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:m("conflict.named",{name:re})}),O!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:O})]}),(0,n.jsxs)(x.Modal,{open:je!==null,onClose:cs,closeLabel:m("close"),title:m("rename.session.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:ve,onClick:cs,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"primary",disabled:ls,onClick:ds,children:m("rename")})]}),children:[(0,n.jsx)("input",{className:f.renameInput,value:os,"aria-label":m("field.sessionName"),autoFocus:!0,disabled:ve,onFocus:s(c=>{c.target.select()},"onFocus"),onChange:s(c=>{rs(c.target.value),pe(null)},"onChange"),onCompositionStart:s(()=>{D.current=!0},"onCompositionStart"),onCompositionEnd:s(()=>{D.current=!1},"onCompositionEnd"),onKeyDown:s(c=>{c.key==="Enter"&&!D.current&&(c.preventDefault(),ds())},"onKeyDown")}),as!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:as})]}),(0,n.jsxs)(x.Modal,{open:le!==null,onClose:fs,closeLabel:m("close"),title:m("delete.workspace"),...le===null?{}:{description:m("delete.desc",{name:le.title})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Button,{variant:"outline",disabled:he,onClick:fs,children:m("cancel")}),(0,n.jsx)(x.Button,{variant:"outline",className:f.deleteAction,disabled:he,onClick:Gs,children:m("delete.workspace")})]}),children:[he&&(0,n.jsx)("div",{className:f.deleteStatus,role:"status",children:m("delete.pending")}),hs!==null&&(0,n.jsx)("div",{className:f.renameError,role:"alert",children:hs})]})]})}s(Fs,"WorkspaceBrowser");const zs={"group.ungrouped":"未分组","session.new":"新会话","section.workspaces":"工作区","section.sessions":"会话","viewOptions.label":"视图选项","groupBy.label":"分组方式","groupBy.workspace":"按工作区","groupBy.flat":"单列表","orderBy.label":"排序方式","orderBy.manual":"手动排序","orderBy.updated":"最近更新","sessions.expand":"展开其余 {n} 个会话","sessions.collapse":"收起","empty.none":"暂无会话","empty.noMatches":"无匹配结果","workspace.add":"添加工作区","search.sessions.aria":"搜索会话","search.placeholder":"搜索会话…","search.clear":"清除搜索","search.results.aria":"搜索结果","search.pending":"正在搜索会话历史…","search.unavailable":"内容搜索暂不可用,仅显示名称匹配。","search.noMatches":"无匹配会话","search.hasMore":"仅显示前 {n} 条结果,请缩小搜索范围。","menu.addWorkspace":"添加工作区…","picker.loading":"正在加载工作区…","conflict.named":"已存在名为“{name}”的工作区。","folderError.title":"无法打开文件夹","folderError.retry":"重新选择",rename:"重命名","rename.workspace.title":"重命名工作区","rename.session.title":"重命名会话","field.workspaceName":"工作区名称","field.sessionName":"会话名称","delete.workspace":"删除工作区","delete.desc":"将把“{name}”从工作区列表中移除。文件夹与会话记录会保留,其会话将显示在“未分组”下。","delete.pending":"正在删除工作区…","menu.fork":"分叉会话","menu.archiveSession":"归档会话","sessions.count.one":"{n} 个会话","sessions.count.other":"{n} 个会话","actions.workspace.aria":"工作区“{name}”的操作","actions.session.aria":"会话“{name}”的操作","actions.newSession.aria":"在“{name}”中新建会话","status.running":"进行中","status.subagentsRunning.one":"{n} 个子代理运行中","status.subagentsRunning.other":"{n} 个子代理运行中","status.idle":"空闲","status.waitingApproval":"等待审批","status.planReview":"计划待审","status.waitingAnswer":"等待回答","status.completed":"已完成","hover.created":"创建于 {time}","hover.copied":"已复制","date.ymd":"{y}年{m}月{d}日","time.now":"刚刚","time.minutes":"{n}分钟","time.hours":"{n}小时","time.days":"{n}天","time.months":"{n}个月","time.years":"{n}年","time.ago":"{t}前"},Ps={"group.ungrouped":"Ungrouped","session.new":"New Session","section.workspaces":"Workspaces","section.sessions":"Sessions","viewOptions.label":"View options","groupBy.label":"Group by","groupBy.workspace":"WorkSpace","groupBy.flat":"In one list","orderBy.label":"Order by","orderBy.manual":"Manual","orderBy.updated":"Last updated","sessions.expand":"Show {n} more sessions","sessions.collapse":"Show less","empty.none":"No sessions yet","empty.noMatches":"No matches","workspace.add":"Add workspace","search.sessions.aria":"Search sessions","search.placeholder":"Search sessions...","search.clear":"Clear search","search.results.aria":"Search results","search.pending":"Searching session history…","search.unavailable":"Content search is temporarily unavailable. Showing name matches.","search.noMatches":"No matching sessions","search.hasMore":"Showing the first {n} results. Narrow your search.","menu.addWorkspace":"Add workspace…","picker.loading":"Loading workspaces…","conflict.named":"A workspace named “{name}” already exists.","folderError.title":"Couldn’t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes “{name}” from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace…","menu.fork":"Fork session","menu.archiveSession":"Archive session","sessions.count.one":"{n} session","sessions.count.other":"{n} sessions","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},De="workspace",Hs=["slots","sessions","workspaces","locale"];function Ys(e){e.effect(()=>e.locale.register(De,{zh:zs,en:Ps}),"ui-workspace: dictionaries");const t=s(async(a,g)=>{const u=await e.sessions.search(a,g);if(!u.ok)throw new Error(u.error.message);return u.value},"searchSessions"),o=s(a=>({getSnapshot:s(()=>e.slots.entries(a).length>0,"getSnapshot"),subscribe:s(g=>e.slots.subscribe(a,g),"subscribe")}),"flowSource"),r=o("sidebar.workspaces.directoryFlow"),i=o("conversation.hero.workspace.directoryFlow"),l=s(()=>({startSession:s(a=>{e.workspaces.startSession(a)},"startSession"),open:s(a=>{e.sessions.open(a)},"open"),searchSessions:t,searchResultLimit:e.sessions.searchResultLimit,renameSession:s(async(a,g)=>{const u=e.sessions.binding(a)?.session;if(u===void 0)throw new Error(`unknown session "${a}"`);const b=await u.rename(g);if(!b.ok)throw new Error(b.error.message)},"renameSession"),forkSession:s(a=>{e.sessions.fork({sessionId:a,increaseTitle:!0}).then(g=>{e.sessions.open(g)}).catch(()=>{})},"forkSession"),renameWorkspace:s(async(a,g)=>{await e.workspaces.rename(a,g)},"renameWorkspace"),deleteWorkspace:s(async a=>{await e.workspaces.delete(a)},"deleteWorkspace"),insertWorkspaceBefore:s(async(a,g)=>{await e.workspaces.insertBefore(a,g)},"insertWorkspaceBefore"),archiveSession:s(async a=>{await e.workspaces.archiveSession(a)},"archiveSession"),insertSessionBefore:s(async(a,g,u)=>{await e.workspaces.insertSessionBefore(a,g,u)},"insertSessionBefore"),createWorkspace:s(a=>e.workspaces.create(a),"createWorkspace"),hooks:{directoryFlow:r}}),"browserInjected"),d=s(()=>({createWorkspace:s(a=>e.workspaces.create(a),"createWorkspace"),hooks:{directoryFlow:i}}),"pickerInjected");e.slots.inject("sidebar.workspaces",()=>e.slots.register({name:"sidebar.workspaces",children:{"sidebar.workspaces.directoryFlow":{kind:"single",scope:"root"}},store:ws(),inject:l,locale:De},Fs)),e.slots.inject("conversation.hero.workspace",()=>e.slots.register({name:"conversation.hero.workspace",children:{"conversation.hero.workspace.directoryFlow":{kind:"single",scope:"root"}},inject:d,locale:De},As))}return s(Ys,"apply"),_e.apply=Ys,_e.inject=Hs,fe.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-ui-workspace","version":"0.0.13","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"],"platform":"web"}},"license":"MIT","dependencies":{"clsx":"^2.0.0"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/dsh-client-locale":"^0.0.13","@deepseek-ai/dsh-client-ui-primitives":"^0.0.13","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-ui-slots":"^0.0.13","@deepseek-ai/dsh-client-runtime":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13"}}
1
+ {"name":"@deepseek-ai/dsh-client-ui-workspace","version":"0.0.15","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-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"],"platform":"web"}},"license":"MIT","dependencies":{"clsx":"^2.0.0"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/dsh-client-locale":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-client-ui-slots":"^0.0.15","@deepseek-ai/dsh-client-runtime":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-web","version":"0.0.13","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/dsh-client-modules":"^0.0.13","@deepseek-ai/dsh-client-schema-form":"^0.0.13","@deepseek-ai/dsh-client-ui-attachment":"^0.0.13","@deepseek-ai/dsh-client-ui-primitives":"^0.0.13","@deepseek-ai/dsh-client-ui-slots":"^0.0.13","@deepseek-ai/dsh-client-ui-theme":"^0.0.13","@deepseek-ai/dsh-client-web-react":"^0.0.13"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.13"}}
1
+ {"name":"@deepseek-ai/dsh-client-web","version":"0.0.15","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/dsh-client-modules":"^0.0.15","@deepseek-ai/dsh-client-schema-form":"^0.0.15","@deepseek-ai/dsh-client-ui-attachment":"^0.0.15","@deepseek-ai/dsh-client-ui-slots":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/dsh-client-ui-theme":"^0.0.15","@deepseek-ai/dsh-client-web-react":"^0.0.15"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/cordis-plugin-loader":"^1.0.2"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-web-react","version":"0.0.13","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"react":"^18.2.0","use-sync-external-store":"1.2.0","@deepseek-ai/dsh-client-ui-slots":"^0.0.13"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-web-react","version":"0.0.15","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"react":"^18.2.0","use-sync-external-store":"1.2.0","@deepseek-ai/dsh-client-ui-slots":"^0.0.15"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-cmdline","version":"0.0.13","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-cmdline","version":"0.0.15","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}