@glodon-aiot/agent-cli-ui 3.2.2-beta.1 → 3.2.2-beta.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.
@@ -12,7 +12,7 @@ var ke = (x, o, g) => o in x ? $t(x, o, { enumerable: !0, configurable: !0, writ
12
12
  }, be = (x, o) => At(x, Bt(o));
13
13
  var P = (x, o, g) => (ke(x, typeof o != "symbol" ? o + "" : o, g), g);
14
14
  var U = (x, o, g) => new Promise((e, k) => {
15
- var ae = (w) => {
15
+ var re = (w) => {
16
16
  try {
17
17
  D(g.next(w));
18
18
  } catch (u) {
@@ -24,13 +24,13 @@ var U = (x, o, g) => new Promise((e, k) => {
24
24
  } catch (u) {
25
25
  k(u);
26
26
  }
27
- }, D = (w) => w.done ? e(w.value) : Promise.resolve(w.value).then(ae, v);
27
+ }, D = (w) => w.done ? e(w.value) : Promise.resolve(w.value).then(re, v);
28
28
  D((g = g.apply(x, o)).next());
29
29
  });
30
- import { jsx as a, jsxs as $ } from "../../_virtual/jsx-runtime.mjs";
30
+ import { jsx as r, jsxs as $ } from "../../_virtual/jsx-runtime.mjs";
31
31
  import { memo as Yt, useState as p, useRef as A, useContext as Wt, useEffect as N, useMemo as Qt } from "react";
32
32
  import "./style.less.mjs";
33
- import { Divider as _t, Spin as Gt, Button as W, Space as re, Upload as Xt, Tooltip as Zt, message as R, notification as Jt } from "antd";
33
+ import { Divider as _t, Spin as Gt, Button as W, Space as ae, Upload as Xt, Tooltip as Zt, message as R, notification as Jt } from "antd";
34
34
  import xe from "../../Iconfont/index.mjs";
35
35
  import { IHistoryRole as Q, ChatMessageRole as Se } from "@glodon-aiot/apis";
36
36
  import nt from "../HistoryItem/index.mjs";
@@ -42,8 +42,8 @@ import { getImageExtension as nn } from "../../utils/index.mjs";
42
42
  import on from "../../QuillEditor/index.mjs";
43
43
  import sn from "../Recommend/index.mjs";
44
44
  import ln from "../Greeting/index.mjs";
45
- import rn from "../PromptManager/index.mjs";
46
- import an from "../../Footer/index.mjs";
45
+ import an from "../PromptManager/index.mjs";
46
+ import rn from "../../Footer/index.mjs";
47
47
  import { CameraOutlined as et, PlusOutlined as dn } from "@ant-design/icons";
48
48
  import cn from "../UploadKnowledgeFiles/index.mjs";
49
49
  import fn from "../UploadingPrompt/index.mjs";
@@ -81,7 +81,7 @@ const tt = 10, Qn = (x) => {
81
81
  docViewerUrl: g = "",
82
82
  currentSession: e,
83
83
  onCreateSession: k,
84
- embeddingService: ae,
84
+ embeddingService: re,
85
85
  setCurrentSession: v,
86
86
  networkStatus: D,
87
87
  setNetworkStatus: w
@@ -89,16 +89,16 @@ const tt = 10, Qn = (x) => {
89
89
  service: C,
90
90
  agentClient: L,
91
91
  depId: lt,
92
- footer: rt,
92
+ footer: at,
93
93
  transform: c,
94
94
  defaultInput: ce,
95
95
  onMessage: S,
96
96
  onHistoryLoad: Ce,
97
97
  beforeMessageSend: z,
98
- bodyStyle: at,
98
+ bodyStyle: rt,
99
99
  disabled: H,
100
100
  features: f
101
- } = Wt(St), [Ne, fe] = p(!1), h = A(u), Fe = A(), [dt, ct] = p(0), [_, B] = p(), [q, ee] = p(""), [Te, ue] = p(!1), pe = A(null), [Ee, ft] = p([]), [Pe, G] = p(!1), [Re, ut] = p(!1), [pt, ht] = p(""), [gt, K] = p(), [te, ne] = p({}), ie = A(null), De = A(null), he = A(null), [He, mt] = p(!1), [yt, vt] = p([]), [kt, oe] = p(!0), [wt, bt] = p(!0), [Me, M] = p(!1), [ge, j] = p(!1), [Oe, xt] = p(!1), [F, se] = p(typeof (f == null ? void 0 : f.promptVariables) == "object" ? f.promptVariables.default || [] : []), [It, Lt] = p(typeof (f == null ? void 0 : f.knowledges) == "object" && f.knowledges.default || void 0), [Ue, O] = p(!1), [ze, X] = p(!0), [Ct, Y] = p(typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.default) == "boolean" ? f.connectNetwork.default : !1), [je, le] = p(!1);
101
+ } = Wt(St), [Ne, fe] = p(!1), h = A(u), Fe = A(), [dt, ct] = p(0), [_, B] = p(), [q, ee] = p(""), [Te, ue] = p(!1), pe = A(null), [Ee, ft] = p([]), [Pe, G] = p(!1), [Re, ut] = p(!1), [pt, ht] = p(""), [gt, K] = p(), [te, ne] = p({}), ie = A(null), De = A(null), he = A(null), [He, mt] = p(!1), [yt, vt] = p([]), [kt, oe] = p(!0), [wt, bt] = p(!0), [Me, M] = p(!1), [ge, j] = p(!1), [Oe, xt] = p(!1), [F, se] = p(typeof (f == null ? void 0 : f.promptVariables) == "object" ? f.promptVariables.default || [] : []), [It, Lt] = p(typeof (f == null ? void 0 : f.knowledges) == "object" && f.knowledges.default || void 0), [Ue, O] = p(!1), [ze, X] = p(!1), [Ct, Y] = p(typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.default) == "boolean" ? f.connectNetwork.default : !1), [je, le] = p(!1);
102
102
  N(() => {
103
103
  var l, i;
104
104
  e && (h.current = []), I([]);
@@ -111,12 +111,12 @@ const tt = 10, Qn = (x) => {
111
111
  const s = [...e.messages.filter((d) => d == null ? void 0 : d.messageId)].reverse();
112
112
  h.current = [...s], I([...s]);
113
113
  }
114
- const n = (r) => {
114
+ const n = (a) => {
115
115
  var s;
116
- (s = e == null ? void 0 : e.data) != null && s.id && (h.current = [...r].reverse(), I([...r].reverse()), !r || r.length < 10 ? X(!1) : X(!0), Ce && Ce({
116
+ (s = e == null ? void 0 : e.data) != null && s.id && (h.current = [...a].reverse(), I([...a].reverse()), !a || a.length < 10 ? X(!1) : X(!0), Ce && Ce({
117
117
  applicationId: o.id,
118
118
  sessionId: e.data.id,
119
- histories: r
119
+ histories: a
120
120
  }));
121
121
  };
122
122
  return e.addEventListener("history:loaded", n), () => {
@@ -192,7 +192,7 @@ const tt = 10, Qn = (x) => {
192
192
  return;
193
193
  }
194
194
  le(!0);
195
- const r = q ? `![](${q})
195
+ const a = q ? `![](${q})
196
196
  ${n}` : n;
197
197
  let s;
198
198
  try {
@@ -200,7 +200,7 @@ ${n}` : n;
200
200
  applicationId: o.id,
201
201
  sessionId: i,
202
202
  message: {
203
- content: r,
203
+ content: a,
204
204
  sessionId: i,
205
205
  role: Se.User,
206
206
  files: te[i]
@@ -225,9 +225,9 @@ ${n}` : n;
225
225
  if (oe(!1), !((s = e == null ? void 0 : e.data) != null && s.id) || !(o != null && o.id))
226
226
  return;
227
227
  const n = ((d = e.data) == null ? void 0 : d.id) || "", l = [];
228
- let i = [], r = /* @__PURE__ */ new Set();
228
+ let i = [], a = /* @__PURE__ */ new Set();
229
229
  (b = te[n]) == null || b.forEach((m) => {
230
- r.has(m.id) || (i.push(m), r.add(m.id));
230
+ a.has(m.id) || (i.push(m), a.add(m.id));
231
231
  }), Promise.all(i.map((m) => C == null ? void 0 : C.patchApplicationIdKnowledgeIdFileId(o == null ? void 0 : o.id, n, m.id, {
232
232
  enabled: 1
233
233
  }).then((y) => {
@@ -257,7 +257,7 @@ ${t}` : t;
257
257
  files: te[e.id]
258
258
  }
259
259
  }) : i = !0;
260
- } catch (r) {
260
+ } catch (a) {
261
261
  i = !1;
262
262
  }
263
263
  le(!1), i !== !1 && (me(t), Le(void 0));
@@ -273,11 +273,11 @@ ${t}` : t;
273
273
  return;
274
274
  j(!0), M(!0);
275
275
  const i = q ? `![](${q})
276
- ${t}` : t, r = new Z(i, l, Q.User, n);
277
- J(void 0), K(void 0), h.current = [r, ...u], I(h.current), o.id && S && S({
276
+ ${t}` : t, a = new Z(i, l, Q.User, n);
277
+ J(void 0), K(void 0), h.current = [a, ...u], I(h.current), o.id && S && S({
278
278
  applicationId: o.id,
279
279
  sessionId: l,
280
- message: r
280
+ message: a
281
281
  });
282
282
  const s = new Z("", l, Q.System);
283
283
  s.isWaiting = !0, h.current = [s, ...h.current], I(h.current);
@@ -312,8 +312,8 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
312
312
  return Jt.error({
313
313
  message: i.content
314
314
  });
315
- const r = i.actions || [], s = new Z(i.content, t, Q.Robot);
316
- s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = r, s.isLoading = !0, h.current = h.current.filter((d) => !d.isWaiting).filter((d) => !d.isReplying), i.index === void 0 && I([s, ...h.current]), i.code === 11915 && (M(!1), j(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, I([s, ...h.current])), i.index === -2 && (M(!1), j(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, I([s, ...h.current])), i.index === -1 && (M(!1), j(!1), s.isLoading = !1, s.reference = i.reference, I([s, ...h.current]), o.id && S && S({
315
+ const a = i.actions || [], s = new Z(i.content, t, Q.Robot);
316
+ 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, h.current = h.current.filter((d) => !d.isWaiting).filter((d) => !d.isReplying), i.index === void 0 && I([s, ...h.current]), i.code === 11915 && (M(!1), j(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, I([s, ...h.current])), i.index === -2 && (M(!1), j(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, I([s, ...h.current])), i.index === -1 && (M(!1), j(!1), s.isLoading = !1, s.reference = i.reference, I([s, ...h.current]), o.id && S && S({
317
317
  applicationId: o.id,
318
318
  sessionId: t,
319
319
  message: s
@@ -352,21 +352,21 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
352
352
  O(!0), k == null || k({
353
353
  netOpen: D ? 1 : 2
354
354
  }).then((i) => {
355
- var r, s;
356
- v == null || v(i), O(!1), w(!!((r = i.data) != null && r.netOpen)), Y(!!((s = i.data) != null && s.enableNetOpen)), l($e(i, t));
355
+ var a, s;
356
+ v == null || v(i), O(!1), w(!!((a = i.data) != null && a.netOpen)), Y(!!((s = i.data) != null && s.enableNetOpen)), l($e(i, t));
357
357
  });
358
358
  });
359
359
  }), $e = (t, n) => {
360
360
  const l = nn(n.name);
361
361
  return new Promise((i) => {
362
362
  var s;
363
- const r = {
363
+ const a = {
364
364
  files: [`${ot()}.${l}`],
365
365
  isv: "minio",
366
366
  knowledgeId: ((s = t.data) == null ? void 0 : s.id) || "",
367
367
  type: 1
368
368
  };
369
- ue(!0), C == null || C.postTicket(r).then((d) => {
369
+ ue(!0), C == null || C.postTicket(a).then((d) => {
370
370
  C.uploadMinioFile(d.minio, n).then(() => {
371
371
  var T, V;
372
372
  const b = (T = d.minio.endpoints) == null ? void 0 : T[0], m = d.minio.bucket, y = (V = d.minio.fileKeys) == null ? void 0 : V[0];
@@ -394,8 +394,8 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
394
394
  type: 1
395
395
  });
396
396
  C == null || C.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, i).finally(() => {
397
- var r;
398
- (r = ie.current) == null || r.update().finally(l);
397
+ var a;
398
+ (a = ie.current) == null || a.update().finally(l);
399
399
  });
400
400
  }), Dt = () => {
401
401
  var t;
@@ -439,12 +439,12 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
439
439
  endTime: n,
440
440
  pageSize: tt
441
441
  }).then((i) => {
442
- const r = i || [];
443
- if (!r || !(r != null && r.length)) {
442
+ const a = i || [];
443
+ if (!a || !(a != null && a.length)) {
444
444
  X(!1);
445
445
  return;
446
446
  }
447
- r.length < 10 ? X(!1) : X(!0), I([...u, ...r.reverse()]);
447
+ a.length < 10 ? X(!1) : X(!0), I([...u, ...a.reverse()]);
448
448
  });
449
449
  }, Vt = (t) => U(void 0, null, function* () {
450
450
  var n, l;
@@ -466,11 +466,11 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
466
466
  }, [e]), N(() => {
467
467
  var t, n;
468
468
  if (E.current) {
469
- const l = document.getElementById("chat-main"), i = (t = E.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), r = (n = E.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
470
- if (!i || !r || !l)
469
+ const l = document.getElementById("chat-main"), i = (t = E.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), a = (n = E.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
470
+ if (!i || !a || !l)
471
471
  return;
472
472
  const s = l.offsetHeight;
473
- if (r.offsetHeight <= s) {
473
+ if (a.offsetHeight <= s) {
474
474
  if (i.style.height === "100%")
475
475
  return;
476
476
  i.style.height = "100%";
@@ -485,19 +485,19 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
485
485
  return;
486
486
  const t = () => {
487
487
  const i = ((L == null ? void 0 : L.promptVariables) || []).filter(
488
- (r) => r.key !== "query" && r.status === 1
488
+ (a) => a.key !== "query" && a.status === 1
489
489
  // 只要求输入被引用的变量
490
- ).map((r, s) => {
490
+ ).map((a, s) => {
491
491
  var b, m;
492
492
  let d = "";
493
- return typeof (f == null ? void 0 : f.promptVariables) == "object" && (d = ((m = (b = f.promptVariables.default) == null ? void 0 : b.find((y) => y.key === r.key)) == null ? void 0 : m.value) || ""), {
493
+ return typeof (f == null ? void 0 : f.promptVariables) == "object" && (d = ((m = (b = f.promptVariables.default) == null ? void 0 : b.find((y) => y.key === a.key)) == null ? void 0 : m.value) || ""), {
494
494
  id: s + "",
495
- key: r.key,
496
- name: r.name,
495
+ key: a.key,
496
+ name: a.name,
497
497
  value: d
498
498
  };
499
499
  });
500
- se([...i].sort((r, s) => r.key.localeCompare(s.key)));
500
+ se([...i].sort((a, s) => a.key.localeCompare(s.key)));
501
501
  };
502
502
  return L != null && L.ready ? t() : L == null || L.addEventListener("ready", t), () => {
503
503
  L == null || L.removeEventListener("ready", t);
@@ -512,7 +512,7 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
512
512
  });
513
513
  }, ve = Qt(() => {
514
514
  var t;
515
- return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ a(nt, {
515
+ return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ r(nt, {
516
516
  application: o,
517
517
  history: {
518
518
  role: 1,
@@ -531,7 +531,7 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
531
531
  }, [o == null ? void 0 : o.arrange, u]);
532
532
  return console.log("openingMessage", ve), /* @__PURE__ */ $("div", {
533
533
  className: "agent-chat",
534
- children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ a(un, {
534
+ children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ r(un, {
535
535
  ref: De,
536
536
  appId: o.id,
537
537
  currentSession: e,
@@ -541,8 +541,8 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
541
541
  }), /* @__PURE__ */ $("div", {
542
542
  className: "chat-main",
543
543
  id: "chat-main",
544
- style: at,
545
- children: [/* @__PURE__ */ a("div", {
544
+ style: rt,
545
+ children: [/* @__PURE__ */ r("div", {
546
546
  className: "chat-main-wrapper",
547
547
  id: "scrollableDiv",
548
548
  style: {
@@ -563,21 +563,21 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
563
563
  },
564
564
  inverse: !0,
565
565
  endMessage: u.length > tt && // 少于一页不展示这个提示
566
- ((qe = E.current) != null && qe.scrollTop) && ((Ke = E.current) == null ? void 0 : Ke.scrollTop) < -10 ? /* @__PURE__ */ a(_t, {
566
+ ((qe = E.current) != null && qe.scrollTop) && ((Ke = E.current) == null ? void 0 : Ke.scrollTop) < -10 ? /* @__PURE__ */ r(_t, {
567
567
  plain: !0,
568
568
  children: "没有更多数据了"
569
569
  }) : null,
570
570
  hasMore: ze,
571
- loader: /* @__PURE__ */ a("div", {
571
+ loader: /* @__PURE__ */ r("div", {
572
572
  style: {
573
573
  height: "50px",
574
574
  textAlign: "center",
575
575
  overflow: "hidden"
576
576
  },
577
- children: /* @__PURE__ */ a(Gt, {})
577
+ children: /* @__PURE__ */ r(Gt, {})
578
578
  }),
579
579
  scrollableTarget: "scrollableDiv",
580
- children: [u.map((t, n) => /* @__PURE__ */ a(yn, {
580
+ children: [u.map((t, n) => /* @__PURE__ */ r(yn, {
581
581
  application: o,
582
582
  currentSession: e,
583
583
  history: t,
@@ -589,19 +589,19 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
589
589
  }, t.messageId + n)), !ze && ve]
590
590
  }) : /* @__PURE__ */ $("div", {
591
591
  className: "main-empty",
592
- children: [/* @__PURE__ */ a(ln, be(we({}, vn), {
593
- children: !!Ee.length && /* @__PURE__ */ a(sn, {
592
+ children: [/* @__PURE__ */ r(ln, be(we({}, vn), {
593
+ children: !!Ee.length && /* @__PURE__ */ r(sn, {
594
594
  ref: he,
595
595
  sid: (Ye = e == null ? void 0 : e.data) == null ? void 0 : Ye.id,
596
596
  isRecommendClearing: Pe,
597
597
  data: Ee,
598
598
  onItemClick: (t) => {
599
- var l, i, r;
599
+ var l, i, a;
600
600
  if (J(t == null ? void 0 : t.question), K(t == null ? void 0 : t.question), Pe)
601
601
  return;
602
602
  t != null && t.id && G(!0);
603
603
  const n = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
604
- c != null && c.fileUpload ? (r = (i = ie.current) == null ? void 0 : i.clear()) == null || r.then(() => {
604
+ c != null && c.fileUpload ? (a = (i = ie.current) == null ? void 0 : i.clear()) == null || a.then(() => {
605
605
  var s;
606
606
  t != null && t.id && (n ? (s = Rt(n, t)) == null || s.finally(() => {
607
607
  G(!1);
@@ -611,16 +611,16 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
611
611
  })
612
612
  })), ve]
613
613
  })
614
- }), Me && /* @__PURE__ */ a("div", {
614
+ }), Me && /* @__PURE__ */ r("div", {
615
615
  className: "session-stop",
616
- children: /* @__PURE__ */ a(W, {
616
+ children: /* @__PURE__ */ r(W, {
617
617
  type: "primary",
618
618
  style: {
619
619
  background: "white"
620
620
  },
621
621
  ghost: !0,
622
622
  size: "small",
623
- icon: /* @__PURE__ */ a(xe, {
623
+ icon: /* @__PURE__ */ r(xe, {
624
624
  type: "icon-zantinghuida",
625
625
  style: {
626
626
  fontSize: 16
@@ -629,15 +629,15 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
629
629
  onClick: () => Dt(),
630
630
  children: "停止回答"
631
631
  })
632
- }), Oe && (u == null ? void 0 : u.length) > 0 && /* @__PURE__ */ a("div", {
632
+ }), Oe && (u == null ? void 0 : u.length) > 0 && /* @__PURE__ */ r("div", {
633
633
  className: "back-bottom",
634
- children: /* @__PURE__ */ a(W, {
634
+ children: /* @__PURE__ */ r(W, {
635
635
  size: "small",
636
636
  onClick: () => Ht({
637
637
  behavior: "smooth"
638
638
  }),
639
639
  type: "link",
640
- icon: /* @__PURE__ */ a(xe, {
640
+ icon: /* @__PURE__ */ r(xe, {
641
641
  type: "icon-yijianhuidaodibu",
642
642
  style: {
643
643
  fontSize: 24
@@ -645,13 +645,13 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
645
645
  })
646
646
  })
647
647
  })]
648
- }), /* @__PURE__ */ a("div", {
648
+ }), /* @__PURE__ */ r("div", {
649
649
  className: "chat-footer",
650
650
  children: /* @__PURE__ */ $("div", {
651
651
  className: "chat-footer-input",
652
- children: [_ && /* @__PURE__ */ a("div", {
652
+ children: [_ && /* @__PURE__ */ r("div", {
653
653
  className: "input-files",
654
- children: /* @__PURE__ */ a(tn, {
654
+ children: /* @__PURE__ */ r(tn, {
655
655
  file: _,
656
656
  actions: {
657
657
  upload: Pt,
@@ -661,18 +661,18 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
661
661
  },
662
662
  onUrlChange: (t) => ee(t)
663
663
  })
664
- }), /* @__PURE__ */ $(re, {
664
+ }), /* @__PURE__ */ $(ae, {
665
665
  className: "footer-upload-action",
666
666
  onClick: (t) => t.preventDefault(),
667
- children: [/* @__PURE__ */ $(re, {
668
- children: [o.type === 2 && (c == null ? void 0 : c.imageUpload) && /* @__PURE__ */ a(Xt, {
667
+ children: [/* @__PURE__ */ $(ae, {
668
+ children: [o.type === 2 && (c == null ? void 0 : c.imageUpload) && /* @__PURE__ */ r(Xt, {
669
669
  disabled: !!_ || H,
670
670
  accept: ".jpg, .png, .jpeg,.bmp",
671
671
  listType: "picture-card",
672
672
  beforeUpload: Et,
673
673
  className: "footer-upload-picture",
674
674
  showUploadList: !1,
675
- children: _ ? /* @__PURE__ */ a(W, {
675
+ children: _ ? /* @__PURE__ */ r(W, {
676
676
  type: "text",
677
677
  className: "camera-out-btn",
678
678
  style: {
@@ -681,19 +681,19 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
681
681
  bottom: "-2px"
682
682
  },
683
683
  disabled: !!_ || H,
684
- icon: /* @__PURE__ */ a(et, {
684
+ icon: /* @__PURE__ */ r(et, {
685
685
  className: "icon-tianjia",
686
686
  style: {
687
687
  fontSize: "22px"
688
688
  }
689
689
  })
690
- }) : /* @__PURE__ */ a(Zt, {
690
+ }) : /* @__PURE__ */ r(Zt, {
691
691
  placement: "topLeft",
692
692
  overlayClassName: "footer-upload-tooltip",
693
- title: /* @__PURE__ */ a("div", {
693
+ title: /* @__PURE__ */ r("div", {
694
694
  children: "支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"
695
695
  }),
696
- children: /* @__PURE__ */ a(W, {
696
+ children: /* @__PURE__ */ r(W, {
697
697
  type: "text",
698
698
  className: "camera-out-btn",
699
699
  style: {
@@ -701,7 +701,7 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
701
701
  position: "relative",
702
702
  bottom: "-2px"
703
703
  },
704
- icon: /* @__PURE__ */ a(et, {
704
+ icon: /* @__PURE__ */ r(et, {
705
705
  className: "icon-tianjia",
706
706
  style: {
707
707
  fontSize: "22px"
@@ -709,7 +709,7 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
709
709
  })
710
710
  })
711
711
  })
712
- }), ae && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ a(cn, {
712
+ }), re && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ r(cn, {
713
713
  appId: o == null ? void 0 : o.id,
714
714
  ref: ie,
715
715
  isFirstSession: Ue,
@@ -721,8 +721,8 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
721
721
  O(!0), k == null || k({
722
722
  netOpen: D ? 1 : 2
723
723
  }).then((n) => {
724
- var i, r, s;
725
- v == null || v(n), O(!1), w(!!((i = n.data) != null && i.netOpen)), Y(!!((r = n.data) != null && r.enableNetOpen));
724
+ var i, a, s;
725
+ v == null || v(n), O(!1), w(!!((i = n.data) != null && i.netOpen)), Y(!!((a = n.data) != null && a.enableNetOpen));
726
726
  const l = ((s = n.data) == null ? void 0 : s.id) || "";
727
727
  t(l);
728
728
  });
@@ -741,9 +741,9 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
741
741
  var l;
742
742
  const n = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
743
743
  n && ne((i) => {
744
- const r = i[n] || [];
744
+ const a = i[n] || [];
745
745
  return {
746
- [n]: r.filter((s) => s.id !== t)
746
+ [n]: a.filter((s) => s.id !== t)
747
747
  };
748
748
  });
749
749
  },
@@ -758,7 +758,7 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
758
758
  [t]: []
759
759
  }), ye());
760
760
  }
761
- }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ a(rn, {
761
+ }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ r(an, {
762
762
  appId: o.id,
763
763
  list: [],
764
764
  search: Re ? pt : "",
@@ -767,8 +767,8 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
767
767
  },
768
768
  disabled: H
769
769
  })]
770
- }), /* @__PURE__ */ $(re, {
771
- children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((Qe = o.arrange) == null ? void 0 : Qe.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ a(gn, {
770
+ }), /* @__PURE__ */ $(ae, {
771
+ children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((Qe = o.arrange) == null ? void 0 : Qe.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ r(gn, {
772
772
  sessionId: (_e = e == null ? void 0 : e.data) == null ? void 0 : _e.id,
773
773
  netStatus: D,
774
774
  enable: typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.diabled) == "boolean" ? !(f != null && f.connectNetwork.diabled) : Ct,
@@ -776,14 +776,14 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
776
776
  onNetStatusChange: (t) => {
777
777
  Vt(t);
778
778
  }
779
- }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ a(pn, {
779
+ }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ r(pn, {
780
780
  currentSessionId: (Ge = e == null ? void 0 : e.data) == null ? void 0 : Ge.id,
781
781
  onSessionChange: (t, n) => {
782
782
  K(void 0), v == null || v(n);
783
783
  },
784
784
  disabled: H
785
- }), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ a(W, {
786
- icon: /* @__PURE__ */ a(dn, {}),
785
+ }), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ r(W, {
786
+ icon: /* @__PURE__ */ r(dn, {}),
787
787
  className: "add-btn",
788
788
  type: "primary",
789
789
  disabled: Me || !e || !u.length || H,
@@ -794,9 +794,9 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
794
794
  children: "新会话"
795
795
  })]
796
796
  })]
797
- }), /* @__PURE__ */ a("div", {
797
+ }), /* @__PURE__ */ r("div", {
798
798
  className: "footer-textarea",
799
- children: /* @__PURE__ */ a(on, {
799
+ children: /* @__PURE__ */ r(on, {
800
800
  ref: pe,
801
801
  maxLength: dt,
802
802
  text: gt,
@@ -809,13 +809,13 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
809
809
  const l = n.getText().replace(/[\n\s]+$/, "");
810
810
  J(l), ht(l), Re || ut(!0);
811
811
  },
812
- clearAction: /* @__PURE__ */ a(re, {
812
+ clearAction: /* @__PURE__ */ r(ae, {
813
813
  size: 0,
814
- children: /* @__PURE__ */ a(W, {
814
+ children: /* @__PURE__ */ r(W, {
815
815
  type: "link",
816
816
  disabled: ge || H,
817
817
  ghost: !0,
818
- icon: /* @__PURE__ */ a(xe, {
818
+ icon: /* @__PURE__ */ r(xe, {
819
819
  style: {
820
820
  fontSize: 22
821
821
  },
@@ -827,9 +827,9 @@ ${t}` : t, r = new Z(i, l, Q.User, n);
827
827
  })
828
828
  })]
829
829
  })
830
- }), /* @__PURE__ */ a(an, {
831
- tips: rt
832
- }), He && /* @__PURE__ */ a(fn, {
830
+ }), /* @__PURE__ */ r(rn, {
831
+ tips: at
832
+ }), He && /* @__PURE__ */ r(fn, {
833
833
  isvisible: He,
834
834
  files: yt,
835
835
  sessionId: (Xe = e == null ? void 0 : e.data) == null ? void 0 : Xe.id,