@deep-eye/core 1.3.87 → 1.3.92
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 +60 -0
- package/README.md +1 -1
- package/dist/{ChartRenderer-D5smoPbl.cjs → ChartRenderer-C-VIJhAF.cjs} +1 -1
- package/dist/{ChartRenderer-lJ5Zz8gr.js → ChartRenderer-Dnn93qXe.js} +1 -1
- package/dist/ChatMyFilesArtifacts-D8y6rXj9.cjs +1 -0
- package/dist/ChatMyFilesArtifacts-v4FBo0Nl.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/document-viewer/DocViewerToolbar.vue.d.ts +1 -1
- package/dist/components/chat/components/document-viewer/DocViewerToolbar.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/ChatMyFilesFolder.vue.d.ts +12 -2
- package/dist/components/chat/components/files/ChatMyFilesFolder.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/mdoc/MediaImageLightbox.vue.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-DGy9Ky36.js → docx-preview-C4GOSOYq.js} +1 -1
- package/dist/{docx-preview-DnSEXqsD.cjs → docx-preview-CeKeKeNi.cjs} +1 -1
- package/dist/{index-QH1oDPuS.js → index-BO8yexQn.js} +1 -1
- package/dist/index-CdNPCEAx.cjs +1467 -0
- package/dist/{index-BqQ5eE7K.cjs → index-DPvXQrbH.cjs} +1 -1
- package/dist/{index-BjoCM559.js → index-qh7CZhyQ.js} +31453 -28647
- package/dist/index.cjs +1 -1
- package/dist/index.js +645 -610
- package/dist/{papaparse.min-DXbU8MEz.js → papaparse.min-DAhC56MW.js} +15 -15
- package/dist/{papaparse.min-V_TidkCa.cjs → papaparse.min-DKHAXm6C.cjs} +1 -1
- 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
|
@@ -1,1013 +0,0 @@
|
|
|
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
|
-
import "@vueuse/core";
|
|
3
|
-
import { u as lt, c as nt, a as Re, A as ot, b as it, d as rt, e as ct, f as ut, C as Kt, g as Vt, h as dt, _ as be, i as ge, j as Zt, k as qt, l as Wt, m as jt, n as Yt, r as Qt, o as Jt, p as Xt, q as ea, s as ta, t as Ze, v as aa, w as sa, x as la, y as na, z as oa, B as ia, D as ra, K as ca, E as qe, F as V, G as We, H as ua, I as da, J as je, L as fa, M as va, N as _a, O as ma, P as ha, Q as Ye, R as $e, S as pa, T as ya, U as wa, V as ga, W as Qe, X as Je, Y as Xe, Z as et, $ as ka, a0 as ba } from "./index-BjoCM559.js";
|
|
4
|
-
const Ca = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20viewBox='0%200%2024.0%2024.0'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cclipPath%20id='i0'%3e%3cpath%20d='M2000,0%20L2000,4212%20L0,4212%20L0,0%20L2000,0%20Z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='translate(-157.0%20-2549.0)'%3e%3cg%20clip-path='url(%23i0)'%3e%3cg%20transform='translate(145.0%202545.0)'%3e%3cg%20transform='translate(12.0%204.0)'%3e%3cg%20transform='translate(24.0%2024.0)%20rotate(90.0)%20scale(-1.0%201.0)'%3e%3cg%20transform='translate(17.5%209.5)%20rotate(90.00000000000001)'%3e%3cpath%20d='M0,0%20L5,5%20L0,10'%20stroke='currentColor'%20stroke-width='1.8'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ta = { class: "chat-artifact-row__lead" }, Aa = { class: "chat-artifact-row__name" }, xa = ["title"], Fa = { class: "chat-artifact-row__meta" }, Ia = { class: "chat-artifact-row__cell chat-artifact-row__cell--kind" }, Sa = ["title"], Ma = { class: "chat-artifact-row__cell chat-artifact-row__cell--time" }, La = { class: "chat-artifact-row__cell chat-artifact-row__cell--size" }, Ea = /* @__PURE__ */ ke({
|
|
5
|
-
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: $ }) {
|
|
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") {
|
|
28
|
-
if (n.actionsDisabled) return;
|
|
29
|
-
n.file.url && ut(n.file.url, n.file.name);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
C("action", m);
|
|
33
|
-
}
|
|
34
|
-
}), p = d(
|
|
35
|
-
() => [n.file.kind, n.file.updatedLabel, n.file.sizeLabel].filter(Boolean).join(" · ")
|
|
36
|
-
);
|
|
37
|
-
return (m, y) => (i(), f("div", {
|
|
38
|
-
class: U(["chat-artifact-row", { "is-selected": r.selected, "has-owner": r.showOwner }]),
|
|
39
|
-
onClick: y[3] || (y[3] = (B) => C("toggle"))
|
|
40
|
-
}, [
|
|
41
|
-
s("span", Ta, [
|
|
42
|
-
x(Kt, {
|
|
43
|
-
class: "chat-artifact-row__check",
|
|
44
|
-
checked: r.selected,
|
|
45
|
-
label: r.selected ? "取消选择" : "选择文件",
|
|
46
|
-
onToggle: y[0] || (y[0] = (B) => C("toggle"))
|
|
47
|
-
}, null, 8, ["checked", "label"]),
|
|
48
|
-
x(Vt, {
|
|
49
|
-
ext: r.file.ext,
|
|
50
|
-
name: r.file.name
|
|
51
|
-
}, null, 8, ["ext", "name"])
|
|
52
|
-
]),
|
|
53
|
-
s("span", Aa, [
|
|
54
|
-
s("button", {
|
|
55
|
-
class: "chat-artifact-row__title",
|
|
56
|
-
type: "button",
|
|
57
|
-
title: r.file.name,
|
|
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)
|
|
61
|
-
]),
|
|
62
|
-
s("span", Ia, A(r.file.kind), 1),
|
|
63
|
-
r.showOwner ? (i(), f("span", {
|
|
64
|
-
key: 0,
|
|
65
|
-
class: "chat-artifact-row__cell chat-artifact-row__cell--owner",
|
|
66
|
-
title: r.file.owner || ""
|
|
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, {
|
|
73
|
-
class: "chat-artifact-row__more",
|
|
74
|
-
"data-testid": "artifact-row-more",
|
|
75
|
-
loading: "lazy",
|
|
76
|
-
decoding: "async",
|
|
77
|
-
onClick: y[2] || (y[2] = Ke(() => {
|
|
78
|
-
}, ["stop"]))
|
|
79
|
-
})
|
|
80
|
-
]),
|
|
81
|
-
_: 1
|
|
82
|
-
})
|
|
83
|
-
], 2));
|
|
84
|
-
}
|
|
85
|
-
}), Pa = /* @__PURE__ */ be(Ea, [["__scopeId", "data-v-c9c7f7c8"]]), $a = ["aria-label"], Ra = { class: "chat-artifact-preview__body" }, Ba = {
|
|
86
|
-
key: 3,
|
|
87
|
-
class: "chat-artifact-preview__empty"
|
|
88
|
-
}, Da = /* @__PURE__ */ ke({
|
|
89
|
-
name: "ChatArtifactPreview",
|
|
90
|
-
__name: "ChatArtifactPreview",
|
|
91
|
-
props: {
|
|
92
|
-
file: {},
|
|
93
|
-
cloud: { default: void 0 },
|
|
94
|
-
actionsDisabled: { type: Boolean, default: !1 },
|
|
95
|
-
onlyofficeProfile: { default: "preview" }
|
|
96
|
-
},
|
|
97
|
-
emits: ["close", "action"],
|
|
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,
|
|
110
|
-
/* 弹框本体 z-index 3000,菜单面板必须盖在它之上。 */
|
|
111
|
-
zIndex: 3100,
|
|
112
|
-
onItemClick: ({ id: u }) => {
|
|
113
|
-
if (u.split(":").at(-1) === "download") {
|
|
114
|
-
te();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
C("action", u);
|
|
118
|
-
}
|
|
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;
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
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() {
|
|
140
|
-
if (q.value) {
|
|
141
|
-
try {
|
|
142
|
-
await navigator.clipboard.writeText(q.value);
|
|
143
|
-
} catch {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
W.value = !0, clearTimeout(oe), oe = setTimeout(() => {
|
|
147
|
-
W.value = !1;
|
|
148
|
-
}, 1600);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
const S = d(
|
|
152
|
-
() => [
|
|
153
|
-
n.file.kind,
|
|
154
|
-
ne.value && ee.value ? `${ee.value} 行` : "",
|
|
155
|
-
n.file.sizeLabel
|
|
156
|
-
].filter(Boolean).join(" · ")
|
|
157
|
-
), F = d(() => Wt(Ce.value)), j = d(() => jt(n.file)), M = d(() => !!Z.value && !F.value);
|
|
158
|
-
de(
|
|
159
|
-
() => [n.file.id, n.file.url],
|
|
160
|
-
() => void B()
|
|
161
|
-
);
|
|
162
|
-
const H = c(), re = c();
|
|
163
|
-
let L = null;
|
|
164
|
-
const Y = Yt();
|
|
165
|
-
de(
|
|
166
|
-
() => n.file.id,
|
|
167
|
-
() => {
|
|
168
|
-
Qt(Y), q.value = "", ee.value = 0, W.value = !1;
|
|
169
|
-
}
|
|
170
|
-
);
|
|
171
|
-
const O = c(!1), T = c(!1);
|
|
172
|
-
let Q = !1;
|
|
173
|
-
function E() {
|
|
174
|
-
Q || (Q = !0, O.value = !1);
|
|
175
|
-
}
|
|
176
|
-
function D() {
|
|
177
|
-
Q && C("close");
|
|
178
|
-
}
|
|
179
|
-
function te() {
|
|
180
|
-
var J;
|
|
181
|
-
const u = (J = p.value) == null ? void 0 : J.url;
|
|
182
|
-
u && ut(u, n.file.name);
|
|
183
|
-
}
|
|
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;
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
E();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return st(() => {
|
|
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();
|
|
200
|
-
});
|
|
201
|
-
}), Nt(() => {
|
|
202
|
-
L == null || L.focus(), L = null, clearTimeout(oe);
|
|
203
|
-
}), (u, J) => (i(), P(Ut, { to: "body" }, [
|
|
204
|
-
x(Ht, {
|
|
205
|
-
name: "cap-drawer",
|
|
206
|
-
onAfterLeave: D
|
|
207
|
-
}, {
|
|
208
|
-
default: le(() => [
|
|
209
|
-
O.value ? (i(), f("div", {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: U(["chat-artifact-preview", { "is-expanded": T.value }]),
|
|
212
|
-
onKeydown: Ae
|
|
213
|
-
}, [
|
|
214
|
-
s("div", {
|
|
215
|
-
class: "chat-artifact-preview__backdrop",
|
|
216
|
-
onClick: E
|
|
217
|
-
}),
|
|
218
|
-
s("section", {
|
|
219
|
-
ref_key: "panelRef",
|
|
220
|
-
ref: H,
|
|
221
|
-
class: "chat-artifact-preview__panel",
|
|
222
|
-
role: "dialog",
|
|
223
|
-
"aria-modal": "true",
|
|
224
|
-
"aria-label": `${r.file.name} 预览`
|
|
225
|
-
}, [
|
|
226
|
-
x(Jt, {
|
|
227
|
-
ref_key: "headerRef",
|
|
228
|
-
ref: re,
|
|
229
|
-
class: "chat-artifact-preview__header",
|
|
230
|
-
name: r.file.name,
|
|
231
|
-
ext: r.file.ext,
|
|
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,
|
|
238
|
-
"show-fullscreen": "",
|
|
239
|
-
onDownload: te,
|
|
240
|
-
onCopy: ie,
|
|
241
|
-
onFullscreen: _e,
|
|
242
|
-
onClose: E
|
|
243
|
-
}, {
|
|
244
|
-
actions: le(() => [
|
|
245
|
-
x(h(v), null, {
|
|
246
|
-
default: le(() => [
|
|
247
|
-
x(dt, {
|
|
248
|
-
class: "chat-artifact-preview__more",
|
|
249
|
-
loading: "eager",
|
|
250
|
-
decoding: "async"
|
|
251
|
-
})
|
|
252
|
-
]),
|
|
253
|
-
_: 1
|
|
254
|
-
})
|
|
255
|
-
]),
|
|
256
|
-
_: 1
|
|
257
|
-
}, 8, ["name", "ext", "meta", "chrome", "show-download", "fullscreen", "show-copy", "copied"]),
|
|
258
|
-
s("div", Ra, [
|
|
259
|
-
m.value ? (i(), P(Xt, {
|
|
260
|
-
key: 0,
|
|
261
|
-
label: "正在加载文件"
|
|
262
|
-
})) : M.value && ne.value ? (i(), P(ea, {
|
|
263
|
-
key: 1,
|
|
264
|
-
src: Z.value,
|
|
265
|
-
onLoaded: Te
|
|
266
|
-
}, null, 8, ["src"])) : M.value ? (i(), P(ta, {
|
|
267
|
-
key: 2,
|
|
268
|
-
class: "chat-artifact-preview__viewer",
|
|
269
|
-
resource: b.value,
|
|
270
|
-
"onlyoffice-profile": r.onlyofficeProfile,
|
|
271
|
-
"screenshot-ask": !1,
|
|
272
|
-
"hide-close": "",
|
|
273
|
-
"hide-download": "",
|
|
274
|
-
"hide-fullscreen": "",
|
|
275
|
-
"hide-sidebar": "",
|
|
276
|
-
"hide-image-controls": ""
|
|
277
|
-
}, null, 8, ["resource", "onlyoffice-profile"])) : (i(), f("div", Ba, [
|
|
278
|
-
F.value ? (i(), P(Ze, {
|
|
279
|
-
key: 0,
|
|
280
|
-
ext: r.file.ext,
|
|
281
|
-
name: r.file.name,
|
|
282
|
-
description: j.value,
|
|
283
|
-
download: !!Z.value,
|
|
284
|
-
"secondary-label": Z.value ? void 0 : "返回列表",
|
|
285
|
-
onDownload: te,
|
|
286
|
-
onSecondary: E
|
|
287
|
-
}, null, 8, ["ext", "name", "description", "download", "secondary-label"])) : (i(), P(Ze, {
|
|
288
|
-
key: 1,
|
|
289
|
-
title: "暂时无法预览",
|
|
290
|
-
description: "未能获取该文件的预览地址,可稍后重试,或返回列表用其他方式打开。",
|
|
291
|
-
"secondary-label": "返回列表",
|
|
292
|
-
onSecondary: E
|
|
293
|
-
}))
|
|
294
|
-
]))
|
|
295
|
-
])
|
|
296
|
-
], 8, $a)
|
|
297
|
-
], 34)) : I("", !0)
|
|
298
|
-
]),
|
|
299
|
-
_: 1
|
|
300
|
-
})
|
|
301
|
-
]));
|
|
302
|
-
}
|
|
303
|
-
}), Na = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-d66b7d72"]]), Ua = {
|
|
304
|
-
class: "art-skeleton",
|
|
305
|
-
"aria-hidden": "true"
|
|
306
|
-
}, Ha = {
|
|
307
|
-
key: 0,
|
|
308
|
-
class: "art-skeleton__group"
|
|
309
|
-
}, Oa = { class: "art-skeleton__task" }, za = { class: "art-skeleton__name" }, Ga = /* @__PURE__ */ ke({
|
|
310
|
-
name: "ChatArtifactsSkeleton",
|
|
311
|
-
__name: "ChatArtifactsSkeleton",
|
|
312
|
-
props: {
|
|
313
|
-
blocks: { default: 2 },
|
|
314
|
-
rows: { default: 2 },
|
|
315
|
-
groupHead: { type: Boolean, default: !1 }
|
|
316
|
-
},
|
|
317
|
-
setup(r) {
|
|
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] = [
|
|
321
|
-
s("span", { class: "mf-skeleton-row art-skeleton__chevron" }, null, -1),
|
|
322
|
-
s("span", { class: "mf-skeleton-row art-skeleton__group-name" }, null, -1),
|
|
323
|
-
s("span", { class: "mf-skeleton-row art-skeleton__group-count" }, null, -1)
|
|
324
|
-
])])) : I("", !0),
|
|
325
|
-
(i(!0), f(fe, null, ve(r.blocks, (p) => (i(), f("div", {
|
|
326
|
-
key: p,
|
|
327
|
-
class: "art-skeleton__block"
|
|
328
|
-
}, [
|
|
329
|
-
s("div", Oa, [
|
|
330
|
-
v[1] || (v[1] = s("span", { class: "mf-skeleton-row art-skeleton__spark" }, null, -1)),
|
|
331
|
-
s("span", {
|
|
332
|
-
class: "mf-skeleton-row art-skeleton__task-name",
|
|
333
|
-
style: ue({ width: $[(p + 1) % $.length] })
|
|
334
|
-
}, null, 4)
|
|
335
|
-
]),
|
|
336
|
-
(i(!0), f(fe, null, ve(r.rows, (m) => (i(), f("div", {
|
|
337
|
-
key: m,
|
|
338
|
-
class: "art-skeleton__row"
|
|
339
|
-
}, [
|
|
340
|
-
v[3] || (v[3] = s("span", { class: "art-skeleton__lead" }, [
|
|
341
|
-
s("span", { class: "mf-skeleton-row art-skeleton__icon" })
|
|
342
|
-
], -1)),
|
|
343
|
-
s("span", za, [
|
|
344
|
-
s("span", {
|
|
345
|
-
class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--name",
|
|
346
|
-
style: ue({ width: C(m - 1) })
|
|
347
|
-
}, null, 4),
|
|
348
|
-
v[2] || (v[2] = s("span", { class: "mf-skeleton-row art-skeleton__bar art-skeleton__bar--meta" }, null, -1))
|
|
349
|
-
]),
|
|
350
|
-
s("span", {
|
|
351
|
-
class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--kind",
|
|
352
|
-
style: ue({ width: g(m) })
|
|
353
|
-
}, null, 4),
|
|
354
|
-
s("span", {
|
|
355
|
-
class: "mf-skeleton-row art-skeleton__cell art-skeleton__cell--time",
|
|
356
|
-
style: ue({ width: g(m + 1) })
|
|
357
|
-
}, null, 4),
|
|
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))
|
|
360
|
-
]))), 128))
|
|
361
|
-
]))), 128))
|
|
362
|
-
]));
|
|
363
|
-
}
|
|
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 = {
|
|
365
|
-
class: "chat-my-files-artifacts__filter",
|
|
366
|
-
type: "button"
|
|
367
|
-
}, Wa = ["src"], ja = { class: "chat-my-files-artifacts__search" }, Ya = ["src"], Qa = {
|
|
368
|
-
key: 0,
|
|
369
|
-
class: "chat-my-files-artifacts__progress",
|
|
370
|
-
role: "status",
|
|
371
|
-
"aria-label": "正在加载 AI 产物"
|
|
372
|
-
}, Ja = { class: "chat-my-files-artifacts__table" }, Xa = {
|
|
373
|
-
key: 0,
|
|
374
|
-
class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--owner"
|
|
375
|
-
}, es = {
|
|
376
|
-
key: 0,
|
|
377
|
-
class: "chat-my-files-artifacts__skeleton",
|
|
378
|
-
"data-testid": "artifact-first-load",
|
|
379
|
-
"aria-busy": "true"
|
|
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 = {
|
|
381
|
-
class: "chat-my-files-artifacts__sr-only",
|
|
382
|
-
role: "status"
|
|
383
|
-
}, vs = ["disabled", "aria-busy"], se = 6, _s = 3, at = 400, ms = /* @__PURE__ */ ke({
|
|
384
|
-
name: "ChatMyFilesArtifacts",
|
|
385
|
-
__name: "ChatMyFilesArtifacts",
|
|
386
|
-
props: {
|
|
387
|
-
cloud: {},
|
|
388
|
-
actionsDisabled: { type: Boolean }
|
|
389
|
-
},
|
|
390
|
-
emits: ["back", "add-to-task"],
|
|
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
|
|
404
|
-
} = na({
|
|
405
|
-
getCloud: () => n.cloud,
|
|
406
|
-
flash: b,
|
|
407
|
-
sources: () => Z.transferSources.value,
|
|
408
|
-
/* 与「我的资料」页共用同一块任务面板(模块级单例队列)。 */
|
|
409
|
-
board: oa()
|
|
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;
|
|
415
|
-
}
|
|
416
|
-
function _e(e, t) {
|
|
417
|
-
const a = new Set(H.value);
|
|
418
|
-
t ? a.add(e) : a.delete(e), H.value = a;
|
|
419
|
-
}
|
|
420
|
-
function Ae(e) {
|
|
421
|
-
const t = (e.productCount ?? 0) - e.files.length;
|
|
422
|
-
return t > 0 ? `还有 ${t} 个` : "加载更多";
|
|
423
|
-
}
|
|
424
|
-
async function u(e = "replace") {
|
|
425
|
-
const t = n.cloud;
|
|
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";
|
|
429
|
-
try {
|
|
430
|
-
const o = await ha(t, {
|
|
431
|
-
page: l,
|
|
432
|
-
pageSize: Ye,
|
|
433
|
-
search: g.value.trim()
|
|
434
|
-
});
|
|
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);
|
|
442
|
-
} catch (o) {
|
|
443
|
-
if (a !== T) return;
|
|
444
|
-
const _ = o instanceof Error ? o.message : "产物加载失败";
|
|
445
|
-
S.value.length ? e === "append" && (Y.value = !0) : j.value = _, b(_, "error");
|
|
446
|
-
} finally {
|
|
447
|
-
a === T && (F.value = !1, M.value = !1, Me());
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
function J() {
|
|
451
|
-
u("replace");
|
|
452
|
-
}
|
|
453
|
-
async function ft(e) {
|
|
454
|
-
const t = n.cloud;
|
|
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);
|
|
460
|
-
try {
|
|
461
|
-
let o = O.value[e] ?? 1, _ = 0;
|
|
462
|
-
for (; _ < 5; ) {
|
|
463
|
-
_ += 1;
|
|
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);
|
|
467
|
-
if (S.value = K.groups, o += 1, O.value = { ...O.value, [e]: o }, K.added > 0 || !K.hasMore) break;
|
|
468
|
-
}
|
|
469
|
-
} catch (o) {
|
|
470
|
-
if (E.get(e) !== a) return;
|
|
471
|
-
b(o instanceof Error ? o.message : "产物加载失败", "error");
|
|
472
|
-
} finally {
|
|
473
|
-
E.get(e) === a && _e(e, !1);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
const vt = ra(qe), { Menu: _t } = Re({
|
|
477
|
-
items: vt,
|
|
478
|
-
placement: "bottom-start",
|
|
479
|
-
width: 140,
|
|
480
|
-
selectedId: w,
|
|
481
|
-
panelClass: ca,
|
|
482
|
-
onItemClick: ({ id: e }) => {
|
|
483
|
-
mt(e) && (w.value = e);
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
function mt(e) {
|
|
487
|
-
return qe.includes(e);
|
|
488
|
-
}
|
|
489
|
-
function ht(e) {
|
|
490
|
-
if (!v.value) return e;
|
|
491
|
-
const t = p.value === "asc" ? 1 : -1;
|
|
492
|
-
return [...e].sort((a, l) => v.value === "name" ? a.name.localeCompare(l.name, "zh") * t : (a.updatedAt - l.updatedAt) * t);
|
|
493
|
-
}
|
|
494
|
-
const z = d(() => {
|
|
495
|
-
const e = n.cloud ? "" : g.value.trim().toLowerCase();
|
|
496
|
-
return te().map((t) => {
|
|
497
|
-
const a = !!e && t.name.toLowerCase().includes(e), l = t.sessions.map((o) => {
|
|
498
|
-
const _ = !!e && o.title.toLowerCase().includes(e), k = ht(
|
|
499
|
-
o.files.filter((K) => {
|
|
500
|
-
const Rt = w.value === "全部类型" || K.kind === w.value, Bt = !e || K.name.toLowerCase().includes(e);
|
|
501
|
-
return Rt && (a || _ || Bt);
|
|
502
|
-
})
|
|
503
|
-
);
|
|
504
|
-
return { ...o, files: k };
|
|
505
|
-
}).filter((o) => o.files.length > 0 || o.hasMore === !0);
|
|
506
|
-
return {
|
|
507
|
-
...t,
|
|
508
|
-
taskCount: t.taskCount ?? t.sessions.length,
|
|
509
|
-
sessions: l
|
|
510
|
-
};
|
|
511
|
-
}).filter((t) => t.sessions.length > 0);
|
|
512
|
-
}), pt = d(
|
|
513
|
-
() => z.value.flatMap(
|
|
514
|
-
(e) => e.sessions.flatMap((t) => t.files.map((a) => V(t.id, a.id)))
|
|
515
|
-
)
|
|
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(
|
|
521
|
-
() => z.value.reduce((e, t) => e + t.sessions.length, 0)
|
|
522
|
-
), X = d(() => Be.value > R.value), De = d(() => {
|
|
523
|
-
if (!X.value) return z.value;
|
|
524
|
-
let e = R.value;
|
|
525
|
-
const t = [];
|
|
526
|
-
for (const a of z.value) {
|
|
527
|
-
if (e <= 0) break;
|
|
528
|
-
const l = a.sessions.slice(0, e);
|
|
529
|
-
e -= l.length, t.push({ ...a, sessions: l });
|
|
530
|
-
}
|
|
531
|
-
return t;
|
|
532
|
-
});
|
|
533
|
-
function Ne() {
|
|
534
|
-
!n.cloud || !G || !L.value || F.value || D.value || Be.value - R.value > _s || u("append");
|
|
535
|
-
}
|
|
536
|
-
let we = 1;
|
|
537
|
-
function yt() {
|
|
538
|
-
if (we > 0)
|
|
539
|
-
return we -= 1, !0;
|
|
540
|
-
const e = he.value, t = pe.value;
|
|
541
|
-
if (!e || !t) return !1;
|
|
542
|
-
const a = t.getBoundingClientRect(), l = e.getBoundingClientRect();
|
|
543
|
-
return a.top < l.bottom && a.bottom > l.top;
|
|
544
|
-
}
|
|
545
|
-
function Ue() {
|
|
546
|
-
if (G) {
|
|
547
|
-
if (X.value) {
|
|
548
|
-
R.value += se;
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
L.value && !F.value && !D.value && yt() && u("append");
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
function wt() {
|
|
555
|
-
if (X.value) {
|
|
556
|
-
R.value += se;
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
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;
|
|
567
|
-
if (!e || !t) return;
|
|
568
|
-
const a = e.getBoundingClientRect(), l = t.getBoundingClientRect();
|
|
569
|
-
a.top < l.bottom + 240 && a.bottom > l.top - 240 && Ue();
|
|
570
|
-
}));
|
|
571
|
-
}
|
|
572
|
-
function He() {
|
|
573
|
-
window.clearTimeout(ye), ye = window.setTimeout(() => {
|
|
574
|
-
ye = 0, Ie.value && (we = 1, Me());
|
|
575
|
-
}, at + 40);
|
|
576
|
-
}
|
|
577
|
-
function Oe() {
|
|
578
|
-
if (!G) return;
|
|
579
|
-
N == null || N.disconnect();
|
|
580
|
-
const e = pe.value;
|
|
581
|
-
e && (N = new IntersectionObserver(
|
|
582
|
-
(t) => {
|
|
583
|
-
if (t.some((a) => a.isIntersecting)) {
|
|
584
|
-
if (performance.now() < Se) {
|
|
585
|
-
He();
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
we = 1, Ue(), Ne();
|
|
589
|
-
}
|
|
590
|
-
},
|
|
591
|
-
{ root: he.value, rootMargin: "240px 0px" }
|
|
592
|
-
), N.observe(e));
|
|
593
|
-
}
|
|
594
|
-
de([g, w, v, p], () => {
|
|
595
|
-
G && (R.value = se);
|
|
596
|
-
}), de(
|
|
597
|
-
[X, L, R],
|
|
598
|
-
() => {
|
|
599
|
-
Oe(), Me(), Ne();
|
|
600
|
-
},
|
|
601
|
-
{ flush: "post" }
|
|
602
|
-
);
|
|
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(
|
|
608
|
-
() => z.value.some(
|
|
609
|
-
(e) => e.sessions.some((t) => t.files.some((a) => !!a.owner))
|
|
610
|
-
)
|
|
611
|
-
);
|
|
612
|
-
function At() {
|
|
613
|
-
if (!ce.value) {
|
|
614
|
-
C("back");
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
g.value = "", w.value = "全部类型";
|
|
618
|
-
}
|
|
619
|
-
function ze(e) {
|
|
620
|
-
if (v.value !== e) {
|
|
621
|
-
v.value = e, p.value = e === "name" ? "asc" : "desc";
|
|
622
|
-
return;
|
|
623
|
-
}
|
|
624
|
-
p.value = p.value === "asc" ? "desc" : "asc";
|
|
625
|
-
}
|
|
626
|
-
function Ge(e) {
|
|
627
|
-
return v.value !== e ? "idle" : p.value === "asc" ? "asc" : "desc";
|
|
628
|
-
}
|
|
629
|
-
function xt(e) {
|
|
630
|
-
var o;
|
|
631
|
-
Se = performance.now() + at;
|
|
632
|
-
const t = new Set(m.value), a = !t.has(e);
|
|
633
|
-
a ? t.add(e) : t.delete(e);
|
|
634
|
-
const l = a ? ((o = De.value.find((_) => _.id === e)) == null ? void 0 : o.sessions.length) ?? 0 : me.get(e) ?? 0;
|
|
635
|
-
a ? me.set(e, l) : me.delete(e), R.value = Math.max(se, R.value + (a ? l : -l)), m.value = t, He();
|
|
636
|
-
}
|
|
637
|
-
function Ft(e) {
|
|
638
|
-
const t = new Set(y.value);
|
|
639
|
-
t.has(e) ? t.delete(e) : t.add(e), y.value = t;
|
|
640
|
-
}
|
|
641
|
-
const ae = c(null), It = c("");
|
|
642
|
-
function St(e, t) {
|
|
643
|
-
It.value = e, ae.value = t;
|
|
644
|
-
}
|
|
645
|
-
function Mt(e) {
|
|
646
|
-
const t = Qe(e);
|
|
647
|
-
if (!t) return;
|
|
648
|
-
const a = ae.value;
|
|
649
|
-
if (t === "add-task") {
|
|
650
|
-
if (n.actionsDisabled === !0) return;
|
|
651
|
-
a && Pe([ge(a)]);
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
const l = et(t);
|
|
655
|
-
if (l) {
|
|
656
|
-
if (n.actionsDisabled === !0 || !a) return;
|
|
657
|
-
W(l, [Je(a)]);
|
|
658
|
-
return;
|
|
659
|
-
}
|
|
660
|
-
const o = Xe(e, {
|
|
661
|
-
unavailable: !!n.cloud,
|
|
662
|
-
disabled: n.actionsDisabled === !0
|
|
663
|
-
});
|
|
664
|
-
if (o) {
|
|
665
|
-
if (o.kind === "unavailable") {
|
|
666
|
-
b(o.notice, "warning");
|
|
667
|
-
return;
|
|
668
|
-
}
|
|
669
|
-
o.kind === "notice" && b(o.notice, "warning");
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
function Ee() {
|
|
673
|
-
y.value = /* @__PURE__ */ new Set();
|
|
674
|
-
}
|
|
675
|
-
function Lt(e) {
|
|
676
|
-
for (const t of te())
|
|
677
|
-
for (const a of t.sessions) {
|
|
678
|
-
const l = a.files.findIndex((o) => V(a.id, o.id) === e);
|
|
679
|
-
if (l >= 0) return { groupId: t.id, session: a, index: l };
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function Et(e, t) {
|
|
683
|
-
const a = Lt(e);
|
|
684
|
-
if (!a) return;
|
|
685
|
-
const l = Qe(t);
|
|
686
|
-
if (!l) return;
|
|
687
|
-
const o = a.session.files[a.index];
|
|
688
|
-
if (!o) return;
|
|
689
|
-
if (l === "add-task") {
|
|
690
|
-
if (n.actionsDisabled === !0) return;
|
|
691
|
-
Pe([ge(o)]);
|
|
692
|
-
return;
|
|
693
|
-
}
|
|
694
|
-
const _ = et(l);
|
|
695
|
-
if (_) {
|
|
696
|
-
if (n.actionsDisabled === !0) return;
|
|
697
|
-
W(_, [Je(o, a.session)]);
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
const k = Xe(t, {
|
|
701
|
-
unavailable: !!n.cloud,
|
|
702
|
-
disabled: n.actionsDisabled === !0
|
|
703
|
-
});
|
|
704
|
-
if (k) {
|
|
705
|
-
if (k.kind === "unavailable") {
|
|
706
|
-
b(k.notice, "warning");
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
k.kind === "notice" && b(k.notice, "warning");
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
function Pe(e) {
|
|
713
|
-
if (e.length !== 0) {
|
|
714
|
-
if (ie) {
|
|
715
|
-
ie(e);
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
C("add-to-task", e), b(ka["add-task"], "success");
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
function Pt() {
|
|
722
|
-
return z.value.flatMap(
|
|
723
|
-
(e) => e.sessions.flatMap(
|
|
724
|
-
(t) => t.files.filter((a) => y.value.has(V(t.id, a.id))).map((a) => ge(a))
|
|
725
|
-
)
|
|
726
|
-
);
|
|
727
|
-
}
|
|
728
|
-
function $t() {
|
|
729
|
-
if (n.actionsDisabled === !0) return;
|
|
730
|
-
const e = Pt();
|
|
731
|
-
if (e.length !== 0) {
|
|
732
|
-
if (!ie) {
|
|
733
|
-
if (n.cloud) {
|
|
734
|
-
b(ba, "warning");
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
b(`已添加 ${xe.value} 个文件到任务`, "success"), Ee();
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
Pe(e), Ee();
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
return de(g, () => {
|
|
744
|
-
n.cloud && (window.clearTimeout(Q), Q = window.setTimeout(() => {
|
|
745
|
-
u("replace");
|
|
746
|
-
}, 300));
|
|
747
|
-
}), st(() => {
|
|
748
|
-
Oe(), n.cloud && u();
|
|
749
|
-
}), Ot(() => {
|
|
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 }])
|
|
753
|
-
}, [
|
|
754
|
-
s("div", Ka, [
|
|
755
|
-
s("header", Va, [
|
|
756
|
-
s("button", {
|
|
757
|
-
class: "chat-my-files-artifacts__back",
|
|
758
|
-
type: "button",
|
|
759
|
-
onClick: t[0] || (t[0] = (a) => C("back"))
|
|
760
|
-
}, [
|
|
761
|
-
s("img", {
|
|
762
|
-
loading: "eager",
|
|
763
|
-
decoding: "async",
|
|
764
|
-
class: "chat-my-files-artifacts__back-glyph",
|
|
765
|
-
src: h(Ca),
|
|
766
|
-
alt: ""
|
|
767
|
-
}, null, 8, Za),
|
|
768
|
-
t[5] || (t[5] = s("span", null, "返回我的文件", -1))
|
|
769
|
-
]),
|
|
770
|
-
x(h(_t), null, {
|
|
771
|
-
"item-icon": le(({ item: a }) => [
|
|
772
|
-
x(ua, {
|
|
773
|
-
kind: a.id
|
|
774
|
-
}, null, 8, ["kind"])
|
|
775
|
-
]),
|
|
776
|
-
default: le(() => [
|
|
777
|
-
s("button", qa, [
|
|
778
|
-
s("span", null, A(w.value), 1),
|
|
779
|
-
s("img", {
|
|
780
|
-
loading: "eager",
|
|
781
|
-
decoding: "async",
|
|
782
|
-
class: "chat-my-files-artifacts__filter-glyph",
|
|
783
|
-
src: h(We),
|
|
784
|
-
alt: ""
|
|
785
|
-
}, null, 8, Wa)
|
|
786
|
-
])
|
|
787
|
-
]),
|
|
788
|
-
_: 1
|
|
789
|
-
}),
|
|
790
|
-
s("label", ja, [
|
|
791
|
-
s("img", {
|
|
792
|
-
loading: "eager",
|
|
793
|
-
decoding: "async",
|
|
794
|
-
class: "chat-my-files-artifacts__search-glyph",
|
|
795
|
-
src: h(da),
|
|
796
|
-
alt: ""
|
|
797
|
-
}, null, 8, Ya),
|
|
798
|
-
zt(s("input", {
|
|
799
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => g.value = a),
|
|
800
|
-
type: "search",
|
|
801
|
-
placeholder: "搜索文件、任务或工作空间",
|
|
802
|
-
title: "搜索文件、任务或工作空间"
|
|
803
|
-
}, null, 512), [
|
|
804
|
-
[Gt, g.value]
|
|
805
|
-
])
|
|
806
|
-
])
|
|
807
|
-
]),
|
|
808
|
-
F.value && !M.value && !D.value ? (i(), f("div", Qa)) : I("", !0),
|
|
809
|
-
s("div", Ja, [
|
|
810
|
-
Tt.value ? (i(), f("div", {
|
|
811
|
-
key: 0,
|
|
812
|
-
class: U(["chat-my-files-artifacts__head", { "has-owner": Le.value }])
|
|
813
|
-
}, [
|
|
814
|
-
s("button", {
|
|
815
|
-
class: "chat-my-files-artifacts__sort chat-my-files-artifacts__sort--name",
|
|
816
|
-
type: "button",
|
|
817
|
-
onClick: t[2] || (t[2] = (a) => ze("name"))
|
|
818
|
-
}, [
|
|
819
|
-
t[7] || (t[7] = Ve(" 名称 ", -1)),
|
|
820
|
-
(i(), f("svg", {
|
|
821
|
-
class: U(["chat-my-files-artifacts__sort-glyph", `is-${Ge("name")}`]),
|
|
822
|
-
viewBox: "0 0 20 20",
|
|
823
|
-
"aria-hidden": "true"
|
|
824
|
-
}, [...t[6] || (t[6] = [
|
|
825
|
-
s("path", {
|
|
826
|
-
class: "up",
|
|
827
|
-
d: "M10 3.5 13.5 8H6.5Z"
|
|
828
|
-
}, null, -1),
|
|
829
|
-
s("path", {
|
|
830
|
-
class: "down",
|
|
831
|
-
d: "M10 16.5 6.5 12h7Z"
|
|
832
|
-
}, null, -1)
|
|
833
|
-
])], 2))
|
|
834
|
-
]),
|
|
835
|
-
t[10] || (t[10] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--kind" }, "类型", -1)),
|
|
836
|
-
Le.value ? (i(), f("span", Xa, "更新人")) : I("", !0),
|
|
837
|
-
s("button", {
|
|
838
|
-
class: "chat-my-files-artifacts__sort chat-my-files-artifacts__sort--time",
|
|
839
|
-
type: "button",
|
|
840
|
-
onClick: t[3] || (t[3] = (a) => ze("updatedAt"))
|
|
841
|
-
}, [
|
|
842
|
-
t[9] || (t[9] = Ve(" 更新时间 ", -1)),
|
|
843
|
-
(i(), f("svg", {
|
|
844
|
-
class: U(["chat-my-files-artifacts__sort-glyph", `is-${Ge("updatedAt")}`]),
|
|
845
|
-
viewBox: "0 0 20 20",
|
|
846
|
-
"aria-hidden": "true"
|
|
847
|
-
}, [...t[8] || (t[8] = [
|
|
848
|
-
s("path", {
|
|
849
|
-
class: "up",
|
|
850
|
-
d: "M10 3.5 13.5 8H6.5Z"
|
|
851
|
-
}, null, -1),
|
|
852
|
-
s("path", {
|
|
853
|
-
class: "down",
|
|
854
|
-
d: "M10 16.5 6.5 12h7Z"
|
|
855
|
-
}, null, -1)
|
|
856
|
-
])], 2))
|
|
857
|
-
]),
|
|
858
|
-
t[11] || (t[11] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--size" }, "大小", -1)),
|
|
859
|
-
t[12] || (t[12] = s("span", { class: "chat-my-files-artifacts__col chat-my-files-artifacts__col--action" }, "操作", -1))
|
|
860
|
-
], 2)) : I("", !0),
|
|
861
|
-
s("div", {
|
|
862
|
-
ref_key: "bodyRef",
|
|
863
|
-
ref: he,
|
|
864
|
-
class: "chat-my-files-artifacts__body"
|
|
865
|
-
}, [
|
|
866
|
-
D.value ? (i(), f("div", es, [
|
|
867
|
-
x(tt, {
|
|
868
|
-
"group-head": "",
|
|
869
|
-
blocks: 2,
|
|
870
|
-
rows: 3
|
|
871
|
-
}),
|
|
872
|
-
t[13] || (t[13] = s("p", {
|
|
873
|
-
class: "chat-my-files-artifacts__sr-only",
|
|
874
|
-
role: "status"
|
|
875
|
-
}, "正在加载 AI 产物", -1))
|
|
876
|
-
])) : j.value ? (i(), P(je, {
|
|
877
|
-
key: 1,
|
|
878
|
-
class: "chat-my-files-artifacts__state",
|
|
879
|
-
tone: "error",
|
|
880
|
-
variant: "error",
|
|
881
|
-
title: "产物加载失败",
|
|
882
|
-
description: j.value,
|
|
883
|
-
"action-text": "重新加载",
|
|
884
|
-
onAction: J
|
|
885
|
-
}, null, 8, ["description"])) : z.value.length ? I("", !0) : (i(), P(je, {
|
|
886
|
-
key: 2,
|
|
887
|
-
class: "chat-my-files-artifacts__state",
|
|
888
|
-
variant: ce.value ? "search" : "files",
|
|
889
|
-
title: kt.value,
|
|
890
|
-
description: bt.value,
|
|
891
|
-
"action-text": Ct.value,
|
|
892
|
-
onAction: At
|
|
893
|
-
}, null, 8, ["variant", "title", "description", "action-text"])),
|
|
894
|
-
(i(!0), f(fe, null, ve(De.value, (a) => (i(), f("section", {
|
|
895
|
-
key: a.id,
|
|
896
|
-
class: "chat-my-files-artifacts__group"
|
|
897
|
-
}, [
|
|
898
|
-
s("button", {
|
|
899
|
-
class: "chat-my-files-artifacts__group-head",
|
|
900
|
-
type: "button",
|
|
901
|
-
"aria-expanded": !m.value.has(a.id),
|
|
902
|
-
onClick: (l) => xt(a.id)
|
|
903
|
-
}, [
|
|
904
|
-
s("img", {
|
|
905
|
-
loading: "lazy",
|
|
906
|
-
decoding: "async",
|
|
907
|
-
class: U(["chat-my-files-artifacts__chevron", { "is-open": !m.value.has(a.id) }]),
|
|
908
|
-
src: h(We),
|
|
909
|
-
alt: ""
|
|
910
|
-
}, null, 10, as),
|
|
911
|
-
s("span", ss, A(a.name), 1),
|
|
912
|
-
s("em", ls, A(a.taskCount) + "个任务", 1)
|
|
913
|
-
], 8, ts),
|
|
914
|
-
s("div", {
|
|
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
|
|
917
|
-
}, [
|
|
918
|
-
s("div", os, [
|
|
919
|
-
(i(!0), f(fe, null, ve(a.sessions, (l, o) => (i(), f("div", {
|
|
920
|
-
key: l.id,
|
|
921
|
-
class: "chat-my-files-artifacts__task",
|
|
922
|
-
style: ue({ "--mf-stagger": o })
|
|
923
|
-
}, [
|
|
924
|
-
s("div", is, [
|
|
925
|
-
s("img", {
|
|
926
|
-
loading: "lazy",
|
|
927
|
-
decoding: "async",
|
|
928
|
-
class: "chat-my-files-artifacts__spark",
|
|
929
|
-
src: h(fa),
|
|
930
|
-
alt: ""
|
|
931
|
-
}, null, 8, rs),
|
|
932
|
-
s("span", {
|
|
933
|
-
title: l.title
|
|
934
|
-
}, A(l.title), 9, cs)
|
|
935
|
-
]),
|
|
936
|
-
(i(!0), f(fe, null, ve(l.files, (_) => (i(), P(Pa, {
|
|
937
|
-
key: h(V)(l.id, _.id),
|
|
938
|
-
file: _,
|
|
939
|
-
selected: y.value.has(h(V)(l.id, _.id)),
|
|
940
|
-
"show-owner": Le.value,
|
|
941
|
-
"actions-disabled": r.actionsDisabled,
|
|
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)
|
|
945
|
-
}, null, 8, ["file", "selected", "show-owner", "actions-disabled", "onToggle", "onOpen", "onAction"]))), 128)),
|
|
946
|
-
r.cloud && l.hasMore ? (i(), f("button", {
|
|
947
|
-
key: 0,
|
|
948
|
-
class: "chat-my-files-artifacts__more",
|
|
949
|
-
type: "button",
|
|
950
|
-
"data-testid": "artifact-file-more",
|
|
951
|
-
disabled: H.value.has(l.id),
|
|
952
|
-
"aria-busy": H.value.has(l.id),
|
|
953
|
-
onClick: (_) => ft(l.id)
|
|
954
|
-
}, A(H.value.has(l.id) ? "加载中" : Ae(l)), 9, us)) : I("", !0)
|
|
955
|
-
], 4))), 128))
|
|
956
|
-
])
|
|
957
|
-
], 10, ns)
|
|
958
|
-
]))), 128)),
|
|
959
|
-
r.cloud && Ie.value && !D.value ? (i(), f("div", {
|
|
960
|
-
key: 3,
|
|
961
|
-
ref_key: "sentinelRef",
|
|
962
|
-
ref: pe,
|
|
963
|
-
class: U(["chat-my-files-artifacts__sentinel", { "is-loading": M.value }])
|
|
964
|
-
}, [
|
|
965
|
-
s("div", ds, [
|
|
966
|
-
M.value ? (i(), P(tt, {
|
|
967
|
-
key: 0,
|
|
968
|
-
blocks: 1,
|
|
969
|
-
rows: 1
|
|
970
|
-
})) : I("", !0)
|
|
971
|
-
])
|
|
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", {
|
|
975
|
-
key: 4,
|
|
976
|
-
class: "chat-my-files-artifacts__sessions-more",
|
|
977
|
-
type: "button",
|
|
978
|
-
"data-testid": "artifact-session-more",
|
|
979
|
-
disabled: F.value && !X.value,
|
|
980
|
-
"aria-busy": M.value,
|
|
981
|
-
onClick: wt
|
|
982
|
-
}, A(M.value ? "加载中" : Y.value ? "重新加载" : X.value ? "显示更多任务" : "加载更多会话"), 9, vs)) : I("", !0)
|
|
983
|
-
], 512)
|
|
984
|
-
]),
|
|
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,
|
|
993
|
-
cloud: r.cloud,
|
|
994
|
-
"actions-disabled": r.actionsDisabled,
|
|
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),
|
|
1001
|
-
mode: "target",
|
|
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"])
|
|
1007
|
-
])
|
|
1008
|
-
], 2));
|
|
1009
|
-
}
|
|
1010
|
-
}), ws = /* @__PURE__ */ be(ms, [["__scopeId", "data-v-13517c8c"]]);
|
|
1011
|
-
export {
|
|
1012
|
-
ws as default
|
|
1013
|
-
};
|