@blueking/ai-blueking 0.4.0 → 0.4.2

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,159 +1,159 @@
1
1
  var Re = Object.defineProperty;
2
- var Ae = (o, n, e) => n in o ? Re(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
- var X = (o, n, e) => (Ae(o, typeof n != "symbol" ? n + "" : n, e), e);
4
- import { Popover as De, Input as ke, Exception as Ie, clickoutside as Ye, bkTooltips as pe, Tag as Xe, Alert as ye, Button as Fe, Message as we, Select as Me, provideGlobalConfig as qe } from "bkui-vue";
5
- import { inject as Ue, ref as I, onMounted as ie, onBeforeUnmount as ae, defineComponent as q, withDirectives as j, openBlock as p, createElementBlock as f, createElementVNode as h, toDisplayString as A, unref as u, createCommentVNode as P, vShow as Se, createTextVNode as te, pushScopeId as ce, popScopeId as re, computed as Q, normalizeStyle as Z, normalizeClass as _, createVNode as D, Fragment as U, watch as xe, createBlock as K, withCtx as $, renderList as oe, nextTick as Ce, mergeProps as ze, normalizeProps as Ke, withModifiers as F, onBeforeMount as We, renderSlot as je, provide as Qe } from "vue";
2
+ var Ae = (o, l, e) => l in o ? Re(o, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[l] = e;
3
+ var X = (o, l, e) => (Ae(o, typeof l != "symbol" ? l + "" : l, e), e);
4
+ import { Popover as De, Input as ke, Exception as Ie, clickoutside as Ye, bkTooltips as me, Tag as Xe, Alert as ye, Button as qe, Message as we, Select as Me, provideGlobalConfig as Fe } from "bkui-vue";
5
+ import { inject as Ue, ref as Y, onMounted as ae, onBeforeUnmount as ce, defineComponent as F, withDirectives as j, openBlock as p, createElementBlock as f, createElementVNode as h, toDisplayString as A, unref as u, createCommentVNode as P, vShow as Se, createTextVNode as te, pushScopeId as re, popScopeId as de, computed as Q, normalizeStyle as Z, normalizeClass as _, createVNode as I, Fragment as U, watch as xe, createBlock as K, withCtx as $, renderList as oe, nextTick as Ce, mergeProps as ze, normalizeProps as Ke, withModifiers as q, onBeforeMount as We, renderSlot as je, provide as Qe } from "vue";
6
6
  import se from "dayjs";
7
7
  import Le from "highlight.js";
8
8
  import Ge from "markdown-it";
9
9
  import Oe from "markdown-it-code-copy";
10
10
  import { Close as Je } from "bkui-vue/lib/icon";
11
11
  const He = "enablePopup";
12
- function me() {
12
+ function ge() {
13
13
  return {
14
14
  enablePopup: Ue(He, !0)
15
15
  };
16
16
  }
17
17
  function Be() {
18
- const o = I(!1), n = () => {
18
+ const o = Y(!1), l = () => {
19
19
  const i = document.querySelector(".ai-blueking-messages");
20
20
  i.scrollTop = i.scrollHeight;
21
21
  }, e = (i) => {
22
22
  const t = i.target;
23
23
  o.value = t.scrollTop < t.scrollHeight - t.clientHeight - 20;
24
- }, l = () => {
24
+ }, s = () => {
25
25
  const i = document.querySelector(".ai-blueking-messages");
26
26
  i == null || i.addEventListener("scroll", e, { passive: !0 });
27
- }, s = () => {
27
+ }, n = () => {
28
28
  const i = document.querySelector(".ai-blueking-messages");
29
29
  i == null || i.removeEventListener("scroll", e);
30
30
  };
31
- return ie(l), ae(s), {
31
+ return ae(s), ce(n), {
32
32
  isShow: o,
33
- scrollToBottom: n
33
+ scrollToBottom: l
34
34
  };
35
35
  }
36
- const ee = I(""), ue = I(!1), he = {
36
+ const ee = Y(""), he = Y(!1), pe = {
37
37
  width: 80,
38
38
  height: 34,
39
39
  offset: 15,
40
40
  debounceTime: 300
41
41
  };
42
- function ge(o) {
43
- const n = I(!1), e = I({ top: "0px", left: "0px" });
44
- let l, s = null;
45
- const i = I(null);
42
+ function ve(o) {
43
+ const l = Y(!1), e = Y({ top: "0px", left: "0px" });
44
+ let s, n = null;
45
+ const i = Y(null);
46
46
  let t = !1, g = null;
47
47
  const c = (m) => {
48
48
  g = { x: m.clientX, y: m.clientY };
49
- }, L = (m) => {
50
- s = m, g && (t = Math.sqrt(
49
+ }, z = (m) => {
50
+ n = 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
53
  }, E = (m, S) => {
54
- const H = window.innerWidth, { width: d, height: k, offset: a } = he;
55
- let v = m + window.scrollX - d / 2;
56
- v = Math.max(a, Math.min(v, H - d - a));
54
+ const H = window.innerWidth, { width: r, height: k, offset: a } = pe;
55
+ let v = m + window.scrollX - r / 2;
56
+ v = Math.max(a, Math.min(v, H - r - a));
57
57
  let w = S + window.scrollY - k - a;
58
58
  return S <= k + a && (w = S + window.scrollY + a), {
59
59
  top: `${w}px`,
60
60
  left: `${v}px`
61
61
  };
62
62
  }, M = (m) => {
63
- const S = window.innerWidth, { width: H, height: d, offset: k } = he;
63
+ const S = window.innerWidth, { width: H, height: r, offset: k } = pe;
64
64
  let a = m.left + window.scrollX + m.width / 2 - H / 2;
65
65
  a = Math.max(k, Math.min(a, S - H - k));
66
- let v = m.top + window.scrollY - d - k;
67
- return m.top <= d + k && (v = m.bottom + window.scrollY + k), {
66
+ let v = m.top + window.scrollY - r - k;
67
+ return m.top <= r + k && (v = m.bottom + window.scrollY + k), {
68
68
  top: `${v}px`,
69
69
  left: `${a}px`
70
70
  };
71
- }, C = () => {
72
- clearTimeout(l), l = setTimeout(() => {
73
- var d;
71
+ }, T = () => {
72
+ clearTimeout(s), s = setTimeout(() => {
73
+ var r;
74
74
  const m = window.getSelection();
75
75
  if (!(m != null && m.toString().trim())) {
76
- z();
76
+ L();
77
77
  return;
78
78
  }
79
79
  const S = m.getRangeAt(0);
80
- if ((d = S.commonAncestorContainer.parentElement) != null && d.closest(".ai-modal")) {
81
- z();
80
+ if ((r = S.commonAncestorContainer.parentElement) != null && r.closest(".ai-modal")) {
81
+ L();
82
82
  return;
83
83
  }
84
- ue.value = !1, ee.value = m.toString().trim();
84
+ he.value = !1, ee.value = m.toString().trim();
85
85
  const H = document.activeElement;
86
86
  if ((H == null ? void 0 : H.tagName) === "TEXTAREA") {
87
- if (!s) {
88
- z();
87
+ if (!n) {
88
+ L();
89
89
  return;
90
90
  }
91
- const { clientX: k, clientY: a } = s;
92
- e.value = E(k, a), n.value = !0, s = null;
91
+ const { clientX: k, clientY: a } = n;
92
+ e.value = E(k, a), l.value = !0, n = null;
93
93
  } else {
94
94
  const k = S.getBoundingClientRect();
95
95
  if (!k.width || !k.height) {
96
- z();
96
+ L();
97
97
  return;
98
98
  }
99
- e.value = M(k), n.value = !0;
99
+ e.value = M(k), l.value = !0;
100
100
  }
101
- }, he.debounceTime);
102
- }, z = () => {
103
- n.value = !1, ue.value || (ee.value = "");
104
- }, T = (m) => {
101
+ }, pe.debounceTime);
102
+ }, L = () => {
103
+ l.value = !1, he.value || (ee.value = "");
104
+ }, C = (m) => {
105
105
  var k, a;
106
- const S = m.target, H = (k = S.classList) == null ? void 0 : k.contains("ai-blueking-tag-text"), d = (a = i.value) == null ? void 0 : a.contains(S);
106
+ const S = m.target, H = (k = S.classList) == null ? void 0 : k.contains("ai-blueking-tag-text"), r = (a = i.value) == null ? void 0 : a.contains(S);
107
107
  if (!(H || !t)) {
108
108
  if (t) {
109
109
  m.preventDefault(), m.stopPropagation(), t = !1;
110
110
  return;
111
111
  }
112
- d || (z(), V());
112
+ r || (L(), V());
113
113
  }
114
114
  }, V = () => {
115
115
  const m = window.getSelection();
116
116
  m && m.removeAllRanges(), ee.value = "";
117
- }, Y = (m) => {
117
+ }, D = (m) => {
118
118
  ee.value = m;
119
119
  };
120
- return ie(() => {
121
- o && (document.addEventListener("selectionchange", C), document.addEventListener("mousedown", c), document.addEventListener("mouseup", L), document.addEventListener("click", T, !0));
122
- }), ae(() => {
123
- o && (document.removeEventListener("selectionchange", C), document.removeEventListener("mousedown", c), document.removeEventListener("mouseup", L), document.removeEventListener("click", T, !0)), clearTimeout(l);
120
+ return ae(() => {
121
+ o && (document.addEventListener("selectionchange", T), document.addEventListener("mousedown", c), document.addEventListener("mouseup", z), document.addEventListener("click", C, !0));
122
+ }), ce(() => {
123
+ o && (document.removeEventListener("selectionchange", T), document.removeEventListener("mousedown", c), document.removeEventListener("mouseup", z), document.removeEventListener("click", C, !0)), clearTimeout(s);
124
124
  }), {
125
- isIconVisible: n,
125
+ isIconVisible: l,
126
126
  iconPosition: e,
127
127
  selectedText: ee,
128
- hideIcon: z,
128
+ hideIcon: L,
129
129
  clearSelection: V,
130
- setSelection: Y,
131
- lockSelectedText: ue,
130
+ setSelection: D,
131
+ lockSelectedText: he,
132
132
  popupRef: i
133
133
  };
134
134
  }
135
135
  const Ne = (o) => {
136
- const n = document.cookie.match(new RegExp(`(^| )${o}=([^;]*)(;|$)`));
137
- return n ? n[2] : "";
136
+ const l = document.cookie.match(new RegExp(`(^| )${o}=([^;]*)(;|$)`));
137
+ return l ? l[2] : "";
138
138
  }, Ze = (o) => {
139
139
  try {
140
140
  return JSON.parse(o), !0;
141
141
  } catch {
142
142
  return !1;
143
143
  }
144
- }, _e = (o, n = 200) => {
144
+ }, _e = (o, l = 200) => {
145
145
  let e = !0;
146
- return function(l) {
146
+ return function(s) {
147
147
  if (!e)
148
148
  return !1;
149
149
  e = !1, setTimeout(() => {
150
- o(l), e = !0;
151
- }, n);
150
+ o(s), e = !0;
151
+ }, l);
152
152
  };
153
- }, ve = (o, n) => o.replace(/\{\{\s*SELECTED_TEXT\s*\}\}/g, n || "");
153
+ }, fe = (o, l) => o.replace(/\{\{\s*SELECTED_TEXT\s*\}\}/g, l || "");
154
154
  function $e(o) {
155
- const n = Math.floor(o / 36e5), e = Math.floor(o % 36e5 / 6e4), l = Math.floor(o % 6e4 / 1e3), s = o % 1e3, i = [];
156
- return n > 0 && i.push(`${n}h`), e > 0 && i.push(`${e}min`), l > 0 && i.push(`${l}s`), s > 0 && i.push(`${s.toFixed(2)}ms`), i.join(" ");
155
+ const l = Math.floor(o / 36e5), e = Math.floor(o % 36e5 / 6e4), s = Math.floor(o % 6e4 / 1e3), n = o % 1e3, i = [];
156
+ return l > 0 && i.push(`${l}h`), e > 0 && i.push(`${e}min`), s > 0 && i.push(`${s}s`), n > 0 && i.push(`${n.toFixed(2)}ms`), i.join(" ");
157
157
  }
158
158
  const et = Ne("blueking_language") || "zh-cn", tt = {
159
159
  小鲸: "BK GPT",
@@ -190,7 +190,7 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
190
190
  `,
191
191
  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.`,
192
192
  翻译: "translate",
193
- 解释: "explan",
193
+ 解释: "explanation",
194
194
  "AI小鲸正在回复,请结束后再清空": "AI BK GPT is executing, please clear after completion"
195
195
  }, ot = {
196
196
  translateShortcut: `你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
@@ -199,7 +199,7 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
199
199
  {{ SELECTED_TEXT }}
200
200
  '''`,
201
201
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
202
- }, y = (o) => et !== "en" ? ot[o] || o : tt[o] || o, fe = [
202
+ }, y = (o) => et !== "en" ? ot[o] || o : tt[o] || o, ie = [
203
203
  {
204
204
  label: y("翻译"),
205
205
  prompt: y("translateShortcut"),
@@ -210,7 +210,7 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
210
210
  prompt: y("explanationShortcut"),
211
211
  key: "explanation"
212
212
  }
213
- ], nt = { class: "ai-cite" }, lt = { class: "ai-cite-text" }, st = { class: "ai-cite-tips" }, it = /* @__PURE__ */ q({
213
+ ], nt = { class: "ai-cite" }, lt = { class: "ai-cite-text" }, st = { class: "ai-cite-tips" }, it = /* @__PURE__ */ F({
214
214
  __name: "ai-cite",
215
215
  props: {
216
216
  text: {},
@@ -218,14 +218,14 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
218
218
  },
219
219
  emits: ["close"],
220
220
  setup(o) {
221
- return (n, e) => j((p(), f(
221
+ return (l, e) => j((p(), f(
222
222
  "section",
223
223
  nt,
224
224
  [
225
225
  h(
226
226
  "span",
227
227
  lt,
228
- A(n.text),
228
+ A(l.text),
229
229
  1
230
230
  /* TEXT */
231
231
  ),
@@ -236,37 +236,37 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
236
236
  1
237
237
  /* TEXT */
238
238
  ),
239
- n.showCloseIcon ? (p(), f("i", {
239
+ l.showCloseIcon ? (p(), f("i", {
240
240
  key: 0,
241
241
  class: "ai-blueking-icon ai-blueking-close-circle-fill",
242
- onClick: e[0] || (e[0] = (l) => n.$emit("close"))
242
+ onClick: e[0] || (e[0] = (s) => l.$emit("close"))
243
243
  })) : P("v-if", !0)
244
244
  ],
245
245
  512
246
246
  /* NEED_PATCH */
247
247
  )), [
248
- [Se, n.text]
248
+ [Se, l.text]
249
249
  ]);
250
250
  }
251
- }), W = (o, n) => {
251
+ }), W = (o, l) => {
252
252
  const e = o.__vccOpts || o;
253
- for (const [l, s] of n)
254
- e[l] = s;
253
+ for (const [s, n] of l)
254
+ e[s] = n;
255
255
  return e;
256
- }, Pe = /* @__PURE__ */ W(it, [["__scopeId", "data-v-3fd96961"]]), at = (o) => (ce("data-v-a8d839da"), o = o(), re(), o), ct = /* @__PURE__ */ at(() => /* @__PURE__ */ h(
256
+ }, Pe = /* @__PURE__ */ W(it, [["__scopeId", "data-v-3fd96961"]]), at = (o) => (re("data-v-a8d839da"), o = o(), de(), o), ct = /* @__PURE__ */ at(() => /* @__PURE__ */ h(
257
257
  "i",
258
258
  { class: "ai-blueking-icon ai-blueking-xiangxia-2" },
259
259
  null,
260
260
  -1
261
261
  /* HOISTED */
262
- )), rt = /* @__PURE__ */ q({
262
+ )), rt = /* @__PURE__ */ F({
263
263
  __name: "render-back",
264
264
  setup(o) {
265
- const { isShow: n, scrollToBottom: e } = Be();
266
- return (l, s) => u(n) ? (p(), f("span", {
265
+ const { isShow: l, scrollToBottom: e } = Be();
266
+ return (s, n) => u(l) ? (p(), f("span", {
267
267
  key: 0,
268
268
  class: "ai-blueking-render-back",
269
- onClick: s[0] || (s[0] = //@ts-ignore
269
+ onClick: n[0] || (n[0] = //@ts-ignore
270
270
  (...i) => u(e) && u(e)(...i))
271
271
  }, [
272
272
  ct,
@@ -278,32 +278,32 @@ const et = Ne("blueking_language") || "zh-cn", tt = {
278
278
  ])) : P("v-if", !0);
279
279
  }
280
280
  }), dt = /* @__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/+XC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/ernJ5QWnGFJSICUlxT3viBbiNjNaiKqvx6lw4YksMTEKTNKz0MugBTjt4HZ6QnxGI5Rb7Zw7kkl8UiyW8ABl9+iay1bspDCrSLovWni9YM0cYNQc5erUknwkU9N4y+Bg3uhWolhuppxzSkrdb35RFFx7Yqv6yRTPfWWkCOFemKZF2NyMQav6gqVLLKhJpvEpElfRGE+QTAplSTnfz9rEps+30Sm5PcNfulNRlTy8IenLYBRuowmj9F1dDmlJqOOkxxHMCzTwyf2NRIGa1/RrB0Zf7XUDpMDxAUn+e/YJLdZkoL/wXNHVr05XdGlgNKOt+2ATqfO2SGGsjZg+UGKhaS6lqmXBhV7bUq7BRiHEN043G8Y191z+Vnk+10MEfwpAPqaAWAKGET6XvH2WpjXVnAzRDPRAq8Ulb7IAwQS2i+WkHUgnoVUcIdEW3J779DyXvAkOCzdbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=", ht = (o) => {
281
- var n = o.renderer.rules.link_open || function(e, l, s, i, t) {
282
- return t.renderToken(e, l, s);
281
+ var l = o.renderer.rules.link_open || function(e, s, n, i, t) {
282
+ return t.renderToken(e, s, n);
283
283
  };
284
- o.renderer.rules.link_open = function(e, l, s, i, t) {
285
- return e[l].attrSet("target", "_blank"), n(e, l, s, i, t);
284
+ o.renderer.rules.link_open = function(e, s, n, i, t) {
285
+ return e[s].attrSet("target", "_blank"), l(e, s, n, i, t);
286
286
  };
287
287
  };
288
288
  var Te = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.Ignore = "ignore", o.System = "system", o.User = "user", o))(Te || {}), le = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(le || {});
289
- const pt = /* @__PURE__ */ q({
289
+ const pt = /* @__PURE__ */ F({
290
290
  __name: "ai-avatar",
291
291
  props: {
292
292
  size: { default: 36 }
293
293
  },
294
294
  setup(o) {
295
- const n = o, e = Q(() => ({
296
- minWidth: `${n.size}px`,
297
- maxWidth: `${n.size}px`,
298
- minHeight: `${n.size}px`,
299
- maxHeight: `${n.size}px`,
300
- padding: `${n.size * 0.208}px ${n.size * 0.222}px ${n.size * 0.194}px ${n.size * 0.18}px`
295
+ const l = o, e = Q(() => ({
296
+ minWidth: `${l.size}px`,
297
+ maxWidth: `${l.size}px`,
298
+ minHeight: `${l.size}px`,
299
+ maxHeight: `${l.size}px`,
300
+ padding: `${l.size * 0.208}px ${l.size * 0.222}px ${l.size * 0.194}px ${l.size * 0.18}px`
301
301
  // 保持原比例
302
- })), l = Q(() => ({
303
- fontSize: `${n.size * 0.611}px`
302
+ })), s = Q(() => ({
303
+ fontSize: `${l.size * 0.611}px`
304
304
  // 保持原比例 22/36
305
305
  }));
306
- return (s, i) => (p(), f(
306
+ return (n, i) => (p(), f(
307
307
  "span",
308
308
  {
309
309
  style: Z(e.value),
@@ -313,7 +313,7 @@ const pt = /* @__PURE__ */ q({
313
313
  h(
314
314
  "i",
315
315
  {
316
- style: Z(l.value),
316
+ style: Z(s.value),
317
317
  class: "ai-blueking-icon ai-blueking-ai"
318
318
  },
319
319
  null,
@@ -351,14 +351,14 @@ const pt = /* @__PURE__ */ q({
351
351
  ], Ct = {
352
352
  key: 3,
353
353
  class: "message-wrap"
354
- }, Ht = ["innerHTML"], Bt = /* @__PURE__ */ q({
354
+ }, Ht = ["innerHTML"], Bt = /* @__PURE__ */ F({
355
355
  __name: "render-message",
356
356
  props: {
357
357
  message: {},
358
358
  userPhoto: { default: ut }
359
359
  },
360
360
  setup(o) {
361
- const n = new Ge({
361
+ const l = new Ge({
362
362
  html: !0,
363
363
  highlight: function(t, g) {
364
364
  if (g && Le.getLanguage(g))
@@ -371,7 +371,7 @@ const pt = /* @__PURE__ */ q({
371
371
  }).use(Oe, {
372
372
  iconClass: "ai-blueking-icon ai-blueking-copy",
373
373
  buttonClass: "ai-blueking-copy-button"
374
- }).use(ht), e = o, l = Q(() => {
374
+ }).use(ht), e = o, s = Q(() => {
375
375
  var g;
376
376
  const t = {
377
377
  error: "ai-blueking-icon ai-blueking-warning-circle-fill",
@@ -379,7 +379,7 @@ const pt = /* @__PURE__ */ q({
379
379
  success: ""
380
380
  };
381
381
  return (g = e.message) != null && g.status ? t[e.message.status] : "";
382
- }), s = Q(() => e.message.content ? n.render(e.message.content) : ""), i = Q(() => {
382
+ }), n = Q(() => e.message.content ? l.render(e.message.content) : ""), i = Q(() => {
383
383
  const t = se(e.message.time), g = se();
384
384
  return e.message.time ? g.isSame(t, "year") ? t.format("MM-DD HH:mm:ss") : t.format("YYYY-MM-DD HH:mm:ss") : "";
385
385
  });
@@ -390,7 +390,7 @@ const pt = /* @__PURE__ */ q({
390
390
  },
391
391
  [
392
392
  t.message.cite ? (p(), f("div", gt, [
393
- D(Pe, {
393
+ I(Pe, {
394
394
  text: t.message.cite
395
395
  }, null, 8, ["text"])
396
396
  ])) : P("v-if", !0),
@@ -409,7 +409,7 @@ const pt = /* @__PURE__ */ q({
409
409
  )) : P("v-if", !0),
410
410
  h("span", {
411
411
  class: "markdown-message",
412
- innerHTML: s.value
412
+ innerHTML: n.value
413
413
  }, null, 8, kt)
414
414
  ]),
415
415
  h("span", yt, [
@@ -422,7 +422,7 @@ const pt = /* @__PURE__ */ q({
422
422
  U,
423
423
  { key: 1 },
424
424
  [
425
- D(mt),
425
+ I(mt),
426
426
  h("p", Mt, [
427
427
  i.value ? (p(), f(
428
428
  "span",
@@ -431,11 +431,11 @@ const pt = /* @__PURE__ */ q({
431
431
  1
432
432
  /* TEXT */
433
433
  )) : P("v-if", !0),
434
- l.value ? (p(), f(
434
+ s.value ? (p(), f(
435
435
  "i",
436
436
  {
437
437
  key: 1,
438
- class: _(l.value)
438
+ class: _(s.value)
439
439
  },
440
440
  null,
441
441
  2
@@ -450,7 +450,7 @@ const pt = /* @__PURE__ */ q({
450
450
  /* TEXT */
451
451
  )) : (p(), f("span", {
452
452
  key: 4,
453
- innerHTML: s.value,
453
+ innerHTML: n.value,
454
454
  class: _({
455
455
  "markdown-message": !0,
456
456
  loading: t.message.status === u(le).Loading
@@ -467,7 +467,7 @@ const pt = /* @__PURE__ */ q({
467
467
  /* CLASS */
468
468
  ));
469
469
  }
470
- }), Pt = { class: "prompt-list" }, Tt = { class: "search-group" }, Vt = ["onClick"], Et = { class: "prompt-content" }, Rt = /* @__PURE__ */ q({
470
+ }), Pt = { class: "prompt-list" }, Tt = { class: "search-group" }, Vt = ["onClick"], Et = { class: "prompt-content" }, Rt = /* @__PURE__ */ F({
471
471
  __name: "render-send",
472
472
  props: {
473
473
  prompts: {},
@@ -475,16 +475,16 @@ const pt = /* @__PURE__ */ q({
475
475
  value: {}
476
476
  },
477
477
  emits: ["change-prompt", "update:value", "enter", "choose-prompt"],
478
- setup(o, { emit: n }) {
479
- const e = o, l = n, { enablePopup: s } = me(), i = Ye, t = pe, { selectedText: g, lockSelectedText: c } = ge(s), L = I(""), E = I(40), M = I(), C = I(!1), z = Q(() => {
478
+ setup(o, { emit: l }) {
479
+ const e = o, s = l, { enablePopup: n } = ge(), i = Ye, t = me, { selectedText: g, lockSelectedText: c } = ve(n), z = Y(""), E = Y(40), M = Y(), T = Y(!1), L = Q(() => {
480
480
  var b;
481
- return ((b = e.prompts) == null ? void 0 : b.filter((B) => B.content.includes(L.value))) || [];
482
- }), T = Q(() => {
481
+ return ((b = e.prompts) == null ? void 0 : b.filter((B) => B.content.includes(z.value))) || [];
482
+ }), C = Q(() => {
483
483
  var b;
484
484
  return e.placeholder ? e.placeholder : (b = e.prompts) != null && b.length ? y("您可以键入 “/” 查看更多Prompt") : y("请输入");
485
485
  }), V = (b) => {
486
- l("update:value", b), l("change-prompt", b);
487
- }, Y = () => {
486
+ s("update:value", b), s("change-prompt", b);
487
+ }, D = () => {
488
488
  var b;
489
489
  e.value === "/" && ((b = e.prompts) != null && b.length) ? v() : w();
490
490
  }, m = () => {
@@ -494,10 +494,10 @@ const pt = /* @__PURE__ */ q({
494
494
  (b == null ? void 0 : b.scrollHeight) > 40 && e.value ? E.value = b.scrollHeight <= 300 ? b.scrollHeight : 300 : E.value = 40;
495
495
  });
496
496
  }, S = (b) => {
497
- l("update:value", b.content), l("choose-prompt", b), w(), k();
497
+ s("update:value", b.content), s("choose-prompt", b), w(), k();
498
498
  }, H = (b, B) => {
499
- B.key === "Enter" && !B.shiftKey && (B.preventDefault(), l("enter"));
500
- }, d = () => {
499
+ B.key === "Enter" && !B.shiftKey && (B.preventDefault(), s("enter"));
500
+ }, r = () => {
501
501
  V("");
502
502
  }, k = () => {
503
503
  var B;
@@ -506,20 +506,20 @@ const pt = /* @__PURE__ */ q({
506
506
  }, a = () => {
507
507
  g.value && (c.value = !0);
508
508
  }, v = () => {
509
- C.value = !0;
509
+ T.value = !0;
510
510
  }, w = () => {
511
- C.value = !1;
511
+ T.value = !1;
512
512
  };
513
513
  return xe(
514
514
  () => e.value,
515
515
  () => {
516
- m(), Y();
516
+ m(), D();
517
517
  }
518
- ), ie(k), (b, B) => (p(), K(u(De), {
518
+ ), ae(k), (b, B) => (p(), K(u(De), {
519
519
  width: "calc(100% - 118px)",
520
520
  "ext-cls": "empty-padding",
521
521
  arrow: !1,
522
- "is-show": C.value,
522
+ "is-show": T.value,
523
523
  "popover-delay": 0,
524
524
  boundary: "parent",
525
525
  placement: "bottom",
@@ -531,10 +531,10 @@ const pt = /* @__PURE__ */ q({
531
531
  return [
532
532
  h("div", null, [
533
533
  j((p(), f("section", Pt, [
534
- D(u(ke), {
534
+ I(u(ke), {
535
535
  class: "input-search",
536
- modelValue: L.value,
537
- "onUpdate:modelValue": B[0] || (B[0] = (J) => L.value = J),
536
+ modelValue: z.value,
537
+ "onUpdate:modelValue": B[0] || (B[0] = (J) => z.value = J),
538
538
  behavior: "simplicity",
539
539
  clearable: ""
540
540
  }, null, 8, ["modelValue"]),
@@ -542,9 +542,9 @@ const pt = /* @__PURE__ */ q({
542
542
  (p(!0), f(
543
543
  U,
544
544
  null,
545
- oe(z.value, (J, de) => j((p(), f("span", {
545
+ oe(L.value, (J, ue) => j((p(), f("span", {
546
546
  class: "group-prompt",
547
- key: de,
547
+ key: ue,
548
548
  onClick: (be) => S(J)
549
549
  }, [
550
550
  h(
@@ -566,7 +566,7 @@ const pt = /* @__PURE__ */ q({
566
566
  128
567
567
  /* KEYED_FRAGMENT */
568
568
  )),
569
- (ne = z.value) != null && ne.length ? P("v-if", !0) : (p(), K(u(Ie), {
569
+ (ne = L.value) != null && ne.length ? P("v-if", !0) : (p(), K(u(Ie), {
570
570
  key: 0,
571
571
  class: "exception-wrap-item exception-part",
572
572
  scene: "part",
@@ -589,7 +589,7 @@ const pt = /* @__PURE__ */ q({
589
589
  class: "send-prompt-container"
590
590
  },
591
591
  [
592
- D(u(ke), {
592
+ I(u(ke), {
593
593
  ref_key: "inputRef",
594
594
  ref: M,
595
595
  class: "send-prompt",
@@ -597,7 +597,7 @@ const pt = /* @__PURE__ */ q({
597
597
  clearable: !0,
598
598
  "model-value": b.value,
599
599
  "native-attributes": { autofocus: "autofocus" },
600
- placeholder: T.value,
600
+ placeholder: C.value,
601
601
  row: "1",
602
602
  type: "textarea",
603
603
  onFocus: a,
@@ -607,7 +607,7 @@ const pt = /* @__PURE__ */ q({
607
607
  b.value ? (p(), K(u(Je), {
608
608
  key: 0,
609
609
  class: "show-clear-only-hover bk-input--clear-icon clear-icon",
610
- onClick: d
610
+ onClick: r
611
611
  })) : P("v-if", !0)
612
612
  ],
613
613
  4
@@ -618,25 +618,25 @@ const pt = /* @__PURE__ */ q({
618
618
  /* STABLE */
619
619
  }, 8, ["is-show"]));
620
620
  }
621
- }), At = /* @__PURE__ */ W(Rt, [["__scopeId", "data-v-f6a3562b"]]), Dt = { class: "ai-shortcuts" }, It = /* @__PURE__ */ q({
621
+ }), At = /* @__PURE__ */ W(Rt, [["__scopeId", "data-v-f6a3562b"]]), Dt = { class: "ai-shortcuts" }, It = /* @__PURE__ */ F({
622
622
  __name: "render-shortcuts",
623
623
  props: {
624
624
  shortcuts: {}
625
625
  },
626
626
  emits: ["select"],
627
- setup(o, { emit: n }) {
628
- const e = n, l = (s) => {
629
- e("select", s);
627
+ setup(o, { emit: l }) {
628
+ const e = l, s = (n) => {
629
+ e("select", n);
630
630
  };
631
- return (s, i) => (p(), f("ul", Dt, [
631
+ return (n, i) => (p(), f("ul", Dt, [
632
632
  (p(!0), f(
633
633
  U,
634
634
  null,
635
- oe(s.shortcuts, (t) => (p(), K(u(Xe), {
635
+ oe(n.shortcuts, (t) => (p(), K(u(Xe), {
636
636
  class: "ai-blueking-shortcut",
637
637
  key: t.label,
638
638
  theme: "info",
639
- onClick: (g) => l(t)
639
+ onClick: (g) => s(t)
640
640
  }, {
641
641
  default: $(() => [
642
642
  te(
@@ -653,7 +653,7 @@ const pt = /* @__PURE__ */ q({
653
653
  ))
654
654
  ]));
655
655
  }
656
- }), Yt = /* @__PURE__ */ W(It, [["__scopeId", "data-v-4eeeea02"]]), Xt = (o) => (ce("data-v-fd57f18d"), o = o(), re(), o), Ft = /* @__PURE__ */ Xt(() => /* @__PURE__ */ h(
656
+ }), Yt = /* @__PURE__ */ W(It, [["__scopeId", "data-v-4eeeea02"]]), Xt = (o) => (re("data-v-fd57f18d"), o = o(), de(), o), qt = /* @__PURE__ */ Xt(() => /* @__PURE__ */ h(
657
657
  "svg",
658
658
  {
659
659
  width: "10",
@@ -666,22 +666,22 @@ const pt = /* @__PURE__ */ q({
666
666
  ],
667
667
  -1
668
668
  /* HOISTED */
669
- )), qt = /* @__PURE__ */ q({
669
+ )), Ft = /* @__PURE__ */ F({
670
670
  __name: "render-stop",
671
671
  props: {
672
672
  isShow: { type: Boolean }
673
673
  },
674
674
  emits: ["stop"],
675
- setup(o, { emit: n }) {
676
- const e = n, l = () => {
675
+ setup(o, { emit: l }) {
676
+ const e = l, s = () => {
677
677
  e("stop");
678
678
  };
679
- return (s, i) => s.isShow ? (p(), f("span", {
679
+ return (n, i) => n.isShow ? (p(), f("span", {
680
680
  key: 0,
681
681
  class: "ai-blueking-render-stop",
682
- onClick: l
682
+ onClick: s
683
683
  }, [
684
- Ft,
684
+ qt,
685
685
  te(
686
686
  " " + A(u(y)("终止生成")),
687
687
  1
@@ -689,18 +689,18 @@ const pt = /* @__PURE__ */ q({
689
689
  )
690
690
  ])) : P("v-if", !0);
691
691
  }
692
- }), Ut = /* @__PURE__ */ W(qt, [["__scopeId", "data-v-fd57f18d"]]), Kt = {
692
+ }), Ut = /* @__PURE__ */ W(Ft, [["__scopeId", "data-v-fd57f18d"]]), Kt = {
693
693
  key: 0,
694
694
  class: "time-wrapper"
695
- }, Wt = { class: "time-message" }, jt = /* @__PURE__ */ q({
695
+ }, Wt = { class: "time-message" }, jt = /* @__PURE__ */ F({
696
696
  __name: "render-time",
697
697
  props: {
698
698
  message: {}
699
699
  },
700
700
  setup(o) {
701
- const n = o, e = Q(() => {
701
+ const l = o, e = Q(() => {
702
702
  var t;
703
- const l = se(n.message.time), s = se(), i = {
703
+ const s = se(l.message.time), n = se(), i = {
704
704
  0: y("日"),
705
705
  1: y("一"),
706
706
  2: y("二"),
@@ -709,11 +709,11 @@ const pt = /* @__PURE__ */ q({
709
709
  5: y("五"),
710
710
  6: y("六")
711
711
  };
712
- return !n.message.time || (t = window.showTimes) != null && t.some(
713
- (g) => Math.abs(l.diff(g, "minute")) < 10 && g !== n.message.time
714
- ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], s.isSame(l, "day") ? l.format("HH:mm:ss") : s.subtract(1, "day").isSame(l, "week") ? y("昨天") + " " + l.format("HH:mm:ss") : s.isSame(l, "week") ? y("本周") + i[l.day()] + " " + l.format("HH:mm:ss") : s.subtract(1, "week").isSame(l, "week") ? y("上周") + i[l.day()] + " " + l.format("HH:mm:ss") : s.isSame(l, "year") ? l.format("MM-DD HH:mm:ss") : l.format("YYYY-MM-DD HH:mm:ss"));
712
+ return !l.message.time || (t = window.showTimes) != null && t.some(
713
+ (g) => Math.abs(s.diff(g, "minute")) < 10 && g !== l.message.time
714
+ ) ? "" : (window.showTimes = [...window.showTimes || [], l.message.time], n.isSame(s, "day") ? s.format("HH:mm:ss") : n.subtract(1, "day").isSame(s, "week") ? y("昨天") + " " + s.format("HH:mm:ss") : n.isSame(s, "week") ? y("本周") + i[s.day()] + " " + s.format("HH:mm:ss") : n.subtract(1, "week").isSame(s, "week") ? y("上周") + i[s.day()] + " " + s.format("HH:mm:ss") : n.isSame(s, "year") ? s.format("MM-DD HH:mm:ss") : s.format("YYYY-MM-DD HH:mm:ss"));
715
715
  });
716
- return (l, s) => e.value ? (p(), f("section", Kt, [
716
+ return (s, n) => e.value ? (p(), f("section", Kt, [
717
717
  h(
718
718
  "span",
719
719
  Wt,
@@ -723,7 +723,7 @@ const pt = /* @__PURE__ */ q({
723
723
  )
724
724
  ])) : P("v-if", !0);
725
725
  }
726
- }), Qt = /* @__PURE__ */ W(jt, [["__scopeId", "data-v-55c9a119"]]), Ve = (o) => (ce("data-v-ba34b3da"), o = o(), re(), o), Gt = {
726
+ }), Qt = /* @__PURE__ */ W(jt, [["__scopeId", "data-v-55c9a119"]]), Ve = (o) => (re("data-v-ba34b3da"), o = o(), de(), o), Gt = {
727
727
  key: 0,
728
728
  width: "18",
729
729
  height: "18",
@@ -743,7 +743,7 @@ const pt = /* @__PURE__ */ q({
743
743
  null,
744
744
  -1
745
745
  /* HOISTED */
746
- )), to = /* @__PURE__ */ q({
746
+ )), to = /* @__PURE__ */ F({
747
747
  __name: "render-content",
748
748
  props: {
749
749
  messages: {},
@@ -755,68 +755,68 @@ const pt = /* @__PURE__ */ q({
755
755
  scrollLoading: { type: Boolean },
756
756
  scrollLoadingEnd: { type: Boolean, default: !0 },
757
757
  alert: {},
758
- shortcuts: { default: () => fe }
758
+ shortcuts: { default: () => ie }
759
759
  },
760
760
  emits: ["ai-click", "change-prompt", "send", "choose-prompt", "scroll-load", "stop", "shortcut-click"],
761
- setup(o, { expose: n, emit: e }) {
762
- const l = o, s = e, { enablePopup: i } = me(), t = pe, g = I(""), { selectedText: c, clearSelection: L } = ge(i), { isShow: E } = Be(), M = () => {
761
+ setup(o, { expose: l, emit: e }) {
762
+ const s = o, n = e, { enablePopup: i } = ge(), t = me, g = Y(""), { selectedText: c, clearSelection: z } = ve(i), { isShow: E } = Be(), M = () => {
763
763
  Ce(() => {
764
764
  const a = document.querySelector(".ai-blueking-messages");
765
765
  a.scrollTop = a.scrollHeight;
766
766
  });
767
- }, C = _e((a) => {
768
- if (l.scrollLoading || l.scrollLoadingEnd)
767
+ }, T = _e((a) => {
768
+ if (s.scrollLoading || s.scrollLoadingEnd)
769
769
  return;
770
- a.target.scrollTop < 200 && s("scroll-load");
771
- }), z = () => {
770
+ a.target.scrollTop < 200 && n("scroll-load");
771
+ }), L = () => {
772
772
  if (g.value) {
773
- if (l.loading) {
773
+ if (s.loading) {
774
774
  we({ theme: "warning", message: y("内容正在执行中,请执行完成后再发送") });
775
775
  return;
776
776
  }
777
- s("send", {
777
+ n("send", {
778
778
  content: g.value,
779
779
  cite: c.value
780
780
  }), g.value = "", c.value = "";
781
781
  }
782
- }, T = (a) => {
783
- s("choose-prompt", a);
782
+ }, C = (a) => {
783
+ n("choose-prompt", a);
784
784
  }, V = (a) => {
785
- s("change-prompt", a);
786
- }, Y = () => {
787
- s("stop");
785
+ n("change-prompt", a);
786
+ }, D = () => {
787
+ n("stop");
788
788
  }, m = (a) => {
789
789
  const v = a.target;
790
790
  if (v != null && v.classList.contains("ai-blueking-angle-up")) {
791
791
  const w = v == null ? void 0 : v.parentElement;
792
792
  w != null && w.classList.contains("closed") ? w == null || w.classList.remove("closed") : w == null || w.classList.add("closed");
793
793
  }
794
- v != null && v.classList.contains("ai-clickable") && s("ai-click", v.dataset.ai);
794
+ v != null && v.classList.contains("ai-clickable") && n("ai-click", v.dataset.ai);
795
795
  }, S = () => {
796
796
  M(), document.addEventListener("click", m);
797
797
  }, H = () => {
798
798
  window.showTimes = [], document.removeEventListener("click", m);
799
- }, d = (a) => {
799
+ }, r = (a) => {
800
800
  g.value = a;
801
801
  }, k = (a) => {
802
- const v = ve(a.prompt, c.value);
803
- if (l.loading) {
802
+ const v = fe(a.prompt, c.value);
803
+ if (s.loading) {
804
804
  we({ theme: "warning", message: y("内容正在执行中,请执行完成后再发送") });
805
805
  return;
806
806
  }
807
- s("shortcut-click", {
807
+ n("shortcut-click", {
808
808
  type: a.key || "",
809
809
  label: a.label || "",
810
810
  cite: c.value,
811
811
  prompt: v
812
- }), s("send", {
812
+ }), n("send", {
813
813
  content: a.label,
814
814
  cite: c.value,
815
815
  prompt: v
816
- }), L();
816
+ }), z();
817
817
  };
818
818
  return xe(
819
- () => l.messages,
819
+ () => s.messages,
820
820
  () => {
821
821
  const a = document.querySelector(".ai-blueking-messages");
822
822
  (a == null ? void 0 : a.scrollTop) + (a == null ? void 0 : a.clientHeight) + 100 >= (a == null ? void 0 : a.scrollHeight) && M();
@@ -824,8 +824,8 @@ const pt = /* @__PURE__ */ q({
824
824
  {
825
825
  deep: !0
826
826
  }
827
- ), ie(S), ae(H), n({
828
- setInputMessage: d
827
+ ), ae(S), ce(H), l({
828
+ setInputMessage: r
829
829
  }), (a, v) => (p(), f(
830
830
  "section",
831
831
  {
@@ -866,7 +866,7 @@ const pt = /* @__PURE__ */ q({
866
866
  {
867
867
  class: "ai-messages ai-blueking-messages",
868
868
  onScrollPassive: v[0] || (v[0] = //@ts-ignore
869
- (...w) => u(C) && u(C)(...w))
869
+ (...w) => u(T) && u(T)(...w))
870
870
  },
871
871
  [
872
872
  a.scrollLoading ? (p(), f("svg", Gt, Jt)) : P("v-if", !0),
@@ -879,11 +879,11 @@ const pt = /* @__PURE__ */ q({
879
879
  key: w.content
880
880
  },
881
881
  [
882
- D(Qt, {
882
+ I(Qt, {
883
883
  class: "render-message",
884
884
  message: w
885
885
  }, null, 8, ["message"]),
886
- D(Bt, {
886
+ I(Bt, {
887
887
  class: "render-message",
888
888
  message: w,
889
889
  "user-photo": a.userPhoto
@@ -904,14 +904,14 @@ const pt = /* @__PURE__ */ q({
904
904
  "section",
905
905
  {
906
906
  class: "ai-operation-tools",
907
- onMousedown: v[1] || (v[1] = F(() => {
907
+ onMousedown: v[1] || (v[1] = q(() => {
908
908
  }, ["prevent"]))
909
909
  },
910
910
  [
911
- D(dt),
912
- D(Ut, {
911
+ I(dt),
912
+ I(Ut, {
913
913
  "is-show": a.loading,
914
- onStop: Y
914
+ onStop: D
915
915
  }, null, 8, ["is-show"])
916
916
  ],
917
917
  32
@@ -923,14 +923,14 @@ const pt = /* @__PURE__ */ q({
923
923
  {
924
924
  key: 0,
925
925
  class: _(["ai-cite-container", { "is-back-show": !u(E) }]),
926
- onMousedown: v[2] || (v[2] = F(() => {
926
+ onMousedown: v[2] || (v[2] = q(() => {
927
927
  }, ["prevent"]))
928
928
  },
929
929
  [
930
- D(Pe, {
930
+ I(Pe, {
931
931
  "show-close-icon": !0,
932
932
  text: u(c),
933
- onClose: u(L)
933
+ onClose: u(z)
934
934
  }, null, 8, ["text", "onClose"]),
935
935
  h(
936
936
  "span",
@@ -939,7 +939,7 @@ const pt = /* @__PURE__ */ q({
939
939
  1
940
940
  /* TEXT */
941
941
  ),
942
- D(Yt, {
942
+ I(Yt, {
943
943
  shortcuts: a.shortcuts,
944
944
  onSelect: k
945
945
  }, null, 8, ["shortcuts"])
@@ -948,21 +948,21 @@ const pt = /* @__PURE__ */ q({
948
948
  /* CLASS, NEED_HYDRATION */
949
949
  )) : P("v-if", !0),
950
950
  h("section", $t, [
951
- D(At, {
951
+ I(At, {
952
952
  value: g.value,
953
953
  "onUpdate:value": v[3] || (v[3] = (w) => g.value = w),
954
954
  placeholder: a.placeholder,
955
955
  prompts: a.prompts,
956
956
  onChangePrompt: V,
957
- onChoosePrompt: T,
958
- onEnter: z
957
+ onChoosePrompt: C,
958
+ onEnter: L
959
959
  }, null, 8, ["value", "placeholder", "prompts"]),
960
- j((p(), K(u(Fe), {
960
+ j((p(), K(u(qe), {
961
961
  class: "ai-operation-button",
962
962
  disabled: a.loading || !g.value,
963
963
  size: "large",
964
964
  theme: "primary",
965
- onClick: z
965
+ onClick: L
966
966
  }, {
967
967
  default: $(() => [
968
968
  eo,
@@ -988,7 +988,7 @@ const pt = /* @__PURE__ */ q({
988
988
  /* STYLE */
989
989
  ));
990
990
  }
991
- }), oo = /* @__PURE__ */ W(to, [["__scopeId", "data-v-ba34b3da"]]), no = { class: "ai-modal-header-icon" }, lo = /* @__PURE__ */ q({
991
+ }), oo = /* @__PURE__ */ W(to, [["__scopeId", "data-v-ba34b3da"]]), no = { class: "ai-modal-header-icon" }, lo = /* @__PURE__ */ F({
992
992
  __name: "render-modal",
993
993
  props: {
994
994
  headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
@@ -1015,8 +1015,8 @@ const pt = /* @__PURE__ */ q({
1015
1015
  loading: { type: Boolean }
1016
1016
  },
1017
1017
  emits: ["clear", "close", "choose-model"],
1018
- setup(o, { emit: n }) {
1019
- const e = o, l = n, s = pe, i = {
1018
+ setup(o, { emit: l }) {
1019
+ const e = o, s = l, n = me, i = {
1020
1020
  height: window.innerHeight,
1021
1021
  width: window.innerWidth
1022
1022
  }, t = {
@@ -1024,59 +1024,59 @@ const pt = /* @__PURE__ */ q({
1024
1024
  type: "",
1025
1025
  clientX: 0,
1026
1026
  clientY: 0
1027
- }, c = I((() => {
1027
+ }, c = Y((() => {
1028
1028
  var x, R, N, G;
1029
- const r = (O, Ee) => O === void 0 ? Ee : O;
1029
+ const d = (O, Ee) => O === void 0 ? Ee : O;
1030
1030
  return {
1031
- top: r((x = e.startPosition) == null ? void 0 : x.top, i.height - e.sizeLimit.height),
1032
- bottom: r((R = e.startPosition) == null ? void 0 : R.bottom, 0),
1033
- left: r((N = e.startPosition) == null ? void 0 : N.left, 0),
1034
- right: r((G = e.startPosition) == null ? void 0 : G.right, i.width - e.sizeLimit.width)
1031
+ top: d((x = e.startPosition) == null ? void 0 : x.top, i.height - e.sizeLimit.height),
1032
+ bottom: d((R = e.startPosition) == null ? void 0 : R.bottom, 0),
1033
+ left: d((N = e.startPosition) == null ? void 0 : N.left, 0),
1034
+ right: d((G = e.startPosition) == null ? void 0 : G.right, i.width - e.sizeLimit.width)
1035
1035
  };
1036
- })()), L = Q(() => c.value.top <= e.positionLimit.top && c.value.bottom <= e.positionLimit.bottom), E = (r) => {
1037
- l("choose-model", r);
1036
+ })()), z = Q(() => c.value.top <= e.positionLimit.top && c.value.bottom <= e.positionLimit.bottom), E = (d) => {
1037
+ s("choose-model", d);
1038
1038
  }, M = () => {
1039
1039
  document.querySelectorAll("iframe").forEach((x) => {
1040
1040
  x.style.pointerEvents = "none";
1041
1041
  });
1042
- }, C = () => {
1042
+ }, T = () => {
1043
1043
  document.querySelectorAll("iframe").forEach((x) => {
1044
1044
  x.style.pointerEvents = "auto";
1045
1045
  });
1046
- }, z = (r) => {
1047
- M(), t.isMove = !0, t.type = "move", t.clientX = r.clientX, t.clientY = r.clientY;
1048
- }, T = (r) => {
1049
- M(), t.isMove = !0, t.type = "rightDrag", t.clientX = r.clientX;
1050
- }, V = (r) => {
1051
- M(), t.isMove = !0, t.type = "leftDrag", t.clientX = r.clientX;
1052
- }, Y = (r) => {
1053
- M(), t.isMove = !0, t.type = "topDrag", t.clientY = r.clientY;
1054
- }, m = (r) => {
1055
- M(), t.isMove = !0, t.type = "bottomDrag", t.clientY = r.clientY;
1056
- }, S = (r) => {
1057
- M(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
1058
- }, H = (r) => {
1059
- M(), t.isMove = !0, t.type = "topRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
1060
- }, d = (r) => {
1061
- M(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
1062
- }, k = (r) => {
1063
- M(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
1046
+ }, L = (d) => {
1047
+ M(), t.isMove = !0, t.type = "move", t.clientX = d.clientX, t.clientY = d.clientY;
1048
+ }, C = (d) => {
1049
+ M(), t.isMove = !0, t.type = "rightDrag", t.clientX = d.clientX;
1050
+ }, V = (d) => {
1051
+ M(), t.isMove = !0, t.type = "leftDrag", t.clientX = d.clientX;
1052
+ }, D = (d) => {
1053
+ M(), t.isMove = !0, t.type = "topDrag", t.clientY = d.clientY;
1054
+ }, m = (d) => {
1055
+ M(), t.isMove = !0, t.type = "bottomDrag", t.clientY = d.clientY;
1056
+ }, S = (d) => {
1057
+ M(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = d.clientY, t.clientX = d.clientX;
1058
+ }, H = (d) => {
1059
+ M(), t.isMove = !0, t.type = "topRightDrag", t.clientY = d.clientY, t.clientX = d.clientX;
1060
+ }, r = (d) => {
1061
+ M(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = d.clientY, t.clientX = d.clientX;
1062
+ }, k = (d) => {
1063
+ M(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = d.clientY, t.clientX = d.clientX;
1064
1064
  }, a = () => {
1065
- t.isMove = !1, C();
1066
- }, v = (r, x) => {
1067
- ["move", "leftDrag"].includes(t.type) && (c.value.left += r), ["move", "rightDrag"].includes(t.type) && (c.value.right -= r), ["move", "topDrag"].includes(t.type) && (c.value.top += x), ["move", "bottomDrag"].includes(t.type) && (c.value.bottom -= x), ["topLeftDrag"].includes(t.type) && (c.value.left += r, c.value.top += x), ["topRightDrag"].includes(t.type) && (c.value.right -= r, c.value.top += x), ["bottomLeftDrag"].includes(t.type) && (c.value.left += r, c.value.bottom -= x), ["bottomRightDrag"].includes(t.type) && (c.value.right -= r, c.value.bottom -= x);
1068
- }, w = (r, x) => {
1065
+ t.isMove = !1, T();
1066
+ }, v = (d, x) => {
1067
+ ["move", "leftDrag"].includes(t.type) && (c.value.left += d), ["move", "rightDrag"].includes(t.type) && (c.value.right -= d), ["move", "topDrag"].includes(t.type) && (c.value.top += x), ["move", "bottomDrag"].includes(t.type) && (c.value.bottom -= x), ["topLeftDrag"].includes(t.type) && (c.value.left += d, c.value.top += x), ["topRightDrag"].includes(t.type) && (c.value.right -= d, c.value.top += x), ["bottomLeftDrag"].includes(t.type) && (c.value.left += d, c.value.bottom -= x), ["bottomRightDrag"].includes(t.type) && (c.value.right -= d, c.value.bottom -= x);
1068
+ }, w = (d, x) => {
1069
1069
  const { top: R, bottom: N, left: G, right: O } = c.value;
1070
- (i.width - G - O < e.sizeLimit.width || G < e.positionLimit.left || O < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (c.value.left -= r), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (c.value.right += r)), (i.height - R - N < e.sizeLimit.height || R < e.positionLimit.top || N < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (c.value.top -= x), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (c.value.bottom += x));
1071
- }, b = (r) => {
1070
+ (i.width - G - O < e.sizeLimit.width || G < e.positionLimit.left || O < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (c.value.left -= d), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (c.value.right += d)), (i.height - R - N < e.sizeLimit.height || R < e.positionLimit.top || N < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (c.value.top -= x), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (c.value.bottom += x));
1071
+ }, b = (d) => {
1072
1072
  if (!t.isMove)
1073
1073
  return;
1074
- r.preventDefault();
1075
- const x = r.clientX - t.clientX, R = r.clientY - t.clientY;
1076
- v(x, R), w(x, R), t.clientX = r.clientX, t.clientY = r.clientY;
1074
+ d.preventDefault();
1075
+ const x = d.clientX - t.clientX, R = d.clientY - t.clientY;
1076
+ v(x, R), w(x, R), t.clientX = d.clientX, t.clientY = d.clientY;
1077
1077
  }, B = () => {
1078
1078
  i.width = window.innerWidth, i.height = window.innerHeight;
1079
- const r = i.width - c.value.left - c.value.right, x = i.height - c.value.top - c.value.bottom, R = Math.max(r, e.sizeLimit.width), N = Math.max(x, e.sizeLimit.height), G = i.width - R, O = i.height - N;
1079
+ const d = i.width - c.value.left - c.value.right, x = i.height - c.value.top - c.value.bottom, R = Math.max(d, e.sizeLimit.width), N = Math.max(x, e.sizeLimit.height), G = i.width - R, O = i.height - N;
1080
1080
  c.value.top = Math.max(
1081
1081
  e.positionLimit.top,
1082
1082
  Math.min(c.value.top, O - e.positionLimit.bottom)
@@ -1094,16 +1094,16 @@ const pt = /* @__PURE__ */ q({
1094
1094
  c.value.top = e.positionLimit.top, c.value.bottom = e.positionLimit.bottom;
1095
1095
  }, J = () => {
1096
1096
  c.value.top = i.height - e.sizeLimit.height, c.value.bottom = e.positionLimit.bottom;
1097
- }, de = () => {
1098
- e.loading || l("clear");
1097
+ }, ue = () => {
1098
+ e.loading || s("clear");
1099
1099
  }, be = () => {
1100
- l("close");
1100
+ s("close");
1101
1101
  };
1102
1102
  return We(() => {
1103
1103
  window.addEventListener("mousemove", b, !0), window.addEventListener("mouseup", a), window.addEventListener("resize", B);
1104
- }), ae(() => {
1104
+ }), ce(() => {
1105
1105
  window.removeEventListener("mousemove", b, !0), window.removeEventListener("mouseup", a), window.removeEventListener("resize", B);
1106
- }), (r, x) => (p(), f(
1106
+ }), (d, x) => (p(), f(
1107
1107
  "section",
1108
1108
  {
1109
1109
  style: Z({
@@ -1119,31 +1119,31 @@ const pt = /* @__PURE__ */ q({
1119
1119
  "header",
1120
1120
  {
1121
1121
  style: Z({
1122
- background: r.headBackground
1122
+ background: d.headBackground
1123
1123
  }),
1124
1124
  class: "ai-modal-header",
1125
- onMousedown: F(z, ["stop"])
1125
+ onMousedown: q(L, ["stop"])
1126
1126
  },
1127
1127
  [
1128
1128
  h("span", no, [
1129
1129
  h(
1130
1130
  "i",
1131
1131
  {
1132
- class: _(r.logo)
1132
+ class: _(d.logo)
1133
1133
  },
1134
1134
  null,
1135
1135
  2
1136
1136
  /* CLASS */
1137
1137
  ),
1138
1138
  te(
1139
- " " + A(r.name || u(y)("小鲸")) + " ",
1139
+ " " + A(d.name || u(y)("小鲸")) + " ",
1140
1140
  1
1141
1141
  /* TEXT */
1142
1142
  ),
1143
- r.models ? (p(), K(u(Me), {
1143
+ d.models ? (p(), K(u(Me), {
1144
1144
  key: 0,
1145
1145
  class: "ai-modal-header-models",
1146
- "model-value": r.model,
1146
+ "model-value": d.model,
1147
1147
  size: "small",
1148
1148
  onChange: E
1149
1149
  }, {
@@ -1151,7 +1151,7 @@ const pt = /* @__PURE__ */ q({
1151
1151
  (p(!0), f(
1152
1152
  U,
1153
1153
  null,
1154
- oe(r.models, (R) => (p(), K(u(Me).Option, {
1154
+ oe(d.models, (R) => (p(), K(u(Me).Option, {
1155
1155
  key: R.id,
1156
1156
  name: R.name,
1157
1157
  value: R.id
@@ -1165,7 +1165,7 @@ const pt = /* @__PURE__ */ q({
1165
1165
  }, 8, ["model-value"])) : P("v-if", !0)
1166
1166
  ]),
1167
1167
  h("span", null, [
1168
- L.value ? j((p(), f(
1168
+ z.value ? j((p(), f(
1169
1169
  "i",
1170
1170
  {
1171
1171
  key: 0,
@@ -1176,7 +1176,7 @@ const pt = /* @__PURE__ */ q({
1176
1176
  512
1177
1177
  /* NEED_PATCH */
1178
1178
  )), [
1179
- [u(s), {
1179
+ [u(n), {
1180
1180
  content: u(y)("向下收缩"),
1181
1181
  distance: 20
1182
1182
  }]
@@ -1191,7 +1191,7 @@ const pt = /* @__PURE__ */ q({
1191
1191
  512
1192
1192
  /* NEED_PATCH */
1193
1193
  )), [
1194
- [u(s), {
1194
+ [u(n), {
1195
1195
  content: u(y)("向上扩展"),
1196
1196
  distance: 20
1197
1197
  }]
@@ -1199,15 +1199,15 @@ const pt = /* @__PURE__ */ q({
1199
1199
  j(h(
1200
1200
  "i",
1201
1201
  {
1202
- class: _(["ai-header-tool ai-blueking-icon ai-blueking-saoba", { disabled: r.loading }]),
1203
- onClick: de
1202
+ class: _(["ai-header-tool ai-blueking-icon ai-blueking-saoba", { disabled: d.loading }]),
1203
+ onClick: ue
1204
1204
  },
1205
1205
  null,
1206
1206
  2
1207
1207
  /* CLASS */
1208
1208
  ), [
1209
- [u(s), {
1210
- content: r.loading ? u(y)("AI小鲸正在回复,请结束后再清空") : u(y)("清空聊天记录"),
1209
+ [u(n), {
1210
+ content: d.loading ? u(y)("AI小鲸正在回复,请结束后再清空") : u(y)("清空聊天记录"),
1211
1211
  distance: 20
1212
1212
  }]
1213
1213
  ]),
@@ -1221,7 +1221,7 @@ const pt = /* @__PURE__ */ q({
1221
1221
  512
1222
1222
  /* NEED_PATCH */
1223
1223
  ), [
1224
- [u(s), {
1224
+ [u(n), {
1225
1225
  content: u(y)("关闭"),
1226
1226
  distance: 20
1227
1227
  }]
@@ -1231,12 +1231,12 @@ const pt = /* @__PURE__ */ q({
1231
1231
  36
1232
1232
  /* STYLE, NEED_HYDRATION */
1233
1233
  ),
1234
- je(r.$slots, "default", {}, void 0, !0),
1234
+ je(d.$slots, "default", {}, void 0, !0),
1235
1235
  h(
1236
1236
  "span",
1237
1237
  {
1238
1238
  class: "drag-line left",
1239
- onMousedown: F(V, ["stop"])
1239
+ onMousedown: q(V, ["stop"])
1240
1240
  },
1241
1241
  null,
1242
1242
  32
@@ -1246,7 +1246,7 @@ const pt = /* @__PURE__ */ q({
1246
1246
  "span",
1247
1247
  {
1248
1248
  class: "drag-line right",
1249
- onMousedown: F(T, ["stop"])
1249
+ onMousedown: q(C, ["stop"])
1250
1250
  },
1251
1251
  null,
1252
1252
  32
@@ -1256,7 +1256,7 @@ const pt = /* @__PURE__ */ q({
1256
1256
  "span",
1257
1257
  {
1258
1258
  class: "drag-line top",
1259
- onMousedown: F(Y, ["stop"])
1259
+ onMousedown: q(D, ["stop"])
1260
1260
  },
1261
1261
  null,
1262
1262
  32
@@ -1266,7 +1266,7 @@ const pt = /* @__PURE__ */ q({
1266
1266
  "span",
1267
1267
  {
1268
1268
  class: "drag-line bottom",
1269
- onMousedown: F(m, ["stop"])
1269
+ onMousedown: q(m, ["stop"])
1270
1270
  },
1271
1271
  null,
1272
1272
  32
@@ -1276,7 +1276,7 @@ const pt = /* @__PURE__ */ q({
1276
1276
  "span",
1277
1277
  {
1278
1278
  class: "drag-line top-left-corner",
1279
- onMousedown: F(S, ["stop"])
1279
+ onMousedown: q(S, ["stop"])
1280
1280
  },
1281
1281
  null,
1282
1282
  32
@@ -1286,7 +1286,7 @@ const pt = /* @__PURE__ */ q({
1286
1286
  "span",
1287
1287
  {
1288
1288
  class: "drag-line top-right-corner",
1289
- onMousedown: F(H, ["stop"])
1289
+ onMousedown: q(H, ["stop"])
1290
1290
  },
1291
1291
  null,
1292
1292
  32
@@ -1296,7 +1296,7 @@ const pt = /* @__PURE__ */ q({
1296
1296
  "span",
1297
1297
  {
1298
1298
  class: "drag-line bottom-left-corner",
1299
- onMousedown: F(d, ["stop"])
1299
+ onMousedown: q(r, ["stop"])
1300
1300
  },
1301
1301
  null,
1302
1302
  32
@@ -1306,7 +1306,7 @@ const pt = /* @__PURE__ */ q({
1306
1306
  "span",
1307
1307
  {
1308
1308
  class: "drag-line bottom-right-corner",
1309
- onMousedown: F(k, ["stop"])
1309
+ onMousedown: q(k, ["stop"])
1310
1310
  },
1311
1311
  null,
1312
1312
  32
@@ -1317,7 +1317,7 @@ const pt = /* @__PURE__ */ q({
1317
1317
  /* STYLE */
1318
1318
  ));
1319
1319
  }
1320
- }), so = /* @__PURE__ */ W(lo, [["__scopeId", "data-v-e3958b72"]]), io = (o) => (ce("data-v-7edbd505"), o = o(), re(), o), ao = { class: "popup-content" }, co = /* @__PURE__ */ io(() => /* @__PURE__ */ h(
1320
+ }), so = /* @__PURE__ */ W(lo, [["__scopeId", "data-v-e3958b72"]]), io = (o) => (re("data-v-ba2db6e8"), o = o(), de(), o), ao = { class: "popup-content" }, co = /* @__PURE__ */ io(() => /* @__PURE__ */ h(
1321
1321
  "i",
1322
1322
  { class: "ai-blueking-icon ai-blueking-ai" },
1323
1323
  null,
@@ -1325,34 +1325,37 @@ const pt = /* @__PURE__ */ q({
1325
1325
  /* HOISTED */
1326
1326
  )), ro = [
1327
1327
  co
1328
- ], uo = { class: "shortcut-buttons" }, ho = ["onClick"], po = { class: "btn-text" }, mo = /* @__PURE__ */ q({
1328
+ ], uo = { class: "shortcut-buttons" }, ho = ["onClick"], po = { class: "btn-text" }, mo = /* @__PURE__ */ F({
1329
1329
  __name: "render-popup",
1330
+ props: {
1331
+ shortcuts: {}
1332
+ },
1330
1333
  emits: ["click", "shortcutClick"],
1331
- setup(o, { emit: n }) {
1332
- const { enablePopup: e } = me(), { isIconVisible: l, iconPosition: s, selectedText: i, clearSelection: t, popupRef: g } = ge(e), c = fe, L = n, E = () => {
1333
- L("click"), l.value = !1;
1334
- }, M = (C) => {
1334
+ setup(o, { emit: l }) {
1335
+ const e = o, { enablePopup: s } = ge(), { isIconVisible: n, iconPosition: i, selectedText: t, clearSelection: g, popupRef: c } = ve(s), z = e.shortcuts || ie, E = l, M = () => {
1336
+ E("click"), n.value = !1;
1337
+ }, T = (L) => {
1335
1338
  try {
1336
- const z = ve(C.prompt, i.value);
1337
- L("shortcutClick", {
1338
- cite: i.value,
1339
- label: C.label,
1340
- type: C.key,
1341
- prompt: z
1342
- }), t(), l.value = !1;
1343
- } catch (z) {
1344
- console.error("处理快捷按钮点击事件时出错:", z);
1339
+ const C = fe(L.prompt, t.value);
1340
+ E("shortcutClick", {
1341
+ cite: t.value,
1342
+ label: L.label,
1343
+ type: L.key,
1344
+ prompt: C
1345
+ }), g(), n.value = !1;
1346
+ } catch (C) {
1347
+ console.error("处理快捷按钮点击事件时出错:", C);
1345
1348
  }
1346
1349
  };
1347
- return (C, z) => u(l) ? (p(), f(
1350
+ return (L, C) => u(n) ? (p(), f(
1348
1351
  "div",
1349
1352
  {
1350
1353
  key: 0,
1351
1354
  ref_key: "popupRef",
1352
- ref: g,
1353
- style: Z(u(s)),
1355
+ ref: c,
1356
+ style: Z(u(i)),
1354
1357
  class: "ai-blueking-render-popup",
1355
- onMousedown: z[0] || (z[0] = F(() => {
1358
+ onMousedown: C[0] || (C[0] = q(() => {
1356
1359
  }, ["prevent"]))
1357
1360
  },
1358
1361
  [
@@ -1360,22 +1363,22 @@ const pt = /* @__PURE__ */ q({
1360
1363
  P(" AI图标按钮 "),
1361
1364
  h("div", {
1362
1365
  class: "popup-icon-btn",
1363
- onClick: E
1366
+ onClick: M
1364
1367
  }, ro),
1365
1368
  P(" 快捷按钮组 "),
1366
1369
  h("div", uo, [
1367
1370
  (p(!0), f(
1368
1371
  U,
1369
1372
  null,
1370
- oe(u(c), (T, V) => (p(), f("div", {
1373
+ oe(u(z), (V, D) => (p(), f("div", {
1371
1374
  class: "shortcut-btn",
1372
- key: V,
1373
- onClick: (Y) => M(T)
1375
+ key: D,
1376
+ onClick: (m) => T(V)
1374
1377
  }, [
1375
1378
  h(
1376
1379
  "span",
1377
1380
  po,
1378
- A(T.label),
1381
+ A(V.label),
1379
1382
  1
1380
1383
  /* TEXT */
1381
1384
  )
@@ -1390,7 +1393,7 @@ const pt = /* @__PURE__ */ q({
1390
1393
  /* STYLE, NEED_HYDRATION */
1391
1394
  )) : P("v-if", !0);
1392
1395
  }
1393
- }), go = /* @__PURE__ */ W(mo, [["__scopeId", "data-v-7edbd505"]]), Po = /* @__PURE__ */ q({
1396
+ }), go = /* @__PURE__ */ W(mo, [["__scopeId", "data-v-ba2db6e8"]]), Po = /* @__PURE__ */ F({
1394
1397
  __name: "ai-blueking",
1395
1398
  props: {
1396
1399
  messages: {},
@@ -1415,103 +1418,108 @@ const pt = /* @__PURE__ */ q({
1415
1418
  enablePopup: { type: Boolean, default: !0 }
1416
1419
  },
1417
1420
  emits: ["send", "clear", "close", "scroll-load", "stop", "ai-click", "change-prompt", "update:model", "choose-prompt", "update:isShow", "shortcut-click"],
1418
- setup(o, { expose: n, emit: e }) {
1421
+ setup(o, { expose: l, emit: e }) {
1419
1422
  Qe(He, o.enablePopup);
1420
- const s = e, i = I(), t = (d) => {
1423
+ const n = e, i = Y(), t = (r) => {
1421
1424
  var k;
1422
- (k = i.value) == null || k.setInputMessage(d);
1425
+ (k = i.value) == null || k.setInputMessage(r);
1423
1426
  }, g = () => {
1424
- s("update:isShow", !0);
1427
+ n("update:isShow", !0);
1425
1428
  }, c = () => {
1426
- s("clear");
1427
- }, L = () => {
1428
- s("update:isShow", !1), s("close");
1429
- }, E = (d) => {
1430
- s("update:model", d);
1431
- }, M = (d) => {
1432
- s("send", d);
1433
- }, C = () => {
1434
- s("stop");
1429
+ n("clear");
1435
1430
  }, z = () => {
1436
- s("scroll-load");
1437
- }, T = (d) => {
1438
- s("ai-click", d);
1439
- }, V = (d) => {
1440
- s("choose-prompt", d);
1441
- }, Y = (d) => {
1442
- s("change-prompt", d);
1443
- }, m = (d) => {
1444
- s("stop"), s("update:isShow", !0), s("send", d);
1445
- }, S = (d, k) => {
1446
- s("stop"), s("update:isShow", !0);
1447
- const a = fe.find((B) => B.key === d);
1431
+ n("update:isShow", !1), n("close");
1432
+ }, E = (r) => {
1433
+ n("update:model", r);
1434
+ }, M = (r) => {
1435
+ n("send", r);
1436
+ }, T = () => {
1437
+ n("stop");
1438
+ }, L = () => {
1439
+ n("scroll-load");
1440
+ }, C = (r) => {
1441
+ n("ai-click", r);
1442
+ }, V = (r) => {
1443
+ n("choose-prompt", r);
1444
+ }, D = (r) => {
1445
+ n("change-prompt", r);
1446
+ }, m = (r) => {
1447
+ n("stop"), n("update:isShow", !0), n("send", {
1448
+ cite: r.cite,
1449
+ prompt: r.prompt,
1450
+ content: r.label
1451
+ }), n("shortcut-click", r);
1452
+ }, S = (r, k) => {
1453
+ n("stop"), n("update:isShow", !0);
1454
+ const a = ie.find((B) => B.key === r);
1448
1455
  if (!a)
1449
1456
  return;
1450
- const v = a.prompt, w = a.label, b = ve(v, k);
1451
- b && s("send", {
1457
+ const v = a.prompt, w = a.label, b = fe(v, k);
1458
+ b && n("send", {
1452
1459
  cite: k,
1453
1460
  // 原始内容,用于引用
1454
1461
  prompt: b,
1455
1462
  // 处理后的完整提示语
1456
1463
  content: w
1457
1464
  });
1458
- }, H = (d) => {
1459
- s("shortcut-click", d);
1465
+ }, H = (r) => {
1466
+ n("shortcut-click", r);
1460
1467
  };
1461
- return n({
1468
+ return l({
1462
1469
  setInputMessage: t,
1463
1470
  quickActions: S
1464
- }), (d, k) => (p(), f(
1471
+ }), (r, k) => (p(), f(
1465
1472
  U,
1466
1473
  null,
1467
1474
  [
1468
- j(D(so, {
1469
- "head-background": d.headBackground,
1470
- loading: d.loading,
1471
- logo: d.logo,
1472
- model: d.model,
1473
- models: d.models,
1474
- name: d.name,
1475
- "position-limit": d.positionLimit,
1476
- "size-limit": d.sizeLimit,
1477
- "start-position": d.startPosition,
1475
+ j(I(so, {
1476
+ "head-background": r.headBackground,
1477
+ loading: r.loading,
1478
+ logo: r.logo,
1479
+ model: r.model,
1480
+ models: r.models,
1481
+ name: r.name,
1482
+ "position-limit": r.positionLimit,
1483
+ "size-limit": r.sizeLimit,
1484
+ "start-position": r.startPosition,
1478
1485
  onChooseModel: E,
1479
1486
  onClear: c,
1480
- onClose: L
1487
+ onClose: z
1481
1488
  }, {
1482
1489
  default: $(() => [
1483
- D(oo, {
1490
+ I(oo, {
1484
1491
  ref_key: "contentRef",
1485
1492
  ref: i,
1486
- alert: d.alert,
1487
- background: d.background,
1488
- loading: d.loading,
1489
- messages: d.messages,
1490
- placeholder: d.placeholder,
1491
- prompts: d.prompts,
1492
- "scroll-loading": d.scrollLoading,
1493
- "scroll-loading-end": d.scrollLoadingEnd,
1494
- shortcuts: d.shortcuts,
1495
- "user-photo": d.userPhoto,
1496
- onAiClick: T,
1497
- onChangePrompt: Y,
1493
+ alert: r.alert,
1494
+ background: r.background,
1495
+ loading: r.loading,
1496
+ messages: r.messages,
1497
+ placeholder: r.placeholder,
1498
+ prompts: r.prompts,
1499
+ "scroll-loading": r.scrollLoading,
1500
+ "scroll-loading-end": r.scrollLoadingEnd,
1501
+ shortcuts: r.shortcuts,
1502
+ "user-photo": r.userPhoto,
1503
+ onAiClick: C,
1504
+ onChangePrompt: D,
1498
1505
  onChoosePrompt: V,
1499
- onScrollLoad: z,
1506
+ onScrollLoad: L,
1500
1507
  onSend: M,
1501
1508
  onShortcutClick: H,
1502
- onStop: C
1509
+ onStop: T
1503
1510
  }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "shortcuts", "user-photo"])
1504
1511
  ]),
1505
1512
  _: 1
1506
1513
  /* STABLE */
1507
1514
  }, 8, ["head-background", "loading", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1508
- [Se, d.isShow]
1515
+ [Se, r.isShow]
1509
1516
  ]),
1510
- d.enablePopup !== !1 ? (p(), K(go, {
1517
+ r.enablePopup !== !1 ? (p(), K(go, {
1511
1518
  key: 0,
1519
+ shortcuts: r.shortcuts || u(ie),
1512
1520
  onClick: g,
1513
1521
  onShortcutClick: m
1514
- })) : P("v-if", !0)
1522
+ }, null, 8, ["shortcuts"])) : P("v-if", !0)
1515
1523
  ],
1516
1524
  64
1517
1525
  /* STABLE_FRAGMENT */
@@ -1525,7 +1533,7 @@ const pt = /* @__PURE__ */ q({
1525
1533
  });
1526
1534
  })();
1527
1535
  const vo = (o) => {
1528
- let n = `<section class="knowledge-head click-close">
1536
+ let l = `<section class="knowledge-head click-close">
1529
1537
  <svg
1530
1538
  class="ai-blueking-wenzhang"
1531
1539
  >
@@ -1536,20 +1544,20 @@ const vo = (o) => {
1536
1544
  </section>
1537
1545
  <ul class="knowledge-body">`;
1538
1546
  return o.forEach((e) => {
1539
- const { file_path: l, path: s } = e.metadata, i = l.split("/").pop();
1540
- n += `<li
1547
+ const { file_path: s, path: n } = e.metadata, i = s.split("/").pop();
1548
+ l += `<li
1541
1549
  class="knowledge-item"
1542
- title="${i} (${s})"
1550
+ title="${i} (${n})"
1543
1551
  >
1544
1552
  <i class="ai-blueking-icon ai-blueking-zhishiku"></i>
1545
- <a href="${s}" target="_blank" class="knowledge-link ai-clickable g-flex-truncate"
1546
- data-ai='{"type": "knowledge-link", "data": {"path": "${s}", "title": "${i}"}}'
1553
+ <a href="${n}" target="_blank" class="knowledge-link ai-clickable g-flex-truncate"
1554
+ data-ai='{"type": "knowledge-link", "data": {"path": "${n}", "title": "${i}"}}'
1547
1555
  >
1548
1556
  ${i}
1549
1557
  </a>
1550
- <span class="knowledge-path g-flex-truncate">${s}</span>
1558
+ <span class="knowledge-path g-flex-truncate">${n}</span>
1551
1559
  </li>`;
1552
- }), n += "</ul>", n;
1560
+ }), l += "</ul>", l;
1553
1561
  }, fo = `.knowledge-tips {
1554
1562
  position: relative;
1555
1563
  padding: 6px 8px;
@@ -1684,34 +1692,34 @@ class ko {
1684
1692
  this.styleEle && (this.styleEle.remove(), this.styleEle = null);
1685
1693
  }
1686
1694
  }
1687
- const yo = (o, n, e) => {
1688
- let l = o === "内容正在生成中..." ? "" : o;
1689
- if (console.log("getHtmlContentFromThink", n, l), !l.includes('<section class="think-head click-close">'))
1690
- l += `<section class="think-head click-close">
1695
+ const yo = (o, l, e) => {
1696
+ let s = o === "内容正在生成中..." ? "" : o;
1697
+ if (!s.includes('<section class="think-head click-close">'))
1698
+ s += `<section class="think-head click-close">
1691
1699
  <i class="ai-blueking-icon ai-blueking-sikao"></i>思考中...<i class="ai-blueking-icon ai-blueking-angle-up"></i>
1692
1700
  </section>
1693
1701
  <section class="think-body">
1694
- ${n}
1702
+ ${l}
1695
1703
  </section>`;
1696
1704
  else {
1697
- const s = l.match(/<section class="think-body">([\s\S]*?)<\/section>/);
1698
- if (s) {
1699
- const i = s[1], t = i.replace(/\n$/g, `${n}
1705
+ const n = s.match(/<section class="think-body">([\s\S]*?)<\/section>/);
1706
+ if (n) {
1707
+ const i = n[1], t = i.replace(/\n$/g, `${l}
1700
1708
  `);
1701
- l = l.replace(i, t);
1709
+ s = s.replace(i, t);
1702
1710
  }
1703
1711
  }
1704
- return e && (l = l.replace("思考中...", `已完成思考 (耗时:${$e(e)})`)), l;
1712
+ return e && (s = s.replace("思考中...", `已完成思考 (耗时:${$e(e)})`)), s;
1705
1713
  }, To = (o) => {
1706
- const n = o === "正在思考...", e = o.match(/<section class="think-body">([\s\S]*?)<\/section>/), l = e && e[1].trim() === "";
1707
- return console.log("isThinking", o, n, l), n || l;
1714
+ const l = o === "正在思考...", e = o.match(/<section class="think-body">([\s\S]*?)<\/section>/), s = e && e[1].trim() === "";
1715
+ return l || s;
1708
1716
  };
1709
1717
  class wo {
1710
1718
  constructor() {
1711
1719
  X(this, "styleEle", null);
1712
1720
  }
1713
1721
  addStyle() {
1714
- const n = `.think-head {
1722
+ const l = `.think-head {
1715
1723
  display: flex;
1716
1724
  align-items: center;
1717
1725
  padding: 0 8px 0 6px;
@@ -1760,14 +1768,14 @@ class wo {
1760
1768
  margin-bottom: 8px;
1761
1769
  }
1762
1770
  }`;
1763
- this.styleEle = document.createElement("style"), this.styleEle.textContent = n, document.head.appendChild(this.styleEle);
1771
+ this.styleEle = document.createElement("style"), this.styleEle.textContent = l, document.head.appendChild(this.styleEle);
1764
1772
  }
1765
1773
  removeStyle() {
1766
1774
  this.styleEle && (this.styleEle.remove(), this.styleEle = null);
1767
1775
  }
1768
1776
  }
1769
1777
  class Vo {
1770
- constructor(n, e, l, s, i, t) {
1778
+ constructor(l, e, s, n, i, t) {
1771
1779
  X(this, "controllerMap");
1772
1780
  X(this, "handleEnd");
1773
1781
  X(this, "handleError");
@@ -1777,64 +1785,64 @@ class Vo {
1777
1785
  X(this, "styleManager");
1778
1786
  X(this, "thinkStyleManager");
1779
1787
  X(this, "url");
1780
- this.url = n, this.handleStart = e, this.handleReceiveMessage = l, this.handleEnd = s, this.handleError = i, this.styleManager = new ko(), this.thinkStyleManager = new wo(), this.styleManager.addStyle(), this.thinkStyleManager.addStyle(), this.controllerMap = {}, this.messages = t;
1788
+ this.url = l, this.handleStart = e, this.handleReceiveMessage = s, this.handleEnd = n, this.handleError = i, this.styleManager = new ko(), this.thinkStyleManager = new wo(), this.styleManager.addStyle(), this.thinkStyleManager.addStyle(), this.controllerMap = {}, this.messages = t;
1781
1789
  }
1782
1790
  destroy() {
1783
1791
  this.styleManager.removeStyle(), this.thinkStyleManager.removeStyle();
1784
1792
  }
1785
- stop(n) {
1786
- var e, l;
1787
- return (l = (e = this.controllerMap[n]) == null ? void 0 : e.abort) == null || l.call(e), this.handleEnd(n);
1793
+ stop(l) {
1794
+ var e, s;
1795
+ return (s = (e = this.controllerMap[l]) == null ? void 0 : e.abort) == null || s.call(e), this.handleEnd(l);
1788
1796
  }
1789
- async stream(n, e, l) {
1790
- const s = new AbortController();
1791
- this.controllerMap[e] = s, fetch(this.url, {
1797
+ async stream(l, e, s) {
1798
+ const n = new AbortController();
1799
+ this.controllerMap[e] = n, fetch(this.url, {
1792
1800
  method: "post",
1793
- signal: s.signal,
1801
+ signal: n.signal,
1794
1802
  headers: {
1795
1803
  "Content-Type": "application/json",
1796
- ...l
1804
+ ...s
1797
1805
  },
1798
1806
  mode: "cors",
1799
1807
  credentials: "include",
1800
- body: JSON.stringify(n)
1808
+ body: JSON.stringify(l)
1801
1809
  }).then(async (i) => {
1802
1810
  const t = i.body.pipeThrough(new window.TextDecoderStream()).getReader();
1803
1811
  let g = "";
1804
1812
  for (; ; )
1805
1813
  try {
1806
- const { value: c, done: L } = await t.read();
1814
+ const { value: c, done: z } = await t.read();
1807
1815
  if (!i.ok) {
1808
1816
  this.handleError(c || i.statusText, i.status, e);
1809
1817
  break;
1810
1818
  }
1811
- if (L) {
1819
+ if (z) {
1812
1820
  this.handleEnd(e);
1813
1821
  break;
1814
1822
  }
1815
1823
  g += c, g.toString().split(`
1816
1824
  `).forEach((M) => {
1817
- const C = M.replace("data:", "").trim();
1818
- if (Ze(C)) {
1819
- const { event: z, content: T, cover: V, documents: Y, result: m, code: S, message: H, elapsed_time: d } = JSON.parse(C);
1825
+ const T = M.replace("data:", "").trim();
1826
+ if (Ze(T)) {
1827
+ const { event: L, content: C, cover: V, documents: D, result: m, code: S, message: H, elapsed_time: r } = JSON.parse(T);
1820
1828
  if (m === !1 || i.status !== 200) {
1821
1829
  this.handleError(H, S, e);
1822
1830
  return;
1823
1831
  }
1824
- switch (z) {
1832
+ switch (L) {
1825
1833
  case "text":
1826
- this.handleReceiveMessage(T, e, V);
1834
+ this.handleReceiveMessage(C, e, V);
1827
1835
  break;
1828
1836
  case "reference_doc":
1829
- const k = vo(Y);
1837
+ const k = vo(D);
1830
1838
  this.handleReceiveMessage(k, e, V);
1831
1839
  break;
1832
1840
  case "think":
1833
- const a = this.messages.at(-1), v = yo((a == null ? void 0 : a.content) || "", T, d);
1834
- console.log("currentMessage", a), a && (a.content = v);
1841
+ const a = this.messages.at(-1), v = yo((a == null ? void 0 : a.content) || "", C, r);
1842
+ a && (a.content = v);
1835
1843
  break;
1836
1844
  case "done":
1837
- this.handleEnd(e, V ? T : "");
1845
+ this.handleEnd(e, V ? C : "");
1838
1846
  break;
1839
1847
  case "error":
1840
1848
  this.handleError(H, S, e);
@@ -1844,8 +1852,8 @@ class Vo {
1844
1852
  g = M;
1845
1853
  });
1846
1854
  } catch (c) {
1847
- const L = c;
1848
- (L == null ? void 0 : L.code) !== 20 && this.handleError(L.message || "Unknown error", L.code || 500, e);
1855
+ const z = c;
1856
+ (z == null ? void 0 : z.code) !== 20 && this.handleError(z.message || "Unknown error", z.code || 500, e);
1849
1857
  break;
1850
1858
  }
1851
1859
  }).catch((i) => {
@@ -1853,7 +1861,7 @@ class Vo {
1853
1861
  }), await this.handleStart(e);
1854
1862
  }
1855
1863
  }
1856
- qe({
1864
+ Fe({
1857
1865
  prefix: "bk"
1858
1866
  });
1859
1867
  export {