@glodon-aiot/agent-cli-ui 3.3.5-alpha.28 → 3.3.5-beta.30

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.
@@ -1,17 +1,17 @@
1
1
  var Wt = Object.defineProperty, Qt = Object.defineProperties;
2
2
  var _t = Object.getOwnPropertyDescriptors;
3
- var it = Object.getOwnPropertySymbols;
3
+ var ot = Object.getOwnPropertySymbols;
4
4
  var Gt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable;
5
- var Ie = (L, o, v) => o in L ? Wt(L, o, { enumerable: !0, configurable: !0, writable: !0, value: v }) : L[o] = v, ot = (L, o) => {
5
+ var Ie = (L, o, v) => o in L ? Wt(L, o, { enumerable: !0, configurable: !0, writable: !0, value: v }) : L[o] = v, st = (L, o) => {
6
6
  for (var v in o || (o = {}))
7
7
  Gt.call(o, v) && Ie(L, v, o[v]);
8
- if (it)
9
- for (var v of it(o))
8
+ if (ot)
9
+ for (var v of ot(o))
10
10
  Xt.call(o, v) && Ie(L, v, o[v]);
11
11
  return L;
12
- }, st = (L, o) => Qt(L, _t(o));
12
+ }, rt = (L, o) => Qt(L, _t(o));
13
13
  var D = (L, o, v) => (Ie(L, typeof o != "symbol" ? o + "" : o, v), v);
14
- var z = (L, o, v) => new Promise((e, w) => {
14
+ var j = (L, o, v) => new Promise((e, w) => {
15
15
  var ue = (x) => {
16
16
  try {
17
17
  H(v.next(x));
@@ -27,14 +27,14 @@ var z = (L, o, v) => new Promise((e, w) => {
27
27
  }, H = (x) => x.done ? e(x.value) : Promise.resolve(x.value).then(ue, b);
28
28
  H((v = v.apply(L, o)).next());
29
29
  });
30
- import { jsx as c, jsxs as q } from "react/jsx-runtime";
31
- import { memo as Zt, useState as m, useRef as A, useContext as Jt, useEffect as F, useMemo as St } from "react";
30
+ import { jsx as c, jsxs as $ } from "react/jsx-runtime";
31
+ import { memo as Zt, useState as m, useRef as q, useContext as Jt, useEffect as E, useMemo as St } from "react";
32
32
  /* empty css */import { Divider as en, Spin as tn, Button as _, Space as de, Upload as nn, Tooltip as on, notification as ce, message as u } from "antd";
33
33
  import fe from "../../components/Iconfont/index.mjs";
34
- import { IHistoryRole as G, ChatMessageRole as rt, PromptVariableType as ge } from "@glodon-aiot/apis";
35
- import dt from "./HistoryItem/index.mjs";
36
- import ct from "dayjs";
37
- import { v4 as ft } from "uuid";
34
+ import { IHistoryRole as G, ChatMessageRole as at, PromptVariableType as ge } from "@glodon-aiot/apis";
35
+ import ct from "./HistoryItem/index.mjs";
36
+ import ft from "dayjs";
37
+ import { v4 as Ce } from "uuid";
38
38
  import sn from "../../context.mjs";
39
39
  import { configuration as rn } from "@glodon-aiot/bot-client-sdk";
40
40
  import { MB as an } from "../../constant.mjs";
@@ -54,7 +54,7 @@ import bn from "react-infinite-scroll-component";
54
54
  import wn from "./Tools/ConnectToNetwork/index.mjs";
55
55
  import xn from "./Tools/PromptManager/index.mjs";
56
56
  import In from "../../assets/icon.svg.mjs";
57
- const Ln = Zt(dt), at = {
57
+ const Ln = Zt(ct), lt = {
58
58
  icon: In,
59
59
  text: "今天我能帮你什么?"
60
60
  };
@@ -69,13 +69,13 @@ class S {
69
69
  D(this, "isSensitive");
70
70
  D(this, "isSuspend");
71
71
  D(this, "comment");
72
- this.content = o, this.sessionId = v, this.role = e, this.files = w, this.content = o, this.role = e, this.sessionId = v, this.files = w, this.messageTime = ct(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = ft(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
72
+ this.content = o, this.sessionId = v, this.role = e, this.files = w, this.content = o, this.role = e, this.sessionId = v, this.files = w, this.messageTime = ft(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = Ce(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
73
73
  isAgree: 0
74
74
  };
75
75
  }
76
76
  }
77
- const lt = 10, ei = (L) => {
78
- var We, Qe, _e, Ge, Xe, Ze, Je, Se, et, tt, nt;
77
+ const dt = 10, ei = (L) => {
78
+ var Qe, _e, Ge, Xe, Ze, Je, Se, et, tt, nt, it;
79
79
  const {
80
80
  application: o,
81
81
  docViewerUrl: v = "",
@@ -85,7 +85,7 @@ const lt = 10, ei = (L) => {
85
85
  setCurrentSession: b,
86
86
  networkStatus: H,
87
87
  setNetworkStatus: x
88
- } = L, [h, C] = m([]), [gt, ee] = m(), [he, Ce] = m(), R = A(null), {
88
+ } = L, [h, C] = m([]), [gt, ee] = m(), [he, Ne] = m(), R = q(null), {
89
89
  service: P,
90
90
  agentClient: N,
91
91
  depId: ut,
@@ -93,15 +93,15 @@ const lt = 10, ei = (L) => {
93
93
  transform: g,
94
94
  defaultInput: me,
95
95
  onMessage: te,
96
- onHistoryLoad: Ne,
97
- beforeMessageSend: j,
96
+ onHistoryLoad: Pe,
97
+ beforeMessageSend: z,
98
98
  bodyStyle: mt,
99
99
  disabled: M,
100
- features: l,
100
+ features: a,
101
101
  popupContainer: f,
102
102
  icon: yt
103
- } = Jt(sn), [Pe, ye] = m(!1), y = A(h), Te = A(void 0), [pt, vt] = m(0), [X, B] = m(), [Y, ne] = m(""), [Fe, pe] = m(!1), ve = A(null), [Ee, kt] = m([]), [Re, K] = m(!1), [De, bt] = m(!1), [wt, xt] = m(""), [It, W] = m(), [ie, oe] = m({}), se = A(null), He = A(null), ke = A(null), [Me, Lt] = m(!1), [Ct, Nt] = m([]), [Pt, re] = m(!0), [Tt, Ft] = m(!0), [Oe, O] = m(!1), [be, V] = m(!1), [Ue, Et] = m(!1), [E, ae] = m(typeof (l == null ? void 0 : l.promptVariables) == "object" ? l.promptVariables.default || [] : []), [Rt, Dt] = m(typeof (l == null ? void 0 : l.knowledges) == "object" && l.knowledges.default || void 0), [ze, U] = m(!1), [je, Z] = m(!1), [Ht, Q] = m(typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.default) == "boolean" ? l.connectNetwork.default : !1), [Ve, le] = m(!1);
104
- F(() => {
103
+ } = Jt(sn), [Te, ye] = m(!1), y = q(h), Ee = q(void 0), [pt, vt] = m(0), [X, A] = m(), [Y, ne] = m(""), [Fe, pe] = m(!1), ve = q(null), [Re, kt] = m([]), [De, K] = m(!1), [He, bt] = m(!1), [wt, xt] = m(""), [It, W] = m(), [ie, oe] = m({}), se = q(null), Me = q(null), ke = q(null), [Oe, Lt] = m(!1), [Ct, Nt] = m([]), [Pt, re] = m(!0), [Tt, Et] = m(!0), [Ue, O] = m(!1), [be, V] = m(!1), [je, Ft] = m(!1), [F, ae] = m(typeof (a == null ? void 0 : a.promptVariables) == "object" ? a.promptVariables.default || [] : []), [Rt, Dt] = m(typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0), [ze, U] = m(!1), [Ve, Z] = m(!1), [Ht, Q] = m(typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.default) == "boolean" ? a.connectNetwork.default : !1), [Be, le] = m(!1);
104
+ E(() => {
105
105
  var r, i;
106
106
  e && (y.current = []), C([]);
107
107
  const t = R.current;
@@ -113,18 +113,18 @@ const lt = 10, ei = (L) => {
113
113
  const s = [...e.messages.filter((d) => d == null ? void 0 : d.messageId)].reverse();
114
114
  y.current = [...s], C([...s]);
115
115
  }
116
- const n = (a) => {
116
+ const n = (l) => {
117
117
  var s;
118
- (s = e == null ? void 0 : e.data) != null && s.id && (y.current = [...a].reverse(), C([...a].reverse()), !a || a.length < 10 ? Z(!1) : Z(!0), Ne && Ne({
118
+ (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), Pe && Pe({
119
119
  applicationId: o.id,
120
120
  sessionId: e.data.id,
121
- histories: a
121
+ histories: l
122
122
  }));
123
123
  };
124
124
  return e.addEventListener("history:loaded", n), () => {
125
125
  y.current = [], C([]), e == null || e.removeEventListener("history:loaded", n);
126
126
  };
127
- }, [e]), F(() => {
127
+ }, [e]), E(() => {
128
128
  const t = () => {
129
129
  var n;
130
130
  (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && ae(e.promptVariables.sort((r, i) => r.key.localeCompare(i.key))), e.knowledges && Dt(e.knowledges), x(e.netOpen));
@@ -132,7 +132,7 @@ const lt = 10, ei = (L) => {
132
132
  return e == null || e.addEventListener("data:updated", t), () => {
133
133
  e == null || e.removeEventListener("data:updated", t);
134
134
  };
135
- }, [e]), F(() => {
135
+ }, [e]), E(() => {
136
136
  var n;
137
137
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
138
138
  return;
@@ -168,12 +168,12 @@ const lt = 10, ei = (L) => {
168
168
  i.isContext = !0, C([i, ...h]);
169
169
  });
170
170
  };
171
- F(() => {
171
+ E(() => {
172
172
  o != null && o.id && (P == null || P.getRecommendQues(o.id).then((t) => {
173
173
  kt(t);
174
174
  }));
175
175
  }, [ut, o]);
176
- const $e = (t) => z(void 0, null, function* () {
176
+ const $e = (t) => j(void 0, null, function* () {
177
177
  var p, T;
178
178
  if (M) {
179
179
  u.config({
@@ -192,7 +192,7 @@ const lt = 10, ei = (L) => {
192
192
  });
193
193
  return;
194
194
  }
195
- if (!(E == null ? void 0 : E.every((k) => !!(k != null && k.value))))
195
+ if (!(F == null ? void 0 : F.every((k) => !!(k != null && k.value))))
196
196
  if (g != null && g.promptVariables) {
197
197
  u.config({
198
198
  getContainer: () => (f == null ? void 0 : f.current) || document.body
@@ -201,7 +201,7 @@ const lt = 10, ei = (L) => {
201
201
  });
202
202
  return;
203
203
  } else
204
- console.error("变量值不能为空", E == null ? void 0 : E.map((k) => !!(k != null && k.value)));
204
+ console.error("变量值不能为空", F == null ? void 0 : F.map((k) => !!(k != null && k.value)));
205
205
  if (be) {
206
206
  u.config({
207
207
  getContainer: () => (f == null ? void 0 : f.current) || document.body
@@ -210,7 +210,7 @@ const lt = 10, ei = (L) => {
210
210
  });
211
211
  return;
212
212
  }
213
- if (Pe) {
213
+ if (Te) {
214
214
  u.config({
215
215
  getContainer: () => (f == null ? void 0 : f.current) || document.body
216
216
  }), u.error("等待初始化"), u.config({
@@ -234,31 +234,31 @@ const lt = 10, ei = (L) => {
234
234
  });
235
235
  return;
236
236
  }
237
- B(void 0), ne("");
237
+ A(void 0), ne("");
238
238
  const i = (p = e == null ? void 0 : e.data) == null ? void 0 : p.id;
239
239
  if (!i) {
240
240
  w == null || w({
241
241
  netOpen: H ? 1 : 2
242
242
  }).then((k) => {
243
- var $, J;
244
- U(!0), x(!!(($ = k.data) != null && $.netOpen)), Q(!!((J = k.data) != null && J.enableNetOpen)), qe(k).then(() => {
245
- b == null || b(k), U(!1), Ce(n);
243
+ var B, J;
244
+ U(!0), x(!!((B = k.data) != null && B.netOpen)), Q(!!((J = k.data) != null && J.enableNetOpen)), qe(k).then(() => {
245
+ b == null || b(k), U(!1), Ne(n);
246
246
  });
247
247
  });
248
248
  return;
249
249
  }
250
250
  le(!0);
251
- const a = Y ? `![](${Y})
251
+ const l = Y ? `![](${Y})
252
252
  ${n}` : n;
253
253
  let s;
254
254
  try {
255
- j ? s = yield j == null ? void 0 : j({
255
+ z ? s = yield z == null ? void 0 : z({
256
256
  applicationId: o.id,
257
257
  sessionId: i,
258
258
  message: {
259
- content: a,
259
+ content: l,
260
260
  sessionId: i,
261
- role: rt.User,
261
+ role: at.User,
262
262
  files: ie[i]
263
263
  }
264
264
  }) : s = !0;
@@ -268,11 +268,11 @@ ${n}` : n;
268
268
  if (le(!1), s === !1)
269
269
  return;
270
270
  let d = n;
271
- typeof s == "object" && (d = s.content || n), (yield e.setPromptVariables(E)) && (((T = ie[i]) == null ? void 0 : T.length) > 0 ? Ot(d) : we(d));
272
- }), qe = (t) => new Promise((n, r) => z(void 0, null, function* () {
271
+ typeof s == "object" && (d = s.content || n), (yield e.setPromptVariables(F)) && (((T = ie[i]) == null ? void 0 : T.length) > 0 ? Ot(d) : we(d));
272
+ }), qe = (t) => new Promise((n, r) => j(void 0, null, function* () {
273
273
  const s = (t == null ? void 0 : t.promptVariables).filter((d) => d.type ? !((d.type === ge.User || d.type === void 0) && d.key === "query") && !((d.type === ge.System || d.type === void 0) && d.key === "datetime") : d.key !== "query").map((d) => {
274
274
  var p;
275
- const I = (p = E.find((T) => T.key === d.key && T.type === d.type)) == null ? void 0 : p.value;
275
+ const I = (p = F.find((T) => T.key === d.key && T.type === d.type)) == null ? void 0 : p.value;
276
276
  return d.value = I || "", d;
277
277
  });
278
278
  ae(s.sort((d, I) => d.key.localeCompare(I.key))), yield t == null ? void 0 : t.setPromptVariables(s).catch((d) => {
@@ -287,9 +287,9 @@ ${n}` : n;
287
287
  if (re(!1), !((s = e == null ? void 0 : e.data) != null && s.id) || !(o != null && o.id))
288
288
  return;
289
289
  const n = ((d = e.data) == null ? void 0 : d.id) || "", r = [];
290
- let i = [], a = /* @__PURE__ */ new Set();
290
+ let i = [], l = /* @__PURE__ */ new Set();
291
291
  (I = ie[n]) == null || I.forEach((p) => {
292
- a.has(p.id) || (i.push(p), a.add(p.id));
292
+ l.has(p.id) || (i.push(p), l.add(p.id));
293
293
  }), Promise.all(i.map((p) => P == null ? void 0 : P.patchApplicationIdKnowledgeIdFileId(o == null ? void 0 : o.id, n, p.id, {
294
294
  enabled: 1
295
295
  }).then((T) => {
@@ -300,46 +300,46 @@ ${n}` : n;
300
300
  throw Error(p);
301
301
  });
302
302
  };
303
- F(() => {
303
+ E(() => {
304
304
  if (!he || !e)
305
305
  return;
306
- const t = he, n = () => z(void 0, null, function* () {
306
+ const t = he, n = () => j(void 0, null, function* () {
307
307
  le(!0);
308
308
  const r = Y ? `![](${Y})
309
309
  ${t}` : t;
310
310
  let i;
311
311
  try {
312
- j ? i = yield j == null ? void 0 : j({
312
+ z ? i = yield z == null ? void 0 : z({
313
313
  applicationId: o.id,
314
314
  sessionId: e.id,
315
315
  message: {
316
316
  content: r,
317
317
  sessionId: e.id,
318
- role: rt.User,
318
+ role: at.User,
319
319
  files: ie[e.id]
320
320
  }
321
321
  }) : i = !0;
322
- } catch (a) {
322
+ } catch (l) {
323
323
  i = !1;
324
324
  }
325
- le(!1), i !== !1 && (we(t), Ce(void 0));
325
+ le(!1), i !== !1 && (we(t), Ne(void 0));
326
326
  });
327
327
  return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
328
328
  e == null || e.removeEventListener("ready", n);
329
329
  };
330
330
  }, [he, e]);
331
- const we = (t, n) => z(void 0, null, function* () {
331
+ const we = (t, n) => j(void 0, null, function* () {
332
332
  var p, T;
333
333
  const r = (p = e == null ? void 0 : e.data) == null ? void 0 : p.id;
334
334
  if (!r)
335
335
  return;
336
336
  V(!0), O(!0);
337
337
  const i = Y ? `![](${Y})
338
- ${t}` : t, a = new S(i, r, G.User, n);
339
- ee(void 0), W(void 0), y.current = [a, ...h], C(y.current), o.id && te && te({
338
+ ${t}` : t, l = new S(i, r, G.User, n);
339
+ ee(void 0), W(void 0), y.current = [l, ...h], C(y.current), o.id && te && te({
340
340
  applicationId: o.id,
341
341
  sessionId: r,
342
- message: a
342
+ message: l
343
343
  });
344
344
  const s = new S("", r, G.System);
345
345
  s.isWaiting = !0, y.current = [s, ...y.current], C(y.current);
@@ -348,7 +348,7 @@ ${t}` : t, a = new S(i, r, G.User, n);
348
348
  referenceFirst: !1
349
349
  };
350
350
  if (g != null && g.promptVariables) {
351
- const k = E == null ? void 0 : E.reduce(($, J) => ($[J.key] = J.value, $), {});
351
+ const k = F == null ? void 0 : F.reduce((B, J) => (B[J.key] = J.value, B), {});
352
352
  I.formatValues = k;
353
353
  }
354
354
  if (g != null && g.knowledges) {
@@ -357,25 +357,26 @@ ${t}` : t, a = new S(i, r, G.User, n);
357
357
  }
358
358
  yield e.send({
359
359
  text: i,
360
- fileIds: d
360
+ fileIds: d,
361
+ files: n
361
362
  }, I), oe({
362
363
  [r]: []
363
364
  }), (T = se.current) == null || T.update();
364
365
  });
365
- F(() => {
366
+ E(() => {
366
367
  var r;
367
368
  const t = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
368
369
  if (!t)
369
370
  return;
370
371
  const n = (i) => {
371
- if (!i.sessionId || i.sessionId && i.sessionId !== Te.current || i.role === G.User)
372
+ if (!i.sessionId || i.sessionId && i.sessionId !== Ee.current || i.role === G.User)
372
373
  return;
373
374
  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))
374
375
  return ce.error({
375
376
  message: i.content
376
377
  });
377
- const a = i.actions || [], s = new S(i.content, t, G.Robot);
378
- s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = a, 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 && te && te({
378
+ const l = i.actions || [], s = new S(i.content, t, G.Robot);
379
+ s.messageId = i.messageId || Ce(), 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 && te && te({
379
380
  applicationId: o.id,
380
381
  sessionId: t,
381
382
  message: s
@@ -386,7 +387,7 @@ ${t}` : t, a = new S(i, r, G.User, n);
386
387
  }), () => {
387
388
  e == null || e.removeEventListener("message:updated", n);
388
389
  };
389
- }, [e]), F(() => {
390
+ }, [e]), E(() => {
390
391
  if (!e) {
391
392
  ye(!1);
392
393
  return;
@@ -397,12 +398,12 @@ ${t}` : t, a = new S(i, r, G.User, n);
397
398
  return ye(e.frozen), e.addEventListener("frozen", t), () => {
398
399
  e == null || e.removeEventListener("frozen", t);
399
400
  };
400
- }, [e]), F(() => {
401
+ }, [e]), E(() => {
401
402
  if (!N)
402
403
  return;
403
404
  const t = N.questionContextMaxLength || 4e3;
404
405
  vt(t);
405
- }, [N, P]), F(() => {
406
+ }, [N, P]), E(() => {
406
407
  me && W(me.text);
407
408
  }, [me]);
408
409
  const Ut = (t) => {
@@ -415,59 +416,59 @@ ${t}` : t, a = new S(i, r, G.User, n);
415
416
  getContainer: () => (f == null ? void 0 : f.current) || document.body
416
417
  }), u.error("图片须小于20M"), u.config({
417
418
  getContainer: void 0
418
- }), !1) : (B(t), !1);
419
- }, zt = (t) => z(void 0, null, function* () {
419
+ }), !1) : (A(t), !1);
420
+ }, jt = (t) => j(void 0, null, function* () {
420
421
  var n;
421
- return B(t), (n = e == null ? void 0 : e.data) != null && n.id ? Ae(e, t) : new Promise((r) => {
422
+ return A(t), (n = e == null ? void 0 : e.data) != null && n.id ? Ae(e, t) : new Promise((r) => {
422
423
  U(!0), w == null || w({
423
424
  netOpen: H ? 1 : 2
424
425
  }).then((i) => {
425
- var a, s;
426
- b == null || b(i), U(!1), x(!!((a = i.data) != null && a.netOpen)), Q(!!((s = i.data) != null && s.enableNetOpen)), r(Ae(i, t));
426
+ var l, s;
427
+ b == null || b(i), U(!1), x(!!((l = i.data) != null && l.netOpen)), Q(!!((s = i.data) != null && s.enableNetOpen)), r(Ae(i, t));
427
428
  });
428
429
  });
429
430
  }), Ae = (t, n) => {
430
431
  const r = dn(n.name);
431
432
  return new Promise((i) => {
432
433
  var s;
433
- const a = {
434
- files: [`${ft()}.${r}`],
434
+ const l = {
435
+ files: [`${Ce()}.${r}`],
435
436
  isv: "minio",
436
437
  knowledgeId: ((s = t.data) == null ? void 0 : s.id) || "",
437
438
  type: 1
438
439
  };
439
- pe(!0), P == null || P.postTicket(a).then((d) => {
440
+ pe(!0), P == null || P.postTicket(l).then((d) => {
440
441
  P.uploadMinioFile(d.minio, n).then(() => {
441
- var k, $;
442
- const I = (k = d.minio.endpoints) == null ? void 0 : k[0], p = d.minio.bucket, T = ($ = d.minio.fileKeys) == null ? void 0 : $[0];
442
+ var k, B;
443
+ const I = (k = d.minio.endpoints) == null ? void 0 : k[0], p = d.minio.bucket, T = (B = d.minio.fileKeys) == null ? void 0 : B[0];
443
444
  i(`${location.protocol}//${I}/${p}/${T}`);
444
445
  }).catch(() => {
445
- ne(""), B(void 0);
446
+ ne(""), A(void 0);
446
447
  }).finally(() => {
447
448
  pe(!1);
448
449
  });
449
450
  }).catch(() => {
450
- ne(""), B(void 0), pe(!1);
451
+ ne(""), A(void 0), pe(!1);
451
452
  });
452
453
  });
453
454
  };
454
- F(() => {
455
+ E(() => {
455
456
  const t = R.current;
456
- t && !Ue && t.scrollTo({
457
+ t && !je && t.scrollTo({
457
458
  top: t.scrollHeight
458
459
  });
459
460
  }, [h]);
460
- const Be = (t, n) => new Promise((r) => {
461
+ const Ye = (t, n) => new Promise((r) => {
461
462
  if (!n.file.url || !(o != null && o.id))
462
463
  return r();
463
- const i = st(ot({}, n.file), {
464
+ const i = rt(st({}, n.file), {
464
465
  type: 1
465
466
  });
466
467
  P == null || P.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, i).finally(() => {
467
- var a;
468
- (a = se.current) == null || a.update().finally(r);
468
+ var l;
469
+ (l = se.current) == null || l.update().finally(r);
469
470
  });
470
- }), jt = () => {
471
+ }), zt = () => {
471
472
  var t;
472
473
  (t = e == null ? void 0 : e.data) != null && t.id && (O(!1), e.suspend());
473
474
  }, Vt = (t) => {
@@ -478,17 +479,17 @@ ${t}` : t, a = new S(i, r, G.User, n);
478
479
  behavior: t == null ? void 0 : t.behavior
479
480
  });
480
481
  }, t == null ? void 0 : t.ms);
481
- }, $t = () => {
482
+ }, Bt = () => {
482
483
  if (!R.current)
483
484
  return;
484
485
  const t = R.current.scrollTop <= -80;
485
- Et(t);
486
- }, qt = Le((t) => {
486
+ Ft(t);
487
+ }, $t = Le((t) => {
487
488
  var n, r;
488
489
  (n = ve.current) == null || n.update(t), (r = ve.current) == null || r.focus();
489
- }), At = Le((t) => {
490
+ }), qt = Le((t) => {
490
491
  $e(t);
491
- }), Bt = Le(() => {
492
+ }), At = Le(() => {
492
493
  var n;
493
494
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
494
495
  return;
@@ -496,9 +497,9 @@ ${t}` : t, a = new S(i, r, G.User, n);
496
497
  const t = new S("", e.data.id, G.System);
497
498
  t.isWaiting = !0, y.current = [t, ...y.current], C(y.current), V(!0), O(!0), e.answerAgain();
498
499
  });
499
- F(() => {
500
+ E(() => {
500
501
  var t, n;
501
- Te.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !ze && ((n = ke.current) == null || n.clear());
502
+ Ee.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !ze && ((n = ke.current) == null || n.clear());
502
503
  }, [e]);
503
504
  const Yt = () => {
504
505
  var r;
@@ -507,16 +508,16 @@ ${t}` : t, a = new S(i, r, G.User, n);
507
508
  const n = h[h.length - 1].messageTime;
508
509
  e.fetchMessages({
509
510
  endTime: n,
510
- pageSize: lt
511
+ pageSize: dt
511
512
  }).then((i) => {
512
- const a = i || [];
513
- if (!a || !(a != null && a.length)) {
513
+ const l = i || [];
514
+ if (!l || !(l != null && l.length)) {
514
515
  Z(!1);
515
516
  return;
516
517
  }
517
- a.length < 10 ? Z(!1) : Z(!0), C([...h, ...a.reverse()]);
518
+ l.length < 10 ? Z(!1) : Z(!0), C([...h, ...l.reverse()]);
518
519
  });
519
- }, Kt = (t) => z(void 0, null, function* () {
520
+ }, Kt = (t) => j(void 0, null, function* () {
520
521
  var n, r;
521
522
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
522
523
  x(t);
@@ -525,22 +526,22 @@ ${t}` : t, a = new S(i, r, G.User, n);
525
526
  return;
526
527
  x(t);
527
528
  }
528
- }), xe = () => z(void 0, null, function* () {
529
+ }), xe = () => j(void 0, null, function* () {
529
530
  e ? e.fetchData().then((t) => {
530
531
  var n;
531
532
  (n = e == null ? void 0 : e.data) != null && n.id && (x(t.netOpen), Q(t.enableNetOpen));
532
533
  }) : (x(!1), Q(o.arrange[0].enableNetOpen));
533
534
  });
534
- F(() => {
535
+ E(() => {
535
536
  xe();
536
- }, [e]), F(() => {
537
+ }, [e]), E(() => {
537
538
  var t, n;
538
539
  if (R.current) {
539
- const r = document.getElementById("chat-main"), i = (t = R.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), a = (n = R.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
540
- if (!i || !a || !r)
540
+ const r = document.getElementById("chat-main"), i = (t = R.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), l = (n = R.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
541
+ if (!i || !l || !r)
541
542
  return;
542
543
  const s = r.offsetHeight;
543
- if (a.offsetHeight <= s) {
544
+ if (l.offsetHeight <= s) {
544
545
  if (i.style.height === "100%")
545
546
  return;
546
547
  i.style.height = "100%";
@@ -550,35 +551,35 @@ ${t}` : t, a = new S(i, r, G.User, n);
550
551
  i.style.height = "auto";
551
552
  }
552
553
  }
553
- }, [h]), F(() => {
554
+ }, [h]), E(() => {
554
555
  if (e)
555
556
  return;
556
557
  const t = () => {
557
- const i = ((N == null ? void 0 : N.promptVariables) || []).filter((a) => a.type ? !(a.type === ge.User && a.key === "query") && !(a.type === ge.System && a.key === "datetime") && a.status === 1 : a.key !== "query" && a.status === 1).map((a, s) => {
558
+ const i = ((N == null ? void 0 : N.promptVariables) || []).filter((l) => l.type ? !(l.type === ge.User && l.key === "query") && !(l.type === ge.System && l.key === "datetime") && l.status === 1 : l.key !== "query" && l.status === 1).map((l, s) => {
558
559
  var I, p;
559
560
  let d = "";
560
- return typeof (l == null ? void 0 : l.promptVariables) == "object" && (d = ((p = (I = l.promptVariables.default) == null ? void 0 : I.find((T) => T.key === a.key && T.type === a.type)) == null ? void 0 : p.value) || ""), {
561
+ return typeof (a == null ? void 0 : a.promptVariables) == "object" && (d = ((p = (I = a.promptVariables.default) == null ? void 0 : I.find((T) => T.key === l.key && T.type === l.type)) == null ? void 0 : p.value) || ""), {
561
562
  id: s + "",
562
- key: a.key,
563
- name: a.name,
563
+ key: l.key,
564
+ name: l.name,
564
565
  value: d,
565
- type: a.type
566
+ type: l.type
566
567
  };
567
568
  });
568
- ae([...i].sort((a, s) => a.key.localeCompare(s.key)));
569
+ ae([...i].sort((l, s) => l.key.localeCompare(s.key)));
569
570
  };
570
571
  return N != null && N.ready ? t() : N == null || N.addEventListener("ready", t), () => {
571
572
  N == null || N.removeEventListener("ready", t);
572
573
  };
573
- }, [e, N, l == null ? void 0 : l.promptVariables]);
574
- const Ye = () => w == null ? void 0 : w({
574
+ }, [e, N, a == null ? void 0 : a.promptVariables]);
575
+ const Ke = () => w == null ? void 0 : w({
575
576
  netOpen: H ? 1 : 2
576
577
  }).then((t) => {
577
578
  var n, r;
578
579
  return b == null || b(t), U(!1), x(!!((n = t.data) != null && n.netOpen)), Q(!!((r = t.data) != null && r.enableNetOpen)), qe(t), t;
579
- }), Ke = St(() => {
580
+ }), We = St(() => {
580
581
  var t;
581
- return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ c(dt, {
582
+ return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ c(ct, {
582
583
  application: o,
583
584
  history: {
584
585
  role: 1,
@@ -588,24 +589,24 @@ ${t}` : t, a = new S(i, r, G.User, n);
588
589
  sessionId: "",
589
590
  reference: [],
590
591
  searchReference: [],
591
- messageTime: ct(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
592
+ messageTime: ft(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
592
593
  actions: [],
593
594
  isLoading: !1
594
595
  },
595
596
  actions: !!h.length,
596
- markdown: l == null ? void 0 : l.markdown
597
+ markdown: a == null ? void 0 : a.markdown
597
598
  }) : null;
598
599
  }, [o == null ? void 0 : o.arrange, h]);
599
- return /* @__PURE__ */ q("div", {
600
+ return /* @__PURE__ */ $("div", {
600
601
  className: "agent-chat",
601
602
  children: [(g == null ? void 0 : g.promptVariables) && /* @__PURE__ */ c(vn, {
602
- ref: He,
603
+ ref: Me,
603
604
  appId: o.id,
604
605
  currentSession: e,
605
- promptVariables: E,
606
+ promptVariables: F,
606
607
  setPromptVariables: ae,
607
608
  setCurrentSession: b
608
- }), /* @__PURE__ */ q("div", {
609
+ }), /* @__PURE__ */ $("div", {
609
610
  className: "chat-main",
610
611
  id: "chat-main",
611
612
  style: mt,
@@ -619,8 +620,8 @@ ${t}` : t, a = new S(i, r, G.User, n);
619
620
  flexDirection: "column-reverse"
620
621
  },
621
622
  ref: R,
622
- onScroll: $t,
623
- children: (We = e == null ? void 0 : e.data) != null && We.id && (h != null && h.length) ? /* @__PURE__ */ q(bn, {
623
+ onScroll: Bt,
624
+ children: (Qe = e == null ? void 0 : e.data) != null && Qe.id && (h != null && h.length) ? /* @__PURE__ */ $(bn, {
624
625
  dataLength: h.length,
625
626
  next: Yt,
626
627
  style: {
@@ -629,12 +630,12 @@ ${t}` : t, a = new S(i, r, G.User, n);
629
630
  overflowX: "hidden"
630
631
  },
631
632
  inverse: !0,
632
- endMessage: h.length > lt && // 少于一页不展示这个提示
633
- ((Qe = R.current) != null && Qe.scrollTop) && ((_e = R.current) == null ? void 0 : _e.scrollTop) < -10 ? /* @__PURE__ */ c(en, {
633
+ endMessage: h.length > dt && // 少于一页不展示这个提示
634
+ ((_e = R.current) != null && _e.scrollTop) && ((Ge = R.current) == null ? void 0 : Ge.scrollTop) < -10 ? /* @__PURE__ */ c(en, {
634
635
  plain: !0,
635
636
  children: "没有更多数据了"
636
637
  }) : null,
637
- hasMore: je,
638
+ hasMore: Ve,
638
639
  loader: /* @__PURE__ */ c("div", {
639
640
  style: {
640
641
  height: "50px",
@@ -650,43 +651,44 @@ ${t}` : t, a = new S(i, r, G.User, n);
650
651
  history: t,
651
652
  docViewerUrl: v,
652
653
  isLastHistory: n === 0,
653
- onRelatedClick: At,
654
- onAgainClick: Bt,
655
- onEditClick: qt,
656
- markdown: l == null ? void 0 : l.markdown
657
- }, t.messageId + n)), !je && Ke]
658
- }) : /* @__PURE__ */ q("div", {
654
+ onRelatedClick: qt,
655
+ onAgainClick: At,
656
+ onEditClick: $t,
657
+ markdown: a == null ? void 0 : a.markdown
658
+ }, t.messageId + n)), !Ve && We]
659
+ }) : /* @__PURE__ */ $("div", {
659
660
  className: "main-empty",
660
- children: [(l == null ? void 0 : l.greeting) !== !1 && /* @__PURE__ */ c(gn, {
661
- text: l === void 0 || l.greeting === !0 || ((Ge = l.greeting) == null ? void 0 : Ge.text) === void 0 ? at.text : l.greeting.text,
662
- icon: l === void 0 || l.greeting === !0 || ((Xe = l.greeting) == null ? void 0 : Xe.icon) === void 0 ? yt || at.icon : l.greeting.icon,
663
- children: !!Ee.length && (((l == null ? void 0 : l.greeting) === void 0 || (l == null ? void 0 : l.greeting)) === !0 || typeof (l == null ? void 0 : l.greeting) == "object" && l.greeting.questions !== !1) && /* @__PURE__ */ c(fn, {
661
+ children: [(a == null ? void 0 : a.greeting) !== !1 && /* @__PURE__ */ c(gn, {
662
+ text: a === void 0 || a.greeting === !0 || ((Xe = a.greeting) == null ? void 0 : Xe.text) === void 0 ? lt.text : a.greeting.text,
663
+ icon: a === void 0 || a.greeting === !0 || ((Ze = a.greeting) == null ? void 0 : Ze.icon) === void 0 ? yt || lt.icon : a.greeting.icon,
664
+ children: !!Re.length && (((a == null ? void 0 : a.greeting) === void 0 || (a == null ? void 0 : a.greeting)) === !0 || typeof (a == null ? void 0 : a.greeting) == "object" && a.greeting.questions !== !1) && /* @__PURE__ */ c(fn, {
664
665
  ref: ke,
665
- sid: (Ze = e == null ? void 0 : e.data) == null ? void 0 : Ze.id,
666
- isRecommendClearing: Re,
667
- data: Ee,
666
+ sid: (Je = e == null ? void 0 : e.data) == null ? void 0 : Je.id,
667
+ isRecommendClearing: De,
668
+ data: Re,
669
+ layoutBreakpoints: typeof (a == null ? void 0 : a.greeting) == "object" ? a.greeting.layoutBreakpoints : void 0,
668
670
  onItemClick: (t) => {
669
- var r, i, a;
670
- if (ee(t == null ? void 0 : t.question), W(t == null ? void 0 : t.question), Re)
671
+ var r, i, l;
672
+ if (ee(t == null ? void 0 : t.question), W(t == null ? void 0 : t.question), De)
671
673
  return;
672
674
  t != null && t.id && K(!0);
673
675
  const n = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
674
- g != null && g.fileUpload ? (a = (i = se.current) == null ? void 0 : i.clear()) == null || a.then(() => {
676
+ g != null && g.fileUpload ? (l = (i = se.current) == null ? void 0 : i.clear()) == null || l.then(() => {
675
677
  var s, d;
676
- t != null && t.id && (n ? (s = Be(n, t)) == null || s.finally(() => {
678
+ t != null && t.id && (n ? (s = Ye(n, t)) == null || s.finally(() => {
677
679
  K(!1);
678
- }) : (K(!1), U(!0), (d = Ye()) == null || d.then((I) => {
680
+ }) : (K(!1), U(!0), (d = Ke()) == null || d.then((I) => {
679
681
  var p;
680
- (p = Be(I.id, t)) == null || p.finally(() => {
682
+ (p = Ye(I.id, t)) == null || p.finally(() => {
681
683
  K(!1);
682
684
  });
683
685
  })));
684
- }) : n ? K(!1) : (K(!1), U(!0), Ye());
686
+ }) : n ? K(!1) : (K(!1), U(!0), Ke());
685
687
  }
686
688
  })
687
- }), Ke]
689
+ }), We]
688
690
  })
689
- }), Oe && /* @__PURE__ */ c("div", {
691
+ }), Ue && /* @__PURE__ */ c("div", {
690
692
  className: "session-stop",
691
693
  children: /* @__PURE__ */ c(_, {
692
694
  type: "primary",
@@ -701,10 +703,10 @@ ${t}` : t, a = new S(i, r, G.User, n);
701
703
  fontSize: 16
702
704
  }
703
705
  }),
704
- onClick: () => jt(),
706
+ onClick: () => zt(),
705
707
  children: "停止回答"
706
708
  })
707
- }), Ue && (h == null ? void 0 : h.length) > 0 && /* @__PURE__ */ c("div", {
709
+ }), je && (h == null ? void 0 : h.length) > 0 && /* @__PURE__ */ c("div", {
708
710
  className: "back-bottom",
709
711
  children: /* @__PURE__ */ c(_, {
710
712
  size: "small",
@@ -722,24 +724,24 @@ ${t}` : t, a = new S(i, r, G.User, n);
722
724
  })]
723
725
  }), /* @__PURE__ */ c("div", {
724
726
  className: "chat-footer",
725
- children: /* @__PURE__ */ q("div", {
727
+ children: /* @__PURE__ */ $("div", {
726
728
  className: "chat-footer-input",
727
729
  children: [X && /* @__PURE__ */ c("div", {
728
730
  className: "input-files",
729
731
  children: /* @__PURE__ */ c(ln, {
730
732
  file: X,
731
733
  actions: {
732
- upload: zt,
734
+ upload: jt,
733
735
  remove: () => {
734
- B(void 0);
736
+ A(void 0);
735
737
  }
736
738
  },
737
739
  onUrlChange: (t) => ne(t)
738
740
  })
739
- }), /* @__PURE__ */ q(de, {
741
+ }), /* @__PURE__ */ $(de, {
740
742
  className: "footer-upload-action",
741
743
  onClick: (t) => t.preventDefault(),
742
- children: [/* @__PURE__ */ q(de, {
744
+ children: [/* @__PURE__ */ $(de, {
743
745
  children: [o.type === 2 && (g == null ? void 0 : g.imageUpload) && /* @__PURE__ */ c(nn, {
744
746
  disabled: !!X || M,
745
747
  accept: ".jpg, .png, .jpeg,.bmp",
@@ -790,20 +792,20 @@ ${t}` : t, a = new S(i, r, G.User, n);
790
792
  ref: se,
791
793
  isFirstSession: ze,
792
794
  docViewerUrl: v,
793
- onStatusChange: (t) => z(void 0, null, function* () {
795
+ onStatusChange: (t) => j(void 0, null, function* () {
794
796
  t !== "process" ? (re(!0), xe()) : re(!1);
795
797
  }),
796
798
  createSession: () => new Promise((t) => {
797
799
  U(!0), w == null || w({
798
800
  netOpen: H ? 1 : 2
799
801
  }).then((n) => {
800
- var i, a, s;
801
- b == null || b(n), U(!1), x(!!((i = n.data) != null && i.netOpen)), Q(!!((a = n.data) != null && a.enableNetOpen));
802
+ var i, l, s;
803
+ b == null || b(n), U(!1), x(!!((i = n.data) != null && i.netOpen)), Q(!!((l = n.data) != null && l.enableNetOpen));
802
804
  const r = ((s = n.data) == null ? void 0 : s.id) || "";
803
805
  t(r);
804
806
  });
805
807
  }),
806
- sid: (Je = e == null ? void 0 : e.data) == null ? void 0 : Je.id,
808
+ sid: (Se = e == null ? void 0 : e.data) == null ? void 0 : Se.id,
807
809
  disabled: be || M,
808
810
  afterFileAdd: (t, n) => {
809
811
  n && oe((r) => {
@@ -817,9 +819,9 @@ ${t}` : t, a = new S(i, r, G.User, n);
817
819
  var r;
818
820
  const n = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
819
821
  n && oe((i) => {
820
- const a = i[n] || [];
822
+ const l = i[n] || [];
821
823
  return {
822
- [n]: a.filter((s) => s.id !== t)
824
+ [n]: l.filter((s) => s.id !== t)
823
825
  };
824
826
  });
825
827
  },
@@ -837,23 +839,23 @@ ${t}` : t, a = new S(i, r, G.User, n);
837
839
  }) : null, (g == null ? void 0 : g.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ c(xn, {
838
840
  appId: o.id,
839
841
  list: [],
840
- search: De ? wt : "",
842
+ search: He ? wt : "",
841
843
  onPromptSelect: (t) => {
842
844
  W(t.context), ee(t.context);
843
845
  },
844
846
  disabled: M
845
847
  })]
846
- }), /* @__PURE__ */ q(de, {
847
- children: [(g == null ? void 0 : g.connectNetwork) && o.type === 0 && ((Se = o.arrange) == null ? void 0 : Se.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ c(wn, {
848
- sessionId: (et = e == null ? void 0 : e.data) == null ? void 0 : et.id,
848
+ }), /* @__PURE__ */ $(de, {
849
+ children: [(g == null ? void 0 : g.connectNetwork) && o.type === 0 && ((et = o.arrange) == null ? void 0 : et.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ c(wn, {
850
+ sessionId: (tt = e == null ? void 0 : e.data) == null ? void 0 : tt.id,
849
851
  netStatus: H,
850
- enable: typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.diabled) == "boolean" ? !(l != null && l.connectNetwork.diabled) : Ht,
852
+ enable: typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.diabled) == "boolean" ? !(a != null && a.connectNetwork.diabled) : Ht,
851
853
  disabledTip: e ? void 0 : "网络访问已被禁用",
852
854
  onNetStatusChange: (t) => {
853
855
  Kt(t);
854
856
  }
855
857
  }), (g == null ? void 0 : g.sessionList) && /* @__PURE__ */ c(kn, {
856
- currentSessionId: (tt = e == null ? void 0 : e.data) == null ? void 0 : tt.id,
858
+ currentSessionId: (nt = e == null ? void 0 : e.data) == null ? void 0 : nt.id,
857
859
  onSessionChange: (t, n) => {
858
860
  W(void 0), b == null || b(n);
859
861
  },
@@ -862,10 +864,10 @@ ${t}` : t, a = new S(i, r, G.User, n);
862
864
  icon: /* @__PURE__ */ c(mn, {}),
863
865
  className: "add-btn",
864
866
  type: "primary",
865
- disabled: Oe || !e || !h.length || M,
867
+ disabled: Ue || !e || !h.length || M,
866
868
  onClick: () => {
867
869
  var t, n;
868
- b == null || b(void 0), x(!1), (t = He.current) == null || t.clear(), (n = ke.current) == null || n.clear();
870
+ b == null || b(void 0), x(!1), (t = Me.current) == null || t.clear(), (n = ke.current) == null || n.clear();
869
871
  },
870
872
  children: "新会话"
871
873
  })]
@@ -877,13 +879,13 @@ ${t}` : t, a = new S(i, r, G.User, n);
877
879
  maxLength: pt,
878
880
  text: It,
879
881
  networkStatus: !1,
880
- loading: Ve,
881
- disabled: Pe || Fe || M || Ve,
882
+ loading: Be,
883
+ disabled: Te || Fe || M || Be,
882
884
  onTextSend: $e,
883
885
  onChange: (t, n) => {
884
886
  W(t);
885
887
  const r = n.getText().replace(/[\n\s]+$/, "");
886
- ee(r), xt(r), De || bt(!0);
888
+ ee(r), xt(r), He || bt(!0);
887
889
  },
888
890
  clearAction: /* @__PURE__ */ c(de, {
889
891
  size: 0,
@@ -905,12 +907,12 @@ ${t}` : t, a = new S(i, r, G.User, n);
905
907
  })
906
908
  }), /* @__PURE__ */ c(un, {
907
909
  tips: ht
908
- }), Me && /* @__PURE__ */ c(pn, {
909
- isvisible: Me,
910
+ }), Oe && /* @__PURE__ */ c(pn, {
911
+ isvisible: Oe,
910
912
  files: Ct,
911
- sessionId: (nt = e == null ? void 0 : e.data) == null ? void 0 : nt.id,
913
+ sessionId: (it = e == null ? void 0 : e.data) == null ? void 0 : it.id,
912
914
  onClose: (t) => {
913
- Lt(!1), Ft(!1);
915
+ Lt(!1), Et(!1);
914
916
  }
915
917
  })]
916
918
  });