@glodon-aiot/agent-cli-ui 3.5.1 → 3.5.2-beta.0

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,154 +1,154 @@
1
- var fn = Object.defineProperty, gn = Object.defineProperties;
2
- var un = Object.getOwnPropertyDescriptors;
3
- var pt = Object.getOwnPropertySymbols;
4
- var mn = Object.prototype.hasOwnProperty, hn = Object.prototype.propertyIsEnumerable;
5
- var Te = (k, h, o) => h in k ? fn(k, h, { enumerable: !0, configurable: !0, writable: !0, value: o }) : k[h] = o, Oe = (k, h) => {
1
+ var un = Object.defineProperty, mn = Object.defineProperties;
2
+ var hn = Object.getOwnPropertyDescriptors;
3
+ var bt = Object.getOwnPropertySymbols;
4
+ var yn = Object.prototype.hasOwnProperty, pn = Object.prototype.propertyIsEnumerable;
5
+ var Oe = (k, h, o) => h in k ? un(k, h, { enumerable: !0, configurable: !0, writable: !0, value: o }) : k[h] = o, He = (k, h) => {
6
6
  for (var o in h || (h = {}))
7
- mn.call(h, o) && Te(k, o, h[o]);
8
- if (pt)
9
- for (var o of pt(h))
10
- hn.call(h, o) && Te(k, o, h[o]);
7
+ yn.call(h, o) && Oe(k, o, h[o]);
8
+ if (bt)
9
+ for (var o of bt(h))
10
+ pn.call(h, o) && Oe(k, o, h[o]);
11
11
  return k;
12
- }, He = (k, h) => gn(k, un(h));
13
- var F = (k, h, o) => (Te(k, typeof h != "symbol" ? h + "" : h, o), o);
14
- var z = (k, h, o) => new Promise((j, e) => {
15
- var w = (E) => {
12
+ }, Re = (k, h) => mn(k, hn(h));
13
+ var j = (k, h, o) => (Oe(k, typeof h != "symbol" ? h + "" : h, o), o);
14
+ var z = (k, h, o) => new Promise((M, e) => {
15
+ var w = (P) => {
16
16
  try {
17
- v(o.next(E));
18
- } catch (P) {
19
- e(P);
17
+ v(o.next(P));
18
+ } catch (E) {
19
+ e(E);
20
20
  }
21
- }, _ = (E) => {
21
+ }, G = (P) => {
22
22
  try {
23
- v(o.throw(E));
24
- } catch (P) {
25
- e(P);
23
+ v(o.throw(P));
24
+ } catch (E) {
25
+ e(E);
26
26
  }
27
- }, v = (E) => E.done ? j(E.value) : Promise.resolve(E.value).then(w, _);
27
+ }, v = (P) => P.done ? M(P.value) : Promise.resolve(P.value).then(w, G);
28
28
  v((o = o.apply(k, h)).next());
29
29
  });
30
- import { jsx as d, jsxs as V, Fragment as yn } from "react/jsx-runtime";
31
- import { memo as pn, forwardRef as vn, useState as m, useRef as K, useContext as bn, useEffect as L, useMemo as xn, useImperativeHandle as kn } from "react";
32
- /* empty css */import { Spin as vt, Divider as wn, Button as Q, Space as ve, Upload as Cn, Tooltip as In, Popover as Nn, notification as ee, message as u } from "antd";
33
- import re from "../../components/Iconfont/index.mjs";
34
- import { IHistoryRole as te, ApplicationTypes as wt, ChatMessageRole as bt, PromptVariableType as be } from "@glodon-aiot/apis";
35
- import Ct from "./HistoryItem/index.mjs";
36
- import It from "dayjs";
37
- import { v4 as Fe } from "uuid";
38
- import Ln from "../../context.mjs";
39
- import { configuration as En } from "@glodon-aiot/bot-client-sdk";
40
- import { NET_OPEN_STATUS as W, MB as Pn } from "../../constant.mjs";
41
- import Tn from "../../components/FilePreview/index.mjs";
42
- import { getImageExtension as On } from "../../utils/index.mjs";
43
- import Hn from "../../QuillEditor/index.mjs";
44
- import Rn from "../../components/Recommend/index.mjs";
45
- import Dn from "../../components/Greeting/index.mjs";
46
- import Fn from "../../Footer/index.mjs";
47
- import { CameraOutlined as jn, PlusOutlined as Mn } from "@ant-design/icons";
48
- import Un from "./Tools/UploadKnowledgeFiles/index.mjs";
49
- import zn from "../UploadingPrompt/index.mjs";
50
- import Vn from "./PromptSetting/index.mjs";
51
- import { useMemoizedFn as Re } from "ahooks";
52
- import An from "./Tools/SessionListDrawer/index.mjs";
53
- import $n from "./Tools/SessionHistoryDrawer/index.mjs";
54
- import qn from "react-infinite-scroll-component";
55
- import Bn from "./Tools/ConnectToNetwork/index.mjs";
56
- import Wn from "./Tools/PromptManager/index.mjs";
57
- import { useSessionState as Yn } from "../../hooks/useSessionState.mjs";
58
- import Kn from "../../assets/icon.svg.mjs";
59
- const Qn = pn(Ct), xt = {
60
- icon: Kn,
30
+ import { jsx as d, jsxs as A, Fragment as vn } from "react/jsx-runtime";
31
+ import { memo as bn, forwardRef as xn, useState as m, useRef as Q, useContext as kn, useEffect as N, useMemo as wn, useImperativeHandle as Cn } from "react";
32
+ /* empty css */import { Spin as xt, Divider as In, Button as _, Space as be, Upload as Nn, Tooltip as Ln, Popover as Pn, notification as te, message as u } from "antd";
33
+ import le from "../../components/Iconfont/index.mjs";
34
+ import { IHistoryRole as ne, ApplicationTypes as It, ChatMessageRole as kt, PromptVariableType as xe } from "@glodon-aiot/apis";
35
+ import Nt from "./HistoryItem/index.mjs";
36
+ import Lt from "dayjs";
37
+ import { v4 as je } from "uuid";
38
+ import En from "../../context.mjs";
39
+ import { configuration as Tn } from "@glodon-aiot/bot-client-sdk";
40
+ import { NET_OPEN_STATUS as Y, MB as On } from "../../constant.mjs";
41
+ import Hn from "../../components/FilePreview/index.mjs";
42
+ import { getImageExtension as Rn } from "../../utils/index.mjs";
43
+ import Dn from "../../QuillEditor/index.mjs";
44
+ import Fn from "../../components/Recommend/index.mjs";
45
+ import jn from "../../components/Greeting/index.mjs";
46
+ import Mn from "../../Footer/index.mjs";
47
+ import { CameraOutlined as Un, PlusOutlined as Vn } from "@ant-design/icons";
48
+ import zn from "./Tools/UploadKnowledgeFiles/index.mjs";
49
+ import An from "../UploadingPrompt/index.mjs";
50
+ import $n from "./PromptSetting/index.mjs";
51
+ import { useMemoizedFn as De } from "ahooks";
52
+ import qn from "./Tools/SessionListDrawer/index.mjs";
53
+ import Bn from "./Tools/SessionHistoryDrawer/index.mjs";
54
+ import Wn from "react-infinite-scroll-component";
55
+ import Yn from "./Tools/ConnectToNetwork/index.mjs";
56
+ import Kn from "./Tools/PromptManager/index.mjs";
57
+ import { useSessionState as Qn } from "../../hooks/useSessionState.mjs";
58
+ import _n from "../../assets/icon.svg.mjs";
59
+ const Gn = bn(Nt), wt = {
60
+ icon: _n,
61
61
  text: "今天我能帮你什么?"
62
62
  };
63
- class ae {
64
- constructor(h, o, j, e) {
65
- F(this, "messageTime");
66
- F(this, "isWaiting");
67
- F(this, "messageId");
68
- F(this, "isContext");
69
- F(this, "actions");
70
- F(this, "reference");
71
- F(this, "isSensitive");
72
- F(this, "isSuspend");
73
- F(this, "comment");
74
- this.content = h, this.sessionId = o, this.role = j, this.files = e, this.content = h, this.role = j, this.sessionId = o, this.files = e, this.messageTime = It(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = Fe(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
63
+ class de {
64
+ constructor(h, o, M, e) {
65
+ j(this, "messageTime");
66
+ j(this, "isWaiting");
67
+ j(this, "messageId");
68
+ j(this, "isContext");
69
+ j(this, "actions");
70
+ j(this, "reference");
71
+ j(this, "isSensitive");
72
+ j(this, "isSuspend");
73
+ j(this, "comment");
74
+ this.content = h, this.sessionId = o, this.role = M, this.files = e, this.content = h, this.role = M, this.sessionId = o, this.files = e, this.messageTime = Lt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = je(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
75
75
  isAgree: 0
76
76
  };
77
77
  }
78
78
  }
79
- const kt = 10, De = (k, h, o, j) => {
79
+ const Ct = 10, Fe = (k, h, o, M) => {
80
80
  let e = k;
81
- if (j === wt.Agent && o && o.length > 0) {
82
- const w = o.map((_) => `[${_.name.replace(/\.[^/.]+$/, "")}](${_.url})`).join(`
81
+ if (M === It.Agent && o && o.length > 0) {
82
+ const w = o.map((G) => `[${G.name.replace(/\.[^/.]+$/, "")}](${G.url})`).join(`
83
83
  `);
84
84
  e = w ? `${w}
85
85
  ${e}` : e;
86
86
  }
87
87
  return h && (e = `![](${h})
88
88
  ${e}`), e;
89
- }, Ni = vn((k, h) => {
90
- var st, rt, at, lt, dt, ct, ft, gt, ut, mt, ht, yt;
89
+ }, Pi = xn((k, h) => {
90
+ var rt, at, lt, dt, ct, ft, gt, ut, mt, ht, yt, pt;
91
91
  const {
92
92
  application: o,
93
- docViewerUrl: j = "",
93
+ docViewerUrl: M = "",
94
94
  currentSession: e,
95
95
  onCreateSession: w,
96
- embeddingService: _,
96
+ embeddingService: G,
97
97
  setCurrentSession: v,
98
- networkStatus: E,
99
- setNetworkStatus: P
100
- } = k, [b, C] = m([]), [Nt, le] = m(), [xe, je] = m(), H = K(null), {
101
- service: R,
98
+ networkStatus: P,
99
+ setNetworkStatus: E
100
+ } = k, [b, C] = m([]), [Pt, ce] = m(), [ke, Me] = m(), T = Q(null), {
101
+ service: O,
102
102
  agentClient: I,
103
- depId: Lt,
104
- footer: Et,
103
+ depId: Et,
104
+ footer: Tt,
105
105
  transform: g,
106
- defaultInput: ke,
107
- onMessage: de,
108
- onHistoryLoad: Me,
109
- beforeMessageSend: A,
110
- bodyStyle: Pt,
111
- disabled: D,
106
+ defaultInput: we,
107
+ onMessage: fe,
108
+ onHistoryLoad: Ue,
109
+ beforeMessageSend: $,
110
+ bodyStyle: Ot,
111
+ disabled: H,
112
112
  features: r,
113
113
  popupContainer: f,
114
- icon: Tt,
115
- sider: Ot,
116
- mode: Ht
117
- } = bn(Ln), [Ue, we] = m(!1), y = K(b), ze = K(void 0), [Rt, Dt] = m(0), [ne, G] = m(), [Ce, ce] = m(""), [Ve, Ie] = m(!1), fe = K(null), [Ae, Ft] = m([]), [$e, X] = m(!1), [qe, jt] = m(!1), [Mt, Ut] = m(""), [zt, Z] = m(), [J, ie] = m({}), ge = K(null), Be = K(null), Ne = K(null), [We, Vt] = m(!1), [At, $t] = m([]), [qt, ue] = m(!0), [Bt, Wt] = m(!0), [Ye, M] = m(!1), [Le, $] = m(!1), [Ke, Yt] = m(!1), [O, me] = m(typeof (r == null ? void 0 : r.promptVariables) == "object" ? r.promptVariables.default || [] : []), [Kt, Qt] = m(typeof (r == null ? void 0 : r.knowledges) == "object" && r.knowledges.default || void 0), [Qe, U] = m(!1), [_e, oe] = m(!1), [_t, S] = m(typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.default) == "boolean" ? r.connectNetwork.default : !1), [Ge, he] = m(!1), [Gt, q] = m(!1), [Xt, Zt] = m(null), [ye, Y] = m(!1), [Xe, Ze] = m(!1), {
118
- isSwitchingToExistingSession: Je,
119
- setIsSwitchingToExistingSession: pe
120
- } = Yn();
121
- L(() => {
122
- if (Zt(e), e === null)
123
- q(!1);
114
+ icon: Ht,
115
+ sider: Rt,
116
+ mode: Dt
117
+ } = kn(En), [Ve, Ce] = m(!1), y = Q(b), ze = Q(void 0), [Ft, jt] = m(0), [ie, X] = m(), [Ie, ge] = m(""), [Ae, Ne] = m(!1), ue = Q(null), [$e, Mt] = m([]), [qe, Z] = m(!1), [Be, Ut] = m(!1), [Vt, zt] = m(""), [At, J] = m(), [S, oe] = m({}), me = Q(null), We = Q(null), Le = Q(null), [Ye, $t] = m(!1), [qt, Bt] = m([]), [Wt, he] = m(!0), [Yt, Kt] = m(!0), [Ke, U] = m(!1), [Pe, q] = m(!1), [Qe, Qt] = m(!1), [R, se] = m(typeof (r == null ? void 0 : r.promptVariables) == "object" ? r.promptVariables.default || [] : []), [_t, Gt] = m(typeof (r == null ? void 0 : r.knowledges) == "object" && r.knowledges.default || void 0), [_e, V] = m(!1), [Ge, re] = m(!1), [Xt, ee] = m(typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.default) == "boolean" ? r.connectNetwork.default : !1), [Xe, ye] = m(!1), [Zt, B] = m(!1), [Jt, St] = m(null), [pe, K] = m(!1), [Ze, Je] = m(!1), {
118
+ isSwitchingToExistingSession: Se,
119
+ setIsSwitchingToExistingSession: ve
120
+ } = Qn();
121
+ N(() => {
122
+ if (St(e), e === null)
123
+ B(!1);
124
124
  else if (e === void 0)
125
- q(!0);
125
+ B(!0);
126
126
  else {
127
- if (Xt === null) {
128
- if (Je) {
129
- q(!0), pe(!1);
127
+ if (Jt === null) {
128
+ if (Se) {
129
+ B(!0), ve(!1);
130
130
  return;
131
131
  }
132
- q(!1);
132
+ B(!1);
133
133
  return;
134
134
  }
135
- e.ready ? q(!1) : q(!0);
135
+ e.ready ? B(!1) : B(!0);
136
136
  }
137
- }, [e, e == null ? void 0 : e.ready, Je]), L(() => {
137
+ }, [e, e == null ? void 0 : e.ready, Se]), N(() => {
138
138
  var a, l;
139
139
  e && (y.current = []), C([]);
140
- const t = H.current;
140
+ const t = T.current;
141
141
  if (t && t.scrollTo({
142
142
  top: 0
143
143
  }), !((a = e == null ? void 0 : e.data) != null && a.id))
144
144
  return;
145
- if ($(!1), M(!1), (l = e.messages) != null && l.length) {
145
+ if (q(!1), U(!1), (l = e.messages) != null && l.length) {
146
146
  const c = [...e.messages.filter((s) => s == null ? void 0 : s.messageId)].reverse();
147
- y.current = [...c], C([...c]), q(!1);
147
+ y.current = [...c], C([...c]), B(!1);
148
148
  }
149
149
  const n = (i) => {
150
150
  var c;
151
- (c = e == null ? void 0 : e.data) != null && c.id && (y.current = [...i].reverse(), C([...i].reverse()), !i || i.length < 10 ? oe(!1) : oe(!0), q(!1), Me && Me({
151
+ (c = e == null ? void 0 : e.data) != null && c.id && (y.current = [...i].reverse(), C([...i].reverse()), !i || i.length < 10 ? re(!1) : re(!0), B(!1), Ue && Ue({
152
152
  applicationId: o.id,
153
153
  sessionId: e.data.id,
154
154
  histories: i
@@ -157,26 +157,26 @@ ${e}`), e;
157
157
  return e.addEventListener("history:loaded", n), () => {
158
158
  y.current = [], C([]), e == null || e.removeEventListener("history:loaded", n);
159
159
  };
160
- }, [e]), L(() => {
160
+ }, [e]), N(() => {
161
161
  const t = () => {
162
162
  var n;
163
- (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && me(e.promptVariables.sort((a, l) => a.key.localeCompare(l.key))), e.knowledges && Qt(e.knowledges), P(e.netOpen));
163
+ (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && se(e.promptVariables.sort((a, l) => a.key.localeCompare(l.key))), e.knowledges && Gt(e.knowledges), E(e.netOpen));
164
164
  };
165
165
  return e == null || e.addEventListener("data:updated", t), () => {
166
166
  e == null || e.removeEventListener("data:updated", t);
167
167
  };
168
- }, [e]), L(() => {
168
+ }, [e]), N(() => {
169
169
  var n;
170
170
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
171
171
  return;
172
172
  const t = (a) => {
173
173
  var l;
174
- console.error(a.message, a.cause, "e.case"), ee.config({
174
+ console.error(a.message, a.cause, "e.case"), te.config({
175
175
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
176
176
  prefixCls: "gbot-notification"
177
- }), ee.error({
177
+ }), te.error({
178
178
  message: ((l = a.cause) == null ? void 0 : l.message) || a.message
179
- }), ee.config({
179
+ }), te.config({
180
180
  getContainer: void 0,
181
181
  prefixCls: "gbot-notification"
182
182
  });
@@ -185,7 +185,7 @@ ${e}`), e;
185
185
  e == null || e.removeEventListener("error", t);
186
186
  };
187
187
  }, [e]);
188
- const Jt = () => {
188
+ const en = () => {
189
189
  var a;
190
190
  if (!((a = e == null ? void 0 : e.data) != null && a.id) || !(o != null && o.id))
191
191
  return;
@@ -201,18 +201,18 @@ ${e}`), e;
201
201
  return;
202
202
  } else
203
203
  e.clear().then(() => {
204
- const l = new ae("", t, te.System);
204
+ const l = new de("", t, ne.System);
205
205
  l.isContext = !0, C([l, ...b]);
206
206
  });
207
207
  };
208
- L(() => {
209
- o != null && o.id && (R == null || R.getRecommendQues(o.id).then((t) => {
210
- Ft(t);
208
+ N(() => {
209
+ o != null && o.id && (O == null || O.getRecommendQues(o.id).then((t) => {
210
+ Mt(t);
211
211
  }));
212
- }, [Lt, o]);
213
- const Se = (t) => z(void 0, null, function* () {
214
- var N, T;
215
- if (D) {
212
+ }, [Et, o]);
213
+ const et = (t) => z(void 0, null, function* () {
214
+ var F, W;
215
+ if (H) {
216
216
  u.config({
217
217
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
218
218
  prefixCls: "gbot-message"
@@ -222,7 +222,7 @@ ${e}`), e;
222
222
  });
223
223
  return;
224
224
  }
225
- const n = t || Nt;
225
+ const n = t || Pt;
226
226
  if (!(n != null && n.trim())) {
227
227
  u.config({
228
228
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
@@ -233,7 +233,7 @@ ${e}`), e;
233
233
  });
234
234
  return;
235
235
  }
236
- if (!(O == null ? void 0 : O.every((x) => !!(x != null && x.value))))
236
+ if (!(R == null ? void 0 : R.every((x) => !!(x != null && x.value))))
237
237
  if (g != null && g.promptVariables) {
238
238
  u.config({
239
239
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
@@ -244,8 +244,8 @@ ${e}`), e;
244
244
  });
245
245
  return;
246
246
  } else
247
- console.error("变量值不能为空", O == null ? void 0 : O.map((x) => !!(x != null && x.value)));
248
- if (Le) {
247
+ console.error("变量值不能为空", R == null ? void 0 : R.map((x) => !!(x != null && x.value)));
248
+ if (Pe) {
249
249
  u.config({
250
250
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
251
251
  prefixCls: "gbot-message"
@@ -255,7 +255,7 @@ ${e}`), e;
255
255
  });
256
256
  return;
257
257
  }
258
- if (Ue) {
258
+ if (Ve) {
259
259
  u.config({
260
260
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
261
261
  prefixCls: "gbot-message"
@@ -265,7 +265,7 @@ ${e}`), e;
265
265
  });
266
266
  return;
267
267
  }
268
- if (!qt) {
268
+ if (!Wt) {
269
269
  u.config({
270
270
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
271
271
  prefixCls: "gbot-message"
@@ -275,7 +275,7 @@ ${e}`), e;
275
275
  });
276
276
  return;
277
277
  }
278
- if (Ve) {
278
+ if (Ae) {
279
279
  u.config({
280
280
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
281
281
  prefixCls: "gbot-message"
@@ -285,59 +285,63 @@ ${e}`), e;
285
285
  });
286
286
  return;
287
287
  }
288
- G(void 0), ce("");
289
- const l = (N = e == null ? void 0 : e.data) == null ? void 0 : N.id;
288
+ X(void 0), ge("");
289
+ const l = (F = e == null ? void 0 : e.data) == null ? void 0 : F.id;
290
290
  if (!l) {
291
- if (ye)
291
+ if (pe)
292
292
  return;
293
- Y(!0), w == null || w({
294
- netOpen: E ? W.OPEN : W.CLOSE
293
+ K(!0), w == null || w({
294
+ netOpen: P ? Y.OPEN : Y.CLOSE
295
295
  }).then((x) => {
296
- var B, se;
297
- U(!0), P(!!((B = x.data) != null && B.netOpen)), S(!!((se = x.data) != null && se.enableNetOpen)), et(x).then(() => {
298
- v == null || v(x), U(!1), je(n);
296
+ var ae, vt;
297
+ V(!0), E(!!((ae = x.data) != null && ae.netOpen)), ee(!!((vt = x.data) != null && vt.enableNetOpen)), tt(x).then(() => {
298
+ v == null || v(x), V(!1), Me(n);
299
299
  });
300
300
  }).catch((x) => {
301
- Y(!1);
301
+ K(!1);
302
302
  });
303
303
  return;
304
304
  }
305
- if (ye)
305
+ if (pe)
306
306
  return;
307
- Y(!0), he(!0);
308
- const i = De(n, Ce, J[l], (o == null ? void 0 : o.type) || 0);
307
+ K(!0), ye(!0);
308
+ const i = Fe(n, Ie, S[l], (o == null ? void 0 : o.type) || 0);
309
309
  let c;
310
310
  try {
311
- A ? c = yield A == null ? void 0 : A({
311
+ $ ? c = yield $ == null ? void 0 : $({
312
312
  applicationId: o.id,
313
313
  sessionId: l,
314
314
  message: {
315
315
  content: i,
316
316
  sessionId: l,
317
- role: bt.User,
318
- files: J[l]
317
+ role: kt.User,
318
+ files: S[l]
319
319
  }
320
320
  }) : c = !0;
321
321
  } catch (x) {
322
322
  c = !1;
323
323
  }
324
- if (he(!1), c === !1) {
325
- Y(!1);
324
+ if (ye(!1), c === !1) {
325
+ K(!1);
326
326
  return;
327
327
  }
328
328
  let s = n;
329
- if (typeof c == "object" && (s = c.content || n), !(yield e.setPromptVariables(O))) {
330
- Y(!1);
329
+ typeof c == "object" && (s = c.content || n);
330
+ const L = yield (() => new Promise((x) => {
331
+ se((ae) => (x(ae), ae));
332
+ }))();
333
+ if (!(yield e.setPromptVariables(L))) {
334
+ K(!1);
331
335
  return;
332
336
  }
333
- ((T = J[l]) == null ? void 0 : T.length) > 0 ? St(s) : Ee(s);
334
- }), et = (t) => new Promise((n, a) => z(void 0, null, function* () {
335
- const c = (t == null ? void 0 : t.promptVariables).filter((s) => s.type ? !((s.type === be.User || s.type === void 0) && s.key === "query") && !((s.type === be.System || s.type === void 0) && s.key === "datetime") : s.key !== "query").map((s) => {
336
- var N;
337
- const p = (N = O.find((T) => T.key === s.key && T.type === s.type)) == null ? void 0 : N.value;
337
+ ((W = S[l]) == null ? void 0 : W.length) > 0 ? tn(s) : Ee(s);
338
+ }), tt = (t) => new Promise((n, a) => z(void 0, null, function* () {
339
+ const c = (t == null ? void 0 : t.promptVariables).filter((s) => s.type ? !((s.type === xe.User || s.type === void 0) && s.key === "query") && !((s.type === xe.System || s.type === void 0) && s.key === "datetime") : s.key !== "query").map((s) => {
340
+ var L;
341
+ const p = (L = R.find((D) => D.key === s.key && D.type === s.type)) == null ? void 0 : L.value;
338
342
  return s.value = p || "", s;
339
343
  });
340
- me(c.sort((s, p) => s.key.localeCompare(p.key))), yield t == null ? void 0 : t.setPromptVariables(c).catch((s) => {
344
+ se(c.sort((s, p) => s.key.localeCompare(p.key))), yield t == null ? void 0 : t.setPromptVariables(c).catch((s) => {
341
345
  console.error(s), u.config({
342
346
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
343
347
  prefixCls: "gbot-message"
@@ -346,133 +350,133 @@ ${e}`), e;
346
350
  prefixCls: "gbot-message"
347
351
  });
348
352
  }), n();
349
- })), St = (t) => {
353
+ })), tn = (t) => {
350
354
  var i, c, s;
351
- if (ue(!1), !((i = e == null ? void 0 : e.data) != null && i.id) || !(o != null && o.id))
355
+ if (he(!1), !((i = e == null ? void 0 : e.data) != null && i.id) || !(o != null && o.id))
352
356
  return;
353
357
  const n = ((c = e.data) == null ? void 0 : c.id) || "";
354
358
  let a = [], l = /* @__PURE__ */ new Set();
355
- (s = J[n]) == null || s.forEach((p) => {
359
+ (s = S[n]) == null || s.forEach((p) => {
356
360
  l.has(p.id) || (a.push(p), l.add(p.id));
357
- }), ue(!0), Ee(t, a);
361
+ }), he(!0), Ee(t, a);
358
362
  };
359
- L(() => {
360
- if (!xe || !e)
363
+ N(() => {
364
+ if (!ke || !e)
361
365
  return;
362
- const t = xe, n = () => z(void 0, null, function* () {
363
- he(!0);
364
- const a = De(t, Ce, J[e.id], (o == null ? void 0 : o.type) || 0);
366
+ const t = ke, n = () => z(void 0, null, function* () {
367
+ ye(!0);
368
+ const a = Fe(t, Ie, S[e.id], (o == null ? void 0 : o.type) || 0);
365
369
  let l;
366
370
  try {
367
- A ? l = yield A == null ? void 0 : A({
371
+ $ ? l = yield $ == null ? void 0 : $({
368
372
  applicationId: o.id,
369
373
  sessionId: e.id,
370
374
  message: {
371
375
  content: a,
372
376
  sessionId: e.id,
373
- role: bt.User,
374
- files: J[e.id]
377
+ role: kt.User,
378
+ files: S[e.id]
375
379
  }
376
380
  }) : l = !0;
377
381
  } catch (i) {
378
382
  l = !1;
379
383
  }
380
- if (he(!1), l === !1) {
381
- Y(!1);
384
+ if (ye(!1), l === !1) {
385
+ K(!1);
382
386
  return;
383
387
  }
384
- Ee(t), je(void 0);
388
+ Ee(t), Me(void 0);
385
389
  });
386
390
  return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
387
391
  e == null || e.removeEventListener("ready", n);
388
392
  };
389
- }, [xe, e]);
393
+ }, [ke, e]);
390
394
  const Ee = (t, n) => z(void 0, null, function* () {
391
- var N, T;
392
- const a = (N = e == null ? void 0 : e.data) == null ? void 0 : N.id;
395
+ var L, D;
396
+ const a = (L = e == null ? void 0 : e.data) == null ? void 0 : L.id;
393
397
  if (!a)
394
398
  return;
395
- $(!0), M(!0);
396
- const l = De(t, Ce, n, (o == null ? void 0 : o.type) || 0), i = new ae(l, a, te.User, n);
397
- le(void 0), Z(void 0), y.current = [i, ...b], C(y.current), o.id && de && de({
399
+ q(!0), U(!0);
400
+ const l = Fe(t, Ie, n, (o == null ? void 0 : o.type) || 0), i = new de(l, a, ne.User, n);
401
+ ce(void 0), J(void 0), y.current = [i, ...b], C(y.current), o.id && fe && fe({
398
402
  applicationId: o.id,
399
403
  sessionId: a,
400
404
  message: i
401
405
  });
402
- const c = new ae("", a, te.System);
406
+ const c = new de("", a, ne.System);
403
407
  c.isWaiting = !0, y.current = [c, ...y.current], C(y.current);
404
- const s = (n == null ? void 0 : n.map((x) => x.id)) || [], p = {
405
- stream: En.stream,
408
+ const s = (n == null ? void 0 : n.map((F) => F.id)) || [], p = {
409
+ stream: Tn.stream,
406
410
  referenceFirst: !1
407
411
  };
408
412
  if (g != null && g.promptVariables) {
409
- const x = O == null ? void 0 : O.reduce((B, se) => (B[se.key] = se.value, B), {});
410
- p.formatValues = x;
413
+ const F = R == null ? void 0 : R.reduce((W, x) => (W[x.key] = x.value, W), {});
414
+ p.formatValues = F;
411
415
  }
412
416
  if (g != null && g.knowledges) {
413
- const x = Kt;
414
- p.knowledges = x;
417
+ const F = _t;
418
+ p.knowledges = F;
415
419
  }
416
420
  yield e.send({
417
421
  text: l,
418
422
  fileIds: s,
419
423
  files: n
420
- }, p), ie({
424
+ }, p), oe({
421
425
  [a]: []
422
- }), (T = ge.current) == null || T.update(), Y(!1);
426
+ }), (D = me.current) == null || D.update(), K(!1);
423
427
  });
424
- L(() => {
428
+ N(() => {
425
429
  var l;
426
430
  const t = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
427
431
  if (!t)
428
432
  return;
429
433
  const n = (i) => {
430
- if (!i.sessionId || i.sessionId && i.sessionId !== ze.current || i.role === te.User)
434
+ if (!i.sessionId || i.sessionId && i.sessionId !== ze.current || i.role === ne.User)
431
435
  return;
432
- if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (M(!1), $(!1), y.current = y.current.filter((p) => !p.isWaiting), C([...y.current]), y.current = [...y.current], i.content)) {
433
- ee.config({
436
+ if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (U(!1), q(!1), y.current = y.current.filter((p) => !p.isWaiting), C([...y.current]), y.current = [...y.current], i.content)) {
437
+ te.config({
434
438
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
435
439
  prefixCls: "gbot-notification"
436
- }), ee.error({
440
+ }), te.error({
437
441
  message: i.content
438
- }), ee.config({
442
+ }), te.config({
439
443
  getContainer: void 0,
440
444
  prefixCls: "gbot-notification"
441
445
  });
442
446
  return;
443
447
  }
444
- const c = i.actions || [], s = new ae(i.content, t, te.Robot);
445
- s.messageId = i.messageId || Fe(), s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = c, s.isLoading = !0, s.searchingStatus = i.searchingStatus, y.current = y.current.filter((p) => !p.isWaiting).filter((p) => !p.isReplying), i.index === void 0 && C([s, ...y.current]), i.code === 11915 && (M(!1), $(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, C([s, ...y.current])), i.index === -2 && (M(!1), $(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, C([s, ...y.current])), i.index === -1 && (M(!1), $(!1), s.isLoading = !1, s.reference = i.reference, C([s, ...y.current]), o.id && de && de({
448
+ const c = i.actions || [], s = new de(i.content, t, ne.Robot);
449
+ s.messageId = i.messageId || je(), s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = c, s.isLoading = !0, s.searchingStatus = i.searchingStatus, y.current = y.current.filter((p) => !p.isWaiting).filter((p) => !p.isReplying), i.index === void 0 && C([s, ...y.current]), i.code === 11915 && (U(!1), q(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, C([s, ...y.current])), i.index === -2 && (U(!1), q(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, C([s, ...y.current])), i.index === -1 && (U(!1), q(!1), s.isLoading = !1, s.reference = i.reference, C([s, ...y.current]), o.id && fe && fe({
446
450
  applicationId: o.id,
447
451
  sessionId: t,
448
452
  message: s
449
- })), i.index === -3 && (M(!1), $(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, C([s, ...y.current]));
453
+ })), i.index === -3 && (U(!1), q(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, C([s, ...y.current]));
450
454
  }, a = () => {
451
455
  e.addEventListener("message:updated", n);
452
456
  };
453
457
  return e.ready ? e.addEventListener("message:updated", n) : e.addEventListener("ready", a), () => {
454
458
  e == null || e.removeEventListener("message:updated", n), e == null || e.removeEventListener("ready", a);
455
459
  };
456
- }, [e]), L(() => {
460
+ }, [e]), N(() => {
457
461
  if (!e) {
458
- we(!1);
462
+ Ce(!1);
459
463
  return;
460
464
  }
461
465
  const t = (n) => {
462
- we(n);
466
+ Ce(n);
463
467
  };
464
- return we(e.frozen), e.addEventListener("frozen", t), () => {
468
+ return Ce(e.frozen), e.addEventListener("frozen", t), () => {
465
469
  e == null || e.removeEventListener("frozen", t);
466
470
  };
467
- }, [e]), L(() => {
471
+ }, [e]), N(() => {
468
472
  if (!I)
469
473
  return;
470
474
  const t = I.questionContextMaxLength || 4e3;
471
- Dt(t);
472
- }, [I, R]), L(() => {
473
- ke && Z(ke.text);
474
- }, [ke]);
475
- const en = (t) => {
475
+ jt(t);
476
+ }, [I, O]), N(() => {
477
+ we && J(we.text);
478
+ }, [we]);
479
+ const nn = (t) => {
476
480
  const n = t.size;
477
481
  return n <= 0 ? (u.config({
478
482
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
@@ -480,135 +484,135 @@ ${e}`), e;
480
484
  }), u.error("该文件为空,请重新上传"), u.config({
481
485
  getContainer: void 0,
482
486
  prefixCls: "gbot-message"
483
- }), !1) : n > 20 * Pn ? (u.config({
487
+ }), !1) : n > 20 * On ? (u.config({
484
488
  getContainer: () => (f == null ? void 0 : f.current) || document.body,
485
489
  prefixCls: "gbot-message"
486
490
  }), u.error("图片须小于20M"), u.config({
487
491
  getContainer: void 0,
488
492
  prefixCls: "gbot-message"
489
- }), !1) : (G(t), !1);
490
- }, tn = (t) => z(void 0, null, function* () {
493
+ }), !1) : (X(t), !1);
494
+ }, on = (t) => z(void 0, null, function* () {
491
495
  var n;
492
- return G(t), (n = e == null ? void 0 : e.data) != null && n.id ? tt(e, t) : new Promise((a) => {
493
- U(!0), w == null || w({
494
- netOpen: E ? W.OPEN : W.CLOSE
496
+ return X(t), (n = e == null ? void 0 : e.data) != null && n.id ? nt(e, t) : new Promise((a) => {
497
+ V(!0), w == null || w({
498
+ netOpen: P ? Y.OPEN : Y.CLOSE
495
499
  }).then((l) => {
496
500
  var i, c;
497
- v == null || v(l), U(!1), P(!!((i = l.data) != null && i.netOpen)), S(!!((c = l.data) != null && c.enableNetOpen)), a(tt(l, t));
501
+ v == null || v(l), V(!1), E(!!((i = l.data) != null && i.netOpen)), ee(!!((c = l.data) != null && c.enableNetOpen)), a(nt(l, t));
498
502
  });
499
503
  });
500
- }), tt = (t, n) => {
501
- const a = On(n.name);
504
+ }), nt = (t, n) => {
505
+ const a = Rn(n.name);
502
506
  return new Promise((l) => {
503
507
  var c;
504
508
  const i = {
505
- files: [`${Fe()}.${a}`],
509
+ files: [`${je()}.${a}`],
506
510
  isv: "minio",
507
511
  knowledgeId: ((c = t.data) == null ? void 0 : c.id) || "",
508
512
  type: 1
509
513
  };
510
- Ie(!0), R == null || R.postTicket(i).then((s) => {
511
- R.uploadMinioFile(s.minio, n).then(() => {
512
- var x, B;
513
- const p = (x = s.minio.endpoints) == null ? void 0 : x[0], N = s.minio.bucket, T = (B = s.minio.fileKeys) == null ? void 0 : B[0];
514
- l(`${location.protocol}//${p}/${N}/${T}`);
514
+ Ne(!0), O == null || O.postTicket(i).then((s) => {
515
+ O.uploadMinioFile(s.minio, n).then(() => {
516
+ var F, W;
517
+ const p = (F = s.minio.endpoints) == null ? void 0 : F[0], L = s.minio.bucket, D = (W = s.minio.fileKeys) == null ? void 0 : W[0];
518
+ l(`${location.protocol}//${p}/${L}/${D}`);
515
519
  }).catch(() => {
516
- ce(""), G(void 0);
520
+ ge(""), X(void 0);
517
521
  }).finally(() => {
518
- Ie(!1);
522
+ Ne(!1);
519
523
  });
520
524
  }).catch(() => {
521
- ce(""), G(void 0), Ie(!1);
525
+ ge(""), X(void 0), Ne(!1);
522
526
  });
523
527
  });
524
528
  };
525
- L(() => {
526
- const t = H.current;
527
- t && !Ke && t.scrollTo({
529
+ N(() => {
530
+ const t = T.current;
531
+ t && !Qe && t.scrollTo({
528
532
  top: t.scrollHeight
529
533
  });
530
534
  }, [b]);
531
- const nt = (t, n) => new Promise((a) => {
535
+ const it = (t, n) => new Promise((a) => {
532
536
  if (!n.file.url || !(o != null && o.id))
533
537
  return a();
534
- const l = He(Oe({}, n.file), {
538
+ const l = Re(He({}, n.file), {
535
539
  type: 1
536
540
  });
537
- R == null || R.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, l).finally(() => {
541
+ O == null || O.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, l).finally(() => {
538
542
  var i;
539
- (i = ge.current) == null || i.update().finally(a);
543
+ (i = me.current) == null || i.update().finally(a);
540
544
  });
541
- }), nn = () => {
545
+ }), sn = () => {
542
546
  var t;
543
- (t = e == null ? void 0 : e.data) != null && t.id && (M(!1), e.suspend());
544
- }, on = (t) => {
545
- const n = H.current;
547
+ (t = e == null ? void 0 : e.data) != null && t.id && (U(!1), e.suspend());
548
+ }, rn = (t) => {
549
+ const n = T.current;
546
550
  n && setTimeout(() => {
547
551
  n.scrollTo({
548
552
  top: n.scrollHeight,
549
553
  behavior: t == null ? void 0 : t.behavior
550
554
  });
551
555
  }, t == null ? void 0 : t.ms);
552
- }, sn = () => {
553
- if (!H.current)
556
+ }, an = () => {
557
+ if (!T.current)
554
558
  return;
555
- const t = H.current.scrollTop <= -80;
556
- Yt(t);
557
- }, rn = Re((t) => {
559
+ const t = T.current.scrollTop <= -80;
560
+ Qt(t);
561
+ }, ln = De((t) => {
558
562
  var n, a;
559
- (n = fe.current) == null || n.update(t), (a = fe.current) == null || a.focus();
560
- }), an = Re((t) => {
561
- Se(t);
562
- }), ln = Re(() => {
563
+ (n = ue.current) == null || n.update(t), (a = ue.current) == null || a.focus();
564
+ }), dn = De((t) => {
565
+ et(t);
566
+ }), cn = De(() => {
563
567
  var n;
564
568
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
565
569
  return;
566
570
  y.current = [...b.slice(1, b.length)], C(y.current);
567
- const t = new ae("", e.data.id, te.System);
568
- t.isWaiting = !0, y.current = [t, ...y.current], C(y.current), $(!0), M(!0), e.answerAgain();
571
+ const t = new de("", e.data.id, ne.System);
572
+ t.isWaiting = !0, y.current = [t, ...y.current], C(y.current), q(!0), U(!0), e.answerAgain();
569
573
  });
570
- L(() => {
574
+ N(() => {
571
575
  var t, n;
572
- ze.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Qe && ((n = Ne.current) == null || n.clear());
576
+ ze.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !_e && ((n = Le.current) == null || n.clear());
573
577
  }, [e]);
574
- const dn = () => {
578
+ const fn = () => {
575
579
  var a;
576
580
  if (!((a = e == null ? void 0 : e.data) != null && a.id))
577
581
  return;
578
582
  const n = b[b.length - 1].messageTime;
579
583
  e.fetchMessages({
580
584
  endTime: n,
581
- pageSize: kt
585
+ pageSize: Ct
582
586
  }).then((l) => {
583
587
  const i = l || [];
584
588
  if (!i || !(i != null && i.length)) {
585
- oe(!1);
589
+ re(!1);
586
590
  return;
587
591
  }
588
- i.length < 10 ? oe(!1) : oe(!0), C([...b, ...i.reverse()]);
592
+ i.length < 10 ? re(!1) : re(!0), C([...b, ...i.reverse()]);
589
593
  });
590
- }, cn = (t) => z(void 0, null, function* () {
594
+ }, gn = (t) => z(void 0, null, function* () {
591
595
  var n, a;
592
596
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
593
- P(t);
597
+ E(t);
594
598
  else {
595
599
  if (yield e.setNetOpen(t), !((a = e.data) != null && a.id))
596
600
  return;
597
- P(t);
601
+ E(t);
598
602
  }
599
- }), Pe = () => z(void 0, null, function* () {
603
+ }), Te = () => z(void 0, null, function* () {
600
604
  e ? e.fetchData().then((t) => {
601
605
  var n;
602
- (n = e == null ? void 0 : e.data) != null && n.id && (P(t.netOpen), S(t.enableNetOpen));
603
- }) : (P(typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.default) == "boolean" ? r.connectNetwork.default : !1), S(o.arrange[0].enableNetOpen));
606
+ (n = e == null ? void 0 : e.data) != null && n.id && (E(t.netOpen), ee(t.enableNetOpen));
607
+ }) : (E(typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.default) == "boolean" ? r.connectNetwork.default : !1), ee(o.arrange[0].enableNetOpen));
604
608
  });
605
- L(() => {
606
- Pe();
607
- }, [e]), L(() => {
609
+ N(() => {
610
+ Te();
611
+ }, [e]), N(() => {
608
612
  requestAnimationFrame(() => {
609
613
  var n, a;
610
- if (H.current) {
611
- const l = document.getElementById("chat-main"), i = (n = H.current) == null ? void 0 : n.querySelector(".infinite-scroll-component__outerdiv"), c = (a = H.current) == null ? void 0 : a.querySelector(".infinite-scroll-component");
614
+ if (T.current) {
615
+ const l = document.getElementById("chat-main"), i = (n = T.current) == null ? void 0 : n.querySelector(".infinite-scroll-component__outerdiv"), c = (a = T.current) == null ? void 0 : a.querySelector(".infinite-scroll-component");
612
616
  if (!i || !c || !l)
613
617
  return;
614
618
  const s = l.offsetHeight;
@@ -623,14 +627,14 @@ ${e}`), e;
623
627
  }
624
628
  }
625
629
  });
626
- }, [b]), L(() => {
630
+ }, [b]), N(() => {
627
631
  if (e)
628
632
  return;
629
633
  const t = () => {
630
- const l = ((I == null ? void 0 : I.promptVariables) || []).filter((i) => i.type ? !(i.type === be.User && i.key === "query") && !(i.type === be.System && i.key === "datetime") && i.status === 1 : i.key !== "query" && i.status === 1).map((i, c) => {
631
- var p, N;
634
+ const l = ((I == null ? void 0 : I.promptVariables) || []).filter((i) => i.type ? !(i.type === xe.User && i.key === "query") && !(i.type === xe.System && i.key === "datetime") && i.status === 1 : i.key !== "query" && i.status === 1).map((i, c) => {
635
+ var p, L;
632
636
  let s = "";
633
- return typeof (r == null ? void 0 : r.promptVariables) == "object" && (s = ((N = (p = r.promptVariables.default) == null ? void 0 : p.find((T) => T.key === i.key && T.type === i.type)) == null ? void 0 : N.value) || ""), {
637
+ return typeof (r == null ? void 0 : r.promptVariables) == "object" && (s = ((L = (p = r.promptVariables.default) == null ? void 0 : p.find((D) => D.key === i.key && D.type === i.type)) == null ? void 0 : L.value) || ""), {
634
638
  id: c + "",
635
639
  key: i.key,
636
640
  name: i.name,
@@ -638,20 +642,20 @@ ${e}`), e;
638
642
  type: i.type
639
643
  };
640
644
  });
641
- me([...l].sort((i, c) => i.key.localeCompare(c.key)));
645
+ se([...l].sort((i, c) => i.key.localeCompare(c.key)));
642
646
  };
643
647
  return I != null && I.ready ? t() : I == null || I.addEventListener("ready", t), () => {
644
648
  I == null || I.removeEventListener("ready", t);
645
649
  };
646
650
  }, [e, I, r == null ? void 0 : r.promptVariables]);
647
- const it = () => w == null ? void 0 : w({
648
- netOpen: E ? W.OPEN : W.CLOSE
651
+ const ot = () => w == null ? void 0 : w({
652
+ netOpen: P ? Y.OPEN : Y.CLOSE
649
653
  }).then((t) => {
650
654
  var n, a;
651
- return v == null || v(t), U(!1), P(!!((n = t.data) != null && n.netOpen)), S(!!((a = t.data) != null && a.enableNetOpen)), et(t), t;
652
- }), ot = xn(() => {
655
+ return v == null || v(t), V(!1), E(!!((n = t.data) != null && n.netOpen)), ee(!!((a = t.data) != null && a.enableNetOpen)), tt(t), t;
656
+ }), st = wn(() => {
653
657
  var t;
654
- return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ d(Ct, {
658
+ return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ d(Nt, {
655
659
  application: o,
656
660
  history: {
657
661
  role: 1,
@@ -661,7 +665,7 @@ ${e}`), e;
661
665
  sessionId: "",
662
666
  reference: [],
663
667
  searchReference: [],
664
- messageTime: It(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
668
+ messageTime: Lt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
665
669
  actions: [],
666
670
  isLoading: !1
667
671
  },
@@ -669,34 +673,34 @@ ${e}`), e;
669
673
  markdown: r == null ? void 0 : r.markdown
670
674
  }) : null;
671
675
  }, [o == null ? void 0 : o.arrange, b]);
672
- return kn(h, () => ({
676
+ return Cn(h, () => ({
673
677
  getCurrentInputText: () => {
674
678
  var t;
675
- return (t = fe.current) == null ? void 0 : t.getCurrentText();
679
+ return (t = ue.current) == null ? void 0 : t.getCurrentText();
676
680
  }
677
- })), L(() => {
681
+ })), N(() => {
678
682
  var n;
679
683
  const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
680
- t && ie((a) => He(Oe({}, a), {
684
+ t && oe((a) => Re(He({}, a), {
681
685
  [t]: []
682
686
  }));
683
- }, [(st = e == null ? void 0 : e.data) == null ? void 0 : st.id]), /* @__PURE__ */ V("div", {
687
+ }, [(rt = e == null ? void 0 : e.data) == null ? void 0 : rt.id]), /* @__PURE__ */ A("div", {
684
688
  className: "agent-chat",
685
- children: [Gt ? /* @__PURE__ */ d("div", {
689
+ children: [Zt ? /* @__PURE__ */ d("div", {
686
690
  className: "session-loading",
687
- children: /* @__PURE__ */ d(vt, {})
688
- }) : /* @__PURE__ */ V(yn, {
689
- children: [(g == null ? void 0 : g.promptVariables) && /* @__PURE__ */ d(Vn, {
690
- ref: Be,
691
+ children: /* @__PURE__ */ d(xt, {})
692
+ }) : /* @__PURE__ */ A(vn, {
693
+ children: [(g == null ? void 0 : g.promptVariables) && /* @__PURE__ */ d($n, {
694
+ ref: We,
691
695
  appId: o.id,
692
696
  currentSession: e,
693
- promptVariables: O,
694
- setPromptVariables: me,
697
+ promptVariables: R,
698
+ setPromptVariables: se,
695
699
  setCurrentSession: v
696
- }), /* @__PURE__ */ V("div", {
700
+ }), /* @__PURE__ */ A("div", {
697
701
  className: "chat-main",
698
702
  id: "chat-main",
699
- style: Pt,
703
+ style: Ot,
700
704
  children: [/* @__PURE__ */ d("div", {
701
705
  className: "chat-main-wrapper",
702
706
  id: "scrollableDiv",
@@ -706,102 +710,102 @@ ${e}`), e;
706
710
  display: "flex",
707
711
  flexDirection: "column-reverse"
708
712
  },
709
- ref: H,
710
- onScroll: sn,
711
- children: (rt = e == null ? void 0 : e.data) != null && rt.id && (b != null && b.length) ? /* @__PURE__ */ V(qn, {
713
+ ref: T,
714
+ onScroll: an,
715
+ children: (at = e == null ? void 0 : e.data) != null && at.id && (b != null && b.length) ? /* @__PURE__ */ A(Wn, {
712
716
  dataLength: b.length,
713
- next: dn,
717
+ next: fn,
714
718
  style: {
715
719
  display: "flex",
716
720
  flexDirection: "column-reverse",
717
721
  overflowX: "hidden"
718
722
  },
719
723
  inverse: !0,
720
- endMessage: b.length > kt && // 少于一页不展示这个提示
721
- ((at = H.current) != null && at.scrollTop) && ((lt = H.current) == null ? void 0 : lt.scrollTop) < -10 ? /* @__PURE__ */ d(wn, {
724
+ endMessage: b.length > Ct && // 少于一页不展示这个提示
725
+ ((lt = T.current) != null && lt.scrollTop) && ((dt = T.current) == null ? void 0 : dt.scrollTop) < -10 ? /* @__PURE__ */ d(In, {
722
726
  plain: !0,
723
727
  children: "没有更多数据了"
724
728
  }) : null,
725
- hasMore: _e,
729
+ hasMore: Ge,
726
730
  loader: /* @__PURE__ */ d("div", {
727
731
  style: {
728
732
  height: "50px",
729
733
  textAlign: "center",
730
734
  overflow: "hidden"
731
735
  },
732
- children: /* @__PURE__ */ d(vt, {})
736
+ children: /* @__PURE__ */ d(xt, {})
733
737
  }),
734
738
  scrollableTarget: "scrollableDiv",
735
- children: [b.map((t, n) => /* @__PURE__ */ d(Qn, {
739
+ children: [b.map((t, n) => /* @__PURE__ */ d(Gn, {
736
740
  application: o,
737
741
  currentSession: e,
738
742
  history: t,
739
- docViewerUrl: j,
743
+ docViewerUrl: M,
740
744
  isLastHistory: n === 0,
741
- onRelatedClick: an,
742
- onAgainClick: ln,
743
- onEditClick: rn,
745
+ onRelatedClick: dn,
746
+ onAgainClick: cn,
747
+ onEditClick: ln,
744
748
  markdown: r == null ? void 0 : r.markdown
745
- }, t.messageId + n)), !_e && ot]
746
- }) : /* @__PURE__ */ V("div", {
749
+ }, t.messageId + n)), !Ge && st]
750
+ }) : /* @__PURE__ */ A("div", {
747
751
  className: "main-empty",
748
- children: [(r == null ? void 0 : r.greeting) !== !1 && /* @__PURE__ */ d(Dn, {
749
- text: r === void 0 || r.greeting === !0 || ((dt = r.greeting) == null ? void 0 : dt.text) === void 0 ? xt.text : r.greeting.text,
750
- icon: r === void 0 || r.greeting === !0 || ((ct = r.greeting) == null ? void 0 : ct.icon) === void 0 ? Tt || xt.icon : r.greeting.icon,
751
- children: !!Ae.length && (((r == null ? void 0 : r.greeting) === void 0 || (r == null ? void 0 : r.greeting)) === !0 || typeof (r == null ? void 0 : r.greeting) == "object" && r.greeting.questions !== !1) && /* @__PURE__ */ d(Rn, {
752
- ref: Ne,
753
- sid: (ft = e == null ? void 0 : e.data) == null ? void 0 : ft.id,
754
- isRecommendClearing: $e,
755
- data: Ae,
752
+ children: [(r == null ? void 0 : r.greeting) !== !1 && /* @__PURE__ */ d(jn, {
753
+ text: r === void 0 || r.greeting === !0 || ((ct = r.greeting) == null ? void 0 : ct.text) === void 0 ? wt.text : r.greeting.text,
754
+ icon: r === void 0 || r.greeting === !0 || ((ft = r.greeting) == null ? void 0 : ft.icon) === void 0 ? Ht || wt.icon : r.greeting.icon,
755
+ children: !!$e.length && (((r == null ? void 0 : r.greeting) === void 0 || (r == null ? void 0 : r.greeting)) === !0 || typeof (r == null ? void 0 : r.greeting) == "object" && r.greeting.questions !== !1) && /* @__PURE__ */ d(Fn, {
756
+ ref: Le,
757
+ sid: (gt = e == null ? void 0 : e.data) == null ? void 0 : gt.id,
758
+ isRecommendClearing: qe,
759
+ data: $e,
756
760
  layoutBreakpoints: typeof (r == null ? void 0 : r.greeting) == "object" ? r.greeting.layoutBreakpoints : void 0,
757
761
  onItemClick: (t) => {
758
762
  var a, l, i;
759
- if (le(t == null ? void 0 : t.question), Z(t == null ? void 0 : t.question), $e)
763
+ if (ce(t == null ? void 0 : t.question), J(t == null ? void 0 : t.question), qe)
760
764
  return;
761
- t != null && t.id && X(!0);
765
+ t != null && t.id && Z(!0);
762
766
  const n = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
763
- g != null && g.fileUpload ? (i = (l = ge.current) == null ? void 0 : l.clear()) == null || i.then(() => {
767
+ g != null && g.fileUpload ? (i = (l = me.current) == null ? void 0 : l.clear()) == null || i.then(() => {
764
768
  var c, s;
765
- t != null && t.id && (n ? (c = nt(n, t)) == null || c.finally(() => {
766
- X(!1);
767
- }) : (X(!1), U(!0), (s = it()) == null || s.then((p) => {
768
- var N;
769
- (N = nt(p.id, t)) == null || N.finally(() => {
770
- X(!1);
769
+ t != null && t.id && (n ? (c = it(n, t)) == null || c.finally(() => {
770
+ Z(!1);
771
+ }) : (Z(!1), V(!0), (s = ot()) == null || s.then((p) => {
772
+ var L;
773
+ (L = it(p.id, t)) == null || L.finally(() => {
774
+ Z(!1);
771
775
  });
772
776
  })));
773
- }) : n ? X(!1) : (X(!1), U(!0), it());
777
+ }) : n ? Z(!1) : (Z(!1), V(!0), ot());
774
778
  }
775
779
  })
776
- }), ot]
780
+ }), st]
777
781
  })
778
- }), Ye && /* @__PURE__ */ d("div", {
782
+ }), Ke && /* @__PURE__ */ d("div", {
779
783
  className: "session-stop",
780
- children: /* @__PURE__ */ d(Q, {
784
+ children: /* @__PURE__ */ d(_, {
781
785
  type: "primary",
782
786
  style: {
783
787
  background: "white"
784
788
  },
785
789
  ghost: !0,
786
790
  size: "small",
787
- icon: /* @__PURE__ */ d(re, {
791
+ icon: /* @__PURE__ */ d(le, {
788
792
  type: "icon-zantinghuida",
789
793
  style: {
790
794
  fontSize: 16
791
795
  }
792
796
  }),
793
- onClick: () => nn(),
797
+ onClick: () => sn(),
794
798
  children: "停止回答"
795
799
  })
796
- }), Ke && (b == null ? void 0 : b.length) > 0 && /* @__PURE__ */ d("div", {
800
+ }), Qe && (b == null ? void 0 : b.length) > 0 && /* @__PURE__ */ d("div", {
797
801
  className: "back-bottom",
798
- children: /* @__PURE__ */ d(Q, {
802
+ children: /* @__PURE__ */ d(_, {
799
803
  size: "small",
800
- onClick: () => on({
804
+ onClick: () => rn({
801
805
  behavior: "smooth"
802
806
  }),
803
807
  type: "link",
804
- icon: /* @__PURE__ */ d(re, {
808
+ icon: /* @__PURE__ */ d(le, {
805
809
  type: "icon-yijianhuidaodibu",
806
810
  style: {
807
811
  fontSize: 24
@@ -811,32 +815,32 @@ ${e}`), e;
811
815
  })]
812
816
  }), /* @__PURE__ */ d("div", {
813
817
  className: "chat-footer",
814
- children: /* @__PURE__ */ V("div", {
818
+ children: /* @__PURE__ */ A("div", {
815
819
  className: "chat-footer-input",
816
- children: [ne && /* @__PURE__ */ d("div", {
820
+ children: [ie && /* @__PURE__ */ d("div", {
817
821
  className: "input-files",
818
- children: /* @__PURE__ */ d(Tn, {
819
- file: ne,
822
+ children: /* @__PURE__ */ d(Hn, {
823
+ file: ie,
820
824
  actions: {
821
- upload: tn,
825
+ upload: on,
822
826
  remove: () => {
823
- G(void 0);
827
+ X(void 0);
824
828
  }
825
829
  },
826
- onUrlChange: (t) => ce(t)
830
+ onUrlChange: (t) => ge(t)
827
831
  })
828
- }), /* @__PURE__ */ V(ve, {
832
+ }), /* @__PURE__ */ A(be, {
829
833
  className: "footer-upload-action",
830
834
  onClick: (t) => t.preventDefault(),
831
- children: [/* @__PURE__ */ V(ve, {
832
- children: [o.type === wt.Agent && (g == null ? void 0 : g.imageUpload) && /* @__PURE__ */ d(Cn, {
833
- disabled: !!ne || D,
835
+ children: [/* @__PURE__ */ A(be, {
836
+ children: [o.type === It.Agent && (g == null ? void 0 : g.imageUpload) && /* @__PURE__ */ d(Nn, {
837
+ disabled: !!ie || H,
834
838
  accept: ".jpg, .png, .jpeg,.bmp",
835
839
  listType: "picture-card",
836
- beforeUpload: en,
840
+ beforeUpload: nn,
837
841
  className: "footer-upload-picture",
838
842
  showUploadList: !1,
839
- children: ne ? /* @__PURE__ */ d(Q, {
843
+ children: ie ? /* @__PURE__ */ d(_, {
840
844
  type: "text",
841
845
  className: "camera-out-btn",
842
846
  style: {
@@ -844,20 +848,20 @@ ${e}`), e;
844
848
  position: "relative",
845
849
  bottom: "-2px"
846
850
  },
847
- disabled: !!ne || D,
848
- icon: /* @__PURE__ */ d(jn, {
851
+ disabled: !!ie || H,
852
+ icon: /* @__PURE__ */ d(Un, {
849
853
  className: "icon-tianjia",
850
854
  style: {
851
855
  fontSize: "22px"
852
856
  }
853
857
  })
854
- }) : /* @__PURE__ */ d(In, {
858
+ }) : /* @__PURE__ */ d(Ln, {
855
859
  placement: "topLeft",
856
860
  overlayClassName: "footer-upload-tooltip",
857
861
  title: /* @__PURE__ */ d("div", {
858
862
  children: "支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"
859
863
  }),
860
- children: /* @__PURE__ */ d(Q, {
864
+ children: /* @__PURE__ */ d(_, {
861
865
  type: "text",
862
866
  className: "camera-out-btn",
863
867
  style: {
@@ -865,7 +869,7 @@ ${e}`), e;
865
869
  position: "relative",
866
870
  bottom: "-2px"
867
871
  },
868
- icon: /* @__PURE__ */ d(re, {
872
+ icon: /* @__PURE__ */ d(le, {
869
873
  type: "icon-Vector",
870
874
  className: "icon-tianjia",
871
875
  style: {
@@ -874,28 +878,28 @@ ${e}`), e;
874
878
  })
875
879
  })
876
880
  })
877
- }), _ && (g != null && g.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ d(Un, {
881
+ }), G && (g != null && g.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ d(zn, {
878
882
  appId: o == null ? void 0 : o.id,
879
- ref: ge,
880
- isFirstSession: Qe,
881
- docViewerUrl: j,
883
+ ref: me,
884
+ isFirstSession: _e,
885
+ docViewerUrl: M,
882
886
  onStatusChange: (t) => z(void 0, null, function* () {
883
- t !== "process" ? (ue(!0), Pe()) : ue(!1);
887
+ t !== "process" ? (he(!0), Te()) : he(!1);
884
888
  }),
885
889
  createSession: () => new Promise((t) => {
886
- U(!0), w == null || w({
887
- netOpen: E ? W.OPEN : W.CLOSE
890
+ V(!0), w == null || w({
891
+ netOpen: P ? Y.OPEN : Y.CLOSE
888
892
  }).then((n) => {
889
893
  var l, i, c;
890
- v == null || v(n), U(!1), P(!!((l = n.data) != null && l.netOpen)), S(!!((i = n.data) != null && i.enableNetOpen));
894
+ v == null || v(n), V(!1), E(!!((l = n.data) != null && l.netOpen)), ee(!!((i = n.data) != null && i.enableNetOpen));
891
895
  const a = ((c = n.data) == null ? void 0 : c.id) || "";
892
896
  t(a);
893
897
  });
894
898
  }),
895
- sid: (gt = e == null ? void 0 : e.data) == null ? void 0 : gt.id,
896
- disabled: Le || D,
899
+ sid: (ut = e == null ? void 0 : e.data) == null ? void 0 : ut.id,
900
+ disabled: Pe || H,
897
901
  afterFileAdd: (t, n) => {
898
- n && ie((a) => {
902
+ n && oe((a) => {
899
903
  const l = a[n] || [];
900
904
  return {
901
905
  [n]: [...l, t]
@@ -905,7 +909,7 @@ ${e}`), e;
905
909
  afterFileDelete: (t) => {
906
910
  var a;
907
911
  const n = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
908
- n && ie((l) => {
912
+ n && oe((l) => {
909
913
  const i = l[n] || [];
910
914
  return {
911
915
  [n]: i.filter((c) => c.id !== t)
@@ -913,43 +917,43 @@ ${e}`), e;
913
917
  });
914
918
  },
915
919
  onFileListChange: (t) => {
916
- $t(t);
920
+ Bt(t);
917
921
  },
918
- shouldContinue: Bt,
922
+ shouldContinue: Yt,
919
923
  afterFilesClear: () => {
920
924
  var n;
921
925
  const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
922
- t && (ie({
926
+ t && (oe({
923
927
  [t]: []
924
- }), Pe());
928
+ }), Te());
925
929
  }
926
- }) : null, (g == null ? void 0 : g.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ d(Wn, {
930
+ }) : null, (g == null ? void 0 : g.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ d(Kn, {
927
931
  appId: o.id,
928
932
  list: [],
929
- search: qe ? Mt : "",
933
+ search: Be ? Vt : "",
930
934
  onPromptSelect: (t) => {
931
- Z(t.context), le(t.context);
935
+ J(t.context), ce(t.context);
932
936
  },
933
- disabled: D
937
+ disabled: H
934
938
  })]
935
- }), /* @__PURE__ */ V(ve, {
936
- children: [(g == null ? void 0 : g.connectNetwork) && o.type === 0 && ((ut = o.arrange) == null ? void 0 : ut.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ d(Bn, {
937
- sessionId: (mt = e == null ? void 0 : e.data) == null ? void 0 : mt.id,
938
- netStatus: E,
939
- enable: typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.diabled) == "boolean" ? !(r != null && r.connectNetwork.diabled) : _t,
939
+ }), /* @__PURE__ */ A(be, {
940
+ children: [(g == null ? void 0 : g.connectNetwork) && o.type === 0 && ((mt = o.arrange) == null ? void 0 : mt.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ d(Yn, {
941
+ sessionId: (ht = e == null ? void 0 : e.data) == null ? void 0 : ht.id,
942
+ netStatus: P,
943
+ enable: typeof (r == null ? void 0 : r.connectNetwork) == "object" && typeof (r == null ? void 0 : r.connectNetwork.diabled) == "boolean" ? !(r != null && r.connectNetwork.diabled) : Xt,
940
944
  disabledTip: e ? void 0 : "网络访问已被禁用",
941
945
  onNetStatusChange: (t) => {
942
- cn(t);
946
+ gn(t);
943
947
  }
944
- }), (g == null ? void 0 : g.sessionList) && /* @__PURE__ */ d(An, {
945
- currentSessionId: (ht = e == null ? void 0 : e.data) == null ? void 0 : ht.id,
948
+ }), (g == null ? void 0 : g.sessionList) && /* @__PURE__ */ d(qn, {
949
+ currentSessionId: (yt = e == null ? void 0 : e.data) == null ? void 0 : yt.id,
946
950
  onSessionChange: (t, n) => {
947
- Z(void 0), pe(!0), v == null || v(n);
951
+ J(void 0), ve(!0), v == null || v(n);
948
952
  },
949
- disabled: D
950
- }), Ot && Ht === "float" && /* @__PURE__ */ d("div", {
953
+ disabled: H
954
+ }), Rt && Dt === "float" && /* @__PURE__ */ d("div", {
951
955
  className: "session-history-drawer-component",
952
- children: /* @__PURE__ */ d(Nn, {
956
+ children: /* @__PURE__ */ d(Pn, {
953
957
  placement: "topRight",
954
958
  showArrow: !1,
955
959
  overlayClassName: "session-history-overlay",
@@ -958,88 +962,88 @@ ${e}`), e;
958
962
  },
959
963
  getPopupContainer: (t) => t.parentNode,
960
964
  content: "会话历史记录",
961
- children: /* @__PURE__ */ d(Q, {
965
+ children: /* @__PURE__ */ d(_, {
962
966
  className: "history-overlay-action",
963
- disabled: D,
967
+ disabled: H,
964
968
  type: "text",
965
- icon: /* @__PURE__ */ d(re, {
969
+ icon: /* @__PURE__ */ d(le, {
966
970
  type: "icon-lishijilu",
967
971
  style: {
968
972
  fontSize: 24
969
973
  }
970
974
  }),
971
- onClick: () => Ze(!0)
975
+ onClick: () => Je(!0)
972
976
  })
973
977
  })
974
- }), (g == null ? void 0 : g.sessionOpen) && /* @__PURE__ */ d(Q, {
975
- icon: /* @__PURE__ */ d(Mn, {}),
978
+ }), (g == null ? void 0 : g.sessionOpen) && /* @__PURE__ */ d(_, {
979
+ icon: /* @__PURE__ */ d(Vn, {}),
976
980
  className: "add-btn",
977
981
  type: "primary",
978
- disabled: Ye || !e || !b.length || D,
982
+ disabled: Ke || !e || !b.length || H,
979
983
  onClick: () => {
980
984
  var t, n;
981
- pe(!1), v == null || v(null), P(!1), (t = Be.current) == null || t.clear(), (n = Ne.current) == null || n.clear();
985
+ ve(!1), v == null || v(null), E(!1), (t = We.current) == null || t.clear(), (n = Le.current) == null || n.clear();
982
986
  },
983
987
  children: "新会话"
984
988
  })]
985
989
  })]
986
990
  }), /* @__PURE__ */ d("div", {
987
991
  className: "footer-textarea",
988
- children: /* @__PURE__ */ d(Hn, {
989
- ref: fe,
990
- maxLength: Rt,
991
- text: zt,
992
+ children: /* @__PURE__ */ d(Dn, {
993
+ ref: ue,
994
+ maxLength: Ft,
995
+ text: At,
992
996
  networkStatus: !1,
993
- loading: Ge || ye,
994
- disabled: Ue || Ve || D || Ge || ye,
995
- onTextSend: Se,
997
+ loading: Xe || pe,
998
+ disabled: Ve || Ae || H || Xe || pe,
999
+ onTextSend: et,
996
1000
  onChange: (t, n) => {
997
- Z(t);
1001
+ J(t);
998
1002
  const a = n.getText().replace(/[\n\s]+$/, "");
999
- le(a), Ut(a), qe || jt(!0);
1003
+ ce(a), zt(a), Be || Ut(!0);
1000
1004
  },
1001
- clearAction: /* @__PURE__ */ d(ve, {
1005
+ clearAction: /* @__PURE__ */ d(be, {
1002
1006
  size: 0,
1003
- children: /* @__PURE__ */ d(Q, {
1007
+ children: /* @__PURE__ */ d(_, {
1004
1008
  type: "link",
1005
- disabled: Le || D,
1009
+ disabled: Pe || H,
1006
1010
  ghost: !0,
1007
- icon: /* @__PURE__ */ d(re, {
1011
+ icon: /* @__PURE__ */ d(le, {
1008
1012
  style: {
1009
1013
  fontSize: 22
1010
1014
  },
1011
1015
  type: "icon-qingchujiyi"
1012
1016
  }),
1013
- onClick: () => Jt()
1017
+ onClick: () => en()
1014
1018
  })
1015
1019
  })
1016
1020
  })
1017
1021
  })]
1018
1022
  })
1019
- }), /* @__PURE__ */ d(Fn, {
1020
- tips: Et
1021
- }), We && /* @__PURE__ */ d(zn, {
1022
- isvisible: We,
1023
- files: At,
1024
- sessionId: (yt = e == null ? void 0 : e.data) == null ? void 0 : yt.id,
1023
+ }), /* @__PURE__ */ d(Mn, {
1024
+ tips: Tt
1025
+ }), Ye && /* @__PURE__ */ d(An, {
1026
+ isvisible: Ye,
1027
+ files: qt,
1028
+ sessionId: (pt = e == null ? void 0 : e.data) == null ? void 0 : pt.id,
1025
1029
  onClose: (t) => {
1026
- Vt(!1), Wt(!1);
1030
+ $t(!1), Kt(!1);
1027
1031
  }
1028
1032
  })]
1029
- }), Xe && /* @__PURE__ */ d($n, {
1033
+ }), Ze && /* @__PURE__ */ d(Bn, {
1030
1034
  currentSession: e,
1031
1035
  application: o,
1032
- networkStatus: E,
1036
+ networkStatus: P,
1033
1037
  setCurrentSession: v,
1034
- disabled: D,
1035
- isSessionHistoryVisible: Xe,
1036
- setIsSessionHistoryVisible: Ze,
1038
+ disabled: H,
1039
+ isSessionHistoryVisible: Ze,
1040
+ setIsSessionHistoryVisible: Je,
1037
1041
  onSessionChange: (t) => {
1038
- pe(!0);
1042
+ ve(!0);
1039
1043
  }
1040
1044
  })]
1041
1045
  });
1042
1046
  });
1043
1047
  export {
1044
- Ni as default
1048
+ Pi as default
1045
1049
  };