@deep-eye/core 1.3.84 → 1.3.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/dist/{ChartRenderer-BFYHRt_Q.js → ChartRenderer-4jMDeAxm.js} +1 -1
- package/dist/{ChartRenderer-NUULTbe7.cjs → ChartRenderer-Bq-WRQmw.cjs} +1 -1
- package/dist/{ChatMyFilesArtifacts-Qkim1200.js → ChatMyFilesArtifacts-D7unczTL.js} +427 -444
- package/dist/ChatMyFilesArtifacts-dk7QXDl0.cjs +1 -0
- package/dist/components/chat/ChatApp.vue.d.ts +27 -14
- package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
- package/dist/components/chat/addToTask.d.ts +1 -1
- package/dist/components/chat/addToTask.d.ts.map +1 -1
- package/dist/components/chat/attachmentController.d.ts.map +1 -1
- package/dist/components/chat/attachments.d.ts +4 -1
- package/dist/components/chat/attachments.d.ts.map +1 -1
- package/dist/components/chat/chatErrors.d.ts.map +1 -1
- package/dist/components/chat/chatFilePicker.d.ts +91 -1
- package/dist/components/chat/chatFilePicker.d.ts.map +1 -1
- package/dist/components/chat/chatQuota.d.ts +29 -14
- package/dist/components/chat/chatQuota.d.ts.map +1 -1
- package/dist/components/chat/chatSessionSidebarAssets.d.ts +4 -2
- package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -1
- package/dist/components/chat/cloudConfig.d.ts +6 -0
- package/dist/components/chat/cloudConfig.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFilePickerDialog.vue.d.ts +5 -5
- package/dist/components/chat/components/ChatFilePickerDialog.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatMentionFileMenu.vue.d.ts +24 -0
- package/dist/components/chat/components/ChatMentionFileMenu.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatPreviewDrawer.vue.d.ts +31 -0
- package/dist/components/chat/components/ChatPreviewDrawer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatPreviewHeader.vue.d.ts +1 -1
- package/dist/components/chat/components/ChatPreviewHeader.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts +20 -1
- package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts +14 -3
- package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts +3 -3
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts +9 -2
- package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ConversationIndex.vue.d.ts.map +1 -1
- package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -1
- package/dist/components/chat/components/IntermediateFileCards.vue.d.ts.map +1 -1
- package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
- package/dist/components/chat/components/UserMessageEditor.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatArtifactFileRow.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatArtifactPreview.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatFileCheckbox.vue.d.ts +2 -0
- package/dist/components/chat/components/files/ChatFileCheckbox.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFiles.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesArtifacts.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts +6 -0
- package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesEmptyGuide.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesFileTable.vue.d.ts +66 -3
- package/dist/components/chat/components/files/ChatMyFilesFileTable.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesFolder.vue.d.ts +61 -5
- package/dist/components/chat/components/files/ChatMyFilesFolder.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesGuideIcon.vue.d.ts +7 -0
- package/dist/components/chat/components/files/ChatMyFilesGuideIcon.vue.d.ts.map +1 -0
- package/dist/components/chat/components/files/ChatMyFilesQuickAdd.vue.d.ts +17 -3
- package/dist/components/chat/components/files/ChatMyFilesQuickAdd.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesRecent.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesSearchDialog.vue.d.ts +18 -2
- package/dist/components/chat/components/files/ChatMyFilesSearchDialog.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesTree.vue.d.ts +1 -1
- package/dist/components/chat/components/files/ChatMyFilesTree.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesUploadDialog.vue.d.ts +2 -2
- package/dist/components/chat/components/files/ChatMyFilesUploadPanel.vue.d.ts +4 -5
- package/dist/components/chat/components/files/ChatMyFilesUploadPanel.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatSelectionBar.vue.d.ts +36 -0
- package/dist/components/chat/components/files/ChatSelectionBar.vue.d.ts.map +1 -0
- package/dist/components/chat/components/files/ChatUploadPanel.vue.d.ts +34 -0
- package/dist/components/chat/components/files/ChatUploadPanel.vue.d.ts.map +1 -0
- package/dist/components/chat/components/files/chatArtifactFileActions.d.ts +26 -11
- package/dist/components/chat/components/files/chatArtifactFileActions.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatFileTransfer.d.ts +55 -12
- package/dist/components/chat/components/files/chatFileTransfer.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts +37 -3
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatMyFilesApi.d.ts +132 -2
- package/dist/components/chat/components/files/chatMyFilesApi.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatMyFilesModel.d.ts +24 -3
- package/dist/components/chat/components/files/chatMyFilesModel.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatUploadPanel.d.ts +42 -0
- package/dist/components/chat/components/files/chatUploadPanel.d.ts.map +1 -0
- package/dist/components/chat/components/files/guideIcon.d.ts +10 -0
- package/dist/components/chat/components/files/guideIcon.d.ts.map +1 -0
- package/dist/components/chat/components/files/index.d.ts +19 -2
- package/dist/components/chat/components/files/index.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesFilePicker.d.ts +16 -3
- package/dist/components/chat/components/files/myFilesFilePicker.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesRows.d.ts +15 -0
- package/dist/components/chat/components/files/myFilesRows.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesTransferQueue.d.ts +5 -0
- package/dist/components/chat/components/files/myFilesTransferQueue.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesUploadQueue.d.ts +2 -0
- package/dist/components/chat/components/files/myFilesUploadQueue.d.ts.map +1 -1
- package/dist/components/chat/components/files/useFileTransfer.d.ts +15 -4
- package/dist/components/chat/components/files/useFileTransfer.d.ts.map +1 -1
- package/dist/components/chat/components/index.d.ts +4 -0
- package/dist/components/chat/components/index.d.ts.map +1 -1
- package/dist/components/chat/components/mentionFileMenu.d.ts +130 -0
- package/dist/components/chat/components/mentionFileMenu.d.ts.map +1 -0
- package/dist/components/chat/composables/chatQuotaApi.d.ts +28 -0
- package/dist/components/chat/composables/chatQuotaApi.d.ts.map +1 -0
- package/dist/components/chat/composables/useChatColorMode.d.ts +11 -0
- package/dist/components/chat/composables/useChatColorMode.d.ts.map +1 -0
- package/dist/components/chat/composables/useChatQuota.d.ts +23 -0
- package/dist/components/chat/composables/useChatQuota.d.ts.map +1 -0
- package/dist/components/chat/composer/ComposerFormattedText.vue.d.ts.map +1 -1
- package/dist/components/chat/composer/ComposerInlineParts.vue.d.ts.map +1 -1
- package/dist/components/chat/composer/composerExtensions.d.ts +3 -0
- package/dist/components/chat/composer/composerExtensions.d.ts.map +1 -1
- package/dist/components/chat/composer/composerText.d.ts +6 -1
- package/dist/components/chat/composer/composerText.d.ts.map +1 -1
- package/dist/components/chat/fileChipView.d.ts +21 -0
- package/dist/components/chat/fileChipView.d.ts.map +1 -0
- package/dist/components/chat/fileToken.d.ts +42 -0
- package/dist/components/chat/fileToken.d.ts.map +1 -0
- package/dist/components/chat/hydrateHistory.d.ts.map +1 -1
- package/dist/components/chat/icons/ChatTipMenuAssetIcon.vue.d.ts +9 -0
- package/dist/components/chat/icons/ChatTipMenuAssetIcon.vue.d.ts.map +1 -1
- package/dist/components/chat/icons/ChatTipMenuLocalFileIcon.vue.d.ts.map +1 -1
- package/dist/components/chat/icons/ChatTipMenuMyFilesIcon.vue.d.ts.map +1 -1
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts.map +1 -1
- package/dist/components/chat/mentionEditor.d.ts +3 -1
- package/dist/components/chat/mentionEditor.d.ts.map +1 -1
- package/dist/components/chat/responseStream.d.ts +3 -1
- package/dist/components/chat/responseStream.d.ts.map +1 -1
- package/dist/components/chat/types.d.ts +31 -6
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/components/library/LibraryApp.vue.d.ts +8 -2
- package/dist/components/library/LibraryApp.vue.d.ts.map +1 -1
- package/dist/components/library/components/LibrarySidebar.vue.d.ts +6 -2
- package/dist/components/library/components/LibrarySidebar.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenuNestedSubmenu.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiSplitPane.vue.d.ts +38 -0
- package/dist/components/ui/components/UiSplitPane.vue.d.ts.map +1 -0
- package/dist/components/ui/components/index.d.ts +1 -0
- package/dist/components/ui/components/index.d.ts.map +1 -1
- package/dist/{docx-preview-CgF7upUL.js → docx-preview-_KbfGYVZ.js} +1 -1
- package/dist/{docx-preview-Dom9DuwY.cjs → docx-preview-ljv2r1o6.cjs} +1 -1
- package/dist/index-B0LYCMyD.cjs +1447 -0
- package/dist/{index-CxF54XmE.js → index-CgfD9R7Z.js} +1 -1
- package/dist/{index-Ctl5i7Ad.cjs → index-DkAkCzn-.cjs} +1 -1
- package/dist/{index-DaiEgT_d.js → index-xNFX7ZcL.js} +32181 -29257
- package/dist/index.cjs +1 -1
- package/dist/index.js +609 -574
- package/dist/{papaparse.min-CpVgW58v.js → papaparse.min-CxNXl7Vn.js} +1 -1
- package/dist/{papaparse.min-Dkpv4aky.cjs → papaparse.min-DYV83FIL.cjs} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/ChatMyFilesArtifacts-BxZqqm8I.cjs +0 -1
- package/dist/index-DuVaE24T.cjs +0 -1410
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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 {
|
|
4
|
-
const
|
|
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-xNFX7ZcL.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:
|
|
15
|
-
const n = r, C =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 &&
|
|
29
|
+
n.file.url && ut(n.file.url, n.file.name);
|
|
25
30
|
return;
|
|
26
31
|
}
|
|
27
|
-
C("action",
|
|
32
|
+
C("action", m);
|
|
28
33
|
}
|
|
29
|
-
}),
|
|
34
|
+
}), p = d(
|
|
30
35
|
() => [n.file.kind, n.file.updatedLabel, n.file.sizeLabel].filter(Boolean).join(" · ")
|
|
31
36
|
);
|
|
32
|
-
return (
|
|
37
|
+
return (m, y) => (i(), f("div", {
|
|
33
38
|
class: U(["chat-artifact-row", { "is-selected": r.selected, "has-owner": r.showOwner }]),
|
|
34
|
-
onClick:
|
|
39
|
+
onClick: y[3] || (y[3] = (B) => C("toggle"))
|
|
35
40
|
}, [
|
|
36
|
-
s("span",
|
|
37
|
-
|
|
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:
|
|
46
|
+
onToggle: y[0] || (y[0] = (B) => C("toggle"))
|
|
42
47
|
}, null, 8, ["checked", "label"]),
|
|
43
|
-
|
|
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",
|
|
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:
|
|
54
|
-
},
|
|
55
|
-
s("span",
|
|
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,
|
|
58
|
-
r.showOwner ? (i(),
|
|
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
|
-
},
|
|
63
|
-
s("span", Ma,
|
|
64
|
-
s("span",
|
|
65
|
-
|
|
66
|
-
default:
|
|
67
|
-
|
|
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:
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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:
|
|
94
|
-
const n = r, C =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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:
|
|
103
|
-
if (
|
|
104
|
-
|
|
112
|
+
onItemClick: ({ id: u }) => {
|
|
113
|
+
if (u.split(":").at(-1) === "download") {
|
|
114
|
+
te();
|
|
105
115
|
return;
|
|
106
116
|
}
|
|
107
|
-
C("action",
|
|
117
|
+
C("action", u);
|
|
108
118
|
}
|
|
109
|
-
}),
|
|
110
|
-
let
|
|
111
|
-
async function
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
|
|
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
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
const
|
|
122
|
-
var
|
|
123
|
-
return ((
|
|
124
|
-
}),
|
|
125
|
-
let
|
|
126
|
-
function
|
|
127
|
-
q.value =
|
|
128
|
-
}
|
|
129
|
-
async function
|
|
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
|
-
|
|
137
|
-
|
|
146
|
+
W.value = !0, clearTimeout(oe), oe = setTimeout(() => {
|
|
147
|
+
W.value = !1;
|
|
138
148
|
}, 1600);
|
|
139
149
|
}
|
|
140
150
|
}
|
|
141
|
-
const
|
|
151
|
+
const S = d(
|
|
142
152
|
() => [
|
|
143
153
|
n.file.kind,
|
|
144
|
-
|
|
154
|
+
ne.value && ee.value ? `${ee.value} 行` : "",
|
|
145
155
|
n.file.sizeLabel
|
|
146
156
|
].filter(Boolean).join(" · ")
|
|
147
|
-
),
|
|
148
|
-
|
|
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
|
|
160
|
+
() => void B()
|
|
151
161
|
);
|
|
152
|
-
const
|
|
153
|
-
let
|
|
154
|
-
const
|
|
155
|
-
|
|
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(
|
|
168
|
+
Qt(Y), q.value = "", ee.value = 0, W.value = !1;
|
|
159
169
|
}
|
|
160
170
|
);
|
|
161
|
-
const
|
|
162
|
-
let
|
|
163
|
-
function
|
|
164
|
-
|
|
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
|
-
|
|
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
|
|
175
|
-
|
|
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(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
193
|
+
E();
|
|
184
194
|
}
|
|
185
195
|
}
|
|
186
196
|
return st(() => {
|
|
187
|
-
|
|
188
|
-
var
|
|
189
|
-
return (
|
|
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
|
-
|
|
193
|
-
}), (
|
|
194
|
-
|
|
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:
|
|
206
|
+
onAfterLeave: D
|
|
197
207
|
}, {
|
|
198
|
-
default:
|
|
199
|
-
|
|
208
|
+
default: le(() => [
|
|
209
|
+
O.value ? (i(), f("div", {
|
|
200
210
|
key: 0,
|
|
201
|
-
class: U(["chat-artifact-preview", { "is-expanded":
|
|
202
|
-
onKeydown:
|
|
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:
|
|
216
|
+
onClick: E
|
|
207
217
|
}),
|
|
208
218
|
s("section", {
|
|
209
219
|
ref_key: "panelRef",
|
|
210
|
-
ref:
|
|
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
|
-
|
|
226
|
+
x(Jt, {
|
|
217
227
|
ref_key: "headerRef",
|
|
218
|
-
ref:
|
|
228
|
+
ref: re,
|
|
219
229
|
class: "chat-artifact-preview__header",
|
|
220
230
|
name: r.file.name,
|
|
221
231
|
ext: r.file.ext,
|
|
222
|
-
meta:
|
|
223
|
-
chrome:
|
|
224
|
-
"show-download": !!
|
|
225
|
-
fullscreen:
|
|
226
|
-
"show-copy":
|
|
227
|
-
copied:
|
|
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:
|
|
230
|
-
onCopy:
|
|
231
|
-
onFullscreen:
|
|
232
|
-
onClose:
|
|
239
|
+
onDownload: te,
|
|
240
|
+
onCopy: ie,
|
|
241
|
+
onFullscreen: _e,
|
|
242
|
+
onClose: E
|
|
233
243
|
}, {
|
|
234
|
-
actions:
|
|
235
|
-
|
|
236
|
-
default:
|
|
237
|
-
|
|
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",
|
|
249
|
-
|
|
258
|
+
s("div", Ra, [
|
|
259
|
+
m.value ? (i(), P(Xt, {
|
|
250
260
|
key: 0,
|
|
251
261
|
label: "正在加载文件"
|
|
252
|
-
})) :
|
|
262
|
+
})) : M.value && ne.value ? (i(), P(ea, {
|
|
253
263
|
key: 1,
|
|
254
|
-
src:
|
|
255
|
-
onLoaded:
|
|
256
|
-
}, null, 8, ["src"])) :
|
|
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:
|
|
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(),
|
|
268
|
-
|
|
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:
|
|
273
|
-
download: !!
|
|
274
|
-
"secondary-label":
|
|
275
|
-
onDownload:
|
|
276
|
-
onSecondary:
|
|
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:
|
|
292
|
+
onSecondary: E
|
|
283
293
|
}))
|
|
284
294
|
]))
|
|
285
295
|
])
|
|
286
|
-
], 8,
|
|
287
|
-
], 34)) :
|
|
296
|
+
], 8, $a)
|
|
297
|
+
], 34)) : I("", !0)
|
|
288
298
|
]),
|
|
289
299
|
_: 1
|
|
290
300
|
})
|
|
291
301
|
]));
|
|
292
302
|
}
|
|
293
|
-
}),
|
|
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
|
-
},
|
|
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
|
|
309
|
-
return (
|
|
310
|
-
r.groupHead ? (i(),
|
|
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
|
-
])])) :
|
|
315
|
-
(i(!0),
|
|
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",
|
|
320
|
-
|
|
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:
|
|
333
|
+
style: ue({ width: $[(p + 1) % $.length] })
|
|
324
334
|
}, null, 4)
|
|
325
335
|
]),
|
|
326
|
-
(i(!0),
|
|
327
|
-
key:
|
|
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
|
-
|
|
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",
|
|
343
|
+
s("span", za, [
|
|
334
344
|
s("span", {
|
|
335
345
|
class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--name",
|
|
336
|
-
style:
|
|
346
|
+
style: ue({ width: C(m - 1) })
|
|
337
347
|
}, null, 4),
|
|
338
|
-
|
|
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:
|
|
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:
|
|
356
|
+
style: ue({ width: g(m + 1) })
|
|
347
357
|
}, null, 4),
|
|
348
|
-
|
|
349
|
-
|
|
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__ */
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
385
|
-
const n = r, C =
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
const
|
|
390
|
-
source:
|
|
391
|
-
open:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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:
|
|
401
|
-
sources: () =>
|
|
406
|
+
flash: b,
|
|
407
|
+
sources: () => Z.transferSources.value,
|
|
402
408
|
/* 与「我的资料」页共用同一块任务面板(模块级单例队列)。 */
|
|
403
409
|
board: oa()
|
|
404
|
-
}),
|
|
405
|
-
let
|
|
406
|
-
const
|
|
407
|
-
function
|
|
408
|
-
return n.cloud ? S.value :
|
|
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
|
|
411
|
-
const a = new Set(
|
|
412
|
-
t ? a.add(e) : a.delete(e),
|
|
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
|
|
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
|
|
424
|
+
async function u(e = "replace") {
|
|
419
425
|
const t = n.cloud;
|
|
420
|
-
if (!t || e === "append" &&
|
|
421
|
-
const a = ++
|
|
422
|
-
e === "replace" && G && (R.value =
|
|
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:
|
|
433
|
+
search: g.value.trim()
|
|
428
434
|
});
|
|
429
|
-
if (a !==
|
|
430
|
-
const _ =
|
|
431
|
-
S.value = e === "append" ?
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
const K =
|
|
435
|
-
|
|
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 !==
|
|
443
|
+
if (a !== T) return;
|
|
438
444
|
const _ = o instanceof Error ? o.message : "产物加载失败";
|
|
439
|
-
S.value.length ? e === "append" && (
|
|
445
|
+
S.value.length ? e === "append" && (Y.value = !0) : j.value = _, b(_, "error");
|
|
440
446
|
} finally {
|
|
441
|
-
a ===
|
|
447
|
+
a === T && (F.value = !1, M.value = !1, Me());
|
|
442
448
|
}
|
|
443
449
|
}
|
|
444
|
-
function
|
|
445
|
-
|
|
450
|
+
function J() {
|
|
451
|
+
u("replace");
|
|
446
452
|
}
|
|
447
453
|
async function ft(e) {
|
|
448
454
|
const t = n.cloud;
|
|
449
|
-
if (!t ||
|
|
450
|
-
const a = (
|
|
451
|
-
|
|
452
|
-
const l =
|
|
453
|
-
|
|
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
|
|
459
|
-
if (
|
|
460
|
-
const K =
|
|
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 (
|
|
465
|
-
|
|
470
|
+
if (E.get(e) !== a) return;
|
|
471
|
+
b(o instanceof Error ? o.message : "产物加载失败", "error");
|
|
466
472
|
} finally {
|
|
467
|
-
|
|
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:
|
|
480
|
+
selectedId: w,
|
|
475
481
|
panelClass: ca,
|
|
476
482
|
onItemClick: ({ id: e }) => {
|
|
477
|
-
|
|
483
|
+
mt(e) && (w.value = e);
|
|
478
484
|
}
|
|
479
485
|
});
|
|
480
|
-
function
|
|
486
|
+
function mt(e) {
|
|
481
487
|
return qe.includes(e);
|
|
482
488
|
}
|
|
483
|
-
function
|
|
484
|
-
if (!
|
|
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) =>
|
|
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 =
|
|
489
|
-
const e = n.cloud ? "" :
|
|
490
|
-
return
|
|
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),
|
|
498
|
+
const _ = !!e && o.title.toLowerCase().includes(e), k = ht(
|
|
493
499
|
o.files.filter((K) => {
|
|
494
|
-
const Rt =
|
|
495
|
-
return Rt && (a || _ ||
|
|
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:
|
|
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 =
|
|
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
|
-
),
|
|
511
|
-
() => pt.value.filter((e) =>
|
|
512
|
-
), me = /* @__PURE__ */ new Map(), G = typeof IntersectionObserver < "u",
|
|
513
|
-
let
|
|
514
|
-
const
|
|
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
|
-
),
|
|
517
|
-
if (!
|
|
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 ||
|
|
534
|
+
!n.cloud || !G || !L.value || F.value || D.value || Be.value - R.value > _s || u("append");
|
|
529
535
|
}
|
|
530
|
-
let
|
|
536
|
+
let we = 1;
|
|
531
537
|
function yt() {
|
|
532
|
-
if (
|
|
533
|
-
return
|
|
534
|
-
const e =
|
|
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
|
|
545
|
+
function Ue() {
|
|
540
546
|
if (G) {
|
|
541
|
-
if (
|
|
542
|
-
R.value +=
|
|
547
|
+
if (X.value) {
|
|
548
|
+
R.value += se;
|
|
543
549
|
return;
|
|
544
550
|
}
|
|
545
|
-
|
|
551
|
+
L.value && !F.value && !D.value && yt() && u("append");
|
|
546
552
|
}
|
|
547
553
|
}
|
|
548
554
|
function wt() {
|
|
549
|
-
if (
|
|
550
|
-
R.value +=
|
|
555
|
+
if (X.value) {
|
|
556
|
+
R.value += se;
|
|
551
557
|
return;
|
|
552
558
|
}
|
|
553
|
-
|
|
554
|
-
}
|
|
555
|
-
const
|
|
556
|
-
let
|
|
557
|
-
function
|
|
558
|
-
!G ||
|
|
559
|
-
if (
|
|
560
|
-
const e =
|
|
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 &&
|
|
569
|
+
a.top < l.bottom + 240 && a.bottom > l.top - 240 && Ue();
|
|
564
570
|
}));
|
|
565
571
|
}
|
|
566
|
-
function
|
|
567
|
-
window.clearTimeout(
|
|
568
|
-
|
|
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
|
-
|
|
574
|
-
const e =
|
|
575
|
-
e && (
|
|
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() <
|
|
579
|
-
|
|
584
|
+
if (performance.now() < Se) {
|
|
585
|
+
He();
|
|
580
586
|
return;
|
|
581
587
|
}
|
|
582
|
-
|
|
588
|
+
we = 1, Ue(), Ne();
|
|
583
589
|
}
|
|
584
590
|
},
|
|
585
|
-
{ root:
|
|
586
|
-
),
|
|
591
|
+
{ root: he.value, rootMargin: "240px 0px" }
|
|
592
|
+
), N.observe(e));
|
|
587
593
|
}
|
|
588
|
-
|
|
589
|
-
G && (R.value =
|
|
590
|
-
}),
|
|
591
|
-
[
|
|
594
|
+
de([g, w, v, p], () => {
|
|
595
|
+
G && (R.value = se);
|
|
596
|
+
}), de(
|
|
597
|
+
[X, L, R],
|
|
592
598
|
() => {
|
|
593
|
-
Oe(),
|
|
599
|
+
Oe(), Me(), Ne();
|
|
594
600
|
},
|
|
595
601
|
{ flush: "post" }
|
|
596
602
|
);
|
|
597
|
-
const
|
|
598
|
-
() =>
|
|
599
|
-
), Ct =
|
|
600
|
-
() => !
|
|
601
|
-
), Le =
|
|
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 (!
|
|
613
|
+
if (!ce.value) {
|
|
608
614
|
C("back");
|
|
609
615
|
return;
|
|
610
616
|
}
|
|
611
|
-
|
|
617
|
+
g.value = "", w.value = "全部类型";
|
|
612
618
|
}
|
|
613
619
|
function ze(e) {
|
|
614
|
-
if (
|
|
615
|
-
|
|
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
|
|
627
|
+
return v.value !== e ? "idle" : p.value === "asc" ? "asc" : "desc";
|
|
622
628
|
}
|
|
623
629
|
function xt(e) {
|
|
624
630
|
var o;
|
|
625
|
-
|
|
626
|
-
const t = new Set(
|
|
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(
|
|
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
|
|
632
|
-
const t = new Set(
|
|
633
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
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
|
|
636
|
-
function
|
|
637
|
-
|
|
641
|
+
const ae = c(null), It = c("");
|
|
642
|
+
function St(e, t) {
|
|
643
|
+
It.value = e, ae.value = t;
|
|
638
644
|
}
|
|
639
|
-
function
|
|
645
|
+
function Mt(e) {
|
|
640
646
|
const t = Qe(e);
|
|
641
647
|
if (!t) return;
|
|
642
|
-
const a =
|
|
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
|
-
|
|
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
|
-
|
|
666
|
+
b(o.notice, "warning");
|
|
661
667
|
return;
|
|
662
668
|
}
|
|
663
|
-
o.kind === "notice" &&
|
|
669
|
+
o.kind === "notice" && b(o.notice, "warning");
|
|
664
670
|
}
|
|
665
671
|
}
|
|
666
672
|
function Ee() {
|
|
667
|
-
|
|
673
|
+
y.value = /* @__PURE__ */ new Set();
|
|
668
674
|
}
|
|
669
675
|
function Lt(e) {
|
|
670
|
-
for (const t of
|
|
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
|
-
|
|
697
|
+
W(_, [Je(o, a.session)]);
|
|
692
698
|
return;
|
|
693
699
|
}
|
|
694
|
-
const
|
|
700
|
+
const k = Xe(t, {
|
|
695
701
|
unavailable: !!n.cloud,
|
|
696
702
|
disabled: n.actionsDisabled === !0
|
|
697
703
|
});
|
|
698
|
-
if (
|
|
699
|
-
if (
|
|
700
|
-
|
|
704
|
+
if (k) {
|
|
705
|
+
if (k.kind === "unavailable") {
|
|
706
|
+
b(k.notice, "warning");
|
|
701
707
|
return;
|
|
702
708
|
}
|
|
703
|
-
|
|
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 (
|
|
709
|
-
|
|
714
|
+
if (ie) {
|
|
715
|
+
ie(e);
|
|
710
716
|
return;
|
|
711
717
|
}
|
|
712
|
-
C("add-to-task", e),
|
|
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) =>
|
|
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
|
|
728
|
+
function $t() {
|
|
723
729
|
if (n.actionsDisabled === !0) return;
|
|
724
730
|
const e = Pt();
|
|
725
731
|
if (e.length !== 0) {
|
|
726
|
-
if (!
|
|
732
|
+
if (!ie) {
|
|
727
733
|
if (n.cloud) {
|
|
728
|
-
|
|
734
|
+
b(ba, "warning");
|
|
729
735
|
return;
|
|
730
736
|
}
|
|
731
|
-
|
|
737
|
+
b(`已添加 ${xe.value} 个文件到任务`, "success"), Ee();
|
|
732
738
|
return;
|
|
733
739
|
}
|
|
734
740
|
Pe(e), Ee();
|
|
735
741
|
}
|
|
736
742
|
}
|
|
737
|
-
return
|
|
738
|
-
n.cloud && (window.clearTimeout(
|
|
739
|
-
|
|
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 &&
|
|
748
|
+
Oe(), n.cloud && u();
|
|
743
749
|
}), Ot(() => {
|
|
744
|
-
|
|
745
|
-
}), (e, t) => (i(),
|
|
746
|
-
class: U(["chat-my-files-artifacts", { "has-selection":
|
|
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",
|
|
749
|
-
s("header",
|
|
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:
|
|
765
|
+
src: h(Ca),
|
|
760
766
|
alt: ""
|
|
761
|
-
}, null, 8,
|
|
767
|
+
}, null, 8, Za),
|
|
762
768
|
t[5] || (t[5] = s("span", null, "返回我的文件", -1))
|
|
763
769
|
]),
|
|
764
|
-
|
|
765
|
-
"item-icon":
|
|
766
|
-
|
|
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:
|
|
771
|
-
s("button",
|
|
772
|
-
s("span", null,
|
|
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:
|
|
783
|
+
src: h(We),
|
|
778
784
|
alt: ""
|
|
779
|
-
}, null, 8,
|
|
785
|
+
}, null, 8, Wa)
|
|
780
786
|
])
|
|
781
787
|
]),
|
|
782
788
|
_: 1
|
|
783
789
|
}),
|
|
784
|
-
s("label",
|
|
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:
|
|
795
|
+
src: h(da),
|
|
790
796
|
alt: ""
|
|
791
|
-
}, null, 8,
|
|
797
|
+
}, null, 8, Ya),
|
|
792
798
|
zt(s("input", {
|
|
793
|
-
"onUpdate:modelValue": t[1] || (t[1] = (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,
|
|
804
|
+
[Gt, g.value]
|
|
799
805
|
])
|
|
800
806
|
])
|
|
801
807
|
]),
|
|
802
|
-
|
|
803
|
-
s("div",
|
|
804
|
-
Tt.value ? (i(),
|
|
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(),
|
|
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(),
|
|
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(),
|
|
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)) :
|
|
860
|
+
], 2)) : I("", !0),
|
|
855
861
|
s("div", {
|
|
856
862
|
ref_key: "bodyRef",
|
|
857
|
-
ref:
|
|
863
|
+
ref: he,
|
|
858
864
|
class: "chat-my-files-artifacts__body"
|
|
859
865
|
}, [
|
|
860
|
-
|
|
861
|
-
|
|
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
|
-
])) :
|
|
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:
|
|
882
|
+
description: j.value,
|
|
877
883
|
"action-text": "重新加载",
|
|
878
|
-
onAction:
|
|
879
|
-
}, null, 8, ["description"])) : z.value.length ?
|
|
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:
|
|
883
|
-
title:
|
|
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),
|
|
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": !
|
|
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": !
|
|
902
|
-
src:
|
|
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,
|
|
905
|
-
s("span",
|
|
906
|
-
s("em",
|
|
907
|
-
], 8,
|
|
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":
|
|
910
|
-
inert:
|
|
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",
|
|
913
|
-
(i(!0),
|
|
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:
|
|
922
|
+
style: ue({ "--mf-stagger": o })
|
|
917
923
|
}, [
|
|
918
|
-
s("div",
|
|
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:
|
|
929
|
+
src: h(fa),
|
|
924
930
|
alt: ""
|
|
925
|
-
}, null, 8,
|
|
931
|
+
}, null, 8, rs),
|
|
926
932
|
s("span", {
|
|
927
933
|
title: l.title
|
|
928
|
-
},
|
|
934
|
+
}, A(l.title), 9, cs)
|
|
929
935
|
]),
|
|
930
|
-
(i(!0),
|
|
931
|
-
key:
|
|
936
|
+
(i(!0), f(fe, null, ve(l.files, (_) => (i(), P(Pa, {
|
|
937
|
+
key: h(V)(l.id, _.id),
|
|
932
938
|
file: _,
|
|
933
|
-
selected:
|
|
939
|
+
selected: y.value.has(h(V)(l.id, _.id)),
|
|
934
940
|
"show-owner": Le.value,
|
|
935
941
|
"actions-disabled": r.actionsDisabled,
|
|
936
|
-
onToggle: (
|
|
937
|
-
onOpen: (
|
|
938
|
-
onAction: (
|
|
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(),
|
|
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:
|
|
946
|
-
"aria-busy":
|
|
951
|
+
disabled: H.value.has(l.id),
|
|
952
|
+
"aria-busy": H.value.has(l.id),
|
|
947
953
|
onClick: (_) => ft(l.id)
|
|
948
|
-
},
|
|
954
|
+
}, A(H.value.has(l.id) ? "加载中" : Ae(l)), 9, us)) : I("", !0)
|
|
949
955
|
], 4))), 128))
|
|
950
956
|
])
|
|
951
|
-
], 10,
|
|
957
|
+
], 10, ns)
|
|
952
958
|
]))), 128)),
|
|
953
|
-
r.cloud &&
|
|
959
|
+
r.cloud && Ie.value && !D.value ? (i(), f("div", {
|
|
954
960
|
key: 3,
|
|
955
961
|
ref_key: "sentinelRef",
|
|
956
|
-
ref:
|
|
957
|
-
class: U(["chat-my-files-artifacts__sentinel", { "is-loading":
|
|
962
|
+
ref: pe,
|
|
963
|
+
class: U(["chat-my-files-artifacts__sentinel", { "is-loading": M.value }])
|
|
958
964
|
}, [
|
|
959
|
-
s("div",
|
|
960
|
-
|
|
965
|
+
s("div", ds, [
|
|
966
|
+
M.value ? (i(), P(tt, {
|
|
961
967
|
key: 0,
|
|
962
968
|
blocks: 1,
|
|
963
969
|
rows: 1
|
|
964
|
-
})) :
|
|
970
|
+
})) : I("", !0)
|
|
965
971
|
])
|
|
966
|
-
], 2)) :
|
|
967
|
-
s("p",
|
|
968
|
-
r.cloud &&
|
|
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:
|
|
974
|
-
"aria-busy":
|
|
979
|
+
disabled: F.value && !X.value,
|
|
980
|
+
"aria-busy": M.value,
|
|
975
981
|
onClick: wt
|
|
976
|
-
},
|
|
982
|
+
}, A(M.value ? "加载中" : Y.value ? "重新加载" : X.value ? "显示更多任务" : "加载更多会话"), 9, vs)) : I("", !0)
|
|
977
983
|
], 512)
|
|
978
984
|
]),
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
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) =>
|
|
1012
|
-
onAction:
|
|
1013
|
-
}, null, 8, ["file", "cloud", "actions-disabled"])) :
|
|
1014
|
-
|
|
1015
|
-
source:
|
|
1016
|
-
open:
|
|
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:
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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
|
-
}),
|
|
1010
|
+
}), ws = /* @__PURE__ */ be(ms, [["__scopeId", "data-v-13517c8c"]]);
|
|
1028
1011
|
export {
|
|
1029
|
-
|
|
1012
|
+
ws as default
|
|
1030
1013
|
};
|