@deep-eye/core 1.3.87 → 1.3.91
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 +45 -0
- package/README.md +1 -1
- package/dist/{ChartRenderer-lJ5Zz8gr.js → ChartRenderer-CKsUJhbc.js} +1 -1
- package/dist/{ChartRenderer-D5smoPbl.cjs → ChartRenderer-TzsnqnyV.cjs} +1 -1
- package/dist/ChatMyFilesArtifacts-BeQHLrUE.cjs +1 -0
- package/dist/ChatMyFilesArtifacts-qD7q7u2u.js +795 -0
- package/dist/components/chat/ChatApp.vue.d.ts +11 -0
- package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/chatAppScheduledTasks.d.ts +42 -0
- package/dist/components/chat/chatAppScheduledTasks.d.ts.map +1 -0
- package/dist/components/chat/chatConfirm.d.ts +37 -0
- package/dist/components/chat/chatConfirm.d.ts.map +1 -0
- package/dist/components/chat/chatFilePicker.d.ts +10 -0
- package/dist/components/chat/chatFilePicker.d.ts.map +1 -1
- package/dist/components/chat/chatQuota.d.ts +5 -5
- package/dist/components/chat/chatQuota.d.ts.map +1 -1
- package/dist/components/chat/chatSessionSidebarAssets.d.ts +7 -0
- package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -1
- package/dist/components/chat/chatToast.d.ts +8 -0
- package/dist/components/chat/chatToast.d.ts.map +1 -0
- package/dist/components/chat/components/ChatConfirmHost.vue.d.ts +4 -0
- package/dist/components/chat/components/ChatConfirmHost.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaRefreshButton.vue.d.ts +12 -0
- package/dist/components/chat/components/ChatQuotaRefreshButton.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts +7 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatToastStack.vue.d.ts +17 -0
- package/dist/components/chat/components/ChatToastStack.vue.d.ts.map +1 -0
- package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesViewer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts +10 -3
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatReviewApi.d.ts +4 -0
- package/dist/components/chat/components/files/chatReviewApi.d.ts.map +1 -1
- package/dist/components/chat/components/files/index.d.ts +3 -1
- package/dist/components/chat/components/files/index.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesShareSchool.d.ts +10 -3
- package/dist/components/chat/components/files/myFilesShareSchool.d.ts.map +1 -1
- package/dist/components/chat/components/index.d.ts +1 -0
- package/dist/components/chat/components/index.d.ts.map +1 -1
- package/dist/components/chat/components/schedule/ChatScheduleRecords.vue.d.ts +21 -0
- package/dist/components/chat/components/schedule/ChatScheduleRecords.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleSelect.vue.d.ts +29 -0
- package/dist/components/chat/components/schedule/ChatScheduleSelect.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleSwitch.vue.d.ts +19 -0
- package/dist/components/chat/components/schedule/ChatScheduleSwitch.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskCard.vue.d.ts +33 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskCard.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskDialog.vue.d.ts +42 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskDialog.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTime.vue.d.ts +15 -0
- package/dist/components/chat/components/schedule/ChatScheduleTime.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduledTasks.vue.d.ts +41 -0
- package/dist/components/chat/components/schedule/ChatScheduledTasks.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/chatScheduledTasksApi.d.ts +35 -0
- package/dist/components/chat/components/schedule/chatScheduledTasksApi.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/index.d.ts +10 -0
- package/dist/components/chat/components/schedule/index.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTaskWire.d.ts +60 -0
- package/dist/components/chat/components/schedule/scheduledTaskWire.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTasksModel.d.ts +116 -0
- package/dist/components/chat/components/schedule/scheduledTasksModel.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTasksRemoteApi.d.ts +18 -0
- package/dist/components/chat/components/schedule/scheduledTasksRemoteApi.d.ts.map +1 -0
- package/dist/components/chat/composables/chatApiRequest.d.ts +7 -1
- package/dist/components/chat/composables/chatApiRequest.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatSessionHistory.d.ts.map +1 -1
- package/dist/components/chat/composer/composerExtensions.d.ts +31 -0
- package/dist/components/chat/composer/composerExtensions.d.ts.map +1 -1
- package/dist/components/chat/composerBannerNotice.d.ts +14 -0
- package/dist/components/chat/composerBannerNotice.d.ts.map +1 -0
- package/dist/components/chat/index.d.ts +6 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/types.d.ts +26 -0
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/{docx-preview-DnSEXqsD.cjs → docx-preview-CC8jDFyo.cjs} +1 -1
- package/dist/{docx-preview-DGy9Ky36.js → docx-preview-Ddq2Rd5j.js} +1 -1
- package/dist/index-47_t1k1t.cjs +1467 -0
- package/dist/{index-QH1oDPuS.js → index-B5TwLeqQ.js} +1 -1
- package/dist/{index-BjoCM559.js → index-BXOcelf2.js} +30524 -27911
- package/dist/{index-BqQ5eE7K.cjs → index-G1cUXwuV.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +645 -610
- package/dist/{papaparse.min-V_TidkCa.cjs → papaparse.min-Bi9-MNQC.cjs} +1 -1
- package/dist/{papaparse.min-DXbU8MEz.js → papaparse.min-CABieqyR.js} +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ChatMyFilesArtifacts-83kaOC7E.js +0 -1013
- package/dist/ChatMyFilesArtifacts-BhflVsJl.cjs +0 -1
- package/dist/index-B-jsC3Gu.cjs +0 -1443
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
import { defineComponent as ke, computed as _, openBlock as i, createElementBlock as u, normalizeClass as B, createElementVNode as s, createVNode as S, withModifiers as $e, toDisplayString as k, createCommentVNode as b, unref as v, withCtx as ye, Fragment as Y, renderList as J, normalizeStyle as Q, ref as f, watch as he, onMounted as It, onUnmounted as Mt, withDirectives as St, vModelText as Lt, createTextVNode as Re, createBlock as q } from "vue";
|
|
2
|
+
import "@vueuse/core";
|
|
3
|
+
import { u as xt, c as Et, a as Ze, A as Nt, b as $t, d as Rt, e as Bt, f as Dt, C as Pt, g as Ot, h as Ut, _ as we, i as Ht, j as zt, k as Gt, l as Kt, m as Vt, n as Zt, K as Wt, o as Be, p as R, q as De, r as jt, s as qt, t as Pe, v as Qt, w as Yt, x as Jt, y as Xt, z as ea, B as ta, D as Oe, E as pe, F as aa, G as sa, H as na, I as la, J as Ue, L as ge, M as He, N as ze, O as Ge, P as oa, Q as ia } from "./index-BXOcelf2.js";
|
|
4
|
+
const ra = "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" }, ua = { class: "chat-artifact-row__name" }, da = ["title"], fa = { class: "chat-artifact-row__meta" }, va = { class: "chat-artifact-row__cell chat-artifact-row__cell--kind" }, _a = ["title"], ma = { class: "chat-artifact-row__cell chat-artifact-row__cell--time" }, ha = { class: "chat-artifact-row__cell chat-artifact-row__cell--size" }, pa = /* @__PURE__ */ ke({
|
|
5
|
+
name: "ChatArtifactFileRow",
|
|
6
|
+
__name: "ChatArtifactFileRow",
|
|
7
|
+
props: {
|
|
8
|
+
file: {},
|
|
9
|
+
selected: { type: Boolean },
|
|
10
|
+
actionsDisabled: { type: Boolean, default: !1 },
|
|
11
|
+
showOwner: { type: Boolean, default: !1 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["toggle", "open", "action"],
|
|
14
|
+
setup(r, { emit: L }) {
|
|
15
|
+
const o = r, A = L, y = xt(), m = _(
|
|
16
|
+
() => Et(
|
|
17
|
+
{ disabled: o.actionsDisabled },
|
|
18
|
+
{ canUploadTo: y(o.file) }
|
|
19
|
+
)
|
|
20
|
+
), { Menu: d } = Ze({
|
|
21
|
+
items: m,
|
|
22
|
+
placement: Bt,
|
|
23
|
+
width: Rt,
|
|
24
|
+
panelClass: $t,
|
|
25
|
+
submenuPanelClass: Nt,
|
|
26
|
+
onItemClick: ({ id: h }) => {
|
|
27
|
+
if (h.split(":").at(-1) === "download") {
|
|
28
|
+
if (o.actionsDisabled) return;
|
|
29
|
+
o.file.url && Dt(o.file.url, o.file.name);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
A("action", h);
|
|
33
|
+
}
|
|
34
|
+
}), w = _(
|
|
35
|
+
() => [o.file.kind, o.file.updatedLabel, o.file.sizeLabel].filter(Boolean).join(" · ")
|
|
36
|
+
);
|
|
37
|
+
return (h, p) => (i(), u("div", {
|
|
38
|
+
class: B(["chat-artifact-row", { "is-selected": r.selected, "has-owner": r.showOwner }]),
|
|
39
|
+
onClick: p[3] || (p[3] = (O) => A("toggle"))
|
|
40
|
+
}, [
|
|
41
|
+
s("span", ca, [
|
|
42
|
+
S(Pt, {
|
|
43
|
+
class: "chat-artifact-row__check",
|
|
44
|
+
checked: r.selected,
|
|
45
|
+
label: r.selected ? "取消选择" : "选择文件",
|
|
46
|
+
onToggle: p[0] || (p[0] = (O) => A("toggle"))
|
|
47
|
+
}, null, 8, ["checked", "label"]),
|
|
48
|
+
S(Ot, {
|
|
49
|
+
ext: r.file.ext,
|
|
50
|
+
name: r.file.name
|
|
51
|
+
}, null, 8, ["ext", "name"])
|
|
52
|
+
]),
|
|
53
|
+
s("span", ua, [
|
|
54
|
+
s("button", {
|
|
55
|
+
class: "chat-artifact-row__title",
|
|
56
|
+
type: "button",
|
|
57
|
+
title: r.file.name,
|
|
58
|
+
onClick: p[1] || (p[1] = $e((O) => A("open"), ["stop"]))
|
|
59
|
+
}, k(r.file.name), 9, da),
|
|
60
|
+
s("span", fa, k(w.value), 1)
|
|
61
|
+
]),
|
|
62
|
+
s("span", va, k(r.file.kind), 1),
|
|
63
|
+
r.showOwner ? (i(), u("span", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "chat-artifact-row__cell chat-artifact-row__cell--owner",
|
|
66
|
+
title: r.file.owner || ""
|
|
67
|
+
}, k(r.file.owner || "—"), 9, _a)) : b("", !0),
|
|
68
|
+
s("span", ma, k(r.file.updatedLabel), 1),
|
|
69
|
+
s("span", ha, k(r.file.sizeLabel), 1),
|
|
70
|
+
S(v(d), null, {
|
|
71
|
+
default: ye(() => [
|
|
72
|
+
S(Ut, {
|
|
73
|
+
class: "chat-artifact-row__more",
|
|
74
|
+
"data-testid": "artifact-row-more",
|
|
75
|
+
loading: "lazy",
|
|
76
|
+
decoding: "async",
|
|
77
|
+
onClick: p[2] || (p[2] = $e(() => {
|
|
78
|
+
}, ["stop"]))
|
|
79
|
+
})
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
})
|
|
83
|
+
], 2));
|
|
84
|
+
}
|
|
85
|
+
}), ga = /* @__PURE__ */ we(pa, [["__scopeId", "data-v-c9c7f7c8"]]), ya = {
|
|
86
|
+
class: "art-skeleton",
|
|
87
|
+
"aria-hidden": "true"
|
|
88
|
+
}, ka = {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: "art-skeleton__group"
|
|
91
|
+
}, wa = { class: "art-skeleton__task" }, ba = { class: "art-skeleton__name" }, Aa = /* @__PURE__ */ ke({
|
|
92
|
+
name: "ChatArtifactsSkeleton",
|
|
93
|
+
__name: "ChatArtifactsSkeleton",
|
|
94
|
+
props: {
|
|
95
|
+
blocks: { default: 2 },
|
|
96
|
+
rows: { default: 2 },
|
|
97
|
+
groupHead: { type: Boolean, default: !1 }
|
|
98
|
+
},
|
|
99
|
+
setup(r) {
|
|
100
|
+
const L = ["42%", "54%", "34%", "48%"], o = ["58%", "44%", "66%", "50%"], A = (m) => L[m % L.length], y = (m) => o[m % o.length];
|
|
101
|
+
return (m, d) => (i(), u("div", ya, [
|
|
102
|
+
r.groupHead ? (i(), u("div", ka, [...d[0] || (d[0] = [
|
|
103
|
+
s("span", { class: "mf-skeleton-row art-skeleton__chevron" }, null, -1),
|
|
104
|
+
s("span", { class: "mf-skeleton-row art-skeleton__group-name" }, null, -1),
|
|
105
|
+
s("span", { class: "mf-skeleton-row art-skeleton__group-count" }, null, -1)
|
|
106
|
+
])])) : b("", !0),
|
|
107
|
+
(i(!0), u(Y, null, J(r.blocks, (w) => (i(), u("div", {
|
|
108
|
+
key: w,
|
|
109
|
+
class: "art-skeleton__block"
|
|
110
|
+
}, [
|
|
111
|
+
s("div", wa, [
|
|
112
|
+
d[1] || (d[1] = s("span", { class: "mf-skeleton-row art-skeleton__spark" }, null, -1)),
|
|
113
|
+
s("span", {
|
|
114
|
+
class: "mf-skeleton-row art-skeleton__task-name",
|
|
115
|
+
style: Q({ width: L[(w + 1) % L.length] })
|
|
116
|
+
}, null, 4)
|
|
117
|
+
]),
|
|
118
|
+
(i(!0), u(Y, null, J(r.rows, (h) => (i(), u("div", {
|
|
119
|
+
key: h,
|
|
120
|
+
class: "art-skeleton__row"
|
|
121
|
+
}, [
|
|
122
|
+
d[3] || (d[3] = s("span", { class: "art-skeleton__lead" }, [
|
|
123
|
+
s("span", { class: "mf-skeleton-row art-skeleton__icon" })
|
|
124
|
+
], -1)),
|
|
125
|
+
s("span", ba, [
|
|
126
|
+
s("span", {
|
|
127
|
+
class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--name",
|
|
128
|
+
style: Q({ width: A(h - 1) })
|
|
129
|
+
}, null, 4),
|
|
130
|
+
d[2] || (d[2] = s("span", { class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--meta" }, null, -1))
|
|
131
|
+
]),
|
|
132
|
+
s("span", {
|
|
133
|
+
class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--kind",
|
|
134
|
+
style: Q({ width: y(h) })
|
|
135
|
+
}, null, 4),
|
|
136
|
+
s("span", {
|
|
137
|
+
class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--time",
|
|
138
|
+
style: Q({ width: y(h + 1) })
|
|
139
|
+
}, null, 4),
|
|
140
|
+
d[4] || (d[4] = s("span", { class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--size" }, null, -1)),
|
|
141
|
+
d[5] || (d[5] = s("span", { class: "art-skeleton__cell--action" }, null, -1))
|
|
142
|
+
]))), 128))
|
|
143
|
+
]))), 128))
|
|
144
|
+
]));
|
|
145
|
+
}
|
|
146
|
+
}), Ke = /* @__PURE__ */ we(Aa, [["__scopeId", "data-v-6ca80140"]]), Ca = { class: "chat-my-files-artifacts__frame" }, Ta = { class: "chat-my-files-artifacts__toolbar" }, Fa = ["src"], Ia = {
|
|
147
|
+
class: "chat-my-files-artifacts__filter",
|
|
148
|
+
type: "button"
|
|
149
|
+
}, Ma = ["src"], Sa = { class: "chat-my-files-artifacts__search" }, La = ["src"], xa = {
|
|
150
|
+
key: 0,
|
|
151
|
+
class: "chat-my-files-artifacts__progress",
|
|
152
|
+
role: "status",
|
|
153
|
+
"aria-label": "正在加载 AI 产物"
|
|
154
|
+
}, Ea = { class: "chat-my-files-artifacts__table" }, Na = {
|
|
155
|
+
key: 0,
|
|
156
|
+
class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--owner"
|
|
157
|
+
}, $a = {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: "chat-my-files-artifacts__skeleton",
|
|
160
|
+
"data-testid": "artifact-first-load",
|
|
161
|
+
"aria-busy": "true"
|
|
162
|
+
}, Ra = ["aria-expanded", "onClick"], Ba = ["src"], Da = { class: "chat-my-files-artifacts__group-name" }, Pa = { class: "chat-my-files-artifacts__group-count" }, Oa = ["inert"], Ua = { class: "chat-my-files-artifacts__group-clip" }, Ha = { class: "chat-my-files-artifacts__task-head" }, za = ["src"], Ga = ["title"], Ka = ["disabled", "aria-busy", "onClick"], Va = { class: "chat-my-files-artifacts__sentinel-sheet" }, Za = {
|
|
163
|
+
class: "chat-my-files-artifacts__sr-only",
|
|
164
|
+
role: "status"
|
|
165
|
+
}, Wa = ["disabled", "aria-busy"], K = 6, ja = 3, Ve = 400, qa = /* @__PURE__ */ ke({
|
|
166
|
+
name: "ChatMyFilesArtifacts",
|
|
167
|
+
__name: "ChatMyFilesArtifacts",
|
|
168
|
+
props: {
|
|
169
|
+
cloud: {},
|
|
170
|
+
actionsDisabled: { type: Boolean }
|
|
171
|
+
},
|
|
172
|
+
emits: ["back", "add-to-task"],
|
|
173
|
+
setup(r, { emit: L }) {
|
|
174
|
+
const o = r, A = L, y = f(""), m = f("全部类型"), d = f("updatedAt"), w = f("desc"), h = f(/* @__PURE__ */ new Set()), p = f(/* @__PURE__ */ new Set()), O = Ht();
|
|
175
|
+
function C(e, t = "info") {
|
|
176
|
+
O == null || O(e, t);
|
|
177
|
+
}
|
|
178
|
+
const We = zt(), {
|
|
179
|
+
source: je,
|
|
180
|
+
open: qe,
|
|
181
|
+
busy: Qe,
|
|
182
|
+
title: Ye,
|
|
183
|
+
request: be,
|
|
184
|
+
confirm: Je,
|
|
185
|
+
close: Xe
|
|
186
|
+
} = Gt({
|
|
187
|
+
getCloud: () => o.cloud,
|
|
188
|
+
flash: C,
|
|
189
|
+
sources: () => We.transferSources.value,
|
|
190
|
+
/* 与「我的资料」页共用同一块任务面板(模块级单例队列)。 */
|
|
191
|
+
board: Kt()
|
|
192
|
+
}), oe = Vt(), F = f([]), I = f(!1), V = f(""), x = f(!1), U = f(/* @__PURE__ */ new Set()), Ae = f(1), Z = f(!1), X = f(!1), ee = f({});
|
|
193
|
+
let H = 0, ie = 0;
|
|
194
|
+
const W = /* @__PURE__ */ new Map(), D = _(() => I.value && F.value.length === 0);
|
|
195
|
+
function Ce() {
|
|
196
|
+
return o.cloud ? F.value : ea;
|
|
197
|
+
}
|
|
198
|
+
function Te(e, t) {
|
|
199
|
+
const a = new Set(U.value);
|
|
200
|
+
t ? a.add(e) : a.delete(e), U.value = a;
|
|
201
|
+
}
|
|
202
|
+
function et(e) {
|
|
203
|
+
const t = (e.productCount ?? 0) - e.files.length;
|
|
204
|
+
return t > 0 ? `还有 ${t} 个` : "加载更多";
|
|
205
|
+
}
|
|
206
|
+
async function z(e = "replace") {
|
|
207
|
+
const t = o.cloud;
|
|
208
|
+
if (!t || e === "append" && I.value) return;
|
|
209
|
+
const a = ++H, n = e === "append" ? Ae.value + 1 : 1;
|
|
210
|
+
e === "replace" && N && (T.value = K, te.clear()), I.value = !0, V.value = "", x.value = e === "append";
|
|
211
|
+
try {
|
|
212
|
+
const l = await ta(t, {
|
|
213
|
+
page: n,
|
|
214
|
+
pageSize: Oe,
|
|
215
|
+
search: y.value.trim()
|
|
216
|
+
});
|
|
217
|
+
if (a !== H) return;
|
|
218
|
+
const c = pe(F.value);
|
|
219
|
+
F.value = e === "append" ? aa(F.value, l) : l;
|
|
220
|
+
const g = pe(F.value) - c;
|
|
221
|
+
Ae.value = n, e === "replace" && (ee.value = {}), X.value = !1;
|
|
222
|
+
const $ = pe(l) >= Oe;
|
|
223
|
+
Z.value = $ && (e === "replace" || g > 0);
|
|
224
|
+
} catch (l) {
|
|
225
|
+
if (a !== H) return;
|
|
226
|
+
const c = l instanceof Error ? l.message : "产物加载失败";
|
|
227
|
+
F.value.length ? e === "append" && (X.value = !0) : V.value = c, C(c, "error");
|
|
228
|
+
} finally {
|
|
229
|
+
a === H && (I.value = !1, x.value = !1, fe());
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function tt() {
|
|
233
|
+
z("replace");
|
|
234
|
+
}
|
|
235
|
+
async function at(e) {
|
|
236
|
+
const t = o.cloud;
|
|
237
|
+
if (!t || I.value || U.value.has(e)) return;
|
|
238
|
+
const a = (W.get(e) ?? 0) + 1;
|
|
239
|
+
W.set(e, a);
|
|
240
|
+
const n = H;
|
|
241
|
+
Te(e, !0);
|
|
242
|
+
try {
|
|
243
|
+
let l = ee.value[e] ?? 1, c = 0;
|
|
244
|
+
for (; c < 5; ) {
|
|
245
|
+
c += 1;
|
|
246
|
+
const g = await sa(t, e, l, na);
|
|
247
|
+
if (W.get(e) !== a || H !== n) return;
|
|
248
|
+
const $ = la(F.value, e, g);
|
|
249
|
+
if (F.value = $.groups, l += 1, ee.value = { ...ee.value, [e]: l }, $.added > 0 || !$.hasMore) break;
|
|
250
|
+
}
|
|
251
|
+
} catch (l) {
|
|
252
|
+
if (W.get(e) !== a) return;
|
|
253
|
+
C(l instanceof Error ? l.message : "产物加载失败", "error");
|
|
254
|
+
} finally {
|
|
255
|
+
W.get(e) === a && Te(e, !1);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const st = Zt(Be), { Menu: nt } = Ze({
|
|
259
|
+
items: st,
|
|
260
|
+
placement: "bottom-start",
|
|
261
|
+
width: 140,
|
|
262
|
+
selectedId: m,
|
|
263
|
+
panelClass: Wt,
|
|
264
|
+
onItemClick: ({ id: e }) => {
|
|
265
|
+
lt(e) && (m.value = e);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
function lt(e) {
|
|
269
|
+
return Be.includes(e);
|
|
270
|
+
}
|
|
271
|
+
function ot(e) {
|
|
272
|
+
if (!d.value) return e;
|
|
273
|
+
const t = w.value === "asc" ? 1 : -1;
|
|
274
|
+
return [...e].sort((a, n) => d.value === "name" ? a.name.localeCompare(n.name, "zh") * t : (a.updatedAt - n.updatedAt) * t);
|
|
275
|
+
}
|
|
276
|
+
const E = _(() => {
|
|
277
|
+
const e = o.cloud ? "" : y.value.trim().toLowerCase();
|
|
278
|
+
return Ce().map((t) => {
|
|
279
|
+
const a = !!e && t.name.toLowerCase().includes(e), n = t.sessions.map((l) => {
|
|
280
|
+
const c = !!e && l.title.toLowerCase().includes(e), g = ot(
|
|
281
|
+
l.files.filter(($) => {
|
|
282
|
+
const Tt = m.value === "全部类型" || $.kind === m.value, Ft = !e || $.name.toLowerCase().includes(e);
|
|
283
|
+
return Tt && (a || c || Ft);
|
|
284
|
+
})
|
|
285
|
+
);
|
|
286
|
+
return { ...l, files: g };
|
|
287
|
+
}).filter((l) => l.files.length > 0 || l.hasMore === !0);
|
|
288
|
+
return {
|
|
289
|
+
...t,
|
|
290
|
+
taskCount: t.taskCount ?? t.sessions.length,
|
|
291
|
+
sessions: n
|
|
292
|
+
};
|
|
293
|
+
}).filter((t) => t.sessions.length > 0);
|
|
294
|
+
}), it = _(
|
|
295
|
+
() => E.value.flatMap(
|
|
296
|
+
(e) => e.sessions.flatMap((t) => t.files.map((a) => R(t.id, a.id)))
|
|
297
|
+
)
|
|
298
|
+
), re = _(
|
|
299
|
+
() => it.value.filter((e) => p.value.has(e)).length
|
|
300
|
+
), te = /* @__PURE__ */ new Map(), N = typeof IntersectionObserver < "u", ae = f(null), se = f(null), T = f(N ? K : Number.POSITIVE_INFINITY);
|
|
301
|
+
let M = null, ce = !1, ne = 0;
|
|
302
|
+
const Fe = _(
|
|
303
|
+
() => E.value.reduce((e, t) => e + t.sessions.length, 0)
|
|
304
|
+
), P = _(() => Fe.value > T.value), Ie = _(() => {
|
|
305
|
+
if (!P.value) return E.value;
|
|
306
|
+
let e = T.value;
|
|
307
|
+
const t = [];
|
|
308
|
+
for (const a of E.value) {
|
|
309
|
+
if (e <= 0) break;
|
|
310
|
+
const n = a.sessions.slice(0, e);
|
|
311
|
+
e -= n.length, t.push({ ...a, sessions: n });
|
|
312
|
+
}
|
|
313
|
+
return t;
|
|
314
|
+
});
|
|
315
|
+
function Me() {
|
|
316
|
+
!o.cloud || !N || !Z.value || I.value || D.value || Fe.value - T.value > ja || z("append");
|
|
317
|
+
}
|
|
318
|
+
let le = 1;
|
|
319
|
+
function rt() {
|
|
320
|
+
if (le > 0)
|
|
321
|
+
return le -= 1, !0;
|
|
322
|
+
const e = ae.value, t = se.value;
|
|
323
|
+
if (!e || !t) return !1;
|
|
324
|
+
const a = t.getBoundingClientRect(), n = e.getBoundingClientRect();
|
|
325
|
+
return a.top < n.bottom && a.bottom > n.top;
|
|
326
|
+
}
|
|
327
|
+
function Se() {
|
|
328
|
+
if (N) {
|
|
329
|
+
if (P.value) {
|
|
330
|
+
T.value += K;
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
Z.value && !I.value && !D.value && rt() && z("append");
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function ct() {
|
|
337
|
+
if (P.value) {
|
|
338
|
+
T.value += K;
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
z("append");
|
|
342
|
+
}
|
|
343
|
+
const ut = _(() => !N || X.value), ue = _(() => P.value || Z.value);
|
|
344
|
+
let de = 0;
|
|
345
|
+
function fe() {
|
|
346
|
+
!N || ce || (ce = !0, window.requestAnimationFrame(() => {
|
|
347
|
+
if (ce = !1, performance.now() < de) return;
|
|
348
|
+
const e = se.value, t = ae.value;
|
|
349
|
+
if (!e || !t) return;
|
|
350
|
+
const a = e.getBoundingClientRect(), n = t.getBoundingClientRect();
|
|
351
|
+
a.top < n.bottom + 240 && a.bottom > n.top - 240 && Se();
|
|
352
|
+
}));
|
|
353
|
+
}
|
|
354
|
+
function Le() {
|
|
355
|
+
window.clearTimeout(ne), ne = window.setTimeout(() => {
|
|
356
|
+
ne = 0, ue.value && (le = 1, fe());
|
|
357
|
+
}, Ve + 40);
|
|
358
|
+
}
|
|
359
|
+
function xe() {
|
|
360
|
+
if (!N) return;
|
|
361
|
+
M == null || M.disconnect();
|
|
362
|
+
const e = se.value;
|
|
363
|
+
e && (M = new IntersectionObserver(
|
|
364
|
+
(t) => {
|
|
365
|
+
if (t.some((a) => a.isIntersecting)) {
|
|
366
|
+
if (performance.now() < de) {
|
|
367
|
+
Le();
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
le = 1, Se(), Me();
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{ root: ae.value, rootMargin: "240px 0px" }
|
|
374
|
+
), M.observe(e));
|
|
375
|
+
}
|
|
376
|
+
he([y, m, d, w], () => {
|
|
377
|
+
N && (T.value = K);
|
|
378
|
+
}), he(
|
|
379
|
+
[P, Z, T],
|
|
380
|
+
() => {
|
|
381
|
+
xe(), fe(), Me();
|
|
382
|
+
},
|
|
383
|
+
{ flush: "post" }
|
|
384
|
+
);
|
|
385
|
+
const j = _(() => !!y.value.trim() || m.value !== "全部类型"), dt = _(() => j.value ? "没有匹配的文件" : "暂无 AI 产物"), ft = _(
|
|
386
|
+
() => j.value ? "换个关键词或切换到「全部类型」试试,也可以清空筛选查看全部产物" : "对话里生成的文件会收在这里,可以再加回任务继续使用"
|
|
387
|
+
), vt = _(() => j.value ? "清空筛选" : "返回我的文件"), _t = _(
|
|
388
|
+
() => !V.value && (D.value || E.value.length > 0)
|
|
389
|
+
), ve = _(
|
|
390
|
+
() => E.value.some(
|
|
391
|
+
(e) => e.sessions.some((t) => t.files.some((a) => !!a.owner))
|
|
392
|
+
)
|
|
393
|
+
);
|
|
394
|
+
function mt() {
|
|
395
|
+
if (!j.value) {
|
|
396
|
+
A("back");
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
y.value = "", m.value = "全部类型";
|
|
400
|
+
}
|
|
401
|
+
function Ee(e) {
|
|
402
|
+
if (d.value !== e) {
|
|
403
|
+
d.value = e, w.value = e === "name" ? "asc" : "desc";
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
w.value = w.value === "asc" ? "desc" : "asc";
|
|
407
|
+
}
|
|
408
|
+
function Ne(e) {
|
|
409
|
+
return d.value !== e ? "idle" : w.value === "asc" ? "asc" : "desc";
|
|
410
|
+
}
|
|
411
|
+
function ht(e) {
|
|
412
|
+
var l;
|
|
413
|
+
de = performance.now() + Ve;
|
|
414
|
+
const t = new Set(h.value), a = !t.has(e);
|
|
415
|
+
a ? t.add(e) : t.delete(e);
|
|
416
|
+
const n = a ? ((l = Ie.value.find((c) => c.id === e)) == null ? void 0 : l.sessions.length) ?? 0 : te.get(e) ?? 0;
|
|
417
|
+
a ? te.set(e, n) : te.delete(e), T.value = Math.max(K, T.value + (a ? n : -n)), h.value = t, Le();
|
|
418
|
+
}
|
|
419
|
+
function pt(e) {
|
|
420
|
+
const t = new Set(p.value);
|
|
421
|
+
t.has(e) ? t.delete(e) : t.add(e), p.value = t;
|
|
422
|
+
}
|
|
423
|
+
const G = f(null), gt = f("");
|
|
424
|
+
function yt(e, t) {
|
|
425
|
+
gt.value = e, G.value = t;
|
|
426
|
+
}
|
|
427
|
+
function kt(e) {
|
|
428
|
+
const t = Ue(e);
|
|
429
|
+
if (!t) return;
|
|
430
|
+
const a = G.value;
|
|
431
|
+
if (t === "add-task") {
|
|
432
|
+
if (o.actionsDisabled === !0) return;
|
|
433
|
+
a && me([ge(a)]);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const n = Ge(t);
|
|
437
|
+
if (n) {
|
|
438
|
+
if (o.actionsDisabled === !0 || !a) return;
|
|
439
|
+
be(n, [He(a)]);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
const l = ze(e, {
|
|
443
|
+
unavailable: !!o.cloud,
|
|
444
|
+
disabled: o.actionsDisabled === !0
|
|
445
|
+
});
|
|
446
|
+
if (l) {
|
|
447
|
+
if (l.kind === "unavailable") {
|
|
448
|
+
C(l.notice, "warning");
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
l.kind === "notice" && C(l.notice, "warning");
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
function _e() {
|
|
455
|
+
p.value = /* @__PURE__ */ new Set();
|
|
456
|
+
}
|
|
457
|
+
function wt(e) {
|
|
458
|
+
for (const t of Ce())
|
|
459
|
+
for (const a of t.sessions) {
|
|
460
|
+
const n = a.files.findIndex((l) => R(a.id, l.id) === e);
|
|
461
|
+
if (n >= 0) return { groupId: t.id, session: a, index: n };
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function bt(e, t) {
|
|
465
|
+
const a = wt(e);
|
|
466
|
+
if (!a) return;
|
|
467
|
+
const n = Ue(t);
|
|
468
|
+
if (!n) return;
|
|
469
|
+
const l = a.session.files[a.index];
|
|
470
|
+
if (!l) return;
|
|
471
|
+
if (n === "add-task") {
|
|
472
|
+
if (o.actionsDisabled === !0) return;
|
|
473
|
+
me([ge(l)]);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
const c = Ge(n);
|
|
477
|
+
if (c) {
|
|
478
|
+
if (o.actionsDisabled === !0) return;
|
|
479
|
+
be(c, [He(l, a.session)]);
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
const g = ze(t, {
|
|
483
|
+
unavailable: !!o.cloud,
|
|
484
|
+
disabled: o.actionsDisabled === !0
|
|
485
|
+
});
|
|
486
|
+
if (g) {
|
|
487
|
+
if (g.kind === "unavailable") {
|
|
488
|
+
C(g.notice, "warning");
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
g.kind === "notice" && C(g.notice, "warning");
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function me(e) {
|
|
495
|
+
if (e.length !== 0) {
|
|
496
|
+
if (oe) {
|
|
497
|
+
oe(e);
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
A("add-to-task", e), C(oa["add-task"], "success");
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function At() {
|
|
504
|
+
return E.value.flatMap(
|
|
505
|
+
(e) => e.sessions.flatMap(
|
|
506
|
+
(t) => t.files.filter((a) => p.value.has(R(t.id, a.id))).map((a) => ge(a))
|
|
507
|
+
)
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
function Ct() {
|
|
511
|
+
if (o.actionsDisabled === !0) return;
|
|
512
|
+
const e = At();
|
|
513
|
+
if (e.length !== 0) {
|
|
514
|
+
if (!oe) {
|
|
515
|
+
if (o.cloud) {
|
|
516
|
+
C(ia, "warning");
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
C(`已添加 ${re.value} 个文件到任务`, "success"), _e();
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
me(e), _e();
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return he(y, () => {
|
|
526
|
+
o.cloud && (window.clearTimeout(ie), ie = window.setTimeout(() => {
|
|
527
|
+
z("replace");
|
|
528
|
+
}, 300));
|
|
529
|
+
}), It(() => {
|
|
530
|
+
xe(), o.cloud && z();
|
|
531
|
+
}), Mt(() => {
|
|
532
|
+
M == null || M.disconnect(), M = null, window.clearTimeout(ie), window.clearTimeout(ne);
|
|
533
|
+
}), (e, t) => (i(), u("div", {
|
|
534
|
+
class: B(["chat-my-files-artifacts", { "has-selection": re.value > 0 }])
|
|
535
|
+
}, [
|
|
536
|
+
s("div", Ca, [
|
|
537
|
+
s("header", Ta, [
|
|
538
|
+
s("button", {
|
|
539
|
+
class: "chat-my-files-artifacts__back",
|
|
540
|
+
type: "button",
|
|
541
|
+
onClick: t[0] || (t[0] = (a) => A("back"))
|
|
542
|
+
}, [
|
|
543
|
+
s("img", {
|
|
544
|
+
loading: "eager",
|
|
545
|
+
decoding: "async",
|
|
546
|
+
class: "chat-my-files-artifacts__back-glyph",
|
|
547
|
+
src: v(ra),
|
|
548
|
+
alt: ""
|
|
549
|
+
}, null, 8, Fa),
|
|
550
|
+
t[5] || (t[5] = s("span", null, "返回我的文件", -1))
|
|
551
|
+
]),
|
|
552
|
+
S(v(nt), null, {
|
|
553
|
+
"item-icon": ye(({ item: a }) => [
|
|
554
|
+
S(jt, {
|
|
555
|
+
kind: a.id
|
|
556
|
+
}, null, 8, ["kind"])
|
|
557
|
+
]),
|
|
558
|
+
default: ye(() => [
|
|
559
|
+
s("button", Ia, [
|
|
560
|
+
s("span", null, k(m.value), 1),
|
|
561
|
+
s("img", {
|
|
562
|
+
loading: "eager",
|
|
563
|
+
decoding: "async",
|
|
564
|
+
class: "chat-my-files-artifacts__filter-glyph",
|
|
565
|
+
src: v(De),
|
|
566
|
+
alt: ""
|
|
567
|
+
}, null, 8, Ma)
|
|
568
|
+
])
|
|
569
|
+
]),
|
|
570
|
+
_: 1
|
|
571
|
+
}),
|
|
572
|
+
s("label", Sa, [
|
|
573
|
+
s("img", {
|
|
574
|
+
loading: "eager",
|
|
575
|
+
decoding: "async",
|
|
576
|
+
class: "chat-my-files-artifacts__search-glyph",
|
|
577
|
+
src: v(qt),
|
|
578
|
+
alt: ""
|
|
579
|
+
}, null, 8, La),
|
|
580
|
+
St(s("input", {
|
|
581
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => y.value = a),
|
|
582
|
+
type: "search",
|
|
583
|
+
placeholder: "搜索文件、任务或工作空间",
|
|
584
|
+
title: "搜索文件、任务或工作空间"
|
|
585
|
+
}, null, 512), [
|
|
586
|
+
[Lt, y.value]
|
|
587
|
+
])
|
|
588
|
+
])
|
|
589
|
+
]),
|
|
590
|
+
I.value && !x.value && !D.value ? (i(), u("div", xa)) : b("", !0),
|
|
591
|
+
s("div", Ea, [
|
|
592
|
+
_t.value ? (i(), u("div", {
|
|
593
|
+
key: 0,
|
|
594
|
+
class: B(["chat-my-files-artifacts__head", { "has-owner": ve.value }])
|
|
595
|
+
}, [
|
|
596
|
+
s("button", {
|
|
597
|
+
class: "chat-my-files-artifacts__sort chat-my-files-artifacts__sort--name",
|
|
598
|
+
type: "button",
|
|
599
|
+
onClick: t[2] || (t[2] = (a) => Ee("name"))
|
|
600
|
+
}, [
|
|
601
|
+
t[7] || (t[7] = Re(" 名称 ", -1)),
|
|
602
|
+
(i(), u("svg", {
|
|
603
|
+
class: B(["chat-my-files-artifacts__sort-glyph", `is-${Ne("name")}`]),
|
|
604
|
+
viewBox: "0 0 20 20",
|
|
605
|
+
"aria-hidden": "true"
|
|
606
|
+
}, [...t[6] || (t[6] = [
|
|
607
|
+
s("path", {
|
|
608
|
+
class: "up",
|
|
609
|
+
d: "M10 3.5 13.5 8H6.5Z"
|
|
610
|
+
}, null, -1),
|
|
611
|
+
s("path", {
|
|
612
|
+
class: "down",
|
|
613
|
+
d: "M10 16.5 6.5 12h7Z"
|
|
614
|
+
}, null, -1)
|
|
615
|
+
])], 2))
|
|
616
|
+
]),
|
|
617
|
+
t[10] || (t[10] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--kind" }, "类型", -1)),
|
|
618
|
+
ve.value ? (i(), u("span", Na, "更新人")) : b("", !0),
|
|
619
|
+
s("button", {
|
|
620
|
+
class: "chat-my-files-artifacts__sort chat-my-files-artifacts__sort--time",
|
|
621
|
+
type: "button",
|
|
622
|
+
onClick: t[3] || (t[3] = (a) => Ee("updatedAt"))
|
|
623
|
+
}, [
|
|
624
|
+
t[9] || (t[9] = Re(" 更新时间 ", -1)),
|
|
625
|
+
(i(), u("svg", {
|
|
626
|
+
class: B(["chat-my-files-artifacts__sort-glyph", `is-${Ne("updatedAt")}`]),
|
|
627
|
+
viewBox: "0 0 20 20",
|
|
628
|
+
"aria-hidden": "true"
|
|
629
|
+
}, [...t[8] || (t[8] = [
|
|
630
|
+
s("path", {
|
|
631
|
+
class: "up",
|
|
632
|
+
d: "M10 3.5 13.5 8H6.5Z"
|
|
633
|
+
}, null, -1),
|
|
634
|
+
s("path", {
|
|
635
|
+
class: "down",
|
|
636
|
+
d: "M10 16.5 6.5 12h7Z"
|
|
637
|
+
}, null, -1)
|
|
638
|
+
])], 2))
|
|
639
|
+
]),
|
|
640
|
+
t[11] || (t[11] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--size" }, "大小", -1)),
|
|
641
|
+
t[12] || (t[12] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--action" }, "操作", -1))
|
|
642
|
+
], 2)) : b("", !0),
|
|
643
|
+
s("div", {
|
|
644
|
+
ref_key: "bodyRef",
|
|
645
|
+
ref: ae,
|
|
646
|
+
class: "chat-my-files-artifacts__body"
|
|
647
|
+
}, [
|
|
648
|
+
D.value ? (i(), u("div", $a, [
|
|
649
|
+
S(Ke, {
|
|
650
|
+
"group-head": "",
|
|
651
|
+
blocks: 2,
|
|
652
|
+
rows: 3
|
|
653
|
+
}),
|
|
654
|
+
t[13] || (t[13] = s("p", {
|
|
655
|
+
class: "chat-my-files-artifacts__sr-only",
|
|
656
|
+
role: "status"
|
|
657
|
+
}, "正在加载 AI 产物", -1))
|
|
658
|
+
])) : V.value ? (i(), q(Pe, {
|
|
659
|
+
key: 1,
|
|
660
|
+
class: "chat-my-files-artifacts__state",
|
|
661
|
+
tone: "error",
|
|
662
|
+
variant: "error",
|
|
663
|
+
title: "产物加载失败",
|
|
664
|
+
description: V.value,
|
|
665
|
+
"action-text": "重新加载",
|
|
666
|
+
onAction: tt
|
|
667
|
+
}, null, 8, ["description"])) : E.value.length ? b("", !0) : (i(), q(Pe, {
|
|
668
|
+
key: 2,
|
|
669
|
+
class: "chat-my-files-artifacts__state",
|
|
670
|
+
variant: j.value ? "search" : "files",
|
|
671
|
+
title: dt.value,
|
|
672
|
+
description: ft.value,
|
|
673
|
+
"action-text": vt.value,
|
|
674
|
+
onAction: mt
|
|
675
|
+
}, null, 8, ["variant", "title", "description", "action-text"])),
|
|
676
|
+
(i(!0), u(Y, null, J(Ie.value, (a) => (i(), u("section", {
|
|
677
|
+
key: a.id,
|
|
678
|
+
class: "chat-my-files-artifacts__group"
|
|
679
|
+
}, [
|
|
680
|
+
s("button", {
|
|
681
|
+
class: "chat-my-files-artifacts__group-head",
|
|
682
|
+
type: "button",
|
|
683
|
+
"aria-expanded": !h.value.has(a.id),
|
|
684
|
+
onClick: (n) => ht(a.id)
|
|
685
|
+
}, [
|
|
686
|
+
s("img", {
|
|
687
|
+
loading: "lazy",
|
|
688
|
+
decoding: "async",
|
|
689
|
+
class: B(["chat-my-files-artifacts__chevron", { "is-open": !h.value.has(a.id) }]),
|
|
690
|
+
src: v(De),
|
|
691
|
+
alt: ""
|
|
692
|
+
}, null, 10, Ba),
|
|
693
|
+
s("span", Da, k(a.name), 1),
|
|
694
|
+
s("em", Pa, k(a.taskCount) + "个任务", 1)
|
|
695
|
+
], 8, Ra),
|
|
696
|
+
s("div", {
|
|
697
|
+
class: B(["chat-my-files-artifacts__group-body", { "is-collapsed": h.value.has(a.id) }]),
|
|
698
|
+
inert: h.value.has(a.id) || void 0
|
|
699
|
+
}, [
|
|
700
|
+
s("div", Ua, [
|
|
701
|
+
(i(!0), u(Y, null, J(a.sessions, (n, l) => (i(), u("div", {
|
|
702
|
+
key: n.id,
|
|
703
|
+
class: "chat-my-files-artifacts__task",
|
|
704
|
+
style: Q({ "--mf-stagger": l })
|
|
705
|
+
}, [
|
|
706
|
+
s("div", Ha, [
|
|
707
|
+
s("img", {
|
|
708
|
+
loading: "lazy",
|
|
709
|
+
decoding: "async",
|
|
710
|
+
class: "chat-my-files-artifacts__spark",
|
|
711
|
+
src: v(Qt),
|
|
712
|
+
alt: ""
|
|
713
|
+
}, null, 8, za),
|
|
714
|
+
s("span", {
|
|
715
|
+
title: n.title
|
|
716
|
+
}, k(n.title), 9, Ga)
|
|
717
|
+
]),
|
|
718
|
+
(i(!0), u(Y, null, J(n.files, (c) => (i(), q(ga, {
|
|
719
|
+
key: v(R)(n.id, c.id),
|
|
720
|
+
file: c,
|
|
721
|
+
selected: p.value.has(v(R)(n.id, c.id)),
|
|
722
|
+
"show-owner": ve.value,
|
|
723
|
+
"actions-disabled": r.actionsDisabled,
|
|
724
|
+
onToggle: (g) => pt(v(R)(n.id, c.id)),
|
|
725
|
+
onOpen: (g) => yt(v(R)(n.id, c.id), c),
|
|
726
|
+
onAction: (g) => bt(v(R)(n.id, c.id), g)
|
|
727
|
+
}, null, 8, ["file", "selected", "show-owner", "actions-disabled", "onToggle", "onOpen", "onAction"]))), 128)),
|
|
728
|
+
r.cloud && n.hasMore ? (i(), u("button", {
|
|
729
|
+
key: 0,
|
|
730
|
+
class: "chat-my-files-artifacts__more",
|
|
731
|
+
type: "button",
|
|
732
|
+
"data-testid": "artifact-file-more",
|
|
733
|
+
disabled: U.value.has(n.id),
|
|
734
|
+
"aria-busy": U.value.has(n.id),
|
|
735
|
+
onClick: (c) => at(n.id)
|
|
736
|
+
}, k(U.value.has(n.id) ? "加载中" : et(n)), 9, Ka)) : b("", !0)
|
|
737
|
+
], 4))), 128))
|
|
738
|
+
])
|
|
739
|
+
], 10, Oa)
|
|
740
|
+
]))), 128)),
|
|
741
|
+
r.cloud && ue.value && !D.value ? (i(), u("div", {
|
|
742
|
+
key: 3,
|
|
743
|
+
ref_key: "sentinelRef",
|
|
744
|
+
ref: se,
|
|
745
|
+
class: B(["chat-my-files-artifacts__sentinel", { "is-loading": x.value }])
|
|
746
|
+
}, [
|
|
747
|
+
s("div", Va, [
|
|
748
|
+
x.value ? (i(), q(Ke, {
|
|
749
|
+
key: 0,
|
|
750
|
+
blocks: 1,
|
|
751
|
+
rows: 1
|
|
752
|
+
})) : b("", !0)
|
|
753
|
+
])
|
|
754
|
+
], 2)) : b("", !0),
|
|
755
|
+
s("p", Za, k(x.value ? "正在加载更多 AI 产物" : ""), 1),
|
|
756
|
+
r.cloud && ue.value && !D.value && ut.value ? (i(), u("button", {
|
|
757
|
+
key: 4,
|
|
758
|
+
class: "chat-my-files-artifacts__sessions-more",
|
|
759
|
+
type: "button",
|
|
760
|
+
"data-testid": "artifact-session-more",
|
|
761
|
+
disabled: I.value && !P.value,
|
|
762
|
+
"aria-busy": x.value,
|
|
763
|
+
onClick: ct
|
|
764
|
+
}, k(x.value ? "加载中" : X.value ? "重新加载" : P.value ? "显示更多任务" : "加载更多会话"), 9, Wa)) : b("", !0)
|
|
765
|
+
], 512)
|
|
766
|
+
]),
|
|
767
|
+
S(Yt, {
|
|
768
|
+
count: re.value,
|
|
769
|
+
onClear: _e,
|
|
770
|
+
onAddTask: Ct
|
|
771
|
+
}, null, 8, ["count"]),
|
|
772
|
+
G.value ? (i(), q(Jt, {
|
|
773
|
+
key: G.value.id,
|
|
774
|
+
file: G.value,
|
|
775
|
+
cloud: r.cloud,
|
|
776
|
+
"actions-disabled": r.actionsDisabled,
|
|
777
|
+
onClose: t[4] || (t[4] = (a) => G.value = null),
|
|
778
|
+
onAction: kt
|
|
779
|
+
}, null, 8, ["file", "cloud", "actions-disabled"])) : b("", !0),
|
|
780
|
+
S(Xt, {
|
|
781
|
+
source: v(je),
|
|
782
|
+
open: v(qe),
|
|
783
|
+
mode: "target",
|
|
784
|
+
title: v(Ye),
|
|
785
|
+
busy: v(Qe),
|
|
786
|
+
"onUpdate:open": v(Xe),
|
|
787
|
+
onConfirm: v(Je)
|
|
788
|
+
}, null, 8, ["source", "open", "title", "busy", "onUpdate:open", "onConfirm"])
|
|
789
|
+
])
|
|
790
|
+
], 2));
|
|
791
|
+
}
|
|
792
|
+
}), Xa = /* @__PURE__ */ we(qa, [["__scopeId", "data-v-13517c8c"]]);
|
|
793
|
+
export {
|
|
794
|
+
Xa as default
|
|
795
|
+
};
|