dsh-edge 0.18.0 → 0.19.0-alpha.2

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 (118) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +8 -8
  3. package/README.zh.md +8 -8
  4. package/THIRD_PARTY_NOTICES.md +2011 -449
  5. package/dist/assets/fonts/Montserrat-OFL.txt +93 -0
  6. package/dist/assets/fonts/montserrat-light-Cvd2VjE_.woff2 +0 -0
  7. package/dist/assets/fonts/montserrat-medium-B4OyO9CN.woff2 +0 -0
  8. package/dist/assets/fonts/montserrat-regular-DYep38cA.woff2 +0 -0
  9. package/dist/assets/index-Cq6ljTv2.css +1 -0
  10. package/dist/assets/index-Dy0OhsZ5.js +127 -0
  11. package/dist/assets/langs/asciidoc-Ve4PFQV2.js +2 -0
  12. package/dist/assets/langs/bat-BkioyH1T.js +2 -0
  13. package/dist/assets/langs/bibtex-CHM0blh-.js +2 -0
  14. package/dist/assets/langs/clojure-P80f7IUj.js +2 -0
  15. package/dist/assets/langs/cmake-D1j8_8rp.js +2 -0
  16. package/dist/assets/langs/csv-fuZLfV_i.js +2 -0
  17. package/dist/assets/langs/dart-bE4Kk8sk.js +2 -0
  18. package/dist/assets/langs/diff-D97Zzqfu.js +2 -0
  19. package/dist/assets/langs/dotenv-Da5cRb03.js +2 -0
  20. package/dist/assets/langs/elixir-CvYZzuDY.js +2 -0
  21. package/dist/assets/langs/erlang-DsQrWhSR.js +2 -0
  22. package/dist/assets/langs/fish-BvzEVeQv.js +2 -0
  23. package/dist/assets/langs/fsharp-CXgrBDvD.js +2 -0
  24. package/dist/assets/langs/graphql-DujV8YkJ.js +2 -0
  25. package/dist/assets/langs/groovy-gcz8RCvz.js +2 -0
  26. package/dist/assets/langs/haskell-Df6bDoY_.js +2 -0
  27. package/dist/assets/langs/hcl-BWvSN4gD.js +2 -0
  28. package/dist/assets/langs/html-derivative-DOyKdj44.js +2 -0
  29. package/dist/assets/langs/html-fwsONPVS.js +2 -0
  30. package/dist/assets/langs/http-DcV90OkR.js +2 -0
  31. package/dist/assets/langs/javascript-DI5JR1nB.js +2 -0
  32. package/dist/assets/langs/julia-BpJ6DjL_.js +2 -0
  33. package/dist/assets/langs/latex-B4C7GdlO.js +2 -0
  34. package/dist/assets/langs/log-2UxHyX5q.js +2 -0
  35. package/dist/assets/langs/make-CHLpvVh8.js +2 -0
  36. package/dist/assets/langs/nix-CwoSXNpI.js +2 -0
  37. package/dist/assets/langs/perl-DsWkoyyU.js +2 -0
  38. package/dist/assets/langs/php-LEPfNACG.js +2 -0
  39. package/dist/assets/langs/powershell-Dpen1YoG.js +2 -0
  40. package/dist/assets/langs/proto-C7zT0LnQ.js +2 -0
  41. package/dist/assets/langs/r-Dspwwk_N.js +2 -0
  42. package/dist/assets/langs/rst-BbocfKWr.js +2 -0
  43. package/dist/assets/langs/ruby-R292Iif0.js +2 -0
  44. package/dist/assets/langs/scala-C151Ov-r.js +2 -0
  45. package/dist/assets/langs/svelte-DNMY6jOf.js +2 -0
  46. package/dist/assets/langs/system-verilog-CnnmHF94.js +2 -0
  47. package/dist/assets/langs/vb-D17OF-Vu.js +2 -0
  48. package/dist/assets/langs/verilog-BQ8w6xss.js +2 -0
  49. package/dist/assets/langs/vue-Dq2x6432.js +2 -0
  50. package/dist/favicon-dark.svg +3 -0
  51. package/dist/favicon.svg +0 -5
  52. package/dist/index.html +5 -4
  53. package/dist/manifest.webmanifest +3 -4
  54. package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +353 -101
  55. package/dist/plugins/@deepseek-ai/dsh-api-job-controller/client.js +367 -0
  56. package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +7223 -3584
  57. package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +1107 -991
  58. package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +119 -6
  59. package/dist/plugins/@deepseek-ai/dsh-api-workspace-files/client.js +41 -35
  60. package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +354 -5279
  61. package/dist/plugins/@deepseek-ai/dsh-client-file-upload/client.js +10 -23
  62. package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +234 -80
  63. package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +554 -46
  64. package/dist/plugins/@deepseek-ai/dsh-client-shortcuts/client.js +2006 -0
  65. package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +1090 -914
  66. package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +79 -6
  67. package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +126 -155
  68. package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +5776 -1593
  69. package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +375 -121
  70. package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +3524 -1923
  71. package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +1615 -258
  72. package/dist/plugins/@deepseek-ai/dsh-client-ui-directory-picker-browse/client.js +9 -9
  73. package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +25 -10
  74. package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +169 -24
  75. package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +413 -63
  76. package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +131 -14
  77. package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +24 -22
  78. package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +281 -128
  79. package/dist/plugins/@deepseek-ai/dsh-client-ui-open-in-app/client.js +674 -223
  80. package/dist/plugins/@deepseek-ai/dsh-client-ui-plan/client.js +596 -18
  81. package/dist/plugins/@deepseek-ai/dsh-client-ui-reference/client.js +92 -9
  82. package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +467 -59
  83. package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +231 -72
  84. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +281 -117
  85. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +642 -122
  86. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +1565 -438
  87. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/client.js +201 -75
  88. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugins/client.js +30 -1628
  89. package/dist/plugins/@deepseek-ai/dsh-client-ui-shortcuts/client.js +1163 -0
  90. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +165 -39
  91. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-browser/client.js +1648 -0
  92. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/client.js +5515 -25622
  93. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-files/client.js +419 -118
  94. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +5692 -260
  95. package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +156 -41
  96. package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +386 -263
  97. package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +183 -73
  98. package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +2367 -429
  99. package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +788 -270
  100. package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +87 -79
  101. package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +28 -14
  102. package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +2647 -1044
  103. package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +22 -7
  104. package/dist/plugins/dsh-edge-client-ui/client.js +1 -10
  105. package/package.json +96 -86
  106. package/scripts/cli.mjs +16 -4
  107. package/scripts/install.d.mts +12 -2
  108. package/scripts/install.mjs +36 -9
  109. package/scripts/legal-files.mjs +15 -0
  110. package/worker/direct/index.js +2564 -1822
  111. package/worker/isolated/index.js +2144 -1402
  112. package/dist/assets/index-BKQ_L1z6.js +0 -117
  113. package/dist/assets/index-DPX2bQLO.css +0 -1
  114. package/dist/assets/langs/html-CfGypltT.js +0 -2
  115. package/dist/assets/langs/php-DJl5gRdb.js +0 -2
  116. package/dist/assets/langs/ruby-5eNB0pDK.js +0 -2
  117. package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +0 -505
  118. package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +0 -307
@@ -8,7 +8,7 @@ window.__ModuleLoader__.load({
8
8
  let react = require("react");
9
9
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
10
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-approval/src/client/ApprovalPanel.module.css.mjs
11
- const css = ".mna1RW_root{padding:8px calc(var(--dsh-composer-side-clearance) + 16px) 12px;flex-direction:column;align-items:center;display:flex}.mna1RW_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);box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:20px;overflow:hidden}.mna1RW_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);align-items:center;gap:8px;padding:10px 16px;font-size:13px;line-height:18px;display:flex}.mna1RW_dot{corner-shape:round;background:var(--dsw-alias-state-warn-primary);border-radius:50%;width:8px;height:8px}.mna1RW_body{box-sizing:border-box;max-height:var(--dsh-composer-text-max-height);flex-direction:column;gap:6px;padding:12px 16px 0;display:flex;overflow-y:auto}.mna1RW_headline{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:500;line-height:24px}.mna1RW_command{color:var(--dsw-alias-label-tertiary);font-family:var(--ds-font-family-code);word-break:break-all;font-size:13px;line-height:20px}.mna1RW_actionRow{justify-content:flex-end;gap:8px;padding:14px 16px;display:flex}.mna1RW_reject:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);border-color:#0000}";
11
+ const css = ".mna1RW_root{padding:8px calc(var(--dsh-composer-side-clearance) + 16px) 12px;flex-direction:column;align-items:center;display:flex}.mna1RW_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-state-warn-secondary);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);overflow:hidden}.mna1RW_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);align-items:center;gap:8px;padding:10px 16px;font-size:13px;line-height:18px;display:flex}.mna1RW_body{box-sizing:border-box;max-height:var(--dsh-composer-text-max-height);flex-direction:column;gap:6px;padding:12px 16px 0;display:flex;overflow-y:auto}.mna1RW_headline{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:500;line-height:24px}.mna1RW_command{color:var(--dsw-alias-label-tertiary);font-family:var(--ds-font-family-code);word-break:break-all;font-size:13px;line-height:20px}.mna1RW_actionRow{justify-content:flex-end;gap:8px;padding:14px 16px;display:flex}.mna1RW_reject:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);border-color:#0000}";
12
12
  const tagId = "@deepseek-ai/dsh-client-ui-approval/ApprovalPanel.module.css";
13
13
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
14
14
  const tag = document.createElement("style");
@@ -22,7 +22,6 @@ window.__ModuleLoader__.load({
22
22
  "body": "mna1RW_body",
23
23
  "card": "mna1RW_card",
24
24
  "command": "mna1RW_command",
25
- "dot": "mna1RW_dot",
26
25
  "headline": "mna1RW_headline",
27
26
  "reject": "mna1RW_reject",
28
27
  "root": "mna1RW_root",
@@ -38,29 +37,68 @@ window.__ModuleLoader__.load({
38
37
  */
39
38
  function ApprovalPanel(props) {
40
39
  const approval = props.matched;
40
+ const detail = approval.callId === void 0 ? null : props.renderSlot("conversation.approval.detail", { callId: approval.callId });
41
41
  return (0, react_jsx_runtime.jsx)(ApprovalFlow, {
42
42
  pending: approval,
43
- detail: approval.callId === void 0 ? null : props.renderSlot("conversation.approval.detail", { callId: approval.callId }),
43
+ reason: approval.displayReason === void 0 ? approval.reason : props.resolveReason(approval.displayReason),
44
+ detail,
44
45
  t: props.t
45
46
  }, approval.key);
46
47
  }
47
- function ApprovalFlow({ pending, detail, t }) {
48
+ function ApprovalFlow({ pending, reason, detail, t }) {
48
49
  const [answered, setAnswered] = (0, react.useState)(false);
50
+ const waiting = (0, react.useRef)(false);
51
+ const active = (0, react.useRef)(true);
52
+ const composing = (0, react.useRef)(false);
53
+ const compositionEnded = (0, react.useRef)(false);
54
+ (0, react.useEffect)(() => {
55
+ active.current = true;
56
+ return () => {
57
+ active.current = false;
58
+ };
59
+ }, []);
49
60
  const answer = (outcome) => {
61
+ if (waiting.current || !pending.answerable) return;
62
+ waiting.current = true;
50
63
  setAnswered(true);
51
64
  pending.answer(outcome).catch(() => {
65
+ if (!active.current || !pending.answerable) return;
66
+ waiting.current = false;
52
67
  setAnswered(false);
53
68
  });
54
69
  };
70
+ const keydown = (event) => {
71
+ const element = event.target;
72
+ if (event.defaultPrevented || !event.currentTarget.contains(document.activeElement) || element.closest("input, textarea, select, [contenteditable=\"true\"], [contenteditable=\"\"]") !== null) return;
73
+ if (event.key !== "Enter" && event.key !== "Escape") return;
74
+ if (event.key === "Enter" && element.closest("button, a[href], [role=\"button\"]") !== null) return;
75
+ if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey) return;
76
+ event.preventDefault();
77
+ event.stopPropagation();
78
+ if (event.repeat || composing.current || compositionEnded.current || event.nativeEvent.isComposing || event.keyCode === 229) return;
79
+ answer(event.key === "Enter" ? "allowed-once" : "rejected");
80
+ };
55
81
  return (0, react_jsx_runtime.jsx)("div", {
56
82
  className: ApprovalPanel_module_css_default.root,
57
83
  "data-approval-key": pending.key,
84
+ "aria-busy": answered,
85
+ onKeyDown: keydown,
86
+ onKeyUpCapture: () => {
87
+ compositionEnded.current = false;
88
+ },
89
+ onCompositionStartCapture: () => {
90
+ composing.current = true;
91
+ },
92
+ onCompositionEndCapture: () => {
93
+ composing.current = false;
94
+ compositionEnded.current = true;
95
+ },
58
96
  children: (0, react_jsx_runtime.jsxs)("div", {
59
97
  className: ApprovalPanel_module_css_default.card,
60
98
  children: [
61
99
  (0, react_jsx_runtime.jsxs)("div", {
62
100
  className: ApprovalPanel_module_css_default.strip,
63
- children: [(0, react_jsx_runtime.jsx)("span", { className: ApprovalPanel_module_css_default.dot }), t("waiting")]
101
+ children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: answered ? "ongoing" : "warning" }), t("waiting")]
64
102
  }),
65
103
  (0, react_jsx_runtime.jsxs)("div", {
66
104
  className: ApprovalPanel_module_css_default.body,
@@ -70,7 +108,7 @@ window.__ModuleLoader__.load({
70
108
  "aria-label": t("detail.aria"),
71
109
  children: [(0, react_jsx_runtime.jsx)("div", {
72
110
  className: ApprovalPanel_module_css_default.headline,
73
- children: pending.reason ?? t("escalation", { toolName: pending.toolName })
111
+ children: reason ?? t("escalation", { toolName: pending.toolName })
74
112
  }), detail !== null && (0, react_jsx_runtime.jsx)("div", {
75
113
  className: ApprovalPanel_module_css_default.command,
76
114
  children: detail
@@ -123,6 +161,8 @@ window.__ModuleLoader__.load({
123
161
  callId;
124
162
  /** Human-readable reason supplied by the asker. */
125
163
  reason;
164
+ /** Localized presentation copy, when supplied by the asker. */
165
+ displayReason;
126
166
  /** Result returned by the Remote Event listener to the Host waterfall. */
127
167
  result;
128
168
  #resolve;
@@ -143,6 +183,7 @@ window.__ModuleLoader__.load({
143
183
  this.toolName = request.toolName;
144
184
  this.callId = request.callId;
145
185
  this.reason = request.reason;
186
+ this.displayReason = request.displayReason;
146
187
  const completion = Promise.withResolvers();
147
188
  this.result = completion.promise;
148
189
  this.#resolve = completion.resolve;
@@ -160,6 +201,13 @@ window.__ModuleLoader__.load({
160
201
  if (request.signal.aborted) onAbort();
161
202
  }
162
203
  /**
204
+ * Availability of this pending request after answer or withdrawal.
205
+ * @returns whether this request can still accept a decision.
206
+ */
207
+ get answerable() {
208
+ return !this.#settled;
209
+ }
210
+ /**
163
211
  * Resolve the Host waterfall with the user's decision.
164
212
  * @param outcome - supported interactive decision.
165
213
  */
@@ -240,6 +288,7 @@ window.__ModuleLoader__.load({
240
288
  toolName: request.toolName,
241
289
  ...request.callId === void 0 ? {} : { callId: request.callId },
242
290
  ...request.reason === void 0 ? {} : { reason: request.reason },
291
+ ...request.displayReason === void 0 ? {} : { displayReason: request.displayReason },
243
292
  ...request.signal === void 0 ? {} : { signal: request.signal }
244
293
  });
245
294
  const completed = Promise.withResolvers();
@@ -268,12 +317,36 @@ window.__ModuleLoader__.load({
268
317
  zh,
269
318
  en
270
319
  }), "ui-approval: dictionaries");
320
+ ctx.inject(["shortcuts"], (scope) => {
321
+ const t = ctx.locale.bind(NS);
322
+ scope.effect(() => scope.shortcuts.registerFixed({
323
+ id: "approval.allow",
324
+ label: () => t("allowOnce"),
325
+ keys: ["Enter"],
326
+ bindings: [{
327
+ code: "Enter",
328
+ modifiers: []
329
+ }],
330
+ group: "approval"
331
+ }), "ui-approval: fixed allow reference");
332
+ scope.effect(() => scope.shortcuts.registerFixed({
333
+ id: "approval.reject",
334
+ label: () => t("reject"),
335
+ keys: ["Esc"],
336
+ bindings: [{
337
+ code: "Escape",
338
+ modifiers: []
339
+ }],
340
+ group: "approval"
341
+ }), "ui-approval: fixed reject reference");
342
+ });
271
343
  const registerPendingInteraction = ctx.uiSession.registerPendingInteraction(() => 0);
272
344
  ctx.slots.inject("conversation.composer", () => ctx.slots.register({
273
345
  name: "conversation.composer",
274
346
  priority: 1,
275
347
  select: ({ pendingInteraction }) => pendingInteraction instanceof PendingApproval ? pendingInteraction : null,
276
348
  locale: NS,
349
+ inject: () => ({ resolveReason: (reason) => ctx.locale.resolveText(reason) }),
277
350
  children: { "conversation.approval.detail": {
278
351
  kind: "single",
279
352
  scope: "session"
@@ -24,13 +24,13 @@ window.__ModuleLoader__.load({
24
24
  }
25
25
  //#endregion
26
26
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/AttachmentRail.module.css.mjs
27
- const css$5 = ".JVDQca_root{min-width:0;position:relative}.JVDQca_rail{scrollbar-width:none;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);align-items:stretch;gap:10px;display:flex;overflow:auto hidden}.JVDQca_rail::-webkit-scrollbar{display:none}.JVDQca_item{flex:none;height:64px}.JVDQca_thumbnail{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;border-radius:16px;width:64px;height:64px;padding:0;overflow:hidden}.JVDQca_thumbnail img{object-fit:cover;width:100%;height:100%;display:block}.JVDQca_remove{z-index:1;corner-shape:round;background:var(--dsw-alias-button-contrast-fill);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted);cursor:pointer;opacity:0;border:none;border-radius:50%;place-items:center;padding:0;transition:opacity .2s ease-in-out;display:grid;position:absolute;top:4px;right:4px}.JVDQca_item:hover .JVDQca_remove,.JVDQca_remove:focus-visible{opacity:1}@media (pointer:coarse){.JVDQca_remove{opacity:1}}@media (prefers-reduced-motion:reduce){.JVDQca_remove{transition:none}}.JVDQca_arrow{z-index:2;--dsw-elevation-stroke-color:var(--dsw-alias-border-l2-darkmode-thin);corner-shape:round;background:var(--dsw-specific-input-major);width:24px;height:24px;color:var(--dsw-alias-label-secondary);box-shadow:var(--dsw-elevation-panel);cursor:pointer;border:0;border-radius:999px;place-items:center;padding:0;display:grid;position:absolute;top:50%;transform:translateY(-50%)}.JVDQca_arrow:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.JVDQca_arrowLeft{left:4px}.JVDQca_arrowRight{right:4px}";
28
- const tagId$5 = "@deepseek-ai/dsh-client-ui-attachment/AttachmentRail.module.css";
29
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
27
+ const css$4 = ".JVDQca_root{min-width:0;position:relative}.JVDQca_rail{scrollbar-width:none;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);align-items:stretch;gap:10px;display:flex;overflow:auto hidden}.JVDQca_rail::-webkit-scrollbar{display:none}.JVDQca_item{flex:none;height:64px}.JVDQca_thumbnail{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;width:64px;height:64px;padding:0;overflow:hidden}.JVDQca_thumbnail img{object-fit:cover;width:100%;height:100%;display:block}.JVDQca_remove{z-index:1;corner-shape:round;background:var(--dsw-alias-button-contrast-fill);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted);cursor:pointer;opacity:0;border:none;border-radius:50%;place-items:center;padding:0;transition:opacity .2s ease-in-out;display:grid;position:absolute;top:4px;right:4px}.JVDQca_item:hover .JVDQca_remove,.JVDQca_remove:focus-visible{opacity:1}@media (pointer:coarse){.JVDQca_remove{opacity:1}}@media (prefers-reduced-motion:reduce){.JVDQca_remove{transition:none}}.JVDQca_arrow{z-index:2;--dsw-elevation-stroke-color:var(--dsw-alias-border-l2-darkmode-thin);corner-shape:round;background:var(--dsw-specific-input-major);width:24px;height:24px;color:var(--dsw-alias-label-secondary);box-shadow:var(--dsw-elevation-panel);cursor:pointer;border:0;border-radius:999px;place-items:center;padding:0;display:grid;position:absolute;top:50%;transform:translateY(-50%)}.JVDQca_arrow:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.JVDQca_arrowLeft{left:4px}.JVDQca_arrowRight{right:4px}";
28
+ const tagId$4 = "@deepseek-ai/dsh-client-ui-attachment/AttachmentRail.module.css";
29
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
30
30
  const tag = document.createElement("style");
31
31
  tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-attachment";
32
- tag.dataset.pluginCss = tagId$5;
33
- tag.textContent = css$5;
32
+ tag.dataset.pluginCss = tagId$4;
33
+ tag.textContent = css$4;
34
34
  document.head.appendChild(tag);
35
35
  }
36
36
  var AttachmentRail_module_css_default = {
@@ -144,7 +144,7 @@ window.__ModuleLoader__.load({
144
144
  onClick: () => {
145
145
  page(-1);
146
146
  },
147
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutline14, {})
147
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, {})
148
148
  }),
149
149
  (0, react_jsx_runtime.jsx)("div", {
150
150
  ref: railRef,
@@ -164,20 +164,20 @@ window.__ModuleLoader__.load({
164
164
  onClick: () => {
165
165
  page(1);
166
166
  },
167
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {})
167
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {})
168
168
  })
169
169
  ]
170
170
  });
171
171
  }
172
172
  //#endregion
173
173
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/DropOverlay.module.css.mjs
174
- const css$4 = ".BInVoG_mask{z-index:1000;pointer-events:none;background-color:var(--dsw-alias-bg-mask-drop);backdrop-filter:blur(10px);justify-content:center;align-items:center;animation:.16s ease-out BInVoG_fade-in;display:flex;position:fixed;inset:0}@keyframes BInVoG_fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.BInVoG_mask{animation:none}}.BInVoG_wrap{color:var(--dsw-alias-label-primary);text-align:center;flex-direction:column;align-items:center;margin-top:-3%;padding:0 40px;display:flex}.BInVoG_illustration{width:115px;height:84px}.BInVoG_title{font:var(--dsw-font-l-20);margin-top:16px}.BInVoG_desc{font:var(--dsw-font-s-14);color:var(--dsw-alias-label-tertiary);white-space:pre-wrap;margin-top:16px}";
175
- const tagId$4 = "@deepseek-ai/dsh-client-ui-attachment/DropOverlay.module.css";
176
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
174
+ const css$3 = ".BInVoG_mask{z-index:1000;pointer-events:none;background-color:var(--dsw-alias-bg-mask-drop);backdrop-filter:blur(10px);justify-content:center;align-items:center;animation:.16s ease-out BInVoG_fade-in;display:flex;position:fixed;inset:0}@keyframes BInVoG_fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.BInVoG_mask{animation:none}}.BInVoG_wrap{color:var(--dsw-alias-label-primary);text-align:center;flex-direction:column;align-items:center;margin-top:-3%;padding:0 40px;display:flex}.BInVoG_illustration{width:115px;height:84px}.BInVoG_title{font:var(--dsw-font-l-20);margin-top:16px}.BInVoG_desc{font:var(--dsw-font-s-14);color:var(--dsw-alias-label-tertiary);white-space:pre-wrap;margin-top:16px}";
175
+ const tagId$3 = "@deepseek-ai/dsh-client-ui-attachment/DropOverlay.module.css";
176
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
177
177
  const tag = document.createElement("style");
178
178
  tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-attachment";
179
- tag.dataset.pluginCss = tagId$4;
180
- tag.textContent = css$4;
179
+ tag.dataset.pluginCss = tagId$3;
180
+ tag.textContent = css$3;
181
181
  document.head.appendChild(tag);
182
182
  }
183
183
  var DropOverlay_module_css_default = {
@@ -357,13 +357,13 @@ window.__ModuleLoader__.load({
357
357
  });
358
358
  //#endregion
359
359
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/FileCard.module.css.mjs
360
- const css$3 = ".gSkjMW_card{border:.5px solid var(--dsw-alias-border-l2,#0000001f);background:var(--dsw-specific-input-major,transparent);box-sizing:border-box;text-align:left;border-radius:16px;align-items:center;gap:10px;width:240px;height:64px;padding:0 12px;display:inline-flex;position:relative}.gSkjMW_failed{border-color:var(--dsw-alias-state-error-primary,#d54941)}.gSkjMW_icon{flex:none;justify-content:center;align-items:center;width:28px;height:28px;display:inline-flex}.gSkjMW_spinner{corner-shape:round;border:2px solid;border-top-color:#0000;border-radius:50%;width:20px;height:20px;animation:.8s linear infinite gSkjMW_file-card-spin}@keyframes gSkjMW_file-card-spin{to{transform:rotate(360deg)}}.gSkjMW_body{flex-direction:column;flex:1;min-width:0;padding:8px 0;display:flex}.gSkjMW_retry{color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0}.gSkjMW_name{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px;overflow:hidden}.gSkjMW_meta{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-tertiary,#00000073);font-size:12px;line-height:15px;overflow:hidden}.gSkjMW_metaFailed{color:var(--dsw-alias-state-error-primary,#d54941)}.gSkjMW_remove{corner-shape:round;background:var(--dsw-alias-button-contrast-fill,#000000b8);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted,#fff);opacity:0;cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .2s ease-in-out;display:inline-flex;position:absolute;top:6px;right:6px}.gSkjMW_card:hover .gSkjMW_remove,.gSkjMW_remove:focus-visible{opacity:1}@media (pointer:coarse){.gSkjMW_remove{opacity:1}}@media (prefers-reduced-motion:reduce){.gSkjMW_remove{transition:none}}.gSkjMW_card:hover .gSkjMW_name,.gSkjMW_card:focus-within .gSkjMW_name{padding-right:18px}.gSkjMW_removeFailed{background:var(--dsw-alias-state-error-primary,#d54941);color:#fff;opacity:1}.gSkjMW_progressTrack{background:var(--dsw-alias-fill-tertiary,#00000014);border-radius:1px;height:2px;position:absolute;bottom:5px;left:12px;right:12px;overflow:hidden}.gSkjMW_progressBar{border-radius:inherit;background:var(--dsw-alias-brand-primary,#4d6bfe);width:35%;height:100%;animation:1.2s ease-in-out infinite alternate gSkjMW_file-card-progress;display:block}.gSkjMW_progressBar[style]{animation:none}@keyframes gSkjMW_file-card-progress{0%{transform:translate(-70%)}to{transform:translate(220%)}}@media (pointer:coarse){.gSkjMW_remove{opacity:1}}";
361
- const tagId$3 = "@deepseek-ai/dsh-client-ui-attachment/FileCard.module.css";
362
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
360
+ const css$2 = ".gSkjMW_card{border:.5px solid var(--dsw-alias-border-l2,#0000001f);border-radius:var(--dsw-radius-lg);background:var(--dsw-specific-input-major,transparent);box-sizing:border-box;text-align:left;align-items:center;gap:10px;width:240px;height:64px;padding:0 12px;display:inline-flex;position:relative}.gSkjMW_failed{border-color:var(--dsw-alias-state-error-primary,#d54941)}.gSkjMW_icon{flex:none;justify-content:center;align-items:center;width:28px;height:28px;display:inline-flex}.gSkjMW_spinner{corner-shape:round;border:2px solid;border-top-color:#0000;border-radius:50%;width:20px;height:20px;animation:.8s linear infinite gSkjMW_file-card-spin}@keyframes gSkjMW_file-card-spin{to{transform:rotate(360deg)}}.gSkjMW_body{flex-direction:column;flex:1;min-width:0;padding:8px 0;display:flex}.gSkjMW_retry{color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0}.gSkjMW_name{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px;overflow:hidden}.gSkjMW_meta{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-tertiary,#00000073);font-size:12px;line-height:15px;overflow:hidden}.gSkjMW_metaFailed{color:var(--dsw-alias-state-error-primary,#d54941)}.gSkjMW_remove{corner-shape:round;background:var(--dsw-alias-button-contrast-fill,#000000b8);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted,#fff);opacity:0;cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .2s ease-in-out;display:inline-flex;position:absolute;top:6px;right:6px}.gSkjMW_card:hover .gSkjMW_remove,.gSkjMW_remove:focus-visible{opacity:1}@media (pointer:coarse){.gSkjMW_remove{opacity:1}}@media (prefers-reduced-motion:reduce){.gSkjMW_remove{transition:none}}.gSkjMW_card:hover .gSkjMW_name,.gSkjMW_card:focus-within .gSkjMW_name{padding-right:18px}.gSkjMW_removeFailed{background:var(--dsw-alias-state-error-primary,#d54941);color:#fff;opacity:1}.gSkjMW_progressTrack{background:var(--dsw-alias-fill-tertiary,#00000014);border-radius:1px;height:2px;position:absolute;bottom:5px;left:12px;right:12px;overflow:hidden}.gSkjMW_progressBar{border-radius:inherit;background:var(--dsw-alias-brand-primary,#4d6bfe);width:35%;height:100%;animation:1.2s ease-in-out infinite alternate gSkjMW_file-card-progress;display:block}.gSkjMW_progressBar[style]{animation:none}@keyframes gSkjMW_file-card-progress{0%{transform:translate(-70%)}to{transform:translate(220%)}}@media (pointer:coarse){.gSkjMW_remove{opacity:1}}";
361
+ const tagId$2 = "@deepseek-ai/dsh-client-ui-attachment/FileCard.module.css";
362
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
363
363
  const tag = document.createElement("style");
364
364
  tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-attachment";
365
- tag.dataset.pluginCss = tagId$3;
366
- tag.textContent = css$3;
365
+ tag.dataset.pluginCss = tagId$2;
366
+ tag.textContent = css$2;
367
367
  document.head.appendChild(tag);
368
368
  }
369
369
  var FileCard_module_css_default = {
@@ -427,7 +427,7 @@ window.__ModuleLoader__.load({
427
427
  className: retryable ? `${FileCard_module_css_default.remove} ${FileCard_module_css_default.removeFailed}` : FileCard_module_css_default.remove,
428
428
  "aria-label": labels.remove,
429
429
  onClick: onRemove,
430
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFill14, { size: 12 })
430
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFillRegular, { size: 12 })
431
431
  }),
432
432
  state === "uploading" && (0, react_jsx_runtime.jsx)("span", {
433
433
  className: FileCard_module_css_default.progressTrack,
@@ -441,80 +441,6 @@ window.__ModuleLoader__.load({
441
441
  });
442
442
  }
443
443
  //#endregion
444
- //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/ImageLightbox.module.css.mjs
445
- const css$2 = ".fNh4Da_backdrop{z-index:1000;place-items:center;padding:40px;display:grid;position:fixed;inset:0}.fNh4Da_mask{background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute;inset:0}.fNh4Da_image{object-fit:contain;background:var(--dsw-specific-input-major);max-width:min(100%,1600px);max-height:calc(100vh - 80px);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;position:relative}.fNh4Da_close{z-index:1;border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);corner-shape:round;background:var(--dsw-specific-input-major);width:36px;height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:999px;place-items:center;display:grid;position:fixed;top:20px;right:20px}";
446
- const tagId$2 = "@deepseek-ai/dsh-client-ui-attachment/ImageLightbox.module.css";
447
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
448
- const tag = document.createElement("style");
449
- tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-attachment";
450
- tag.dataset.pluginCss = tagId$2;
451
- tag.textContent = css$2;
452
- document.head.appendChild(tag);
453
- }
454
- var ImageLightbox_module_css_default = {
455
- "backdrop": "fNh4Da_backdrop",
456
- "close": "fNh4Da_close",
457
- "image": "fNh4Da_image",
458
- "mask": "fNh4Da_mask"
459
- };
460
- //#endregion
461
- //#region lib/types/ImageLightbox.js
462
- /**
463
- * Document-level original-image preview opened by clicking a thumbnail.
464
- * Closes on Escape, backdrop press, or the close control, and restores focus
465
- * to the opener on unmount. Rendered through a body portal: an opener inside
466
- * a transformed or filtered ancestor would otherwise trap the fixed backdrop
467
- * in that ancestor's box instead of covering the viewport.
468
- *
469
- * @param props.src - the original image URL.
470
- * @param props.alt - the image's alt text.
471
- * @param props.labels - dialog and close-control strings.
472
- * @param props.onClose - dismiss callback owned by the opener.
473
- * @returns the modal preview dialog.
474
- */
475
- function ImageLightbox({ src, alt, labels, onClose }) {
476
- const closeRef = (0, react.useRef)(null);
477
- const restoreRef = (0, react.useRef)(null);
478
- (0, react.useEffect)(() => {
479
- restoreRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
480
- closeRef.current?.focus();
481
- const onKeyDown = (event) => {
482
- if (event.key === "Escape") onClose();
483
- };
484
- window.addEventListener("keydown", onKeyDown);
485
- return () => {
486
- window.removeEventListener("keydown", onKeyDown);
487
- restoreRef.current?.focus();
488
- };
489
- }, [onClose]);
490
- return (0, react_dom.createPortal)((0, react_jsx_runtime.jsxs)("div", {
491
- className: ImageLightbox_module_css_default.backdrop,
492
- role: "dialog",
493
- "aria-modal": "true",
494
- "aria-label": labels.dialog,
495
- children: [
496
- (0, react_jsx_runtime.jsx)("div", {
497
- className: ImageLightbox_module_css_default.mask,
498
- "aria-hidden": "true",
499
- onMouseDown: onClose
500
- }),
501
- (0, react_jsx_runtime.jsx)("img", {
502
- className: ImageLightbox_module_css_default.image,
503
- src,
504
- alt
505
- }),
506
- (0, react_jsx_runtime.jsx)("button", {
507
- ref: closeRef,
508
- type: "button",
509
- className: ImageLightbox_module_css_default.close,
510
- "aria-label": labels.close,
511
- onClick: onClose,
512
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutline16, { size: 16 })
513
- })
514
- ]
515
- }), document.body);
516
- }
517
- //#endregion
518
444
  //#region lib/types/client/labels.js
519
445
  /**
520
446
  * Resolve original-image lightbox strings from the conversation namespace.
@@ -584,8 +510,87 @@ window.__ModuleLoader__.load({
584
510
  };
585
511
  }
586
512
  //#endregion
513
+ //#region lib/types/client/drop-events.js
514
+ /**
515
+ * Members of a drop that are directories. The `File` a directory drop yields
516
+ * is indistinguishable from an empty file, so the entry API is the only
517
+ * source of that fact; browsers without it report no directories.
518
+ */
519
+ function droppedDirectories(dataTransfer, files) {
520
+ const directories = /* @__PURE__ */ new Set();
521
+ let fileIndex = 0;
522
+ for (const item of dataTransfer.items) {
523
+ if (item.kind !== "file") continue;
524
+ const file = files[fileIndex++];
525
+ if (typeof item.webkitGetAsEntry !== "function") continue;
526
+ if (item.webkitGetAsEntry()?.isDirectory !== true) continue;
527
+ if (file !== void 0) directories.add(file);
528
+ }
529
+ return directories;
530
+ }
531
+ /**
532
+ * Install one attachment view's file-drop listeners.
533
+ * @param canAcceptDrop - whether this view accepts the dropped files.
534
+ * @param onAddFiles - attachment intake callback.
535
+ * @param dragDepth - the view's retained nested-drag counter.
536
+ * @param setDragActive - publish whether a file drag is active.
537
+ * @returns cleanup for exactly these listeners.
538
+ */
539
+ function installDocumentDropEvents(canAcceptDrop, onAddFiles, dragDepth, setDragActive) {
540
+ const fileTransfer = (event) => {
541
+ const dataTransfer = event.dataTransfer;
542
+ if (dataTransfer === null || !dataTransfer.types.includes("Files")) return null;
543
+ return dataTransfer;
544
+ };
545
+ const reset = () => {
546
+ dragDepth.current = 0;
547
+ setDragActive(false);
548
+ };
549
+ const onDragEnter = (event) => {
550
+ if (fileTransfer(event) === null) return;
551
+ event.preventDefault();
552
+ dragDepth.current += 1;
553
+ setDragActive(true);
554
+ };
555
+ const onDragOver = (event) => {
556
+ const dataTransfer = fileTransfer(event);
557
+ if (dataTransfer === null) return;
558
+ event.preventDefault();
559
+ dataTransfer.dropEffect = canAcceptDrop ? "copy" : "none";
560
+ };
561
+ const onDragLeave = (event) => {
562
+ if (fileTransfer(event) === null) return;
563
+ dragDepth.current = Math.max(0, dragDepth.current - 1);
564
+ if (dragDepth.current === 0) setDragActive(false);
565
+ const leftViewport = event.clientX <= 0 || event.clientY <= 0 || event.clientX >= window.innerWidth || event.clientY >= window.innerHeight;
566
+ if ((event.target === document.documentElement || event.target === document.body) && leftViewport) reset();
567
+ };
568
+ const onDrop = (event) => {
569
+ const dataTransfer = fileTransfer(event);
570
+ if (dataTransfer === null) return;
571
+ event.preventDefault();
572
+ reset();
573
+ if (canAcceptDrop) {
574
+ const files = [...dataTransfer.files];
575
+ onAddFiles(files, droppedDirectories(dataTransfer, files));
576
+ }
577
+ };
578
+ document.addEventListener("dragenter", onDragEnter);
579
+ document.addEventListener("dragover", onDragOver);
580
+ document.addEventListener("dragleave", onDragLeave);
581
+ document.addEventListener("drop", onDrop);
582
+ window.addEventListener("dragend", reset);
583
+ return () => {
584
+ document.removeEventListener("dragenter", onDragEnter);
585
+ document.removeEventListener("dragover", onDragOver);
586
+ document.removeEventListener("dragleave", onDragLeave);
587
+ document.removeEventListener("drop", onDrop);
588
+ window.removeEventListener("dragend", reset);
589
+ };
590
+ }
591
+ //#endregion
587
592
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/client/ComposerAttachments.module.css.mjs
588
- const css$1 = "._54WpYG_rail{min-width:0;margin-bottom:-6px;padding:2px 10px 0}._54WpYG_imageItem{width:64px;height:64px;position:relative}._54WpYG_thumbnail{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;border-radius:16px;width:64px;height:64px;padding:0;overflow:hidden}._54WpYG_thumbnail img{object-fit:cover;width:100%;height:100%;display:block}._54WpYG_remove{z-index:1;corner-shape:round;background:var(--dsw-alias-button-contrast-fill);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted);cursor:pointer;opacity:0;border:none;border-radius:50%;place-items:center;padding:0;transition:opacity .2s ease-in-out;display:grid;position:absolute;top:4px;right:4px}._54WpYG_imageItem:hover ._54WpYG_remove,._54WpYG_remove:focus-visible{opacity:1}@media (pointer:coarse){._54WpYG_remove{opacity:1}}@media (prefers-reduced-motion:reduce){._54WpYG_remove{transition:none}}";
593
+ const css$1 = "._54WpYG_rail{min-width:0;margin-bottom:-6px;padding:2px 10px 0}._54WpYG_imageItem{width:64px;height:64px;position:relative}._54WpYG_thumbnail{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;width:64px;height:64px;padding:0;overflow:hidden}._54WpYG_thumbnail img{object-fit:cover;width:100%;height:100%;display:block}._54WpYG_remove{z-index:1;corner-shape:round;background:var(--dsw-alias-button-contrast-fill);width:18px;height:18px;color:var(--dsw-alias-label-primary-inverted);cursor:pointer;opacity:0;border:none;border-radius:50%;place-items:center;padding:0;transition:opacity .2s ease-in-out;display:grid;position:absolute;top:4px;right:4px}._54WpYG_imageItem:hover ._54WpYG_remove,._54WpYG_remove:focus-visible{opacity:1}@media (pointer:coarse){._54WpYG_remove{opacity:1}}@media (prefers-reduced-motion:reduce){._54WpYG_remove{transition:none}}";
589
594
  const tagId$1 = "@deepseek-ai/dsh-client-ui-attachment/ComposerAttachments.module.css";
590
595
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
591
596
  const tag = document.createElement("style");
@@ -614,53 +619,7 @@ window.__ModuleLoader__.load({
614
619
  if (preview !== null && !attachments.some((attachment) => attachment.id === preview.id)) setPreview(null);
615
620
  }, [attachments, preview]);
616
621
  (0, react.useEffect)(() => {
617
- const fileTransfer = (event) => {
618
- const dataTransfer = event.dataTransfer;
619
- if (dataTransfer === null || !dataTransfer.types.includes("Files")) return null;
620
- return dataTransfer;
621
- };
622
- const reset = () => {
623
- dragDepth.current = 0;
624
- setDragActive(false);
625
- };
626
- const onDragEnter = (event) => {
627
- if (fileTransfer(event) === null) return;
628
- event.preventDefault();
629
- dragDepth.current += 1;
630
- setDragActive(true);
631
- };
632
- const onDragOver = (event) => {
633
- const dataTransfer = fileTransfer(event);
634
- if (dataTransfer === null) return;
635
- event.preventDefault();
636
- dataTransfer.dropEffect = canAcceptDrop ? "copy" : "none";
637
- };
638
- const onDragLeave = (event) => {
639
- if (fileTransfer(event) === null) return;
640
- dragDepth.current = Math.max(0, dragDepth.current - 1);
641
- if (dragDepth.current === 0) setDragActive(false);
642
- const leftViewport = event.clientX <= 0 || event.clientY <= 0 || event.clientX >= window.innerWidth || event.clientY >= window.innerHeight;
643
- if ((event.target === document.documentElement || event.target === document.body) && leftViewport) reset();
644
- };
645
- const onDrop = (event) => {
646
- const dataTransfer = fileTransfer(event);
647
- if (dataTransfer === null) return;
648
- event.preventDefault();
649
- reset();
650
- if (canAcceptDrop) onAddFiles([...dataTransfer.files]);
651
- };
652
- document.addEventListener("dragenter", onDragEnter);
653
- document.addEventListener("dragover", onDragOver);
654
- document.addEventListener("dragleave", onDragLeave);
655
- document.addEventListener("drop", onDrop);
656
- window.addEventListener("dragend", reset);
657
- return () => {
658
- document.removeEventListener("dragenter", onDragEnter);
659
- document.removeEventListener("dragover", onDragOver);
660
- document.removeEventListener("dragleave", onDragLeave);
661
- document.removeEventListener("drop", onDrop);
662
- window.removeEventListener("dragend", reset);
663
- };
622
+ return installDocumentDropEvents(canAcceptDrop, onAddFiles, dragDepth, setDragActive);
664
623
  }, [canAcceptDrop, onAddFiles]);
665
624
  const railItems = (0, react.useMemo)(() => attachments.map((attachment) => ({
666
625
  id: attachment.id,
@@ -714,13 +673,13 @@ window.__ModuleLoader__.load({
714
673
  onClick: () => {
715
674
  onRemoveAttachment(attachment.id);
716
675
  },
717
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFill14, { size: 12 })
676
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFillRegular, { size: 12 })
718
677
  })]
719
678
  });
720
679
  }
721
680
  })
722
681
  }),
723
- preview !== null && (0, react_jsx_runtime.jsx)(ImageLightbox, {
682
+ preview !== null && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.ImageLightbox, {
724
683
  src: preview.previewUrl,
725
684
  alt: preview.file.name || t("image.original"),
726
685
  labels: lightboxLabels(t),
@@ -730,7 +689,7 @@ window.__ModuleLoader__.load({
730
689
  }
731
690
  //#endregion
732
691
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-attachment/src/MessageImage.module.css.mjs
733
- const css = ".R_Yw7q_gallery{flex-wrap:wrap;gap:10px;max-width:100%;display:flex}.R_Yw7q_gallery[data-align=end]{justify-content:flex-end;align-self:flex-end}.R_Yw7q_gallery[data-align=start]{justify-content:flex-start;align-self:flex-start}.R_Yw7q_frame{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;border-radius:16px;flex:none;place-items:center;min-width:44px;min-height:44px;padding:0;display:grid;overflow:hidden}.R_Yw7q_frame[data-variant=tile]{width:64px;min-width:64px;height:64px;min-height:64px}.R_Yw7q_frame img{object-fit:cover;width:100%;height:100%;display:block}.R_Yw7q_loading,.R_Yw7q_error{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.R_Yw7q_error{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-alias-interactive-bg-hover-danger);cursor:pointer;border-radius:10px;max-width:240px;padding:10px 12px}.R_Yw7q_error[data-variant=tile]{border-radius:16px;width:64px;height:64px;padding:4px;overflow:hidden}";
692
+ const css = ".R_Yw7q_gallery{flex-wrap:wrap;gap:10px;max-width:100%;display:flex}.R_Yw7q_gallery[data-align=end]{justify-content:flex-end;align-self:flex-end}.R_Yw7q_gallery[data-align=start]{justify-content:flex-start;align-self:flex-start}.R_Yw7q_frame{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-interactive-bg-hover);cursor:zoom-in;flex:none;place-items:center;min-width:44px;min-height:44px;padding:0;display:grid;overflow:hidden}.R_Yw7q_frame[data-variant=tile]{width:64px;min-width:64px;height:64px;min-height:64px}.R_Yw7q_frame img{object-fit:cover;width:100%;height:100%;display:block}.R_Yw7q_loading,.R_Yw7q_error{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.R_Yw7q_error{border:.5px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);cursor:pointer;max-width:240px;padding:10px 12px}.R_Yw7q_error[data-variant=tile]{border-radius:var(--dsw-radius-xl);width:64px;height:64px;padding:4px;overflow:hidden}.R_Yw7q_frame[data-variant=thumbnail],.R_Yw7q_error[data-variant=thumbnail]{box-sizing:border-box;border-radius:var(--dsw-radius-lg);place-items:center;width:48px;min-width:48px;height:48px;min-height:48px;padding:2px;display:grid;overflow:hidden}.R_Yw7q_frame[data-variant=thumbnail] img{object-fit:contain}.R_Yw7q_spinner{animation:.9s linear infinite R_Yw7q_spinner-rotate}@keyframes R_Yw7q_spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.R_Yw7q_spinner{animation:none}}.R_Yw7q_frame:focus-visible,.R_Yw7q_error:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}";
734
693
  const tagId = "@deepseek-ai/dsh-client-ui-attachment/MessageImage.module.css";
735
694
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
736
695
  const tag = document.createElement("style");
@@ -743,7 +702,9 @@ window.__ModuleLoader__.load({
743
702
  "error": "R_Yw7q_error",
744
703
  "frame": "R_Yw7q_frame",
745
704
  "gallery": "R_Yw7q_gallery",
746
- "loading": "R_Yw7q_loading"
705
+ "loading": "R_Yw7q_loading",
706
+ "spinner": "R_Yw7q_spinner",
707
+ "spinner-rotate": "R_Yw7q_spinner-rotate"
747
708
  };
748
709
  //#endregion
749
710
  //#region lib/types/MessageImage.js
@@ -782,10 +743,11 @@ window.__ModuleLoader__.load({
782
743
  * preview. A lone image renders at its `singleFit` size; an image among
783
744
  * several renders as a fixed 64px square tile. The preview arm displays its
784
745
  * local URL directly — no loader round-trip, no failure/retry surface.
746
+ * List thumbnails use status icons with localized tooltips and accessible names.
785
747
  *
786
748
  * @param props.image - the durable reference to load, or the local preview to display.
787
749
  * @param props.load - session-authorized URL loader for the durable arm.
788
- * @param props.variant - `single` for a message's lone image, `tile` otherwise.
750
+ * @param props.variant - lone image, cropped gallery tile, or uncropped list thumbnail.
789
751
  * @param props.labels - resolved strings (tooltip, loading, retry, lightbox).
790
752
  * @returns the bounded thumbnail button, or the retry control on failure.
791
753
  */
@@ -830,13 +792,19 @@ window.__ModuleLoader__.load({
830
792
  attempt
831
793
  ]);
832
794
  const src = preview?.url ?? loaded;
833
- const label = preview?.name ?? attachment?.name ?? labels.image;
795
+ const label = ("attachment" in image ? image.label : void 0) ?? preview?.name ?? attachment?.name ?? labels.image;
796
+ const loadingThumbnail = variant === "thumbnail" && src === null;
834
797
  if (error) return (0, react_jsx_runtime.jsx)("button", {
835
798
  type: "button",
836
799
  className: MessageImage_module_css_default.error,
837
800
  "data-variant": variant,
801
+ title: variant === "thumbnail" ? labels.loadFailed : void 0,
802
+ "aria-label": variant === "thumbnail" ? labels.loadFailed : void 0,
838
803
  onClick: request,
839
- children: labels.loadFailed
804
+ children: variant === "thumbnail" ? (0, react_jsx_runtime.jsx)("span", {
805
+ "aria-hidden": "true",
806
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
807
+ }) : labels.loadFailed
840
808
  });
841
809
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("button", {
842
810
  type: "button",
@@ -846,20 +814,22 @@ window.__ModuleLoader__.load({
846
814
  width: fit.width,
847
815
  height: fit.height
848
816
  },
849
- title: labels.open,
850
- "aria-label": labels.openNamed(label),
817
+ title: loadingThumbnail ? labels.loading : labels.open,
818
+ "aria-label": loadingThumbnail ? labels.loading : labels.openNamed(label),
819
+ "aria-busy": loadingThumbnail || void 0,
851
820
  onClick: () => {
852
821
  if (src !== null) setOpen(true);
853
822
  },
854
823
  children: src === null ? (0, react_jsx_runtime.jsx)("span", {
855
824
  className: MessageImage_module_css_default.loading,
856
- children: labels.loading
825
+ "aria-hidden": loadingThumbnail || void 0,
826
+ children: loadingThumbnail ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, { className: MessageImage_module_css_default.spinner }) : labels.loading
857
827
  }) : (0, react_jsx_runtime.jsx)("img", {
858
828
  src,
859
829
  alt: label,
860
830
  style: fit === void 0 ? void 0 : { objectPosition: fit.objectPosition }
861
831
  })
862
- }), open && src !== null && (0, react_jsx_runtime.jsx)(ImageLightbox, {
832
+ }), open && src !== null && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.ImageLightbox, {
863
833
  src,
864
834
  alt: label,
865
835
  labels: labels.lightbox,
@@ -867,10 +837,10 @@ window.__ModuleLoader__.load({
867
837
  })] });
868
838
  }
869
839
  /** Wrapping image group shared by user and assistant history: a lone image
870
- * renders large unless its owning mixed-attachment row requests compact tiles. */
871
- function ImageGallery({ images, load, align, compact = false, labels }) {
840
+ * renders large unless its owner requests compact tiles or contained list thumbnails. */
841
+ function ImageGallery({ images, load, align, compact = false, thumbnail = false, labels }) {
872
842
  if (images.length === 0) return null;
873
- const variant = compact || images.length > 1 ? "tile" : "single";
843
+ const variant = thumbnail ? "thumbnail" : compact || images.length > 1 ? "tile" : "single";
874
844
  return (0, react_jsx_runtime.jsx)("div", {
875
845
  className: MessageImage_module_css_default.gallery,
876
846
  "data-align": align,
@@ -885,12 +855,13 @@ window.__ModuleLoader__.load({
885
855
  //#endregion
886
856
  //#region lib/types/client/MessageImages.js
887
857
  /** Historical message-image slot entry. */
888
- function MessageImages({ images, loadImage, align, compact = false, t }) {
858
+ function MessageImages({ images, loadImage, align, compact = false, thumbnail = false, t }) {
889
859
  return (0, react_jsx_runtime.jsx)(ImageGallery, {
890
860
  images,
891
861
  load: loadImage,
892
862
  align,
893
863
  compact,
864
+ thumbnail,
894
865
  labels: messageImageLabels(t)
895
866
  });
896
867
  }