@blueking/ai-blueking 0.3.3 → 0.3.5

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 ze = Object.defineProperty;
2
2
  var Ce = (o, n, t) => n in o ? ze(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
3
- var Q = (o, n, t) => (Ce(o, typeof n != "symbol" ? n + "" : n, t), t);
3
+ var U = (o, n, t) => (Ce(o, typeof n != "symbol" ? n + "" : n, t), t);
4
4
  import { Popover as Be, Input as he, Exception as He, clickoutside as Te, bkTooltips as ue, Tag as Pe, Alert as Re, Button as Ve, Message as me, Select as ge, provideGlobalConfig as De } from "bkui-vue";
5
- import { ref as x, onMounted as ne, onBeforeUnmount as le, defineComponent as Y, withDirectives as A, openBlock as h, createElementBlock as g, createElementVNode as d, toDisplayString as P, unref as r, createCommentVNode as z, vShow as fe, createTextVNode as ee, pushScopeId as ae, popScopeId as ie, computed as E, normalizeStyle as j, normalizeClass as $, createVNode as T, Fragment as q, watch as be, createBlock as X, withCtx as W, renderList as ce, nextTick as ye, withModifiers as D, onBeforeMount as xe, renderSlot as Ye } from "vue";
5
+ import { ref as x, onMounted as ne, onBeforeUnmount as le, defineComponent as Y, withDirectives as A, openBlock as m, createElementBlock as g, createElementVNode as d, toDisplayString as P, unref as r, createCommentVNode as M, vShow as fe, createTextVNode as ee, pushScopeId as ae, popScopeId as ie, computed as E, normalizeStyle as Q, normalizeClass as $, createVNode as T, Fragment as q, watch as be, createBlock as X, withCtx as W, renderList as ce, nextTick as ye, withModifiers as D, onBeforeMount as xe, renderSlot as Ye } from "vue";
6
6
  import se from "dayjs";
7
7
  import ve from "highlight.js";
8
8
  import Ie from "markdown-it";
@@ -36,15 +36,15 @@ function pe() {
36
36
  const c = window.getSelection();
37
37
  if (c && c.toString().trim().length > 0) {
38
38
  de.value = !1;
39
- const k = c.getRangeAt(0).getBoundingClientRect(), R = window.innerWidth;
39
+ const k = c.getRangeAt(0).getBoundingClientRect(), C = window.innerWidth;
40
40
  _.value = c.toString().trim();
41
- const w = 80, C = 34, L = 10;
42
- let B = k.left + window.scrollX + k.width / 2 - w / 2;
43
- B = Math.max(L, Math.min(B, R - w - L));
44
- let p = k.top + window.scrollY - C - L;
45
- k.top > C + L || (p = k.bottom + window.scrollY + L), n.value = {
46
- top: `${p}px`,
47
- left: `${B}px`
41
+ const w = 80, B = 34, z = 10;
42
+ let H = k.left + window.scrollX + k.width / 2 - w / 2;
43
+ H = Math.max(z, Math.min(H, C - w - z));
44
+ let u = k.top + window.scrollY - B - z;
45
+ k.top > B + z || (u = k.bottom + window.scrollY + z), n.value = {
46
+ top: `${u}px`,
47
+ left: `${H}px`
48
48
  }, o.value = !0;
49
49
  } else
50
50
  i();
@@ -138,7 +138,7 @@ const Xe = [
138
138
  },
139
139
  emits: ["close"],
140
140
  setup(o) {
141
- return (n, t) => A((h(), g(
141
+ return (n, t) => A((m(), g(
142
142
  "section",
143
143
  We,
144
144
  [
@@ -156,11 +156,11 @@ const Xe = [
156
156
  1
157
157
  /* TEXT */
158
158
  ),
159
- n.showCloseIcon ? (h(), g("i", {
159
+ n.showCloseIcon ? (m(), g("i", {
160
160
  key: 0,
161
161
  class: "ai-blueking-icon ai-blueking-close-circle-fill",
162
162
  onClick: t[0] || (t[0] = (s) => n.$emit("close"))
163
- })) : z("v-if", !0)
163
+ })) : M("v-if", !0)
164
164
  ],
165
165
  512
166
166
  /* NEED_PATCH */
@@ -183,7 +183,7 @@ const Xe = [
183
183
  __name: "render-back",
184
184
  setup(o) {
185
185
  const { isShow: n, scrollToBottom: t } = ke();
186
- return (s, i) => r(n) ? (h(), g("span", {
186
+ return (s, i) => r(n) ? (m(), g("span", {
187
187
  key: 0,
188
188
  class: "ai-blueking-render-back",
189
189
  onClick: i[0] || (i[0] = //@ts-ignore
@@ -195,7 +195,7 @@ const Xe = [
195
195
  1
196
196
  /* TEXT */
197
197
  )
198
- ])) : z("v-if", !0);
198
+ ])) : M("v-if", !0);
199
199
  }
200
200
  }), _e = /* @__PURE__ */ I(Fe, [["__scopeId", "data-v-a8d839da"]]), $e = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAH3tJREFUeF69nAd4VFXax39nStqkNxJC6KGDghQFXIosogGkCKKuFYVFFBVQXEEN69pFF5VFFGRFUelSFUQjCFIUkN5LIIH0hGSSSabd7zln5sIkhBRwv8MzzwBz7yn/8/b3PUfwP2iaphkAgxDC6du9pmmxQFugKdACaAU0BkKBEO9HvlLs/RQBZ4AjwDHgFHBQCJFdqV8T4BZCuP/s5Yg/s0NN02R/Ehw5WU32rWmaBGMI0ANoDTQHzNc4rgM4ARwGtgLfCiEkaHKcK8a+xjEqvPanAOSlGPQd9FLKX4FRgPz29xlVAucC5Nj6R/9Zn48C19vk3/WP0fuO/ls58APwjfzWKavyfK4HqOsGyHcymqZFAGOA0UCSd2FyDAWK91kvKAJR99F1oCQr6WDJ/5M9HQfmAZ8IIQr+LJDqPkV9Wz0kLSTVaJom5YcEZQoQ5wVELkI94yV/+XCFzdRXdh077EtdBjmOppFpMIi3JFhCiGIvUJrO8nUd65oA0ilBCCGp4jbgdaCrDyvIicsdRvMyi8QmO7eEwoIyTCYD0ZGBhIYF1HW+VT6vaZocx2UwqB0QbrcCaqfRKP4hhPhJ0zQ5FwlSnYV4nQGSg3mBsQCvARO8lCLlihTQl/qU4Chgsq18tmAvP/x4kvMZxZjMBholhvPKtL/QpXOCFLBXUFdtkdPfdbs1CgrLMBqFFh4WoFjQ7dY0g0F8AEwVQpToc69t3/K5OgGkaZpJqm5N01oC/wVu9gpc2ZeimEuS1bvoUpuDJ59ex9Llh4mIDFTA2MrsFBaWMeejZPr2aYpcnMFQp6moYfT3jh3P44uF+9h/MFsCRJfO9fnbvR1cDRJCcWsYDYLtwMNCiKP6GmoLUq1n5UM5dwILgCgvOBWA0QfWJ79qzV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DyXvAkOCzdbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=";
201
201
  var Le = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.System = "system", o.User = "user", o))(Le || {}), oe = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(oe || {});
@@ -216,17 +216,17 @@ const et = /* @__PURE__ */ Y({
216
216
  fontSize: `${n.size * 0.611}px`
217
217
  // 保持原比例 22/36
218
218
  }));
219
- return (i, l) => (h(), g(
219
+ return (i, l) => (m(), g(
220
220
  "span",
221
221
  {
222
- style: j(t.value),
222
+ style: Q(t.value),
223
223
  class: "message-photo ai"
224
224
  },
225
225
  [
226
226
  d(
227
227
  "i",
228
228
  {
229
- style: j(s.value),
229
+ style: Q(s.value),
230
230
  class: "ai-blueking-icon ai-blueking-ai"
231
231
  },
232
232
  null,
@@ -296,30 +296,30 @@ const et = /* @__PURE__ */ Y({
296
296
  const e = se(t.message.time), c = se();
297
297
  return t.message.time ? c.isSame(e, "year") ? e.format("MM-DD HH:mm:ss") : e.format("YYYY-MM-DD HH:mm:ss") : "";
298
298
  });
299
- return (e, c) => (h(), g(
299
+ return (e, c) => (m(), g(
300
300
  "li",
301
301
  {
302
302
  class: $([e.message.role, "message-main"])
303
303
  },
304
304
  [
305
- e.message.cite ? (h(), g("div", ot, [
305
+ e.message.cite ? (m(), g("div", ot, [
306
306
  T(we, {
307
307
  text: e.message.cite
308
308
  }, null, 8, ["text"])
309
- ])) : z("v-if", !0),
309
+ ])) : M("v-if", !0),
310
310
  d("div", st, [
311
- e.message.role === r(Le).User ? (h(), g(
311
+ e.message.role === r(Le).User ? (m(), g(
312
312
  q,
313
313
  { key: 0 },
314
314
  [
315
315
  d("p", nt, [
316
- l.value ? (h(), g(
316
+ l.value ? (m(), g(
317
317
  "span",
318
318
  lt,
319
319
  P(l.value),
320
320
  1
321
321
  /* TEXT */
322
- )) : z("v-if", !0),
322
+ )) : M("v-if", !0),
323
323
  d("span", {
324
324
  class: "markdown-message",
325
325
  innerHTML: i.value
@@ -331,20 +331,20 @@ const et = /* @__PURE__ */ Y({
331
331
  ],
332
332
  64
333
333
  /* STABLE_FRAGMENT */
334
- )) : (h(), g(
334
+ )) : (m(), g(
335
335
  q,
336
336
  { key: 1 },
337
337
  [
338
338
  T(tt),
339
339
  d("p", rt, [
340
- l.value ? (h(), g(
340
+ l.value ? (m(), g(
341
341
  "span",
342
342
  dt,
343
343
  P(l.value),
344
344
  1
345
345
  /* TEXT */
346
- )) : z("v-if", !0),
347
- s.value ? (h(), g(
346
+ )) : M("v-if", !0),
347
+ s.value ? (m(), g(
348
348
  "i",
349
349
  {
350
350
  key: 1,
@@ -353,15 +353,15 @@ const et = /* @__PURE__ */ Y({
353
353
  null,
354
354
  2
355
355
  /* CLASS */
356
- )) : z("v-if", !0),
357
- e.message.status === r(oe).Loading ? (h(), g("svg", ut, ht)) : z("v-if", !0),
358
- e.message.status === r(oe).Error ? (h(), g(
356
+ )) : M("v-if", !0),
357
+ e.message.status === r(oe).Loading ? (m(), g("svg", ut, ht)) : M("v-if", !0),
358
+ e.message.status === r(oe).Error ? (m(), g(
359
359
  "span",
360
360
  mt,
361
361
  P(e.message.content),
362
362
  1
363
363
  /* TEXT */
364
- )) : (h(), g("span", {
364
+ )) : (m(), g("span", {
365
365
  key: 4,
366
366
  innerHTML: i.value,
367
367
  class: $({
@@ -389,46 +389,46 @@ const et = /* @__PURE__ */ Y({
389
389
  },
390
390
  emits: ["update:value", "enter", "choose-prompt"],
391
391
  setup(o, { emit: n }) {
392
- const t = o, s = n, i = Te, l = ue, { selectedText: e, lockSelectedText: c } = pe(), u = x(""), k = x(40), R = x(), w = x(!1), C = E(() => {
392
+ const t = o, s = n, i = Te, l = ue, { selectedText: e, lockSelectedText: c } = pe(), h = x(""), k = x(40), C = x(), w = x(!1), B = E(() => {
393
393
  var v;
394
- return ((v = t.prompts) == null ? void 0 : v.filter((S) => S.content.includes(u.value))) || [];
395
- }), L = E(() => {
394
+ return ((v = t.prompts) == null ? void 0 : v.filter((L) => L.content.includes(h.value))) || [];
395
+ }), z = E(() => {
396
396
  var v;
397
397
  return t.placeholder ? t.placeholder : (v = t.prompts) != null && v.length ? b("您可以键入 “/” 查看更多Prompt") : b("请输入");
398
- }), B = (v) => {
398
+ }), H = (v) => {
399
399
  s("update:value", v);
400
- }, p = () => {
400
+ }, u = () => {
401
401
  var v;
402
- t.value === "/" && ((v = t.prompts) != null && v.length) ? f() : y();
403
- }, H = () => {
402
+ t.value === "/" && ((v = t.prompts) != null && v.length) ? y() : j();
403
+ }, R = () => {
404
404
  ye(() => {
405
- var S;
406
- const v = (S = R.value) == null ? void 0 : S.$el.querySelector("textarea");
405
+ var L;
406
+ const v = (L = C.value) == null ? void 0 : L.$el.querySelector("textarea");
407
407
  (v == null ? void 0 : v.scrollHeight) > 40 && t.value ? k.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : k.value = 40;
408
408
  });
409
409
  }, G = (v) => {
410
- s("update:value", v.content), s("choose-prompt", v), y(), K();
411
- }, J = (v, S) => {
412
- S.key === "Enter" && !S.shiftKey && (S.preventDefault(), s("enter"));
410
+ s("update:value", v.content), s("choose-prompt", v), j(), p();
411
+ }, J = (v, L) => {
412
+ L.key === "Enter" && !L.shiftKey && (L.preventDefault(), s("enter"));
413
413
  }, Z = () => {
414
- B("");
415
- }, K = () => {
416
- var S;
417
- const v = (S = R.value) == null ? void 0 : S.$el.querySelector("textarea");
414
+ H("");
415
+ }, p = () => {
416
+ var L;
417
+ const v = (L = C.value) == null ? void 0 : L.$el.querySelector("textarea");
418
418
  v == null || v.focus();
419
- }, m = () => {
420
- e.value && (c.value = !0);
421
419
  }, f = () => {
422
- w.value = !0;
420
+ e.value && (c.value = !0);
423
421
  }, y = () => {
422
+ w.value = !0;
423
+ }, j = () => {
424
424
  w.value = !1;
425
425
  };
426
426
  return be(
427
427
  () => t.value,
428
428
  () => {
429
- H(), p();
429
+ R(), u();
430
430
  }
431
- ), ne(K), (v, S) => (h(), X(r(Be), {
431
+ ), ne(p), (v, L) => (m(), X(r(Be), {
432
432
  width: "calc(100% - 118px)",
433
433
  "ext-cls": "empty-padding",
434
434
  arrow: !1,
@@ -443,33 +443,33 @@ const et = /* @__PURE__ */ Y({
443
443
  var te;
444
444
  return [
445
445
  d("div", null, [
446
- A((h(), g("section", ft, [
446
+ A((m(), g("section", ft, [
447
447
  T(r(he), {
448
448
  class: "input-search",
449
- modelValue: u.value,
450
- "onUpdate:modelValue": S[0] || (S[0] = (U) => u.value = U),
449
+ modelValue: h.value,
450
+ "onUpdate:modelValue": L[0] || (L[0] = (K) => h.value = K),
451
451
  behavior: "simplicity",
452
452
  clearable: ""
453
453
  }, null, 8, ["modelValue"]),
454
454
  d("section", bt, [
455
- (h(!0), g(
455
+ (m(!0), g(
456
456
  q,
457
457
  null,
458
- ce(C.value, (U, re) => A((h(), g("span", {
458
+ ce(B.value, (K, re) => A((m(), g("span", {
459
459
  class: "group-prompt",
460
460
  key: re,
461
- onClick: (a) => G(U)
461
+ onClick: (a) => G(K)
462
462
  }, [
463
463
  d(
464
464
  "span",
465
465
  kt,
466
- P(U.content),
466
+ P(K.content),
467
467
  1
468
468
  /* TEXT */
469
469
  )
470
470
  ], 8, yt)), [
471
471
  [r(l), {
472
- content: U.content,
472
+ content: K.content,
473
473
  placement: "right",
474
474
  theme: "light",
475
475
  width: 300,
@@ -479,7 +479,7 @@ const et = /* @__PURE__ */ Y({
479
479
  128
480
480
  /* KEYED_FRAGMENT */
481
481
  )),
482
- (te = C.value) != null && te.length ? z("v-if", !0) : (h(), X(r(He), {
482
+ (te = B.value) != null && te.length ? M("v-if", !0) : (m(), X(r(He), {
483
483
  key: 0,
484
484
  class: "exception-wrap-item exception-part",
485
485
  scene: "part",
@@ -487,7 +487,7 @@ const et = /* @__PURE__ */ Y({
487
487
  }))
488
488
  ])
489
489
  ])), [
490
- [r(i), y]
490
+ [r(i), j]
491
491
  ])
492
492
  ])
493
493
  ];
@@ -496,7 +496,7 @@ const et = /* @__PURE__ */ Y({
496
496
  d(
497
497
  "section",
498
498
  {
499
- style: j({
499
+ style: Q({
500
500
  "--text-height": k.value + "px"
501
501
  }),
502
502
  class: "send-prompt-container"
@@ -504,24 +504,24 @@ const et = /* @__PURE__ */ Y({
504
504
  [
505
505
  T(r(he), {
506
506
  ref_key: "inputRef",
507
- ref: R,
507
+ ref: C,
508
508
  class: "send-prompt",
509
509
  autosize: !1,
510
510
  clearable: !0,
511
511
  "model-value": v.value,
512
512
  "native-attributes": { autofocus: "autofocus" },
513
- placeholder: L.value,
513
+ placeholder: z.value,
514
514
  row: "1",
515
515
  type: "textarea",
516
- onFocus: m,
517
- onInput: B,
516
+ onFocus: f,
517
+ onInput: H,
518
518
  onKeydown: J
519
519
  }, null, 8, ["model-value", "placeholder"]),
520
- v.value ? (h(), X(r(Ee), {
520
+ v.value ? (m(), X(r(Ee), {
521
521
  key: 0,
522
522
  class: "show-clear-only-hover bk-input--clear-icon clear-icon",
523
523
  onClick: Z
524
- })) : z("v-if", !0)
524
+ })) : M("v-if", !0)
525
525
  ],
526
526
  4
527
527
  /* STYLE */
@@ -541,11 +541,11 @@ const et = /* @__PURE__ */ Y({
541
541
  const t = n, s = (i) => {
542
542
  t("select", i);
543
543
  };
544
- return (i, l) => (h(), g("ul", St, [
545
- (h(!0), g(
544
+ return (i, l) => (m(), g("ul", St, [
545
+ (m(!0), g(
546
546
  q,
547
547
  null,
548
- ce(i.shortcuts, (e) => (h(), X(r(Pe), {
548
+ ce(i.shortcuts, (e) => (m(), X(r(Pe), {
549
549
  class: "ai-blueking-shortcut",
550
550
  key: e.label,
551
551
  theme: "info",
@@ -589,7 +589,7 @@ const et = /* @__PURE__ */ Y({
589
589
  const t = n, s = () => {
590
590
  t("stop");
591
591
  };
592
- return (i, l) => i.isShow ? (h(), g("span", {
592
+ return (i, l) => i.isShow ? (m(), g("span", {
593
593
  key: 0,
594
594
  class: "ai-blueking-render-stop",
595
595
  onClick: s
@@ -600,7 +600,7 @@ const et = /* @__PURE__ */ Y({
600
600
  1
601
601
  /* TEXT */
602
602
  )
603
- ])) : z("v-if", !0);
603
+ ])) : M("v-if", !0);
604
604
  }
605
605
  }), Tt = /* @__PURE__ */ I(Ht, [["__scopeId", "data-v-fd57f18d"]]), Pt = {
606
606
  key: 0,
@@ -626,7 +626,7 @@ const et = /* @__PURE__ */ Y({
626
626
  (c) => Math.abs(s.diff(c, "minute")) < 10 && c !== n.message.time
627
627
  ) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], i.isSame(s, "day") ? s.format("HH:mm:ss") : i.subtract(1, "day").isSame(s, "week") ? b("昨天") + " " + s.format("HH:mm:ss") : i.isSame(s, "week") ? b("本周") + l[s.day()] + " " + s.format("HH:mm:ss") : i.subtract(1, "week").isSame(s, "week") ? b("上周") + l[s.day()] + " " + s.format("HH:mm:ss") : i.isSame(s, "year") ? s.format("MM-DD HH:mm:ss") : s.format("YYYY-MM-DD HH:mm:ss"));
628
628
  });
629
- return (s, i) => t.value ? (h(), g("section", Pt, [
629
+ return (s, i) => t.value ? (m(), g("section", Pt, [
630
630
  d(
631
631
  "span",
632
632
  Rt,
@@ -634,9 +634,9 @@ const et = /* @__PURE__ */ Y({
634
634
  1
635
635
  /* TEXT */
636
636
  )
637
- ])) : z("v-if", !0);
637
+ ])) : M("v-if", !0);
638
638
  }
639
- }), Dt = /* @__PURE__ */ I(Vt, [["__scopeId", "data-v-55c9a119"]]), Se = (o) => (ae("data-v-830cceda"), o = o(), ie(), o), xt = {
639
+ }), Dt = /* @__PURE__ */ I(Vt, [["__scopeId", "data-v-55c9a119"]]), Se = (o) => (ae("data-v-36d4ce8f"), o = o(), ie(), o), xt = {
640
640
  key: 0,
641
641
  width: "18",
642
642
  height: "18",
@@ -667,20 +667,21 @@ const et = /* @__PURE__ */ Y({
667
667
  placeholder: {},
668
668
  scrollLoading: { type: Boolean },
669
669
  scrollLoadingEnd: { type: Boolean, default: !0 },
670
- alert: {}
670
+ alert: {},
671
+ shortcuts: { default: () => Xe }
671
672
  },
672
673
  emits: ["ai-click", "send", "choose-prompt", "scroll-load", "stop"],
673
674
  setup(o, { expose: n, emit: t }) {
674
- const s = o, i = t, l = ue, e = x(""), { selectedText: c, clearSelection: u } = pe(), { isShow: k } = ke(), R = Xe, w = () => {
675
+ const s = o, i = t, l = ue, e = x(""), { selectedText: c, clearSelection: h } = pe(), { isShow: k } = ke(), C = () => {
675
676
  ye(() => {
676
- const m = document.querySelector(".ai-blueking-messages");
677
- m.scrollTop = m.scrollHeight;
677
+ const p = document.querySelector(".ai-blueking-messages");
678
+ p.scrollTop = p.scrollHeight;
678
679
  });
679
- }, C = Ue((m) => {
680
+ }, w = Ue((p) => {
680
681
  if (s.scrollLoading || s.scrollLoadingEnd)
681
682
  return;
682
- m.target.scrollTop < 200 && i("scroll-load");
683
- }), L = () => {
683
+ p.target.scrollTop < 200 && i("scroll-load");
684
+ }), B = () => {
684
685
  if (e.value) {
685
686
  if (s.loading) {
686
687
  me({ theme: "warning", message: b("内容正在执行中,请执行完成后再发送") });
@@ -691,31 +692,31 @@ const et = /* @__PURE__ */ Y({
691
692
  cite: c.value
692
693
  }), e.value = "", c.value = "";
693
694
  }
694
- }, B = (m) => {
695
- i("choose-prompt", m);
696
- }, p = () => {
695
+ }, z = (p) => {
696
+ i("choose-prompt", p);
697
+ }, H = () => {
697
698
  i("stop");
698
- }, H = (m) => {
699
- const f = m.target;
699
+ }, u = (p) => {
700
+ const f = p.target;
700
701
  if (f != null && f.classList.contains("ai-blueking-angle-up")) {
701
702
  const y = f == null ? void 0 : f.parentElement;
702
703
  y != null && y.classList.contains("closed") ? y == null || y.classList.remove("closed") : y == null || y.classList.add("closed");
703
704
  }
704
705
  f != null && f.classList.contains("ai-clickable") && i("ai-click", f.dataset.ai);
706
+ }, R = () => {
707
+ C(), document.addEventListener("click", u);
705
708
  }, G = () => {
706
- w(), document.addEventListener("click", H);
707
- }, J = () => {
708
- window.showTimes = [], document.removeEventListener("click", H);
709
- }, Z = (m) => {
710
- e.value = m;
711
- }, K = (m) => {
712
- const f = m.prompt.replace("{{ SELECTED_TEXT }}", c.value);
709
+ window.showTimes = [], document.removeEventListener("click", u);
710
+ }, J = (p) => {
711
+ e.value = p;
712
+ }, Z = (p) => {
713
+ const f = p.prompt.replace("{{ SELECTED_TEXT }}", c.value);
713
714
  if (s.loading) {
714
715
  me({ theme: "warning", message: b("内容正在执行中,请执行完成后再发送") });
715
716
  return;
716
717
  }
717
718
  i("send", {
718
- content: m.label,
719
+ content: p.label,
719
720
  cite: c.value,
720
721
  prompt: f
721
722
  }), c.value = "";
@@ -723,42 +724,42 @@ const et = /* @__PURE__ */ Y({
723
724
  return be(
724
725
  () => s.messages,
725
726
  () => {
726
- const m = document.querySelector(".ai-blueking-messages");
727
- (m == null ? void 0 : m.scrollTop) + (m == null ? void 0 : m.clientHeight) + 100 >= (m == null ? void 0 : m.scrollHeight) && w();
727
+ const p = document.querySelector(".ai-blueking-messages");
728
+ (p == null ? void 0 : p.scrollTop) + (p == null ? void 0 : p.clientHeight) + 100 >= (p == null ? void 0 : p.scrollHeight) && C();
728
729
  },
729
730
  {
730
731
  deep: !0
731
732
  }
732
- ), ne(G), le(J), n({
733
- setInputMessage: Z
734
- }), (m, f) => (h(), g(
733
+ ), ne(R), le(G), n({
734
+ setInputMessage: J
735
+ }), (p, f) => (m(), g(
735
736
  "section",
736
737
  {
737
- style: j({
738
- background: m.background
738
+ style: Q({
739
+ background: p.background
739
740
  }),
740
741
  class: "ai-content"
741
742
  },
742
743
  [
743
- m.alert ? (h(), X(r(Re), {
744
+ p.alert ? (m(), X(r(Re), {
744
745
  key: 0,
745
- title: m.alert,
746
+ title: p.alert,
746
747
  theme: "warning",
747
748
  closable: ""
748
- }, null, 8, ["title"])) : z("v-if", !0),
749
+ }, null, 8, ["title"])) : M("v-if", !0),
749
750
  d(
750
751
  "ul",
751
752
  {
752
753
  class: "ai-messages ai-blueking-messages",
753
754
  onScrollPassive: f[0] || (f[0] = //@ts-ignore
754
- (...y) => r(C) && r(C)(...y))
755
+ (...y) => r(w) && r(w)(...y))
755
756
  },
756
757
  [
757
- m.scrollLoading ? (h(), g("svg", xt, It)) : z("v-if", !0),
758
- (h(!0), g(
758
+ p.scrollLoading ? (m(), g("svg", xt, It)) : M("v-if", !0),
759
+ (m(!0), g(
759
760
  q,
760
761
  null,
761
- ce(m.messages, (y) => (h(), g(
762
+ ce(p.messages, (y) => (m(), g(
762
763
  q,
763
764
  {
764
765
  key: y.content
@@ -771,7 +772,7 @@ const et = /* @__PURE__ */ Y({
771
772
  T(vt, {
772
773
  class: "render-message",
773
774
  message: y,
774
- "user-photo": m.userPhoto
775
+ "user-photo": p.userPhoto
775
776
  }, null, 8, ["message", "user-photo"])
776
777
  ],
777
778
  64
@@ -795,15 +796,15 @@ const et = /* @__PURE__ */ Y({
795
796
  [
796
797
  T(_e),
797
798
  T(Tt, {
798
- "is-show": m.loading,
799
- onStop: p
799
+ "is-show": p.loading,
800
+ onStop: H
800
801
  }, null, 8, ["is-show"])
801
802
  ],
802
803
  32
803
804
  /* NEED_HYDRATION */
804
805
  ),
805
806
  d("section", Et, [
806
- r(c) ? (h(), g(
807
+ r(c) ? (m(), g(
807
808
  "div",
808
809
  {
809
810
  key: 0,
@@ -815,7 +816,7 @@ const et = /* @__PURE__ */ Y({
815
816
  T(we, {
816
817
  "show-close-icon": !0,
817
818
  text: r(c),
818
- onClose: r(u)
819
+ onClose: r(h)
819
820
  }, null, 8, ["text", "onClose"]),
820
821
  d(
821
822
  "span",
@@ -825,28 +826,28 @@ const et = /* @__PURE__ */ Y({
825
826
  /* TEXT */
826
827
  ),
827
828
  T(zt, {
828
- shortcuts: r(R),
829
- onSelect: K
829
+ shortcuts: p.shortcuts,
830
+ onSelect: Z
830
831
  }, null, 8, ["shortcuts"])
831
832
  ],
832
833
  34
833
834
  /* CLASS, NEED_HYDRATION */
834
- )) : z("v-if", !0),
835
+ )) : M("v-if", !0),
835
836
  d("section", qt, [
836
837
  T(Lt, {
837
838
  value: e.value,
838
839
  "onUpdate:value": f[3] || (f[3] = (y) => e.value = y),
839
- placeholder: m.placeholder,
840
- prompts: m.prompts,
841
- onChoosePrompt: B,
842
- onEnter: L
840
+ placeholder: p.placeholder,
841
+ prompts: p.prompts,
842
+ onChoosePrompt: z,
843
+ onEnter: B
843
844
  }, null, 8, ["value", "placeholder", "prompts"]),
844
- A((h(), X(r(Ve), {
845
+ A((m(), X(r(Ve), {
845
846
  class: "ai-operation-button",
846
- disabled: m.loading || !e.value,
847
+ disabled: p.loading || !e.value,
847
848
  size: "large",
848
849
  theme: "primary",
849
- onClick: L
850
+ onClick: B
850
851
  }, {
851
852
  default: W(() => [
852
853
  Kt,
@@ -861,7 +862,7 @@ const et = /* @__PURE__ */ Y({
861
862
  }, 8, ["disabled"])), [
862
863
  [r(l), {
863
864
  content: r(b)("内容正在执行中,请执行完成后再发送"),
864
- disabled: !m.loading
865
+ disabled: !p.loading
865
866
  }]
866
867
  ])
867
868
  ])
@@ -872,7 +873,7 @@ const et = /* @__PURE__ */ Y({
872
873
  /* STYLE */
873
874
  ));
874
875
  }
875
- }), Qt = /* @__PURE__ */ I(Ut, [["__scopeId", "data-v-830cceda"]]), jt = { class: "ai-modal-header-icon" }, Wt = /* @__PURE__ */ Y({
876
+ }), Qt = /* @__PURE__ */ I(Ut, [["__scopeId", "data-v-36d4ce8f"]]), jt = { class: "ai-modal-header-icon" }, Wt = /* @__PURE__ */ Y({
876
877
  __name: "render-modal",
877
878
  props: {
878
879
  headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
@@ -908,27 +909,27 @@ const et = /* @__PURE__ */ Y({
908
909
  clientX: 0,
909
910
  clientY: 0
910
911
  }, c = () => {
911
- var M, V, O, N;
912
+ var S, V, O, N;
912
913
  const a = (F, Me) => F === void 0 ? Me : F;
913
914
  return {
914
- top: a((M = t.startPosition) == null ? void 0 : M.top, l.height - t.sizeLimit.height),
915
+ top: a((S = t.startPosition) == null ? void 0 : S.top, l.height - t.sizeLimit.height),
915
916
  bottom: a((V = t.startPosition) == null ? void 0 : V.bottom, 0),
916
917
  left: a((O = t.startPosition) == null ? void 0 : O.left, 0),
917
918
  right: a((N = t.startPosition) == null ? void 0 : N.right, l.width - t.sizeLimit.width)
918
919
  };
919
- }, u = x(c()), k = E(() => u.value.top <= t.positionLimit.top && u.value.bottom <= t.positionLimit.bottom), R = (a) => {
920
+ }, h = x(c()), k = E(() => h.value.top <= t.positionLimit.top && h.value.bottom <= t.positionLimit.bottom), C = (a) => {
920
921
  s("choose-model", a);
921
922
  }, w = (a) => {
922
923
  e.isMove = !0, e.type = "move", e.clientX = a.clientX, e.clientY = a.clientY;
923
- }, C = (a) => {
924
+ }, B = (a) => {
924
925
  e.isMove = !0, e.type = "rightDrag", e.clientX = a.clientX;
925
- }, L = (a) => {
926
+ }, z = (a) => {
926
927
  e.isMove = !0, e.type = "leftDrag", e.clientX = a.clientX;
927
- }, B = (a) => {
928
+ }, H = (a) => {
928
929
  e.isMove = !0, e.type = "topDrag", e.clientY = a.clientY;
929
- }, p = (a) => {
930
+ }, u = (a) => {
930
931
  e.isMove = !0, e.type = "bottomDrag", e.clientY = a.clientY;
931
- }, H = (a) => {
932
+ }, R = (a) => {
932
933
  e.isMove = !0, e.type = "topLeftDrag", e.clientY = a.clientY, e.clientX = a.clientX;
933
934
  }, G = (a) => {
934
935
  e.isMove = !0, e.type = "topRightDrag", e.clientY = a.clientY, e.clientX = a.clientX;
@@ -936,42 +937,42 @@ const et = /* @__PURE__ */ Y({
936
937
  e.isMove = !0, e.type = "bottomLeftDrag", e.clientY = a.clientY, e.clientX = a.clientX;
937
938
  }, Z = (a) => {
938
939
  e.isMove = !0, e.type = "bottomRightDrag", e.clientY = a.clientY, e.clientX = a.clientX;
939
- }, K = () => {
940
+ }, p = () => {
940
941
  e.isMove = !1;
941
- }, m = (a, M) => {
942
- ["move", "leftDrag"].includes(e.type) && (u.value.left += a), ["move", "rightDrag"].includes(e.type) && (u.value.right -= a), ["move", "topDrag"].includes(e.type) && (u.value.top += M), ["move", "bottomDrag"].includes(e.type) && (u.value.bottom -= M), ["topLeftDrag"].includes(e.type) && (u.value.left += a, u.value.top += M), ["topRightDrag"].includes(e.type) && (u.value.right -= a, u.value.top += M), ["bottomLeftDrag"].includes(e.type) && (u.value.left += a, u.value.bottom -= M), ["bottomRightDrag"].includes(e.type) && (u.value.right -= a, u.value.bottom -= M);
943
- }, f = (a, M) => {
944
- const { top: V, bottom: O, left: N, right: F } = u.value;
945
- (l.width - N - F < t.sizeLimit.width || N < t.positionLimit.left || F < t.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(e.type) && (u.value.left -= a), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(e.type) && (u.value.right += a)), (l.height - V - O < t.sizeLimit.height || V < t.positionLimit.top || O < t.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(e.type) && (u.value.top -= M), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(e.type) && (u.value.bottom += M));
946
- }, y = (a) => {
942
+ }, f = (a, S) => {
943
+ ["move", "leftDrag"].includes(e.type) && (h.value.left += a), ["move", "rightDrag"].includes(e.type) && (h.value.right -= a), ["move", "topDrag"].includes(e.type) && (h.value.top += S), ["move", "bottomDrag"].includes(e.type) && (h.value.bottom -= S), ["topLeftDrag"].includes(e.type) && (h.value.left += a, h.value.top += S), ["topRightDrag"].includes(e.type) && (h.value.right -= a, h.value.top += S), ["bottomLeftDrag"].includes(e.type) && (h.value.left += a, h.value.bottom -= S), ["bottomRightDrag"].includes(e.type) && (h.value.right -= a, h.value.bottom -= S);
944
+ }, y = (a, S) => {
945
+ const { top: V, bottom: O, left: N, right: F } = h.value;
946
+ (l.width - N - F < t.sizeLimit.width || N < t.positionLimit.left || F < t.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(e.type) && (h.value.left -= a), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(e.type) && (h.value.right += a)), (l.height - V - O < t.sizeLimit.height || V < t.positionLimit.top || O < t.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(e.type) && (h.value.top -= S), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(e.type) && (h.value.bottom += S));
947
+ }, j = (a) => {
947
948
  if (!e.isMove)
948
949
  return;
949
950
  a.preventDefault();
950
- const M = a.clientX - e.clientX, V = a.clientY - e.clientY;
951
- m(M, V), f(M, V), e.clientX = a.clientX, e.clientY = a.clientY;
951
+ const S = a.clientX - e.clientX, V = a.clientY - e.clientY;
952
+ f(S, V), y(S, V), e.clientX = a.clientX, e.clientY = a.clientY;
952
953
  }, v = () => {
953
- l.height = window.innerHeight, l.width = window.innerWidth, u.value = c();
954
- }, S = () => {
955
- u.value.top = t.positionLimit.top, u.value.bottom = t.positionLimit.bottom;
954
+ l.height = window.innerHeight, l.width = window.innerWidth, h.value = c();
955
+ }, L = () => {
956
+ h.value.top = t.positionLimit.top, h.value.bottom = t.positionLimit.bottom;
956
957
  }, te = () => {
957
- u.value.top = l.height - t.sizeLimit.height, u.value.bottom = t.positionLimit.bottom;
958
- }, U = () => {
958
+ h.value.top = l.height - t.sizeLimit.height, h.value.bottom = t.positionLimit.bottom;
959
+ }, K = () => {
959
960
  s("clear");
960
961
  }, re = () => {
961
962
  s("close");
962
963
  };
963
964
  return xe(() => {
964
- window.addEventListener("mousemove", y, !0), window.addEventListener("mouseup", K), window.addEventListener("resize", v);
965
+ window.addEventListener("mousemove", j, !0), window.addEventListener("mouseup", p), window.addEventListener("resize", v);
965
966
  }), le(() => {
966
- window.removeEventListener("mousemove", y, !0), window.removeEventListener("mouseup", K), window.removeEventListener("resize", v);
967
- }), (a, M) => (h(), g(
967
+ window.removeEventListener("mousemove", j, !0), window.removeEventListener("mouseup", p), window.removeEventListener("resize", v);
968
+ }), (a, S) => (m(), g(
968
969
  "section",
969
970
  {
970
- style: j({
971
- top: u.value.top + "px",
972
- bottom: u.value.bottom + "px",
973
- left: u.value.left + "px",
974
- right: u.value.right + "px"
971
+ style: Q({
972
+ top: h.value.top + "px",
973
+ bottom: h.value.bottom + "px",
974
+ left: h.value.left + "px",
975
+ right: h.value.right + "px"
975
976
  }),
976
977
  class: "ai-modal"
977
978
  },
@@ -979,7 +980,7 @@ const et = /* @__PURE__ */ Y({
979
980
  d(
980
981
  "header",
981
982
  {
982
- style: j({
983
+ style: Q({
983
984
  background: a.headBackground
984
985
  }),
985
986
  class: "ai-modal-header",
@@ -1001,18 +1002,18 @@ const et = /* @__PURE__ */ Y({
1001
1002
  1
1002
1003
  /* TEXT */
1003
1004
  ),
1004
- a.models ? (h(), X(r(ge), {
1005
+ a.models ? (m(), X(r(ge), {
1005
1006
  key: 0,
1006
1007
  class: "ai-modal-header-models",
1007
1008
  "model-value": a.model,
1008
1009
  size: "small",
1009
- onChange: R
1010
+ onChange: C
1010
1011
  }, {
1011
1012
  default: W(() => [
1012
- (h(!0), g(
1013
+ (m(!0), g(
1013
1014
  q,
1014
1015
  null,
1015
- ce(a.models, (V) => (h(), X(r(ge).Option, {
1016
+ ce(a.models, (V) => (m(), X(r(ge).Option, {
1016
1017
  key: V.id,
1017
1018
  name: V.name,
1018
1019
  value: V.id
@@ -1023,10 +1024,10 @@ const et = /* @__PURE__ */ Y({
1023
1024
  ]),
1024
1025
  _: 1
1025
1026
  /* STABLE */
1026
- }, 8, ["model-value"])) : z("v-if", !0)
1027
+ }, 8, ["model-value"])) : M("v-if", !0)
1027
1028
  ]),
1028
1029
  d("span", null, [
1029
- k.value ? A((h(), g(
1030
+ k.value ? A((m(), g(
1030
1031
  "i",
1031
1032
  {
1032
1033
  key: 0,
@@ -1041,12 +1042,12 @@ const et = /* @__PURE__ */ Y({
1041
1042
  content: r(b)("向下收缩"),
1042
1043
  distance: 20
1043
1044
  }]
1044
- ]) : A((h(), g(
1045
+ ]) : A((m(), g(
1045
1046
  "i",
1046
1047
  {
1047
1048
  key: 1,
1048
1049
  class: "ai-header-tool ai-blueking-icon ai-blueking-shangxialashen-2",
1049
- onClick: S
1050
+ onClick: L
1050
1051
  },
1051
1052
  null,
1052
1053
  512
@@ -1061,7 +1062,7 @@ const et = /* @__PURE__ */ Y({
1061
1062
  "i",
1062
1063
  {
1063
1064
  class: "ai-header-tool ai-blueking-icon ai-blueking-saoba",
1064
- onClick: U
1065
+ onClick: K
1065
1066
  },
1066
1067
  null,
1067
1068
  512
@@ -1097,7 +1098,7 @@ const et = /* @__PURE__ */ Y({
1097
1098
  "span",
1098
1099
  {
1099
1100
  class: "drag-line left",
1100
- onMousedown: D(L, ["stop"])
1101
+ onMousedown: D(z, ["stop"])
1101
1102
  },
1102
1103
  null,
1103
1104
  32
@@ -1107,7 +1108,7 @@ const et = /* @__PURE__ */ Y({
1107
1108
  "span",
1108
1109
  {
1109
1110
  class: "drag-line right",
1110
- onMousedown: D(C, ["stop"])
1111
+ onMousedown: D(B, ["stop"])
1111
1112
  },
1112
1113
  null,
1113
1114
  32
@@ -1117,7 +1118,7 @@ const et = /* @__PURE__ */ Y({
1117
1118
  "span",
1118
1119
  {
1119
1120
  class: "drag-line top",
1120
- onMousedown: D(B, ["stop"])
1121
+ onMousedown: D(H, ["stop"])
1121
1122
  },
1122
1123
  null,
1123
1124
  32
@@ -1127,7 +1128,7 @@ const et = /* @__PURE__ */ Y({
1127
1128
  "span",
1128
1129
  {
1129
1130
  class: "drag-line bottom",
1130
- onMousedown: D(p, ["stop"])
1131
+ onMousedown: D(u, ["stop"])
1131
1132
  },
1132
1133
  null,
1133
1134
  32
@@ -1137,7 +1138,7 @@ const et = /* @__PURE__ */ Y({
1137
1138
  "span",
1138
1139
  {
1139
1140
  class: "drag-line top-left-corner",
1140
- onMousedown: D(H, ["stop"])
1141
+ onMousedown: D(R, ["stop"])
1141
1142
  },
1142
1143
  null,
1143
1144
  32
@@ -1191,11 +1192,11 @@ const et = /* @__PURE__ */ Y({
1191
1192
  const { isIconVisible: t, iconPosition: s } = pe(), i = n, l = () => {
1192
1193
  i("click"), t.value = !1;
1193
1194
  };
1194
- return (e, c) => r(t) ? (h(), g(
1195
+ return (e, c) => r(t) ? (m(), g(
1195
1196
  "div",
1196
1197
  {
1197
1198
  key: 0,
1198
- style: j(r(s)),
1199
+ style: Q(r(s)),
1199
1200
  class: "ai-blueking-render-popup",
1200
1201
  onMousedown: c[0] || (c[0] = D(() => {
1201
1202
  }, ["prevent"]))
@@ -1217,7 +1218,7 @@ const et = /* @__PURE__ */ Y({
1217
1218
  ],
1218
1219
  36
1219
1220
  /* STYLE, NEED_HYDRATION */
1220
- )) : z("v-if", !0);
1221
+ )) : M("v-if", !0);
1221
1222
  }
1222
1223
  }), Ft = /* @__PURE__ */ I(Nt, [["__scopeId", "data-v-d5e26041"]]), ao = /* @__PURE__ */ Y({
1223
1224
  __name: "ai-blueking",
@@ -1239,75 +1240,77 @@ const et = /* @__PURE__ */ Y({
1239
1240
  alert: {},
1240
1241
  models: {},
1241
1242
  model: {},
1242
- isShow: { type: Boolean }
1243
+ isShow: { type: Boolean },
1244
+ shortcuts: {}
1243
1245
  },
1244
1246
  emits: ["clear", "close", "scroll-load", "stop", "ai-click", "update:model", "choose-prompt", "send", "update:isShow"],
1245
1247
  setup(o, { expose: n, emit: t }) {
1246
- const s = t, i = x(), l = (p) => {
1247
- var H;
1248
- (H = i.value) == null || H.setInputMessage(p);
1248
+ const s = t, i = x(), l = (u) => {
1249
+ var R;
1250
+ (R = i.value) == null || R.setInputMessage(u);
1249
1251
  }, e = () => {
1250
1252
  s("update:isShow", !0);
1251
1253
  }, c = () => {
1252
1254
  s("clear");
1253
- }, u = () => {
1255
+ }, h = () => {
1254
1256
  s("update:isShow", !1), s("close");
1255
- }, k = (p) => {
1256
- s("update:model", p);
1257
- }, R = (p) => {
1258
- s("send", p);
1257
+ }, k = (u) => {
1258
+ s("update:model", u);
1259
+ }, C = (u) => {
1260
+ s("send", u);
1259
1261
  }, w = () => {
1260
1262
  s("stop");
1261
- }, C = () => {
1263
+ }, B = () => {
1262
1264
  s("scroll-load");
1263
- }, L = (p) => {
1264
- s("ai-click", p);
1265
- }, B = (p) => {
1266
- s("choose-prompt", p);
1265
+ }, z = (u) => {
1266
+ s("ai-click", u);
1267
+ }, H = (u) => {
1268
+ s("choose-prompt", u);
1267
1269
  };
1268
1270
  return n({
1269
1271
  setInputMessage: l
1270
- }), (p, H) => (h(), g(
1272
+ }), (u, R) => (m(), g(
1271
1273
  q,
1272
1274
  null,
1273
1275
  [
1274
1276
  A(T(Gt, {
1275
- "head-background": p.headBackground,
1276
- logo: p.logo,
1277
- model: p.model,
1278
- models: p.models,
1279
- name: p.name,
1280
- "position-limit": p.positionLimit,
1281
- "size-limit": p.sizeLimit,
1282
- "start-position": p.startPosition,
1277
+ "head-background": u.headBackground,
1278
+ logo: u.logo,
1279
+ model: u.model,
1280
+ models: u.models,
1281
+ name: u.name,
1282
+ "position-limit": u.positionLimit,
1283
+ "size-limit": u.sizeLimit,
1284
+ "start-position": u.startPosition,
1283
1285
  onChooseModel: k,
1284
1286
  onClear: c,
1285
- onClose: u
1287
+ onClose: h
1286
1288
  }, {
1287
1289
  default: W(() => [
1288
1290
  T(Qt, {
1289
1291
  ref_key: "contentRef",
1290
1292
  ref: i,
1291
- alert: p.alert,
1292
- background: p.background,
1293
- loading: p.loading,
1294
- messages: p.messages,
1295
- placeholder: p.placeholder,
1296
- prompts: p.prompts,
1297
- "scroll-loading": p.scrollLoading,
1298
- "scroll-loading-end": p.scrollLoadingEnd,
1299
- "user-photo": p.userPhoto,
1300
- onAiClick: L,
1301
- onChoosePrompt: B,
1302
- onScrollLoad: C,
1303
- onSend: R,
1293
+ alert: u.alert,
1294
+ background: u.background,
1295
+ loading: u.loading,
1296
+ messages: u.messages,
1297
+ placeholder: u.placeholder,
1298
+ prompts: u.prompts,
1299
+ "scroll-loading": u.scrollLoading,
1300
+ "scroll-loading-end": u.scrollLoadingEnd,
1301
+ "user-photo": u.userPhoto,
1302
+ shortcuts: u.shortcuts,
1303
+ onAiClick: z,
1304
+ onChoosePrompt: H,
1305
+ onScrollLoad: B,
1306
+ onSend: C,
1304
1307
  onStop: w
1305
- }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "user-photo"])
1308
+ }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "user-photo", "shortcuts"])
1306
1309
  ]),
1307
1310
  _: 1
1308
1311
  /* STABLE */
1309
1312
  }, 8, ["head-background", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1310
- [fe, p.isShow]
1313
+ [fe, u.isShow]
1311
1314
  ]),
1312
1315
  T(Ft, { onClick: e })
1313
1316
  ],
@@ -1324,12 +1327,12 @@ const et = /* @__PURE__ */ Y({
1324
1327
  })();
1325
1328
  class io {
1326
1329
  constructor(n, t, s, i, l) {
1327
- Q(this, "controllerMap");
1328
- Q(this, "handleEnd");
1329
- Q(this, "handleError");
1330
- Q(this, "handleReceiveMessage");
1331
- Q(this, "handleStart");
1332
- Q(this, "url");
1330
+ U(this, "controllerMap");
1331
+ U(this, "handleEnd");
1332
+ U(this, "handleError");
1333
+ U(this, "handleReceiveMessage");
1334
+ U(this, "handleStart");
1335
+ U(this, "url");
1333
1336
  this.url = n, this.handleStart = t, this.handleReceiveMessage = s, this.handleEnd = i, this.handleError = l, this.controllerMap = {};
1334
1337
  }
1335
1338
  stop(n) {
@@ -1352,33 +1355,33 @@ class io {
1352
1355
  const e = l.body.pipeThrough(new window.TextDecoderStream()).getReader();
1353
1356
  for (; ; )
1354
1357
  try {
1355
- const { value: c, done: u } = await e.read();
1358
+ const { value: c, done: h } = await e.read();
1356
1359
  if (!l.ok) {
1357
1360
  this.handleError(c || l.statusText, l.status, t);
1358
1361
  break;
1359
1362
  }
1360
- if (u) {
1363
+ if (h) {
1361
1364
  this.handleEnd(t);
1362
1365
  break;
1363
1366
  }
1364
1367
  c.toString().split(`
1365
- `).forEach((R) => {
1366
- const w = R.replace("data:", "").trim();
1368
+ `).forEach((C) => {
1369
+ const w = C.replace("data:", "").trim();
1367
1370
  if (Ke(w)) {
1368
- const { event: C, content: L, result: B, code: p, message: H } = JSON.parse(w);
1369
- if (B === !1 || l.status !== 200) {
1370
- this.handleError(H, p, t);
1371
+ const { event: B, content: z, result: H, code: u, message: R } = JSON.parse(w);
1372
+ if (H === !1 || l.status !== 200) {
1373
+ this.handleError(R, u, t);
1371
1374
  return;
1372
1375
  }
1373
- switch (C) {
1376
+ switch (B) {
1374
1377
  case "text":
1375
- this.handleReceiveMessage(L, t);
1378
+ this.handleReceiveMessage(z, t);
1376
1379
  break;
1377
1380
  case "done":
1378
1381
  this.handleEnd(t);
1379
1382
  break;
1380
1383
  case "error":
1381
- this.handleError(H, p, t);
1384
+ this.handleError(R, u, t);
1382
1385
  break;
1383
1386
  }
1384
1387
  }