@blueking/ai-blueking 0.3.27 → 0.3.29

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 De = Object.defineProperty;
2
2
  var Ee = (o, n, e) => n in o ? De(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
3
  var Z = (o, n, e) => (Ee(o, typeof n != "symbol" ? n + "" : n, e), e);
4
- import { Popover as Ye, Input as ke, Exception as Ie, clickoutside as Ae, bkTooltips as he, Tag as Xe, Alert as ye, Button as qe, Message as we, Select as Le, provideGlobalConfig as Ue } from "bkui-vue";
5
- import { inject as Ke, ref as I, onMounted as le, onBeforeUnmount as ie, defineComponent as q, withDirectives as j, openBlock as h, createElementBlock as f, createElementVNode as d, toDisplayString as E, unref as p, createCommentVNode as T, vShow as Ce, createTextVNode as te, pushScopeId as re, popScopeId as ce, computed as Q, normalizeStyle as F, normalizeClass as ee, createVNode as Y, Fragment as U, watch as Pe, createBlock as K, withCtx as _, renderList as oe, nextTick as ze, mergeProps as Me, normalizeProps as We, withModifiers as X, onBeforeMount as je, renderSlot as Qe, provide as Ge } from "vue";
4
+ import { Popover as Ie, Input as ke, Exception as Ae, clickoutside as Ye, bkTooltips as he, Tag as Xe, Alert as ye, Button as qe, Message as we, Select as Le, provideGlobalConfig as Ue } from "bkui-vue";
5
+ import { inject as Ke, ref as A, onMounted as ie, onBeforeUnmount as le, defineComponent as q, withDirectives as j, openBlock as h, createElementBlock as f, createElementVNode as p, toDisplayString as E, unref as d, createCommentVNode as T, vShow as Ce, createTextVNode as te, pushScopeId as re, popScopeId as ce, computed as Q, normalizeStyle as F, normalizeClass as _, createVNode as I, Fragment as U, watch as Pe, createBlock as K, withCtx as $, renderList as oe, nextTick as ze, mergeProps as Me, normalizeProps as We, withModifiers as X, onBeforeMount as je, renderSlot as Qe, provide as Ge } from "vue";
6
6
  import ae from "dayjs";
7
7
  import Se from "highlight.js";
8
8
  import Oe from "markdown-it";
@@ -14,118 +14,122 @@ function me() {
14
14
  enablePopup: Ke(Te, !0)
15
15
  };
16
16
  }
17
- function He() {
18
- const o = I(!1), n = () => {
19
- const l = document.querySelector(".ai-blueking-messages");
20
- l.scrollTop = l.scrollHeight;
21
- }, e = (l) => {
22
- const t = l.target;
17
+ function Be() {
18
+ const o = A(!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
  }, a = () => {
25
- const l = document.querySelector(".ai-blueking-messages");
26
- l == null || l.addEventListener("scroll", e, { passive: !0 });
25
+ const i = document.querySelector(".ai-blueking-messages");
26
+ i == null || i.addEventListener("scroll", e, { passive: !0 });
27
27
  }, s = () => {
28
- const l = document.querySelector(".ai-blueking-messages");
29
- l == null || l.removeEventListener("scroll", e);
28
+ const i = document.querySelector(".ai-blueking-messages");
29
+ i == null || i.removeEventListener("scroll", e);
30
30
  };
31
- return le(a), ie(s), {
31
+ return ie(a), le(s), {
32
32
  isShow: o,
33
33
  scrollToBottom: n
34
34
  };
35
35
  }
36
- const $ = I(""), de = I(!1), pe = {
36
+ const ee = A(""), de = A(!1), pe = {
37
37
  width: 80,
38
38
  height: 34,
39
39
  offset: 15,
40
40
  debounceTime: 300
41
41
  };
42
42
  function ge(o) {
43
- const n = I(!1), e = I({ top: "0px", left: "0px" });
43
+ const n = A(!1), e = A({ top: "0px", left: "0px" });
44
44
  let a, s = null;
45
- const l = I(null);
45
+ const i = A(null);
46
46
  let t = !1, g = null;
47
- const i = (m) => {
47
+ const l = (m) => {
48
48
  g = { x: m.clientX, y: m.clientY };
49
- }, H = (m) => {
49
+ }, B = (m) => {
50
50
  s = m, g && (t = Math.sqrt(
51
51
  Math.pow(m.clientX - g.x, 2) + Math.pow(m.clientY - g.y, 2)
52
52
  ) > 5), g = null;
53
- }, V = (m, z) => {
54
- const u = window.innerWidth, { width: S, height: M, offset: r } = pe;
53
+ }, V = (m, C) => {
54
+ const u = window.innerWidth, { width: S, height: w, offset: r } = pe;
55
55
  let v = m + window.scrollX - S / 2;
56
56
  v = Math.max(r, Math.min(v, u - S - r));
57
- let k = z + window.scrollY - M - r;
58
- return z <= M + r && (k = z + window.scrollY + r), {
59
- top: `${k}px`,
57
+ let y = C + window.scrollY - w - r;
58
+ return C <= w + r && (y = C + window.scrollY + r), {
59
+ top: `${y}px`,
60
60
  left: `${v}px`
61
61
  };
62
- }, w = (m) => {
63
- const z = window.innerWidth, { width: u, height: S, offset: M } = pe;
62
+ }, L = (m) => {
63
+ const C = window.innerWidth, { width: u, height: S, offset: w } = pe;
64
64
  let r = m.left + window.scrollX + m.width / 2 - u / 2;
65
- r = Math.max(M, Math.min(r, z - u - M));
66
- let v = m.top + window.scrollY - S - M;
67
- return m.top <= S + M && (v = m.bottom + window.scrollY + M), {
65
+ r = Math.max(w, Math.min(r, C - u - w));
66
+ let v = m.top + window.scrollY - S - w;
67
+ return m.top <= S + w && (v = m.bottom + window.scrollY + w), {
68
68
  top: `${v}px`,
69
69
  left: `${r}px`
70
70
  };
71
- }, P = () => {
71
+ }, z = () => {
72
72
  clearTimeout(a), a = setTimeout(() => {
73
73
  var S;
74
74
  const m = window.getSelection();
75
75
  if (!(m != null && m.toString().trim())) {
76
- L();
76
+ M();
77
77
  return;
78
78
  }
79
- const z = m.getRangeAt(0);
80
- if ((S = z.commonAncestorContainer.parentElement) != null && S.closest(".ai-modal")) {
81
- L();
79
+ const C = m.getRangeAt(0);
80
+ if ((S = C.commonAncestorContainer.parentElement) != null && S.closest(".ai-modal")) {
81
+ M();
82
82
  return;
83
83
  }
84
- de.value = !1, $.value = m.toString().trim();
84
+ de.value = !1, ee.value = m.toString().trim();
85
85
  const u = document.activeElement;
86
86
  if ((u == null ? void 0 : u.tagName) === "TEXTAREA") {
87
87
  if (!s) {
88
- L();
88
+ M();
89
89
  return;
90
90
  }
91
- const { clientX: M, clientY: r } = s;
92
- e.value = V(M, r), n.value = !0, s = null;
91
+ const { clientX: w, clientY: r } = s;
92
+ e.value = V(w, r), n.value = !0, s = null;
93
93
  } else {
94
- const M = z.getBoundingClientRect();
95
- if (!M.width || !M.height) {
96
- L();
94
+ const w = C.getBoundingClientRect();
95
+ if (!w.width || !w.height) {
96
+ M();
97
97
  return;
98
98
  }
99
- e.value = w(M), n.value = !0;
99
+ e.value = L(w), n.value = !0;
100
100
  }
101
101
  }, pe.debounceTime);
102
- }, L = () => {
103
- n.value = !1, de.value || ($.value = "");
102
+ }, M = () => {
103
+ n.value = !1, de.value || (ee.value = "");
104
104
  }, R = (m) => {
105
- if (t) {
106
- m.preventDefault(), m.stopPropagation(), t = !1;
107
- return;
105
+ var w, r;
106
+ const C = m.target, u = (w = C.classList) == null ? void 0 : w.contains("ai-blueking-tag-text"), S = (r = i.value) == null ? void 0 : r.contains(C);
107
+ if (!(u || !t)) {
108
+ if (t) {
109
+ m.preventDefault(), m.stopPropagation(), t = !1;
110
+ return;
111
+ }
112
+ S || (M(), x());
108
113
  }
109
- l.value && !l.value.contains(m.target) && (L(), x());
110
114
  }, x = () => {
111
115
  const m = window.getSelection();
112
- m && m.removeAllRanges(), $.value = "";
113
- }, A = (m) => {
114
- $.value = m;
116
+ m && m.removeAllRanges(), ee.value = "";
117
+ }, Y = (m) => {
118
+ ee.value = m;
115
119
  };
116
- return le(() => {
117
- o && (document.addEventListener("selectionchange", P), document.addEventListener("mousedown", i), document.addEventListener("mouseup", H), document.addEventListener("click", R, !0));
118
- }), ie(() => {
119
- o && (document.removeEventListener("selectionchange", P), document.removeEventListener("mousedown", i), document.removeEventListener("mouseup", H), document.removeEventListener("click", R, !0)), clearTimeout(a);
120
+ return ie(() => {
121
+ o && (document.addEventListener("selectionchange", z), document.addEventListener("mousedown", l), document.addEventListener("mouseup", B), document.addEventListener("click", R, !0));
122
+ }), le(() => {
123
+ o && (document.removeEventListener("selectionchange", z), document.removeEventListener("mousedown", l), document.removeEventListener("mouseup", B), document.removeEventListener("click", R, !0)), clearTimeout(a);
120
124
  }), {
121
125
  isIconVisible: n,
122
126
  iconPosition: e,
123
- selectedText: $,
124
- hideIcon: L,
127
+ selectedText: ee,
128
+ hideIcon: M,
125
129
  clearSelection: x,
126
- setSelection: A,
130
+ setSelection: Y,
127
131
  lockSelectedText: de,
128
- popupRef: l
132
+ popupRef: i
129
133
  };
130
134
  }
131
135
  const Ze = (o) => {
@@ -181,7 +185,8 @@ const Ze = (o) => {
181
185
  `,
182
186
  explanationShortcut: `You are a professional explainer. Please provide a detailed explanation of "{{ SELECTED_TEXT }}". Your explanation should include: 1) basic meaning and conceptual explanation; 2) practical applications or use cases; 3) if it's a technical term, please provide relevant technical background; 4) where appropriate, provide specific examples to aid understanding. Use clear and accessible language to ensure non-experts can understand. If the word/phrase has multiple meanings, please list the main definitions. Keep your response concise and clear while ensuring completeness and accuracy of information.`,
183
187
  翻译: "translate",
184
- 解释: "explan"
188
+ 解释: "explan",
189
+ "AI小鲸正在回复,请结束后再清空": "AI BK GPT is executing, please clear after completion"
185
190
  }, tt = {
186
191
  translateShortcut: `你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
187
192
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
@@ -189,15 +194,15 @@ const Ze = (o) => {
189
194
  {{ SELECTED_TEXT }}
190
195
  '''`,
191
196
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
192
- }, y = (o) => $e !== "en" ? tt[o] || o : et[o] || o, fe = [
197
+ }, k = (o) => $e !== "en" ? tt[o] || o : et[o] || o, fe = [
193
198
  {
194
- label: y("翻译"),
195
- prompt: y("translateShortcut"),
199
+ label: k("翻译"),
200
+ prompt: k("translateShortcut"),
196
201
  key: "translate"
197
202
  },
198
203
  {
199
- label: y("解释"),
200
- prompt: y("explanationShortcut"),
204
+ label: k("解释"),
205
+ prompt: k("explanationShortcut"),
201
206
  key: "explanation"
202
207
  }
203
208
  ], ot = { class: "ai-cite" }, nt = { class: "ai-cite-text" }, st = { class: "ai-cite-tips" }, at = /* @__PURE__ */ q({
@@ -212,17 +217,17 @@ const Ze = (o) => {
212
217
  "section",
213
218
  ot,
214
219
  [
215
- d(
220
+ p(
216
221
  "span",
217
222
  nt,
218
223
  E(n.text),
219
224
  1
220
225
  /* TEXT */
221
226
  ),
222
- d(
227
+ p(
223
228
  "span",
224
229
  st,
225
- E(p(y)("您选择的文本内容")),
230
+ E(d(k)("您选择的文本内容")),
226
231
  1
227
232
  /* TEXT */
228
233
  ),
@@ -243,7 +248,7 @@ const Ze = (o) => {
243
248
  for (const [a, s] of n)
244
249
  e[a] = s;
245
250
  return e;
246
- }, Be = /* @__PURE__ */ W(at, [["__scopeId", "data-v-3fd96961"]]), lt = (o) => (re("data-v-a8d839da"), o = o(), ce(), o), it = /* @__PURE__ */ lt(() => /* @__PURE__ */ d(
251
+ }, He = /* @__PURE__ */ W(at, [["__scopeId", "data-v-3fd96961"]]), it = (o) => (re("data-v-a8d839da"), o = o(), ce(), o), lt = /* @__PURE__ */ it(() => /* @__PURE__ */ p(
247
252
  "i",
248
253
  { class: "ai-blueking-icon ai-blueking-xiangxia-2" },
249
254
  null,
@@ -252,30 +257,30 @@ const Ze = (o) => {
252
257
  )), rt = /* @__PURE__ */ q({
253
258
  __name: "render-back",
254
259
  setup(o) {
255
- const { isShow: n, scrollToBottom: e } = He();
256
- return (a, s) => p(n) ? (h(), f("span", {
260
+ const { isShow: n, scrollToBottom: e } = Be();
261
+ return (a, s) => d(n) ? (h(), f("span", {
257
262
  key: 0,
258
263
  class: "ai-blueking-render-back",
259
264
  onClick: s[0] || (s[0] = //@ts-ignore
260
- (...l) => p(e) && p(e)(...l))
265
+ (...i) => d(e) && d(e)(...i))
261
266
  }, [
262
- it,
267
+ lt,
263
268
  te(
264
- " " + E(p(y)("返回最新")),
269
+ " " + E(d(k)("返回最新")),
265
270
  1
266
271
  /* TEXT */
267
272
  )
268
273
  ])) : T("v-if", !0);
269
274
  }
270
275
  }), ct = /* @__PURE__ */ W(rt, [["__scopeId", "data-v-a8d839da"]]), ut = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAH3tJREFUeF69nAd4VFXax39nStqkNxJC6KGDghQFXIosogGkCKKuFYVFFBVQXEEN69pFF5VFFGRFUelSFUQjCFIUkN5LIIH0hGSSSabd7zln5sIkhBRwv8MzzwBz7yn/8/b3PUfwP2iaphkAgxDC6du9pmmxQFugKdACaAU0BkKBEO9HvlLs/RQBZ4AjwDHgFHBQCJFdqV8T4BZCuP/s5Yg/s0NN02R/Ehw5WU32rWmaBGMI0ANoDTQHzNc4rgM4ARwGtgLfCiEkaHKcK8a+xjEqvPanAOSlGPQd9FLKX4FRgPz29xlVAucC5Nj6R/9Zn48C19vk3/WP0fuO/ls58APwjfzWKavyfK4HqOsGyHcymqZFAGOA0UCSd2FyDAWK91kvKAJR99F1oCQr6WDJ/5M9HQfmAZ8IIQr+LJDqPkV9Wz0kLSTVaJom5YcEZQoQ5wVELkI94yV/+XCFzdRXdh077EtdBjmOppFpMIi3JFhCiGIvUJrO8nUd65oA0ilBCCGp4jbgdaCrDyvIicsdRvMyi8QmO7eEwoIyTCYD0ZGBhIYF1HW+VT6vaZocx2UwqB0QbrcCaqfRKP4hhPhJ0zQ5FwlSnYV4nQGSg3mBsQCvARO8lCLlihTQl/qU4Chgsq18tmAvP/x4kvMZxZjMBholhvPKtL/QpXOCFLBXUFdtkdPfdbs1CgrLMBqFFh4WoFjQ7dY0g0F8AEw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yf2NRIGa1/RrB0Zf7XUDpMDxAUn+e/YJLdZkoL/wXNHVr05XdGlgNKOt+2ATqfO2SGGsjZg+UGKhaS6lqmXBhV7bUq7BRiHEN043G8Y191z+Vnk+10MEfwpAPqaAWAKGET6XvH2WpjXVnAzRDPRAq8Ulb7IAwQS2i+WkHUgnoVUcIdEW3J779DyXvAkOCzdbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=", dt = (o) => {
271
- var n = o.renderer.rules.link_open || function(e, a, s, l, t) {
276
+ var n = o.renderer.rules.link_open || function(e, a, s, i, t) {
272
277
  return t.renderToken(e, a, s);
273
278
  };
274
- o.renderer.rules.link_open = function(e, a, s, l, t) {
275
- return e[a].attrSet("target", "_blank"), n(e, a, s, l, t);
279
+ o.renderer.rules.link_open = function(e, a, s, i, t) {
280
+ return e[a].attrSet("target", "_blank"), n(e, a, s, i, t);
276
281
  };
277
282
  };
278
- var Re = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.System = "system", o.User = "user", o))(Re || {}), se = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(se || {});
283
+ var Re = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.Ignore = "ignore", o.System = "system", o.User = "user", o))(Re || {}), se = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(se || {});
279
284
  const pt = /* @__PURE__ */ q({
280
285
  __name: "ai-avatar",
281
286
  props: {
@@ -293,14 +298,14 @@ const pt = /* @__PURE__ */ q({
293
298
  fontSize: `${n.size * 0.611}px`
294
299
  // 保持原比例 22/36
295
300
  }));
296
- return (s, l) => (h(), f(
301
+ return (s, i) => (h(), f(
297
302
  "span",
298
303
  {
299
304
  style: F(e.value),
300
305
  class: "message-photo ai"
301
306
  },
302
307
  [
303
- d(
308
+ p(
304
309
  "i",
305
310
  {
306
311
  style: F(a.value),
@@ -330,7 +335,7 @@ const pt = /* @__PURE__ */ q({
330
335
  height: "16",
331
336
  class: "loading-message",
332
337
  "aria-hidden": "true"
333
- }, St = /* @__PURE__ */ d(
338
+ }, St = /* @__PURE__ */ p(
334
339
  "use",
335
340
  { "xlink:href": "#ai-blueking-quanquan" },
336
341
  null,
@@ -369,41 +374,41 @@ const pt = /* @__PURE__ */ q({
369
374
  success: ""
370
375
  };
371
376
  return (g = e.message) != null && g.status ? t[e.message.status] : "";
372
- }), s = Q(() => e.message.content ? n.render(e.message.content) : ""), l = Q(() => {
377
+ }), s = Q(() => e.message.content ? n.render(e.message.content) : ""), i = Q(() => {
373
378
  const t = ae(e.message.time), g = ae();
374
379
  return e.message.time ? g.isSame(t, "year") ? t.format("MM-DD HH:mm:ss") : t.format("YYYY-MM-DD HH:mm:ss") : "";
375
380
  });
376
381
  return (t, g) => (h(), f(
377
382
  "li",
378
383
  {
379
- class: ee([t.message.role, "message-main"])
384
+ class: _([t.message.role, "message-main"])
380
385
  },
381
386
  [
382
387
  t.message.cite ? (h(), f("div", mt, [
383
- Y(Be, {
388
+ I(He, {
384
389
  text: t.message.cite
385
390
  }, null, 8, ["text"])
386
391
  ])) : T("v-if", !0),
387
- d("div", gt, [
388
- t.message.role === p(Re).User ? (h(), f(
392
+ p("div", gt, [
393
+ t.message.role === d(Re).User ? (h(), f(
389
394
  U,
390
395
  { key: 0 },
391
396
  [
392
- d("p", vt, [
393
- l.value ? (h(), f(
397
+ p("p", vt, [
398
+ i.value ? (h(), f(
394
399
  "span",
395
400
  ft,
396
- E(l.value),
401
+ E(i.value),
397
402
  1
398
403
  /* TEXT */
399
404
  )) : T("v-if", !0),
400
- d("span", {
405
+ p("span", {
401
406
  class: "markdown-message",
402
407
  innerHTML: s.value
403
408
  }, null, 8, bt)
404
409
  ]),
405
- d("span", kt, [
406
- d("img", { src: t.userPhoto }, null, 8, yt)
410
+ p("span", kt, [
411
+ p("img", { src: t.userPhoto }, null, 8, yt)
407
412
  ])
408
413
  ],
409
414
  64
@@ -412,12 +417,12 @@ const pt = /* @__PURE__ */ q({
412
417
  U,
413
418
  { key: 1 },
414
419
  [
415
- Y(ht),
416
- d("p", wt, [
417
- l.value ? (h(), f(
420
+ I(ht),
421
+ p("p", wt, [
422
+ i.value ? (h(), f(
418
423
  "span",
419
424
  Lt,
420
- E(l.value),
425
+ E(i.value),
421
426
  1
422
427
  /* TEXT */
423
428
  )) : T("v-if", !0),
@@ -425,14 +430,14 @@ const pt = /* @__PURE__ */ q({
425
430
  "i",
426
431
  {
427
432
  key: 1,
428
- class: ee(a.value)
433
+ class: _(a.value)
429
434
  },
430
435
  null,
431
436
  2
432
437
  /* CLASS */
433
438
  )) : T("v-if", !0),
434
- t.message.status === p(se).Loading ? (h(), f("svg", Mt, Ct)) : T("v-if", !0),
435
- t.message.status === p(se).Error ? (h(), f(
439
+ t.message.status === d(se).Loading ? (h(), f("svg", Mt, Ct)) : T("v-if", !0),
440
+ t.message.status === d(se).Error ? (h(), f(
436
441
  "span",
437
442
  Pt,
438
443
  E(t.message.content),
@@ -441,9 +446,9 @@ const pt = /* @__PURE__ */ q({
441
446
  )) : (h(), f("span", {
442
447
  key: 4,
443
448
  innerHTML: s.value,
444
- class: ee({
449
+ class: _({
445
450
  "markdown-message": !0,
446
- loading: t.message.status === p(se).Loading
451
+ loading: t.message.status === d(se).Loading
447
452
  })
448
453
  }, null, 10, zt))
449
454
  ])
@@ -457,7 +462,7 @@ const pt = /* @__PURE__ */ q({
457
462
  /* CLASS */
458
463
  ));
459
464
  }
460
- }), Ht = { class: "prompt-list" }, Bt = { class: "search-group" }, Rt = ["onClick"], xt = { class: "prompt-content" }, Vt = /* @__PURE__ */ q({
465
+ }), Bt = { class: "prompt-list" }, Ht = { class: "search-group" }, Rt = ["onClick"], xt = { class: "prompt-content" }, Vt = /* @__PURE__ */ q({
461
466
  __name: "render-send",
462
467
  props: {
463
468
  prompts: {},
@@ -466,78 +471,78 @@ const pt = /* @__PURE__ */ q({
466
471
  },
467
472
  emits: ["change-prompt", "update:value", "enter", "choose-prompt"],
468
473
  setup(o, { emit: n }) {
469
- const e = o, a = n, { enablePopup: s } = me(), l = Ae, t = he, { selectedText: g, lockSelectedText: i } = ge(s), H = I(""), V = I(40), w = I(), P = I(!1), L = Q(() => {
474
+ const e = o, a = n, { enablePopup: s } = me(), i = Ye, t = he, { selectedText: g, lockSelectedText: l } = ge(s), B = A(""), V = A(40), L = A(), z = A(!1), M = Q(() => {
470
475
  var b;
471
- return ((b = e.prompts) == null ? void 0 : b.filter((B) => B.content.includes(H.value))) || [];
476
+ return ((b = e.prompts) == null ? void 0 : b.filter((H) => H.content.includes(B.value))) || [];
472
477
  }), R = Q(() => {
473
478
  var b;
474
- return e.placeholder ? e.placeholder : (b = e.prompts) != null && b.length ? y("您可以键入 “/” 查看更多Prompt") : y("请输入");
479
+ return e.placeholder ? e.placeholder : (b = e.prompts) != null && b.length ? k("您可以键入 “/” 查看更多Prompt") : k("请输入");
475
480
  }), x = (b) => {
476
481
  a("update:value", b), a("change-prompt", b);
477
- }, A = () => {
482
+ }, Y = () => {
478
483
  var b;
479
- e.value === "/" && ((b = e.prompts) != null && b.length) ? v() : k();
484
+ e.value === "/" && ((b = e.prompts) != null && b.length) ? v() : y();
480
485
  }, m = () => {
481
486
  ze(() => {
482
- var B;
483
- const b = (B = w.value) == null ? void 0 : B.$el.querySelector("textarea");
487
+ var H;
488
+ const b = (H = L.value) == null ? void 0 : H.$el.querySelector("textarea");
484
489
  (b == null ? void 0 : b.scrollHeight) > 40 && e.value ? V.value = b.scrollHeight <= 300 ? b.scrollHeight : 300 : V.value = 40;
485
490
  });
486
- }, z = (b) => {
487
- a("update:value", b.content), a("choose-prompt", b), k(), M();
488
- }, u = (b, B) => {
489
- B.key === "Enter" && !B.shiftKey && (B.preventDefault(), a("enter"));
491
+ }, C = (b) => {
492
+ a("update:value", b.content), a("choose-prompt", b), y(), w();
493
+ }, u = (b, H) => {
494
+ H.key === "Enter" && !H.shiftKey && (H.preventDefault(), a("enter"));
490
495
  }, S = () => {
491
496
  x("");
492
- }, M = () => {
493
- var B;
494
- const b = (B = w.value) == null ? void 0 : B.$el.querySelector("textarea");
497
+ }, w = () => {
498
+ var H;
499
+ const b = (H = L.value) == null ? void 0 : H.$el.querySelector("textarea");
495
500
  b == null || b.focus();
496
501
  }, r = () => {
497
- g.value && (i.value = !0);
502
+ g.value && (l.value = !0);
498
503
  }, v = () => {
499
- P.value = !0;
500
- }, k = () => {
501
- P.value = !1;
504
+ z.value = !0;
505
+ }, y = () => {
506
+ z.value = !1;
502
507
  };
503
508
  return Pe(
504
509
  () => e.value,
505
510
  () => {
506
- m(), A();
511
+ m(), Y();
507
512
  }
508
- ), le(M), (b, B) => (h(), K(p(Ye), {
513
+ ), ie(w), (b, H) => (h(), K(d(Ie), {
509
514
  width: "calc(100% - 118px)",
510
515
  "ext-cls": "empty-padding",
511
516
  arrow: !1,
512
- "is-show": P.value,
517
+ "is-show": z.value,
513
518
  "popover-delay": 0,
514
519
  boundary: "parent",
515
520
  placement: "bottom",
516
521
  theme: "light",
517
522
  trigger: "manual"
518
523
  }, {
519
- content: _(() => {
524
+ content: $(() => {
520
525
  var ne;
521
526
  return [
522
- d("div", null, [
523
- j((h(), f("section", Ht, [
524
- Y(p(ke), {
527
+ p("div", null, [
528
+ j((h(), f("section", Bt, [
529
+ I(d(ke), {
525
530
  class: "input-search",
526
- modelValue: H.value,
527
- "onUpdate:modelValue": B[0] || (B[0] = (J) => H.value = J),
531
+ modelValue: B.value,
532
+ "onUpdate:modelValue": H[0] || (H[0] = (J) => B.value = J),
528
533
  behavior: "simplicity",
529
534
  clearable: ""
530
535
  }, null, 8, ["modelValue"]),
531
- d("section", Bt, [
536
+ p("section", Ht, [
532
537
  (h(!0), f(
533
538
  U,
534
539
  null,
535
- oe(L.value, (J, ue) => j((h(), f("span", {
540
+ oe(M.value, (J, ue) => j((h(), f("span", {
536
541
  class: "group-prompt",
537
542
  key: ue,
538
- onClick: (be) => z(J)
543
+ onClick: (be) => C(J)
539
544
  }, [
540
- d(
545
+ p(
541
546
  "span",
542
547
  xt,
543
548
  E(J.content),
@@ -545,7 +550,7 @@ const pt = /* @__PURE__ */ q({
545
550
  /* TEXT */
546
551
  )
547
552
  ], 8, Rt)), [
548
- [p(t), {
553
+ [d(t), {
549
554
  content: J.content,
550
555
  placement: "right",
551
556
  theme: "light",
@@ -556,7 +561,7 @@ const pt = /* @__PURE__ */ q({
556
561
  128
557
562
  /* KEYED_FRAGMENT */
558
563
  )),
559
- (ne = L.value) != null && ne.length ? T("v-if", !0) : (h(), K(p(Ie), {
564
+ (ne = M.value) != null && ne.length ? T("v-if", !0) : (h(), K(d(Ae), {
560
565
  key: 0,
561
566
  class: "exception-wrap-item exception-part",
562
567
  scene: "part",
@@ -564,13 +569,13 @@ const pt = /* @__PURE__ */ q({
564
569
  }))
565
570
  ])
566
571
  ])), [
567
- [p(l), k]
572
+ [d(i), y]
568
573
  ])
569
574
  ])
570
575
  ];
571
576
  }),
572
- default: _(() => [
573
- d(
577
+ default: $(() => [
578
+ p(
574
579
  "section",
575
580
  {
576
581
  style: F({
@@ -579,9 +584,9 @@ const pt = /* @__PURE__ */ q({
579
584
  class: "send-prompt-container"
580
585
  },
581
586
  [
582
- Y(p(ke), {
587
+ I(d(ke), {
583
588
  ref_key: "inputRef",
584
- ref: w,
589
+ ref: L,
585
590
  class: "send-prompt",
586
591
  autosize: !1,
587
592
  clearable: !0,
@@ -594,7 +599,7 @@ const pt = /* @__PURE__ */ q({
594
599
  onInput: x,
595
600
  onKeydown: u
596
601
  }, null, 8, ["model-value", "placeholder"]),
597
- b.value ? (h(), K(p(Ne), {
602
+ b.value ? (h(), K(d(Ne), {
598
603
  key: 0,
599
604
  class: "show-clear-only-hover bk-input--clear-icon clear-icon",
600
605
  onClick: S
@@ -608,7 +613,7 @@ const pt = /* @__PURE__ */ q({
608
613
  /* STABLE */
609
614
  }, 8, ["is-show"]));
610
615
  }
611
- }), Dt = /* @__PURE__ */ W(Vt, [["__scopeId", "data-v-dd1d94cb"]]), Et = { class: "ai-shortcuts" }, Yt = /* @__PURE__ */ q({
616
+ }), Dt = /* @__PURE__ */ W(Vt, [["__scopeId", "data-v-dd1d94cb"]]), Et = { class: "ai-shortcuts" }, It = /* @__PURE__ */ q({
612
617
  __name: "render-shortcuts",
613
618
  props: {
614
619
  shortcuts: {}
@@ -618,17 +623,17 @@ const pt = /* @__PURE__ */ q({
618
623
  const e = n, a = (s) => {
619
624
  e("select", s);
620
625
  };
621
- return (s, l) => (h(), f("ul", Et, [
626
+ return (s, i) => (h(), f("ul", Et, [
622
627
  (h(!0), f(
623
628
  U,
624
629
  null,
625
- oe(s.shortcuts, (t) => (h(), K(p(Xe), {
630
+ oe(s.shortcuts, (t) => (h(), K(d(Xe), {
626
631
  class: "ai-blueking-shortcut",
627
632
  key: t.label,
628
633
  theme: "info",
629
634
  onClick: (g) => a(t)
630
635
  }, {
631
- default: _(() => [
636
+ default: $(() => [
632
637
  te(
633
638
  E(t.label),
634
639
  1
@@ -643,7 +648,7 @@ const pt = /* @__PURE__ */ q({
643
648
  ))
644
649
  ]));
645
650
  }
646
- }), It = /* @__PURE__ */ W(Yt, [["__scopeId", "data-v-266e17ca"]]), At = (o) => (re("data-v-fd57f18d"), o = o(), ce(), o), Xt = /* @__PURE__ */ At(() => /* @__PURE__ */ d(
651
+ }), At = /* @__PURE__ */ W(It, [["__scopeId", "data-v-4eeeea02"]]), Yt = (o) => (re("data-v-fd57f18d"), o = o(), ce(), o), Xt = /* @__PURE__ */ Yt(() => /* @__PURE__ */ p(
647
652
  "svg",
648
653
  {
649
654
  width: "10",
@@ -652,7 +657,7 @@ const pt = /* @__PURE__ */ q({
652
657
  "aria-hidden": "true"
653
658
  },
654
659
  [
655
- /* @__PURE__ */ d("use", { "xlink:href": "#ai-blueking-tingzhi" })
660
+ /* @__PURE__ */ p("use", { "xlink:href": "#ai-blueking-tingzhi" })
656
661
  ],
657
662
  -1
658
663
  /* HOISTED */
@@ -666,14 +671,14 @@ const pt = /* @__PURE__ */ q({
666
671
  const e = n, a = () => {
667
672
  e("stop");
668
673
  };
669
- return (s, l) => s.isShow ? (h(), f("span", {
674
+ return (s, i) => s.isShow ? (h(), f("span", {
670
675
  key: 0,
671
676
  class: "ai-blueking-render-stop",
672
677
  onClick: a
673
678
  }, [
674
679
  Xt,
675
680
  te(
676
- " " + E(p(y)("终止生成")),
681
+ " " + E(d(k)("终止生成")),
677
682
  1
678
683
  /* TEXT */
679
684
  )
@@ -690,21 +695,21 @@ const pt = /* @__PURE__ */ q({
690
695
  setup(o) {
691
696
  const n = o, e = Q(() => {
692
697
  var t;
693
- const a = ae(n.message.time), s = ae(), l = {
694
- 0: y("日"),
695
- 1: y("一"),
696
- 2: y("二"),
697
- 3: y("三"),
698
- 4: y("四"),
699
- 5: y("五"),
700
- 6: y("六")
698
+ const a = ae(n.message.time), s = ae(), i = {
699
+ 0: k("日"),
700
+ 1: k("一"),
701
+ 2: k("二"),
702
+ 3: k("三"),
703
+ 4: k("四"),
704
+ 5: k("五"),
705
+ 6: k("六")
701
706
  };
702
707
  return !n.message.time || (t = window.showTimes) != null && t.some(
703
708
  (g) => Math.abs(a.diff(g, "minute")) < 10 && g !== n.message.time
704
- ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], s.isSame(a, "day") ? a.format("HH:mm:ss") : s.subtract(1, "day").isSame(a, "week") ? y("昨天") + " " + a.format("HH:mm:ss") : s.isSame(a, "week") ? y("本周") + l[a.day()] + " " + a.format("HH:mm:ss") : s.subtract(1, "week").isSame(a, "week") ? y("上周") + l[a.day()] + " " + a.format("HH:mm:ss") : s.isSame(a, "year") ? a.format("MM-DD HH:mm:ss") : a.format("YYYY-MM-DD HH:mm:ss"));
709
+ ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], s.isSame(a, "day") ? a.format("HH:mm:ss") : s.subtract(1, "day").isSame(a, "week") ? k("昨天") + " " + a.format("HH:mm:ss") : s.isSame(a, "week") ? k("本周") + i[a.day()] + " " + a.format("HH:mm:ss") : s.subtract(1, "week").isSame(a, "week") ? k("上周") + i[a.day()] + " " + a.format("HH:mm:ss") : s.isSame(a, "year") ? a.format("MM-DD HH:mm:ss") : a.format("YYYY-MM-DD HH:mm:ss"));
705
710
  });
706
711
  return (a, s) => e.value ? (h(), f("section", Kt, [
707
- d(
712
+ p(
708
713
  "span",
709
714
  Wt,
710
715
  E(e.value),
@@ -713,13 +718,13 @@ const pt = /* @__PURE__ */ q({
713
718
  )
714
719
  ])) : T("v-if", !0);
715
720
  }
716
- }), Qt = /* @__PURE__ */ W(jt, [["__scopeId", "data-v-55c9a119"]]), xe = (o) => (re("data-v-4abec211"), o = o(), ce(), o), Gt = {
721
+ }), Qt = /* @__PURE__ */ W(jt, [["__scopeId", "data-v-55c9a119"]]), xe = (o) => (re("data-v-18736abc"), o = o(), ce(), o), Gt = {
717
722
  key: 0,
718
723
  width: "18",
719
724
  height: "18",
720
725
  class: "scroll-loading-icon",
721
726
  "aria-hidden": "true"
722
- }, Ot = /* @__PURE__ */ xe(() => /* @__PURE__ */ d(
727
+ }, Ot = /* @__PURE__ */ xe(() => /* @__PURE__ */ p(
723
728
  "use",
724
729
  { "xlink:href": "#ai-blueking-loading-2" },
725
730
  null,
@@ -727,7 +732,7 @@ const pt = /* @__PURE__ */ q({
727
732
  /* HOISTED */
728
733
  )), Jt = [
729
734
  Ot
730
- ], Nt = { class: "ai-operation" }, Zt = { class: "ai-operation-input-wrapper" }, Ft = { class: "ai-cite-tips" }, _t = { class: "ai-operation-input" }, $t = /* @__PURE__ */ xe(() => /* @__PURE__ */ d(
735
+ ], Nt = { class: "ai-operation" }, Zt = { class: "ai-operation-input-wrapper" }, Ft = { class: "ai-cite-tips" }, _t = { class: "ai-operation-input" }, $t = /* @__PURE__ */ xe(() => /* @__PURE__ */ p(
731
736
  "i",
732
737
  { class: "ai-blueking-icon ai-blueking-fasong" },
733
738
  null,
@@ -749,67 +754,67 @@ const pt = /* @__PURE__ */ q({
749
754
  },
750
755
  emits: ["ai-click", "change-prompt", "send", "choose-prompt", "scroll-load", "stop"],
751
756
  setup(o, { expose: n, emit: e }) {
752
- const a = o, s = e, { enablePopup: l } = me(), t = he, g = I(""), { selectedText: i, clearSelection: H } = ge(l), { isShow: V } = He(), w = () => {
757
+ const a = o, s = e, { enablePopup: i } = me(), t = he, g = A(""), { selectedText: l, clearSelection: B } = ge(i), { isShow: V } = Be(), L = () => {
753
758
  ze(() => {
754
759
  const r = document.querySelector(".ai-blueking-messages");
755
760
  r.scrollTop = r.scrollHeight;
756
761
  });
757
- }, P = _e((r) => {
762
+ }, z = _e((r) => {
758
763
  if (a.scrollLoading || a.scrollLoadingEnd)
759
764
  return;
760
765
  r.target.scrollTop < 200 && s("scroll-load");
761
- }), L = () => {
766
+ }), M = () => {
762
767
  if (g.value) {
763
768
  if (a.loading) {
764
- we({ theme: "warning", message: y("内容正在执行中,请执行完成后再发送") });
769
+ we({ theme: "warning", message: k("内容正在执行中,请执行完成后再发送") });
765
770
  return;
766
771
  }
767
772
  s("send", {
768
773
  content: g.value,
769
- cite: i.value
770
- }), g.value = "", i.value = "";
774
+ cite: l.value
775
+ }), g.value = "", l.value = "";
771
776
  }
772
777
  }, R = (r) => {
773
778
  s("choose-prompt", r);
774
779
  }, x = (r) => {
775
780
  s("change-prompt", r);
776
- }, A = () => {
781
+ }, Y = () => {
777
782
  s("stop");
778
783
  }, m = (r) => {
779
784
  const v = r.target;
780
785
  if (v != null && v.classList.contains("ai-blueking-angle-up")) {
781
- const k = v == null ? void 0 : v.parentElement;
782
- k != null && k.classList.contains("closed") ? k == null || k.classList.remove("closed") : k == null || k.classList.add("closed");
786
+ const y = v == null ? void 0 : v.parentElement;
787
+ y != null && y.classList.contains("closed") ? y == null || y.classList.remove("closed") : y == null || y.classList.add("closed");
783
788
  }
784
789
  v != null && v.classList.contains("ai-clickable") && s("ai-click", v.dataset.ai);
785
- }, z = () => {
786
- w(), document.addEventListener("click", m);
790
+ }, C = () => {
791
+ L(), document.addEventListener("click", m);
787
792
  }, u = () => {
788
793
  window.showTimes = [], document.removeEventListener("click", m);
789
794
  }, S = (r) => {
790
795
  g.value = r;
791
- }, M = (r) => {
792
- const v = ve(r.prompt, i.value);
796
+ }, w = (r) => {
797
+ const v = ve(r.prompt, l.value);
793
798
  if (a.loading) {
794
- we({ theme: "warning", message: y("内容正在执行中,请执行完成后再发送") });
799
+ we({ theme: "warning", message: k("内容正在执行中,请执行完成后再发送") });
795
800
  return;
796
801
  }
797
802
  s("send", {
798
803
  content: r.label,
799
- cite: i.value,
804
+ cite: l.value,
800
805
  prompt: v
801
- }), i.value = "";
806
+ }), B();
802
807
  };
803
808
  return Pe(
804
809
  () => a.messages,
805
810
  () => {
806
811
  const r = document.querySelector(".ai-blueking-messages");
807
- (r == null ? void 0 : r.scrollTop) + (r == null ? void 0 : r.clientHeight) + 100 >= (r == null ? void 0 : r.scrollHeight) && w();
812
+ (r == null ? void 0 : r.scrollTop) + (r == null ? void 0 : r.clientHeight) + 100 >= (r == null ? void 0 : r.scrollHeight) && L();
808
813
  },
809
814
  {
810
815
  deep: !0
811
816
  }
812
- ), le(z), ie(u), n({
817
+ ), ie(C), le(u), n({
813
818
  setInputMessage: S
814
819
  }), (r, v) => (h(), f(
815
820
  "section",
@@ -825,7 +830,7 @@ const pt = /* @__PURE__ */ q({
825
830
  { key: 0 },
826
831
  [
827
832
  typeof r.alert == "string" ? (h(), K(
828
- p(ye),
833
+ d(ye),
829
834
  Me({ key: 0 }, {
830
835
  title: r.alert
831
836
  }, {
@@ -836,7 +841,7 @@ const pt = /* @__PURE__ */ q({
836
841
  16
837
842
  /* FULL_PROPS */
838
843
  )) : (h(), K(
839
- p(ye),
844
+ d(ye),
840
845
  We(Me({ key: 1 }, Object.assign({ closable: !0, theme: "warning" }, r.alert))),
841
846
  null,
842
847
  16
@@ -846,31 +851,31 @@ const pt = /* @__PURE__ */ q({
846
851
  64
847
852
  /* STABLE_FRAGMENT */
848
853
  )) : T("v-if", !0),
849
- d(
854
+ p(
850
855
  "ul",
851
856
  {
852
857
  class: "ai-messages ai-blueking-messages",
853
858
  onScrollPassive: v[0] || (v[0] = //@ts-ignore
854
- (...k) => p(P) && p(P)(...k))
859
+ (...y) => d(z) && d(z)(...y))
855
860
  },
856
861
  [
857
862
  r.scrollLoading ? (h(), f("svg", Gt, Jt)) : T("v-if", !0),
858
863
  (h(!0), f(
859
864
  U,
860
865
  null,
861
- oe(r.messages, (k) => (h(), f(
866
+ oe(r.messages, (y) => (h(), f(
862
867
  U,
863
868
  {
864
- key: k.content
869
+ key: y.content
865
870
  },
866
871
  [
867
- Y(Qt, {
872
+ I(Qt, {
868
873
  class: "render-message",
869
- message: k
874
+ message: y
870
875
  }, null, 8, ["message"]),
871
- Y(Tt, {
876
+ I(Tt, {
872
877
  class: "render-message",
873
- message: k,
878
+ message: y,
874
879
  "user-photo": r.userPhoto
875
880
  }, null, 8, ["message", "user-photo"])
876
881
  ],
@@ -884,8 +889,8 @@ const pt = /* @__PURE__ */ q({
884
889
  32
885
890
  /* NEED_HYDRATION */
886
891
  ),
887
- d("section", Nt, [
888
- d(
892
+ p("section", Nt, [
893
+ p(
889
894
  "section",
890
895
  {
891
896
  class: "ai-operation-tools",
@@ -893,66 +898,66 @@ const pt = /* @__PURE__ */ q({
893
898
  }, ["prevent"]))
894
899
  },
895
900
  [
896
- Y(ct),
897
- Y(Ut, {
901
+ I(ct),
902
+ I(Ut, {
898
903
  "is-show": r.loading,
899
- onStop: A
904
+ onStop: Y
900
905
  }, null, 8, ["is-show"])
901
906
  ],
902
907
  32
903
908
  /* NEED_HYDRATION */
904
909
  ),
905
- d("section", Zt, [
906
- p(i) ? (h(), f(
910
+ p("section", Zt, [
911
+ d(l) ? (h(), f(
907
912
  "div",
908
913
  {
909
914
  key: 0,
910
- class: ee(["ai-cite-container", { "is-back-show": !p(V) }]),
915
+ class: _(["ai-cite-container", { "is-back-show": !d(V) }]),
911
916
  onMousedown: v[2] || (v[2] = X(() => {
912
917
  }, ["prevent"]))
913
918
  },
914
919
  [
915
- Y(Be, {
920
+ I(He, {
916
921
  "show-close-icon": !0,
917
- text: p(i),
918
- onClose: p(H)
922
+ text: d(l),
923
+ onClose: d(B)
919
924
  }, null, 8, ["text", "onClose"]),
920
- d(
925
+ p(
921
926
  "span",
922
927
  Ft,
923
- E(p(y)("想对选中的文本做什么")),
928
+ E(d(k)("想对选中的文本做什么")),
924
929
  1
925
930
  /* TEXT */
926
931
  ),
927
- Y(It, {
932
+ I(At, {
928
933
  shortcuts: r.shortcuts,
929
- onSelect: M
934
+ onSelect: w
930
935
  }, null, 8, ["shortcuts"])
931
936
  ],
932
937
  34
933
938
  /* CLASS, NEED_HYDRATION */
934
939
  )) : T("v-if", !0),
935
- d("section", _t, [
936
- Y(Dt, {
940
+ p("section", _t, [
941
+ I(Dt, {
937
942
  value: g.value,
938
- "onUpdate:value": v[3] || (v[3] = (k) => g.value = k),
943
+ "onUpdate:value": v[3] || (v[3] = (y) => g.value = y),
939
944
  placeholder: r.placeholder,
940
945
  prompts: r.prompts,
941
946
  onChangePrompt: x,
942
947
  onChoosePrompt: R,
943
- onEnter: L
948
+ onEnter: M
944
949
  }, null, 8, ["value", "placeholder", "prompts"]),
945
- j((h(), K(p(qe), {
950
+ j((h(), K(d(qe), {
946
951
  class: "ai-operation-button",
947
952
  disabled: r.loading || !g.value,
948
953
  size: "large",
949
954
  theme: "primary",
950
- onClick: L
955
+ onClick: M
951
956
  }, {
952
- default: _(() => [
957
+ default: $(() => [
953
958
  $t,
954
959
  te(
955
- " " + E(p(y)("发送")),
960
+ " " + E(d(k)("发送")),
956
961
  1
957
962
  /* TEXT */
958
963
  )
@@ -960,8 +965,8 @@ const pt = /* @__PURE__ */ q({
960
965
  _: 1
961
966
  /* STABLE */
962
967
  }, 8, ["disabled"])), [
963
- [p(t), {
964
- content: p(y)("内容正在执行中,请执行完成后再发送"),
968
+ [d(t), {
969
+ content: d(k)("内容正在执行中,请执行完成后再发送"),
965
970
  disabled: !r.loading
966
971
  }]
967
972
  ])
@@ -973,7 +978,7 @@ const pt = /* @__PURE__ */ q({
973
978
  /* STYLE */
974
979
  ));
975
980
  }
976
- }), to = /* @__PURE__ */ W(eo, [["__scopeId", "data-v-4abec211"]]), oo = { class: "ai-modal-header-icon" }, no = /* @__PURE__ */ q({
981
+ }), to = /* @__PURE__ */ W(eo, [["__scopeId", "data-v-18736abc"]]), oo = { class: "ai-modal-header-icon" }, no = /* @__PURE__ */ q({
977
982
  __name: "render-modal",
978
983
  props: {
979
984
  headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
@@ -990,17 +995,18 @@ const pt = /* @__PURE__ */ q({
990
995
  logo: { default: "ai-blueking-icon ai-blueking-ai" },
991
996
  name: {},
992
997
  startPosition: { default: () => ({
993
- top: window.innerHeight - 560,
998
+ top: 0,
994
999
  bottom: 0,
995
- left: window.innerWidth - 400,
1000
+ left: window.innerWidth - 450,
996
1001
  right: 0
997
1002
  }) },
998
1003
  models: {},
999
- model: {}
1004
+ model: {},
1005
+ loading: { type: Boolean }
1000
1006
  },
1001
1007
  emits: ["clear", "close", "choose-model"],
1002
1008
  setup(o, { emit: n }) {
1003
- const e = o, a = n, s = he, l = {
1009
+ const e = o, a = n, s = he, i = {
1004
1010
  height: window.innerHeight,
1005
1011
  width: window.innerWidth
1006
1012
  }, t = {
@@ -1008,134 +1014,134 @@ const pt = /* @__PURE__ */ q({
1008
1014
  type: "",
1009
1015
  clientX: 0,
1010
1016
  clientY: 0
1011
- }, i = I((() => {
1012
- var C, D, N, G;
1017
+ }, l = A((() => {
1018
+ var P, D, N, G;
1013
1019
  const c = (O, Ve) => O === void 0 ? Ve : O;
1014
1020
  return {
1015
- top: c((C = e.startPosition) == null ? void 0 : C.top, l.height - e.sizeLimit.height),
1021
+ top: c((P = e.startPosition) == null ? void 0 : P.top, i.height - e.sizeLimit.height),
1016
1022
  bottom: c((D = e.startPosition) == null ? void 0 : D.bottom, 0),
1017
1023
  left: c((N = e.startPosition) == null ? void 0 : N.left, 0),
1018
- right: c((G = e.startPosition) == null ? void 0 : G.right, l.width - e.sizeLimit.width)
1024
+ right: c((G = e.startPosition) == null ? void 0 : G.right, i.width - e.sizeLimit.width)
1019
1025
  };
1020
- })()), H = Q(() => i.value.top <= e.positionLimit.top && i.value.bottom <= e.positionLimit.bottom), V = (c) => {
1026
+ })()), B = Q(() => l.value.top <= e.positionLimit.top && l.value.bottom <= e.positionLimit.bottom), V = (c) => {
1021
1027
  a("choose-model", c);
1022
- }, w = () => {
1023
- document.querySelectorAll("iframe").forEach((C) => {
1024
- C.style.pointerEvents = "none";
1028
+ }, L = () => {
1029
+ document.querySelectorAll("iframe").forEach((P) => {
1030
+ P.style.pointerEvents = "none";
1025
1031
  });
1026
- }, P = () => {
1027
- document.querySelectorAll("iframe").forEach((C) => {
1028
- C.style.pointerEvents = "auto";
1032
+ }, z = () => {
1033
+ document.querySelectorAll("iframe").forEach((P) => {
1034
+ P.style.pointerEvents = "auto";
1029
1035
  });
1030
- }, L = (c) => {
1031
- w(), t.isMove = !0, t.type = "move", t.clientX = c.clientX, t.clientY = c.clientY;
1036
+ }, M = (c) => {
1037
+ L(), t.isMove = !0, t.type = "move", t.clientX = c.clientX, t.clientY = c.clientY;
1032
1038
  }, R = (c) => {
1033
- w(), t.isMove = !0, t.type = "rightDrag", t.clientX = c.clientX;
1039
+ L(), t.isMove = !0, t.type = "rightDrag", t.clientX = c.clientX;
1034
1040
  }, x = (c) => {
1035
- w(), t.isMove = !0, t.type = "leftDrag", t.clientX = c.clientX;
1036
- }, A = (c) => {
1037
- w(), t.isMove = !0, t.type = "topDrag", t.clientY = c.clientY;
1041
+ L(), t.isMove = !0, t.type = "leftDrag", t.clientX = c.clientX;
1042
+ }, Y = (c) => {
1043
+ L(), t.isMove = !0, t.type = "topDrag", t.clientY = c.clientY;
1038
1044
  }, m = (c) => {
1039
- w(), t.isMove = !0, t.type = "bottomDrag", t.clientY = c.clientY;
1040
- }, z = (c) => {
1041
- w(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1045
+ L(), t.isMove = !0, t.type = "bottomDrag", t.clientY = c.clientY;
1046
+ }, C = (c) => {
1047
+ L(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1042
1048
  }, u = (c) => {
1043
- w(), t.isMove = !0, t.type = "topRightDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1049
+ L(), t.isMove = !0, t.type = "topRightDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1044
1050
  }, S = (c) => {
1045
- w(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1046
- }, M = (c) => {
1047
- w(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1051
+ L(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1052
+ }, w = (c) => {
1053
+ L(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = c.clientY, t.clientX = c.clientX;
1048
1054
  }, r = () => {
1049
- t.isMove = !1, P();
1050
- }, v = (c, C) => {
1051
- ["move", "leftDrag"].includes(t.type) && (i.value.left += c), ["move", "rightDrag"].includes(t.type) && (i.value.right -= c), ["move", "topDrag"].includes(t.type) && (i.value.top += C), ["move", "bottomDrag"].includes(t.type) && (i.value.bottom -= C), ["topLeftDrag"].includes(t.type) && (i.value.left += c, i.value.top += C), ["topRightDrag"].includes(t.type) && (i.value.right -= c, i.value.top += C), ["bottomLeftDrag"].includes(t.type) && (i.value.left += c, i.value.bottom -= C), ["bottomRightDrag"].includes(t.type) && (i.value.right -= c, i.value.bottom -= C);
1052
- }, k = (c, C) => {
1053
- const { top: D, bottom: N, left: G, right: O } = i.value;
1054
- (l.width - G - O < e.sizeLimit.width || G < e.positionLimit.left || O < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (i.value.left -= c), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (i.value.right += c)), (l.height - D - N < e.sizeLimit.height || D < e.positionLimit.top || N < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (i.value.top -= C), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (i.value.bottom += C));
1055
+ t.isMove = !1, z();
1056
+ }, v = (c, P) => {
1057
+ ["move", "leftDrag"].includes(t.type) && (l.value.left += c), ["move", "rightDrag"].includes(t.type) && (l.value.right -= c), ["move", "topDrag"].includes(t.type) && (l.value.top += P), ["move", "bottomDrag"].includes(t.type) && (l.value.bottom -= P), ["topLeftDrag"].includes(t.type) && (l.value.left += c, l.value.top += P), ["topRightDrag"].includes(t.type) && (l.value.right -= c, l.value.top += P), ["bottomLeftDrag"].includes(t.type) && (l.value.left += c, l.value.bottom -= P), ["bottomRightDrag"].includes(t.type) && (l.value.right -= c, l.value.bottom -= P);
1058
+ }, y = (c, P) => {
1059
+ const { top: D, bottom: N, left: G, right: O } = l.value;
1060
+ (i.width - G - O < e.sizeLimit.width || G < e.positionLimit.left || O < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (l.value.left -= c), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (l.value.right += c)), (i.height - D - N < e.sizeLimit.height || D < e.positionLimit.top || N < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (l.value.top -= P), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (l.value.bottom += P));
1055
1061
  }, b = (c) => {
1056
1062
  if (!t.isMove)
1057
1063
  return;
1058
1064
  c.preventDefault();
1059
- const C = c.clientX - t.clientX, D = c.clientY - t.clientY;
1060
- v(C, D), k(C, D), t.clientX = c.clientX, t.clientY = c.clientY;
1061
- }, B = () => {
1062
- l.width = window.innerWidth, l.height = window.innerHeight;
1063
- const c = l.width - i.value.left - i.value.right, C = l.height - i.value.top - i.value.bottom, D = Math.max(c, e.sizeLimit.width), N = Math.max(C, e.sizeLimit.height), G = l.width - D, O = l.height - N;
1064
- i.value.top = Math.max(
1065
+ const P = c.clientX - t.clientX, D = c.clientY - t.clientY;
1066
+ v(P, D), y(P, D), t.clientX = c.clientX, t.clientY = c.clientY;
1067
+ }, H = () => {
1068
+ i.width = window.innerWidth, i.height = window.innerHeight;
1069
+ const c = i.width - l.value.left - l.value.right, P = i.height - l.value.top - l.value.bottom, D = Math.max(c, e.sizeLimit.width), N = Math.max(P, e.sizeLimit.height), G = i.width - D, O = i.height - N;
1070
+ l.value.top = Math.max(
1065
1071
  e.positionLimit.top,
1066
- Math.min(i.value.top, O - e.positionLimit.bottom)
1067
- ), i.value.bottom = Math.max(
1072
+ Math.min(l.value.top, O - e.positionLimit.bottom)
1073
+ ), l.value.bottom = Math.max(
1068
1074
  e.positionLimit.bottom,
1069
- Math.min(i.value.bottom, O - i.value.top)
1070
- ), i.value.left = Math.max(
1075
+ Math.min(l.value.bottom, O - l.value.top)
1076
+ ), l.value.left = Math.max(
1071
1077
  e.positionLimit.left,
1072
- Math.min(i.value.left, G - e.positionLimit.right)
1073
- ), i.value.right = Math.max(
1078
+ Math.min(l.value.left, G - e.positionLimit.right)
1079
+ ), l.value.right = Math.max(
1074
1080
  e.positionLimit.right,
1075
- Math.min(i.value.right, G - i.value.left)
1081
+ Math.min(l.value.right, G - l.value.left)
1076
1082
  );
1077
1083
  }, ne = () => {
1078
- i.value.top = e.positionLimit.top, i.value.bottom = e.positionLimit.bottom;
1084
+ l.value.top = e.positionLimit.top, l.value.bottom = e.positionLimit.bottom;
1079
1085
  }, J = () => {
1080
- i.value.top = l.height - e.sizeLimit.height, i.value.bottom = e.positionLimit.bottom;
1086
+ l.value.top = i.height - e.sizeLimit.height, l.value.bottom = e.positionLimit.bottom;
1081
1087
  }, ue = () => {
1082
- a("clear");
1088
+ e.loading || a("clear");
1083
1089
  }, be = () => {
1084
1090
  a("close");
1085
1091
  };
1086
1092
  return je(() => {
1087
- window.addEventListener("mousemove", b, !0), window.addEventListener("mouseup", r), window.addEventListener("resize", B);
1088
- }), ie(() => {
1089
- window.removeEventListener("mousemove", b, !0), window.removeEventListener("mouseup", r), window.removeEventListener("resize", B);
1090
- }), (c, C) => (h(), f(
1093
+ window.addEventListener("mousemove", b, !0), window.addEventListener("mouseup", r), window.addEventListener("resize", H);
1094
+ }), le(() => {
1095
+ window.removeEventListener("mousemove", b, !0), window.removeEventListener("mouseup", r), window.removeEventListener("resize", H);
1096
+ }), (c, P) => (h(), f(
1091
1097
  "section",
1092
1098
  {
1093
1099
  style: F({
1094
- top: i.value.top + "px",
1095
- bottom: i.value.bottom + "px",
1096
- left: i.value.left + "px",
1097
- right: i.value.right + "px"
1100
+ top: l.value.top + "px",
1101
+ bottom: l.value.bottom + "px",
1102
+ left: l.value.left + "px",
1103
+ right: l.value.right + "px"
1098
1104
  }),
1099
1105
  class: "ai-modal"
1100
1106
  },
1101
1107
  [
1102
- d(
1108
+ p(
1103
1109
  "header",
1104
1110
  {
1105
1111
  style: F({
1106
1112
  background: c.headBackground
1107
1113
  }),
1108
1114
  class: "ai-modal-header",
1109
- onMousedown: X(L, ["stop"])
1115
+ onMousedown: X(M, ["stop"])
1110
1116
  },
1111
1117
  [
1112
- d("span", oo, [
1113
- d(
1118
+ p("span", oo, [
1119
+ p(
1114
1120
  "i",
1115
1121
  {
1116
- class: ee(c.logo)
1122
+ class: _(c.logo)
1117
1123
  },
1118
1124
  null,
1119
1125
  2
1120
1126
  /* CLASS */
1121
1127
  ),
1122
1128
  te(
1123
- " " + E(c.name || p(y)("小鲸")) + " ",
1129
+ " " + E(c.name || d(k)("小鲸")) + " ",
1124
1130
  1
1125
1131
  /* TEXT */
1126
1132
  ),
1127
- c.models ? (h(), K(p(Le), {
1133
+ c.models ? (h(), K(d(Le), {
1128
1134
  key: 0,
1129
1135
  class: "ai-modal-header-models",
1130
1136
  "model-value": c.model,
1131
1137
  size: "small",
1132
1138
  onChange: V
1133
1139
  }, {
1134
- default: _(() => [
1140
+ default: $(() => [
1135
1141
  (h(!0), f(
1136
1142
  U,
1137
1143
  null,
1138
- oe(c.models, (D) => (h(), K(p(Le).Option, {
1144
+ oe(c.models, (D) => (h(), K(d(Le).Option, {
1139
1145
  key: D.id,
1140
1146
  name: D.name,
1141
1147
  value: D.id
@@ -1148,8 +1154,8 @@ const pt = /* @__PURE__ */ q({
1148
1154
  /* STABLE */
1149
1155
  }, 8, ["model-value"])) : T("v-if", !0)
1150
1156
  ]),
1151
- d("span", null, [
1152
- H.value ? j((h(), f(
1157
+ p("span", null, [
1158
+ B.value ? j((h(), f(
1153
1159
  "i",
1154
1160
  {
1155
1161
  key: 0,
@@ -1160,8 +1166,8 @@ const pt = /* @__PURE__ */ q({
1160
1166
  512
1161
1167
  /* NEED_PATCH */
1162
1168
  )), [
1163
- [p(s), {
1164
- content: p(y)("向下收缩"),
1169
+ [d(s), {
1170
+ content: d(k)("向下收缩"),
1165
1171
  distance: 20
1166
1172
  }]
1167
1173
  ]) : j((h(), f(
@@ -1175,27 +1181,27 @@ const pt = /* @__PURE__ */ q({
1175
1181
  512
1176
1182
  /* NEED_PATCH */
1177
1183
  )), [
1178
- [p(s), {
1179
- content: p(y)("向上扩展"),
1184
+ [d(s), {
1185
+ content: d(k)("向上扩展"),
1180
1186
  distance: 20
1181
1187
  }]
1182
1188
  ]),
1183
- j(d(
1189
+ j(p(
1184
1190
  "i",
1185
1191
  {
1186
- class: "ai-header-tool ai-blueking-icon ai-blueking-saoba",
1192
+ class: _(["ai-header-tool ai-blueking-icon ai-blueking-saoba", { disabled: c.loading }]),
1187
1193
  onClick: ue
1188
1194
  },
1189
1195
  null,
1190
- 512
1191
- /* NEED_PATCH */
1196
+ 2
1197
+ /* CLASS */
1192
1198
  ), [
1193
- [p(s), {
1194
- content: p(y)("清空聊天记录"),
1199
+ [d(s), {
1200
+ content: c.loading ? d(k)("AI小鲸正在回复,请结束后再清空") : d(k)("清空聊天记录"),
1195
1201
  distance: 20
1196
1202
  }]
1197
1203
  ]),
1198
- j(d(
1204
+ j(p(
1199
1205
  "i",
1200
1206
  {
1201
1207
  class: "ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",
@@ -1205,8 +1211,8 @@ const pt = /* @__PURE__ */ q({
1205
1211
  512
1206
1212
  /* NEED_PATCH */
1207
1213
  ), [
1208
- [p(s), {
1209
- content: p(y)("关闭"),
1214
+ [d(s), {
1215
+ content: d(k)("关闭"),
1210
1216
  distance: 20
1211
1217
  }]
1212
1218
  ])
@@ -1216,7 +1222,7 @@ const pt = /* @__PURE__ */ q({
1216
1222
  /* STYLE, NEED_HYDRATION */
1217
1223
  ),
1218
1224
  Qe(c.$slots, "default", {}, void 0, !0),
1219
- d(
1225
+ p(
1220
1226
  "span",
1221
1227
  {
1222
1228
  class: "drag-line left",
@@ -1226,7 +1232,7 @@ const pt = /* @__PURE__ */ q({
1226
1232
  32
1227
1233
  /* NEED_HYDRATION */
1228
1234
  ),
1229
- d(
1235
+ p(
1230
1236
  "span",
1231
1237
  {
1232
1238
  class: "drag-line right",
@@ -1236,17 +1242,17 @@ const pt = /* @__PURE__ */ q({
1236
1242
  32
1237
1243
  /* NEED_HYDRATION */
1238
1244
  ),
1239
- d(
1245
+ p(
1240
1246
  "span",
1241
1247
  {
1242
1248
  class: "drag-line top",
1243
- onMousedown: X(A, ["stop"])
1249
+ onMousedown: X(Y, ["stop"])
1244
1250
  },
1245
1251
  null,
1246
1252
  32
1247
1253
  /* NEED_HYDRATION */
1248
1254
  ),
1249
- d(
1255
+ p(
1250
1256
  "span",
1251
1257
  {
1252
1258
  class: "drag-line bottom",
@@ -1256,17 +1262,17 @@ const pt = /* @__PURE__ */ q({
1256
1262
  32
1257
1263
  /* NEED_HYDRATION */
1258
1264
  ),
1259
- d(
1265
+ p(
1260
1266
  "span",
1261
1267
  {
1262
1268
  class: "drag-line top-left-corner",
1263
- onMousedown: X(z, ["stop"])
1269
+ onMousedown: X(C, ["stop"])
1264
1270
  },
1265
1271
  null,
1266
1272
  32
1267
1273
  /* NEED_HYDRATION */
1268
1274
  ),
1269
- d(
1275
+ p(
1270
1276
  "span",
1271
1277
  {
1272
1278
  class: "drag-line top-right-corner",
@@ -1276,7 +1282,7 @@ const pt = /* @__PURE__ */ q({
1276
1282
  32
1277
1283
  /* NEED_HYDRATION */
1278
1284
  ),
1279
- d(
1285
+ p(
1280
1286
  "span",
1281
1287
  {
1282
1288
  class: "drag-line bottom-left-corner",
@@ -1286,11 +1292,11 @@ const pt = /* @__PURE__ */ q({
1286
1292
  32
1287
1293
  /* NEED_HYDRATION */
1288
1294
  ),
1289
- d(
1295
+ p(
1290
1296
  "span",
1291
1297
  {
1292
1298
  class: "drag-line bottom-right-corner",
1293
- onMousedown: X(M, ["stop"])
1299
+ onMousedown: X(w, ["stop"])
1294
1300
  },
1295
1301
  null,
1296
1302
  32
@@ -1301,61 +1307,62 @@ const pt = /* @__PURE__ */ q({
1301
1307
  /* STYLE */
1302
1308
  ));
1303
1309
  }
1304
- }), so = /* @__PURE__ */ W(no, [["__scopeId", "data-v-05ba2d4a"]]), ao = (o) => (re("data-v-fb4bdb25"), o = o(), ce(), o), lo = { class: "popup-content" }, io = /* @__PURE__ */ ao(() => /* @__PURE__ */ d(
1310
+ }), so = /* @__PURE__ */ W(no, [["__scopeId", "data-v-e3958b72"]]), ao = (o) => (re("data-v-15c2ca3e"), o = o(), ce(), o), io = { class: "popup-content" }, lo = /* @__PURE__ */ ao(() => /* @__PURE__ */ p(
1305
1311
  "i",
1306
1312
  { class: "ai-blueking-icon ai-blueking-ai" },
1307
1313
  null,
1308
1314
  -1
1309
1315
  /* HOISTED */
1310
1316
  )), ro = [
1311
- io
1317
+ lo
1312
1318
  ], co = { class: "shortcut-buttons" }, uo = ["onClick"], po = { class: "btn-text" }, ho = /* @__PURE__ */ q({
1313
1319
  __name: "render-popup",
1314
1320
  emits: ["click", "shortcutClick"],
1315
1321
  setup(o, { emit: n }) {
1316
- const { enablePopup: e } = me(), { isIconVisible: a, iconPosition: s, selectedText: l, clearSelection: t, popupRef: g } = ge(e), i = fe, H = n, V = () => {
1317
- H("click"), a.value = !1;
1318
- }, w = (P) => {
1322
+ const { enablePopup: e } = me(), { isIconVisible: a, iconPosition: s, selectedText: i, clearSelection: t, popupRef: g } = ge(e), l = fe, B = n, V = () => {
1323
+ B("click"), a.value = !1;
1324
+ }, L = (z) => {
1319
1325
  try {
1320
- const L = ve(P.prompt, l.value);
1321
- H("shortcutClick", {
1322
- cite: l.value,
1323
- content: P.label,
1324
- prompt: L
1326
+ const M = ve(z.prompt, i.value);
1327
+ B("shortcutClick", {
1328
+ cite: i.value,
1329
+ content: z.label,
1330
+ type: z.key,
1331
+ prompt: M
1325
1332
  }), t(), a.value = !1;
1326
- } catch (L) {
1327
- console.error("处理快捷按钮点击事件时出错:", L);
1333
+ } catch (M) {
1334
+ console.error("处理快捷按钮点击事件时出错:", M);
1328
1335
  }
1329
1336
  };
1330
- return (P, L) => p(a) ? (h(), f(
1337
+ return (z, M) => d(a) ? (h(), f(
1331
1338
  "div",
1332
1339
  {
1333
1340
  key: 0,
1334
1341
  ref_key: "popupRef",
1335
1342
  ref: g,
1336
- style: F(p(s)),
1343
+ style: F(d(s)),
1337
1344
  class: "ai-blueking-render-popup",
1338
- onMousedown: L[0] || (L[0] = X(() => {
1345
+ onMousedown: M[0] || (M[0] = X(() => {
1339
1346
  }, ["prevent"]))
1340
1347
  },
1341
1348
  [
1342
- d("div", lo, [
1349
+ p("div", io, [
1343
1350
  T(" AI图标按钮 "),
1344
- d("div", {
1351
+ p("div", {
1345
1352
  class: "popup-icon-btn",
1346
1353
  onClick: V
1347
1354
  }, ro),
1348
1355
  T(" 快捷按钮组 "),
1349
- d("div", co, [
1356
+ p("div", co, [
1350
1357
  (h(!0), f(
1351
1358
  U,
1352
1359
  null,
1353
- oe(p(i), (R, x) => (h(), f("div", {
1360
+ oe(d(l), (R, x) => (h(), f("div", {
1354
1361
  class: "shortcut-btn",
1355
1362
  key: x,
1356
- onClick: (A) => w(R)
1363
+ onClick: (Y) => L(R)
1357
1364
  }, [
1358
- d(
1365
+ p(
1359
1366
  "span",
1360
1367
  po,
1361
1368
  E(R.label),
@@ -1373,7 +1380,7 @@ const pt = /* @__PURE__ */ q({
1373
1380
  /* STYLE, NEED_HYDRATION */
1374
1381
  )) : T("v-if", !0);
1375
1382
  }
1376
- }), mo = /* @__PURE__ */ W(ho, [["__scopeId", "data-v-fb4bdb25"]]), So = /* @__PURE__ */ q({
1383
+ }), mo = /* @__PURE__ */ W(ho, [["__scopeId", "data-v-15c2ca3e"]]), So = /* @__PURE__ */ q({
1377
1384
  __name: "ai-blueking",
1378
1385
  props: {
1379
1386
  messages: {},
@@ -1400,28 +1407,28 @@ const pt = /* @__PURE__ */ q({
1400
1407
  emits: ["send", "clear", "close", "scroll-load", "stop", "ai-click", "change-prompt", "update:model", "choose-prompt", "update:isShow"],
1401
1408
  setup(o, { expose: n, emit: e }) {
1402
1409
  Ge(Te, o.enablePopup);
1403
- const s = e, l = I(), t = (u) => {
1410
+ const s = e, i = A(), t = (u) => {
1404
1411
  var S;
1405
- (S = l.value) == null || S.setInputMessage(u);
1412
+ (S = i.value) == null || S.setInputMessage(u);
1406
1413
  }, g = () => {
1407
1414
  s("update:isShow", !0);
1408
- }, i = () => {
1415
+ }, l = () => {
1409
1416
  s("clear");
1410
- }, H = () => {
1417
+ }, B = () => {
1411
1418
  s("update:isShow", !1), s("close");
1412
1419
  }, V = (u) => {
1413
1420
  s("update:model", u);
1414
- }, w = (u) => {
1421
+ }, L = (u) => {
1415
1422
  s("send", u);
1416
- }, P = () => {
1423
+ }, z = () => {
1417
1424
  s("stop");
1418
- }, L = () => {
1425
+ }, M = () => {
1419
1426
  s("scroll-load");
1420
1427
  }, R = (u) => {
1421
1428
  s("ai-click", u);
1422
1429
  }, x = (u) => {
1423
1430
  s("choose-prompt", u);
1424
- }, A = (u) => {
1431
+ }, Y = (u) => {
1425
1432
  s("change-prompt", u);
1426
1433
  }, m = (u) => {
1427
1434
  s("stop"), s("update:isShow", !0), s("send", u);
@@ -1430,14 +1437,14 @@ const pt = /* @__PURE__ */ q({
1430
1437
  setInputMessage: t,
1431
1438
  quickActions: (u, S) => {
1432
1439
  s("stop"), s("update:isShow", !0);
1433
- const M = fe.find((b) => b.key === u);
1434
- if (!M)
1440
+ const w = fe.find((b) => b.key === u);
1441
+ if (!w)
1435
1442
  return;
1436
- const r = M.prompt, v = M.label, k = ve(r, S);
1437
- k && s("send", {
1443
+ const r = w.prompt, v = w.label, y = ve(r, S);
1444
+ y && s("send", {
1438
1445
  cite: S,
1439
1446
  // 原始内容,用于引用
1440
- prompt: k,
1447
+ prompt: y,
1441
1448
  // 处理后的完整提示语
1442
1449
  content: v
1443
1450
  });
@@ -1446,8 +1453,9 @@ const pt = /* @__PURE__ */ q({
1446
1453
  U,
1447
1454
  null,
1448
1455
  [
1449
- j(Y(so, {
1456
+ j(I(so, {
1450
1457
  "head-background": u.headBackground,
1458
+ loading: u.loading,
1451
1459
  logo: u.logo,
1452
1460
  model: u.model,
1453
1461
  models: u.models,
@@ -1456,13 +1464,13 @@ const pt = /* @__PURE__ */ q({
1456
1464
  "size-limit": u.sizeLimit,
1457
1465
  "start-position": u.startPosition,
1458
1466
  onChooseModel: V,
1459
- onClear: i,
1460
- onClose: H
1467
+ onClear: l,
1468
+ onClose: B
1461
1469
  }, {
1462
- default: _(() => [
1463
- Y(to, {
1470
+ default: $(() => [
1471
+ I(to, {
1464
1472
  ref_key: "contentRef",
1465
- ref: l,
1473
+ ref: i,
1466
1474
  alert: u.alert,
1467
1475
  background: u.background,
1468
1476
  loading: u.loading,
@@ -1474,16 +1482,16 @@ const pt = /* @__PURE__ */ q({
1474
1482
  shortcuts: u.shortcuts,
1475
1483
  "user-photo": u.userPhoto,
1476
1484
  onAiClick: R,
1477
- onChangePrompt: A,
1485
+ onChangePrompt: Y,
1478
1486
  onChoosePrompt: x,
1479
- onScrollLoad: L,
1480
- onSend: w,
1481
- onStop: P
1487
+ onScrollLoad: M,
1488
+ onSend: L,
1489
+ onStop: z
1482
1490
  }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "shortcuts", "user-photo"])
1483
1491
  ]),
1484
1492
  _: 1
1485
1493
  /* STABLE */
1486
- }, 8, ["head-background", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1494
+ }, 8, ["head-background", "loading", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1487
1495
  [Ce, u.isShow]
1488
1496
  ]),
1489
1497
  u.enablePopup !== !1 ? (h(), K(mo, {
@@ -1512,23 +1520,23 @@ const go = (o) => {
1512
1520
  </span>
1513
1521
  `;
1514
1522
  return o.forEach((e) => {
1515
- const { file_path: a, path: s } = e.metadata, l = a.split("/").pop();
1523
+ const { file_path: a, path: s } = e.metadata, i = a.split("/").pop();
1516
1524
  n += `<a href="${s}" target="_blank" class="knowledge-link">
1517
- ${l}
1525
+ ${i}
1518
1526
  <i class="ai-blueking-icon ai-blueking-cc-jump-link"></i>
1519
1527
  </a>
1520
1528
  `;
1521
1529
  }), n += "</section>", n;
1522
1530
  };
1523
1531
  class Co {
1524
- constructor(n, e, a, s, l) {
1532
+ constructor(n, e, a, s, i) {
1525
1533
  Z(this, "controllerMap");
1526
1534
  Z(this, "handleEnd");
1527
1535
  Z(this, "handleError");
1528
1536
  Z(this, "handleReceiveMessage");
1529
1537
  Z(this, "handleStart");
1530
1538
  Z(this, "url");
1531
- this.url = n, this.handleStart = e, this.handleReceiveMessage = a, this.handleEnd = s, this.handleError = l, this.controllerMap = {};
1539
+ this.url = n, this.handleStart = e, this.handleReceiveMessage = a, this.handleEnd = s, this.handleError = i, this.controllerMap = {};
1532
1540
  }
1533
1541
  stop(n) {
1534
1542
  var e, a;
@@ -1546,53 +1554,53 @@ class Co {
1546
1554
  mode: "cors",
1547
1555
  credentials: "include",
1548
1556
  body: JSON.stringify(n)
1549
- }).then(async (l) => {
1550
- const t = l.body.pipeThrough(new window.TextDecoderStream()).getReader();
1557
+ }).then(async (i) => {
1558
+ const t = i.body.pipeThrough(new window.TextDecoderStream()).getReader();
1551
1559
  let g = "";
1552
1560
  for (; ; )
1553
1561
  try {
1554
- const { value: i, done: H } = await t.read();
1555
- if (!l.ok) {
1556
- this.handleError(i || l.statusText, l.status, e);
1562
+ const { value: l, done: B } = await t.read();
1563
+ if (!i.ok) {
1564
+ this.handleError(l || i.statusText, i.status, e);
1557
1565
  break;
1558
1566
  }
1559
- if (H) {
1567
+ if (B) {
1560
1568
  this.handleEnd(e);
1561
1569
  break;
1562
1570
  }
1563
- g += i, g.toString().split(`
1564
- `).forEach((w) => {
1565
- const P = w.replace("data:", "").trim();
1566
- if (Fe(P)) {
1567
- const { event: L, content: R, cover: x, documents: A, result: m, code: z, message: u } = JSON.parse(P);
1568
- if (m === !1 || l.status !== 200) {
1569
- this.handleError(u, z, e);
1571
+ g += l, g.toString().split(`
1572
+ `).forEach((L) => {
1573
+ const z = L.replace("data:", "").trim();
1574
+ if (Fe(z)) {
1575
+ const { event: M, content: R, cover: x, documents: Y, result: m, code: C, message: u } = JSON.parse(z);
1576
+ if (m === !1 || i.status !== 200) {
1577
+ this.handleError(u, C, e);
1570
1578
  return;
1571
1579
  }
1572
- switch (L) {
1580
+ switch (M) {
1573
1581
  case "text":
1574
1582
  this.handleReceiveMessage(R, e);
1575
1583
  break;
1576
1584
  case "reference_doc":
1577
- const S = go(A);
1585
+ const S = go(Y);
1578
1586
  this.handleReceiveMessage(S, e);
1579
1587
  break;
1580
1588
  case "done":
1581
1589
  this.handleEnd(e, x ? R : "");
1582
1590
  break;
1583
1591
  case "error":
1584
- this.handleError(u, z, e);
1592
+ this.handleError(u, C, e);
1585
1593
  break;
1586
1594
  }
1587
1595
  } else
1588
- g = w;
1596
+ g = L;
1589
1597
  });
1590
- } catch (i) {
1591
- (i == null ? void 0 : i.code) !== 20 && this.handleError(i.message, i.code, e);
1598
+ } catch (l) {
1599
+ (l == null ? void 0 : l.code) !== 20 && this.handleError(l.message, l.code, e);
1592
1600
  break;
1593
1601
  }
1594
- }).catch((l) => {
1595
- (l == null ? void 0 : l.code) !== 20 && this.handleError(l.message, l.code, e);
1602
+ }).catch((i) => {
1603
+ (i == null ? void 0 : i.code) !== 20 && this.handleError(i.message, i.code, e);
1596
1604
  }), await this.handleStart(e);
1597
1605
  }
1598
1606
  }