@glodon-aiot/agent-cli-ui 3.3.2-beta.11 → 3.3.2-beta.13

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.
@@ -95,8 +95,8 @@ const ye = (n) => {
95
95
  features: G
96
96
  }),
97
97
  children: [/* @__PURE__ */ s(ne, {
98
- height: i == null ? void 0 : i.height,
99
- width: i == null ? void 0 : i.width,
98
+ height: (i == null ? void 0 : i.height) || "100%",
99
+ width: (i == null ? void 0 : i.width) || "100%",
100
100
  maxConstraints: [document.body.clientWidth - 45],
101
101
  minConstraints: [Number(t == null ? void 0 : t.minWidth)],
102
102
  onResize: Y,
@@ -29,17 +29,17 @@ var z = (L, o, v) => new Promise((e, x) => {
29
29
  });
30
30
  import { jsx as c, jsxs as A } from "react/jsx-runtime";
31
31
  import { memo as Gt, useState as m, useRef as B, useContext as Xt, useEffect as T, useMemo as Zt } from "react";
32
- /* empty css */import { Divider as Jt, Spin as St, Button as _, Space as le, Upload as en, Tooltip as tn, message as u, notification as nn } from "antd";
32
+ /* empty css */import { Divider as Jt, Spin as St, Button as _, Space as ae, Upload as en, Tooltip as tn, message as u, notification as nn } from "antd";
33
33
  import de from "../../components/Iconfont/index.mjs";
34
34
  import { IHistoryRole as G, ChatMessageRole as it } from "@glodon-aiot/apis";
35
35
  import rt from "./HistoryItem/index.mjs";
36
- import at from "dayjs";
37
- import { v4 as lt } from "uuid";
36
+ import lt from "dayjs";
37
+ import { v4 as at } from "uuid";
38
38
  import on from "../../context.mjs";
39
39
  import { configuration as sn } from "@glodon-aiot/bot-client-sdk";
40
40
  import { MB as rn } from "../../constant.mjs";
41
- import an from "../../components/FilePreview/index.mjs";
42
- import { getImageExtension as ln } from "../../utils/index.mjs";
41
+ import ln from "../../components/FilePreview/index.mjs";
42
+ import { getImageExtension as an } from "../../utils/index.mjs";
43
43
  import dn from "../../QuillEditor/index.mjs";
44
44
  import cn from "../../components/Recommend/index.mjs";
45
45
  import fn from "../../components/Greeting/index.mjs";
@@ -69,7 +69,7 @@ class J {
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 = x, this.content = o, this.role = e, this.sessionId = v, this.files = x, this.messageTime = at(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = lt(), 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 = x, this.content = o, this.role = e, this.sessionId = v, this.files = x, this.messageTime = lt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = at(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
73
73
  isAgree: 0
74
74
  };
75
75
  }
@@ -100,7 +100,7 @@ const st = 10, Sn = (L) => {
100
100
  features: l,
101
101
  popupContainer: g,
102
102
  icon: ut
103
- } = Xt(on), [Le, ue] = m(!1), p = B(h), Ce = B(), [ht, mt] = m(0), [X, q] = m(), [Y, te] = m(""), [Ne, he] = m(!1), me = B(null), [Fe, pt] = m([]), [Te, K] = m(!1), [Ee, yt] = m(!1), [vt, kt] = m(""), [bt, W] = m(), [ne, ie] = m({}), oe = B(null), Pe = B(null), pe = B(null), [Re, wt] = m(!1), [xt, It] = m([]), [Lt, se] = m(!0), [Ct, Nt] = m(!0), [De, O] = m(!1), [ye, V] = m(!1), [He, Ft] = m(!1), [E, re] = m(typeof (l == null ? void 0 : l.promptVariables) == "object" ? l.promptVariables.default || [] : []), [Tt, Et] = m(typeof (l == null ? void 0 : l.knowledges) == "object" && l.knowledges.default || void 0), [Me, U] = m(!1), [Oe, Z] = m(!1), [Pt, Q] = m(typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.default) == "boolean" ? l.connectNetwork.default : !1), [Ue, ae] = m(!1);
103
+ } = Xt(on), [Le, ue] = m(!1), p = B(h), Ce = B(), [ht, mt] = m(0), [X, q] = m(), [Y, te] = m(""), [Ne, he] = m(!1), me = B(null), [Fe, pt] = m([]), [Te, K] = m(!1), [Ee, yt] = m(!1), [vt, kt] = m(""), [bt, W] = m(), [ne, ie] = m({}), oe = B(null), Pe = B(null), pe = B(null), [Re, wt] = m(!1), [xt, It] = m([]), [Lt, se] = m(!0), [Ct, Nt] = m(!0), [De, O] = m(!1), [ye, V] = m(!1), [He, Ft] = m(!1), [E, re] = m(typeof (l == null ? void 0 : l.promptVariables) == "object" ? l.promptVariables.default || [] : []), [Tt, Et] = m(typeof (l == null ? void 0 : l.knowledges) == "object" && l.knowledges.default || void 0), [Me, U] = m(!1), [Oe, Z] = m(!1), [Pt, Q] = m(typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.default) == "boolean" ? l.connectNetwork.default : !1), [Ue, le] = m(!1);
104
104
  T(() => {
105
105
  var r, i;
106
106
  e && (p.current = []), C([]);
@@ -240,7 +240,7 @@ const st = 10, Sn = (L) => {
240
240
  });
241
241
  return;
242
242
  }
243
- ae(!0);
243
+ le(!0);
244
244
  const a = Y ? `![](${Y})
245
245
  ${n}` : n;
246
246
  let s;
@@ -258,7 +258,7 @@ ${n}` : n;
258
258
  } catch (k) {
259
259
  s = !1;
260
260
  }
261
- if (ae(!1), s === !1)
261
+ if (le(!1), s === !1)
262
262
  return;
263
263
  let d = n;
264
264
  typeof s == "object" && (d = s.content || n), ((y = ne[i]) == null ? void 0 : y.length) > 0 ? Ht(d) : ve(d);
@@ -291,7 +291,7 @@ ${n}` : n;
291
291
  if (!fe || !e)
292
292
  return;
293
293
  const t = fe, n = () => z(void 0, null, function* () {
294
- ae(!0);
294
+ le(!0);
295
295
  const r = Y ? `![](${Y})
296
296
  ${t}` : t;
297
297
  let i;
@@ -309,7 +309,7 @@ ${t}` : t;
309
309
  } catch (a) {
310
310
  i = !1;
311
311
  }
312
- ae(!1), i !== !1 && (ve(t), xe(void 0));
312
+ le(!1), i !== !1 && (ve(t), xe(void 0));
313
313
  });
314
314
  return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
315
315
  e == null || e.removeEventListener("ready", n);
@@ -414,11 +414,11 @@ ${t}` : t, a = new J(i, r, G.User, n);
414
414
  });
415
415
  });
416
416
  }), je = (t, n) => {
417
- const r = ln(n.name);
417
+ const r = an(n.name);
418
418
  return new Promise((i) => {
419
419
  var s;
420
420
  const a = {
421
- files: [`${lt()}.${r}`],
421
+ files: [`${at()}.${r}`],
422
422
  isv: "minio",
423
423
  knowledgeId: ((s = t.data) == null ? void 0 : s.id) || "",
424
424
  type: 1
@@ -577,7 +577,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
577
577
  sessionId: "",
578
578
  reference: [],
579
579
  searchReference: [],
580
- messageTime: at(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
580
+ messageTime: lt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
581
581
  actions: [],
582
582
  isLoading: !1
583
583
  },
@@ -649,7 +649,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
649
649
  children: [(l == null ? void 0 : l.greeting) !== !1 && /* @__PURE__ */ c(fn, {
650
650
  text: l === void 0 || l.greeting === !0 || ((Ke = l.greeting) == null ? void 0 : Ke.text) === void 0 ? ot.text : l.greeting.text,
651
651
  icon: l === void 0 || l.greeting === !0 || ((We = l.greeting) == null ? void 0 : We.icon) === void 0 ? ut || ot.icon : l.greeting.icon,
652
- children: !!Fe.length && typeof (l == null ? void 0 : l.greeting) == "object" && l.greeting.questions !== !1 && /* @__PURE__ */ c(cn, {
652
+ children: !!Fe.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(cn, {
653
653
  ref: pe,
654
654
  sid: (Qe = e == null ? void 0 : e.data) == null ? void 0 : Qe.id,
655
655
  isRecommendClearing: Te,
@@ -715,7 +715,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
715
715
  className: "chat-footer-input",
716
716
  children: [X && /* @__PURE__ */ c("div", {
717
717
  className: "input-files",
718
- children: /* @__PURE__ */ c(an, {
718
+ children: /* @__PURE__ */ c(ln, {
719
719
  file: X,
720
720
  actions: {
721
721
  upload: Ot,
@@ -725,10 +725,10 @@ ${t}` : t, a = new J(i, r, G.User, n);
725
725
  },
726
726
  onUrlChange: (t) => te(t)
727
727
  })
728
- }), /* @__PURE__ */ A(le, {
728
+ }), /* @__PURE__ */ A(ae, {
729
729
  className: "footer-upload-action",
730
730
  onClick: (t) => t.preventDefault(),
731
- children: [/* @__PURE__ */ A(le, {
731
+ children: [/* @__PURE__ */ A(ae, {
732
732
  children: [o.type === 2 && (f == null ? void 0 : f.imageUpload) && /* @__PURE__ */ c(en, {
733
733
  disabled: !!X || M,
734
734
  accept: ".jpg, .png, .jpeg,.bmp",
@@ -832,7 +832,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
832
832
  },
833
833
  disabled: M
834
834
  })]
835
- }), /* @__PURE__ */ A(le, {
835
+ }), /* @__PURE__ */ A(ae, {
836
836
  children: [(f == null ? void 0 : f.connectNetwork) && o.type === 0 && ((Ge = o.arrange) == null ? void 0 : Ge.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ c(bn, {
837
837
  sessionId: (Xe = e == null ? void 0 : e.data) == null ? void 0 : Xe.id,
838
838
  netStatus: H,
@@ -874,7 +874,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
874
874
  const r = n.getText().replace(/[\n\s]+$/, "");
875
875
  S(r), kt(r), Ee || yt(!0);
876
876
  },
877
- clearAction: /* @__PURE__ */ c(le, {
877
+ clearAction: /* @__PURE__ */ c(ae, {
878
878
  size: 0,
879
879
  children: /* @__PURE__ */ c(_, {
880
880
  type: "link",
@@ -1,35 +1,35 @@
1
- var me = Object.defineProperty, ge = Object.defineProperties;
2
- var ue = Object.getOwnPropertyDescriptors;
1
+ var me = Object.defineProperty, ue = Object.defineProperties;
2
+ var ge = Object.getOwnPropertyDescriptors;
3
3
  var j = Object.getOwnPropertySymbols;
4
4
  var fe = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
5
- var z = (r, l, s) => l in r ? me(r, l, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[l] = s, R = (r, l) => {
5
+ var z = (r, l, s) => l in r ? me(r, l, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[l] = s, L = (r, l) => {
6
6
  for (var s in l || (l = {}))
7
7
  fe.call(l, s) && z(r, s, l[s]);
8
8
  if (j)
9
9
  for (var s of j(l))
10
10
  he.call(l, s) && z(r, s, l[s]);
11
11
  return r;
12
- }, E = (r, l) => ge(r, ue(l));
13
- var F = (r, l, s) => new Promise((C, b) => {
14
- var v = (g) => {
12
+ }, E = (r, l) => ue(r, ge(l));
13
+ var R = (r, l, s) => new Promise((C, N) => {
14
+ var x = (u) => {
15
15
  try {
16
- h(s.next(g));
16
+ h(s.next(u));
17
17
  } catch (I) {
18
- b(I);
18
+ N(I);
19
19
  }
20
- }, N = (g) => {
20
+ }, w = (u) => {
21
21
  try {
22
- h(s.throw(g));
22
+ h(s.throw(u));
23
23
  } catch (I) {
24
- b(I);
24
+ N(I);
25
25
  }
26
- }, h = (g) => g.done ? C(g.value) : Promise.resolve(g.value).then(v, N);
26
+ }, h = (u) => u.done ? C(u.value) : Promise.resolve(u.value).then(x, w);
27
27
  h((s = s.apply(r, l)).next());
28
28
  });
29
- import { jsxs as k, jsx as o, Fragment as ye } from "react/jsx-runtime";
30
- import { useState as m, useRef as Ie, useContext as ke, useEffect as S } from "react";
31
- import { Form as L, Space as ve, Button as K, Input as J, message as q, notification as Ce } from "antd";
32
- import { v4 as xe } from "uuid";
29
+ import { jsxs as v, jsx as o, Fragment as ye } from "react/jsx-runtime";
30
+ import { useState as m, useRef as Ie, useContext as ke, useEffect as b } from "react";
31
+ import { Form as q, Space as ve, Button as K, Input as J, message as F, notification as xe } from "antd";
32
+ import { v4 as Ce } from "uuid";
33
33
  import Se from "../../../context.mjs";
34
34
  import U from "../../../components/Iconfont/index.mjs";
35
35
  import be from "../../../components/KnowledgeList/KnowledgeSelect/index.mjs";
@@ -37,22 +37,22 @@ import "../../../packages/react-components/dist/es/index.mjs";
37
37
  import Ne from "../../../Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs";
38
38
  import we from "../../../node_modules/moment/dist/moment.mjs";
39
39
  /* empty css */import { fetchEventSource as pe } from "../fetchEventSource/fetch.mjs";
40
- import { Markdown as Te } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
40
+ import { Markdown as Me } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
41
41
  const Ee = ({
42
42
  application: r,
43
43
  sessionId: l
44
44
  }) => {
45
- const s = r.id, [C, b] = m(""), [v, N] = m(""), [h, g] = m(), [I, x] = m(!1), B = Ie(null), [D, W] = m([]), [w, H] = m([]), [G, O] = m(0), [Q, Y] = m(), [c, T] = m(), [$] = L.useForm(), [M, X] = m(!1), [A, Z] = m({}), [_, ee] = m(0), {
45
+ const s = r.id, [C, N] = m(""), [x, w] = m(""), [h, u] = m(), [I, S] = m(!1), B = Ie(null), [D, W] = m([]), [p, H] = m([]), [G, O] = m(0), [Q, Y] = m(), [c, M] = m(), [$] = q.useForm(), [T, X] = m(!1), [A, Z] = m({}), [_, ee] = m(0), {
46
46
  service: y,
47
- agentClient: p,
48
- beforeMessageSend: Me,
47
+ agentClient: k,
48
+ beforeMessageSend: Te,
49
49
  popupContainer: P,
50
50
  icon: Ae,
51
51
  token: ne,
52
52
  apiUrl: te
53
53
  } = ke(Se), se = (n, a, i, e) => {
54
54
  const t = {
55
- messageId: xe(),
55
+ messageId: Ce(),
56
56
  content: "",
57
57
  role: 1,
58
58
  sessionId: "",
@@ -60,7 +60,7 @@ const Ee = ({
60
60
  messageTime: "",
61
61
  llmModel: "",
62
62
  searchReference: []
63
- }, u = E(R({}, i), {
63
+ }, g = E(L({}, i), {
64
64
  stream: !0
65
65
  });
66
66
  pe(`${te}/chat/v2/chat?applicationId=${n}&sessionId=${a}`, {
@@ -69,7 +69,7 @@ const Ee = ({
69
69
  Authorization: `Bearer ${ne}`,
70
70
  "Content-Type": "application/json"
71
71
  },
72
- body: JSON.stringify(u),
72
+ body: JSON.stringify(g),
73
73
  openWhenHidden: !0,
74
74
  onopen(d) {
75
75
  return console.log("onopen"), d.ok && e != null && e.onopen && e.onopen(), Promise.resolve();
@@ -104,7 +104,7 @@ const Ee = ({
104
104
  };
105
105
  e != null && e.onmessage && e.onmessage(V);
106
106
  } else
107
- return Ce.error({
107
+ return xe.error({
108
108
  message: f.message
109
109
  });
110
110
  },
@@ -130,7 +130,7 @@ const Ee = ({
130
130
  }
131
131
  });
132
132
  };
133
- S(() => {
133
+ b(() => {
134
134
  if (!(r != null && r.id))
135
135
  return;
136
136
  const n = r.arrange;
@@ -140,13 +140,13 @@ const Ee = ({
140
140
  W(i), O(i.length);
141
141
  const e = i.map((t) => t.id);
142
142
  H(e);
143
- }, [r]), S(() => {
144
- if (!(r != null && r.id) || !p)
143
+ }, [r]), b(() => {
144
+ if (!(r != null && r.id) || !k)
145
145
  return;
146
- const n = p.questionContextMaxLength || 4e3;
146
+ const n = k.questionContextMaxLength || 4e3;
147
147
  ee(n), re();
148
- }, [r, p]);
149
- const re = () => F(void 0, null, function* () {
148
+ }, [r, k]);
149
+ const re = () => R(void 0, null, function* () {
150
150
  if (!y || !s)
151
151
  return;
152
152
  const n = yield y.postApplicationIdSession({
@@ -156,7 +156,7 @@ const Ee = ({
156
156
  debugger;
157
157
  Y(n);
158
158
  });
159
- S(() => {
159
+ b(() => {
160
160
  s && (y == null || y.getApplicationIdPromptVariables(s, {
161
161
  status: 1
162
162
  }).then((n) => {
@@ -166,26 +166,26 @@ const Ee = ({
166
166
  name: e.name,
167
167
  value: ""
168
168
  }));
169
- T(i);
169
+ M(i);
170
170
  }));
171
- }, [y]), S(() => {
171
+ }, [y]), b(() => {
172
172
  if (!c)
173
173
  return;
174
174
  const n = {};
175
175
  c == null || c.map((a) => {
176
176
  a.key && (n[a.key] = a.value);
177
- }), $.setFieldsValue(R({}, n)), Z(n);
177
+ }), $.setFieldsValue(L({}, n)), Z(n);
178
178
  }, [c]);
179
179
  const oe = (n, a) => {
180
180
  }, ae = (n) => {
181
- b(n.target.value);
182
- }, ce = () => F(void 0, null, function* () {
183
- if (x(!0), !s || !y || !p)
181
+ N(n.target.value);
182
+ }, ce = () => R(void 0, null, function* () {
183
+ if (S(!0), !s || !y || !k)
184
184
  return;
185
185
  for (const e in A)
186
- A[e] || (x(!1), q.config({
186
+ A[e] || (S(!1), F.config({
187
187
  getContainer: () => (P == null ? void 0 : P.current) || document.body
188
- }), q.error("变量值不能为空"), q.config({
188
+ }), F.error("变量值不能为空"), F.config({
189
189
  getContainer: void 0
190
190
  }));
191
191
  const n = yield y.postApplicationIdSession({
@@ -194,7 +194,7 @@ const Ee = ({
194
194
  });
195
195
  debugger;
196
196
  Y(n);
197
- const a = w == null ? void 0 : w.map((e) => e.toString()), i = {
197
+ const a = p == null ? void 0 : p.map((e) => e.toString()), i = {
198
198
  content: C,
199
199
  chatMode: 1,
200
200
  knowledges: a,
@@ -202,51 +202,51 @@ const Ee = ({
202
202
  };
203
203
  se(s, n.id, i, {
204
204
  onmessage: (e) => {
205
- x(!0), g(void 0), N(e.content);
205
+ S(!0), u(void 0), w(e.content);
206
206
  },
207
207
  onclose: (e) => {
208
- x(!1), e.code == 200 && (N(e.content), g(e));
208
+ S(!1), e.code == 200 && (w(e.content), u(e));
209
209
  },
210
210
  onerror: () => {
211
- x(!1);
211
+ S(!1);
212
212
  }
213
213
  }), c && y.getApplicationIdSessionIdPromptVariables(s, n.id).then((e) => {
214
- const t = e.filter((u) => u.key !== "query").map((u) => {
215
- const d = c.filter((f) => f.key === u.key);
216
- return u.value = d[0].value, u;
214
+ const t = e.filter((g) => g.key !== "query").map((g) => {
215
+ const d = c.filter((f) => f.key === g.key);
216
+ return g.value = d[0].value, g;
217
217
  });
218
- Promise.all(t.map((u) => {
219
- oe(u.id, u.value);
220
- })), T(t);
218
+ Promise.all(t.map((g) => {
219
+ oe(g.id, g.value);
220
+ })), M(t);
221
221
  });
222
222
  });
223
- S(() => {
224
- if (!v)
223
+ b(() => {
224
+ if (!x)
225
225
  return;
226
226
  const n = B.current;
227
227
  n && (n.scrollTop = n.scrollHeight);
228
- }, [v]);
228
+ }, [x]);
229
229
  const le = (n) => {
230
230
  H(n), O(n.length);
231
231
  }, de = (n, a) => {
232
232
  c && (c.map((i) => {
233
233
  i.id === n && (i.value = a.target.value);
234
- }), T([...c]));
234
+ }), M([...c]));
235
235
  }, ie = () => {
236
- X(!M);
236
+ X(!T);
237
237
  };
238
- return /* @__PURE__ */ k("div", {
238
+ return /* @__PURE__ */ v("div", {
239
239
  className: "text-main",
240
- children: [/* @__PURE__ */ k("div", {
240
+ children: [/* @__PURE__ */ v("div", {
241
241
  className: "text-left-sider",
242
- children: [/* @__PURE__ */ k("div", {
242
+ children: [/* @__PURE__ */ v("div", {
243
243
  className: "text-prompts",
244
244
  children: [/* @__PURE__ */ o("div", {
245
245
  className: "prompts-header",
246
- children: /* @__PURE__ */ k(ve, {
246
+ children: /* @__PURE__ */ v(ve, {
247
247
  children: [/* @__PURE__ */ o(K, {
248
248
  className: "prompts-btn",
249
- icon: M ? /* @__PURE__ */ o(U, {
249
+ icon: T ? /* @__PURE__ */ o(U, {
250
250
  type: "icon-biaoge-shouqi"
251
251
  }) : /* @__PURE__ */ o(U, {
252
252
  type: "icon-biaoge-zhankai"
@@ -258,7 +258,7 @@ const Ee = ({
258
258
  children: "文本生成设置"
259
259
  })]
260
260
  })
261
- }), !M && (c != null && c.length ? /* @__PURE__ */ o(L, {
261
+ }), !T && (c != null && c.length ? /* @__PURE__ */ o(q, {
262
262
  autoComplete: "off",
263
263
  form: $,
264
264
  labelWrap: !0,
@@ -269,7 +269,7 @@ const Ee = ({
269
269
  }
270
270
  },
271
271
  className: "prompts-form",
272
- children: c == null ? void 0 : c.map((n) => /* @__PURE__ */ o(L.Item, {
272
+ children: c == null ? void 0 : c.map((n) => /* @__PURE__ */ o(q.Item, {
273
273
  label: n.name,
274
274
  name: n.key,
275
275
  style: {
@@ -281,18 +281,18 @@ const Ee = ({
281
281
  }],
282
282
  children: /* @__PURE__ */ o(J, {
283
283
  placeholder: "请输入",
284
- maxLength: 1e3,
284
+ maxLength: k == null ? void 0 : k.questionContextMaxLength,
285
285
  onBlur: (a) => de(n.id, a)
286
286
  })
287
287
  }, n.key))
288
288
  }) : null)]
289
- }), /* @__PURE__ */ k("div", {
289
+ }), /* @__PURE__ */ v("div", {
290
290
  className: "sider-header",
291
291
  children: [/* @__PURE__ */ o("span", {
292
292
  className: "header-title",
293
293
  children: "文本生成输入"
294
294
  }), D.length !== 0 && /* @__PURE__ */ o(be, {
295
- checkedValues: w,
295
+ checkedValues: p,
296
296
  currKnowledgeList: D,
297
297
  selectCount: G,
298
298
  onSelectChange: le,
@@ -300,7 +300,7 @@ const Ee = ({
300
300
  })]
301
301
  }), /* @__PURE__ */ o("div", {
302
302
  className: "sider-main",
303
- children: /* @__PURE__ */ k("div", {
303
+ children: /* @__PURE__ */ v("div", {
304
304
  className: "sider-text",
305
305
  children: [/* @__PURE__ */ o(J.TextArea, {
306
306
  style: {
@@ -331,9 +331,9 @@ const Ee = ({
331
331
  children: /* @__PURE__ */ o("div", {
332
332
  className: "sider-text",
333
333
  ref: B,
334
- children: v ? /* @__PURE__ */ k(ye, {
335
- children: [/* @__PURE__ */ o(Te, {
336
- children: v
334
+ children: x ? /* @__PURE__ */ v(ye, {
335
+ children: [/* @__PURE__ */ o(Me, {
336
+ children: x
337
337
  }), h && (h == null ? void 0 : h.reference.length) !== 0 && /* @__PURE__ */ o(Ne, {
338
338
  history: h,
339
339
  docViewerUrl: ""
@@ -1,76 +1,65 @@
1
- var z = Object.defineProperty, A = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
1
+ var A = Object.defineProperty, L = Object.defineProperties;
2
+ var M = Object.getOwnPropertyDescriptors;
3
3
  var i = Object.getOwnPropertySymbols;
4
- var L = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
- var s = (o, e, t) => e in o ? z(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, a = (o, e) => {
4
+ var P = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
5
+ var s = (o, e, t) => e in o ? A(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, a = (o, e) => {
6
6
  for (var t in e || (e = {}))
7
- L.call(e, t) && s(o, t, e[t]);
7
+ P.call(e, t) && s(o, t, e[t]);
8
8
  if (i)
9
9
  for (var t of i(e))
10
- M.call(e, t) && s(o, t, e[t]);
10
+ U.call(e, t) && s(o, t, e[t]);
11
11
  return o;
12
- }, l = (o, e) => A(o, B(e));
12
+ }, d = (o, e) => L(o, M(e));
13
13
  import { jsx as n } from "react/jsx-runtime";
14
- import { useRef as P, useState as d, useEffect as j } from "react";
15
- /* empty css */import { ConfigProvider as m } from "antd";
16
- import w from "antd/es/locale/zh_CN";
14
+ import { useRef as j, useState as l, useEffect as z } from "react";
15
+ /* empty css */import { ConfigProvider as f } from "antd";
16
+ import B from "antd/es/locale/zh_CN";
17
17
  import E from "./components/TextSiders/index.mjs";
18
18
  import { JWT as J } from "../utils/index.mjs";
19
- import { AgentClientProvider as V } from "../context.mjs";
20
- const ae = (o) => {
19
+ import { AgentClientProvider as W } from "../context.mjs";
20
+ const Y = (o) => {
21
21
  const {
22
22
  application: e,
23
- className: t,
24
- triggerButton: W,
25
- size: q,
26
- theme: c,
27
- icon: D,
28
- docViewerUrl: F,
23
+ theme: t,
29
24
  token: r,
30
- debug: G,
31
- env: H,
32
- plugins: K,
33
- mcp: O,
34
- footer: p,
35
- defaultInput: f,
36
- onComment: u,
37
- onSessionLoad: g,
38
- onSessionUnload: h,
39
- onMessage: v,
25
+ footer: m,
26
+ defaultInput: c,
27
+ onComment: p,
28
+ onSessionLoad: u,
29
+ onSessionUnload: g,
30
+ onMessage: h,
40
31
  beforeMessageSend: C,
41
32
  bodyStyle: S,
42
- apiUrl: Q,
43
- sessionId: x,
44
- disabled: I,
45
- transform: b,
46
- features: N,
47
- stream: X,
48
- agentClient: U
49
- } = o, R = P(null), [T, Y] = d(!1), [Z, k] = d();
50
- return j(() => {
33
+ sessionId: v,
34
+ disabled: x,
35
+ transform: I,
36
+ features: b,
37
+ agentClient: N
38
+ } = o, R = j(null), [T, q] = l(!1), [w, k] = l();
39
+ return z(() => {
51
40
  if (!r)
52
41
  return;
53
42
  const y = J(r);
54
43
  k(y.rid);
55
- }, [r]), m.config({
56
- theme: c
57
- }), /* @__PURE__ */ n(m, {
58
- locale: w,
59
- children: /* @__PURE__ */ n(V, {
60
- value: l(a({}, o), {
44
+ }, [r]), f.config({
45
+ theme: t
46
+ }), /* @__PURE__ */ n(f, {
47
+ locale: B,
48
+ children: /* @__PURE__ */ n(W, {
49
+ value: d(a({}, o), {
61
50
  popupContainer: R,
62
- agentClient: U,
63
- footer: p,
64
- defaultInput: f,
65
- onComment: u,
66
- onSessionLoad: g,
67
- onSessionUnload: h,
68
- onMessage: v,
51
+ agentClient: N,
52
+ footer: m,
53
+ defaultInput: c,
54
+ onComment: p,
55
+ onSessionLoad: u,
56
+ onSessionUnload: g,
57
+ onMessage: h,
69
58
  beforeMessageSend: C,
70
59
  bodyStyle: S,
71
- disabled: I,
72
- transform: b,
73
- features: N
60
+ disabled: x,
61
+ transform: I,
62
+ features: b
74
63
  }),
75
64
  children: !T && /* @__PURE__ */ n("div", {
76
65
  className: "chat-text",
@@ -78,7 +67,7 @@ const ae = (o) => {
78
67
  className: "text-pannel",
79
68
  children: /* @__PURE__ */ n(E, {
80
69
  application: e,
81
- sessionId: x
70
+ sessionId: v
82
71
  })
83
72
  })
84
73
  })
@@ -86,5 +75,5 @@ const ae = (o) => {
86
75
  });
87
76
  };
88
77
  export {
89
- ae as default
78
+ Y as default
90
79
  };