@glodon-aiot/agent-cli-ui 3.4.2 → 3.4.3-beta.1

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.
Files changed (43) hide show
  1. package/dist/es/Dialog/AgentChat/HistoryItem/FileItem/index.mjs +52 -48
  2. package/dist/es/Dialog/AgentChat/HistoryItem/SessionAction/index.mjs +26 -23
  3. package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +26 -24
  4. package/dist/es/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/index.mjs +65 -59
  5. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.mjs +179 -161
  6. package/dist/es/Dialog/AgentChat/index.mjs +183 -159
  7. package/dist/es/QuillEditor/index.mjs +72 -65
  8. package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +129 -125
  9. package/dist/es/components/Recommend/RecommendItem.mjs +20 -18
  10. package/dist/es/index.mjs +223 -214
  11. package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
  12. package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
  13. package/dist/es/src/style.css +1 -1
  14. package/dist/es/src/style11.css +1 -1
  15. package/dist/es/src/style12.css +1 -1
  16. package/dist/es/src/style13.css +1 -1
  17. package/dist/es/src/style14.css +1 -1
  18. package/dist/es/src/style15.css +1 -1
  19. package/dist/es/src/style16.css +1 -1
  20. package/dist/es/src/style17.css +1 -1
  21. package/dist/es/src/style18.css +1 -1
  22. package/dist/es/src/style19.css +1 -1
  23. package/dist/es/src/style20.css +1 -1
  24. package/dist/es/src/style21.css +1 -1
  25. package/dist/es/src/style23.css +1 -1
  26. package/dist/es/src/style26.css +1 -1
  27. package/dist/es/src/style27.css +1 -1
  28. package/dist/es/src/style28.css +1 -1
  29. package/dist/es/src/style3.css +1 -1
  30. package/dist/es/src/style30.css +1 -1
  31. package/dist/es/src/style31.css +1 -1
  32. package/dist/es/src/style32.css +1 -1
  33. package/dist/es/src/style33.css +1 -1
  34. package/dist/es/src/style4.css +1 -1
  35. package/dist/es/src/style7.css +1 -1
  36. package/dist/es/src/style8.css +1 -1
  37. package/dist/es/src/style9.css +1 -1
  38. package/dist/es/utils/antdConfig.mjs +15 -0
  39. package/dist/lib/index.css +1 -1
  40. package/dist/lib/index.js +56 -56
  41. package/dist/src/utils/antdConfig.d.ts +7 -0
  42. package/dist/src/utils/testAntdPrefix.d.ts +3 -0
  43. package/package.json +3 -3
@@ -1,25 +1,25 @@
1
- var I = (L, P, g) => new Promise((a, b) => {
1
+ var I = (L, P, g) => new Promise((d, N) => {
2
2
  var R = (h) => {
3
3
  try {
4
- S(g.next(h));
5
- } catch (N) {
6
- b(N);
4
+ C(g.next(h));
5
+ } catch (S) {
6
+ N(S);
7
7
  }
8
8
  }, A = (h) => {
9
9
  try {
10
- S(g.throw(h));
11
- } catch (N) {
12
- b(N);
10
+ C(g.throw(h));
11
+ } catch (S) {
12
+ N(S);
13
13
  }
14
- }, S = (h) => h.done ? a(h.value) : Promise.resolve(h.value).then(R, A);
15
- S((g = g.apply(L, P)).next());
14
+ }, C = (h) => h.done ? d(h.value) : Promise.resolve(h.value).then(R, A);
15
+ C((g = g.apply(L, P)).next());
16
16
  });
17
- import { jsx as o, Fragment as le, jsxs as C } from "react/jsx-runtime";
18
- import { Upload as W, Button as M, message as i, Badge as ue, Spin as fe, Popover as ge, Space as me } from "antd";
19
- import { forwardRef as he, useState as E, useRef as G, useContext as pe, useEffect as z, useImperativeHandle as ye } from "react";
20
- import { LoadingOutlined as xe, CloseCircleFilled as Se, CloudUploadOutlined as Ce } from "@ant-design/icons";
21
- /* empty css */import Ne from "lodash/debounce";
22
- import be from "./FileCard/index.mjs";
17
+ import { jsx as r, Fragment as le, jsxs as b } from "react/jsx-runtime";
18
+ import { Upload as W, Button as M, message as o, Badge as ue, Spin as fe, Popover as ge, Space as me } from "antd";
19
+ import { forwardRef as he, useState as E, useRef as G, useContext as pe, useEffect as z, useImperativeHandle as xe } from "react";
20
+ import { LoadingOutlined as ye, CloseCircleFilled as Ce, CloudUploadOutlined as be } from "@ant-design/icons";
21
+ /* empty css */import Se from "lodash/debounce";
22
+ import Ne from "./FileCard/index.mjs";
23
23
  import { IFileOrigin as Fe } from "@glodon-aiot/apis";
24
24
  import we from "./ClearModal/index.mjs";
25
25
  import j from "../../../../components/Iconfont/index.mjs";
@@ -29,50 +29,50 @@ import { MB as Ae } from "../../../../constant.mjs";
29
29
  const Ue = he((L, P) => {
30
30
  const {
31
31
  appId: g,
32
- sid: a,
33
- onStatusChange: b,
32
+ sid: d,
33
+ onStatusChange: N,
34
34
  createSession: R,
35
35
  disabled: A = !1,
36
- afterFileAdd: S,
36
+ afterFileAdd: C,
37
37
  afterFileDelete: h,
38
- onFileListChange: N,
38
+ onFileListChange: S,
39
39
  shouldContinue: D = !0,
40
40
  afterFilesClear: K,
41
41
  docViewerUrl: q,
42
42
  isFirstSession: J
43
- } = L, [d, m] = E([]), f = G(d), [Q, U] = E([]), [Y, T] = E(!1), [F, k] = E(""), w = G(D), [$, B] = E(!1), {
43
+ } = L, [c, m] = E([]), f = G(c), [Q, U] = E([]), [Y, T] = E(!1), [F, k] = E(""), w = G(D), [$, B] = E(!1), {
44
44
  Dragger: Z
45
45
  } = W, {
46
- service: c,
47
- popupContainer: n
46
+ service: a,
47
+ popupContainer: t
48
48
  } = pe(ve);
49
49
  z(() => {
50
50
  w.current = D;
51
- }, [D]), ye(P, () => ({
51
+ }, [D]), xe(P, () => ({
52
52
  update: H,
53
53
  clear: _
54
54
  })), z(() => {
55
55
  J || (U([]), m([]), H());
56
- }, [a]);
57
- const H = () => a ? new Promise((e, s) => {
58
- c == null || c.getApplicationIdSessionKnowledgeFiles(g, a, {
56
+ }, [d]);
57
+ const H = () => d ? new Promise((e, i) => {
58
+ a == null || a.getApplicationIdSessionKnowledgeFiles(g, d, {
59
59
  enabled: 1
60
- }).then((r) => {
61
- U(r), m(r), ee(r);
60
+ }).then((s) => {
61
+ U(s), m(s), ee(s);
62
62
  }).finally(() => {
63
63
  e();
64
64
  });
65
65
  }) : Promise.resolve(), ee = (e) => I(void 0, null, function* () {
66
- a && (e == null || e.map((s) => I(void 0, null, function* () {
67
- var r;
66
+ d && (e == null || e.map((i) => I(void 0, null, function* () {
67
+ var s;
68
68
  try {
69
- if (yield c == null ? void 0 : c.checkFileReady(g, a, s.id)) {
70
- const l = [...f.current], p = e.findIndex((u) => u.id === s.id);
71
- p !== -1 && (l[p].status = 2), m(l), S && S(s, a);
69
+ if (yield a == null ? void 0 : a.checkFileReady(g, d, i.id)) {
70
+ const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
71
+ p !== -1 && (l[p].status = 2), m(l), C && C(i, d);
72
72
  }
73
- } catch (t) {
74
- if (((r = t.cause) == null ? void 0 : r.code) === -101) {
75
- const l = [...f.current], p = e.findIndex((u) => u.id === s.id);
73
+ } catch (n) {
74
+ if (((s = n.cause) == null ? void 0 : s.code) === -101) {
75
+ const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
76
76
  p !== -1 && (l[p].status = 3), m(l);
77
77
  return;
78
78
  }
@@ -80,109 +80,119 @@ const Ue = he((L, P) => {
80
80
  })));
81
81
  });
82
82
  z(() => {
83
- b && b(F);
83
+ N && N(F);
84
84
  }, [F]);
85
85
  const O = (e) => I(void 0, null, function* () {
86
86
  if (e.size <= 0)
87
- return i.config({
88
- getContainer: () => (n == null ? void 0 : n.current) || document.body
89
- }), i.error("该文件为空,请重新上传文档"), i.config({
90
- getContainer: void 0
87
+ return o.config({
88
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
89
+ prefixCls: "gbot-message"
90
+ }), o.error("该文件为空,请重新上传文档"), o.config({
91
+ getContainer: void 0,
92
+ prefixCls: "gbot-message"
91
93
  }), !1;
92
94
  if (Ee(e.name).length > X)
93
- return i.config({
94
- getContainer: () => (n == null ? void 0 : n.current) || document.body
95
- }), i.error(`文件名称不能超过${X}字符`), i.config({
96
- getContainer: void 0
95
+ return o.config({
96
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
97
+ prefixCls: "gbot-message"
98
+ }), o.error(`文件名称不能超过${X}字符`), o.config({
99
+ getContainer: void 0,
100
+ prefixCls: "gbot-message"
97
101
  }), !1;
98
102
  if (e.size > 50 * Ae)
99
- return i.config({
100
- getContainer: () => (n == null ? void 0 : n.current) || document.body
101
- }), i.error(`${e.name}文件大小不能超过 50M`), i.config({
102
- getContainer: void 0
103
+ return o.config({
104
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
105
+ prefixCls: "gbot-message"
106
+ }), o.error(`${e.name}文件大小不能超过 50M`), o.config({
107
+ getContainer: void 0,
108
+ prefixCls: "gbot-message"
103
109
  }), !1;
104
- if (ze.some((t) => t === e.type)) {
105
- const t = e;
106
- t.status = 1, m((l) => l.length >= 10 ? l : [...l, t]);
110
+ if (ze.some((n) => n === e.type)) {
111
+ const n = e;
112
+ n.status = 1, m((l) => l.length >= 10 ? l : [...l, n]);
107
113
  } else
108
- ie("存在文件格式不正确的文件,已自动去除");
114
+ oe("存在文件格式不正确的文件,已自动去除");
109
115
  return !1;
110
116
  });
111
117
  z(() => {
112
- if (d.length < 10 ? T(!1) : T(!0), !d.length) {
118
+ if (c.length < 10 ? T(!1) : T(!0), !c.length) {
113
119
  k("");
114
120
  return;
115
121
  }
116
- const e = d.find((t) => t.status === 1), s = d.find((t) => t.status === 3);
117
- d.every((t) => t.status === 2) ? k("successed") : e ? k("process") : s && k("failed"), N && N(d);
118
- }, [d]), z(() => {
119
- f.current = d;
120
- const e = d.filter((s) => !Q.includes(s));
121
- re(e), U(d);
122
- }, [d]);
123
- const ne = (e, s, r) => I(void 0, null, function* () {
122
+ const e = c.find((n) => n.status === 1), i = c.find((n) => n.status === 3);
123
+ c.every((n) => n.status === 2) ? k("successed") : e ? k("process") : i && k("failed"), S && S(c);
124
+ }, [c]), z(() => {
125
+ f.current = c;
126
+ const e = c.filter((i) => !Q.includes(i));
127
+ se(e), U(c);
128
+ }, [c]);
129
+ const te = (e, i, s) => I(void 0, null, function* () {
124
130
  var p;
125
- const t = [...f.current], l = f.current.findIndex((u) => u === r);
126
- l !== -1 && (t[l].id = s), m(t);
131
+ const n = [...f.current], l = f.current.findIndex((u) => u === s);
132
+ l !== -1 && (n[l].id = i), m(n);
127
133
  try {
128
- const u = yield c == null ? void 0 : c.checkFileReady(g, e, s, () => w.current, void 0, (y) => {
129
- const x = [...f.current], v = f.current.findIndex((ae) => ae === r);
130
- x[v].url = y.url, m(x);
134
+ const u = yield a == null ? void 0 : a.checkFileReady(g, e, i, () => w.current, void 0, (x) => {
135
+ const y = [...f.current], v = f.current.findIndex((de) => de === s);
136
+ y[v].url = x.url, m(y);
131
137
  });
132
138
  if (u) {
133
- const y = [...f.current], x = f.current.findIndex((v) => v === r);
134
- x !== -1 && (y[x].status = 2, y[x].url = u.url), m(y), S && S(u, e);
139
+ const x = [...f.current], y = f.current.findIndex((v) => v === s);
140
+ y !== -1 && (x[y].status = 2, x[y].url = u.url), m(x), C && C(u, e);
135
141
  }
136
142
  } catch (u) {
137
143
  if (((p = u.cause) == null ? void 0 : p.code) === -101) {
138
- const y = [...f.current], x = f.current.findIndex((v) => v === r);
139
- x !== -1 && (y[x].status = 3), m(y);
144
+ const x = [...f.current], y = f.current.findIndex((v) => v === s);
145
+ y !== -1 && (x[y].status = 3), m(x);
140
146
  return;
141
147
  }
142
148
  }
143
- }), te = () => a ? Promise.resolve(a) : R(), re = (e) => {
144
- e.length && te().then((s) => {
145
- e == null || e.forEach((r) => {
146
- var t;
147
- w.current = !0, (t = de(s, r)) == null || t.then((l) => {
149
+ }), ne = () => d ? Promise.resolve(d) : R(), se = (e) => {
150
+ e.length && ne().then((i) => {
151
+ e == null || e.forEach((s) => {
152
+ var n;
153
+ w.current = !0, (n = ce(i, s)) == null || n.then((l) => {
148
154
  var u;
149
155
  if (!l)
150
156
  return;
151
157
  const p = {
152
158
  url: l,
153
- name: r.name,
154
- size: r.size,
159
+ name: s.name,
160
+ size: s.size,
155
161
  type: 1,
156
162
  origin: Fe.AECPILOT
157
163
  };
158
- w.current && ((u = oe(s, p)) == null || u.then((y) => ne(s, y, r)));
164
+ w.current && ((u = re(i, p)) == null || u.then((x) => te(i, x, s)));
159
165
  });
160
166
  });
161
167
  });
162
- }, oe = (e, s) => c == null ? void 0 : c.postApplicationIdSessionKnowledgeSessionFile(g, e, s), ie = Ne((e) => {
163
- i.config({
164
- getContainer: () => (n == null ? void 0 : n.current) || document.body
165
- }), i.error(e), i.config({
166
- getContainer: void 0
168
+ }, re = (e, i) => a == null ? void 0 : a.postApplicationIdSessionKnowledgeSessionFile(g, e, i), oe = Se((e) => {
169
+ o.config({
170
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
171
+ prefixCls: "gbot-message"
172
+ }), o.error(e), o.config({
173
+ getContainer: void 0,
174
+ prefixCls: "gbot-message"
167
175
  });
168
- }, 300), se = (e) => {
169
- a && e != null && e.id && (c == null || c.delApplicationIdSessionKnowledgeFileId(g, a, e.id).then((s) => {
170
- const r = d.filter((t) => t.id !== e.id);
171
- m(r), i.config({
172
- getContainer: () => (n == null ? void 0 : n.current) || document.body
173
- }), i.success("删除成功"), i.config({
174
- getContainer: void 0
176
+ }, 300), ie = (e) => {
177
+ d && e != null && e.id && (a == null || a.delApplicationIdSessionKnowledgeFileId(g, d, e.id).then((i) => {
178
+ const s = c.filter((n) => n.id !== e.id);
179
+ m(s), o.config({
180
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
181
+ prefixCls: "gbot-message"
182
+ }), o.success("删除成功"), o.config({
183
+ getContainer: void 0,
184
+ prefixCls: "gbot-message"
175
185
  }), h && h(e.id);
176
186
  }));
177
- }, ce = /* @__PURE__ */ o(le, {
178
- children: /* @__PURE__ */ C("div", {
187
+ }, ae = /* @__PURE__ */ r(le, {
188
+ children: /* @__PURE__ */ b("div", {
179
189
  className: "card-title",
180
- children: [/* @__PURE__ */ o("span", {
190
+ children: [/* @__PURE__ */ r("span", {
181
191
  className: "name",
182
192
  children: "上传列表"
183
- }), /* @__PURE__ */ C("div", {
193
+ }), /* @__PURE__ */ b("div", {
184
194
  className: "actions",
185
- children: [/* @__PURE__ */ o(W, {
195
+ children: [/* @__PURE__ */ r(W, {
186
196
  accept: ".doc, .docx, .pdf",
187
197
  beforeUpload: O,
188
198
  showUploadList: !1,
@@ -190,71 +200,73 @@ const Ue = he((L, P) => {
190
200
  margin: 0
191
201
  },
192
202
  multiple: !0,
193
- children: /* @__PURE__ */ o(M, {
203
+ children: /* @__PURE__ */ r(M, {
194
204
  className: "action",
195
205
  type: "link",
196
206
  disabled: Y,
197
- children: /* @__PURE__ */ C("div", {
207
+ children: /* @__PURE__ */ b("div", {
198
208
  className: "detail",
199
- children: [/* @__PURE__ */ o(j, {
209
+ children: [/* @__PURE__ */ r(j, {
200
210
  type: "icon-tianjia",
201
211
  style: {
202
212
  fontSize: 16
203
213
  }
204
- }), /* @__PURE__ */ o("div", {
214
+ }), /* @__PURE__ */ r("div", {
205
215
  children: "添加"
206
216
  })]
207
217
  })
208
218
  })
209
- }), /* @__PURE__ */ o(M, {
219
+ }), /* @__PURE__ */ r(M, {
210
220
  className: "action",
211
221
  type: "link",
212
- disabled: !d.length,
222
+ disabled: !c.length,
213
223
  onClick: () => {
214
224
  B(!0);
215
225
  },
216
- children: /* @__PURE__ */ C("div", {
226
+ children: /* @__PURE__ */ b("div", {
217
227
  className: "detail",
218
- children: [/* @__PURE__ */ o(j, {
228
+ children: [/* @__PURE__ */ r(j, {
219
229
  type: "icon-shanchu",
220
230
  style: {
221
231
  fontSize: 16
222
232
  }
223
- }), /* @__PURE__ */ o("span", {
233
+ }), /* @__PURE__ */ r("span", {
224
234
  children: "清空"
225
235
  })]
226
236
  })
227
237
  })]
228
238
  })]
229
239
  })
230
- }), de = (e, s) => {
240
+ }), ce = (e, i) => {
231
241
  if (!e)
232
242
  throw Error("session is not exist.");
233
- return c == null ? void 0 : c.uploadFile(e, s).catch(() => (i.config({
234
- getContainer: () => (n == null ? void 0 : n.current) || document.body
235
- }), i.error("服务异常,请稍后再试"), i.config({
236
- getContainer: void 0
243
+ return a == null ? void 0 : a.uploadFile(e, i).catch(() => (o.config({
244
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
245
+ prefixCls: "gbot-message"
246
+ }), o.error("服务异常,请稍后再试"), o.config({
247
+ getContainer: void 0,
248
+ prefixCls: "gbot-message"
237
249
  }), ""));
238
- }, V = /* @__PURE__ */ o("div", {
250
+ }, V = /* @__PURE__ */ r("div", {
239
251
  className: `upload-enter ${A ? "disabled" : ""}`,
240
- children: /* @__PURE__ */ o(ue, {
252
+ children: /* @__PURE__ */ r(ue, {
241
253
  size: "small",
242
254
  color: "#9C24F2",
243
- count: F === "successed" ? d.length : F === "process" ? /* @__PURE__ */ o(fe, {
255
+ count: F === "successed" ? c.length : F === "process" ? /* @__PURE__ */ r(fe, {
244
256
  className: "file-action file-process",
245
- indicator: /* @__PURE__ */ o(xe, {
257
+ indicator: /* @__PURE__ */ r(ye, {
246
258
  style: {
247
259
  fontSize: 14
248
260
  },
249
261
  spin: !0
250
262
  })
251
- }) : F === "failed" ? /* @__PURE__ */ o(Se, {
263
+ }) : F === "failed" ? /* @__PURE__ */ r(Ce, {
252
264
  style: {
253
265
  color: "#dc4446",
254
266
  fontSize: 14
255
267
  }
256
268
  }) : 0,
257
- children: /* @__PURE__ */ o(j, {
269
+ children: /* @__PURE__ */ r(j, {
258
270
  type: "icon-shangchuanwenjian",
259
271
  style: {
260
272
  fontSize: 24
@@ -262,22 +274,22 @@ const Ue = he((L, P) => {
262
274
  })
263
275
  })
264
276
  }), _ = () => new Promise((e) => {
265
- const s = f.current;
266
- if (!a)
277
+ const i = f.current;
278
+ if (!d)
267
279
  return e();
268
- const r = [];
269
- s.filter((t) => t.id).forEach((t) => r.push({
270
- id: t.id,
271
- status: t.status
272
- })), c == null || c.delApplicationIdSessionKnowledgeFile(g, a, {
273
- files: r
280
+ const s = [];
281
+ i.filter((n) => n.id).forEach((n) => s.push({
282
+ id: n.id,
283
+ status: n.status
284
+ })), a == null || a.delApplicationIdSessionKnowledgeFile(g, d, {
285
+ files: s
274
286
  }).then(() => {
275
287
  U([]), m([]), f.current = [], K && K(), w.current = !1, e();
276
288
  });
277
289
  });
278
- return /* @__PURE__ */ C("div", {
290
+ return /* @__PURE__ */ b("div", {
279
291
  className: "footer-upload",
280
- children: [A ? V : /* @__PURE__ */ o(ge, {
292
+ children: [A ? V : /* @__PURE__ */ r(ge, {
281
293
  overlayClassName: "upload-popover",
282
294
  overlayInnerStyle: {
283
295
  width: 264,
@@ -287,60 +299,66 @@ const Ue = he((L, P) => {
287
299
  zIndex: 1
288
300
  },
289
301
  placement: "topLeft",
290
- getPopupContainer: () => (n == null ? void 0 : n.current) || document.body,
291
- content: /* @__PURE__ */ o("div", {
302
+ getPopupContainer: () => (t == null ? void 0 : t.current) || document.body,
303
+ content: /* @__PURE__ */ r("div", {
292
304
  className: "file-upload",
293
- children: d.length > 0 ? /* @__PURE__ */ o("div", {
305
+ children: c.length > 0 ? /* @__PURE__ */ r("div", {
294
306
  className: "upload-wrapper",
295
- children: /* @__PURE__ */ o("div", {
307
+ children: /* @__PURE__ */ r("div", {
296
308
  className: "input-files",
297
309
  style: {
298
310
  display: "flex",
299
311
  flexDirection: "column"
300
312
  },
301
- children: d == null ? void 0 : d.map((e, s) => /* @__PURE__ */ o(be, {
313
+ children: c == null ? void 0 : c.map((e, i) => /* @__PURE__ */ r(Ne, {
302
314
  file: e,
303
315
  actions: {
304
316
  preview: () => {
305
317
  if (!(e != null && e.url)) {
306
- i.config({
307
- getContainer: () => (n == null ? void 0 : n.current) || document.body
308
- }), i.error("正在上传中"), i.config({
309
- getContainer: void 0
318
+ o.config({
319
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
320
+ prefixCls: "gbot-message"
321
+ }), o.error("正在上传中"), o.config({
322
+ getContainer: void 0,
323
+ prefixCls: "gbot-message"
310
324
  });
311
325
  return;
312
326
  }
313
327
  if (!Ie(e.url)) {
314
- i.config({
315
- getContainer: () => (n == null ? void 0 : n.current) || document.body
316
- }), i.error("链接格式不正确"), i.config({
317
- getContainer: void 0
328
+ o.config({
329
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
330
+ prefixCls: "gbot-message"
331
+ }), o.error("链接格式不正确"), o.config({
332
+ getContainer: void 0,
333
+ prefixCls: "gbot-message"
318
334
  });
319
335
  return;
320
336
  }
321
337
  window.open(`${q}#/doc?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
322
338
  },
323
339
  remove: () => {
324
- se(e);
340
+ ie(e);
325
341
  },
326
342
  download: () => {
327
- a && (c == null || c.getApplicationIdSessionKnowledgeFileId(g, a, e.id).then((r) => {
328
- if (!(r != null && r.url)) {
329
- i.config({
330
- getContainer: () => (n == null ? void 0 : n.current) || document.body
331
- }), i.error("下载失败"), i.config({
332
- getContainer: void 0
343
+ d && (a == null || a.getApplicationIdSessionKnowledgeFileId(g, d, e.id).then((s) => {
344
+ if (!(s != null && s.url)) {
345
+ o.config({
346
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
347
+ prefixCls: "gbot-message"
348
+ }), o.error("下载失败"), o.config({
349
+ getContainer: void 0,
350
+ prefixCls: "gbot-message"
333
351
  });
334
352
  return;
335
353
  }
336
- const t = document.createElement("a");
337
- t.href = r.url, t.download = r.name || "", t.click();
354
+ const n = document.createElement("a");
355
+ n.href = s.url, n.download = s.name || "", n.click();
338
356
  }));
339
357
  }
340
358
  }
341
- }, s))
359
+ }, i))
342
360
  })
343
- }) : /* @__PURE__ */ C(Z, {
361
+ }) : /* @__PURE__ */ b(Z, {
344
362
  name: "file",
345
363
  showUploadList: !1,
346
364
  multiple: !0,
@@ -348,39 +366,39 @@ const Ue = he((L, P) => {
348
366
  accept: ".pdf, .doc, .docx",
349
367
  maxCount: 10,
350
368
  listType: "picture",
351
- children: [/* @__PURE__ */ o("span", {
369
+ children: [/* @__PURE__ */ r("span", {
352
370
  className: "file-upload-icon",
353
- children: /* @__PURE__ */ o(Ce, {})
354
- }), /* @__PURE__ */ C(me, {
371
+ children: /* @__PURE__ */ r(be, {})
372
+ }), /* @__PURE__ */ b(me, {
355
373
  className: "file-upload-action",
356
- children: ["拖拽文件至此,或者", /* @__PURE__ */ o(M, {
374
+ children: ["拖拽文件至此,或者", /* @__PURE__ */ r(M, {
357
375
  type: "link",
358
376
  style: {
359
377
  padding: 0
360
378
  },
361
379
  children: "上传文件"
362
380
  })]
363
- }), /* @__PURE__ */ C("div", {
381
+ }), /* @__PURE__ */ b("div", {
364
382
  className: "file-upload-desc",
365
- children: [/* @__PURE__ */ o("div", {
383
+ children: [/* @__PURE__ */ r("div", {
366
384
  className: "item-upload-desc",
367
- children: /* @__PURE__ */ o("span", {
385
+ children: /* @__PURE__ */ r("span", {
368
386
  children: "1.支持 doc、pdf、docx 格式;"
369
387
  })
370
- }), /* @__PURE__ */ o("div", {
388
+ }), /* @__PURE__ */ r("div", {
371
389
  className: "item-upload-desc",
372
390
  children: "2.单个文件不超过 50 M;"
373
- }), /* @__PURE__ */ o("div", {
391
+ }), /* @__PURE__ */ r("div", {
374
392
  className: "item-upload-desc",
375
393
  children: "3.最多上传 10 个文件。"
376
394
  })]
377
395
  })]
378
396
  })
379
397
  }),
380
- title: ce,
398
+ title: ae,
381
399
  trigger: "click",
382
400
  children: V
383
- }), $ && /* @__PURE__ */ o(we, {
401
+ }), $ && /* @__PURE__ */ r(we, {
384
402
  isvisible: $,
385
403
  onClose: (e) => {
386
404
  e === "clear" && _(), B(!1);