@glodon-aiot/agent-cli-ui 3.3.2-beta.9 → 3.3.2
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/dist/es/AgentClientUI.mjs +32 -34
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +142 -156
- package/dist/es/Dialog/AgentChat/index.mjs +147 -150
- package/dist/es/index.mjs +95 -101
- package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +25 -27
- package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +27 -29
- package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +48 -58
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style10.css +1 -1
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +1 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style3.css +1 -1
- package/dist/es/src/style4.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style7.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.js +51 -51
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +0 -2
- package/dist/src/ReactTextGenerationUI/components/TextSiders/index.d.ts +22 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/fetch.d.ts +44 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/index.d.ts +1 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/parse.d.ts +36 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +44 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +1 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +36 -0
- package/dist/src/ReactTextGenerationUI/index.d.ts +4 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/types.d.ts +0 -3
- package/dist/src/utils/reactCompatibility.d.ts +27 -0
- package/package.json +3 -3
|
@@ -2,15 +2,15 @@ var Yt = Object.defineProperty, Kt = Object.defineProperties;
|
|
|
2
2
|
var Wt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var et = Object.getOwnPropertySymbols;
|
|
4
4
|
var Qt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var ke = (L, o, v) => o in L ? Yt(L, o, { enumerable: !0, configurable: !0, writable: !0, value: v }) : L[o] = v, tt = (L, o) => {
|
|
6
6
|
for (var v in o || (o = {}))
|
|
7
|
-
Qt.call(o, v) &&
|
|
7
|
+
Qt.call(o, v) && ke(L, v, o[v]);
|
|
8
8
|
if (et)
|
|
9
9
|
for (var v of et(o))
|
|
10
|
-
_t.call(o, v) &&
|
|
10
|
+
_t.call(o, v) && ke(L, v, o[v]);
|
|
11
11
|
return L;
|
|
12
12
|
}, nt = (L, o) => Kt(L, Wt(o));
|
|
13
|
-
var D = (L, o, v) => (
|
|
13
|
+
var D = (L, o, v) => (ke(L, typeof o != "symbol" ? o + "" : o, v), v);
|
|
14
14
|
var z = (L, o, v) => new Promise((e, x) => {
|
|
15
15
|
var ce = (I) => {
|
|
16
16
|
try {
|
|
@@ -18,44 +18,43 @@ var z = (L, o, v) => new Promise((e, x) => {
|
|
|
18
18
|
} catch (h) {
|
|
19
19
|
x(h);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, k = (I) => {
|
|
22
22
|
try {
|
|
23
23
|
H(v.throw(I));
|
|
24
24
|
} catch (h) {
|
|
25
25
|
x(h);
|
|
26
26
|
}
|
|
27
|
-
}, H = (I) => I.done ? e(I.value) : Promise.resolve(I.value).then(ce,
|
|
27
|
+
}, H = (I) => I.done ? e(I.value) : Promise.resolve(I.value).then(ce, k);
|
|
28
28
|
H((v = v.apply(L, o)).next());
|
|
29
29
|
});
|
|
30
30
|
import { jsx as c, jsxs as A } from "react/jsx-runtime";
|
|
31
31
|
import { memo as Gt, useState as m, useRef as B, useContext as Xt, useEffect as T, useMemo as Zt } from "react";
|
|
32
|
-
/* empty css */import { Divider as Jt, Spin as St, Button as _, Space as
|
|
32
|
+
/* empty css */import { Divider as Jt, Spin as St, Button as _, Space as ae, Upload as en, Tooltip as tn, message as u, notification as nn } from "antd";
|
|
33
33
|
import de from "../../components/Iconfont/index.mjs";
|
|
34
34
|
import { IHistoryRole as G, ChatMessageRole as it } from "@glodon-aiot/apis";
|
|
35
35
|
import rt from "./HistoryItem/index.mjs";
|
|
36
|
-
import
|
|
37
|
-
import { v4 as
|
|
36
|
+
import lt from "dayjs";
|
|
37
|
+
import { v4 as at } from "uuid";
|
|
38
38
|
import on from "../../context.mjs";
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import an from "../../components/FilePreview/index.mjs";
|
|
39
|
+
import { MB as sn } from "../../constant.mjs";
|
|
40
|
+
import rn from "../../components/FilePreview/index.mjs";
|
|
42
41
|
import { getImageExtension as ln } from "../../utils/index.mjs";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import { CameraOutlined as
|
|
48
|
-
import
|
|
49
|
-
import
|
|
42
|
+
import an from "../../QuillEditor/index.mjs";
|
|
43
|
+
import dn from "../../components/Recommend/index.mjs";
|
|
44
|
+
import cn from "../../components/Greeting/index.mjs";
|
|
45
|
+
import fn from "../../Footer/index.mjs";
|
|
46
|
+
import { CameraOutlined as gn, PlusOutlined as un } from "@ant-design/icons";
|
|
47
|
+
import hn from "./Tools/UploadKnowledgeFiles/index.mjs";
|
|
48
|
+
import mn from "../UploadingPrompt/index.mjs";
|
|
50
49
|
import yn from "./PromptSetting/index.mjs";
|
|
51
50
|
import { useMemoizedFn as we } from "ahooks";
|
|
52
|
-
import
|
|
53
|
-
import
|
|
51
|
+
import pn from "./Tools/SessionListDrawer/index.mjs";
|
|
52
|
+
import vn from "react-infinite-scroll-component";
|
|
54
53
|
import bn from "./Tools/ConnectToNetwork/index.mjs";
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
const
|
|
58
|
-
icon:
|
|
54
|
+
import kn from "./Tools/PromptManager/index.mjs";
|
|
55
|
+
import wn from "../../assets/icon.svg.mjs";
|
|
56
|
+
const xn = Gt(rt), ot = {
|
|
57
|
+
icon: wn,
|
|
59
58
|
text: "今天我能帮你什么?"
|
|
60
59
|
};
|
|
61
60
|
class J {
|
|
@@ -69,12 +68,12 @@ class J {
|
|
|
69
68
|
D(this, "isSensitive");
|
|
70
69
|
D(this, "isSuspend");
|
|
71
70
|
D(this, "comment");
|
|
72
|
-
this.content = o, this.sessionId = v, this.role = e, this.files = x, this.content = o, this.role = e, this.sessionId = v, this.files = x, this.messageTime =
|
|
71
|
+
this.content = o, this.sessionId = v, this.role = e, this.files = x, this.content = o, this.role = e, this.sessionId = v, this.files = x, this.messageTime = lt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = at(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
|
|
73
72
|
isAgree: 0
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
const st = 10,
|
|
76
|
+
const st = 10, Zn = (L) => {
|
|
78
77
|
var Be, qe, Ye, Ke, We, Qe, _e, Ge, Xe, Ze, Je;
|
|
79
78
|
const {
|
|
80
79
|
application: o,
|
|
@@ -82,7 +81,7 @@ const st = 10, Sn = (L) => {
|
|
|
82
81
|
currentSession: e,
|
|
83
82
|
onCreateSession: x,
|
|
84
83
|
embeddingService: ce,
|
|
85
|
-
setCurrentSession:
|
|
84
|
+
setCurrentSession: k,
|
|
86
85
|
networkStatus: H,
|
|
87
86
|
setNetworkStatus: I
|
|
88
87
|
} = L, [h, C] = m([]), [dt, S] = m(), [fe, xe] = m(), P = B(null), {
|
|
@@ -97,13 +96,13 @@ const st = 10, Sn = (L) => {
|
|
|
97
96
|
beforeMessageSend: j,
|
|
98
97
|
bodyStyle: gt,
|
|
99
98
|
disabled: M,
|
|
100
|
-
features:
|
|
99
|
+
features: a,
|
|
101
100
|
popupContainer: g,
|
|
102
101
|
icon: ut
|
|
103
|
-
} = Xt(on), [Le, ue] = m(!1),
|
|
102
|
+
} = Xt(on), [Le, ue] = m(!1), y = B(h), Ce = B(), [ht, mt] = m(0), [X, q] = m(), [Y, te] = m(""), [Ne, he] = m(!1), me = B(null), [Fe, yt] = m([]), [Te, K] = m(!1), [Ee, pt] = m(!1), [vt, bt] = m(""), [kt, W] = m(), [ne, ie] = m({}), oe = B(null), Pe = B(null), ye = B(null), [Re, wt] = m(!1), [xt, It] = m([]), [Lt, se] = m(!0), [Ct, Nt] = m(!0), [De, O] = m(!1), [pe, V] = m(!1), [He, Ft] = m(!1), [E, re] = m(typeof (a == null ? void 0 : a.promptVariables) == "object" ? a.promptVariables.default || [] : []), [Tt, Et] = m(typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0), [Me, U] = m(!1), [Oe, Z] = m(!1), [Pt, Q] = m(typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.default) == "boolean" ? a.connectNetwork.default : !1), [Ue, le] = m(!1);
|
|
104
103
|
T(() => {
|
|
105
104
|
var r, i;
|
|
106
|
-
e && (
|
|
105
|
+
e && (y.current = []), C([]);
|
|
107
106
|
const t = P.current;
|
|
108
107
|
if (t && t.scrollTo({
|
|
109
108
|
top: 0
|
|
@@ -111,18 +110,18 @@ const st = 10, Sn = (L) => {
|
|
|
111
110
|
return;
|
|
112
111
|
if (V(!1), O(!1), (i = e.messages) != null && i.length) {
|
|
113
112
|
const s = [...e.messages.filter((d) => d == null ? void 0 : d.messageId)].reverse();
|
|
114
|
-
|
|
113
|
+
y.current = [...s], C([...s]);
|
|
115
114
|
}
|
|
116
|
-
const n = (
|
|
115
|
+
const n = (l) => {
|
|
117
116
|
var s;
|
|
118
|
-
(s = e == null ? void 0 : e.data) != null && s.id && (
|
|
117
|
+
(s = e == null ? void 0 : e.data) != null && s.id && (y.current = [...l].reverse(), C([...l].reverse()), !l || l.length < 10 ? Z(!1) : Z(!0), Ie && Ie({
|
|
119
118
|
applicationId: o.id,
|
|
120
119
|
sessionId: e.data.id,
|
|
121
|
-
histories:
|
|
120
|
+
histories: l
|
|
122
121
|
}));
|
|
123
122
|
};
|
|
124
123
|
return e.addEventListener("history:loaded", n), () => {
|
|
125
|
-
|
|
124
|
+
y.current = [], C([]), e == null || e.removeEventListener("history:loaded", n);
|
|
126
125
|
};
|
|
127
126
|
}, [e]), T(() => {
|
|
128
127
|
const t = () => {
|
|
@@ -163,11 +162,11 @@ const st = 10, Sn = (L) => {
|
|
|
163
162
|
};
|
|
164
163
|
T(() => {
|
|
165
164
|
o != null && o.id && (F == null || F.getRecommendQues(o.id).then((t) => {
|
|
166
|
-
|
|
165
|
+
yt(t);
|
|
167
166
|
}));
|
|
168
167
|
}, [ct, o]);
|
|
169
168
|
const ze = (t) => z(void 0, null, function* () {
|
|
170
|
-
var w,
|
|
169
|
+
var w, p;
|
|
171
170
|
if (M) {
|
|
172
171
|
u.config({
|
|
173
172
|
getContainer: () => (g == null ? void 0 : g.current) || document.body
|
|
@@ -185,7 +184,7 @@ const st = 10, Sn = (L) => {
|
|
|
185
184
|
});
|
|
186
185
|
return;
|
|
187
186
|
}
|
|
188
|
-
if (!(E == null ? void 0 : E.every((
|
|
187
|
+
if (!(E == null ? void 0 : E.every((b) => !!(b != null && b.value))))
|
|
189
188
|
if (f != null && f.promptVariables) {
|
|
190
189
|
u.config({
|
|
191
190
|
getContainer: () => (g == null ? void 0 : g.current) || document.body
|
|
@@ -194,8 +193,8 @@ const st = 10, Sn = (L) => {
|
|
|
194
193
|
});
|
|
195
194
|
return;
|
|
196
195
|
} else
|
|
197
|
-
console.error("变量值不能为空", E == null ? void 0 : E.map((
|
|
198
|
-
if (
|
|
196
|
+
console.error("变量值不能为空", E == null ? void 0 : E.map((b) => !!(b != null && b.value)));
|
|
197
|
+
if (pe) {
|
|
199
198
|
u.config({
|
|
200
199
|
getContainer: () => (g == null ? void 0 : g.current) || document.body
|
|
201
200
|
}), u.error("正在回复中"), u.config({
|
|
@@ -232,16 +231,16 @@ const st = 10, Sn = (L) => {
|
|
|
232
231
|
if (!i) {
|
|
233
232
|
x == null || x({
|
|
234
233
|
netOpen: H ? 1 : 2
|
|
235
|
-
}).then((
|
|
234
|
+
}).then((b) => {
|
|
236
235
|
var R, $;
|
|
237
|
-
U(!0), I(!!((R =
|
|
238
|
-
|
|
236
|
+
U(!0), I(!!((R = b.data) != null && R.netOpen)), Q(!!(($ = b.data) != null && $.enableNetOpen)), Dt(b).then(() => {
|
|
237
|
+
k == null || k(b), U(!1), xe(n);
|
|
239
238
|
});
|
|
240
239
|
});
|
|
241
240
|
return;
|
|
242
241
|
}
|
|
243
|
-
|
|
244
|
-
const
|
|
242
|
+
le(!0);
|
|
243
|
+
const l = Y ? `
|
|
245
244
|
${n}` : n;
|
|
246
245
|
let s;
|
|
247
246
|
try {
|
|
@@ -249,23 +248,23 @@ ${n}` : n;
|
|
|
249
248
|
applicationId: o.id,
|
|
250
249
|
sessionId: i,
|
|
251
250
|
message: {
|
|
252
|
-
content:
|
|
251
|
+
content: l,
|
|
253
252
|
sessionId: i,
|
|
254
253
|
role: it.User,
|
|
255
254
|
files: ne[i]
|
|
256
255
|
}
|
|
257
256
|
}) : s = !0;
|
|
258
|
-
} catch (
|
|
257
|
+
} catch (b) {
|
|
259
258
|
s = !1;
|
|
260
259
|
}
|
|
261
|
-
if (
|
|
260
|
+
if (le(!1), s === !1)
|
|
262
261
|
return;
|
|
263
262
|
let d = n;
|
|
264
|
-
typeof s == "object" && (d = s.content || n), ((
|
|
263
|
+
typeof s == "object" && (d = s.content || n), ((p = ne[i]) == null ? void 0 : p.length) > 0 ? Ht(d) : ve(d);
|
|
265
264
|
}), Dt = (t) => new Promise((n, r) => z(void 0, null, function* () {
|
|
266
265
|
const s = (t == null ? void 0 : t.promptVariables).filter((d) => d.key !== "query").map((d) => {
|
|
267
|
-
var
|
|
268
|
-
const w = (
|
|
266
|
+
var p;
|
|
267
|
+
const w = (p = E.find((b) => b.key === d.key)) == null ? void 0 : p.value;
|
|
269
268
|
return d.value = w || "", d;
|
|
270
269
|
});
|
|
271
270
|
re(s.sort((d, w) => d.key.localeCompare(w.key))), yield t == null ? void 0 : t.setPromptVariables(s), n();
|
|
@@ -274,24 +273,24 @@ ${n}` : n;
|
|
|
274
273
|
if (se(!1), !((s = e == null ? void 0 : e.data) != null && s.id) || !(o != null && o.id))
|
|
275
274
|
return;
|
|
276
275
|
const n = ((d = e.data) == null ? void 0 : d.id) || "", r = [];
|
|
277
|
-
let i = [],
|
|
278
|
-
(w = ne[n]) == null || w.forEach((
|
|
279
|
-
|
|
280
|
-
}), Promise.all(i.map((
|
|
276
|
+
let i = [], l = /* @__PURE__ */ new Set();
|
|
277
|
+
(w = ne[n]) == null || w.forEach((p) => {
|
|
278
|
+
l.has(p.id) || (i.push(p), l.add(p.id));
|
|
279
|
+
}), Promise.all(i.map((p) => F == null ? void 0 : F.patchApplicationIdKnowledgeIdFileId(o == null ? void 0 : o.id, n, p.id, {
|
|
281
280
|
enabled: 1
|
|
282
|
-
}).then((
|
|
283
|
-
r.push(
|
|
284
|
-
}))).then((
|
|
281
|
+
}).then((b) => {
|
|
282
|
+
r.push(p);
|
|
283
|
+
}))).then((p) => {
|
|
285
284
|
se(!0), ve(t, r);
|
|
286
|
-
}).catch((
|
|
287
|
-
throw Error(
|
|
285
|
+
}).catch((p) => {
|
|
286
|
+
throw Error(p);
|
|
288
287
|
});
|
|
289
288
|
};
|
|
290
289
|
T(() => {
|
|
291
290
|
if (!fe || !e)
|
|
292
291
|
return;
|
|
293
292
|
const t = fe, n = () => z(void 0, null, function* () {
|
|
294
|
-
|
|
293
|
+
le(!0);
|
|
295
294
|
const r = Y ? `
|
|
296
295
|
${t}` : t;
|
|
297
296
|
let i;
|
|
@@ -306,32 +305,32 @@ ${t}` : t;
|
|
|
306
305
|
files: ne[e.id]
|
|
307
306
|
}
|
|
308
307
|
}) : i = !0;
|
|
309
|
-
} catch (
|
|
308
|
+
} catch (l) {
|
|
310
309
|
i = !1;
|
|
311
310
|
}
|
|
312
|
-
|
|
311
|
+
le(!1), i !== !1 && (ve(t), xe(void 0));
|
|
313
312
|
});
|
|
314
313
|
return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
|
|
315
314
|
e == null || e.removeEventListener("ready", n);
|
|
316
315
|
};
|
|
317
316
|
}, [fe, e]);
|
|
318
317
|
const ve = (t, n) => z(void 0, null, function* () {
|
|
319
|
-
var
|
|
320
|
-
const r = (
|
|
318
|
+
var p, b;
|
|
319
|
+
const r = (p = e == null ? void 0 : e.data) == null ? void 0 : p.id;
|
|
321
320
|
if (!r)
|
|
322
321
|
return;
|
|
323
322
|
V(!0), O(!0);
|
|
324
323
|
const i = Y ? `
|
|
325
|
-
${t}` : t,
|
|
326
|
-
S(void 0), W(void 0),
|
|
324
|
+
${t}` : t, l = new J(i, r, G.User, n);
|
|
325
|
+
S(void 0), W(void 0), y.current = [l, ...h], C(y.current), o.id && ee && ee({
|
|
327
326
|
applicationId: o.id,
|
|
328
327
|
sessionId: r,
|
|
329
|
-
message:
|
|
328
|
+
message: l
|
|
330
329
|
});
|
|
331
330
|
const s = new J("", r, G.System);
|
|
332
|
-
s.isWaiting = !0,
|
|
331
|
+
s.isWaiting = !0, y.current = [s, ...y.current], C(y.current);
|
|
333
332
|
const d = (n == null ? void 0 : n.map((R) => R.id)) || [], w = {
|
|
334
|
-
stream:
|
|
333
|
+
stream: !0,
|
|
335
334
|
referenceFirst: !1
|
|
336
335
|
};
|
|
337
336
|
if (f != null && f.promptVariables) {
|
|
@@ -347,7 +346,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
347
346
|
fileIds: d
|
|
348
347
|
}, w), ie({
|
|
349
348
|
[r]: []
|
|
350
|
-
}), (
|
|
349
|
+
}), (b = oe.current) == null || b.update();
|
|
351
350
|
});
|
|
352
351
|
T(() => {
|
|
353
352
|
var r;
|
|
@@ -357,16 +356,16 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
357
356
|
const n = (i) => {
|
|
358
357
|
if (!i.sessionId || i.sessionId && i.sessionId !== Ce.current || i.role === G.User)
|
|
359
358
|
return;
|
|
360
|
-
if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (O(!1), V(!1),
|
|
359
|
+
if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (O(!1), V(!1), y.current = y.current.filter((d) => !d.isWaiting), C([...y.current]), y.current = [...y.current], i.content))
|
|
361
360
|
return nn.error({
|
|
362
361
|
message: i.content
|
|
363
362
|
});
|
|
364
|
-
const
|
|
365
|
-
s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions =
|
|
363
|
+
const l = i.actions || [], s = new J(i.content, t, G.Robot);
|
|
364
|
+
s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = l, s.isLoading = !0, s.searchingStatus = i.searchingStatus, y.current = y.current.filter((d) => !d.isWaiting).filter((d) => !d.isReplying), i.index === void 0 && C([s, ...y.current]), i.code === 11915 && (O(!1), V(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, C([s, ...y.current])), i.index === -2 && (O(!1), V(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, C([s, ...y.current])), i.index === -1 && (O(!1), V(!1), s.isLoading = !1, s.reference = i.reference, C([s, ...y.current]), o.id && ee && ee({
|
|
366
365
|
applicationId: o.id,
|
|
367
366
|
sessionId: t,
|
|
368
367
|
message: s
|
|
369
|
-
})), i.index === -3 && (O(!1), V(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, C([s, ...
|
|
368
|
+
})), i.index === -3 && (O(!1), V(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, C([s, ...y.current]));
|
|
370
369
|
};
|
|
371
370
|
return e.ready ? e.addEventListener("message:updated", n) : e.addEventListener("ready", () => {
|
|
372
371
|
e.addEventListener("message:updated", n);
|
|
@@ -398,7 +397,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
398
397
|
getContainer: () => (g == null ? void 0 : g.current) || document.body
|
|
399
398
|
}), u.error("该文件为空,请重新上传"), u.config({
|
|
400
399
|
getContainer: void 0
|
|
401
|
-
}), !1) : n > 20 *
|
|
400
|
+
}), !1) : n > 20 * sn ? (u.config({
|
|
402
401
|
getContainer: () => (g == null ? void 0 : g.current) || document.body
|
|
403
402
|
}), u.error("图片须小于20M"), u.config({
|
|
404
403
|
getContainer: void 0
|
|
@@ -409,25 +408,25 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
409
408
|
U(!0), x == null || x({
|
|
410
409
|
netOpen: H ? 1 : 2
|
|
411
410
|
}).then((i) => {
|
|
412
|
-
var
|
|
413
|
-
|
|
411
|
+
var l, s;
|
|
412
|
+
k == null || k(i), U(!1), I(!!((l = i.data) != null && l.netOpen)), Q(!!((s = i.data) != null && s.enableNetOpen)), r(je(i, t));
|
|
414
413
|
});
|
|
415
414
|
});
|
|
416
415
|
}), je = (t, n) => {
|
|
417
416
|
const r = ln(n.name);
|
|
418
417
|
return new Promise((i) => {
|
|
419
418
|
var s;
|
|
420
|
-
const
|
|
421
|
-
files: [`${
|
|
419
|
+
const l = {
|
|
420
|
+
files: [`${at()}.${r}`],
|
|
422
421
|
isv: "minio",
|
|
423
422
|
knowledgeId: ((s = t.data) == null ? void 0 : s.id) || "",
|
|
424
423
|
type: 1
|
|
425
424
|
};
|
|
426
|
-
he(!0), F == null || F.postTicket(
|
|
425
|
+
he(!0), F == null || F.postTicket(l).then((d) => {
|
|
427
426
|
F.uploadMinioFile(d.minio, n).then(() => {
|
|
428
427
|
var R, $;
|
|
429
|
-
const w = (R = d.minio.endpoints) == null ? void 0 : R[0],
|
|
430
|
-
i(`${location.protocol}//${w}/${
|
|
428
|
+
const w = (R = d.minio.endpoints) == null ? void 0 : R[0], p = d.minio.bucket, b = ($ = d.minio.fileKeys) == null ? void 0 : $[0];
|
|
429
|
+
i(`${location.protocol}//${w}/${p}/${b}`);
|
|
431
430
|
}).catch(() => {
|
|
432
431
|
te(""), q(void 0);
|
|
433
432
|
}).finally(() => {
|
|
@@ -451,8 +450,8 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
451
450
|
type: 1
|
|
452
451
|
});
|
|
453
452
|
F == null || F.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, i).finally(() => {
|
|
454
|
-
var
|
|
455
|
-
(
|
|
453
|
+
var l;
|
|
454
|
+
(l = oe.current) == null || l.update().finally(r);
|
|
456
455
|
});
|
|
457
456
|
}), Ut = () => {
|
|
458
457
|
var t;
|
|
@@ -479,13 +478,13 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
479
478
|
var n;
|
|
480
479
|
if (!((n = e == null ? void 0 : e.data) != null && n.id))
|
|
481
480
|
return;
|
|
482
|
-
|
|
481
|
+
y.current = [...h.slice(1, h.length)], C(y.current);
|
|
483
482
|
const t = new J("", e.data.id, G.System);
|
|
484
|
-
t.isWaiting = !0,
|
|
483
|
+
t.isWaiting = !0, y.current = [t, ...y.current], C(y.current), V(!0), O(!0), e.answerAgain();
|
|
485
484
|
});
|
|
486
485
|
T(() => {
|
|
487
486
|
var t, n;
|
|
488
|
-
Ce.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Me && ((n =
|
|
487
|
+
Ce.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Me && ((n = ye.current) == null || n.clear());
|
|
489
488
|
}, [e]);
|
|
490
489
|
const Bt = () => {
|
|
491
490
|
var r;
|
|
@@ -496,12 +495,12 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
496
495
|
endTime: n,
|
|
497
496
|
pageSize: st
|
|
498
497
|
}).then((i) => {
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
498
|
+
const l = i || [];
|
|
499
|
+
if (!l || !(l != null && l.length)) {
|
|
501
500
|
Z(!1);
|
|
502
501
|
return;
|
|
503
502
|
}
|
|
504
|
-
|
|
503
|
+
l.length < 10 ? Z(!1) : Z(!0), C([...h, ...l.reverse()]);
|
|
505
504
|
});
|
|
506
505
|
}, qt = (t) => z(void 0, null, function* () {
|
|
507
506
|
var n, r;
|
|
@@ -512,22 +511,22 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
512
511
|
return;
|
|
513
512
|
I(t);
|
|
514
513
|
}
|
|
515
|
-
}),
|
|
514
|
+
}), be = () => z(void 0, null, function* () {
|
|
516
515
|
e ? e.fetchData().then((t) => {
|
|
517
516
|
var n;
|
|
518
517
|
(n = e == null ? void 0 : e.data) != null && n.id && (I(t.netOpen), Q(t.enableNetOpen));
|
|
519
518
|
}) : (I(!1), Q(o.arrange[0].enableNetOpen));
|
|
520
519
|
});
|
|
521
520
|
T(() => {
|
|
522
|
-
|
|
521
|
+
be();
|
|
523
522
|
}, [e]), T(() => {
|
|
524
523
|
var t, n;
|
|
525
524
|
if (P.current) {
|
|
526
|
-
const r = document.getElementById("chat-main"), i = (t = P.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"),
|
|
527
|
-
if (!i || !
|
|
525
|
+
const r = document.getElementById("chat-main"), i = (t = P.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), l = (n = P.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
|
|
526
|
+
if (!i || !l || !r)
|
|
528
527
|
return;
|
|
529
528
|
const s = r.offsetHeight;
|
|
530
|
-
if (
|
|
529
|
+
if (l.offsetHeight <= s) {
|
|
531
530
|
if (i.style.height === "100%")
|
|
532
531
|
return;
|
|
533
532
|
i.style.height = "100%";
|
|
@@ -542,29 +541,29 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
542
541
|
return;
|
|
543
542
|
const t = () => {
|
|
544
543
|
const i = ((N == null ? void 0 : N.promptVariables) || []).filter(
|
|
545
|
-
(
|
|
544
|
+
(l) => l.key !== "query" && l.status === 1
|
|
546
545
|
// 只要求输入被引用的变量
|
|
547
|
-
).map((
|
|
548
|
-
var w,
|
|
546
|
+
).map((l, s) => {
|
|
547
|
+
var w, p;
|
|
549
548
|
let d = "";
|
|
550
|
-
return typeof (
|
|
549
|
+
return typeof (a == null ? void 0 : a.promptVariables) == "object" && (d = ((p = (w = a.promptVariables.default) == null ? void 0 : w.find((b) => b.key === l.key)) == null ? void 0 : p.value) || ""), {
|
|
551
550
|
id: s + "",
|
|
552
|
-
key:
|
|
553
|
-
name:
|
|
551
|
+
key: l.key,
|
|
552
|
+
name: l.name,
|
|
554
553
|
value: d
|
|
555
554
|
};
|
|
556
555
|
});
|
|
557
|
-
re([...i].sort((
|
|
556
|
+
re([...i].sort((l, s) => l.key.localeCompare(s.key)));
|
|
558
557
|
};
|
|
559
558
|
return N != null && N.ready ? t() : N == null || N.addEventListener("ready", t), () => {
|
|
560
559
|
N == null || N.removeEventListener("ready", t);
|
|
561
560
|
};
|
|
562
|
-
}, [e, N,
|
|
561
|
+
}, [e, N, a == null ? void 0 : a.promptVariables]);
|
|
563
562
|
const $e = () => x == null ? void 0 : x({
|
|
564
563
|
netOpen: H ? 1 : 2
|
|
565
564
|
}).then((t) => {
|
|
566
565
|
var n, r;
|
|
567
|
-
return
|
|
566
|
+
return k == null || k(t), U(!1), I(!!((n = t.data) != null && n.netOpen)), Q(!!((r = t.data) != null && r.enableNetOpen)), t;
|
|
568
567
|
}), Ae = Zt(() => {
|
|
569
568
|
var t;
|
|
570
569
|
return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ c(rt, {
|
|
@@ -577,12 +576,11 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
577
576
|
sessionId: "",
|
|
578
577
|
reference: [],
|
|
579
578
|
searchReference: [],
|
|
580
|
-
messageTime:
|
|
579
|
+
messageTime: lt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
|
|
581
580
|
actions: [],
|
|
582
581
|
isLoading: !1
|
|
583
582
|
},
|
|
584
|
-
actions: !!h.length
|
|
585
|
-
markdown: l == null ? void 0 : l.markdown
|
|
583
|
+
actions: !!h.length
|
|
586
584
|
}) : null;
|
|
587
585
|
}, [o == null ? void 0 : o.arrange, h]);
|
|
588
586
|
return /* @__PURE__ */ A("div", {
|
|
@@ -593,7 +591,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
593
591
|
currentSession: e,
|
|
594
592
|
promptVariables: E,
|
|
595
593
|
setPromptVariables: re,
|
|
596
|
-
setCurrentSession:
|
|
594
|
+
setCurrentSession: k
|
|
597
595
|
}), /* @__PURE__ */ A("div", {
|
|
598
596
|
className: "chat-main",
|
|
599
597
|
id: "chat-main",
|
|
@@ -609,7 +607,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
609
607
|
},
|
|
610
608
|
ref: P,
|
|
611
609
|
onScroll: jt,
|
|
612
|
-
children: (Be = e == null ? void 0 : e.data) != null && Be.id && (h != null && h.length) ? /* @__PURE__ */ A(
|
|
610
|
+
children: (Be = e == null ? void 0 : e.data) != null && Be.id && (h != null && h.length) ? /* @__PURE__ */ A(vn, {
|
|
613
611
|
dataLength: h.length,
|
|
614
612
|
next: Bt,
|
|
615
613
|
style: {
|
|
@@ -633,7 +631,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
633
631
|
children: /* @__PURE__ */ c(St, {})
|
|
634
632
|
}),
|
|
635
633
|
scrollableTarget: "scrollableDiv",
|
|
636
|
-
children: [h.map((t, n) => /* @__PURE__ */ c(
|
|
634
|
+
children: [h.map((t, n) => /* @__PURE__ */ c(xn, {
|
|
637
635
|
application: o,
|
|
638
636
|
currentSession: e,
|
|
639
637
|
history: t,
|
|
@@ -641,32 +639,31 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
641
639
|
isLastHistory: n === 0,
|
|
642
640
|
onRelatedClick: $t,
|
|
643
641
|
onAgainClick: At,
|
|
644
|
-
onEditClick: Vt
|
|
645
|
-
markdown: l == null ? void 0 : l.markdown
|
|
642
|
+
onEditClick: Vt
|
|
646
643
|
}, t.messageId + n)), !Oe && Ae]
|
|
647
644
|
}) : /* @__PURE__ */ A("div", {
|
|
648
645
|
className: "main-empty",
|
|
649
|
-
children: [(
|
|
650
|
-
text:
|
|
651
|
-
icon:
|
|
652
|
-
children: !!Fe.length && typeof (
|
|
653
|
-
ref:
|
|
646
|
+
children: [(a == null ? void 0 : a.greeting) !== !1 && /* @__PURE__ */ c(cn, {
|
|
647
|
+
text: a === void 0 || a.greeting === !0 || ((Ke = a.greeting) == null ? void 0 : Ke.text) === void 0 ? ot.text : a.greeting.text,
|
|
648
|
+
icon: a === void 0 || a.greeting === !0 || ((We = a.greeting) == null ? void 0 : We.icon) === void 0 ? ut || ot.icon : a.greeting.icon,
|
|
649
|
+
children: !!Fe.length && typeof (a == null ? void 0 : a.greeting) == "object" && a.greeting.questions !== !1 && /* @__PURE__ */ c(dn, {
|
|
650
|
+
ref: ye,
|
|
654
651
|
sid: (Qe = e == null ? void 0 : e.data) == null ? void 0 : Qe.id,
|
|
655
652
|
isRecommendClearing: Te,
|
|
656
653
|
data: Fe,
|
|
657
654
|
onItemClick: (t) => {
|
|
658
|
-
var r, i,
|
|
655
|
+
var r, i, l;
|
|
659
656
|
if (S(t == null ? void 0 : t.question), W(t == null ? void 0 : t.question), Te)
|
|
660
657
|
return;
|
|
661
658
|
t != null && t.id && K(!0);
|
|
662
659
|
const n = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
|
|
663
|
-
f != null && f.fileUpload ? (
|
|
660
|
+
f != null && f.fileUpload ? (l = (i = oe.current) == null ? void 0 : i.clear()) == null || l.then(() => {
|
|
664
661
|
var s, d;
|
|
665
662
|
t != null && t.id && (n ? (s = Ve(n, t)) == null || s.finally(() => {
|
|
666
663
|
K(!1);
|
|
667
664
|
}) : (K(!1), U(!0), (d = $e()) == null || d.then((w) => {
|
|
668
|
-
var
|
|
669
|
-
(
|
|
665
|
+
var p;
|
|
666
|
+
(p = Ve(w.id, t)) == null || p.finally(() => {
|
|
670
667
|
K(!1);
|
|
671
668
|
});
|
|
672
669
|
})));
|
|
@@ -715,7 +712,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
715
712
|
className: "chat-footer-input",
|
|
716
713
|
children: [X && /* @__PURE__ */ c("div", {
|
|
717
714
|
className: "input-files",
|
|
718
|
-
children: /* @__PURE__ */ c(
|
|
715
|
+
children: /* @__PURE__ */ c(rn, {
|
|
719
716
|
file: X,
|
|
720
717
|
actions: {
|
|
721
718
|
upload: Ot,
|
|
@@ -725,10 +722,10 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
725
722
|
},
|
|
726
723
|
onUrlChange: (t) => te(t)
|
|
727
724
|
})
|
|
728
|
-
}), /* @__PURE__ */ A(
|
|
725
|
+
}), /* @__PURE__ */ A(ae, {
|
|
729
726
|
className: "footer-upload-action",
|
|
730
727
|
onClick: (t) => t.preventDefault(),
|
|
731
|
-
children: [/* @__PURE__ */ A(
|
|
728
|
+
children: [/* @__PURE__ */ A(ae, {
|
|
732
729
|
children: [o.type === 2 && (f == null ? void 0 : f.imageUpload) && /* @__PURE__ */ c(en, {
|
|
733
730
|
disabled: !!X || M,
|
|
734
731
|
accept: ".jpg, .png, .jpeg,.bmp",
|
|
@@ -745,7 +742,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
745
742
|
bottom: "-2px"
|
|
746
743
|
},
|
|
747
744
|
disabled: !!X || M,
|
|
748
|
-
icon: /* @__PURE__ */ c(
|
|
745
|
+
icon: /* @__PURE__ */ c(gn, {
|
|
749
746
|
className: "icon-tianjia",
|
|
750
747
|
style: {
|
|
751
748
|
fontSize: "22px"
|
|
@@ -774,26 +771,26 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
774
771
|
})
|
|
775
772
|
})
|
|
776
773
|
})
|
|
777
|
-
}), ce && (f != null && f.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ c(
|
|
774
|
+
}), ce && (f != null && f.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ c(hn, {
|
|
778
775
|
appId: o == null ? void 0 : o.id,
|
|
779
776
|
ref: oe,
|
|
780
777
|
isFirstSession: Me,
|
|
781
778
|
docViewerUrl: v,
|
|
782
779
|
onStatusChange: (t) => z(void 0, null, function* () {
|
|
783
|
-
t !== "process" ? (se(!0),
|
|
780
|
+
t !== "process" ? (se(!0), be()) : se(!1);
|
|
784
781
|
}),
|
|
785
782
|
createSession: () => new Promise((t) => {
|
|
786
783
|
U(!0), x == null || x({
|
|
787
784
|
netOpen: H ? 1 : 2
|
|
788
785
|
}).then((n) => {
|
|
789
|
-
var i,
|
|
790
|
-
|
|
786
|
+
var i, l, s;
|
|
787
|
+
k == null || k(n), U(!1), I(!!((i = n.data) != null && i.netOpen)), Q(!!((l = n.data) != null && l.enableNetOpen));
|
|
791
788
|
const r = ((s = n.data) == null ? void 0 : s.id) || "";
|
|
792
789
|
t(r);
|
|
793
790
|
});
|
|
794
791
|
}),
|
|
795
792
|
sid: (_e = e == null ? void 0 : e.data) == null ? void 0 : _e.id,
|
|
796
|
-
disabled:
|
|
793
|
+
disabled: pe || M,
|
|
797
794
|
afterFileAdd: (t, n) => {
|
|
798
795
|
n && ie((r) => {
|
|
799
796
|
const i = r[n] || [];
|
|
@@ -806,9 +803,9 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
806
803
|
var r;
|
|
807
804
|
const n = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
|
|
808
805
|
n && ie((i) => {
|
|
809
|
-
const
|
|
806
|
+
const l = i[n] || [];
|
|
810
807
|
return {
|
|
811
|
-
[n]:
|
|
808
|
+
[n]: l.filter((s) => s.id !== t)
|
|
812
809
|
};
|
|
813
810
|
});
|
|
814
811
|
},
|
|
@@ -821,9 +818,9 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
821
818
|
const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
|
|
822
819
|
t && (ie({
|
|
823
820
|
[t]: []
|
|
824
|
-
}),
|
|
821
|
+
}), be());
|
|
825
822
|
}
|
|
826
|
-
}) : null, (f == null ? void 0 : f.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ c(
|
|
823
|
+
}) : null, (f == null ? void 0 : f.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ c(kn, {
|
|
827
824
|
appId: o.id,
|
|
828
825
|
list: [],
|
|
829
826
|
search: Ee ? vt : "",
|
|
@@ -832,39 +829,39 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
832
829
|
},
|
|
833
830
|
disabled: M
|
|
834
831
|
})]
|
|
835
|
-
}), /* @__PURE__ */ A(
|
|
832
|
+
}), /* @__PURE__ */ A(ae, {
|
|
836
833
|
children: [(f == null ? void 0 : f.connectNetwork) && o.type === 0 && ((Ge = o.arrange) == null ? void 0 : Ge.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ c(bn, {
|
|
837
834
|
sessionId: (Xe = e == null ? void 0 : e.data) == null ? void 0 : Xe.id,
|
|
838
835
|
netStatus: H,
|
|
839
|
-
enable: typeof (
|
|
836
|
+
enable: typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.diabled) == "boolean" ? !(a != null && a.connectNetwork.diabled) : Pt,
|
|
840
837
|
disabledTip: e ? void 0 : "网络访问已被禁用",
|
|
841
838
|
onNetStatusChange: (t) => {
|
|
842
839
|
qt(t);
|
|
843
840
|
}
|
|
844
|
-
}), (f == null ? void 0 : f.sessionList) && /* @__PURE__ */ c(
|
|
841
|
+
}), (f == null ? void 0 : f.sessionList) && /* @__PURE__ */ c(pn, {
|
|
845
842
|
currentSessionId: (Ze = e == null ? void 0 : e.data) == null ? void 0 : Ze.id,
|
|
846
843
|
onSessionChange: (t, n) => {
|
|
847
|
-
W(void 0),
|
|
844
|
+
W(void 0), k == null || k(n);
|
|
848
845
|
},
|
|
849
846
|
disabled: M
|
|
850
847
|
}), (f == null ? void 0 : f.sessionOpen) && /* @__PURE__ */ c(_, {
|
|
851
|
-
icon: /* @__PURE__ */ c(
|
|
848
|
+
icon: /* @__PURE__ */ c(un, {}),
|
|
852
849
|
className: "add-btn",
|
|
853
850
|
type: "primary",
|
|
854
851
|
disabled: De || !e || !h.length || M,
|
|
855
852
|
onClick: () => {
|
|
856
853
|
var t, n;
|
|
857
|
-
|
|
854
|
+
k == null || k(void 0), I(!1), (t = Pe.current) == null || t.clear(), (n = ye.current) == null || n.clear();
|
|
858
855
|
},
|
|
859
856
|
children: "新会话"
|
|
860
857
|
})]
|
|
861
858
|
})]
|
|
862
859
|
}), /* @__PURE__ */ c("div", {
|
|
863
860
|
className: "footer-textarea",
|
|
864
|
-
children: /* @__PURE__ */ c(
|
|
861
|
+
children: /* @__PURE__ */ c(an, {
|
|
865
862
|
ref: me,
|
|
866
863
|
maxLength: ht,
|
|
867
|
-
text:
|
|
864
|
+
text: kt,
|
|
868
865
|
networkStatus: !1,
|
|
869
866
|
loading: Ue,
|
|
870
867
|
disabled: Le || Ne || M || Ue,
|
|
@@ -872,13 +869,13 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
872
869
|
onChange: (t, n) => {
|
|
873
870
|
W(t);
|
|
874
871
|
const r = n.getText().replace(/[\n\s]+$/, "");
|
|
875
|
-
S(r),
|
|
872
|
+
S(r), bt(r), Ee || pt(!0);
|
|
876
873
|
},
|
|
877
|
-
clearAction: /* @__PURE__ */ c(
|
|
874
|
+
clearAction: /* @__PURE__ */ c(ae, {
|
|
878
875
|
size: 0,
|
|
879
876
|
children: /* @__PURE__ */ c(_, {
|
|
880
877
|
type: "link",
|
|
881
|
-
disabled:
|
|
878
|
+
disabled: pe || M,
|
|
882
879
|
ghost: !0,
|
|
883
880
|
icon: /* @__PURE__ */ c(de, {
|
|
884
881
|
style: {
|
|
@@ -892,9 +889,9 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
892
889
|
})
|
|
893
890
|
})]
|
|
894
891
|
})
|
|
895
|
-
}), /* @__PURE__ */ c(
|
|
892
|
+
}), /* @__PURE__ */ c(fn, {
|
|
896
893
|
tips: ft
|
|
897
|
-
}), Re && /* @__PURE__ */ c(
|
|
894
|
+
}), Re && /* @__PURE__ */ c(mn, {
|
|
898
895
|
isvisible: Re,
|
|
899
896
|
files: xt,
|
|
900
897
|
sessionId: (Je = e == null ? void 0 : e.data) == null ? void 0 : Je.id,
|
|
@@ -905,5 +902,5 @@ ${t}` : t, a = new J(i, r, G.User, n);
|
|
|
905
902
|
});
|
|
906
903
|
};
|
|
907
904
|
export {
|
|
908
|
-
|
|
905
|
+
Zn as default
|
|
909
906
|
};
|