@blueking/ai-blueking 0.3.19 → 0.3.21

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,8 +1,8 @@
1
1
  var He = Object.defineProperty;
2
2
  var Te = (o, n, e) => n in o ? He(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
- var G = (o, n, e) => (Te(o, typeof n != "symbol" ? n + "" : n, e), e);
3
+ var O = (o, n, e) => (Te(o, typeof n != "symbol" ? n + "" : n, e), e);
4
4
  import { Popover as Re, Input as ve, Exception as Ve, clickoutside as De, bkTooltips as pe, Tag as xe, Alert as Ee, Button as Ye, Message as fe, Select as be, provideGlobalConfig as Ie } from "bkui-vue";
5
- import { inject as Ae, ref as x, onMounted as ae, onBeforeUnmount as le, defineComponent as E, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as p, toDisplayString as T, unref as c, createCommentVNode as M, vShow as ke, createTextVNode as te, pushScopeId as ie, popScopeId as re, computed as K, normalizeStyle as J, normalizeClass as ee, createVNode as V, Fragment as Q, watch as we, createBlock as U, withCtx as Z, renderList as ce, nextTick as Le, withModifiers as D, onBeforeMount as Xe, renderSlot as qe, provide as Ke } from "vue";
5
+ import { inject as Ae, ref as Y, onMounted as ae, onBeforeUnmount as le, defineComponent as I, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as u, toDisplayString as T, unref as c, createCommentVNode as S, vShow as ke, createTextVNode as te, pushScopeId as ie, popScopeId as re, computed as K, normalizeStyle as Z, normalizeClass as ee, createVNode as R, Fragment as j, watch as we, createBlock as U, withCtx as F, renderList as ce, nextTick as Le, withModifiers as E, onBeforeMount as Xe, renderSlot as qe, provide as Ke } from "vue";
6
6
  import se from "dayjs";
7
7
  import ye from "highlight.js";
8
8
  import Ue from "markdown-it";
@@ -15,63 +15,63 @@ function he() {
15
15
  };
16
16
  }
17
17
  function Me() {
18
- const o = x(!1), n = () => {
19
- const l = document.querySelector(".ai-blueking-messages");
20
- l.scrollTop = l.scrollHeight;
21
- }, e = (l) => {
22
- const t = l.target;
18
+ const o = Y(!1), n = () => {
19
+ const i = document.querySelector(".ai-blueking-messages");
20
+ i.scrollTop = i.scrollHeight;
21
+ }, e = (i) => {
22
+ const t = i.target;
23
23
  o.value = t.scrollTop < t.scrollHeight - t.clientHeight - 20;
24
24
  }, s = () => {
25
- const l = document.querySelector(".ai-blueking-messages");
26
- l == null || l.addEventListener("scroll", e, { passive: !0 });
27
- }, a = () => {
28
- const l = document.querySelector(".ai-blueking-messages");
29
- l == null || l.removeEventListener("scroll", e);
25
+ const i = document.querySelector(".ai-blueking-messages");
26
+ i == null || i.addEventListener("scroll", e, { passive: !0 });
27
+ }, l = () => {
28
+ const i = document.querySelector(".ai-blueking-messages");
29
+ i == null || i.removeEventListener("scroll", e);
30
30
  };
31
- return ae(s), le(a), {
31
+ return ae(s), le(l), {
32
32
  isShow: o,
33
33
  scrollToBottom: n
34
34
  };
35
35
  }
36
- const $ = x(""), ue = x(!1);
36
+ const $ = Y(""), ue = Y(!1);
37
37
  function me(o) {
38
- const n = x(!1), e = x({ top: "0px", left: "0px" });
38
+ const n = Y(!1), e = Y({ top: "0px", left: "0px" });
39
39
  let s;
40
- const a = () => {
40
+ const l = () => {
41
41
  clearTimeout(s), s = setTimeout(() => {
42
- const i = window.getSelection();
43
- if (i && i.toString().trim().length > 0) {
42
+ const a = window.getSelection();
43
+ if (a && a.toString().trim().length > 0) {
44
44
  ue.value = !1;
45
- const L = i.getRangeAt(0).getBoundingClientRect(), y = window.innerWidth;
46
- $.value = i.toString().trim();
47
- const z = 80, C = 34, P = 10;
48
- let H = L.left + window.scrollX + L.width / 2 - z / 2;
49
- H = Math.max(P, Math.min(H, y - z - P));
50
- let R = L.top + window.scrollY - C - P;
51
- L.top > C + P || (R = L.bottom + window.scrollY + P), e.value = {
52
- top: `${R}px`,
45
+ const M = a.getRangeAt(0).getBoundingClientRect(), y = window.innerWidth;
46
+ $.value = a.toString().trim();
47
+ const z = 80, B = 34, C = 10;
48
+ let H = M.left + window.scrollX + M.width / 2 - z / 2;
49
+ H = Math.max(C, Math.min(H, y - z - C));
50
+ let D = M.top + window.scrollY - B - C;
51
+ M.top > B + C || (D = M.bottom + window.scrollY + C), e.value = {
52
+ top: `${D}px`,
53
53
  left: `${H}px`
54
54
  }, n.value = !0;
55
55
  } else
56
- l();
56
+ i();
57
57
  }, 300);
58
- }, l = () => {
58
+ }, i = () => {
59
59
  n.value = !1, ue.value || ($.value = "");
60
60
  }, t = () => {
61
- const i = window.getSelection();
62
- i && i.removeAllRanges(), $.value = "";
63
- }, m = (i) => {
64
- $.value = i;
61
+ const a = window.getSelection();
62
+ a && a.removeAllRanges(), $.value = "";
63
+ }, m = (a) => {
64
+ $.value = a;
65
65
  };
66
66
  return ae(() => {
67
- o && document.addEventListener("selectionchange", a);
67
+ o && document.addEventListener("selectionchange", l);
68
68
  }), le(() => {
69
- o && document.removeEventListener("selectionchange", a), clearTimeout(s);
69
+ o && document.removeEventListener("selectionchange", l), clearTimeout(s);
70
70
  }), {
71
71
  isIconVisible: n,
72
72
  iconPosition: e,
73
73
  selectedText: $,
74
- hideIcon: l,
74
+ hideIcon: i,
75
75
  clearSelection: t,
76
76
  setSelection: m,
77
77
  lockSelectedText: ue
@@ -147,7 +147,7 @@ const We = (o) => {
147
147
  label: f("解释"),
148
148
  prompt: f("explanationShortcut")
149
149
  }
150
- ], _e = { class: "ai-cite" }, $e = { class: "ai-cite-text" }, et = { class: "ai-cite-tips" }, tt = /* @__PURE__ */ E({
150
+ ], _e = { class: "ai-cite" }, $e = { class: "ai-cite-text" }, et = { class: "ai-cite-tips" }, tt = /* @__PURE__ */ I({
151
151
  __name: "ai-cite",
152
152
  props: {
153
153
  text: {},
@@ -159,14 +159,14 @@ const We = (o) => {
159
159
  "section",
160
160
  _e,
161
161
  [
162
- p(
162
+ u(
163
163
  "span",
164
164
  $e,
165
165
  T(n.text),
166
166
  1
167
167
  /* TEXT */
168
168
  ),
169
- p(
169
+ u(
170
170
  "span",
171
171
  et,
172
172
  T(c(f)("您选择的文本内容")),
@@ -177,7 +177,7 @@ const We = (o) => {
177
177
  key: 0,
178
178
  class: "ai-blueking-icon ai-blueking-close-circle-fill",
179
179
  onClick: e[0] || (e[0] = (s) => n.$emit("close"))
180
- })) : M("v-if", !0)
180
+ })) : S("v-if", !0)
181
181
  ],
182
182
  512
183
183
  /* NEED_PATCH */
@@ -187,24 +187,24 @@ const We = (o) => {
187
187
  }
188
188
  }), A = (o, n) => {
189
189
  const e = o.__vccOpts || o;
190
- for (const [s, a] of n)
191
- e[s] = a;
190
+ for (const [s, l] of n)
191
+ e[s] = l;
192
192
  return e;
193
- }, ze = /* @__PURE__ */ A(tt, [["__scopeId", "data-v-3fd96961"]]), ot = (o) => (ie("data-v-a8d839da"), o = o(), re(), o), nt = /* @__PURE__ */ ot(() => /* @__PURE__ */ p(
193
+ }, ze = /* @__PURE__ */ A(tt, [["__scopeId", "data-v-3fd96961"]]), ot = (o) => (ie("data-v-a8d839da"), o = o(), re(), o), nt = /* @__PURE__ */ ot(() => /* @__PURE__ */ u(
194
194
  "i",
195
195
  { class: "ai-blueking-icon ai-blueking-xiangxia-2" },
196
196
  null,
197
197
  -1
198
198
  /* HOISTED */
199
- )), st = /* @__PURE__ */ E({
199
+ )), st = /* @__PURE__ */ I({
200
200
  __name: "render-back",
201
201
  setup(o) {
202
202
  const { isShow: n, scrollToBottom: e } = Me();
203
- return (s, a) => c(n) ? (h(), g("span", {
203
+ return (s, l) => c(n) ? (h(), g("span", {
204
204
  key: 0,
205
205
  class: "ai-blueking-render-back",
206
- onClick: a[0] || (a[0] = //@ts-ignore
207
- (...l) => c(e) && c(e)(...l))
206
+ onClick: l[0] || (l[0] = //@ts-ignore
207
+ (...i) => c(e) && c(e)(...i))
208
208
  }, [
209
209
  nt,
210
210
  te(
@@ -212,18 +212,18 @@ const We = (o) => {
212
212
  1
213
213
  /* TEXT */
214
214
  )
215
- ])) : M("v-if", !0);
215
+ ])) : S("v-if", !0);
216
216
  }
217
217
  }), at = /* @__PURE__ */ A(st, [["__scopeId", "data-v-a8d839da"]]), lt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAH3tJREFUeF69nAd4VFXax39nStqkNxJC6KGDghQFXIosogGkCKKuFYVFFBVQXEEN69pFF5VFFGRFUelSFUQjCFIUkN5LIIH0hGSSSabd7zln5sIkhBRwv8MzzwBz7yn/8/b3PUfwP2iaphkAgxDC6du9pmmxQFugKdACaAU0BkKBEO9HvlLs/RQBZ4AjwDHgFHBQCJFdqV8T4BZCuP/s5Yg/s0NN02R/Ehw5WU32rWmaBGMI0ANoDTQHzNc4rgM4ARwGtgLfCiEkaHKcK8a+xjEqvPanAOSlGPQd9FLKX4FRgPz29xlVAucC5Nj6R/9Zn48C19vk3/WP0fuO/ls58APwjfzWKavyfK4HqOsGyHcymqZFAGOA0UCSd2FyDAWK91kvKAJR99F1oCQr6WDJ/5M9HQfmAZ8IIQr+LJDqPkV9Wz0kLSTVaJom5YcEZQoQ5wVELkI94yV/+XCFzdRXdh077EtdBjmOppFpMIi3JFhCiGIvUJrO8nUd65oA0ilBCCGp4jbgdaCrDyvIicsdRvMyi8QmO7eEwoIyTCYD0ZGBhIYF1HW+VT6vaZocx2UwqB0QbrcCaqfRKP4hhPhJ0zQ5FwlSnYV4nQGSg3mBsQCvARO8lCLlihTQl/qU4Chgsq18tmAvP/x4kvMZxZjMBholhvPKtL/QpXOCFLBXUFdtkdPfdbs1CgrLMBqFFh4WoFjQ7dY0g0F8AEwVQpToc69t3/K5OgGkaZpJqm5N01oC/wVu9gpc2ZeimEuS1bvoUpuDJ59ex9Llh4mIDFTA2MrsFBaWMeejZPr2aYpcnMFQp6moYfT3jh3P44uF+9h/MFsCRJfO9fnbvR1cDRJCcWsYDYLtwMNCiKP6GmoLUq1n5UM5dwILgCgvOBWA0QfWJ79qzVHGjl9L0yb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dbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=", it = (o) => {
218
- var n = o.renderer.rules.link_open || function(e, s, a, l, t) {
219
- return t.renderToken(e, s, a);
218
+ var n = o.renderer.rules.link_open || function(e, s, l, i, t) {
219
+ return t.renderToken(e, s, l);
220
220
  };
221
- o.renderer.rules.link_open = function(e, s, a, l, t) {
222
- return e[s].attrSet("target", "_blank"), n(e, s, a, l, t);
221
+ o.renderer.rules.link_open = function(e, s, l, i, t) {
222
+ return e[s].attrSet("target", "_blank"), n(e, s, l, i, t);
223
223
  };
224
224
  };
225
225
  var Ce = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.System = "system", o.User = "user", o))(Ce || {}), ne = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(ne || {});
226
- const rt = /* @__PURE__ */ E({
226
+ const rt = /* @__PURE__ */ I({
227
227
  __name: "ai-avatar",
228
228
  props: {
229
229
  size: { default: 36 }
@@ -240,17 +240,17 @@ const rt = /* @__PURE__ */ E({
240
240
  fontSize: `${n.size * 0.611}px`
241
241
  // 保持原比例 22/36
242
242
  }));
243
- return (a, l) => (h(), g(
243
+ return (l, i) => (h(), g(
244
244
  "span",
245
245
  {
246
- style: J(e.value),
246
+ style: Z(e.value),
247
247
  class: "message-photo ai"
248
248
  },
249
249
  [
250
- p(
250
+ u(
251
251
  "i",
252
252
  {
253
- style: J(s.value),
253
+ style: Z(s.value),
254
254
  class: "ai-blueking-icon ai-blueking-ai"
255
255
  },
256
256
  null,
@@ -277,7 +277,7 @@ const rt = /* @__PURE__ */ E({
277
277
  height: "16",
278
278
  class: "loading-message",
279
279
  "aria-hidden": "true"
280
- }, kt = /* @__PURE__ */ p(
280
+ }, kt = /* @__PURE__ */ u(
281
281
  "use",
282
282
  { "xlink:href": "#ai-blueking-quanquan" },
283
283
  null,
@@ -288,7 +288,7 @@ const rt = /* @__PURE__ */ E({
288
288
  ], Lt = {
289
289
  key: 3,
290
290
  class: "message-wrap"
291
- }, St = ["innerHTML"], Mt = /* @__PURE__ */ E({
291
+ }, St = ["innerHTML"], Mt = /* @__PURE__ */ I({
292
292
  __name: "render-message",
293
293
  props: {
294
294
  message: {},
@@ -316,7 +316,7 @@ const rt = /* @__PURE__ */ E({
316
316
  success: ""
317
317
  };
318
318
  return (m = e.message) != null && m.status ? t[e.message.status] : "";
319
- }), a = K(() => e.message.content ? n.render(e.message.content) : ""), l = K(() => {
319
+ }), l = K(() => e.message.content ? n.render(e.message.content) : ""), i = K(() => {
320
320
  const t = se(e.message.time), m = se();
321
321
  return e.message.time ? m.isSame(t, "year") ? t.format("MM-DD HH:mm:ss") : t.format("YYYY-MM-DD HH:mm:ss") : "";
322
322
  });
@@ -327,47 +327,47 @@ const rt = /* @__PURE__ */ E({
327
327
  },
328
328
  [
329
329
  t.message.cite ? (h(), g("div", dt, [
330
- V(ze, {
330
+ R(ze, {
331
331
  text: t.message.cite
332
332
  }, null, 8, ["text"])
333
- ])) : M("v-if", !0),
334
- p("div", ut, [
333
+ ])) : S("v-if", !0),
334
+ u("div", ut, [
335
335
  t.message.role === c(Ce).User ? (h(), g(
336
- Q,
336
+ j,
337
337
  { key: 0 },
338
338
  [
339
- p("p", pt, [
340
- l.value ? (h(), g(
339
+ u("p", pt, [
340
+ i.value ? (h(), g(
341
341
  "span",
342
342
  ht,
343
- T(l.value),
343
+ T(i.value),
344
344
  1
345
345
  /* TEXT */
346
- )) : M("v-if", !0),
347
- p("span", {
346
+ )) : S("v-if", !0),
347
+ u("span", {
348
348
  class: "markdown-message",
349
- innerHTML: a.value
349
+ innerHTML: l.value
350
350
  }, null, 8, mt)
351
351
  ]),
352
- p("span", gt, [
353
- p("img", { src: t.userPhoto }, null, 8, vt)
352
+ u("span", gt, [
353
+ u("img", { src: t.userPhoto }, null, 8, vt)
354
354
  ])
355
355
  ],
356
356
  64
357
357
  /* STABLE_FRAGMENT */
358
358
  )) : (h(), g(
359
- Q,
359
+ j,
360
360
  { key: 1 },
361
361
  [
362
- V(ct),
363
- p("p", ft, [
364
- l.value ? (h(), g(
362
+ R(ct),
363
+ u("p", ft, [
364
+ i.value ? (h(), g(
365
365
  "span",
366
366
  bt,
367
- T(l.value),
367
+ T(i.value),
368
368
  1
369
369
  /* TEXT */
370
- )) : M("v-if", !0),
370
+ )) : S("v-if", !0),
371
371
  s.value ? (h(), g(
372
372
  "i",
373
373
  {
@@ -377,8 +377,8 @@ const rt = /* @__PURE__ */ E({
377
377
  null,
378
378
  2
379
379
  /* CLASS */
380
- )) : M("v-if", !0),
381
- t.message.status === c(ne).Loading ? (h(), g("svg", yt, wt)) : M("v-if", !0),
380
+ )) : S("v-if", !0),
381
+ t.message.status === c(ne).Loading ? (h(), g("svg", yt, wt)) : S("v-if", !0),
382
382
  t.message.status === c(ne).Error ? (h(), g(
383
383
  "span",
384
384
  Lt,
@@ -387,7 +387,7 @@ const rt = /* @__PURE__ */ E({
387
387
  /* TEXT */
388
388
  )) : (h(), g("span", {
389
389
  key: 4,
390
- innerHTML: a.value,
390
+ innerHTML: l.value,
391
391
  class: ee({
392
392
  "markdown-message": !0,
393
393
  loading: t.message.status === c(ne).Loading
@@ -404,7 +404,7 @@ const rt = /* @__PURE__ */ E({
404
404
  /* CLASS */
405
405
  ));
406
406
  }
407
- }), zt = { class: "prompt-list" }, Ct = { class: "search-group" }, Pt = ["onClick"], Bt = { class: "prompt-content" }, Ht = /* @__PURE__ */ E({
407
+ }), zt = { class: "prompt-list" }, Ct = { class: "search-group" }, Pt = ["onClick"], Bt = { class: "prompt-content" }, Ht = /* @__PURE__ */ I({
408
408
  __name: "render-send",
409
409
  props: {
410
410
  prompts: {},
@@ -413,35 +413,35 @@ const rt = /* @__PURE__ */ E({
413
413
  },
414
414
  emits: ["change-prompt", "update:value", "enter", "choose-prompt"],
415
415
  setup(o, { emit: n }) {
416
- const e = o, s = n, { enablePopup: a } = he(), l = De, t = pe, { selectedText: m, lockSelectedText: i } = me(a), Y = x(""), L = x(40), y = x(), z = x(!1), C = K(() => {
416
+ const e = o, s = n, { enablePopup: l } = he(), i = De, t = pe, { selectedText: m, lockSelectedText: a } = me(l), V = Y(""), M = Y(40), y = Y(), z = Y(!1), B = K(() => {
417
417
  var v;
418
- return ((v = e.prompts) == null ? void 0 : v.filter((S) => S.content.includes(Y.value))) || [];
419
- }), P = K(() => {
418
+ return ((v = e.prompts) == null ? void 0 : v.filter((L) => L.content.includes(V.value))) || [];
419
+ }), C = K(() => {
420
420
  var v;
421
421
  return e.placeholder ? e.placeholder : (v = e.prompts) != null && v.length ? f("您可以键入 “/” 查看更多Prompt") : f("请输入");
422
422
  }), H = (v) => {
423
423
  s("update:value", v), s("change-prompt", v);
424
- }, R = () => {
424
+ }, D = () => {
425
425
  var v;
426
426
  e.value === "/" && ((v = e.prompts) != null && v.length) ? b() : k();
427
- }, d = () => {
427
+ }, p = () => {
428
428
  Le(() => {
429
- var S;
430
- const v = (S = y.value) == null ? void 0 : S.$el.querySelector("textarea");
431
- (v == null ? void 0 : v.scrollHeight) > 40 && e.value ? L.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : L.value = 40;
429
+ var L;
430
+ const v = (L = y.value) == null ? void 0 : L.$el.querySelector("textarea");
431
+ (v == null ? void 0 : v.scrollHeight) > 40 && e.value ? M.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : M.value = 40;
432
432
  });
433
- }, I = (v) => {
434
- s("update:value", v.content), s("choose-prompt", v), k(), O();
435
- }, N = (v, S) => {
436
- S.key === "Enter" && !S.shiftKey && (S.preventDefault(), s("enter"));
437
- }, F = () => {
433
+ }, x = (v) => {
434
+ s("update:value", v.content), s("choose-prompt", v), k(), N();
435
+ }, Q = (v, L) => {
436
+ L.key === "Enter" && !L.shiftKey && (L.preventDefault(), s("enter"));
437
+ }, W = () => {
438
438
  H("");
439
- }, O = () => {
440
- var S;
441
- const v = (S = y.value) == null ? void 0 : S.$el.querySelector("textarea");
439
+ }, N = () => {
440
+ var L;
441
+ const v = (L = y.value) == null ? void 0 : L.$el.querySelector("textarea");
442
442
  v == null || v.focus();
443
- }, u = () => {
444
- m.value && (i.value = !0);
443
+ }, d = () => {
444
+ m.value && (a.value = !0);
445
445
  }, b = () => {
446
446
  z.value = !0;
447
447
  }, k = () => {
@@ -450,9 +450,9 @@ const rt = /* @__PURE__ */ E({
450
450
  return we(
451
451
  () => e.value,
452
452
  () => {
453
- d(), R();
453
+ p(), D();
454
454
  }
455
- ), ae(O), (v, S) => (h(), U(c(Re), {
455
+ ), ae(N), (v, L) => (h(), U(c(Re), {
456
456
  width: "calc(100% - 118px)",
457
457
  "ext-cls": "empty-padding",
458
458
  arrow: !1,
@@ -463,37 +463,37 @@ const rt = /* @__PURE__ */ E({
463
463
  theme: "light",
464
464
  trigger: "manual"
465
465
  }, {
466
- content: Z(() => {
466
+ content: F(() => {
467
467
  var oe;
468
468
  return [
469
- p("div", null, [
469
+ u("div", null, [
470
470
  q((h(), g("section", zt, [
471
- V(c(ve), {
471
+ R(c(ve), {
472
472
  class: "input-search",
473
- modelValue: Y.value,
474
- "onUpdate:modelValue": S[0] || (S[0] = (j) => Y.value = j),
473
+ modelValue: V.value,
474
+ "onUpdate:modelValue": L[0] || (L[0] = (G) => V.value = G),
475
475
  behavior: "simplicity",
476
476
  clearable: ""
477
477
  }, null, 8, ["modelValue"]),
478
- p("section", Ct, [
478
+ u("section", Ct, [
479
479
  (h(!0), g(
480
- Q,
480
+ j,
481
481
  null,
482
- ce(C.value, (j, de) => q((h(), g("span", {
482
+ ce(B.value, (G, de) => q((h(), g("span", {
483
483
  class: "group-prompt",
484
484
  key: de,
485
- onClick: (ge) => I(j)
485
+ onClick: (ge) => x(G)
486
486
  }, [
487
- p(
487
+ u(
488
488
  "span",
489
489
  Bt,
490
- T(j.content),
490
+ T(G.content),
491
491
  1
492
492
  /* TEXT */
493
493
  )
494
494
  ], 8, Pt)), [
495
495
  [c(t), {
496
- content: j.content,
496
+ content: G.content,
497
497
  placement: "right",
498
498
  theme: "light",
499
499
  width: 300,
@@ -503,7 +503,7 @@ const rt = /* @__PURE__ */ E({
503
503
  128
504
504
  /* KEYED_FRAGMENT */
505
505
  )),
506
- (oe = C.value) != null && oe.length ? M("v-if", !0) : (h(), U(c(Ve), {
506
+ (oe = B.value) != null && oe.length ? S("v-if", !0) : (h(), U(c(Ve), {
507
507
  key: 0,
508
508
  class: "exception-wrap-item exception-part",
509
509
  scene: "part",
@@ -511,22 +511,22 @@ const rt = /* @__PURE__ */ E({
511
511
  }))
512
512
  ])
513
513
  ])), [
514
- [c(l), k]
514
+ [c(i), k]
515
515
  ])
516
516
  ])
517
517
  ];
518
518
  }),
519
- default: Z(() => [
520
- p(
519
+ default: F(() => [
520
+ u(
521
521
  "section",
522
522
  {
523
- style: J({
524
- "--text-height": L.value + "px"
523
+ style: Z({
524
+ "--text-height": M.value + "px"
525
525
  }),
526
526
  class: "send-prompt-container"
527
527
  },
528
528
  [
529
- V(c(ve), {
529
+ R(c(ve), {
530
530
  ref_key: "inputRef",
531
531
  ref: y,
532
532
  class: "send-prompt",
@@ -534,18 +534,18 @@ const rt = /* @__PURE__ */ E({
534
534
  clearable: !0,
535
535
  "model-value": v.value,
536
536
  "native-attributes": { autofocus: "autofocus" },
537
- placeholder: P.value,
537
+ placeholder: C.value,
538
538
  row: "1",
539
539
  type: "textarea",
540
- onFocus: u,
540
+ onFocus: d,
541
541
  onInput: H,
542
- onKeydown: N
542
+ onKeydown: Q
543
543
  }, null, 8, ["model-value", "placeholder"]),
544
544
  v.value ? (h(), U(c(je), {
545
545
  key: 0,
546
546
  class: "show-clear-only-hover bk-input--clear-icon clear-icon",
547
- onClick: F
548
- })) : M("v-if", !0)
547
+ onClick: W
548
+ })) : S("v-if", !0)
549
549
  ],
550
550
  4
551
551
  /* STYLE */
@@ -555,27 +555,27 @@ const rt = /* @__PURE__ */ E({
555
555
  /* STABLE */
556
556
  }, 8, ["is-show"]));
557
557
  }
558
- }), Tt = /* @__PURE__ */ A(Ht, [["__scopeId", "data-v-dd1d94cb"]]), Rt = { class: "ai-shortcuts" }, Vt = /* @__PURE__ */ E({
558
+ }), Tt = /* @__PURE__ */ A(Ht, [["__scopeId", "data-v-dd1d94cb"]]), Rt = { class: "ai-shortcuts" }, Vt = /* @__PURE__ */ I({
559
559
  __name: "render-shortcuts",
560
560
  props: {
561
561
  shortcuts: {}
562
562
  },
563
563
  emits: ["select"],
564
564
  setup(o, { emit: n }) {
565
- const e = n, s = (a) => {
566
- e("select", a);
565
+ const e = n, s = (l) => {
566
+ e("select", l);
567
567
  };
568
- return (a, l) => (h(), g("ul", Rt, [
568
+ return (l, i) => (h(), g("ul", Rt, [
569
569
  (h(!0), g(
570
- Q,
570
+ j,
571
571
  null,
572
- ce(a.shortcuts, (t) => (h(), U(c(xe), {
572
+ ce(l.shortcuts, (t) => (h(), U(c(xe), {
573
573
  class: "ai-blueking-shortcut",
574
574
  key: t.label,
575
575
  theme: "info",
576
576
  onClick: (m) => s(t)
577
577
  }, {
578
- default: Z(() => [
578
+ default: F(() => [
579
579
  te(
580
580
  T(t.label),
581
581
  1
@@ -590,7 +590,7 @@ const rt = /* @__PURE__ */ E({
590
590
  ))
591
591
  ]));
592
592
  }
593
- }), Dt = /* @__PURE__ */ A(Vt, [["__scopeId", "data-v-266e17ca"]]), xt = (o) => (ie("data-v-fd57f18d"), o = o(), re(), o), Et = /* @__PURE__ */ xt(() => /* @__PURE__ */ p(
593
+ }), Dt = /* @__PURE__ */ A(Vt, [["__scopeId", "data-v-266e17ca"]]), xt = (o) => (ie("data-v-fd57f18d"), o = o(), re(), o), Et = /* @__PURE__ */ xt(() => /* @__PURE__ */ u(
594
594
  "svg",
595
595
  {
596
596
  width: "10",
@@ -599,11 +599,11 @@ const rt = /* @__PURE__ */ E({
599
599
  "aria-hidden": "true"
600
600
  },
601
601
  [
602
- /* @__PURE__ */ p("use", { "xlink:href": "#ai-blueking-tingzhi" })
602
+ /* @__PURE__ */ u("use", { "xlink:href": "#ai-blueking-tingzhi" })
603
603
  ],
604
604
  -1
605
605
  /* HOISTED */
606
- )), Yt = /* @__PURE__ */ E({
606
+ )), Yt = /* @__PURE__ */ I({
607
607
  __name: "render-stop",
608
608
  props: {
609
609
  isShow: { type: Boolean }
@@ -613,7 +613,7 @@ const rt = /* @__PURE__ */ E({
613
613
  const e = n, s = () => {
614
614
  e("stop");
615
615
  };
616
- return (a, l) => a.isShow ? (h(), g("span", {
616
+ return (l, i) => l.isShow ? (h(), g("span", {
617
617
  key: 0,
618
618
  class: "ai-blueking-render-stop",
619
619
  onClick: s
@@ -624,12 +624,12 @@ const rt = /* @__PURE__ */ E({
624
624
  1
625
625
  /* TEXT */
626
626
  )
627
- ])) : M("v-if", !0);
627
+ ])) : S("v-if", !0);
628
628
  }
629
629
  }), It = /* @__PURE__ */ A(Yt, [["__scopeId", "data-v-fd57f18d"]]), At = {
630
630
  key: 0,
631
631
  class: "time-wrapper"
632
- }, Xt = { class: "time-message" }, qt = /* @__PURE__ */ E({
632
+ }, Xt = { class: "time-message" }, qt = /* @__PURE__ */ I({
633
633
  __name: "render-time",
634
634
  props: {
635
635
  message: {}
@@ -637,7 +637,7 @@ const rt = /* @__PURE__ */ E({
637
637
  setup(o) {
638
638
  const n = o, e = K(() => {
639
639
  var t;
640
- const s = se(n.message.time), a = se(), l = {
640
+ const s = se(n.message.time), l = se(), i = {
641
641
  0: f("日"),
642
642
  1: f("一"),
643
643
  2: f("二"),
@@ -648,17 +648,17 @@ const rt = /* @__PURE__ */ E({
648
648
  };
649
649
  return !n.message.time || (t = window.showTimes) != null && t.some(
650
650
  (m) => Math.abs(s.diff(m, "minute")) < 10 && m !== n.message.time
651
- ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], a.isSame(s, "day") ? s.format("HH:mm:ss") : a.subtract(1, "day").isSame(s, "week") ? f("昨天") + " " + s.format("HH:mm:ss") : a.isSame(s, "week") ? f("本周") + l[s.day()] + " " + s.format("HH:mm:ss") : a.subtract(1, "week").isSame(s, "week") ? f("上周") + l[s.day()] + " " + s.format("HH:mm:ss") : a.isSame(s, "year") ? s.format("MM-DD HH:mm:ss") : s.format("YYYY-MM-DD HH:mm:ss"));
651
+ ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], l.isSame(s, "day") ? s.format("HH:mm:ss") : l.subtract(1, "day").isSame(s, "week") ? f("昨天") + " " + s.format("HH:mm:ss") : l.isSame(s, "week") ? f("本周") + i[s.day()] + " " + s.format("HH:mm:ss") : l.subtract(1, "week").isSame(s, "week") ? f("上周") + i[s.day()] + " " + s.format("HH:mm:ss") : l.isSame(s, "year") ? s.format("MM-DD HH:mm:ss") : s.format("YYYY-MM-DD HH:mm:ss"));
652
652
  });
653
- return (s, a) => e.value ? (h(), g("section", At, [
654
- p(
653
+ return (s, l) => e.value ? (h(), g("section", At, [
654
+ u(
655
655
  "span",
656
656
  Xt,
657
657
  T(e.value),
658
658
  1
659
659
  /* TEXT */
660
660
  )
661
- ])) : M("v-if", !0);
661
+ ])) : S("v-if", !0);
662
662
  }
663
663
  }), Kt = /* @__PURE__ */ A(qt, [["__scopeId", "data-v-55c9a119"]]), Pe = (o) => (ie("data-v-d36b6eb0"), o = o(), re(), o), Ut = {
664
664
  key: 0,
@@ -666,7 +666,7 @@ const rt = /* @__PURE__ */ E({
666
666
  height: "18",
667
667
  class: "scroll-loading-icon",
668
668
  "aria-hidden": "true"
669
- }, Qt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ p(
669
+ }, Qt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ u(
670
670
  "use",
671
671
  { "xlink:href": "#ai-blueking-loading-2" },
672
672
  null,
@@ -674,13 +674,13 @@ const rt = /* @__PURE__ */ E({
674
674
  /* HOISTED */
675
675
  )), jt = [
676
676
  Qt
677
- ], Wt = { class: "ai-operation" }, Gt = { class: "ai-operation-input-wrapper" }, Jt = { class: "ai-cite-tips" }, Ot = { class: "ai-operation-input" }, Zt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ p(
677
+ ], Wt = { class: "ai-operation" }, Gt = { class: "ai-operation-input-wrapper" }, Jt = { class: "ai-cite-tips" }, Ot = { class: "ai-operation-input" }, Zt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ u(
678
678
  "i",
679
679
  { class: "ai-blueking-icon ai-blueking-fasong" },
680
680
  null,
681
681
  -1
682
682
  /* HOISTED */
683
- )), Nt = /* @__PURE__ */ E({
683
+ )), Nt = /* @__PURE__ */ I({
684
684
  __name: "render-content",
685
685
  props: {
686
686
  messages: {},
@@ -696,84 +696,84 @@ const rt = /* @__PURE__ */ E({
696
696
  },
697
697
  emits: ["ai-click", "change-prompt", "send", "choose-prompt", "scroll-load", "stop"],
698
698
  setup(o, { expose: n, emit: e }) {
699
- const s = o, a = e, { enablePopup: l } = he(), t = pe, m = x(""), { selectedText: i, clearSelection: Y } = me(l), { isShow: L } = Me(), y = () => {
699
+ const s = o, l = e, { enablePopup: i } = he(), t = pe, m = Y(""), { selectedText: a, clearSelection: V } = me(i), { isShow: M } = Me(), y = () => {
700
700
  Le(() => {
701
- const u = document.querySelector(".ai-blueking-messages");
702
- u.scrollTop = u.scrollHeight;
701
+ const d = document.querySelector(".ai-blueking-messages");
702
+ d.scrollTop = d.scrollHeight;
703
703
  });
704
- }, z = Je((u) => {
704
+ }, z = Je((d) => {
705
705
  if (s.scrollLoading || s.scrollLoadingEnd)
706
706
  return;
707
- u.target.scrollTop < 200 && a("scroll-load");
708
- }), C = () => {
707
+ d.target.scrollTop < 200 && l("scroll-load");
708
+ }), B = () => {
709
709
  if (m.value) {
710
710
  if (s.loading) {
711
711
  fe({ theme: "warning", message: f("内容正在执行中,请执行完成后再发送") });
712
712
  return;
713
713
  }
714
- a("send", {
714
+ l("send", {
715
715
  content: m.value,
716
- cite: i.value
717
- }), m.value = "", i.value = "";
716
+ cite: a.value
717
+ }), m.value = "", a.value = "";
718
718
  }
719
- }, P = (u) => {
720
- a("choose-prompt", u);
721
- }, H = (u) => {
722
- a("change-prompt", u);
723
- }, R = () => {
724
- a("stop");
725
- }, d = (u) => {
726
- const b = u.target;
719
+ }, C = (d) => {
720
+ l("choose-prompt", d);
721
+ }, H = (d) => {
722
+ l("change-prompt", d);
723
+ }, D = () => {
724
+ l("stop");
725
+ }, p = (d) => {
726
+ const b = d.target;
727
727
  if (b != null && b.classList.contains("ai-blueking-angle-up")) {
728
728
  const k = b == null ? void 0 : b.parentElement;
729
729
  k != null && k.classList.contains("closed") ? k == null || k.classList.remove("closed") : k == null || k.classList.add("closed");
730
730
  }
731
- b != null && b.classList.contains("ai-clickable") && a("ai-click", b.dataset.ai);
732
- }, I = () => {
733
- y(), document.addEventListener("click", d);
734
- }, N = () => {
735
- window.showTimes = [], document.removeEventListener("click", d);
736
- }, F = (u) => {
737
- m.value = u;
738
- }, O = (u) => {
739
- const b = u.prompt.replace("{{ SELECTED_TEXT }}", i.value);
731
+ b != null && b.classList.contains("ai-clickable") && l("ai-click", b.dataset.ai);
732
+ }, x = () => {
733
+ y(), document.addEventListener("click", p);
734
+ }, Q = () => {
735
+ window.showTimes = [], document.removeEventListener("click", p);
736
+ }, W = (d) => {
737
+ m.value = d;
738
+ }, N = (d) => {
739
+ const b = d.prompt.replace("{{ SELECTED_TEXT }}", a.value);
740
740
  if (s.loading) {
741
741
  fe({ theme: "warning", message: f("内容正在执行中,请执行完成后再发送") });
742
742
  return;
743
743
  }
744
- a("send", {
745
- content: u.label,
746
- cite: i.value,
744
+ l("send", {
745
+ content: d.label,
746
+ cite: a.value,
747
747
  prompt: b
748
- }), i.value = "";
748
+ }), a.value = "";
749
749
  };
750
750
  return we(
751
751
  () => s.messages,
752
752
  () => {
753
- const u = document.querySelector(".ai-blueking-messages");
754
- (u == null ? void 0 : u.scrollTop) + (u == null ? void 0 : u.clientHeight) + 100 >= (u == null ? void 0 : u.scrollHeight) && y();
753
+ const d = document.querySelector(".ai-blueking-messages");
754
+ (d == null ? void 0 : d.scrollTop) + (d == null ? void 0 : d.clientHeight) + 100 >= (d == null ? void 0 : d.scrollHeight) && y();
755
755
  },
756
756
  {
757
757
  deep: !0
758
758
  }
759
- ), ae(I), le(N), n({
760
- setInputMessage: F
761
- }), (u, b) => (h(), g(
759
+ ), ae(x), le(Q), n({
760
+ setInputMessage: W
761
+ }), (d, b) => (h(), g(
762
762
  "section",
763
763
  {
764
- style: J({
765
- background: u.background
764
+ style: Z({
765
+ background: d.background
766
766
  }),
767
767
  class: "ai-content"
768
768
  },
769
769
  [
770
- u.alert ? (h(), U(c(Ee), {
770
+ d.alert ? (h(), U(c(Ee), {
771
771
  key: 0,
772
- title: u.alert,
772
+ title: d.alert,
773
773
  theme: "warning",
774
774
  closable: ""
775
- }, null, 8, ["title"])) : M("v-if", !0),
776
- p(
775
+ }, null, 8, ["title"])) : S("v-if", !0),
776
+ u(
777
777
  "ul",
778
778
  {
779
779
  class: "ai-messages ai-blueking-messages",
@@ -781,24 +781,24 @@ const rt = /* @__PURE__ */ E({
781
781
  (...k) => c(z) && c(z)(...k))
782
782
  },
783
783
  [
784
- u.scrollLoading ? (h(), g("svg", Ut, jt)) : M("v-if", !0),
784
+ d.scrollLoading ? (h(), g("svg", Ut, jt)) : S("v-if", !0),
785
785
  (h(!0), g(
786
- Q,
786
+ j,
787
787
  null,
788
- ce(u.messages, (k) => (h(), g(
789
- Q,
788
+ ce(d.messages, (k) => (h(), g(
789
+ j,
790
790
  {
791
791
  key: k.content
792
792
  },
793
793
  [
794
- V(Kt, {
794
+ R(Kt, {
795
795
  class: "render-message",
796
796
  message: k
797
797
  }, null, 8, ["message"]),
798
- V(Mt, {
798
+ R(Mt, {
799
799
  class: "render-message",
800
800
  message: k,
801
- "user-photo": u.userPhoto
801
+ "user-photo": d.userPhoto
802
802
  }, null, 8, ["message", "user-photo"])
803
803
  ],
804
804
  64
@@ -811,72 +811,72 @@ const rt = /* @__PURE__ */ E({
811
811
  32
812
812
  /* NEED_HYDRATION */
813
813
  ),
814
- p("section", Wt, [
815
- p(
814
+ u("section", Wt, [
815
+ u(
816
816
  "section",
817
817
  {
818
818
  class: "ai-operation-tools",
819
- onMousedown: b[1] || (b[1] = D(() => {
819
+ onMousedown: b[1] || (b[1] = E(() => {
820
820
  }, ["prevent"]))
821
821
  },
822
822
  [
823
- V(at),
824
- V(It, {
825
- "is-show": u.loading,
826
- onStop: R
823
+ R(at),
824
+ R(It, {
825
+ "is-show": d.loading,
826
+ onStop: D
827
827
  }, null, 8, ["is-show"])
828
828
  ],
829
829
  32
830
830
  /* NEED_HYDRATION */
831
831
  ),
832
- p("section", Gt, [
833
- c(i) ? (h(), g(
832
+ u("section", Gt, [
833
+ c(a) ? (h(), g(
834
834
  "div",
835
835
  {
836
836
  key: 0,
837
- class: ee(["ai-cite-container", { "is-back-show": !c(L) }]),
838
- onMousedown: b[2] || (b[2] = D(() => {
837
+ class: ee(["ai-cite-container", { "is-back-show": !c(M) }]),
838
+ onMousedown: b[2] || (b[2] = E(() => {
839
839
  }, ["prevent"]))
840
840
  },
841
841
  [
842
- V(ze, {
842
+ R(ze, {
843
843
  "show-close-icon": !0,
844
- text: c(i),
845
- onClose: c(Y)
844
+ text: c(a),
845
+ onClose: c(V)
846
846
  }, null, 8, ["text", "onClose"]),
847
- p(
847
+ u(
848
848
  "span",
849
849
  Jt,
850
850
  T(c(f)("想对选中的文本做什么")),
851
851
  1
852
852
  /* TEXT */
853
853
  ),
854
- V(Dt, {
855
- shortcuts: u.shortcuts,
856
- onSelect: O
854
+ R(Dt, {
855
+ shortcuts: d.shortcuts,
856
+ onSelect: N
857
857
  }, null, 8, ["shortcuts"])
858
858
  ],
859
859
  34
860
860
  /* CLASS, NEED_HYDRATION */
861
- )) : M("v-if", !0),
862
- p("section", Ot, [
863
- V(Tt, {
861
+ )) : S("v-if", !0),
862
+ u("section", Ot, [
863
+ R(Tt, {
864
864
  value: m.value,
865
865
  "onUpdate:value": b[3] || (b[3] = (k) => m.value = k),
866
- placeholder: u.placeholder,
867
- prompts: u.prompts,
866
+ placeholder: d.placeholder,
867
+ prompts: d.prompts,
868
868
  onChangePrompt: H,
869
- onChoosePrompt: P,
870
- onEnter: C
869
+ onChoosePrompt: C,
870
+ onEnter: B
871
871
  }, null, 8, ["value", "placeholder", "prompts"]),
872
872
  q((h(), U(c(Ye), {
873
873
  class: "ai-operation-button",
874
- disabled: u.loading || !m.value,
874
+ disabled: d.loading || !m.value,
875
875
  size: "large",
876
876
  theme: "primary",
877
- onClick: C
877
+ onClick: B
878
878
  }, {
879
- default: Z(() => [
879
+ default: F(() => [
880
880
  Zt,
881
881
  te(
882
882
  " " + T(c(f)("发送")),
@@ -889,7 +889,7 @@ const rt = /* @__PURE__ */ E({
889
889
  }, 8, ["disabled"])), [
890
890
  [c(t), {
891
891
  content: c(f)("内容正在执行中,请执行完成后再发送"),
892
- disabled: !u.loading
892
+ disabled: !d.loading
893
893
  }]
894
894
  ])
895
895
  ])
@@ -900,7 +900,7 @@ const rt = /* @__PURE__ */ E({
900
900
  /* STYLE */
901
901
  ));
902
902
  }
903
- }), Ft = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-d36b6eb0"]]), _t = { class: "ai-modal-header-icon" }, $t = /* @__PURE__ */ E({
903
+ }), Ft = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-d36b6eb0"]]), _t = { class: "ai-modal-header-icon" }, $t = /* @__PURE__ */ I({
904
904
  __name: "render-modal",
905
905
  props: {
906
906
  headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
@@ -927,7 +927,7 @@ const rt = /* @__PURE__ */ E({
927
927
  },
928
928
  emits: ["clear", "close", "choose-model"],
929
929
  setup(o, { emit: n }) {
930
- const e = o, s = n, a = pe, l = {
930
+ const e = o, s = n, l = pe, i = {
931
931
  height: window.innerHeight,
932
932
  width: window.innerWidth
933
933
  }, t = {
@@ -935,16 +935,16 @@ const rt = /* @__PURE__ */ E({
935
935
  type: "",
936
936
  clientX: 0,
937
937
  clientY: 0
938
- }, i = x((() => {
939
- var w, B, X, W;
938
+ }, a = Y((() => {
939
+ var w, P, X, J;
940
940
  const r = (_, Be) => _ === void 0 ? Be : _;
941
941
  return {
942
- top: r((w = e.startPosition) == null ? void 0 : w.top, l.height - e.sizeLimit.height),
943
- bottom: r((B = e.startPosition) == null ? void 0 : B.bottom, 0),
942
+ top: r((w = e.startPosition) == null ? void 0 : w.top, i.height - e.sizeLimit.height),
943
+ bottom: r((P = e.startPosition) == null ? void 0 : P.bottom, 0),
944
944
  left: r((X = e.startPosition) == null ? void 0 : X.left, 0),
945
- right: r((W = e.startPosition) == null ? void 0 : W.right, l.width - e.sizeLimit.width)
945
+ right: r((J = e.startPosition) == null ? void 0 : J.right, i.width - e.sizeLimit.width)
946
946
  };
947
- })()), Y = K(() => i.value.top <= e.positionLimit.top && i.value.bottom <= e.positionLimit.bottom), L = (r) => {
947
+ })()), V = K(() => a.value.top <= e.positionLimit.top && a.value.bottom <= e.positionLimit.bottom), M = (r) => {
948
948
  s("choose-model", r);
949
949
  }, y = () => {
950
950
  document.querySelectorAll("iframe").forEach((w) => {
@@ -954,81 +954,81 @@ const rt = /* @__PURE__ */ E({
954
954
  document.querySelectorAll("iframe").forEach((w) => {
955
955
  w.style.pointerEvents = "auto";
956
956
  });
957
- }, C = (r) => {
957
+ }, B = (r) => {
958
958
  y(), t.isMove = !0, t.type = "move", t.clientX = r.clientX, t.clientY = r.clientY;
959
- }, P = (r) => {
959
+ }, C = (r) => {
960
960
  y(), t.isMove = !0, t.type = "rightDrag", t.clientX = r.clientX;
961
961
  }, H = (r) => {
962
962
  y(), t.isMove = !0, t.type = "leftDrag", t.clientX = r.clientX;
963
- }, R = (r) => {
963
+ }, D = (r) => {
964
964
  y(), t.isMove = !0, t.type = "topDrag", t.clientY = r.clientY;
965
- }, d = (r) => {
965
+ }, p = (r) => {
966
966
  y(), t.isMove = !0, t.type = "bottomDrag", t.clientY = r.clientY;
967
- }, I = (r) => {
967
+ }, x = (r) => {
968
968
  y(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
969
- }, N = (r) => {
969
+ }, Q = (r) => {
970
970
  y(), t.isMove = !0, t.type = "topRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
971
- }, F = (r) => {
971
+ }, W = (r) => {
972
972
  y(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
973
- }, O = (r) => {
973
+ }, N = (r) => {
974
974
  y(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
975
- }, u = () => {
975
+ }, d = () => {
976
976
  t.isMove = !1, z();
977
977
  }, b = (r, w) => {
978
- ["move", "leftDrag"].includes(t.type) && (i.value.left += r), ["move", "rightDrag"].includes(t.type) && (i.value.right -= r), ["move", "topDrag"].includes(t.type) && (i.value.top += w), ["move", "bottomDrag"].includes(t.type) && (i.value.bottom -= w), ["topLeftDrag"].includes(t.type) && (i.value.left += r, i.value.top += w), ["topRightDrag"].includes(t.type) && (i.value.right -= r, i.value.top += w), ["bottomLeftDrag"].includes(t.type) && (i.value.left += r, i.value.bottom -= w), ["bottomRightDrag"].includes(t.type) && (i.value.right -= r, i.value.bottom -= w);
978
+ ["move", "leftDrag"].includes(t.type) && (a.value.left += r), ["move", "rightDrag"].includes(t.type) && (a.value.right -= r), ["move", "topDrag"].includes(t.type) && (a.value.top += w), ["move", "bottomDrag"].includes(t.type) && (a.value.bottom -= w), ["topLeftDrag"].includes(t.type) && (a.value.left += r, a.value.top += w), ["topRightDrag"].includes(t.type) && (a.value.right -= r, a.value.top += w), ["bottomLeftDrag"].includes(t.type) && (a.value.left += r, a.value.bottom -= w), ["bottomRightDrag"].includes(t.type) && (a.value.right -= r, a.value.bottom -= w);
979
979
  }, k = (r, w) => {
980
- const { top: B, bottom: X, left: W, right: _ } = i.value;
981
- (l.width - W - _ < e.sizeLimit.width || W < e.positionLimit.left || _ < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (i.value.left -= r), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (i.value.right += r)), (l.height - B - X < e.sizeLimit.height || B < e.positionLimit.top || X < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (i.value.top -= w), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (i.value.bottom += w));
980
+ const { top: P, bottom: X, left: J, right: _ } = a.value;
981
+ (i.width - J - _ < e.sizeLimit.width || J < e.positionLimit.left || _ < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (a.value.left -= r), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (a.value.right += r)), (i.height - P - X < e.sizeLimit.height || P < e.positionLimit.top || X < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (a.value.top -= w), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (a.value.bottom += w));
982
982
  }, v = (r) => {
983
983
  if (!t.isMove)
984
984
  return;
985
985
  r.preventDefault();
986
- const w = r.clientX - t.clientX, B = r.clientY - t.clientY;
987
- b(w, B), k(w, B), t.clientX = r.clientX, t.clientY = r.clientY;
988
- }, S = () => {
989
- const r = window.innerWidth - l.width, w = window.innerHeight - l.height;
990
- l.height = window.innerHeight, l.width = window.innerWidth;
991
- const B = (X, W) => {
992
- i.value[X] += W, i.value[X] < 0 && (i.value[X] = 0);
986
+ const w = r.clientX - t.clientX, P = r.clientY - t.clientY;
987
+ b(w, P), k(w, P), t.clientX = r.clientX, t.clientY = r.clientY;
988
+ }, L = () => {
989
+ const r = window.innerWidth - i.width, w = window.innerHeight - i.height;
990
+ i.height = window.innerHeight, i.width = window.innerWidth;
991
+ const P = (X, J) => {
992
+ a.value[X] += J, a.value[X] < 0 && (a.value[X] = 0);
993
993
  };
994
- B(i.value.top > i.value.bottom ? "top" : "bottom", w), B(i.value.left > i.value.right ? "left" : "right", r);
994
+ P(a.value.top > a.value.bottom ? "top" : "bottom", w), P(a.value.left > a.value.right ? "left" : "right", r);
995
995
  }, oe = () => {
996
- i.value.top = e.positionLimit.top, i.value.bottom = e.positionLimit.bottom;
997
- }, j = () => {
998
- i.value.top = l.height - e.sizeLimit.height, i.value.bottom = e.positionLimit.bottom;
996
+ a.value.top = e.positionLimit.top, a.value.bottom = e.positionLimit.bottom;
997
+ }, G = () => {
998
+ a.value.top = i.height - e.sizeLimit.height, a.value.bottom = e.positionLimit.bottom;
999
999
  }, de = () => {
1000
1000
  s("clear");
1001
1001
  }, ge = () => {
1002
1002
  s("close");
1003
1003
  };
1004
1004
  return Xe(() => {
1005
- window.addEventListener("mousemove", v, !0), window.addEventListener("mouseup", u), window.addEventListener("resize", S);
1005
+ window.addEventListener("mousemove", v, !0), window.addEventListener("mouseup", d), window.addEventListener("resize", L);
1006
1006
  }), le(() => {
1007
- window.removeEventListener("mousemove", v, !0), window.removeEventListener("mouseup", u), window.removeEventListener("resize", S);
1007
+ window.removeEventListener("mousemove", v, !0), window.removeEventListener("mouseup", d), window.removeEventListener("resize", L);
1008
1008
  }), (r, w) => (h(), g(
1009
1009
  "section",
1010
1010
  {
1011
- style: J({
1012
- top: i.value.top + "px",
1013
- bottom: i.value.bottom + "px",
1014
- left: i.value.left + "px",
1015
- right: i.value.right + "px"
1011
+ style: Z({
1012
+ top: a.value.top + "px",
1013
+ bottom: a.value.bottom + "px",
1014
+ left: a.value.left + "px",
1015
+ right: a.value.right + "px"
1016
1016
  }),
1017
1017
  class: "ai-modal"
1018
1018
  },
1019
1019
  [
1020
- p(
1020
+ u(
1021
1021
  "header",
1022
1022
  {
1023
- style: J({
1023
+ style: Z({
1024
1024
  background: r.headBackground
1025
1025
  }),
1026
1026
  class: "ai-modal-header",
1027
- onMousedown: D(C, ["stop"])
1027
+ onMousedown: E(B, ["stop"])
1028
1028
  },
1029
1029
  [
1030
- p("span", _t, [
1031
- p(
1030
+ u("span", _t, [
1031
+ u(
1032
1032
  "i",
1033
1033
  {
1034
1034
  class: ee(r.logo)
@@ -1047,16 +1047,16 @@ const rt = /* @__PURE__ */ E({
1047
1047
  class: "ai-modal-header-models",
1048
1048
  "model-value": r.model,
1049
1049
  size: "small",
1050
- onChange: L
1050
+ onChange: M
1051
1051
  }, {
1052
- default: Z(() => [
1052
+ default: F(() => [
1053
1053
  (h(!0), g(
1054
- Q,
1054
+ j,
1055
1055
  null,
1056
- ce(r.models, (B) => (h(), U(c(be).Option, {
1057
- key: B.id,
1058
- name: B.name,
1059
- value: B.id
1056
+ ce(r.models, (P) => (h(), U(c(be).Option, {
1057
+ key: P.id,
1058
+ name: P.name,
1059
+ value: P.id
1060
1060
  }, null, 8, ["name", "value"]))),
1061
1061
  128
1062
1062
  /* KEYED_FRAGMENT */
@@ -1064,21 +1064,21 @@ const rt = /* @__PURE__ */ E({
1064
1064
  ]),
1065
1065
  _: 1
1066
1066
  /* STABLE */
1067
- }, 8, ["model-value"])) : M("v-if", !0)
1067
+ }, 8, ["model-value"])) : S("v-if", !0)
1068
1068
  ]),
1069
- p("span", null, [
1070
- Y.value ? q((h(), g(
1069
+ u("span", null, [
1070
+ V.value ? q((h(), g(
1071
1071
  "i",
1072
1072
  {
1073
1073
  key: 0,
1074
1074
  class: "ai-header-tool ai-blueking-icon ai-blueking-shangxiajuhe",
1075
- onClick: j
1075
+ onClick: G
1076
1076
  },
1077
1077
  null,
1078
1078
  512
1079
1079
  /* NEED_PATCH */
1080
1080
  )), [
1081
- [c(a), {
1081
+ [c(l), {
1082
1082
  content: c(f)("向下收缩"),
1083
1083
  distance: 20
1084
1084
  }]
@@ -1093,12 +1093,12 @@ const rt = /* @__PURE__ */ E({
1093
1093
  512
1094
1094
  /* NEED_PATCH */
1095
1095
  )), [
1096
- [c(a), {
1096
+ [c(l), {
1097
1097
  content: c(f)("向上扩展"),
1098
1098
  distance: 20
1099
1099
  }]
1100
1100
  ]),
1101
- q(p(
1101
+ q(u(
1102
1102
  "i",
1103
1103
  {
1104
1104
  class: "ai-header-tool ai-blueking-icon ai-blueking-saoba",
@@ -1108,12 +1108,12 @@ const rt = /* @__PURE__ */ E({
1108
1108
  512
1109
1109
  /* NEED_PATCH */
1110
1110
  ), [
1111
- [c(a), {
1111
+ [c(l), {
1112
1112
  content: c(f)("清空聊天记录"),
1113
1113
  distance: 20
1114
1114
  }]
1115
1115
  ]),
1116
- q(p(
1116
+ q(u(
1117
1117
  "i",
1118
1118
  {
1119
1119
  class: "ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",
@@ -1123,7 +1123,7 @@ const rt = /* @__PURE__ */ E({
1123
1123
  512
1124
1124
  /* NEED_PATCH */
1125
1125
  ), [
1126
- [c(a), {
1126
+ [c(l), {
1127
1127
  content: c(f)("关闭"),
1128
1128
  distance: 20
1129
1129
  }]
@@ -1134,81 +1134,81 @@ const rt = /* @__PURE__ */ E({
1134
1134
  /* STYLE, NEED_HYDRATION */
1135
1135
  ),
1136
1136
  qe(r.$slots, "default", {}, void 0, !0),
1137
- p(
1137
+ u(
1138
1138
  "span",
1139
1139
  {
1140
1140
  class: "drag-line left",
1141
- onMousedown: D(H, ["stop"])
1141
+ onMousedown: E(H, ["stop"])
1142
1142
  },
1143
1143
  null,
1144
1144
  32
1145
1145
  /* NEED_HYDRATION */
1146
1146
  ),
1147
- p(
1147
+ u(
1148
1148
  "span",
1149
1149
  {
1150
1150
  class: "drag-line right",
1151
- onMousedown: D(P, ["stop"])
1151
+ onMousedown: E(C, ["stop"])
1152
1152
  },
1153
1153
  null,
1154
1154
  32
1155
1155
  /* NEED_HYDRATION */
1156
1156
  ),
1157
- p(
1157
+ u(
1158
1158
  "span",
1159
1159
  {
1160
1160
  class: "drag-line top",
1161
- onMousedown: D(R, ["stop"])
1161
+ onMousedown: E(D, ["stop"])
1162
1162
  },
1163
1163
  null,
1164
1164
  32
1165
1165
  /* NEED_HYDRATION */
1166
1166
  ),
1167
- p(
1167
+ u(
1168
1168
  "span",
1169
1169
  {
1170
1170
  class: "drag-line bottom",
1171
- onMousedown: D(d, ["stop"])
1171
+ onMousedown: E(p, ["stop"])
1172
1172
  },
1173
1173
  null,
1174
1174
  32
1175
1175
  /* NEED_HYDRATION */
1176
1176
  ),
1177
- p(
1177
+ u(
1178
1178
  "span",
1179
1179
  {
1180
1180
  class: "drag-line top-left-corner",
1181
- onMousedown: D(I, ["stop"])
1181
+ onMousedown: E(x, ["stop"])
1182
1182
  },
1183
1183
  null,
1184
1184
  32
1185
1185
  /* NEED_HYDRATION */
1186
1186
  ),
1187
- p(
1187
+ u(
1188
1188
  "span",
1189
1189
  {
1190
1190
  class: "drag-line top-right-corner",
1191
- onMousedown: D(N, ["stop"])
1191
+ onMousedown: E(Q, ["stop"])
1192
1192
  },
1193
1193
  null,
1194
1194
  32
1195
1195
  /* NEED_HYDRATION */
1196
1196
  ),
1197
- p(
1197
+ u(
1198
1198
  "span",
1199
1199
  {
1200
1200
  class: "drag-line bottom-left-corner",
1201
- onMousedown: D(F, ["stop"])
1201
+ onMousedown: E(W, ["stop"])
1202
1202
  },
1203
1203
  null,
1204
1204
  32
1205
1205
  /* NEED_HYDRATION */
1206
1206
  ),
1207
- p(
1207
+ u(
1208
1208
  "span",
1209
1209
  {
1210
1210
  class: "drag-line bottom-right-corner",
1211
- onMousedown: D(O, ["stop"])
1211
+ onMousedown: E(N, ["stop"])
1212
1212
  },
1213
1213
  null,
1214
1214
  32
@@ -1219,35 +1219,35 @@ const rt = /* @__PURE__ */ E({
1219
1219
  /* STYLE */
1220
1220
  ));
1221
1221
  }
1222
- }), eo = /* @__PURE__ */ A($t, [["__scopeId", "data-v-e67f8e05"]]), to = (o) => (ie("data-v-367a166a"), o = o(), re(), o), oo = /* @__PURE__ */ to(() => /* @__PURE__ */ p(
1222
+ }), eo = /* @__PURE__ */ A($t, [["__scopeId", "data-v-e67f8e05"]]), to = (o) => (ie("data-v-367a166a"), o = o(), re(), o), oo = /* @__PURE__ */ to(() => /* @__PURE__ */ u(
1223
1223
  "i",
1224
1224
  { class: "ai-blueking-icon ai-blueking-ai" },
1225
1225
  null,
1226
1226
  -1
1227
1227
  /* HOISTED */
1228
- )), no = { class: "popup-text" }, so = /* @__PURE__ */ E({
1228
+ )), no = { class: "popup-text" }, so = /* @__PURE__ */ I({
1229
1229
  __name: "render-popup",
1230
1230
  emits: ["click"],
1231
1231
  setup(o, { emit: n }) {
1232
- const { enablePopup: e } = he(), { isIconVisible: s, iconPosition: a } = me(e), l = n, t = () => {
1233
- l("click"), s.value = !1;
1232
+ const { enablePopup: e } = he(), { isIconVisible: s, iconPosition: l } = me(e), i = n, t = () => {
1233
+ i("click"), s.value = !1;
1234
1234
  };
1235
- return (m, i) => c(s) ? (h(), g(
1235
+ return (m, a) => c(s) ? (h(), g(
1236
1236
  "div",
1237
1237
  {
1238
1238
  key: 0,
1239
- style: J(c(a)),
1239
+ style: Z(c(l)),
1240
1240
  class: "ai-blueking-render-popup",
1241
- onMousedown: i[0] || (i[0] = D(() => {
1241
+ onMousedown: a[0] || (a[0] = E(() => {
1242
1242
  }, ["prevent"]))
1243
1243
  },
1244
1244
  [
1245
- p("div", {
1245
+ u("div", {
1246
1246
  class: "popup-content",
1247
1247
  onClick: t
1248
1248
  }, [
1249
1249
  oo,
1250
- p(
1250
+ u(
1251
1251
  "span",
1252
1252
  no,
1253
1253
  T(c(f)("问小鲸")),
@@ -1258,9 +1258,9 @@ const rt = /* @__PURE__ */ E({
1258
1258
  ],
1259
1259
  36
1260
1260
  /* STYLE, NEED_HYDRATION */
1261
- )) : M("v-if", !0);
1261
+ )) : S("v-if", !0);
1262
1262
  }
1263
- }), ao = /* @__PURE__ */ A(so, [["__scopeId", "data-v-367a166a"]]), vo = /* @__PURE__ */ E({
1263
+ }), ao = /* @__PURE__ */ A(so, [["__scopeId", "data-v-367a166a"]]), vo = /* @__PURE__ */ I({
1264
1264
  __name: "ai-blueking",
1265
1265
  props: {
1266
1266
  messages: {},
@@ -1287,67 +1287,67 @@ const rt = /* @__PURE__ */ E({
1287
1287
  emits: ["clear", "close", "scroll-load", "stop", "ai-click", "change-prompt", "update:model", "choose-prompt", "send", "update:isShow"],
1288
1288
  setup(o, { expose: n, emit: e }) {
1289
1289
  Ke(Se, o.enablePopup);
1290
- const a = e, l = x(), t = (d) => {
1291
- var I;
1292
- (I = l.value) == null || I.setInputMessage(d);
1290
+ const l = e, i = Y(), t = (p) => {
1291
+ var x;
1292
+ (x = i.value) == null || x.setInputMessage(p);
1293
1293
  }, m = () => {
1294
- a("update:isShow", !0);
1295
- }, i = () => {
1296
- a("clear");
1297
- }, Y = () => {
1298
- a("update:isShow", !1), a("close");
1299
- }, L = (d) => {
1300
- a("update:model", d);
1301
- }, y = (d) => {
1302
- a("send", d);
1294
+ l("update:isShow", !0);
1295
+ }, a = () => {
1296
+ l("clear");
1297
+ }, V = () => {
1298
+ l("update:isShow", !1), l("close");
1299
+ }, M = (p) => {
1300
+ l("update:model", p);
1301
+ }, y = (p) => {
1302
+ l("send", p);
1303
1303
  }, z = () => {
1304
- a("stop");
1305
- }, C = () => {
1306
- a("scroll-load");
1307
- }, P = (d) => {
1308
- a("ai-click", d);
1309
- }, H = (d) => {
1310
- a("choose-prompt", d);
1311
- }, R = (d) => {
1312
- a("change-prompt", d);
1304
+ l("stop");
1305
+ }, B = () => {
1306
+ l("scroll-load");
1307
+ }, C = (p) => {
1308
+ l("ai-click", p);
1309
+ }, H = (p) => {
1310
+ l("choose-prompt", p);
1311
+ }, D = (p) => {
1312
+ l("change-prompt", p);
1313
1313
  };
1314
1314
  return n({
1315
1315
  setInputMessage: t
1316
- }), (d, I) => (h(), g(
1317
- Q,
1316
+ }), (p, x) => (h(), g(
1317
+ j,
1318
1318
  null,
1319
1319
  [
1320
- q(V(eo, {
1321
- "head-background": d.headBackground,
1322
- logo: d.logo,
1323
- model: d.model,
1324
- models: d.models,
1325
- name: d.name,
1326
- "position-limit": d.positionLimit,
1327
- "size-limit": d.sizeLimit,
1328
- "start-position": d.startPosition,
1329
- onChooseModel: L,
1330
- onClear: i,
1331
- onClose: Y
1320
+ q(R(eo, {
1321
+ "head-background": p.headBackground,
1322
+ logo: p.logo,
1323
+ model: p.model,
1324
+ models: p.models,
1325
+ name: p.name,
1326
+ "position-limit": p.positionLimit,
1327
+ "size-limit": p.sizeLimit,
1328
+ "start-position": p.startPosition,
1329
+ onChooseModel: M,
1330
+ onClear: a,
1331
+ onClose: V
1332
1332
  }, {
1333
- default: Z(() => [
1334
- V(Ft, {
1333
+ default: F(() => [
1334
+ R(Ft, {
1335
1335
  ref_key: "contentRef",
1336
- ref: l,
1337
- alert: d.alert,
1338
- background: d.background,
1339
- loading: d.loading,
1340
- messages: d.messages,
1341
- placeholder: d.placeholder,
1342
- prompts: d.prompts,
1343
- "scroll-loading": d.scrollLoading,
1344
- "scroll-loading-end": d.scrollLoadingEnd,
1345
- shortcuts: d.shortcuts,
1346
- "user-photo": d.userPhoto,
1347
- onAiClick: P,
1348
- onChangePrompt: R,
1336
+ ref: i,
1337
+ alert: p.alert,
1338
+ background: p.background,
1339
+ loading: p.loading,
1340
+ messages: p.messages,
1341
+ placeholder: p.placeholder,
1342
+ prompts: p.prompts,
1343
+ "scroll-loading": p.scrollLoading,
1344
+ "scroll-loading-end": p.scrollLoadingEnd,
1345
+ shortcuts: p.shortcuts,
1346
+ "user-photo": p.userPhoto,
1347
+ onAiClick: C,
1348
+ onChangePrompt: D,
1349
1349
  onChoosePrompt: H,
1350
- onScrollLoad: C,
1350
+ onScrollLoad: B,
1351
1351
  onSend: y,
1352
1352
  onStop: z
1353
1353
  }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "shortcuts", "user-photo"])
@@ -1355,12 +1355,12 @@ const rt = /* @__PURE__ */ E({
1355
1355
  _: 1
1356
1356
  /* STABLE */
1357
1357
  }, 8, ["head-background", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1358
- [ke, d.isShow]
1358
+ [ke, p.isShow]
1359
1359
  ]),
1360
- d.enablePopup !== !1 ? (h(), U(ao, {
1360
+ p.enablePopup !== !1 ? (h(), U(ao, {
1361
1361
  key: 0,
1362
1362
  onClick: m
1363
- })) : M("v-if", !0)
1363
+ })) : S("v-if", !0)
1364
1364
  ],
1365
1365
  64
1366
1366
  /* STABLE_FRAGMENT */
@@ -1382,33 +1382,33 @@ const lo = (o) => {
1382
1382
  </span>
1383
1383
  `;
1384
1384
  return o.forEach((e) => {
1385
- const { file_path: s, path: a } = e.metadata, l = s.split("/").pop();
1386
- n += `<a href="${a}" target="_blank" class="knowledge-link">
1387
- ${l}
1385
+ const { file_path: s, path: l } = e.metadata, i = s.split("/").pop();
1386
+ n += `<a href="${l}" target="_blank" class="knowledge-link">
1387
+ ${i}
1388
1388
  <i class="ai-blueking-icon ai-blueking-cc-jump-link"></i>
1389
1389
  </a>
1390
1390
  `;
1391
1391
  }), n += "</section>", n;
1392
1392
  };
1393
1393
  class fo {
1394
- constructor(n, e, s, a, l) {
1395
- G(this, "controllerMap");
1396
- G(this, "handleEnd");
1397
- G(this, "handleError");
1398
- G(this, "handleReceiveMessage");
1399
- G(this, "handleStart");
1400
- G(this, "url");
1401
- this.url = n, this.handleStart = e, this.handleReceiveMessage = s, this.handleEnd = a, this.handleError = l, this.controllerMap = {};
1394
+ constructor(n, e, s, l, i) {
1395
+ O(this, "controllerMap");
1396
+ O(this, "handleEnd");
1397
+ O(this, "handleError");
1398
+ O(this, "handleReceiveMessage");
1399
+ O(this, "handleStart");
1400
+ O(this, "url");
1401
+ this.url = n, this.handleStart = e, this.handleReceiveMessage = s, this.handleEnd = l, this.handleError = i, this.controllerMap = {};
1402
1402
  }
1403
1403
  stop(n) {
1404
1404
  var e, s;
1405
1405
  return (s = (e = this.controllerMap[n]) == null ? void 0 : e.abort) == null || s.call(e), this.handleEnd(n);
1406
1406
  }
1407
1407
  async stream(n, e, s) {
1408
- const a = new AbortController();
1409
- this.controllerMap[e] = a, fetch(this.url, {
1408
+ const l = new AbortController();
1409
+ this.controllerMap[e] = l, fetch(this.url, {
1410
1410
  method: "post",
1411
- signal: a.signal,
1411
+ signal: l.signal,
1412
1412
  headers: {
1413
1413
  "Content-Type": "application/json",
1414
1414
  ...s
@@ -1416,51 +1416,53 @@ class fo {
1416
1416
  mode: "cors",
1417
1417
  credentials: "include",
1418
1418
  body: JSON.stringify(n)
1419
- }).then(async (l) => {
1420
- const t = l.body.pipeThrough(new window.TextDecoderStream()).getReader();
1419
+ }).then(async (i) => {
1420
+ const t = i.body.pipeThrough(new window.TextDecoderStream()).getReader();
1421
+ let m = "";
1421
1422
  for (; ; )
1422
1423
  try {
1423
- const { value: m, done: i } = await t.read();
1424
- if (!l.ok) {
1425
- this.handleError(m || l.statusText, l.status, e);
1424
+ const { value: a, done: V } = await t.read();
1425
+ if (!i.ok) {
1426
+ this.handleError(a || i.statusText, i.status, e);
1426
1427
  break;
1427
1428
  }
1428
- if (i) {
1429
+ if (V) {
1429
1430
  this.handleEnd(e);
1430
1431
  break;
1431
1432
  }
1432
- m.toString().split(`
1433
- `).forEach((L) => {
1434
- const y = L.replace("data:", "").trim();
1435
- if (Ge(y)) {
1436
- const { event: z, content: C, documents: P, result: H, code: R, message: d } = JSON.parse(y);
1437
- if (H === !1 || l.status !== 200) {
1438
- this.handleError(d, R, e);
1433
+ m += a, m.toString().split(`
1434
+ `).forEach((y) => {
1435
+ const z = y.replace("data:", "").trim();
1436
+ if (Ge(z)) {
1437
+ const { event: B, content: C, cover: H, documents: D, result: p, code: x, message: Q } = JSON.parse(z);
1438
+ if (p === !1 || i.status !== 200) {
1439
+ this.handleError(Q, x, e);
1439
1440
  return;
1440
1441
  }
1441
- switch (z) {
1442
+ switch (B) {
1442
1443
  case "text":
1443
1444
  this.handleReceiveMessage(C, e);
1444
1445
  break;
1445
1446
  case "reference_doc":
1446
- const I = lo(P);
1447
- this.handleReceiveMessage(I, e);
1447
+ const W = lo(D);
1448
+ this.handleReceiveMessage(W, e);
1448
1449
  break;
1449
1450
  case "done":
1450
- this.handleEnd(e, C);
1451
+ this.handleEnd(e, H ? C : "");
1451
1452
  break;
1452
1453
  case "error":
1453
- this.handleError(d, R, e);
1454
+ this.handleError(Q, x, e);
1454
1455
  break;
1455
1456
  }
1456
- }
1457
+ } else
1458
+ m = y;
1457
1459
  });
1458
- } catch (m) {
1459
- (m == null ? void 0 : m.code) !== 20 && this.handleError(m.message, m.code, e);
1460
+ } catch (a) {
1461
+ (a == null ? void 0 : a.code) !== 20 && this.handleError(a.message, a.code, e);
1460
1462
  break;
1461
1463
  }
1462
- }).catch((l) => {
1463
- (l == null ? void 0 : l.code) !== 20 && this.handleError(l.message, l.code, e);
1464
+ }).catch((i) => {
1465
+ (i == null ? void 0 : i.code) !== 20 && this.handleError(i.message, i.code, e);
1464
1466
  }), await this.handleStart(e);
1465
1467
  }
1466
1468
  }