@glodon-aiot/agent-cli-ui 3.5.0-alpha.2 → 3.5.0-alpha.4

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