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