@deep-eye/core 1.3.84 → 1.3.87

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 (164) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +1 -1
  3. package/dist/{ChartRenderer-NUULTbe7.cjs → ChartRenderer-D5smoPbl.cjs} +1 -1
  4. package/dist/{ChartRenderer-BFYHRt_Q.js → ChartRenderer-lJ5Zz8gr.js} +1 -1
  5. package/dist/{ChatMyFilesArtifacts-Qkim1200.js → ChatMyFilesArtifacts-83kaOC7E.js} +427 -444
  6. package/dist/ChatMyFilesArtifacts-BhflVsJl.cjs +1 -0
  7. package/dist/components/chat/ChatApp.vue.d.ts +30 -14
  8. package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
  9. package/dist/components/chat/addToTask.d.ts +1 -1
  10. package/dist/components/chat/addToTask.d.ts.map +1 -1
  11. package/dist/components/chat/attachmentController.d.ts.map +1 -1
  12. package/dist/components/chat/attachments.d.ts +4 -1
  13. package/dist/components/chat/attachments.d.ts.map +1 -1
  14. package/dist/components/chat/chatErrors.d.ts.map +1 -1
  15. package/dist/components/chat/chatFilePicker.d.ts +91 -1
  16. package/dist/components/chat/chatFilePicker.d.ts.map +1 -1
  17. package/dist/components/chat/chatQuota.d.ts +84 -15
  18. package/dist/components/chat/chatQuota.d.ts.map +1 -1
  19. package/dist/components/chat/chatSessionSidebarAssets.d.ts +4 -2
  20. package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -1
  21. package/dist/components/chat/cloudConfig.d.ts +6 -0
  22. package/dist/components/chat/cloudConfig.d.ts.map +1 -1
  23. package/dist/components/chat/components/ChatFilePickerDialog.vue.d.ts +5 -5
  24. package/dist/components/chat/components/ChatFilePickerDialog.vue.d.ts.map +1 -1
  25. package/dist/components/chat/components/ChatMentionFileMenu.vue.d.ts +24 -0
  26. package/dist/components/chat/components/ChatMentionFileMenu.vue.d.ts.map +1 -0
  27. package/dist/components/chat/components/ChatPreviewDrawer.vue.d.ts +31 -0
  28. package/dist/components/chat/components/ChatPreviewDrawer.vue.d.ts.map +1 -0
  29. package/dist/components/chat/components/ChatPreviewHeader.vue.d.ts +1 -1
  30. package/dist/components/chat/components/ChatPreviewHeader.vue.d.ts.map +1 -1
  31. package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts +23 -1
  32. package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts.map +1 -1
  33. package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts +14 -3
  34. package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts.map +1 -1
  35. package/dist/components/chat/components/ChatSender.vue.d.ts +3 -3
  36. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  37. package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts +12 -2
  38. package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -1
  39. package/dist/components/chat/components/ChatWelcomeRobot.vue.d.ts +10 -0
  40. package/dist/components/chat/components/ChatWelcomeRobot.vue.d.ts.map +1 -0
  41. package/dist/components/chat/components/ConversationIndex.vue.d.ts.map +1 -1
  42. package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -1
  43. package/dist/components/chat/components/IntermediateFileCards.vue.d.ts.map +1 -1
  44. package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
  45. package/dist/components/chat/components/UserMessageEditor.vue.d.ts.map +1 -1
  46. package/dist/components/chat/components/files/ChatArtifactFileRow.vue.d.ts.map +1 -1
  47. package/dist/components/chat/components/files/ChatArtifactPreview.vue.d.ts.map +1 -1
  48. package/dist/components/chat/components/files/ChatFileCheckbox.vue.d.ts +2 -0
  49. package/dist/components/chat/components/files/ChatFileCheckbox.vue.d.ts.map +1 -1
  50. package/dist/components/chat/components/files/ChatMyFiles.vue.d.ts +6 -0
  51. package/dist/components/chat/components/files/ChatMyFiles.vue.d.ts.map +1 -1
  52. package/dist/components/chat/components/files/ChatMyFilesArtifacts.vue.d.ts.map +1 -1
  53. package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts +6 -0
  54. package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts.map +1 -1
  55. package/dist/components/chat/components/files/ChatMyFilesEmptyGuide.vue.d.ts.map +1 -1
  56. package/dist/components/chat/components/files/ChatMyFilesFileTable.vue.d.ts +66 -3
  57. package/dist/components/chat/components/files/ChatMyFilesFileTable.vue.d.ts.map +1 -1
  58. package/dist/components/chat/components/files/ChatMyFilesFolder.vue.d.ts +61 -5
  59. package/dist/components/chat/components/files/ChatMyFilesFolder.vue.d.ts.map +1 -1
  60. package/dist/components/chat/components/files/ChatMyFilesGuideIcon.vue.d.ts +8 -0
  61. package/dist/components/chat/components/files/ChatMyFilesGuideIcon.vue.d.ts.map +1 -0
  62. package/dist/components/chat/components/files/ChatMyFilesQuickAdd.vue.d.ts +17 -3
  63. package/dist/components/chat/components/files/ChatMyFilesQuickAdd.vue.d.ts.map +1 -1
  64. package/dist/components/chat/components/files/ChatMyFilesRecent.vue.d.ts.map +1 -1
  65. package/dist/components/chat/components/files/ChatMyFilesSearchDialog.vue.d.ts +18 -2
  66. package/dist/components/chat/components/files/ChatMyFilesSearchDialog.vue.d.ts.map +1 -1
  67. package/dist/components/chat/components/files/ChatMyFilesTree.vue.d.ts +1 -1
  68. package/dist/components/chat/components/files/ChatMyFilesTree.vue.d.ts.map +1 -1
  69. package/dist/components/chat/components/files/ChatMyFilesUploadDialog.vue.d.ts +2 -2
  70. package/dist/components/chat/components/files/ChatMyFilesUploadPanel.vue.d.ts +4 -5
  71. package/dist/components/chat/components/files/ChatMyFilesUploadPanel.vue.d.ts.map +1 -1
  72. package/dist/components/chat/components/files/ChatSelectionBar.vue.d.ts +36 -0
  73. package/dist/components/chat/components/files/ChatSelectionBar.vue.d.ts.map +1 -0
  74. package/dist/components/chat/components/files/ChatUploadPanel.vue.d.ts +34 -0
  75. package/dist/components/chat/components/files/ChatUploadPanel.vue.d.ts.map +1 -0
  76. package/dist/components/chat/components/files/chatArtifactFileActions.d.ts +29 -12
  77. package/dist/components/chat/components/files/chatArtifactFileActions.d.ts.map +1 -1
  78. package/dist/components/chat/components/files/chatFileTransfer.d.ts +55 -12
  79. package/dist/components/chat/components/files/chatFileTransfer.d.ts.map +1 -1
  80. package/dist/components/chat/components/files/chatFileTransferSources.d.ts +37 -3
  81. package/dist/components/chat/components/files/chatFileTransferSources.d.ts.map +1 -1
  82. package/dist/components/chat/components/files/chatMyFilesApi.d.ts +140 -2
  83. package/dist/components/chat/components/files/chatMyFilesApi.d.ts.map +1 -1
  84. package/dist/components/chat/components/files/chatMyFilesModel.d.ts +29 -3
  85. package/dist/components/chat/components/files/chatMyFilesModel.d.ts.map +1 -1
  86. package/dist/components/chat/components/files/chatReviewApi.d.ts +7 -2
  87. package/dist/components/chat/components/files/chatReviewApi.d.ts.map +1 -1
  88. package/dist/components/chat/components/files/chatUploadPanel.d.ts +42 -0
  89. package/dist/components/chat/components/files/chatUploadPanel.d.ts.map +1 -0
  90. package/dist/components/chat/components/files/guideIcon.d.ts +8 -0
  91. package/dist/components/chat/components/files/guideIcon.d.ts.map +1 -0
  92. package/dist/components/chat/components/files/index.d.ts +21 -3
  93. package/dist/components/chat/components/files/index.d.ts.map +1 -1
  94. package/dist/components/chat/components/files/myFilesFilePicker.d.ts +16 -3
  95. package/dist/components/chat/components/files/myFilesFilePicker.d.ts.map +1 -1
  96. package/dist/components/chat/components/files/myFilesRows.d.ts +15 -0
  97. package/dist/components/chat/components/files/myFilesRows.d.ts.map +1 -1
  98. package/dist/components/chat/components/files/myFilesShareSchool.d.ts +17 -0
  99. package/dist/components/chat/components/files/myFilesShareSchool.d.ts.map +1 -0
  100. package/dist/components/chat/components/files/myFilesTransferQueue.d.ts +5 -0
  101. package/dist/components/chat/components/files/myFilesTransferQueue.d.ts.map +1 -1
  102. package/dist/components/chat/components/files/myFilesUploadQueue.d.ts +2 -0
  103. package/dist/components/chat/components/files/myFilesUploadQueue.d.ts.map +1 -1
  104. package/dist/components/chat/components/files/useFileTransfer.d.ts +15 -4
  105. package/dist/components/chat/components/files/useFileTransfer.d.ts.map +1 -1
  106. package/dist/components/chat/components/index.d.ts +4 -0
  107. package/dist/components/chat/components/index.d.ts.map +1 -1
  108. package/dist/components/chat/components/mentionFileMenu.d.ts +130 -0
  109. package/dist/components/chat/components/mentionFileMenu.d.ts.map +1 -0
  110. package/dist/components/chat/composables/chatQuotaApi.d.ts +32 -0
  111. package/dist/components/chat/composables/chatQuotaApi.d.ts.map +1 -0
  112. package/dist/components/chat/composables/useChatColorMode.d.ts +11 -0
  113. package/dist/components/chat/composables/useChatColorMode.d.ts.map +1 -0
  114. package/dist/components/chat/composables/useChatQuota.d.ts +24 -0
  115. package/dist/components/chat/composables/useChatQuota.d.ts.map +1 -0
  116. package/dist/components/chat/composer/ComposerFormattedText.vue.d.ts.map +1 -1
  117. package/dist/components/chat/composer/ComposerInlineParts.vue.d.ts.map +1 -1
  118. package/dist/components/chat/composer/composerExtensions.d.ts +3 -0
  119. package/dist/components/chat/composer/composerExtensions.d.ts.map +1 -1
  120. package/dist/components/chat/composer/composerText.d.ts +6 -1
  121. package/dist/components/chat/composer/composerText.d.ts.map +1 -1
  122. package/dist/components/chat/fileChipView.d.ts +21 -0
  123. package/dist/components/chat/fileChipView.d.ts.map +1 -0
  124. package/dist/components/chat/fileToken.d.ts +42 -0
  125. package/dist/components/chat/fileToken.d.ts.map +1 -0
  126. package/dist/components/chat/hydrateHistory.d.ts.map +1 -1
  127. package/dist/components/chat/icons/ChatTipMenuAssetIcon.vue.d.ts +9 -0
  128. package/dist/components/chat/icons/ChatTipMenuAssetIcon.vue.d.ts.map +1 -1
  129. package/dist/components/chat/icons/ChatTipMenuLocalFileIcon.vue.d.ts.map +1 -1
  130. package/dist/components/chat/icons/ChatTipMenuMyFilesIcon.vue.d.ts.map +1 -1
  131. package/dist/components/chat/index.d.ts +2 -2
  132. package/dist/components/chat/index.d.ts.map +1 -1
  133. package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts.map +1 -1
  134. package/dist/components/chat/mentionEditor.d.ts +3 -1
  135. package/dist/components/chat/mentionEditor.d.ts.map +1 -1
  136. package/dist/components/chat/responseStream.d.ts +3 -1
  137. package/dist/components/chat/responseStream.d.ts.map +1 -1
  138. package/dist/components/chat/types.d.ts +31 -6
  139. package/dist/components/chat/types.d.ts.map +1 -1
  140. package/dist/components/library/LibraryApp.vue.d.ts +8 -2
  141. package/dist/components/library/LibraryApp.vue.d.ts.map +1 -1
  142. package/dist/components/library/components/LibrarySidebar.vue.d.ts +6 -2
  143. package/dist/components/library/components/LibrarySidebar.vue.d.ts.map +1 -1
  144. package/dist/components/ui/components/UiMenuNestedSubmenu.vue.d.ts.map +1 -1
  145. package/dist/components/ui/components/UiSplitPane.vue.d.ts +38 -0
  146. package/dist/components/ui/components/UiSplitPane.vue.d.ts.map +1 -0
  147. package/dist/components/ui/components/index.d.ts +1 -0
  148. package/dist/components/ui/components/index.d.ts.map +1 -1
  149. package/dist/{docx-preview-CgF7upUL.js → docx-preview-DGy9Ky36.js} +1 -1
  150. package/dist/{docx-preview-Dom9DuwY.cjs → docx-preview-DnSEXqsD.cjs} +1 -1
  151. package/dist/index-B-jsC3Gu.cjs +1443 -0
  152. package/dist/{index-DaiEgT_d.js → index-BjoCM559.js} +33073 -30032
  153. package/dist/{index-Ctl5i7Ad.cjs → index-BqQ5eE7K.cjs} +1 -1
  154. package/dist/{index-CxF54XmE.js → index-QH1oDPuS.js} +1 -1
  155. package/dist/index.cjs +1 -1
  156. package/dist/index.js +611 -574
  157. package/dist/{papaparse.min-CpVgW58v.js → papaparse.min-DXbU8MEz.js} +1 -1
  158. package/dist/{papaparse.min-Dkpv4aky.cjs → papaparse.min-V_TidkCa.cjs} +1 -1
  159. package/dist/style.css +2 -2
  160. package/dist/welcome-robot-typing.webp +0 -0
  161. package/dist/welcome-robot-wave.webp +0 -0
  162. package/package.json +1 -1
  163. package/dist/ChatMyFilesArtifacts-BxZqqm8I.cjs +0 -1
  164. package/dist/index-DuVaE24T.cjs +0 -1410
@@ -1,7 +1,7 @@
1
- import { defineComponent as be, computed as f, openBlock as i, createElementBlock as d, normalizeClass as U, createElementVNode as s, createVNode as M, withModifiers as Ke, toDisplayString as b, createCommentVNode as T, unref as m, withCtx as se, ref as c, watch as ue, onMounted as st, nextTick as Dt, onBeforeUnmount as Nt, createBlock as P, Teleport as Ht, Transition as Ut, Fragment as de, renderList as fe, normalizeStyle as ce, onUnmounted as Ot, withDirectives as zt, vModelText as Gt, createTextVNode as Ve } from "vue";
1
+ import { defineComponent as ke, computed as d, openBlock as i, createElementBlock as f, normalizeClass as U, createElementVNode as s, createVNode as x, withModifiers as Ke, toDisplayString as A, createCommentVNode as I, unref as h, withCtx as le, ref as c, watch as de, onMounted as st, nextTick as Dt, onBeforeUnmount as Nt, createBlock as P, Teleport as Ut, Transition as Ht, Fragment as fe, renderList as ve, normalizeStyle as ue, onUnmounted as Ot, withDirectives as zt, vModelText as Gt, createTextVNode as Ve } from "vue";
2
2
  import "@vueuse/core";
3
- import { c as lt, u as Re, A as nt, a as ot, b as it, d as rt, e as ct, C as Kt, f as Vt, g as ut, _ as Ce, h as ge, i as Zt, j as qt, k as Wt, l as jt, m as Yt, r as Qt, n as Jt, o as Xt, p as ea, q as ta, s as Ze, t as aa, v as sa, w as la, x as na, y as oa, z as ia, B as ra, K as ca, D as qe, E as V, F as We, G as ua, H as da, I as je, J as fa, L as va, M as _a, N as ha, O as Ye, P as Be, Q as ma, R as pa, S as ya, T as wa, U as Qe, V as Je, W as Xe, X as et, Y as ka, Z as ga } from "./index-DaiEgT_d.js";
4
- const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20viewBox='0%200%2024.0%2024.0'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cclipPath%20id='i0'%3e%3cpath%20d='M2000,0%20L2000,4212%20L0,4212%20L0,0%20L2000,0%20Z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='translate(-157.0%20-2549.0)'%3e%3cg%20clip-path='url(%23i0)'%3e%3cg%20transform='translate(145.0%202545.0)'%3e%3cg%20transform='translate(12.0%204.0)'%3e%3cg%20transform='translate(24.0%2024.0)%20rotate(90.0)%20scale(-1.0%201.0)'%3e%3cg%20transform='translate(17.5%209.5)%20rotate(90.00000000000001)'%3e%3cpath%20d='M0,0%20L5,5%20L0,10'%20stroke='currentColor'%20stroke-width='1.8'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ca = { class: "chat-artifact-row__lead" }, Ta = { class: "chat-artifact-row__name" }, Aa = ["title"], xa = { class: "chat-artifact-row__meta" }, Ia = { class: "chat-artifact-row__cell chat-artifact-row__cell--kind" }, Fa = ["title"], Ma = { class: "chat-artifact-row__cell chat-artifact-row__cell--time" }, Sa = { class: "chat-artifact-row__cell chat-artifact-row__cell--size" }, La = /* @__PURE__ */ be({
3
+ import { u as lt, c as nt, a as Re, A as ot, b as it, d as rt, e as ct, f as ut, C as Kt, g as Vt, h as dt, _ as be, i as ge, j as Zt, k as qt, l as Wt, m as jt, n as Yt, r as Qt, o as Jt, p as Xt, q as ea, s as ta, t as Ze, v as aa, w as sa, x as la, y as na, z as oa, B as ia, D as ra, K as ca, E as qe, F as V, G as We, H as ua, I as da, J as je, L as fa, M as va, N as _a, O as ma, P as ha, Q as Ye, R as $e, S as pa, T as ya, U as wa, V as ga, W as Qe, X as Je, Y as Xe, Z as et, $ as ka, a0 as ba } from "./index-BjoCM559.js";
4
+ const Ca = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20viewBox='0%200%2024.0%2024.0'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cclipPath%20id='i0'%3e%3cpath%20d='M2000,0%20L2000,4212%20L0,4212%20L0,0%20L2000,0%20Z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='translate(-157.0%20-2549.0)'%3e%3cg%20clip-path='url(%23i0)'%3e%3cg%20transform='translate(145.0%202545.0)'%3e%3cg%20transform='translate(12.0%204.0)'%3e%3cg%20transform='translate(24.0%2024.0)%20rotate(90.0)%20scale(-1.0%201.0)'%3e%3cg%20transform='translate(17.5%209.5)%20rotate(90.00000000000001)'%3e%3cpath%20d='M0,0%20L5,5%20L0,10'%20stroke='currentColor'%20stroke-width='1.8'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ta = { class: "chat-artifact-row__lead" }, Aa = { class: "chat-artifact-row__name" }, xa = ["title"], Fa = { class: "chat-artifact-row__meta" }, Ia = { class: "chat-artifact-row__cell chat-artifact-row__cell--kind" }, Sa = ["title"], Ma = { class: "chat-artifact-row__cell chat-artifact-row__cell--time" }, La = { class: "chat-artifact-row__cell chat-artifact-row__cell--size" }, Ea = /* @__PURE__ */ ke({
5
5
  name: "ChatArtifactFileRow",
6
6
  __name: "ChatArtifactFileRow",
7
7
  props: {
@@ -11,65 +11,70 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
11
11
  showOwner: { type: Boolean, default: !1 }
12
12
  },
13
13
  emits: ["toggle", "open", "action"],
14
- setup(r, { emit: B }) {
15
- const n = r, C = B, k = f(() => lt({ disabled: n.actionsDisabled })), { Menu: y } = Re({
16
- items: k,
17
- placement: rt,
18
- width: it,
19
- panelClass: ot,
20
- submenuPanelClass: nt,
21
- onItemClick: ({ id: p }) => {
22
- if (p.split(":").at(-1) === "download") {
14
+ setup(r, { emit: $ }) {
15
+ const n = r, C = $, g = lt(), w = d(
16
+ () => nt(
17
+ { disabled: n.actionsDisabled },
18
+ { canUploadTo: g(n.file) }
19
+ )
20
+ ), { Menu: v } = Re({
21
+ items: w,
22
+ placement: ct,
23
+ width: rt,
24
+ panelClass: it,
25
+ submenuPanelClass: ot,
26
+ onItemClick: ({ id: m }) => {
27
+ if (m.split(":").at(-1) === "download") {
23
28
  if (n.actionsDisabled) return;
24
- n.file.url && ct(n.file.url, n.file.name);
29
+ n.file.url && ut(n.file.url, n.file.name);
25
30
  return;
26
31
  }
27
- C("action", p);
32
+ C("action", m);
28
33
  }
29
- }), u = f(
34
+ }), p = d(
30
35
  () => [n.file.kind, n.file.updatedLabel, n.file.sizeLabel].filter(Boolean).join(" · ")
31
36
  );
32
- return (p, v) => (i(), d("div", {
37
+ return (m, y) => (i(), f("div", {
33
38
  class: U(["chat-artifact-row", { "is-selected": r.selected, "has-owner": r.showOwner }]),
34
- onClick: v[3] || (v[3] = (A) => C("toggle"))
39
+ onClick: y[3] || (y[3] = (B) => C("toggle"))
35
40
  }, [
36
- s("span", Ca, [
37
- M(Kt, {
41
+ s("span", Ta, [
42
+ x(Kt, {
38
43
  class: "chat-artifact-row__check",
39
44
  checked: r.selected,
40
45
  label: r.selected ? "取消选择" : "选择文件",
41
- onToggle: v[0] || (v[0] = (A) => C("toggle"))
46
+ onToggle: y[0] || (y[0] = (B) => C("toggle"))
42
47
  }, null, 8, ["checked", "label"]),
43
- M(Vt, {
48
+ x(Vt, {
44
49
  ext: r.file.ext,
45
50
  name: r.file.name
46
51
  }, null, 8, ["ext", "name"])
47
52
  ]),
48
- s("span", Ta, [
53
+ s("span", Aa, [
49
54
  s("button", {
50
55
  class: "chat-artifact-row__title",
51
56
  type: "button",
52
57
  title: r.file.name,
53
- onClick: v[1] || (v[1] = Ke((A) => C("open"), ["stop"]))
54
- }, b(r.file.name), 9, Aa),
55
- s("span", xa, b(u.value), 1)
58
+ onClick: y[1] || (y[1] = Ke((B) => C("open"), ["stop"]))
59
+ }, A(r.file.name), 9, xa),
60
+ s("span", Fa, A(p.value), 1)
56
61
  ]),
57
- s("span", Ia, b(r.file.kind), 1),
58
- r.showOwner ? (i(), d("span", {
62
+ s("span", Ia, A(r.file.kind), 1),
63
+ r.showOwner ? (i(), f("span", {
59
64
  key: 0,
60
65
  class: "chat-artifact-row__cell chat-artifact-row__cell--owner",
61
66
  title: r.file.owner || ""
62
- }, b(r.file.owner || "—"), 9, Fa)) : T("", !0),
63
- s("span", Ma, b(r.file.updatedLabel), 1),
64
- s("span", Sa, b(r.file.sizeLabel), 1),
65
- M(m(y), null, {
66
- default: se(() => [
67
- M(ut, {
67
+ }, A(r.file.owner || "—"), 9, Sa)) : I("", !0),
68
+ s("span", Ma, A(r.file.updatedLabel), 1),
69
+ s("span", La, A(r.file.sizeLabel), 1),
70
+ x(h(v), null, {
71
+ default: le(() => [
72
+ x(dt, {
68
73
  class: "chat-artifact-row__more",
69
74
  "data-testid": "artifact-row-more",
70
75
  loading: "lazy",
71
76
  decoding: "async",
72
- onClick: v[2] || (v[2] = Ke(() => {
77
+ onClick: y[2] || (y[2] = Ke(() => {
73
78
  }, ["stop"]))
74
79
  })
75
80
  ]),
@@ -77,10 +82,10 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
77
82
  })
78
83
  ], 2));
79
84
  }
80
- }), Ea = /* @__PURE__ */ Ce(La, [["__scopeId", "data-v-1c38f09e"]]), Pa = ["aria-label"], Ba = { class: "chat-artifact-preview__body" }, Ra = {
85
+ }), Pa = /* @__PURE__ */ be(Ea, [["__scopeId", "data-v-c9c7f7c8"]]), $a = ["aria-label"], Ra = { class: "chat-artifact-preview__body" }, Ba = {
81
86
  key: 3,
82
87
  class: "chat-artifact-preview__empty"
83
- }, $a = /* @__PURE__ */ be({
88
+ }, Da = /* @__PURE__ */ ke({
84
89
  name: "ChatArtifactPreview",
85
90
  __name: "ChatArtifactPreview",
86
91
  props: {
@@ -90,151 +95,156 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
90
95
  onlyofficeProfile: { default: "preview" }
91
96
  },
92
97
  emits: ["close", "action"],
93
- setup(r, { emit: B }) {
94
- const n = r, C = B, k = f(() => lt({ disabled: n.actionsDisabled })), { Menu: y } = Re({
95
- items: k,
96
- placement: rt,
97
- width: it,
98
- panelClass: ot,
99
- submenuPanelClass: nt,
98
+ setup(r, { emit: $ }) {
99
+ const n = r, C = $, g = lt(), w = d(
100
+ () => nt(
101
+ { disabled: n.actionsDisabled },
102
+ { canUploadTo: g(n.file) }
103
+ )
104
+ ), { Menu: v } = Re({
105
+ items: w,
106
+ placement: ct,
107
+ width: rt,
108
+ panelClass: it,
109
+ submenuPanelClass: ot,
100
110
  /* 弹框本体 z-index 3000,菜单面板必须盖在它之上。 */
101
111
  zIndex: 3100,
102
- onItemClick: ({ id: h }) => {
103
- if (h.split(":").at(-1) === "download") {
104
- D();
112
+ onItemClick: ({ id: u }) => {
113
+ if (u.split(":").at(-1) === "download") {
114
+ te();
105
115
  return;
106
116
  }
107
- C("action", h);
117
+ C("action", u);
108
118
  }
109
- }), u = c(null), p = c(!0);
110
- let v = 0;
111
- async function A() {
112
- const h = ++v;
113
- if (u.value = null, n.file.url) {
114
- u.value = { url: n.file.url, previewType: n.file.previewType }, p.value = !1;
119
+ }), p = c(null), m = c(!0);
120
+ let y = 0;
121
+ async function B() {
122
+ const u = ++y;
123
+ if (p.value = null, n.file.url) {
124
+ p.value = { url: n.file.url, previewType: n.file.previewType }, m.value = !1;
115
125
  return;
116
126
  }
117
- p.value = !0;
118
- const j = await aa(n.cloud, n.file);
119
- h === v && (u.value = j ?? null, p.value = !1);
120
- }
121
- const Z = f(() => ge(n.file, u.value ?? void 0)), w = f(() => {
122
- var h;
123
- return ((h = u.value) == null ? void 0 : h.url) ?? "";
124
- }), Te = f(() => Zt(Z.value)), le = f(() => qt(Z.value)), q = c(""), Q = c(0), J = c(!1);
125
- let ne;
126
- function ve(h) {
127
- q.value = h.text, Q.value = h.lines;
128
- }
129
- async function Ae() {
127
+ m.value = !0;
128
+ const J = await aa(n.cloud, n.file);
129
+ u === y && (p.value = J ?? null, m.value = !1);
130
+ }
131
+ const b = d(() => ge(n.file, p.value ?? void 0)), Z = d(() => {
132
+ var u;
133
+ return ((u = p.value) == null ? void 0 : u.url) ?? "";
134
+ }), Ce = d(() => Zt(b.value)), ne = d(() => qt(b.value)), q = c(""), ee = c(0), W = c(!1);
135
+ let oe;
136
+ function Te(u) {
137
+ q.value = u.text, ee.value = u.lines;
138
+ }
139
+ async function ie() {
130
140
  if (q.value) {
131
141
  try {
132
142
  await navigator.clipboard.writeText(q.value);
133
143
  } catch {
134
144
  return;
135
145
  }
136
- J.value = !0, clearTimeout(ne), ne = setTimeout(() => {
137
- J.value = !1;
146
+ W.value = !0, clearTimeout(oe), oe = setTimeout(() => {
147
+ W.value = !1;
138
148
  }, 1600);
139
149
  }
140
150
  }
141
- const xe = f(
151
+ const S = d(
142
152
  () => [
143
153
  n.file.kind,
144
- le.value && Q.value ? `${Q.value} 行` : "",
154
+ ne.value && ee.value ? `${ee.value} 行` : "",
145
155
  n.file.sizeLabel
146
156
  ].filter(Boolean).join(" · ")
147
- ), X = f(() => Wt(Te.value)), S = f(() => jt(n.file)), x = f(() => !!w.value && !X.value);
148
- ue(
157
+ ), F = d(() => Wt(Ce.value)), j = d(() => jt(n.file)), M = d(() => !!Z.value && !F.value);
158
+ de(
149
159
  () => [n.file.id, n.file.url],
150
- () => void A()
160
+ () => void B()
151
161
  );
152
- const W = c(), L = c();
153
- let I = null;
154
- const oe = Yt();
155
- ue(
162
+ const H = c(), re = c();
163
+ let L = null;
164
+ const Y = Yt();
165
+ de(
156
166
  () => n.file.id,
157
167
  () => {
158
- Qt(oe), q.value = "", Q.value = 0, J.value = !1;
168
+ Qt(Y), q.value = "", ee.value = 0, W.value = !1;
159
169
  }
160
170
  );
161
- const $ = c(!1), E = c(!1);
162
- let O = !1;
163
- function F() {
164
- O || (O = !0, $.value = !1);
165
- }
166
- function ie() {
167
- O && C("close");
171
+ const O = c(!1), T = c(!1);
172
+ let Q = !1;
173
+ function E() {
174
+ Q || (Q = !0, O.value = !1);
168
175
  }
169
176
  function D() {
170
- var j;
171
- const h = (j = u.value) == null ? void 0 : j.url;
172
- h && ct(h, n.file.name);
177
+ Q && C("close");
173
178
  }
174
- function N() {
175
- E.value = !E.value;
179
+ function te() {
180
+ var J;
181
+ const u = (J = p.value) == null ? void 0 : J.url;
182
+ u && ut(u, n.file.name);
176
183
  }
177
- function _e(h) {
178
- if (h.key === "Escape") {
179
- if (E.value) {
180
- E.value = !1;
184
+ function _e() {
185
+ T.value = !T.value;
186
+ }
187
+ function Ae(u) {
188
+ if (u.key === "Escape") {
189
+ if (T.value) {
190
+ T.value = !1;
181
191
  return;
182
192
  }
183
- F();
193
+ E();
184
194
  }
185
195
  }
186
196
  return st(() => {
187
- I = document.activeElement instanceof HTMLElement ? document.activeElement : null, $.value = !0, A(), Dt(() => {
188
- var h;
189
- return (h = L.value) == null ? void 0 : h.focusClose();
197
+ L = document.activeElement instanceof HTMLElement ? document.activeElement : null, O.value = !0, B(), Dt(() => {
198
+ var u;
199
+ return (u = re.value) == null ? void 0 : u.focusClose();
190
200
  });
191
201
  }), Nt(() => {
192
- I == null || I.focus(), I = null, clearTimeout(ne);
193
- }), (h, j) => (i(), P(Ht, { to: "body" }, [
194
- M(Ut, {
202
+ L == null || L.focus(), L = null, clearTimeout(oe);
203
+ }), (u, J) => (i(), P(Ut, { to: "body" }, [
204
+ x(Ht, {
195
205
  name: "cap-drawer",
196
- onAfterLeave: ie
206
+ onAfterLeave: D
197
207
  }, {
198
- default: se(() => [
199
- $.value ? (i(), d("div", {
208
+ default: le(() => [
209
+ O.value ? (i(), f("div", {
200
210
  key: 0,
201
- class: U(["chat-artifact-preview", { "is-expanded": E.value }]),
202
- onKeydown: _e
211
+ class: U(["chat-artifact-preview", { "is-expanded": T.value }]),
212
+ onKeydown: Ae
203
213
  }, [
204
214
  s("div", {
205
215
  class: "chat-artifact-preview__backdrop",
206
- onClick: F
216
+ onClick: E
207
217
  }),
208
218
  s("section", {
209
219
  ref_key: "panelRef",
210
- ref: W,
220
+ ref: H,
211
221
  class: "chat-artifact-preview__panel",
212
222
  role: "dialog",
213
223
  "aria-modal": "true",
214
224
  "aria-label": `${r.file.name} 预览`
215
225
  }, [
216
- M(Jt, {
226
+ x(Jt, {
217
227
  ref_key: "headerRef",
218
- ref: L,
228
+ ref: re,
219
229
  class: "chat-artifact-preview__header",
220
230
  name: r.file.name,
221
231
  ext: r.file.ext,
222
- meta: xe.value,
223
- chrome: m(oe),
224
- "show-download": !!w.value,
225
- fullscreen: E.value,
226
- "show-copy": le.value && !!q.value,
227
- copied: J.value,
232
+ meta: S.value,
233
+ chrome: h(Y),
234
+ "show-download": !!Z.value,
235
+ fullscreen: T.value,
236
+ "show-copy": ne.value && !!q.value,
237
+ copied: W.value,
228
238
  "show-fullscreen": "",
229
- onDownload: D,
230
- onCopy: Ae,
231
- onFullscreen: N,
232
- onClose: F
239
+ onDownload: te,
240
+ onCopy: ie,
241
+ onFullscreen: _e,
242
+ onClose: E
233
243
  }, {
234
- actions: se(() => [
235
- M(m(y), null, {
236
- default: se(() => [
237
- M(ut, {
244
+ actions: le(() => [
245
+ x(h(v), null, {
246
+ default: le(() => [
247
+ x(dt, {
238
248
  class: "chat-artifact-preview__more",
239
249
  loading: "eager",
240
250
  decoding: "async"
@@ -245,18 +255,18 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
245
255
  ]),
246
256
  _: 1
247
257
  }, 8, ["name", "ext", "meta", "chrome", "show-download", "fullscreen", "show-copy", "copied"]),
248
- s("div", Ba, [
249
- p.value ? (i(), P(Xt, {
258
+ s("div", Ra, [
259
+ m.value ? (i(), P(Xt, {
250
260
  key: 0,
251
261
  label: "正在加载文件"
252
- })) : x.value && le.value ? (i(), P(ea, {
262
+ })) : M.value && ne.value ? (i(), P(ea, {
253
263
  key: 1,
254
- src: w.value,
255
- onLoaded: ve
256
- }, null, 8, ["src"])) : x.value ? (i(), P(ta, {
264
+ src: Z.value,
265
+ onLoaded: Te
266
+ }, null, 8, ["src"])) : M.value ? (i(), P(ta, {
257
267
  key: 2,
258
268
  class: "chat-artifact-preview__viewer",
259
- resource: Z.value,
269
+ resource: b.value,
260
270
  "onlyoffice-profile": r.onlyofficeProfile,
261
271
  "screenshot-ask": !1,
262
272
  "hide-close": "",
@@ -264,39 +274,39 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
264
274
  "hide-fullscreen": "",
265
275
  "hide-sidebar": "",
266
276
  "hide-image-controls": ""
267
- }, null, 8, ["resource", "onlyoffice-profile"])) : (i(), d("div", Ra, [
268
- X.value ? (i(), P(Ze, {
277
+ }, null, 8, ["resource", "onlyoffice-profile"])) : (i(), f("div", Ba, [
278
+ F.value ? (i(), P(Ze, {
269
279
  key: 0,
270
280
  ext: r.file.ext,
271
281
  name: r.file.name,
272
- description: S.value,
273
- download: !!w.value,
274
- "secondary-label": w.value ? void 0 : "返回列表",
275
- onDownload: D,
276
- onSecondary: F
282
+ description: j.value,
283
+ download: !!Z.value,
284
+ "secondary-label": Z.value ? void 0 : "返回列表",
285
+ onDownload: te,
286
+ onSecondary: E
277
287
  }, null, 8, ["ext", "name", "description", "download", "secondary-label"])) : (i(), P(Ze, {
278
288
  key: 1,
279
289
  title: "暂时无法预览",
280
290
  description: "未能获取该文件的预览地址,可稍后重试,或返回列表用其他方式打开。",
281
291
  "secondary-label": "返回列表",
282
- onSecondary: F
292
+ onSecondary: E
283
293
  }))
284
294
  ]))
285
295
  ])
286
- ], 8, Pa)
287
- ], 34)) : T("", !0)
296
+ ], 8, $a)
297
+ ], 34)) : I("", !0)
288
298
  ]),
289
299
  _: 1
290
300
  })
291
301
  ]));
292
302
  }
293
- }), Da = /* @__PURE__ */ Ce($a, [["__scopeId", "data-v-97adc449"]]), Na = {
303
+ }), Na = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-d66b7d72"]]), Ua = {
294
304
  class: "art-skeleton",
295
305
  "aria-hidden": "true"
296
306
  }, Ha = {
297
307
  key: 0,
298
308
  class: "art-skeleton__group"
299
- }, Ua = { class: "art-skeleton__task" }, Oa = { class: "art-skeleton__name" }, za = /* @__PURE__ */ be({
309
+ }, Oa = { class: "art-skeleton__task" }, za = { class: "art-skeleton__name" }, Ga = /* @__PURE__ */ ke({
300
310
  name: "ChatArtifactsSkeleton",
301
311
  __name: "ChatArtifactsSkeleton",
302
312
  props: {
@@ -305,75 +315,72 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
305
315
  groupHead: { type: Boolean, default: !1 }
306
316
  },
307
317
  setup(r) {
308
- const B = ["42%", "54%", "34%", "48%"], n = ["58%", "44%", "66%", "50%"], C = (y) => B[y % B.length], k = (y) => n[y % n.length];
309
- return (y, u) => (i(), d("div", Na, [
310
- r.groupHead ? (i(), d("div", Ha, [...u[0] || (u[0] = [
318
+ const $ = ["42%", "54%", "34%", "48%"], n = ["58%", "44%", "66%", "50%"], C = (w) => $[w % $.length], g = (w) => n[w % n.length];
319
+ return (w, v) => (i(), f("div", Ua, [
320
+ r.groupHead ? (i(), f("div", Ha, [...v[0] || (v[0] = [
311
321
  s("span", { class: "mf-skeleton-row art-skeleton__chevron" }, null, -1),
312
322
  s("span", { class: "mf-skeleton-row art-skeleton__group-name" }, null, -1),
313
323
  s("span", { class: "mf-skeleton-row art-skeleton__group-count" }, null, -1)
314
- ])])) : T("", !0),
315
- (i(!0), d(de, null, fe(r.blocks, (p) => (i(), d("div", {
324
+ ])])) : I("", !0),
325
+ (i(!0), f(fe, null, ve(r.blocks, (p) => (i(), f("div", {
316
326
  key: p,
317
327
  class: "art-skeleton__block"
318
328
  }, [
319
- s("div", Ua, [
320
- u[1] || (u[1] = s("span", { class: "mf-skeleton-row art-skeleton__spark" }, null, -1)),
329
+ s("div", Oa, [
330
+ v[1] || (v[1] = s("span", { class: "mf-skeleton-row art-skeleton__spark" }, null, -1)),
321
331
  s("span", {
322
332
  class: "mf-skeleton-row art-skeleton__task-name",
323
- style: ce({ width: B[(p + 1) % B.length] })
333
+ style: ue({ width: $[(p + 1) % $.length] })
324
334
  }, null, 4)
325
335
  ]),
326
- (i(!0), d(de, null, fe(r.rows, (v) => (i(), d("div", {
327
- key: v,
336
+ (i(!0), f(fe, null, ve(r.rows, (m) => (i(), f("div", {
337
+ key: m,
328
338
  class: "art-skeleton__row"
329
339
  }, [
330
- u[3] || (u[3] = s("span", { class: "art-skeleton__lead" }, [
340
+ v[3] || (v[3] = s("span", { class: "art-skeleton__lead" }, [
331
341
  s("span", { class: "mf-skeleton-row art-skeleton__icon" })
332
342
  ], -1)),
333
- s("span", Oa, [
343
+ s("span", za, [
334
344
  s("span", {
335
345
  class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--name",
336
- style: ce({ width: C(v - 1) })
346
+ style: ue({ width: C(m - 1) })
337
347
  }, null, 4),
338
- u[2] || (u[2] = s("span", { class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--meta" }, null, -1))
348
+ v[2] || (v[2] = s("span", { class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--meta" }, null, -1))
339
349
  ]),
340
350
  s("span", {
341
351
  class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--kind",
342
- style: ce({ width: k(v) })
352
+ style: ue({ width: g(m) })
343
353
  }, null, 4),
344
354
  s("span", {
345
355
  class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--time",
346
- style: ce({ width: k(v + 1) })
356
+ style: ue({ width: g(m + 1) })
347
357
  }, null, 4),
348
- u[4] || (u[4] = s("span", { class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--size" }, null, -1)),
349
- u[5] || (u[5] = s("span", { class: "art-skeleton__cell--action" }, null, -1))
358
+ v[4] || (v[4] = s("span", { class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--size" }, null, -1)),
359
+ v[5] || (v[5] = s("span", { class: "art-skeleton__cell--action" }, null, -1))
350
360
  ]))), 128))
351
361
  ]))), 128))
352
362
  ]));
353
363
  }
354
- }), tt = /* @__PURE__ */ Ce(za, [["__scopeId", "data-v-6ca80140"]]), Ga = { class: "chat-my-files-artifacts__frame" }, Ka = { class: "chat-my-files-artifacts__toolbar" }, Va = ["src"], Za = {
364
+ }), tt = /* @__PURE__ */ be(Ga, [["__scopeId", "data-v-6ca80140"]]), Ka = { class: "chat-my-files-artifacts__frame" }, Va = { class: "chat-my-files-artifacts__toolbar" }, Za = ["src"], qa = {
355
365
  class: "chat-my-files-artifacts__filter",
356
366
  type: "button"
357
- }, qa = ["src"], Wa = { class: "chat-my-files-artifacts__search" }, ja = ["src"], Ya = {
367
+ }, Wa = ["src"], ja = { class: "chat-my-files-artifacts__search" }, Ya = ["src"], Qa = {
358
368
  key: 0,
359
369
  class: "chat-my-files-artifacts__progress",
360
370
  role: "status",
361
371
  "aria-label": "正在加载 AI 产物"
362
- }, Qa = { class: "chat-my-files-artifacts__table" }, Ja = {
372
+ }, Ja = { class: "chat-my-files-artifacts__table" }, Xa = {
363
373
  key: 0,
364
374
  class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--owner"
365
- }, Xa = {
375
+ }, es = {
366
376
  key: 0,
367
377
  class: "chat-my-files-artifacts__skeleton",
368
378
  "data-testid": "artifact-first-load",
369
379
  "aria-busy": "true"
370
- }, es = ["aria-expanded", "onClick"], ts = ["src"], as = { class: "chat-my-files-artifacts__group-name" }, ss = { class: "chat-my-files-artifacts__group-count" }, ls = ["inert"], ns = { class: "chat-my-files-artifacts__group-clip" }, os = { class: "chat-my-files-artifacts__task-head" }, is = ["src"], rs = ["title"], cs = ["disabled", "aria-busy", "onClick"], us = { class: "chat-my-files-artifacts__sentinel-sheet" }, ds = {
380
+ }, ts = ["aria-expanded", "onClick"], as = ["src"], ss = { class: "chat-my-files-artifacts__group-name" }, ls = { class: "chat-my-files-artifacts__group-count" }, ns = ["inert"], os = { class: "chat-my-files-artifacts__group-clip" }, is = { class: "chat-my-files-artifacts__task-head" }, rs = ["src"], cs = ["title"], us = ["disabled", "aria-busy", "onClick"], ds = { class: "chat-my-files-artifacts__sentinel-sheet" }, fs = {
371
381
  class: "chat-my-files-artifacts__sr-only",
372
382
  role: "status"
373
- }, fs = ["disabled", "aria-busy"], vs = {
374
- key: 1,
375
- class: "chat-my-files-artifacts__bar"
376
- }, _s = { class: "chat-my-files-artifacts__bar-count" }, ae = 6, hs = 3, at = 400, ms = /* @__PURE__ */ be({
383
+ }, vs = ["disabled", "aria-busy"], se = 6, _s = 3, at = 400, ms = /* @__PURE__ */ ke({
377
384
  name: "ChatMyFilesArtifacts",
378
385
  __name: "ChatMyFilesArtifacts",
379
386
  props: {
@@ -381,121 +388,120 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
381
388
  actionsDisabled: { type: Boolean }
382
389
  },
383
390
  emits: ["back", "add-to-task"],
384
- setup(r, { emit: B }) {
385
- const n = r, C = B, k = c(""), y = c("全部类型"), u = c("updatedAt"), p = c("desc"), v = c(/* @__PURE__ */ new Set()), A = c(/* @__PURE__ */ new Set()), Z = sa();
386
- function w(e, t = "info") {
387
- Z == null || Z(e, t);
388
- }
389
- const Te = la(), {
390
- source: le,
391
- open: q,
392
- hint: Q,
393
- busy: J,
394
- title: ne,
395
- request: ve,
396
- confirm: Ae,
397
- close: xe
391
+ setup(r, { emit: $ }) {
392
+ const n = r, C = $, g = c(""), w = c("全部类型"), v = c("updatedAt"), p = c("desc"), m = c(/* @__PURE__ */ new Set()), y = c(/* @__PURE__ */ new Set()), B = sa();
393
+ function b(e, t = "info") {
394
+ B == null || B(e, t);
395
+ }
396
+ const Z = la(), {
397
+ source: Ce,
398
+ open: ne,
399
+ busy: q,
400
+ title: ee,
401
+ request: W,
402
+ confirm: oe,
403
+ close: Te
398
404
  } = na({
399
405
  getCloud: () => n.cloud,
400
- flash: w,
401
- sources: () => Te.transferSources.value,
406
+ flash: b,
407
+ sources: () => Z.transferSources.value,
402
408
  /* 与「我的资料」页共用同一块任务面板(模块级单例队列)。 */
403
409
  board: oa()
404
- }), X = ia(), S = c([]), x = c(!1), W = c(""), L = c(!1), I = c(/* @__PURE__ */ new Set()), oe = c(1), $ = c(!1), E = c(!1), O = c({});
405
- let F = 0, ie = 0;
406
- const D = /* @__PURE__ */ new Map(), N = f(() => x.value && S.value.length === 0);
407
- function _e() {
408
- return n.cloud ? S.value : _a;
410
+ }), ie = ia(), S = c([]), F = c(!1), j = c(""), M = c(!1), H = c(/* @__PURE__ */ new Set()), re = c(1), L = c(!1), Y = c(!1), O = c({});
411
+ let T = 0, Q = 0;
412
+ const E = /* @__PURE__ */ new Map(), D = d(() => F.value && S.value.length === 0);
413
+ function te() {
414
+ return n.cloud ? S.value : ma;
409
415
  }
410
- function h(e, t) {
411
- const a = new Set(I.value);
412
- t ? a.add(e) : a.delete(e), I.value = a;
416
+ function _e(e, t) {
417
+ const a = new Set(H.value);
418
+ t ? a.add(e) : a.delete(e), H.value = a;
413
419
  }
414
- function j(e) {
420
+ function Ae(e) {
415
421
  const t = (e.productCount ?? 0) - e.files.length;
416
422
  return t > 0 ? `还有 ${t} 个` : "加载更多";
417
423
  }
418
- async function ee(e = "replace") {
424
+ async function u(e = "replace") {
419
425
  const t = n.cloud;
420
- if (!t || e === "append" && x.value) return;
421
- const a = ++F, l = e === "append" ? oe.value + 1 : 1;
422
- e === "replace" && G && (R.value = ae, me.clear()), x.value = !0, W.value = "", L.value = e === "append";
426
+ if (!t || e === "append" && F.value) return;
427
+ const a = ++T, l = e === "append" ? re.value + 1 : 1;
428
+ e === "replace" && G && (R.value = se, me.clear()), F.value = !0, j.value = "", M.value = e === "append";
423
429
  try {
424
430
  const o = await ha(t, {
425
431
  page: l,
426
432
  pageSize: Ye,
427
- search: k.value.trim()
433
+ search: g.value.trim()
428
434
  });
429
- if (a !== F) return;
430
- const _ = Be(S.value);
431
- S.value = e === "append" ? ma(S.value, o) : o;
432
- const g = Be(S.value) - _;
433
- oe.value = l, e === "replace" && (O.value = {}), E.value = !1;
434
- const K = Be(o) >= Ye;
435
- $.value = K && (e === "replace" || g > 0);
435
+ if (a !== T) return;
436
+ const _ = $e(S.value);
437
+ S.value = e === "append" ? pa(S.value, o) : o;
438
+ const k = $e(S.value) - _;
439
+ re.value = l, e === "replace" && (O.value = {}), Y.value = !1;
440
+ const K = $e(o) >= Ye;
441
+ L.value = K && (e === "replace" || k > 0);
436
442
  } catch (o) {
437
- if (a !== F) return;
443
+ if (a !== T) return;
438
444
  const _ = o instanceof Error ? o.message : "产物加载失败";
439
- S.value.length ? e === "append" && (E.value = !0) : W.value = _, w(_, "error");
445
+ S.value.length ? e === "append" && (Y.value = !0) : j.value = _, b(_, "error");
440
446
  } finally {
441
- a === F && (x.value = !1, L.value = !1, Se());
447
+ a === T && (F.value = !1, M.value = !1, Me());
442
448
  }
443
449
  }
444
- function dt() {
445
- ee("replace");
450
+ function J() {
451
+ u("replace");
446
452
  }
447
453
  async function ft(e) {
448
454
  const t = n.cloud;
449
- if (!t || x.value || I.value.has(e)) return;
450
- const a = (D.get(e) ?? 0) + 1;
451
- D.set(e, a);
452
- const l = F;
453
- h(e, !0);
455
+ if (!t || F.value || H.value.has(e)) return;
456
+ const a = (E.get(e) ?? 0) + 1;
457
+ E.set(e, a);
458
+ const l = T;
459
+ _e(e, !0);
454
460
  try {
455
461
  let o = O.value[e] ?? 1, _ = 0;
456
462
  for (; _ < 5; ) {
457
463
  _ += 1;
458
- const g = await pa(t, e, o, ya);
459
- if (D.get(e) !== a || F !== l) return;
460
- const K = wa(S.value, e, g);
464
+ const k = await ya(t, e, o, wa);
465
+ if (E.get(e) !== a || T !== l) return;
466
+ const K = ga(S.value, e, k);
461
467
  if (S.value = K.groups, o += 1, O.value = { ...O.value, [e]: o }, K.added > 0 || !K.hasMore) break;
462
468
  }
463
469
  } catch (o) {
464
- if (D.get(e) !== a) return;
465
- w(o instanceof Error ? o.message : "产物加载失败", "error");
470
+ if (E.get(e) !== a) return;
471
+ b(o instanceof Error ? o.message : "产物加载失败", "error");
466
472
  } finally {
467
- D.get(e) === a && h(e, !1);
473
+ E.get(e) === a && _e(e, !1);
468
474
  }
469
475
  }
470
476
  const vt = ra(qe), { Menu: _t } = Re({
471
477
  items: vt,
472
478
  placement: "bottom-start",
473
479
  width: 140,
474
- selectedId: y,
480
+ selectedId: w,
475
481
  panelClass: ca,
476
482
  onItemClick: ({ id: e }) => {
477
- ht(e) && (y.value = e);
483
+ mt(e) && (w.value = e);
478
484
  }
479
485
  });
480
- function ht(e) {
486
+ function mt(e) {
481
487
  return qe.includes(e);
482
488
  }
483
- function mt(e) {
484
- if (!u.value) return e;
489
+ function ht(e) {
490
+ if (!v.value) return e;
485
491
  const t = p.value === "asc" ? 1 : -1;
486
- return [...e].sort((a, l) => u.value === "name" ? a.name.localeCompare(l.name, "zh") * t : (a.updatedAt - l.updatedAt) * t);
492
+ return [...e].sort((a, l) => v.value === "name" ? a.name.localeCompare(l.name, "zh") * t : (a.updatedAt - l.updatedAt) * t);
487
493
  }
488
- const z = f(() => {
489
- const e = n.cloud ? "" : k.value.trim().toLowerCase();
490
- return _e().map((t) => {
494
+ const z = d(() => {
495
+ const e = n.cloud ? "" : g.value.trim().toLowerCase();
496
+ return te().map((t) => {
491
497
  const a = !!e && t.name.toLowerCase().includes(e), l = t.sessions.map((o) => {
492
- const _ = !!e && o.title.toLowerCase().includes(e), g = mt(
498
+ const _ = !!e && o.title.toLowerCase().includes(e), k = ht(
493
499
  o.files.filter((K) => {
494
- const Rt = y.value === "全部类型" || K.kind === y.value, $t = !e || K.name.toLowerCase().includes(e);
495
- return Rt && (a || _ || $t);
500
+ const Rt = w.value === "全部类型" || K.kind === w.value, Bt = !e || K.name.toLowerCase().includes(e);
501
+ return Rt && (a || _ || Bt);
496
502
  })
497
503
  );
498
- return { ...o, files: g };
504
+ return { ...o, files: k };
499
505
  }).filter((o) => o.files.length > 0 || o.hasMore === !0);
500
506
  return {
501
507
  ...t,
@@ -503,18 +509,18 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
503
509
  sessions: l
504
510
  };
505
511
  }).filter((t) => t.sessions.length > 0);
506
- }), pt = f(
512
+ }), pt = d(
507
513
  () => z.value.flatMap(
508
514
  (e) => e.sessions.flatMap((t) => t.files.map((a) => V(t.id, a.id)))
509
515
  )
510
- ), he = f(
511
- () => pt.value.filter((e) => A.value.has(e)).length
512
- ), me = /* @__PURE__ */ new Map(), G = typeof IntersectionObserver < "u", pe = c(null), ye = c(null), R = c(G ? ae : Number.POSITIVE_INFINITY);
513
- let H = null, Ie = !1, we = 0;
514
- const $e = f(
516
+ ), xe = d(
517
+ () => pt.value.filter((e) => y.value.has(e)).length
518
+ ), me = /* @__PURE__ */ new Map(), G = typeof IntersectionObserver < "u", he = c(null), pe = c(null), R = c(G ? se : Number.POSITIVE_INFINITY);
519
+ let N = null, Fe = !1, ye = 0;
520
+ const Be = d(
515
521
  () => z.value.reduce((e, t) => e + t.sessions.length, 0)
516
- ), Y = f(() => $e.value > R.value), De = f(() => {
517
- if (!Y.value) return z.value;
522
+ ), X = d(() => Be.value > R.value), De = d(() => {
523
+ if (!X.value) return z.value;
518
524
  let e = R.value;
519
525
  const t = [];
520
526
  for (const a of z.value) {
@@ -525,121 +531,121 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
525
531
  return t;
526
532
  });
527
533
  function Ne() {
528
- !n.cloud || !G || !$.value || x.value || N.value || $e.value - R.value > hs || ee("append");
534
+ !n.cloud || !G || !L.value || F.value || D.value || Be.value - R.value > _s || u("append");
529
535
  }
530
- let ke = 1;
536
+ let we = 1;
531
537
  function yt() {
532
- if (ke > 0)
533
- return ke -= 1, !0;
534
- const e = pe.value, t = ye.value;
538
+ if (we > 0)
539
+ return we -= 1, !0;
540
+ const e = he.value, t = pe.value;
535
541
  if (!e || !t) return !1;
536
542
  const a = t.getBoundingClientRect(), l = e.getBoundingClientRect();
537
543
  return a.top < l.bottom && a.bottom > l.top;
538
544
  }
539
- function He() {
545
+ function Ue() {
540
546
  if (G) {
541
- if (Y.value) {
542
- R.value += ae;
547
+ if (X.value) {
548
+ R.value += se;
543
549
  return;
544
550
  }
545
- $.value && !x.value && !N.value && yt() && ee("append");
551
+ L.value && !F.value && !D.value && yt() && u("append");
546
552
  }
547
553
  }
548
554
  function wt() {
549
- if (Y.value) {
550
- R.value += ae;
555
+ if (X.value) {
556
+ R.value += se;
551
557
  return;
552
558
  }
553
- ee("append");
554
- }
555
- const kt = f(() => !G || E.value), Fe = f(() => Y.value || $.value);
556
- let Me = 0;
557
- function Se() {
558
- !G || Ie || (Ie = !0, window.requestAnimationFrame(() => {
559
- if (Ie = !1, performance.now() < Me) return;
560
- const e = ye.value, t = pe.value;
559
+ u("append");
560
+ }
561
+ const gt = d(() => !G || Y.value), Ie = d(() => X.value || L.value);
562
+ let Se = 0;
563
+ function Me() {
564
+ !G || Fe || (Fe = !0, window.requestAnimationFrame(() => {
565
+ if (Fe = !1, performance.now() < Se) return;
566
+ const e = pe.value, t = he.value;
561
567
  if (!e || !t) return;
562
568
  const a = e.getBoundingClientRect(), l = t.getBoundingClientRect();
563
- a.top < l.bottom + 240 && a.bottom > l.top - 240 && He();
569
+ a.top < l.bottom + 240 && a.bottom > l.top - 240 && Ue();
564
570
  }));
565
571
  }
566
- function Ue() {
567
- window.clearTimeout(we), we = window.setTimeout(() => {
568
- we = 0, Fe.value && (ke = 1, Se());
572
+ function He() {
573
+ window.clearTimeout(ye), ye = window.setTimeout(() => {
574
+ ye = 0, Ie.value && (we = 1, Me());
569
575
  }, at + 40);
570
576
  }
571
577
  function Oe() {
572
578
  if (!G) return;
573
- H == null || H.disconnect();
574
- const e = ye.value;
575
- e && (H = new IntersectionObserver(
579
+ N == null || N.disconnect();
580
+ const e = pe.value;
581
+ e && (N = new IntersectionObserver(
576
582
  (t) => {
577
583
  if (t.some((a) => a.isIntersecting)) {
578
- if (performance.now() < Me) {
579
- Ue();
584
+ if (performance.now() < Se) {
585
+ He();
580
586
  return;
581
587
  }
582
- ke = 1, He(), Ne();
588
+ we = 1, Ue(), Ne();
583
589
  }
584
590
  },
585
- { root: pe.value, rootMargin: "240px 0px" }
586
- ), H.observe(e));
591
+ { root: he.value, rootMargin: "240px 0px" }
592
+ ), N.observe(e));
587
593
  }
588
- ue([k, y, u, p], () => {
589
- G && (R.value = ae);
590
- }), ue(
591
- [Y, $, R],
594
+ de([g, w, v, p], () => {
595
+ G && (R.value = se);
596
+ }), de(
597
+ [X, L, R],
592
598
  () => {
593
- Oe(), Se(), Ne();
599
+ Oe(), Me(), Ne();
594
600
  },
595
601
  { flush: "post" }
596
602
  );
597
- const re = f(() => !!k.value.trim() || y.value !== "全部类型"), gt = f(() => re.value ? "没有匹配的文件" : "暂无 AI 产物"), bt = f(
598
- () => re.value ? "换个关键词或切换到「全部类型」试试,也可以清空筛选查看全部产物" : "对话里生成的文件会收在这里,可以再加回任务继续使用"
599
- ), Ct = f(() => re.value ? "清空筛选" : "返回我的文件"), Tt = f(
600
- () => !W.value && (N.value || z.value.length > 0)
601
- ), Le = f(
603
+ const ce = d(() => !!g.value.trim() || w.value !== "全部类型"), kt = d(() => ce.value ? "没有匹配的文件" : "暂无 AI 产物"), bt = d(
604
+ () => ce.value ? "换个关键词或切换到「全部类型」试试,也可以清空筛选查看全部产物" : "对话里生成的文件会收在这里,可以再加回任务继续使用"
605
+ ), Ct = d(() => ce.value ? "清空筛选" : "返回我的文件"), Tt = d(
606
+ () => !j.value && (D.value || z.value.length > 0)
607
+ ), Le = d(
602
608
  () => z.value.some(
603
609
  (e) => e.sessions.some((t) => t.files.some((a) => !!a.owner))
604
610
  )
605
611
  );
606
612
  function At() {
607
- if (!re.value) {
613
+ if (!ce.value) {
608
614
  C("back");
609
615
  return;
610
616
  }
611
- k.value = "", y.value = "全部类型";
617
+ g.value = "", w.value = "全部类型";
612
618
  }
613
619
  function ze(e) {
614
- if (u.value !== e) {
615
- u.value = e, p.value = e === "name" ? "asc" : "desc";
620
+ if (v.value !== e) {
621
+ v.value = e, p.value = e === "name" ? "asc" : "desc";
616
622
  return;
617
623
  }
618
624
  p.value = p.value === "asc" ? "desc" : "asc";
619
625
  }
620
626
  function Ge(e) {
621
- return u.value !== e ? "idle" : p.value === "asc" ? "asc" : "desc";
627
+ return v.value !== e ? "idle" : p.value === "asc" ? "asc" : "desc";
622
628
  }
623
629
  function xt(e) {
624
630
  var o;
625
- Me = performance.now() + at;
626
- const t = new Set(v.value), a = !t.has(e);
631
+ Se = performance.now() + at;
632
+ const t = new Set(m.value), a = !t.has(e);
627
633
  a ? t.add(e) : t.delete(e);
628
634
  const l = a ? ((o = De.value.find((_) => _.id === e)) == null ? void 0 : o.sessions.length) ?? 0 : me.get(e) ?? 0;
629
- a ? me.set(e, l) : me.delete(e), R.value = Math.max(ae, R.value + (a ? l : -l)), v.value = t, Ue();
635
+ a ? me.set(e, l) : me.delete(e), R.value = Math.max(se, R.value + (a ? l : -l)), m.value = t, He();
630
636
  }
631
- function It(e) {
632
- const t = new Set(A.value);
633
- t.has(e) ? t.delete(e) : t.add(e), A.value = t;
637
+ function Ft(e) {
638
+ const t = new Set(y.value);
639
+ t.has(e) ? t.delete(e) : t.add(e), y.value = t;
634
640
  }
635
- const te = c(null), Ft = c("");
636
- function Mt(e, t) {
637
- Ft.value = e, te.value = t;
641
+ const ae = c(null), It = c("");
642
+ function St(e, t) {
643
+ It.value = e, ae.value = t;
638
644
  }
639
- function St(e) {
645
+ function Mt(e) {
640
646
  const t = Qe(e);
641
647
  if (!t) return;
642
- const a = te.value;
648
+ const a = ae.value;
643
649
  if (t === "add-task") {
644
650
  if (n.actionsDisabled === !0) return;
645
651
  a && Pe([ge(a)]);
@@ -648,7 +654,7 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
648
654
  const l = et(t);
649
655
  if (l) {
650
656
  if (n.actionsDisabled === !0 || !a) return;
651
- ve(l, [Je(a)]);
657
+ W(l, [Je(a)]);
652
658
  return;
653
659
  }
654
660
  const o = Xe(e, {
@@ -657,17 +663,17 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
657
663
  });
658
664
  if (o) {
659
665
  if (o.kind === "unavailable") {
660
- w(o.notice, "warning");
666
+ b(o.notice, "warning");
661
667
  return;
662
668
  }
663
- o.kind === "notice" && w(o.notice, "warning");
669
+ o.kind === "notice" && b(o.notice, "warning");
664
670
  }
665
671
  }
666
672
  function Ee() {
667
- A.value = /* @__PURE__ */ new Set();
673
+ y.value = /* @__PURE__ */ new Set();
668
674
  }
669
675
  function Lt(e) {
670
- for (const t of _e())
676
+ for (const t of te())
671
677
  for (const a of t.sessions) {
672
678
  const l = a.files.findIndex((o) => V(a.id, o.id) === e);
673
679
  if (l >= 0) return { groupId: t.id, session: a, index: l };
@@ -688,65 +694,65 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
688
694
  const _ = et(l);
689
695
  if (_) {
690
696
  if (n.actionsDisabled === !0) return;
691
- ve(_, [Je(o, a.session)]);
697
+ W(_, [Je(o, a.session)]);
692
698
  return;
693
699
  }
694
- const g = Xe(t, {
700
+ const k = Xe(t, {
695
701
  unavailable: !!n.cloud,
696
702
  disabled: n.actionsDisabled === !0
697
703
  });
698
- if (g) {
699
- if (g.kind === "unavailable") {
700
- w(g.notice, "warning");
704
+ if (k) {
705
+ if (k.kind === "unavailable") {
706
+ b(k.notice, "warning");
701
707
  return;
702
708
  }
703
- g.kind === "notice" && w(g.notice, "warning");
709
+ k.kind === "notice" && b(k.notice, "warning");
704
710
  }
705
711
  }
706
712
  function Pe(e) {
707
713
  if (e.length !== 0) {
708
- if (X) {
709
- X(e);
714
+ if (ie) {
715
+ ie(e);
710
716
  return;
711
717
  }
712
- C("add-to-task", e), w(ka["add-task"], "success");
718
+ C("add-to-task", e), b(ka["add-task"], "success");
713
719
  }
714
720
  }
715
721
  function Pt() {
716
722
  return z.value.flatMap(
717
723
  (e) => e.sessions.flatMap(
718
- (t) => t.files.filter((a) => A.value.has(V(t.id, a.id))).map((a) => ge(a))
724
+ (t) => t.files.filter((a) => y.value.has(V(t.id, a.id))).map((a) => ge(a))
719
725
  )
720
726
  );
721
727
  }
722
- function Bt() {
728
+ function $t() {
723
729
  if (n.actionsDisabled === !0) return;
724
730
  const e = Pt();
725
731
  if (e.length !== 0) {
726
- if (!X) {
732
+ if (!ie) {
727
733
  if (n.cloud) {
728
- w(ga, "warning");
734
+ b(ba, "warning");
729
735
  return;
730
736
  }
731
- w(`已添加 ${he.value} 个文件到任务`, "success"), Ee();
737
+ b(`已添加 ${xe.value} 个文件到任务`, "success"), Ee();
732
738
  return;
733
739
  }
734
740
  Pe(e), Ee();
735
741
  }
736
742
  }
737
- return ue(k, () => {
738
- n.cloud && (window.clearTimeout(ie), ie = window.setTimeout(() => {
739
- ee("replace");
743
+ return de(g, () => {
744
+ n.cloud && (window.clearTimeout(Q), Q = window.setTimeout(() => {
745
+ u("replace");
740
746
  }, 300));
741
747
  }), st(() => {
742
- Oe(), n.cloud && ee();
748
+ Oe(), n.cloud && u();
743
749
  }), Ot(() => {
744
- H == null || H.disconnect(), H = null, window.clearTimeout(ie), window.clearTimeout(we);
745
- }), (e, t) => (i(), d("div", {
746
- class: U(["chat-my-files-artifacts", { "has-selection": he.value > 0 }])
750
+ N == null || N.disconnect(), N = null, window.clearTimeout(Q), window.clearTimeout(ye);
751
+ }), (e, t) => (i(), f("div", {
752
+ class: U(["chat-my-files-artifacts", { "has-selection": xe.value > 0 }])
747
753
  }, [
748
- s("div", Ga, [
749
- s("header", Ka, [
754
+ s("div", Ka, [
755
+ s("header", Va, [
750
756
  s("button", {
751
757
  class: "chat-my-files-artifacts__back",
752
758
  type: "button",
@@ -756,52 +762,52 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
756
762
  loading: "eager",
757
763
  decoding: "async",
758
764
  class: "chat-my-files-artifacts__back-glyph",
759
- src: m(ba),
765
+ src: h(Ca),
760
766
  alt: ""
761
- }, null, 8, Va),
767
+ }, null, 8, Za),
762
768
  t[5] || (t[5] = s("span", null, "返回我的文件", -1))
763
769
  ]),
764
- M(m(_t), null, {
765
- "item-icon": se(({ item: a }) => [
766
- M(ua, {
770
+ x(h(_t), null, {
771
+ "item-icon": le(({ item: a }) => [
772
+ x(ua, {
767
773
  kind: a.id
768
774
  }, null, 8, ["kind"])
769
775
  ]),
770
- default: se(() => [
771
- s("button", Za, [
772
- s("span", null, b(y.value), 1),
776
+ default: le(() => [
777
+ s("button", qa, [
778
+ s("span", null, A(w.value), 1),
773
779
  s("img", {
774
780
  loading: "eager",
775
781
  decoding: "async",
776
782
  class: "chat-my-files-artifacts__filter-glyph",
777
- src: m(We),
783
+ src: h(We),
778
784
  alt: ""
779
- }, null, 8, qa)
785
+ }, null, 8, Wa)
780
786
  ])
781
787
  ]),
782
788
  _: 1
783
789
  }),
784
- s("label", Wa, [
790
+ s("label", ja, [
785
791
  s("img", {
786
792
  loading: "eager",
787
793
  decoding: "async",
788
794
  class: "chat-my-files-artifacts__search-glyph",
789
- src: m(da),
795
+ src: h(da),
790
796
  alt: ""
791
- }, null, 8, ja),
797
+ }, null, 8, Ya),
792
798
  zt(s("input", {
793
- "onUpdate:modelValue": t[1] || (t[1] = (a) => k.value = a),
799
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => g.value = a),
794
800
  type: "search",
795
801
  placeholder: "搜索文件、任务或工作空间",
796
802
  title: "搜索文件、任务或工作空间"
797
803
  }, null, 512), [
798
- [Gt, k.value]
804
+ [Gt, g.value]
799
805
  ])
800
806
  ])
801
807
  ]),
802
- x.value && !L.value && !N.value ? (i(), d("div", Ya)) : T("", !0),
803
- s("div", Qa, [
804
- Tt.value ? (i(), d("div", {
808
+ F.value && !M.value && !D.value ? (i(), f("div", Qa)) : I("", !0),
809
+ s("div", Ja, [
810
+ Tt.value ? (i(), f("div", {
805
811
  key: 0,
806
812
  class: U(["chat-my-files-artifacts__head", { "has-owner": Le.value }])
807
813
  }, [
@@ -811,7 +817,7 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
811
817
  onClick: t[2] || (t[2] = (a) => ze("name"))
812
818
  }, [
813
819
  t[7] || (t[7] = Ve(" 名称 ", -1)),
814
- (i(), d("svg", {
820
+ (i(), f("svg", {
815
821
  class: U(["chat-my-files-artifacts__sort-glyph", `is-${Ge("name")}`]),
816
822
  viewBox: "0 0 20 20",
817
823
  "aria-hidden": "true"
@@ -827,14 +833,14 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
827
833
  ])], 2))
828
834
  ]),
829
835
  t[10] || (t[10] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--kind" }, "类型", -1)),
830
- Le.value ? (i(), d("span", Ja, "更新人")) : T("", !0),
836
+ Le.value ? (i(), f("span", Xa, "更新人")) : I("", !0),
831
837
  s("button", {
832
838
  class: "chat-my-files-artifacts__sort chat-my-files-artifacts__sort--time",
833
839
  type: "button",
834
840
  onClick: t[3] || (t[3] = (a) => ze("updatedAt"))
835
841
  }, [
836
842
  t[9] || (t[9] = Ve(" 更新时间 ", -1)),
837
- (i(), d("svg", {
843
+ (i(), f("svg", {
838
844
  class: U(["chat-my-files-artifacts__sort-glyph", `is-${Ge("updatedAt")}`]),
839
845
  viewBox: "0 0 20 20",
840
846
  "aria-hidden": "true"
@@ -851,14 +857,14 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
851
857
  ]),
852
858
  t[11] || (t[11] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--size" }, "大小", -1)),
853
859
  t[12] || (t[12] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--action" }, "操作", -1))
854
- ], 2)) : T("", !0),
860
+ ], 2)) : I("", !0),
855
861
  s("div", {
856
862
  ref_key: "bodyRef",
857
- ref: pe,
863
+ ref: he,
858
864
  class: "chat-my-files-artifacts__body"
859
865
  }, [
860
- N.value ? (i(), d("div", Xa, [
861
- M(tt, {
866
+ D.value ? (i(), f("div", es, [
867
+ x(tt, {
862
868
  "group-head": "",
863
869
  blocks: 2,
864
870
  rows: 3
@@ -867,164 +873,141 @@ const ba = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
867
873
  class: "chat-my-files-artifacts__sr-only",
868
874
  role: "status"
869
875
  }, "正在加载 AI 产物", -1))
870
- ])) : W.value ? (i(), P(je, {
876
+ ])) : j.value ? (i(), P(je, {
871
877
  key: 1,
872
878
  class: "chat-my-files-artifacts__state",
873
879
  tone: "error",
874
880
  variant: "error",
875
881
  title: "产物加载失败",
876
- description: W.value,
882
+ description: j.value,
877
883
  "action-text": "重新加载",
878
- onAction: dt
879
- }, null, 8, ["description"])) : z.value.length ? T("", !0) : (i(), P(je, {
884
+ onAction: J
885
+ }, null, 8, ["description"])) : z.value.length ? I("", !0) : (i(), P(je, {
880
886
  key: 2,
881
887
  class: "chat-my-files-artifacts__state",
882
- variant: re.value ? "search" : "files",
883
- title: gt.value,
888
+ variant: ce.value ? "search" : "files",
889
+ title: kt.value,
884
890
  description: bt.value,
885
891
  "action-text": Ct.value,
886
892
  onAction: At
887
893
  }, null, 8, ["variant", "title", "description", "action-text"])),
888
- (i(!0), d(de, null, fe(De.value, (a) => (i(), d("section", {
894
+ (i(!0), f(fe, null, ve(De.value, (a) => (i(), f("section", {
889
895
  key: a.id,
890
896
  class: "chat-my-files-artifacts__group"
891
897
  }, [
892
898
  s("button", {
893
899
  class: "chat-my-files-artifacts__group-head",
894
900
  type: "button",
895
- "aria-expanded": !v.value.has(a.id),
901
+ "aria-expanded": !m.value.has(a.id),
896
902
  onClick: (l) => xt(a.id)
897
903
  }, [
898
904
  s("img", {
899
905
  loading: "lazy",
900
906
  decoding: "async",
901
- class: U(["chat-my-files-artifacts__chevron", { "is-open": !v.value.has(a.id) }]),
902
- src: m(We),
907
+ class: U(["chat-my-files-artifacts__chevron", { "is-open": !m.value.has(a.id) }]),
908
+ src: h(We),
903
909
  alt: ""
904
- }, null, 10, ts),
905
- s("span", as, b(a.name), 1),
906
- s("em", ss, b(a.taskCount) + "个任务", 1)
907
- ], 8, es),
910
+ }, null, 10, as),
911
+ s("span", ss, A(a.name), 1),
912
+ s("em", ls, A(a.taskCount) + "个任务", 1)
913
+ ], 8, ts),
908
914
  s("div", {
909
- class: U(["chat-my-files-artifacts__group-body", { "is-collapsed": v.value.has(a.id) }]),
910
- inert: v.value.has(a.id) || void 0
915
+ class: U(["chat-my-files-artifacts__group-body", { "is-collapsed": m.value.has(a.id) }]),
916
+ inert: m.value.has(a.id) || void 0
911
917
  }, [
912
- s("div", ns, [
913
- (i(!0), d(de, null, fe(a.sessions, (l, o) => (i(), d("div", {
918
+ s("div", os, [
919
+ (i(!0), f(fe, null, ve(a.sessions, (l, o) => (i(), f("div", {
914
920
  key: l.id,
915
921
  class: "chat-my-files-artifacts__task",
916
- style: ce({ "--mf-stagger": o })
922
+ style: ue({ "--mf-stagger": o })
917
923
  }, [
918
- s("div", os, [
924
+ s("div", is, [
919
925
  s("img", {
920
926
  loading: "lazy",
921
927
  decoding: "async",
922
928
  class: "chat-my-files-artifacts__spark",
923
- src: m(fa),
929
+ src: h(fa),
924
930
  alt: ""
925
- }, null, 8, is),
931
+ }, null, 8, rs),
926
932
  s("span", {
927
933
  title: l.title
928
- }, b(l.title), 9, rs)
934
+ }, A(l.title), 9, cs)
929
935
  ]),
930
- (i(!0), d(de, null, fe(l.files, (_) => (i(), P(Ea, {
931
- key: m(V)(l.id, _.id),
936
+ (i(!0), f(fe, null, ve(l.files, (_) => (i(), P(Pa, {
937
+ key: h(V)(l.id, _.id),
932
938
  file: _,
933
- selected: A.value.has(m(V)(l.id, _.id)),
939
+ selected: y.value.has(h(V)(l.id, _.id)),
934
940
  "show-owner": Le.value,
935
941
  "actions-disabled": r.actionsDisabled,
936
- onToggle: (g) => It(m(V)(l.id, _.id)),
937
- onOpen: (g) => Mt(m(V)(l.id, _.id), _),
938
- onAction: (g) => Et(m(V)(l.id, _.id), g)
942
+ onToggle: (k) => Ft(h(V)(l.id, _.id)),
943
+ onOpen: (k) => St(h(V)(l.id, _.id), _),
944
+ onAction: (k) => Et(h(V)(l.id, _.id), k)
939
945
  }, null, 8, ["file", "selected", "show-owner", "actions-disabled", "onToggle", "onOpen", "onAction"]))), 128)),
940
- r.cloud && l.hasMore ? (i(), d("button", {
946
+ r.cloud && l.hasMore ? (i(), f("button", {
941
947
  key: 0,
942
948
  class: "chat-my-files-artifacts__more",
943
949
  type: "button",
944
950
  "data-testid": "artifact-file-more",
945
- disabled: I.value.has(l.id),
946
- "aria-busy": I.value.has(l.id),
951
+ disabled: H.value.has(l.id),
952
+ "aria-busy": H.value.has(l.id),
947
953
  onClick: (_) => ft(l.id)
948
- }, b(I.value.has(l.id) ? "加载中" : j(l)), 9, cs)) : T("", !0)
954
+ }, A(H.value.has(l.id) ? "加载中" : Ae(l)), 9, us)) : I("", !0)
949
955
  ], 4))), 128))
950
956
  ])
951
- ], 10, ls)
957
+ ], 10, ns)
952
958
  ]))), 128)),
953
- r.cloud && Fe.value && !N.value ? (i(), d("div", {
959
+ r.cloud && Ie.value && !D.value ? (i(), f("div", {
954
960
  key: 3,
955
961
  ref_key: "sentinelRef",
956
- ref: ye,
957
- class: U(["chat-my-files-artifacts__sentinel", { "is-loading": L.value }])
962
+ ref: pe,
963
+ class: U(["chat-my-files-artifacts__sentinel", { "is-loading": M.value }])
958
964
  }, [
959
- s("div", us, [
960
- L.value ? (i(), P(tt, {
965
+ s("div", ds, [
966
+ M.value ? (i(), P(tt, {
961
967
  key: 0,
962
968
  blocks: 1,
963
969
  rows: 1
964
- })) : T("", !0)
970
+ })) : I("", !0)
965
971
  ])
966
- ], 2)) : T("", !0),
967
- s("p", ds, b(L.value ? "正在加载更多 AI 产物" : ""), 1),
968
- r.cloud && Fe.value && !N.value && kt.value ? (i(), d("button", {
972
+ ], 2)) : I("", !0),
973
+ s("p", fs, A(M.value ? "正在加载更多 AI 产物" : ""), 1),
974
+ r.cloud && Ie.value && !D.value && gt.value ? (i(), f("button", {
969
975
  key: 4,
970
976
  class: "chat-my-files-artifacts__sessions-more",
971
977
  type: "button",
972
978
  "data-testid": "artifact-session-more",
973
- disabled: x.value && !Y.value,
974
- "aria-busy": L.value,
979
+ disabled: F.value && !X.value,
980
+ "aria-busy": M.value,
975
981
  onClick: wt
976
- }, b(L.value ? "加载中" : E.value ? "重新加载" : Y.value ? "显示更多任务" : "加载更多会话"), 9, fs)) : T("", !0)
982
+ }, A(M.value ? "加载中" : Y.value ? "重新加载" : X.value ? "显示更多任务" : "加载更多会话"), 9, vs)) : I("", !0)
977
983
  ], 512)
978
984
  ]),
979
- he.value ? (i(), d("footer", vs, [
980
- s("span", _s, "已选 " + b(he.value) + " 个文件", 1),
981
- s("button", {
982
- class: "chat-my-files-artifacts__bar-clear",
983
- type: "button",
984
- onClick: Ee
985
- }, " 取消选择 "),
986
- s("button", {
987
- class: "chat-my-files-artifacts__bar-action",
988
- type: "button",
989
- onClick: Bt
990
- }, [...t[14] || (t[14] = [
991
- s("svg", {
992
- viewBox: "0 0 24 24",
993
- "aria-hidden": "true"
994
- }, [
995
- s("path", {
996
- d: "M12 4v16M4 12h16",
997
- fill: "none",
998
- stroke: "currentColor",
999
- "stroke-width": "1.8",
1000
- "stroke-linecap": "round"
1001
- })
1002
- ], -1),
1003
- s("span", null, "添加到任务", -1)
1004
- ])])
1005
- ])) : T("", !0),
1006
- te.value ? (i(), P(Da, {
1007
- key: te.value.id,
1008
- file: te.value,
985
+ x(va, {
986
+ count: xe.value,
987
+ onClear: Ee,
988
+ onAddTask: $t
989
+ }, null, 8, ["count"]),
990
+ ae.value ? (i(), P(Na, {
991
+ key: ae.value.id,
992
+ file: ae.value,
1009
993
  cloud: r.cloud,
1010
994
  "actions-disabled": r.actionsDisabled,
1011
- onClose: t[4] || (t[4] = (a) => te.value = null),
1012
- onAction: St
1013
- }, null, 8, ["file", "cloud", "actions-disabled"])) : T("", !0),
1014
- M(va, {
1015
- source: m(le),
1016
- open: m(q),
995
+ onClose: t[4] || (t[4] = (a) => ae.value = null),
996
+ onAction: Mt
997
+ }, null, 8, ["file", "cloud", "actions-disabled"])) : I("", !0),
998
+ x(_a, {
999
+ source: h(Ce),
1000
+ open: h(ne),
1017
1001
  mode: "target",
1018
- title: m(ne),
1019
- hint: m(Q),
1020
- busy: m(J),
1021
- "onUpdate:open": m(xe),
1022
- onConfirm: m(Ae)
1023
- }, null, 8, ["source", "open", "title", "hint", "busy", "onUpdate:open", "onConfirm"])
1002
+ title: h(ee),
1003
+ busy: h(q),
1004
+ "onUpdate:open": h(Te),
1005
+ onConfirm: h(oe)
1006
+ }, null, 8, ["source", "open", "title", "busy", "onUpdate:open", "onConfirm"])
1024
1007
  ])
1025
1008
  ], 2));
1026
1009
  }
1027
- }), ks = /* @__PURE__ */ Ce(ms, [["__scopeId", "data-v-8dc1c11f"]]);
1010
+ }), ws = /* @__PURE__ */ be(ms, [["__scopeId", "data-v-13517c8c"]]);
1028
1011
  export {
1029
- ks as default
1012
+ ws as default
1030
1013
  };