@blueking/chat-x 0.0.3-beta.1 → 0.0.3-beta.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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment, Teleport, Text, Transition, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isReactive, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useCssVars, useModel, useSlots, useTemplateRef, vShow, watch, watchEffect, watchPostEffect, withCtx, withDirectives, withModifiers } from "vue";
1
+ import { Fragment, Teleport, Text, Transition, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isReactive, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useCssVars, useModel, useSlots, useTemplateRef, vShow, watch, watchEffect, watchPostEffect, withCtx, withDirectives, withModifiers } from "vue";
2
2
  import { Button, Checkbox, Form, Input, Loading, Message, Radio, Select, Switcher } from "bkui-vue";
3
3
  import dompurify from "dompurify";
4
4
  import markdownItFootnote from "markdown-it-footnote";
@@ -307,7 +307,18 @@ const getCookieByName = (e) => {
307
307
  取消满意: "Cancel satisfied",
308
308
  取消不满意: "Cancel dissatisfied",
309
309
  "确认删除该回答?": "Confirm delete this answer?",
310
- "删除操作无法撤回,请谨慎操作!": "This operation cannot be undone. Please proceed with caution!"
310
+ "删除操作无法撤回,请谨慎操作!": "This operation cannot be undone. Please proceed with caution!",
311
+ 预览: "Preview",
312
+ 缩小: "Zoom Out",
313
+ 放大: "Zoom In",
314
+ 旋转: "Rotate",
315
+ 下载: "Download",
316
+ "抱歉,图片加载失败,可尝试重新加载": "Sorry, image loading failed. Please try reloading.",
317
+ 重置: "Reset",
318
+ 重新加载: "Reload",
319
+ 宽: "W",
320
+ 高: "H",
321
+ 上传图片: "Upload Image"
311
322
  }, t = (e) => isEn ? lang[e] : e, CHAT_Z_INDEX = 9999, EDITOR_Z_INDEX = CHAT_Z_INDEX + 1, EDITOR_MENU_Z_INDEX = EDITOR_Z_INDEX + 1, SHORTCUT_MENU_Z_INDEX = EDITOR_MENU_Z_INDEX + 1, SELECTION_Z_INDEX = SHORTCUT_MENU_Z_INDEX + 1, CONST_MESSAGE_TOOLS = [
312
323
  {
313
324
  description: t("复制"),
@@ -629,19 +640,69 @@ const AIBluekingIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps
629
640
  h("path", { d: "M491.2 216L398.72 308.48l45.44 45.12 92.48-92.48a148.48 148.48 0 0 1 224 1.92 148.48 148.48 0 0 1 1.92 224L672 579.84l45.12 45.44 92.48-92.48a212.8 212.8 0 0 0-1.92-314.88A212.8 212.8 0 0 0 491.2 216Z" }),
630
641
  h("path", { d: "M398.78566017615634 579.8877413259167L579.8049961599127 398.86840534216054 625.0598301558516 444.1232393380996 444.0404941720955 625.1425753218557 398.78566017615634 579.8877413259167z" })
631
642
  ]), ImageErrorIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, {
632
- viewBox: "0 0 24 24",
643
+ viewBox: "0 0 24 18",
633
644
  class: {
634
645
  [commonSVGProps.class]: !0,
635
646
  "ai-image-error-icon": !0
636
647
  }
637
- }), [h("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }), h("line", {
638
- x1: "3",
639
- y1: "3",
640
- x2: "21",
641
- y2: "21",
642
- "stroke-width": "2",
648
+ }), [h("path", {
649
+ d: "M8.018 0l-.774 2.941.856 2.206-.757 1.47 1.26-1.272-.232-2.224 1.102-3.088h7.228c1.322.01 2.388 1.085 2.39 2.408v5.196a5.42 5.42 0 0 0-1.186.144V2.46c-.035-.645-.542-1.164-1.186-1.213H10.346L9.388 3.04l-.18 2.573-2.636 2.261.859-2.629-1.186-2.006.18-1.978H2.57c-.334-.01-.658.115-.9.346a1.24 1.24 0 0 0-.385.885L1.252 13.07l3.921-4.834c.477-.481 1.068-.481 1.436 0l3.44 4.47 3.344-3.375c.194-.242.495-.372.804-.349.309.024.586.198.742.467l.171.221a5.45 5.45 0 0 0-.928 2.874c0 1.896 1.074 3.54 2.648 4.359l-.122.005H2.39C1.065 16.877.017 15.776.048 14.45L0 2.393C.044 1.071 1.131.024 2.452.033h5.566zM19.09 8.25a4.295 4.295 0 1 1 0 8.591 4.295 4.295 0 0 1 0-8.591zm0 5.83a.46.46 0 1 0 0 .92.46.46 0 0 0 0-.92zm0-3.936a.434.434 0 0 0-.433.408l.126 2.915a.307.307 0 0 0 .614 0l.122-2.822a.434.434 0 0 0-.43-.5zm-5.405-5.737a2.03 2.03 0 0 1 .95 1.653 2.03 2.03 0 0 1-.95 1.653 1.93 1.93 0 0 1-1.918 0 2.03 2.03 0 0 1-.95-1.653c.004-.678.364-1.304.95-1.653a1.93 1.93 0 0 1 1.918 0z",
650
+ fill: "currentColor",
651
+ "fill-rule": "nonzero"
652
+ })]), ZoomInIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-zoom-in-icon" }), [h("path", { d: "M637.02 482.06H546.3V391.34c0-17.67-14.33-32-32-32s-32 14.33-32 32v90.72H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h90.72v90.72c0 17.67 14.33 32 32 32s32-14.33 32-32v-90.72h90.72c17.67 0 32-14.33 32-32s-14.33-32-32-32z" }), h("path", { d: "M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z" })]), ZoomOutIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-zoom-out-icon" }), [h("path", { d: "M637.02 482.06H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h245.44c17.67 0 32-14.33 32-32s-14.33-32-32-32z" }), h("path", { d: "M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z" })]), RotateIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-rotate-icon" }), [h("path", { d: "M817.76 328.31H402.28c-59.68 0-108.24 48.55-108.24 108.24v415.44c0 59.68 48.55 108.24 108.24 108.24h415.47c59.65 0 108.2-48.55 108.2-108.24V436.55c0-59.69-48.55-108.24-108.19-108.24z m30.39 523.68c0 16.79-13.64 30.43-30.39 30.43H402.28c-16.79 0-30.43-13.64-30.43-30.43V436.55c0-16.79 13.64-30.43 30.43-30.43h415.47c16.75 0 30.39 13.64 30.39 30.43v415.44z" }), h("path", { d: "M248.91 368.43c-18.27-11.32-42.25-5.66-53.57 12.61l-18.16 29.33c-0.87-8.47-1.33-17.1-1.33-25.76 0-134 109.04-243.03 243.07-243.03 44.64 0 88.29 12.2 126.17 35.29 18.39 11.13 42.32 5.32 53.49-12.99 11.17-18.35 5.36-42.28-12.99-53.49-50.11-30.51-107.74-46.62-166.67-46.62-176.93 0-320.88 143.91-320.88 320.84 0 48.14 10.41 94.41 30.89 137.53 6.12 12.84 18.77 21.35 32.98 22.11 0.72 0.04 1.44 0.08 2.17 0.08a38.92 38.92 0 0 0 33.09-18.43L261.52 422c11.29-18.28 5.66-42.25-12.61-53.57z" })]), FitScreenIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-fit-screen-icon" }), [h("path", { d: "M160 160h240v64H224v176H160V160zM160 624h64v176h176v64H160V624zM624 160h240v240h-64V224H624V160zM800 624h64v240H624v-64h176V624z" })]), DownloadIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-download-icon" }), [h("path", { d: "M544 654.4V192h-64v462.4l-147.2-147.2-45.2 45.2L512 776.8l224.4-224.4-45.2-45.2L544 654.4zM832 832H192v64h640v-64z" })]), PreviewCloseIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-close-icon" }), [h("path", { d: "M557.3 512l214.9-214.9c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L512 466.7 297.1 251.8c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L466.7 512 251.8 726.9c-12.5 12.5-12.5 32.8 0 45.3 6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4L512 557.3l214.9 214.9c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.3L557.3 512z" })]), ArrowLeftIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-arrow-left-icon" }), [h("path", {
653
+ d: "M672 165.2L333.2 504c-5.6 5.6-5.6 14.8 0 20.4L672 863.2",
654
+ fill: "none",
655
+ stroke: "currentColor",
656
+ "stroke-width": "64",
643
657
  "stroke-linecap": "round"
644
- })]), CloseCircleIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
658
+ })]), ArrowRightPreviewIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-arrow-right-preview-icon" }), [h("path", {
659
+ d: "M352 165.2L690.8 504c5.6 5.6 5.6 14.8 0 20.4L352 863.2",
660
+ fill: "none",
661
+ stroke: "currentColor",
662
+ "stroke-width": "64",
663
+ "stroke-linecap": "round"
664
+ })]), ReloadIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-reload-icon" }), [h("path", { d: "M889.6 398.4c-16-35.2-35.2-65.6-60.8-92.8-24-27.2-52.8-48-84.8-65.6-32-17.6-67.2-28.8-102.4-35.2-35.2-6.4-72-8-108.8-3.2V108.8l-256 192 256 192V400c27.2-4.8 54.4-4.8 81.6-1.6 27.2 4.8 52.8 14.4 76.8 27.2 24 12.8 46.4 30.4 64 51.2 17.6 20.8 32 44.8 41.6 70.4 9.6 25.6 14.4 52.8 14.4 81.6s-4.8 56-14.4 81.6c-9.6 25.6-24 49.6-41.6 70.4-17.6 20.8-40 38.4-64 51.2-24 12.8-49.6 22.4-76.8 27.2-27.2 4.8-54.4 4.8-81.6 1.6-27.2-4.8-52.8-14.4-76.8-27.2-24-12.8-46.4-30.4-64-51.2-17.6-20.8-32-44.8-41.6-70.4-9.6-25.6-14.4-52.8-14.4-81.6h-64c0 38.4 6.4 75.2 19.2 110.4 12.8 35.2 30.4 67.2 52.8 96 22.4 28.8 49.6 52.8 80 72 30.4 19.2 64 33.6 99.2 43.2 35.2 9.6 72 12.8 108.8 11.2 36.8-1.6 72-9.6 105.6-22.4 33.6-12.8 64-30.4 92.8-52.8 28.8-22.4 52.8-49.6 72-80 19.2-30.4 33.6-64 43.2-99.2 9.6-35.2 12.8-72 11.2-108.8-1.6-36.8-9.6-72-22.4-105.6z" })]), ImageBrokenIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, {
665
+ viewBox: "0 0 200 180",
666
+ class: "ai-common-icon ai-image-broken-icon"
667
+ }), [h("g", { fill: "none" }, [
668
+ h("rect", {
669
+ x: "30",
670
+ y: "20",
671
+ width: "100",
672
+ height: "86",
673
+ rx: "4",
674
+ fill: "#C4C6CC",
675
+ opacity: "0.6"
676
+ }),
677
+ h("circle", {
678
+ cx: "55",
679
+ cy: "45",
680
+ r: "8",
681
+ fill: "#979BA5",
682
+ opacity: "0.5"
683
+ }),
684
+ h("path", {
685
+ d: "M30 80l25-20 20 15 25-25 30 30v26H30V80z",
686
+ fill: "#979BA5",
687
+ opacity: "0.5"
688
+ }),
689
+ h("circle", {
690
+ cx: "120",
691
+ cy: "80",
692
+ r: "36",
693
+ fill: "#FFE8C3",
694
+ stroke: "#FF9C01",
695
+ "stroke-width": "3"
696
+ }),
697
+ h("text", {
698
+ x: "120",
699
+ y: "88",
700
+ "text-anchor": "middle",
701
+ "font-size": "32",
702
+ "font-weight": "bold",
703
+ fill: "#FF9C01"
704
+ }, "!")
705
+ ])]), ImageSizeIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: "ai-common-icon ai-image-size-icon" }), [h("path", { d: "M864 160H160c-35.2 0-64 28.8-64 64v576c0 35.2 28.8 64 64 64h704c35.2 0 64-28.8 64-64V224c0-35.2-28.8-64-64-64z m0 640H160V224h704v576z" })]), CloseCircleIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
645
706
  [commonSVGProps.class]: !0,
646
707
  "ai-close-circle-icon": !0
647
708
  } }), [h("path", { d: "M512 70.246391c230.929037 0 418.133279 187.204242 418.133279 418.133279s-187.204242 418.133279-418.133279 418.133279-418.133279-187.204242-418.133279-418.133279 187.204242-418.133279 418.133279-418.133279z m0 59.733325c-197.938508 0-358.399953 160.461446-358.399953 358.399954s160.461446 358.399953 358.399953 358.399953 358.399953-160.461446 358.399953-358.399953-160.461446-358.399953-358.399953-358.399954z m0 123.199984c129.884516 0 235.199969 105.315453 235.199969 235.19997s-105.315453 235.199969-235.199969 235.199969-235.199969-105.315453-235.199969-235.199969 105.315453-235.199969 235.199969-235.19997z m71.276791 140.165182l-71.283324 71.282391-71.276791-71.275858-23.751464 23.751464 71.275858 71.276791-71.275858 71.27679 23.769197 23.769197 71.276791-71.27679 71.265591 71.26559 23.751463-23.751463-71.264657-71.265591 71.282391-71.283324-23.769197-23.769197z" })]), DocLinkIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
@@ -1413,12 +1474,12 @@ function preventOverflow$1(e) {
1413
1474
  var j, M = S === "y" ? top$1 : left$1, N = S === "y" ? bottom$1 : right$1, P = S === "y" ? "height" : "width", F = w[S], I = F + v[M], L = F - v[N], R = m ? -E[P] / 2 : 0, z = b === start$1 ? T[P] : E[P], B = b === start$1 ? -E[P] : -T[P], V = n.elements.arrow, H = m && V ? getLayoutRect$1(V) : {
1414
1475
  width: 0,
1415
1476
  height: 0
1416
- }, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject$1(), W = U[M], G = U[N], K = within$1(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, ty = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, J = n.elements.arrow && getOffsetParent$1(n.elements.arrow), ny = J ? S === "y" ? J.clientTop || 0 : J.clientLeft || 0 : 0, Y = (j = k == null ? void 0 : k[S]) == null ? 0 : j, ry = F + q - Y - ny, iy = F + ty - Y, X = within$1(m ? min$2(I, ry) : I, F, m ? max$1(L, iy) : L);
1477
+ }, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject$1(), W = U[M], G = U[N], K = within$1(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, Wy = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, J = n.elements.arrow && getOffsetParent$1(n.elements.arrow), Gy = J ? S === "y" ? J.clientTop || 0 : J.clientLeft || 0 : 0, Y = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Ky = F + q - Y - Gy, qy = F + Wy - Y, X = within$1(m ? min$2(I, Ky) : I, F, m ? max$1(L, qy) : L);
1417
1478
  w[S] = X, A[S] = X - F;
1418
1479
  }
1419
1480
  if (c) {
1420
- var ay, oy = S === "x" ? top$1 : left$1, sy = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[oy], cy = Z - v[sy], ly = [top$1, left$1].indexOf(y) !== -1, uy = (ay = k == null ? void 0 : k[C]) == null ? 0 : ay, dy = ly ? $ : Z - T[Q] - E[Q] - uy + O.altAxis, fy = ly ? Z + T[Q] + E[Q] - uy - O.altAxis : cy, py = m && ly ? withinMaxClamp$1(dy, Z, fy) : within$1(m ? dy : $, Z, m ? fy : cy);
1421
- w[C] = py, A[C] = py - Z;
1481
+ var Jy, Yy = S === "x" ? top$1 : left$1, Xy = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Yy], Zy = Z - v[Xy], Qy = [top$1, left$1].indexOf(y) !== -1, $y = (Jy = k == null ? void 0 : k[C]) == null ? 0 : Jy, eb = Qy ? $ : Z - T[Q] - E[Q] - $y + O.altAxis, tb = Qy ? Z + T[Q] + E[Q] - $y - O.altAxis : Zy, nb = m && Qy ? withinMaxClamp$1(eb, Z, tb) : within$1(m ? eb : $, Z, m ? tb : Zy);
1482
+ w[C] = nb, A[C] = nb - Z;
1422
1483
  }
1423
1484
  n.modifiersData[i] = A;
1424
1485
  }
@@ -1895,16 +1956,16 @@ function createTippy$1(e, n) {
1895
1956
  isShown: !1
1896
1957
  },
1897
1958
  plugins: b,
1898
- clearDelayTimeouts: uy,
1899
- setProps: dy,
1900
- setContent: fy,
1901
- show: py,
1902
- hide: my,
1903
- hideWithInteractivity: hy,
1904
- enable: cy,
1905
- disable: ly,
1906
- unmount: gy,
1907
- destroy: _y
1959
+ clearDelayTimeouts: $y,
1960
+ setProps: eb,
1961
+ setContent: tb,
1962
+ show: nb,
1963
+ hide: rb,
1964
+ hideWithInteractivity: ib,
1965
+ enable: Zy,
1966
+ disable: Qy,
1967
+ unmount: ab,
1968
+ destroy: ob
1908
1969
  };
1909
1970
  /* istanbul ignore if */
1910
1971
  if (!r.render) return x;
@@ -1913,7 +1974,7 @@ function createTippy$1(e, n) {
1913
1974
  var T = b.map(function(e) {
1914
1975
  return e.fn(x);
1915
1976
  }), E = e.hasAttribute("aria-expanded");
1916
- return ty(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
1977
+ return Wy(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
1917
1978
  x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
1918
1979
  }), C.addEventListener("mouseleave", function() {
1919
1980
  x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
@@ -2032,17 +2093,17 @@ function createTippy$1(e, n) {
2032
2093
  });
2033
2094
  });
2034
2095
  }
2035
- function ty() {
2036
- O() && (q("touchstart", ny, { passive: !0 }), q("touchend", ry, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
2037
- if (e !== "manual") switch (q(e, ny), e) {
2096
+ function Wy() {
2097
+ O() && (q("touchstart", Gy, { passive: !0 }), q("touchend", Ky, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
2098
+ if (e !== "manual") switch (q(e, Gy), e) {
2038
2099
  case "mouseenter":
2039
- q("mouseleave", ry);
2100
+ q("mouseleave", Ky);
2040
2101
  break;
2041
2102
  case "focus":
2042
- q(isIE11$1 ? "focusout" : "blur", iy);
2103
+ q(isIE11$1 ? "focusout" : "blur", qy);
2043
2104
  break;
2044
2105
  case "focusin":
2045
- q("focusout", iy);
2106
+ q("focusout", qy);
2046
2107
  break;
2047
2108
  }
2048
2109
  });
@@ -2053,7 +2114,7 @@ function createTippy$1(e, n) {
2053
2114
  n.removeEventListener(r, i, a);
2054
2115
  }), m = [];
2055
2116
  }
2056
- function ny(e) {
2117
+ function Gy(e) {
2057
2118
  var n, r = !1;
2058
2119
  if (!(!x.state.isEnabled || X(e) || c)) {
2059
2120
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
@@ -2073,7 +2134,7 @@ function createTippy$1(e, n) {
2073
2134
  } : null;
2074
2135
  }).filter(Boolean), e) && (R(), $(e));
2075
2136
  }
2076
- function ry(e) {
2137
+ function Ky(e) {
2077
2138
  if (!(X(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
2078
2139
  if (x.props.interactive) {
2079
2140
  x.hideWithInteractivity(e);
@@ -2082,14 +2143,14 @@ function createTippy$1(e, n) {
2082
2143
  $(e);
2083
2144
  }
2084
2145
  }
2085
- function iy(e) {
2146
+ function qy(e) {
2086
2147
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
2087
2148
  }
2088
2149
  function X(e) {
2089
2150
  return currentInput$1.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
2090
2151
  }
2091
- function ay() {
2092
- oy();
2152
+ function Jy() {
2153
+ Yy();
2093
2154
  var n = x.props, r = n.popperOptions, i = n.placement, a = n.offset, o = n.getReferenceClientRect, s = n.moveTransition, c = k() ? getChildren$1(C).arrow : null, l = o ? {
2094
2155
  getBoundingClientRect: o,
2095
2156
  contextElement: o.contextElement || A()
@@ -2147,12 +2208,12 @@ function createTippy$1(e, n) {
2147
2208
  modifiers: u
2148
2209
  }));
2149
2210
  }
2150
- function oy() {
2211
+ function Yy() {
2151
2212
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
2152
2213
  }
2153
- function sy() {
2214
+ function Xy() {
2154
2215
  var e = x.props.appendTo, n, r = A();
2155
- n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO$1 || e === "parent" ? r.parentNode : invokeWithArgsOrReturn$1(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, ay();
2216
+ n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO$1 || e === "parent" ? r.parentNode : invokeWithArgsOrReturn$1(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, Jy();
2156
2217
  }
2157
2218
  function Z() {
2158
2219
  return arrayFrom$1(C.querySelectorAll("[data-tippy-root]"));
@@ -2178,30 +2239,30 @@ function createTippy$1(e, n) {
2178
2239
  });
2179
2240
  }
2180
2241
  }
2181
- function cy() {
2242
+ function Zy() {
2182
2243
  x.state.isEnabled = !0;
2183
2244
  }
2184
- function ly() {
2245
+ function Qy() {
2185
2246
  x.hide(), x.state.isEnabled = !1;
2186
2247
  }
2187
- function uy() {
2248
+ function $y() {
2188
2249
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
2189
2250
  }
2190
- function dy(n) {
2251
+ function eb(n) {
2191
2252
  if (!x.state.isDestroyed) {
2192
2253
  F("onBeforeUpdate", [x, n]), J();
2193
2254
  var r = x.props, i = evaluateProps$1(e, Object.assign({}, r, removeUndefinedProps$1(n), { ignoreAttributes: !0 }));
2194
- x.props = i, ty(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce$1$1(Y, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray$1(r.triggerTarget).forEach(function(e) {
2255
+ x.props = i, Wy(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce$1$1(Y, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray$1(r.triggerTarget).forEach(function(e) {
2195
2256
  e.removeAttribute("aria-expanded");
2196
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ay(), Z().forEach(function(e) {
2257
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Jy(), Z().forEach(function(e) {
2197
2258
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
2198
2259
  })), F("onAfterUpdate", [x, n]);
2199
2260
  }
2200
2261
  }
2201
- function fy(e) {
2262
+ function tb(e) {
2202
2263
  x.setProps({ content: e });
2203
2264
  }
2204
- function py() {
2265
+ function nb() {
2205
2266
  var e = x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = currentInput$1.isTouch && !x.props.touch, a = getValueAtIndexOrReturn$1(x.props.duration, 0, defaultProps$1.duration);
2206
2267
  if (!(e || n || r || i) && !A().hasAttribute("disabled") && (F("onShow", [x], !1), x.props.onShow(x) !== !1)) {
2207
2268
  if (x.state.isVisible = !0, k() && (C.style.visibility = "visible"), P(), H(), x.state.isMounted || (C.style.transition = "none"), k()) {
@@ -2219,10 +2280,10 @@ function createTippy$1(e, n) {
2219
2280
  x.state.isShown = !0, F("onShown", [x]);
2220
2281
  });
2221
2282
  }
2222
- }, sy();
2283
+ }, Xy();
2223
2284
  }
2224
2285
  }
2225
- function my() {
2286
+ function rb() {
2226
2287
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn$1(x.props.duration, 1, defaultProps$1.duration);
2227
2288
  if (!(e || n || r) && (F("onHide", [x], !1), x.props.onHide(x) !== !1)) {
2228
2289
  if (x.state.isVisible = !1, x.state.isShown = !1, u = !1, s = !1, k() && (C.style.visibility = "hidden"), R(), U(), P(!0), k()) {
@@ -2232,17 +2293,17 @@ function createTippy$1(e, n) {
2232
2293
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
2233
2294
  }
2234
2295
  }
2235
- function hy(e) {
2296
+ function ib(e) {
2236
2297
  j().addEventListener("mousemove", g), pushIfUnique$1(mouseMoveListeners$1, g), g(e);
2237
2298
  }
2238
- function gy() {
2239
- x.state.isVisible && x.hide(), x.state.isMounted && (oy(), Z().forEach(function(e) {
2299
+ function ab() {
2300
+ x.state.isVisible && x.hide(), x.state.isMounted && (Yy(), Z().forEach(function(e) {
2240
2301
  e._tippy.unmount();
2241
2302
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances$1 = mountedInstances$1.filter(function(e) {
2242
2303
  return e !== x;
2243
2304
  }), x.state.isMounted = !1, F("onHidden", [x]));
2244
2305
  }
2245
- function _y() {
2306
+ function ob() {
2246
2307
  x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), J(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
2247
2308
  }
2248
2309
  }
@@ -2658,13 +2719,13 @@ function useTippy(e, n = {}, r = {
2658
2719
  a.value && a.value.setProps(f(n));
2659
2720
  }, m = () => {
2660
2721
  !a.value || !n.content || a.value.setContent(d(n.content));
2661
- }, _ = (e) => {
2722
+ }, g = (e) => {
2662
2723
  var n;
2663
2724
  (n = a.value) == null || n.setContent(d(e));
2664
- }, y = (e) => {
2725
+ }, v = (e) => {
2665
2726
  var n;
2666
2727
  (n = a.value) == null || n.setProps(f(e));
2667
- }, C = () => {
2728
+ }, b = () => {
2668
2729
  var e;
2669
2730
  a.value && (a.value.destroy(), a.value = void 0), l = null, (e = c.value) == null || e.unmount(), c.value = void 0;
2670
2731
  }, w = () => {
@@ -2682,28 +2743,28 @@ function useTippy(e, n = {}, r = {
2682
2743
  }, O = () => {
2683
2744
  var e;
2684
2745
  (e = a.value) == null || e.unmount();
2685
- }, A = () => {
2746
+ }, k = () => {
2686
2747
  if (!e) return;
2687
2748
  let r = isRef(e) ? e.value : e;
2688
- typeof r == "function" && (r = r()), isComponentInstance(r) && (r = r.$el), r && (a.value = tippy$1(r, f(n)), r.$tippy = M);
2689
- }, M = {
2749
+ typeof r == "function" && (r = r()), isComponentInstance(r) && (r = r.$el), r && (a.value = tippy$1(r, f(n)), r.$tippy = A);
2750
+ }, A = {
2690
2751
  tippy: a,
2691
2752
  refresh: p,
2692
2753
  refreshContent: m,
2693
- setContent: _,
2694
- setProps: y,
2695
- destroy: C,
2754
+ setContent: g,
2755
+ setProps: v,
2756
+ destroy: b,
2696
2757
  hide: T,
2697
2758
  show: w,
2698
2759
  disable: E,
2699
2760
  enable: D,
2700
2761
  unmount: O,
2701
- mount: A,
2762
+ mount: k,
2702
2763
  state: s
2703
2764
  };
2704
- return r.mount && (i ? i.isMounted ? A() : onMounted(A) : A()), i && onUnmounted(() => {
2705
- C();
2706
- }), isRef(n) || isReactive(n) ? watch(n, p, { immediate: !1 }) : isRef(n.content) && watch(n.content, m, { immediate: !1 }), M;
2765
+ return r.mount && (i ? i.isMounted ? k() : onMounted(k) : k()), i && onUnmounted(() => {
2766
+ b();
2767
+ }), isRef(n) || isReactive(n) ? watch(n, p, { immediate: !1 }) : isRef(n.content) && watch(n.content, m, { immediate: !1 }), A;
2707
2768
  }
2708
2769
  function useSingleton(e, n) {
2709
2770
  let r = ref();
@@ -2961,7 +3022,7 @@ setDefaultProps$1$1({
2961
3022
  animateFill
2962
3023
  ]
2963
3024
  });
2964
- var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
3025
+ var _hoisted_1$38 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
2965
3026
  __name: "shortcut-btn",
2966
3027
  props: {
2967
3028
  mode: {},
@@ -2971,30 +3032,30 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
2971
3032
  setup(n, { expose: r, emit: i }) {
2972
3033
  let a = i, o = (e) => {
2973
3034
  a("click", e);
2974
- }, f = useTemplateRef("el");
3035
+ }, d = useTemplateRef("el");
2975
3036
  return r({ get $el() {
2976
- return f.value;
3037
+ return d.value;
2977
3038
  } }), (r, i) => (openBlock(), createElementBlock("button", {
2978
3039
  ref_key: "el",
2979
- ref: f,
3040
+ ref: d,
2980
3041
  class: normalizeClass(["ai-shortcut-btn", { "is-menu-mode": n.mode === "menu" }]),
2981
3042
  onClick: i[0] || (i[0] = (e) => o(n.shortcut))
2982
3043
  }, [renderSlot(r.$slots, "default", {}, () => {
2983
- var r, i, a, o, f, p, m;
3044
+ var r, i, a, o, d, p, m;
2984
3045
  return [(r = n.shortcut) != null && r.icon ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [typeof n.shortcut.icon == "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [n.shortcut.icon.startsWith("http") ? (openBlock(), createElementBlock("img", {
2985
3046
  key: 0,
2986
3047
  class: "ai-common-icon ai-shortcut-btn-icon",
2987
3048
  src: n.shortcut.icon
2988
- }, null, 8, _hoisted_1$34)) : createCommentVNode("", !0), createElementVNode("span", { class: normalizeClass(n.shortcut.icon) }, null, 2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(typeof ((i = n.shortcut) == null ? void 0 : i.icon) == "function" ? (a = (o = n.shortcut).icon) == null ? void 0 : a.call(o, h) : n.shortcut.icon), {
3049
+ }, null, 8, _hoisted_1$38)) : createCommentVNode("", !0), createElementVNode("span", { class: normalizeClass(n.shortcut.icon) }, null, 2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(typeof ((i = n.shortcut) == null ? void 0 : i.icon) == "function" ? (a = (o = n.shortcut).icon) == null ? void 0 : a.call(o, h) : n.shortcut.icon), {
2989
3050
  key: 1,
2990
3051
  class: "ai-shortcut-btn-icon"
2991
- }))], 64)) : n.shortcut && !((f = n.shortcut.components) != null && f.length) ? (openBlock(), createBlock(unref(AgentIcon), {
3052
+ }))], 64)) : n.shortcut && !((d = n.shortcut.components) != null && d.length) ? (openBlock(), createBlock(unref(AgentIcon), {
2992
3053
  key: 1,
2993
3054
  class: "ai-shortcut-btn-icon"
2994
3055
  })) : createCommentVNode("", !0), createTextVNode(" " + toDisplayString(((p = n.shortcut) == null ? void 0 : p.alias) || ((m = n.shortcut) == null ? void 0 : m.name)), 1)];
2995
3056
  }), renderSlot(r.$slots, "append")], 2));
2996
3057
  }
2997
- }), _hoisted_1$33 = { class: "ai-selection-popover-content" }, _hoisted_2$22 = {
3058
+ }), _hoisted_1$37 = { class: "ai-selection-popover-content" }, _hoisted_2$26 = {
2998
3059
  key: 0,
2999
3060
  class: "shortcut-menu"
3000
3061
  }, ai_selection_default = /* @__PURE__ */ defineComponent({
@@ -3011,7 +3072,7 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3011
3072
  emits: /* @__PURE__ */ mergeModels(["selectShortcut", "selectionChange"], ["update:visible"]),
3012
3073
  setup(r, { emit: a }) {
3013
3074
  useCssVars((e) => ({ e53ba118: unref(SELECTION_Z_INDEX) }));
3014
- let o = r, d = useModel(r, "visible"), p = a, m = useTemplateRef("popoverRef"), g = useTemplateRef("moreMenuRef"), _ = shallowRef({
3075
+ let o = r, d = useModel(r, "visible"), f = a, m = useTemplateRef("popoverRef"), g = useTemplateRef("moreMenuRef"), _ = shallowRef({
3015
3076
  x: 0,
3016
3077
  y: 0
3017
3078
  }), v = shallowRef(""), y = shallowRef(null), b = shallowRef(!1), x = (e) => {
@@ -3066,7 +3127,7 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3066
3127
  n = n.parentNode;
3067
3128
  }
3068
3129
  } catch (e) {}
3069
- r !== v.value && p("selectionChange", r), v.value = r;
3130
+ r !== v.value && f("selectionChange", r), v.value = r;
3070
3131
  let i = null;
3071
3132
  try {
3072
3133
  var a;
@@ -3086,10 +3147,10 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3086
3147
  return;
3087
3148
  }
3088
3149
  d.value = !0, yield nextTick();
3089
- let l = m.value.getBoundingClientRect(), u = window.innerWidth, f = window.innerHeight, g = i.left + i.width / 2 - l.width / 2;
3150
+ let l = m.value.getBoundingClientRect(), u = window.innerWidth, p = window.innerHeight, g = i.left + i.width / 2 - l.width / 2;
3090
3151
  g < 8 ? g = 8 : g + l.width > u - 8 && (g = u - l.width - 8);
3091
- let b, S = i.top, w = f - i.bottom, E = l.height + o.offset;
3092
- b = S >= E ? i.top - l.height - o.offset : w >= E ? i.bottom + o.offset : S >= w ? Math.max(8, i.top - l.height - o.offset) : Math.min(f - l.height - 8, i.bottom + o.offset), _.value = {
3152
+ let b, S = i.top, w = p - i.bottom, T = l.height + o.offset;
3153
+ b = S >= T ? i.top - l.height - o.offset : w >= T ? i.bottom + o.offset : S >= w ? Math.max(8, i.top - l.height - o.offset) : Math.min(p - l.height - 8, i.bottom + o.offset), _.value = {
3093
3154
  x: g,
3094
3155
  y: b
3095
3156
  };
@@ -3101,29 +3162,29 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3101
3162
  var e;
3102
3163
  d.value && ((e = y.value) == null || e.removeAllRanges(), d.value = !1);
3103
3164
  }, w = (e) => {
3104
- C(), p("selectShortcut", e, v.value);
3105
- }, E = null, D = (e) => {
3106
- E && clearTimeout(E), E = window.setTimeout(() => {
3165
+ C(), f("selectShortcut", e, v.value);
3166
+ }, T = null, D = (e) => {
3167
+ T && clearTimeout(T), T = window.setTimeout(() => {
3107
3168
  S();
3108
3169
  }, e);
3109
- }, A = () => {
3170
+ }, O = () => {
3110
3171
  D(200);
3111
- }, N = () => {
3172
+ }, A = () => {
3112
3173
  D(300);
3113
- }, P = (e) => {
3174
+ }, M = (e) => {
3114
3175
  var n;
3115
3176
  d.value && (n = m.value) != null && n.contains(e.target) || C();
3116
3177
  }, F = (e) => {
3117
3178
  var n;
3118
3179
  !y.value || !d.value || e.target instanceof HTMLElement && e.target.contains((n = y.value) == null ? void 0 : n.anchorNode) && C();
3119
- }, R = () => {
3180
+ }, I = () => {
3120
3181
  var e;
3121
3182
  (e = g.value) == null || e.show();
3122
3183
  };
3123
3184
  return onMounted(() => {
3124
- document.addEventListener("selectionchange", N), document.addEventListener("mouseup", A), document.addEventListener("mousedown", P), document.addEventListener("scroll", F, !0), window.addEventListener("resize", C), window.addEventListener("blur", C);
3185
+ document.addEventListener("selectionchange", A), document.addEventListener("mouseup", O), document.addEventListener("mousedown", M), document.addEventListener("scroll", F, !0), window.addEventListener("resize", C), window.addEventListener("blur", C);
3125
3186
  }), onUnmounted(() => {
3126
- document.removeEventListener("selectionchange", N), document.removeEventListener("mouseup", A), document.removeEventListener("mousedown", P), document.removeEventListener("scroll", F, !0), window.removeEventListener("resize", C), window.removeEventListener("blur", C);
3187
+ document.removeEventListener("selectionchange", A), document.removeEventListener("mouseup", O), document.removeEventListener("mousedown", M), document.removeEventListener("scroll", F, !0), window.removeEventListener("resize", C), window.removeEventListener("blur", C);
3127
3188
  }), (a, o) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
3128
3189
  default: withCtx(() => [d.value ? (openBlock(), createElementBlock("div", {
3129
3190
  key: 0,
@@ -3136,7 +3197,7 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3136
3197
  zIndex: unref(SELECTION_Z_INDEX)
3137
3198
  }),
3138
3199
  onMousedown: o[2] || (o[2] = withModifiers(() => {}, ["stop"]))
3139
- }, [createElementVNode("div", _hoisted_1$33, [renderSlot(a.$slots, "default", { shortcuts: r.shortcuts }, () => [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(0, r.maxShortcutCount), (n, i) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [i < r.maxShortcutCount ? (openBlock(), createBlock(shortcut_btn_default, {
3200
+ }, [createElementVNode("div", _hoisted_1$37, [renderSlot(a.$slots, "default", { shortcuts: r.shortcuts }, () => [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(0, r.maxShortcutCount), (n, i) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [i < r.maxShortcutCount ? (openBlock(), createBlock(shortcut_btn_default, {
3140
3201
  key: 0,
3141
3202
  shortcut: n,
3142
3203
  onClick: (e) => w(n)
@@ -3158,7 +3219,7 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3158
3219
  b.value = !0;
3159
3220
  })
3160
3221
  }, {
3161
- content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$22, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(r.maxShortcutCount), (e) => (openBlock(), createBlock(shortcut_btn_default, {
3222
+ content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$26, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(r.maxShortcutCount), (e) => (openBlock(), createBlock(shortcut_btn_default, {
3162
3223
  key: e.id,
3163
3224
  mode: "menu",
3164
3225
  shortcut: e,
@@ -3166,7 +3227,7 @@ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3166
3227
  }, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("", !0)]),
3167
3228
  default: withCtx(() => [createVNode(shortcut_btn_default, {
3168
3229
  style: { width: "28px" },
3169
- onClick: R
3230
+ onClick: I
3170
3231
  }, {
3171
3232
  default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
3172
3233
  _: 1
@@ -3214,12 +3275,12 @@ const useObserverVisibleList = (e, n, r) => {
3214
3275
  calculateVisibleMenuItems: a
3215
3276
  };
3216
3277
  };
3217
- var _hoisted_1$32 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
3278
+ var _hoisted_1$36 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
3218
3279
  __name: "shortcut-btns",
3219
3280
  props: { shortcuts: {} },
3220
3281
  emits: ["selectShortcut"],
3221
3282
  setup(n, { emit: r }) {
3222
- let i = document.body, o = n, d = r, p = useTemplateRef("containerRef"), m = shallowRef([]), g = useTemplateRef("moreMenuRef"), _ = useTemplateRef("moreBtnRef"), { visibleItems: v } = useObserverVisibleList(p, m, {
3283
+ let i = document.body, o = n, d = r, f = useTemplateRef("containerRef"), m = shallowRef([]), g = useTemplateRef("moreMenuRef"), _ = useTemplateRef("moreBtnRef"), { visibleItems: v } = useObserverVisibleList(f, m, {
3223
3284
  items: computed(() => o.shortcuts),
3224
3285
  gap: GAP,
3225
3286
  moreItemRef: _
@@ -3244,7 +3305,7 @@ var _hoisted_1$32 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
3244
3305
  }
3245
3306
  }), (r, a) => (openBlock(), createElementBlock("div", {
3246
3307
  ref_key: "containerRef",
3247
- ref: p,
3308
+ ref: f,
3248
3309
  class: "shortcut-btns"
3249
3310
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.shortcuts, (e, n) => (openBlock(), createBlock(shortcut_btn_default, {
3250
3311
  key: e.key || e.id,
@@ -3272,7 +3333,7 @@ var _hoisted_1$32 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
3272
3333
  b.value = !1;
3273
3334
  })
3274
3335
  }, {
3275
- content: withCtx(() => [createElementVNode("div", _hoisted_1$32, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
3336
+ content: withCtx(() => [createElementVNode("div", _hoisted_1$36, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
3276
3337
  key: e.id,
3277
3338
  mode: "menu",
3278
3339
  shortcut: e,
@@ -3309,7 +3370,7 @@ function _objectWithoutProperties(e, n) {
3309
3370
  }
3310
3371
  return a;
3311
3372
  }
3312
- var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$31 = { class: "shortcut-render" }, _hoisted_2$21 = { class: "shortcut-render-header" }, _hoisted_3$15 = { class: "header-name" }, _hoisted_4$14 = { class: "shortcut-render-content" }, _hoisted_5$10 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
3373
+ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$35 = { class: "shortcut-render" }, _hoisted_2$25 = { class: "shortcut-render-header" }, _hoisted_3$17 = { class: "header-name" }, _hoisted_4$17 = { class: "shortcut-render-content" }, _hoisted_5$12 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
3313
3374
  __name: "shortcut-render",
3314
3375
  props: {
3315
3376
  alias: {},
@@ -3327,7 +3388,7 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$31 = { class:
3327
3388
  },
3328
3389
  emits: ["close", "submit"],
3329
3390
  setup(n, { emit: r }) {
3330
- let i = n, a = r, o = useTemplateRef("formRef"), c = reactive({}), p = shallowRef({});
3391
+ let i = n, a = r, o = useTemplateRef("formRef"), c = reactive({}), d = shallowRef({});
3331
3392
  watchEffect(() => {
3332
3393
  var e;
3333
3394
  if (i.formModel) for (let e in i.formModel) c[e] = i.formModel[e];
@@ -3374,7 +3435,7 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$31 = { class:
3374
3435
  case "switcher": return h(Switcher, d);
3375
3436
  default: return null;
3376
3437
  }
3377
- }, y = function() {
3438
+ }, v = function() {
3378
3439
  var e = _asyncToGenerator(function* () {
3379
3440
  var e, n;
3380
3441
  (yield (e = o.value) == null || (n = e.validate) == null ? void 0 : n.call(e).catch(() => !1)) && a("submit", _objectSpread2({}, c));
@@ -3387,20 +3448,20 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$31 = { class:
3387
3448
  }, x = () => {
3388
3449
  a("close");
3389
3450
  };
3390
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$21, [
3451
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$35, [createElementVNode("div", _hoisted_2$25, [
3391
3452
  createVNode(unref(ThinkingIcon), { class: "header-icon" }),
3392
- createElementVNode("span", _hoisted_3$15, toDisplayString(n.alias || n.name), 1),
3453
+ createElementVNode("span", _hoisted_3$17, toDisplayString(n.alias || n.name), 1),
3393
3454
  createVNode(unref(CloseIcon), {
3394
3455
  class: "header-close",
3395
3456
  onClick: x
3396
3457
  })
3397
- ]), createElementVNode("div", _hoisted_4$14, [createVNode(unref(Form), {
3458
+ ]), createElementVNode("div", _hoisted_4$17, [createVNode(unref(Form), {
3398
3459
  ref_key: "formRef",
3399
3460
  ref: o,
3400
3461
  class: "shortcut-render-form",
3401
3462
  "form-type": "vertical",
3402
3463
  model: c,
3403
- rules: p.value
3464
+ rules: d.value
3404
3465
  }, {
3405
3466
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.components, (e, n) => (openBlock(), createBlock(unref(Form).FormItem, mergeProps({
3406
3467
  key: e.id,
@@ -3412,9 +3473,9 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$31 = { class:
3412
3473
  default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_(e))))]),
3413
3474
  _: 2
3414
3475
  }, 1040, ["style"]))), 128)), createVNode(unref(Form).FormItem, { class: "shortcut-footer-item" }, {
3415
- default: withCtx(() => [createElementVNode("div", _hoisted_5$10, [createVNode(unref(Button), {
3476
+ default: withCtx(() => [createElementVNode("div", _hoisted_5$12, [createVNode(unref(Button), {
3416
3477
  theme: "primary",
3417
- onClick: y
3478
+ onClick: v
3418
3479
  }, {
3419
3480
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("提交")), 1)]),
3420
3481
  _: 1
@@ -6829,7 +6890,7 @@ function parseLatexEnvName(e, n) {
6829
6890
  endIdx: r + 1
6830
6891
  };
6831
6892
  }
6832
- var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
6893
+ var _hoisted_1$34 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
6833
6894
  __name: "tool-btn",
6834
6895
  props: {
6835
6896
  description: {},
@@ -6856,14 +6917,14 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6856
6917
  }]),
6857
6918
  style: normalizeStyle({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
6858
6919
  onClick: c
6859
- }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$30, toDisplayString(e.name), 1))], 6)), [[unref(directive), o.value]]);
6920
+ }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$34, toDisplayString(e.name), 1))], 6)), [[unref(directive), o.value]]);
6860
6921
  }
6861
- }), _hoisted_1$29 = { class: "code-content-wrapper" }, _hoisted_2$20 = { class: "code-content-header" }, _hoisted_3$14 = { class: "code-header-language" }, _hoisted_4$13 = { class: "hljs-pre" }, _hoisted_5$9 = ["innerHTML"], _hoisted_6$4 = ["innerHTML"], MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
6922
+ }), _hoisted_1$33 = { class: "code-content-wrapper" }, _hoisted_2$24 = { class: "code-content-header" }, _hoisted_3$16 = { class: "code-header-language" }, _hoisted_4$16 = { class: "hljs-pre" }, _hoisted_5$11 = ["innerHTML"], _hoisted_6$5 = ["innerHTML"], MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
6862
6923
  __name: "code-content",
6863
6924
  props: { token: {} },
6864
6925
  emits: ["mounted"],
6865
6926
  setup(n, { emit: r }) {
6866
- let i = n, o = r, s = useTemplateRef("codeRef"), p = shallowRef(""), { copy: m } = useClipboard(), g = shallowRef([]), _ = shallowRef(""), v = shallowRef(""), y = /* @__PURE__ */ new Map(), b = (e) => {
6927
+ let i = n, o = r, s = useTemplateRef("codeRef"), d = shallowRef(""), { copy: m } = useClipboard(), g = shallowRef([]), _ = shallowRef(""), v = shallowRef(""), y = /* @__PURE__ */ new Map(), b = (e) => {
6867
6928
  for (let r of e) if (r.type === "fence" || r.type === "code_block") {
6868
6929
  var n;
6869
6930
  return {
@@ -6920,13 +6981,13 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6920
6981
  });
6921
6982
  }
6922
6983
  g.value = u, _.value = c, v.value = c ? S(c, i) : "";
6923
- }, D = computed(() => {
6984
+ }, T = computed(() => {
6924
6985
  let { language: e } = b(i.token), n = ["hljs"];
6925
6986
  return e && n.push(`language-${e}`), n.join(" ");
6926
6987
  });
6927
6988
  watch(() => i.token, (e) => {
6928
6989
  let { content: n, language: r } = b(e);
6929
- p.value = r, w(n, r), nextTick(() => {
6990
+ d.value = r, w(n, r), nextTick(() => {
6930
6991
  o("mounted", { get el() {
6931
6992
  return s.value;
6932
6993
  } });
@@ -6940,38 +7001,38 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6940
7001
  let n = (e = s.value) == null ? void 0 : e.innerText;
6941
7002
  n && m(n);
6942
7003
  };
6943
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$29, [createElementVNode("div", _hoisted_2$20, [createElementVNode("span", _hoisted_3$14, toDisplayString(p.value), 1), createVNode(tool_btn_default, {
7004
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$33, [createElementVNode("div", _hoisted_2$24, [createElementVNode("span", _hoisted_3$16, toDisplayString(d.value), 1), createVNode(tool_btn_default, {
6944
7005
  id: "copy",
6945
7006
  description: "复制",
6946
7007
  name: "复制",
6947
7008
  onClick: O
6948
- })]), createElementVNode("pre", _hoisted_4$13, [createElementVNode("code", {
7009
+ })]), createElementVNode("pre", _hoisted_4$16, [createElementVNode("code", {
6949
7010
  ref_key: "codeRef",
6950
7011
  ref: s,
6951
- class: normalizeClass(D.value)
7012
+ class: normalizeClass(T.value)
6952
7013
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (n, i) => (openBlock(), createElementBlock(Fragment, { key: `completed-${i}` }, [createElementVNode("span", {
6953
7014
  class: "code-line",
6954
7015
  innerHTML: n.html
6955
- }, null, 8, _hoisted_5$9), r[0] || (r[0] = createTextVNode(toDisplayString("\n"), -1))], 64))), 128)), _.value ? (openBlock(), createElementBlock("span", {
7016
+ }, null, 8, _hoisted_5$11), r[0] || (r[0] = createTextVNode(toDisplayString("\n"), -1))], 64))), 128)), _.value ? (openBlock(), createElementBlock("span", {
6956
7017
  key: 0,
6957
7018
  class: "code-line current-line",
6958
7019
  innerHTML: v.value
6959
- }, null, 8, _hoisted_6$4)) : createCommentVNode("", !0)], 2)])]));
7020
+ }, null, 8, _hoisted_6$5)) : createCommentVNode("", !0)], 2)])]));
6960
7021
  }
6961
- }), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$28 = { class: "md-image-wrapper" }, _hoisted_2$19 = {
7022
+ }), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$32 = { class: "md-image-wrapper" }, _hoisted_2$23 = {
6962
7023
  key: 0,
6963
7024
  class: "md-image-loading"
6964
- }, _hoisted_3$13 = { class: "md-image-loading-text" }, _hoisted_4$12 = {
7025
+ }, _hoisted_3$15 = { class: "md-image-loading-text" }, _hoisted_4$15 = {
6965
7026
  key: 1,
6966
7027
  class: "md-image-error"
6967
- }, _hoisted_5$8 = { class: "md-image-error-text" }, _hoisted_6$3 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
7028
+ }, _hoisted_5$10 = { class: "md-image-error-text" }, _hoisted_6$4 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
6968
7029
  __name: "image-content",
6969
7030
  props: {
6970
7031
  alt: {},
6971
7032
  src: {}
6972
7033
  },
6973
7034
  setup(e) {
6974
- let n = /* @__PURE__ */ new Set(), r = e, i = computed(() => n.has(r.src)), o = shallowRef(!i.value), s = shallowRef(!1), c = shallowRef(i.value), d = i.value ? r.src : "", p = computed(() => i.value ? !1 : !!(!_.value || o.value || !c.value && s.value)), m = computed(() => c.value && s.value && !o.value), g = (0, import_debounce.default)(() => {
7035
+ let n = /* @__PURE__ */ new Set(), r = e, i = computed(() => n.has(r.src)), o = shallowRef(!i.value), s = shallowRef(!1), c = shallowRef(i.value), d = i.value ? r.src : "", f = computed(() => i.value ? !1 : !!(!_.value || o.value || !c.value && s.value)), m = computed(() => c.value && s.value && !o.value), g = (0, import_debounce.default)(() => {
6975
7036
  c.value = !0;
6976
7037
  }, 500), _ = computed(() => {
6977
7038
  var e;
@@ -7013,17 +7074,17 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
7013
7074
  c.value = !1, g(), _.value ? v(e) : (o.value = !0, s.value = !1);
7014
7075
  }, { immediate: !0 }), watch(_, (e) => {
7015
7076
  e && r.src && v(r.src);
7016
- }), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$28, [p.value ? (openBlock(), createElementBlock("span", _hoisted_2$19, [createVNode(unref(Loading), {
7077
+ }), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$32, [f.value ? (openBlock(), createElementBlock("span", _hoisted_2$23, [createVNode(unref(Loading), {
7017
7078
  mode: "spin",
7018
7079
  size: "mini",
7019
7080
  theme: "primary"
7020
- }), createElementVNode("span", _hoisted_3$13, toDisplayString(unref(t)("图片加载中...")), 1)])) : m.value ? (openBlock(), createElementBlock("span", _hoisted_4$12, [r[0] || (r[0] = createElementVNode("span", { class: "md-image-error-icon" }, "⚠️", -1)), createElementVNode("span", _hoisted_5$8, toDisplayString(e.alt || unref(t)("图片加载失败")), 1)])) : (openBlock(), createElementBlock("img", {
7081
+ }), createElementVNode("span", _hoisted_3$15, toDisplayString(unref(t)("图片加载中...")), 1)])) : m.value ? (openBlock(), createElementBlock("span", _hoisted_4$15, [r[0] || (r[0] = createElementVNode("span", { class: "md-image-error-icon" }, "⚠️", -1)), createElementVNode("span", _hoisted_5$10, toDisplayString(e.alt || unref(t)("图片加载失败")), 1)])) : (openBlock(), createElementBlock("img", {
7021
7082
  key: 2,
7022
7083
  alt: e.alt,
7023
7084
  class: "md-image",
7024
7085
  loading: "lazy",
7025
7086
  src: e.src
7026
- }, null, 8, _hoisted_6$3))]));
7087
+ }, null, 8, _hoisted_6$4))]));
7027
7088
  }
7028
7089
  }), import_throttle$2 = /* @__PURE__ */ __toESM(require_throttle()), ErrorColor = "#cc0000", latex_content_default = /* @__PURE__ */ defineComponent({
7029
7090
  __name: "latex-content",
@@ -7249,7 +7310,7 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
7249
7310
  innerHTML: r.value
7250
7311
  }, null, 8, ["class", "innerHTML"]));
7251
7312
  }
7252
- }), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$27 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
7313
+ }), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$31 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
7253
7314
  __name: "mermaid-content",
7254
7315
  props: { token: {} },
7255
7316
  emits: ["mounted"],
@@ -7308,13 +7369,13 @@ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
7308
7369
  ref: i,
7309
7370
  class: "mermaid-content",
7310
7371
  innerHTML: r.value
7311
- }, null, 8, _hoisted_1$27));
7372
+ }, null, 8, _hoisted_1$31));
7312
7373
  }
7313
- }), _hoisted_1$26 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
7374
+ }), _hoisted_1$30 = { class: "ai-error-content" }, _hoisted_2$22 = { class: "ai-error-content-text" }, common_error_content_default = /* @__PURE__ */ defineComponent({
7314
7375
  __name: "common-error-content",
7315
7376
  props: { content: {} },
7316
7377
  setup(e) {
7317
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
7378
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$30, [createVNode(unref(ErrorIcon)), createElementVNode("div", _hoisted_2$22, toDisplayString(e.content), 1)]));
7318
7379
  }
7319
7380
  }), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
7320
7381
  keyCounterMap = /* @__PURE__ */ new Map();
@@ -7480,7 +7541,7 @@ var vnode_renderer_default = defineComponent({
7480
7541
  setup(e) {
7481
7542
  return () => tokensToVNodes(e.tokens, e.options);
7482
7543
  }
7483
- }), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$25 = { class: "markdown-content" }, _hoisted_2$18 = {
7544
+ }), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$29 = { class: "markdown-content" }, _hoisted_2$21 = {
7484
7545
  key: 1,
7485
7546
  class: "markdown-body"
7486
7547
  }, markdown_content_default = /* @__PURE__ */ defineComponent({
@@ -7577,10 +7638,10 @@ var vnode_renderer_default = defineComponent({
7577
7638
  leading: !0,
7578
7639
  trailing: !0
7579
7640
  });
7580
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$25, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
7641
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$29, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
7581
7642
  key: 0,
7582
7643
  content: n.content
7583
- }, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$18, [(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [d(n) ? (openBlock(), createBlock(unref(mermaid_content_default), {
7644
+ }, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [d(n) ? (openBlock(), createBlock(unref(mermaid_content_default), {
7584
7645
  key: r,
7585
7646
  token: n,
7586
7647
  onMounted: unref(g)
@@ -7599,7 +7660,7 @@ var vnode_renderer_default = defineComponent({
7599
7660
  onVnodeMounted: unref(g)
7600
7661
  }, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
7601
7662
  }
7602
- }), _hoisted_1$24 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
7663
+ }), _hoisted_1$28 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
7603
7664
  __name: "reference-content",
7604
7665
  props: { content: {} },
7605
7666
  setup(n) {
@@ -7618,7 +7679,7 @@ var vnode_renderer_default = defineComponent({
7618
7679
  createElementVNode("span", {
7619
7680
  class: "ai-reference-item-title",
7620
7681
  onClick: (n) => e.url && i(e.url, n)
7621
- }, toDisplayString(e.title), 9, _hoisted_1$24),
7682
+ }, toDisplayString(e.title), 9, _hoisted_1$28),
7622
7683
  e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
7623
7684
  key: 0,
7624
7685
  onClick: (n) => e.url && i(e.url, n)
@@ -8182,7 +8243,7 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
8182
8243
  doc: "知识库",
8183
8244
  knowledgebase: "知识库",
8184
8245
  shortcut: "快捷指令"
8185
- }, noop = () => {}, MessageState = {
8246
+ }, noop = () => {}, IMAGE_PREVIEW_GROUP_KEY = Symbol("imagePreviewGroup"), MessageState = {
8186
8247
  ACTIVE: "active",
8187
8248
  DISABLED: "disabled",
8188
8249
  LOADING: "loading"
@@ -8192,7 +8253,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
8192
8253
  }({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
8193
8254
  return e.Disabled = "disabled", e.Hidden = "hidden", e;
8194
8255
  }({});
8195
- var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
8256
+ var _hoisted_1$27 = { class: "file-upload-btn" }, _hoisted_2$20 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
8196
8257
  __name: "file-upload-btn",
8197
8258
  props: {
8198
8259
  accept: { default: "image/*" },
@@ -8200,7 +8261,8 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8200
8261
  multiple: {
8201
8262
  type: Boolean,
8202
8263
  default: !0
8203
- }
8264
+ },
8265
+ tippyOptions: {}
8204
8266
  },
8205
8267
  emits: ["upload"],
8206
8268
  setup(e, { emit: n }) {
@@ -8221,7 +8283,7 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8221
8283
  }
8222
8284
  n.value = "";
8223
8285
  };
8224
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$23, [createElementVNode("input", {
8286
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("input", {
8225
8287
  ref_key: "fileInputRef",
8226
8288
  ref: a,
8227
8289
  accept: e.accept,
@@ -8229,25 +8291,25 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8229
8291
  multiple: "",
8230
8292
  type: "file",
8231
8293
  onChange: s
8232
- }, null, 40, _hoisted_2$17), withDirectives((openBlock(), createElementBlock("span", {
8294
+ }, null, 40, _hoisted_2$20), withDirectives((openBlock(), createElementBlock("span", {
8233
8295
  class: "ai-shortcut-btn file-upload-btn-icon",
8234
8296
  onClick: o
8235
- }, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
8236
- content: unref(t)("上传文件"),
8297
+ }, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
8298
+ content: unref(t)("上传图片"),
8237
8299
  theme: "ai-chat-box",
8238
8300
  offset: [0, 16]
8239
- }]])]));
8301
+ })]])]));
8240
8302
  }
8241
- }), _hoisted_1$22 = { class: "ai-cite-content" }, _hoisted_2$16 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
8303
+ }), _hoisted_1$26 = { class: "ai-cite-content" }, _hoisted_2$19 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
8242
8304
  __name: "cite-content",
8243
8305
  props: {
8244
8306
  content: {},
8245
8307
  onClose: { type: Function }
8246
8308
  },
8247
8309
  setup(e) {
8248
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
8310
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [
8249
8311
  createVNode(unref(CiteIcon)),
8250
- createElementVNode("span", _hoisted_2$16, toDisplayString(e.content), 1),
8312
+ createElementVNode("span", _hoisted_2$19, toDisplayString(e.content), 1),
8251
8313
  e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
8252
8314
  key: 0,
8253
8315
  onClick: r[0] || (r[0] = (n) => {
@@ -8257,14 +8319,291 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8257
8319
  })) : createCommentVNode("", !0)
8258
8320
  ]));
8259
8321
  }
8260
- }), _hoisted_1$21 = { class: "ai-files-content" }, _hoisted_2$15 = [
8322
+ }), _hoisted_1$25 = { class: "ai-image-preview-toolbar" }, _hoisted_2$18 = { class: "ai-image-preview-toolbar-inner" }, _hoisted_3$14 = {
8323
+ key: 0,
8324
+ class: "ai-image-preview-toolbar-pages"
8325
+ }, _hoisted_4$14 = {
8326
+ key: 1,
8327
+ class: "ai-image-preview-toolbar-divider"
8328
+ }, _hoisted_5$9 = ["data-tooltip"], _hoisted_6$3 = ["data-tooltip"], _hoisted_7$1 = ["data-tooltip"], _hoisted_8$1 = ["data-tooltip"], _hoisted_9 = ["data-tooltip"], _hoisted_10 = { class: "ai-image-preview-toolbar-info" }, preview_toolbar_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "PreviewToolbar" }), {}, {
8329
+ __name: "preview-toolbar",
8330
+ props: {
8331
+ activeIndex: {},
8332
+ currentImageInfo: {},
8333
+ isMultiple: { type: Boolean },
8334
+ showInfo: { type: Boolean },
8335
+ total: {}
8336
+ },
8337
+ emits: [
8338
+ "zoomIn",
8339
+ "zoomOut",
8340
+ "rotate",
8341
+ "reset",
8342
+ "download"
8343
+ ],
8344
+ setup(n, { emit: r }) {
8345
+ let i = r;
8346
+ return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$25, [createElementVNode("div", _hoisted_2$18, [
8347
+ n.isMultiple ? (openBlock(), createElementBlock("span", _hoisted_3$14, toDisplayString(n.activeIndex + 1) + " / " + toDisplayString(n.total), 1)) : createCommentVNode("", !0),
8348
+ n.isMultiple ? (openBlock(), createElementBlock("span", _hoisted_4$14)) : createCommentVNode("", !0),
8349
+ createElementVNode("div", {
8350
+ class: "ai-image-preview-toolbar-btn",
8351
+ "data-tooltip": unref(t)("缩小"),
8352
+ onClick: a[0] || (a[0] = (e) => i("zoomOut"))
8353
+ }, [createVNode(unref(ZoomOutIcon))], 8, _hoisted_5$9),
8354
+ createElementVNode("div", {
8355
+ class: "ai-image-preview-toolbar-btn",
8356
+ "data-tooltip": unref(t)("放大"),
8357
+ onClick: a[1] || (a[1] = (e) => i("zoomIn"))
8358
+ }, [createVNode(unref(ZoomInIcon))], 8, _hoisted_6$3),
8359
+ createElementVNode("div", {
8360
+ class: "ai-image-preview-toolbar-btn",
8361
+ "data-tooltip": unref(t)("旋转"),
8362
+ onClick: a[2] || (a[2] = (e) => i("rotate"))
8363
+ }, [createVNode(unref(RotateIcon))], 8, _hoisted_7$1),
8364
+ createElementVNode("div", {
8365
+ class: "ai-image-preview-toolbar-btn",
8366
+ "data-tooltip": unref(t)("重置"),
8367
+ onClick: a[3] || (a[3] = (e) => i("reset"))
8368
+ }, [createVNode(unref(FitScreenIcon))], 8, _hoisted_8$1),
8369
+ createElementVNode("div", {
8370
+ class: "ai-image-preview-toolbar-btn",
8371
+ "data-tooltip": unref(t)("下载"),
8372
+ onClick: a[4] || (a[4] = (e) => i("download"))
8373
+ }, [createVNode(unref(DownloadIcon))], 8, _hoisted_9),
8374
+ r.$slots.extra ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [a[5] || (a[5] = createElementVNode("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)), renderSlot(r.$slots, "extra")], 64)) : createCommentVNode("", !0),
8375
+ n.showInfo && n.currentImageInfo ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [a[7] || (a[7] = createElementVNode("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)), createElementVNode("div", _hoisted_10, [
8376
+ createVNode(unref(ImageSizeIcon), { class: "ai-image-preview-toolbar-info-icon" }),
8377
+ createElementVNode("span", null, toDisplayString(n.currentImageInfo.width) + " px " + toDisplayString(unref(t)("宽")), 1),
8378
+ n.currentImageInfo.resolution ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
8379
+ a[6] || (a[6] = createElementVNode("span", { class: "ai-image-preview-toolbar-info-dot" }, null, -1)),
8380
+ createVNode(unref(ImageSizeIcon), { class: "ai-image-preview-toolbar-info-icon" }),
8381
+ createElementVNode("span", null, toDisplayString(n.currentImageInfo.resolution), 1)
8382
+ ], 64)) : createCommentVNode("", !0)
8383
+ ])], 64)) : createCommentVNode("", !0)
8384
+ ])]));
8385
+ }
8386
+ })), ZOOM_STEP = .15, ZOOM_MIN = .1, ZOOM_MAX = 10;
8387
+ function useImageTransform() {
8388
+ let e = shallowRef(1), n = shallowRef(0), r = shallowRef(0), i = shallowRef(0), o = shallowRef(!1), s = shallowRef(!1), c = 0, l = 0, u = 0, d = 0, f = computed(() => ({
8389
+ transform: `translate(${r.value}px, ${i.value}px) scale(${e.value}) rotate(${n.value}deg)`,
8390
+ cursor: o.value ? "grabbing" : "grab",
8391
+ transition: o.value || s.value ? "none" : "transform 0.3s ease"
8392
+ })), p = () => {
8393
+ s.value = !0, e.value = 1, n.value = 0, r.value = 0, i.value = 0, requestAnimationFrame(() => {
8394
+ s.value = !1;
8395
+ });
8396
+ }, m = () => {
8397
+ e.value = Math.min(ZOOM_MAX, e.value * (1 + ZOOM_STEP));
8398
+ }, g = () => {
8399
+ e.value = Math.max(ZOOM_MIN, e.value * (1 - ZOOM_STEP));
8400
+ };
8401
+ return {
8402
+ imageStyle: f,
8403
+ resetTransform: p,
8404
+ zoomIn: m,
8405
+ zoomOut: g,
8406
+ rotateCW: () => {
8407
+ n.value += 90;
8408
+ },
8409
+ handleWheel: (e) => {
8410
+ e.deltaY < 0 ? m() : g();
8411
+ },
8412
+ handleDragStart: (e) => {
8413
+ if (e.button !== 0) return;
8414
+ o.value = !0, c = e.clientX, l = e.clientY, u = r.value, d = i.value;
8415
+ let n = (e) => {
8416
+ o.value && (r.value = u + (e.clientX - c), i.value = d + (e.clientY - l));
8417
+ }, a = () => {
8418
+ o.value = !1, document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a);
8419
+ };
8420
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
8421
+ }
8422
+ };
8423
+ }
8424
+ function usePreviewKeyboard(e) {
8425
+ let { visible: n, onClose: r, onPrev: i, onNext: a } = e, o = (e) => {
8426
+ if (n.value) switch (e.key) {
8427
+ case "Escape":
8428
+ r();
8429
+ break;
8430
+ case "ArrowLeft":
8431
+ i == null || i();
8432
+ break;
8433
+ case "ArrowRight":
8434
+ a == null || a();
8435
+ break;
8436
+ }
8437
+ }, s = () => {
8438
+ document.addEventListener("keydown", o), document.body.style.overflow = "hidden";
8439
+ }, c = () => {
8440
+ document.removeEventListener("keydown", o), document.body.style.overflow = "";
8441
+ };
8442
+ watch(n, (e) => {
8443
+ e ? s() : c();
8444
+ }, { immediate: !0 }), onBeforeUnmount(() => {
8445
+ c();
8446
+ });
8447
+ }
8448
+ var _hoisted_1$24 = ["src"], _hoisted_2$17 = {
8449
+ key: 1,
8450
+ class: "ai-image-preview-error"
8451
+ }, _hoisted_3$13 = { class: "ai-image-preview-error-text" }, _hoisted_4$13 = {
8452
+ key: 2,
8453
+ class: "ai-image-preview-loading"
8454
+ }, _hoisted_5$8 = ["src"], image_preview_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ImagePreview" }), {}, {
8455
+ __name: "image-preview",
8456
+ props: /* @__PURE__ */ mergeModels({
8457
+ images: { default: () => [] },
8458
+ maskClosable: {
8459
+ type: Boolean,
8460
+ default: !0
8461
+ },
8462
+ onDownload: {
8463
+ type: Function,
8464
+ default: void 0
8465
+ },
8466
+ showInfo: {
8467
+ type: Boolean,
8468
+ default: !1
8469
+ }
8470
+ }, {
8471
+ visible: _objectSpread2({ type: Boolean }, { required: !0 }),
8472
+ visibleModifiers: {},
8473
+ current: { default: 0 },
8474
+ currentModifiers: {}
8475
+ }),
8476
+ emits: ["update:visible", "update:current"],
8477
+ setup(r) {
8478
+ let o = r, f = useModel(r, "visible"), m = useModel(r, "current"), { imageStyle: g, resetTransform: _, zoomIn: v, zoomOut: y, rotateCW: b, handleWheel: x, handleDragStart: S } = useImageTransform(), C = shallowRef("loading"), w = [], T = () => {
8479
+ w.forEach((e) => URL.revokeObjectURL(e)), w.length = 0;
8480
+ }, E = (e) => {
8481
+ let n = URL.createObjectURL(e);
8482
+ return w.push(n), {
8483
+ url: n,
8484
+ name: e.name,
8485
+ file: e
8486
+ };
8487
+ }, D = computed(() => (T(), o.images.map((e) => e instanceof File ? E(e) : typeof e == "string" ? { url: e } : e.file && !e.url ? _objectSpread2(_objectSpread2({}, e), {}, { url: E(e.file).url }) : e)));
8488
+ watch(f, (e) => {
8489
+ e || T();
8490
+ }), onBeforeUnmount(T);
8491
+ let O = computed(() => {
8492
+ var e;
8493
+ return (e = D.value[m.value]) == null ? { url: "" } : e;
8494
+ }), j = computed(() => D.value.length > 1), M = computed(() => {
8495
+ let e = O.value;
8496
+ return !e.width && !e.resolution ? null : {
8497
+ width: e.width,
8498
+ resolution: e.resolution
8499
+ };
8500
+ }), N = () => {
8501
+ f.value = !1;
8502
+ }, F = () => {
8503
+ o.maskClosable && N();
8504
+ }, I = (e) => {
8505
+ m.value = e, _(), C.value = "loading";
8506
+ }, L = () => {
8507
+ I(m.value > 0 ? m.value - 1 : D.value.length - 1);
8508
+ }, R = () => {
8509
+ I(m.value < D.value.length - 1 ? m.value + 1 : 0);
8510
+ }, B = () => {
8511
+ let e = O.value, n = e.downloadUrl || e.url;
8512
+ if (o.onDownload) {
8513
+ o.onDownload(n);
8514
+ return;
8515
+ }
8516
+ let r = document.createElement("a");
8517
+ r.href = n, r.download = e.name || n.split("/").pop() || "image", r.target = "_blank", document.body.appendChild(r), r.click(), document.body.removeChild(r);
8518
+ }, U = () => {
8519
+ C.value = "loaded";
8520
+ }, G = () => {
8521
+ C.value = "error";
8522
+ };
8523
+ return usePreviewKeyboard({
8524
+ visible: f,
8525
+ onClose: N,
8526
+ onPrev: () => j.value && L(),
8527
+ onNext: () => j.value && R()
8528
+ }), (a, o) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-image-preview-fade" }, {
8529
+ default: withCtx(() => [f.value ? (openBlock(), createElementBlock("div", {
8530
+ key: 0,
8531
+ class: "ai-image-preview",
8532
+ onWheel: o[1] || (o[1] = withModifiers((...e) => unref(x) && unref(x)(...e), ["prevent"]))
8533
+ }, [
8534
+ createElementVNode("div", {
8535
+ class: "ai-image-preview-close",
8536
+ onClick: N
8537
+ }, [createVNode(unref(PreviewCloseIcon), { class: "ai-image-preview-close-icon" })]),
8538
+ j.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", {
8539
+ class: "ai-image-preview-arrow ai-image-preview-arrow-left",
8540
+ onClick: L
8541
+ }, [createVNode(unref(ArrowLeftIcon), { class: "ai-image-preview-arrow-icon" })]), createElementVNode("div", {
8542
+ class: "ai-image-preview-arrow ai-image-preview-arrow-right",
8543
+ onClick: R
8544
+ }, [createVNode(unref(ArrowRightPreviewIcon), { class: "ai-image-preview-arrow-icon" })])], 64)) : createCommentVNode("", !0),
8545
+ createElementVNode("div", {
8546
+ class: "ai-image-preview-body",
8547
+ onClick: withModifiers(F, ["self"]),
8548
+ onMousedown: o[0] || (o[0] = (...e) => unref(S) && unref(S)(...e))
8549
+ }, [
8550
+ C.value === "error" ? createCommentVNode("", !0) : (openBlock(), createElementBlock("img", {
8551
+ key: 0,
8552
+ class: "ai-image-preview-img",
8553
+ draggable: "false",
8554
+ src: O.value.url,
8555
+ style: normalizeStyle(unref(g)),
8556
+ onError: G,
8557
+ onLoad: U
8558
+ }, null, 44, _hoisted_1$24)),
8559
+ C.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_2$17, [createVNode(unref(ImageBrokenIcon), { class: "ai-image-preview-error-icon" }), createElementVNode("p", _hoisted_3$13, toDisplayString(unref(t)("抱歉,图片加载失败,可尝试重新加载")), 1)])) : createCommentVNode("", !0),
8560
+ C.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_4$13, [O.value.thumbnailUrl ? (openBlock(), createElementBlock("img", {
8561
+ key: 0,
8562
+ class: "ai-image-preview-img ai-image-preview-img--blur",
8563
+ draggable: "false",
8564
+ src: O.value.thumbnailUrl,
8565
+ style: normalizeStyle(unref(g))
8566
+ }, null, 12, _hoisted_5$8)) : createCommentVNode("", !0)])) : createCommentVNode("", !0)
8567
+ ], 32),
8568
+ createVNode(preview_toolbar_default, {
8569
+ "active-index": m.value,
8570
+ "current-image-info": M.value,
8571
+ "is-multiple": j.value,
8572
+ "show-info": r.showInfo,
8573
+ total: D.value.length,
8574
+ onDownload: B,
8575
+ onReset: unref(_),
8576
+ onRotate: unref(b),
8577
+ onZoomIn: unref(v),
8578
+ onZoomOut: unref(y)
8579
+ }, createSlots({ _: 2 }, [a.$slots.extra ? {
8580
+ name: "extra",
8581
+ fn: withCtx(() => [renderSlot(a.$slots, "extra")]),
8582
+ key: "0"
8583
+ } : void 0]), 1032, [
8584
+ "active-index",
8585
+ "current-image-info",
8586
+ "is-multiple",
8587
+ "show-info",
8588
+ "total",
8589
+ "onReset",
8590
+ "onRotate",
8591
+ "onZoomIn",
8592
+ "onZoomOut"
8593
+ ])
8594
+ ], 32)) : createCommentVNode("", !0)]),
8595
+ _: 3
8596
+ })]));
8597
+ }
8598
+ })), _hoisted_1$23 = { class: "ai-files-content" }, _hoisted_2$16 = [
8261
8599
  "alt",
8262
8600
  "src",
8601
+ "onClick",
8263
8602
  "onError"
8264
8603
  ], _hoisted_3$12 = {
8265
8604
  key: 1,
8266
8605
  class: "file-content-image image-error"
8267
- }, _hoisted_4$11 = {
8606
+ }, _hoisted_4$12 = {
8268
8607
  key: 2,
8269
8608
  class: "file-content-object"
8270
8609
  }, _hoisted_5$7 = { class: "file-description" }, _hoisted_6$2 = { class: "file-name" }, _hoisted_7 = { class: "file-type" }, _hoisted_8 = { class: "file-size" }, file_content_default = /* @__PURE__ */ defineComponent({
@@ -8275,40 +8614,54 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8275
8614
  },
8276
8615
  emits: ["deleteFile"],
8277
8616
  setup(n, { emit: r }) {
8278
- let i = r, a = reactive({}), o = (e) => {
8617
+ let i = r, o = n, d = reactive({}), f = (e) => {
8279
8618
  var n;
8280
8619
  return e.url ? !0 : isImageFile(e.mimeType || ((n = e.file) == null ? void 0 : n.type));
8281
- }, d = (e) => {
8620
+ }, m = (e) => {
8282
8621
  var n;
8283
8622
  return e.url || ((n = e.file) == null ? void 0 : n.name) || "";
8284
- }, p = (e) => {
8285
- a[d(e)] = !0;
8286
- }, m = (e) => {
8623
+ }, g = (e) => {
8624
+ d[m(e)] = !0;
8625
+ }, _ = (e) => {
8287
8626
  i("deleteFile", e);
8627
+ }, v = shallowRef(!1), y = shallowRef(0), b = computed(() => o.files.filter((e) => f(e) && !d[m(e)])), x = computed(() => b.value.map((e) => e.url ? e.url : e.file ? e.file : "").filter(Boolean)), S = (e) => {
8628
+ let n = b.value.indexOf(e);
8629
+ n < 0 || (y.value = n, v.value = !0);
8288
8630
  };
8289
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
8290
- var r, i, g, _, v;
8631
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$23, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
8632
+ var r, i, a, o, v;
8291
8633
  return openBlock(), createElementBlock("div", {
8292
8634
  key: (r = e.file) == null ? void 0 : r.name,
8293
- class: normalizeClass(["file-content", { "is-file-object": !o(e) || a[d(e)] }])
8294
- }, [o(e) && !a[d(e)] ? (openBlock(), createElementBlock("img", {
8635
+ class: normalizeClass(["file-content", { "is-file-object": !f(e) || d[m(e)] }])
8636
+ }, [f(e) && !d[m(e)] ? (openBlock(), createElementBlock("img", {
8295
8637
  key: 0,
8296
8638
  alt: e.filename || ((i = e.file) == null ? void 0 : i.name),
8297
8639
  class: "file-content-image",
8298
8640
  src: e.url || unref(getFilePreviewUrl)(e.file),
8299
- onError: (n) => p(e)
8300
- }, null, 40, _hoisted_2$15)) : o(e) && a[d(e)] ? (openBlock(), createElementBlock("div", _hoisted_3$12, [createVNode(unref(ImageErrorIcon), { class: "file-error-icon" })])) : (openBlock(), createElementBlock("div", _hoisted_4$11, [createElementVNode("div", _hoisted_5$7, [
8641
+ onClick: (n) => S(e),
8642
+ onError: (n) => g(e)
8643
+ }, null, 40, _hoisted_2$16)) : f(e) && d[m(e)] ? (openBlock(), createElementBlock("div", _hoisted_3$12, [createVNode(unref(ImageErrorIcon), { class: "file-error-icon" })])) : (openBlock(), createElementBlock("div", _hoisted_4$12, [createElementVNode("div", _hoisted_5$7, [
8301
8644
  createVNode(unref(DocumentIcon), { class: "file-icon" }),
8302
- createElementVNode("span", _hoisted_6$2, toDisplayString(e.filename || ((g = e.file) == null ? void 0 : g.name)), 1),
8303
- createElementVNode("span", _hoisted_7, toDisplayString(e.file ? unref(getFileExtension)(e.file) : ((_ = e.filename) == null ? void 0 : _.split(".").pop()) || ((v = e.mimeType) == null ? void 0 : v.split("/").pop())), 1)
8645
+ createElementVNode("span", _hoisted_6$2, toDisplayString(e.filename || ((a = e.file) == null ? void 0 : a.name)), 1),
8646
+ createElementVNode("span", _hoisted_7, toDisplayString(e.file ? unref(getFileExtension)(e.file) : ((o = e.filename) == null ? void 0 : o.split(".").pop()) || ((v = e.mimeType) == null ? void 0 : v.split("/").pop())), 1)
8304
8647
  ]), createElementVNode("div", _hoisted_8, toDisplayString(unref(formatFileSize)(e.file)), 1)])), n.readonly ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(DeleteCircleIcon), {
8305
8648
  key: 3,
8306
8649
  class: "file-delete-icon",
8307
- onClick: (n) => m(e)
8650
+ onClick: (n) => _(e)
8308
8651
  }, null, 8, ["onClick"]))], 2);
8309
- }), 128))]));
8652
+ }), 128)), createVNode(image_preview_default, {
8653
+ current: y.value,
8654
+ "onUpdate:current": i[0] || (i[0] = (e) => y.value = e),
8655
+ visible: v.value,
8656
+ "onUpdate:visible": i[1] || (i[1] = (e) => v.value = e),
8657
+ images: x.value
8658
+ }, null, 8, [
8659
+ "current",
8660
+ "visible",
8661
+ "images"
8662
+ ])]));
8310
8663
  }
8311
- }), _hoisted_1$20 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8664
+ }), _hoisted_1$22 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8312
8665
  __name: "ai-prompt-list",
8313
8666
  props: {
8314
8667
  onSelect: { type: Function },
@@ -8328,7 +8681,7 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8328
8681
  key: e,
8329
8682
  class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(o) === r }]),
8330
8683
  onClick: (r) => n.onSelect(e)
8331
- }, toDisplayString(e), 11, _hoisted_1$20))), 128))], 512));
8684
+ }, toDisplayString(e), 11, _hoisted_1$22))), 128))], 512));
8332
8685
  }
8333
8686
  }), bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
8334
8687
  "top",
@@ -8993,12 +9346,12 @@ function preventOverflow(e) {
8993
9346
  var j, M = S === "y" ? "top" : left, N = S === "y" ? bottom : right, P = S === "y" ? "height" : "width", F = w[S], I = F + v[M], L = F - v[N], R = m ? -E[P] / 2 : 0, z = b === "start" ? T[P] : E[P], B = b === "start" ? -E[P] : -T[P], V = n.elements.arrow, H = m && V ? getLayoutRect(V) : {
8994
9347
  width: 0,
8995
9348
  height: 0
8996
- }, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), W = U[M], G = U[N], K = within(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, ty = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, J = n.elements.arrow && getOffsetParent(n.elements.arrow), ny = J ? S === "y" ? J.clientTop || 0 : J.clientLeft || 0 : 0, Y = (j = k == null ? void 0 : k[S]) == null ? 0 : j, ry = F + q - Y - ny, iy = F + ty - Y, X = within(m ? min$1(I, ry) : I, F, m ? max(L, iy) : L);
9349
+ }, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), W = U[M], G = U[N], K = within(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, Wy = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, J = n.elements.arrow && getOffsetParent(n.elements.arrow), Gy = J ? S === "y" ? J.clientTop || 0 : J.clientLeft || 0 : 0, Y = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Ky = F + q - Y - Gy, qy = F + Wy - Y, X = within(m ? min$1(I, Ky) : I, F, m ? max(L, qy) : L);
8997
9350
  w[S] = X, A[S] = X - F;
8998
9351
  }
8999
9352
  if (c) {
9000
- var ay, oy = S === "x" ? "top" : left, sy = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[oy], cy = Z - v[sy], ly = ["top", left].indexOf(y) !== -1, uy = (ay = k == null ? void 0 : k[C]) == null ? 0 : ay, dy = ly ? $ : Z - T[Q] - E[Q] - uy + O.altAxis, fy = ly ? Z + T[Q] + E[Q] - uy - O.altAxis : cy, py = m && ly ? withinMaxClamp(dy, Z, fy) : within(m ? dy : $, Z, m ? fy : cy);
9001
- w[C] = py, A[C] = py - Z;
9353
+ var Jy, Yy = S === "x" ? "top" : left, Xy = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Yy], Zy = Z - v[Xy], Qy = ["top", left].indexOf(y) !== -1, $y = (Jy = k == null ? void 0 : k[C]) == null ? 0 : Jy, eb = Qy ? $ : Z - T[Q] - E[Q] - $y + O.altAxis, tb = Qy ? Z + T[Q] + E[Q] - $y - O.altAxis : Zy, nb = m && Qy ? withinMaxClamp(eb, Z, tb) : within(m ? eb : $, Z, m ? tb : Zy);
9354
+ w[C] = nb, A[C] = nb - Z;
9002
9355
  }
9003
9356
  n.modifiersData[i] = A;
9004
9357
  }
@@ -9538,16 +9891,16 @@ function createTippy(e, n) {
9538
9891
  isShown: !1
9539
9892
  },
9540
9893
  plugins: b,
9541
- clearDelayTimeouts: uy,
9542
- setProps: dy,
9543
- setContent: fy,
9544
- show: py,
9545
- hide: my,
9546
- hideWithInteractivity: hy,
9547
- enable: cy,
9548
- disable: ly,
9549
- unmount: gy,
9550
- destroy: _y
9894
+ clearDelayTimeouts: $y,
9895
+ setProps: eb,
9896
+ setContent: tb,
9897
+ show: nb,
9898
+ hide: rb,
9899
+ hideWithInteractivity: ib,
9900
+ enable: Zy,
9901
+ disable: Qy,
9902
+ unmount: ab,
9903
+ destroy: ob
9551
9904
  };
9552
9905
  /* istanbul ignore if */
9553
9906
  if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
@@ -9556,7 +9909,7 @@ function createTippy(e, n) {
9556
9909
  var T = b.map(function(e) {
9557
9910
  return e.fn(x);
9558
9911
  }), E = e.hasAttribute("aria-expanded");
9559
- return ty(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
9912
+ return Wy(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
9560
9913
  x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
9561
9914
  }), C.addEventListener("mouseleave", function() {
9562
9915
  x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
@@ -9675,17 +10028,17 @@ function createTippy(e, n) {
9675
10028
  });
9676
10029
  });
9677
10030
  }
9678
- function ty() {
9679
- O() && (q("touchstart", ny, { passive: !0 }), q("touchend", ry, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
9680
- if (e !== "manual") switch (q(e, ny), e) {
10031
+ function Wy() {
10032
+ O() && (q("touchstart", Gy, { passive: !0 }), q("touchend", Ky, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
10033
+ if (e !== "manual") switch (q(e, Gy), e) {
9681
10034
  case "mouseenter":
9682
- q("mouseleave", ry);
10035
+ q("mouseleave", Ky);
9683
10036
  break;
9684
10037
  case "focus":
9685
- q(isIE11 ? "focusout" : "blur", iy);
10038
+ q(isIE11 ? "focusout" : "blur", qy);
9686
10039
  break;
9687
10040
  case "focusin":
9688
- q("focusout", iy);
10041
+ q("focusout", qy);
9689
10042
  break;
9690
10043
  }
9691
10044
  });
@@ -9696,7 +10049,7 @@ function createTippy(e, n) {
9696
10049
  n.removeEventListener(r, i, a);
9697
10050
  }), m = [];
9698
10051
  }
9699
- function ny(e) {
10052
+ function Gy(e) {
9700
10053
  var n, r = !1;
9701
10054
  if (!(!x.state.isEnabled || X(e) || c)) {
9702
10055
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
@@ -9716,7 +10069,7 @@ function createTippy(e, n) {
9716
10069
  } : null;
9717
10070
  }).filter(Boolean), e) && (R(), $(e));
9718
10071
  }
9719
- function ry(e) {
10072
+ function Ky(e) {
9720
10073
  if (!(X(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9721
10074
  if (x.props.interactive) {
9722
10075
  x.hideWithInteractivity(e);
@@ -9725,14 +10078,14 @@ function createTippy(e, n) {
9725
10078
  $(e);
9726
10079
  }
9727
10080
  }
9728
- function iy(e) {
10081
+ function qy(e) {
9729
10082
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
9730
10083
  }
9731
10084
  function X(e) {
9732
10085
  return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
9733
10086
  }
9734
- function ay() {
9735
- oy();
10087
+ function Jy() {
10088
+ Yy();
9736
10089
  var n = x.props, r = n.popperOptions, i = n.placement, a = n.offset, o = n.getReferenceClientRect, s = n.moveTransition, c = k() ? getChildren(C).arrow : null, l = o ? {
9737
10090
  getBoundingClientRect: o,
9738
10091
  contextElement: o.contextElement || A()
@@ -9790,13 +10143,13 @@ function createTippy(e, n) {
9790
10143
  modifiers: u
9791
10144
  }));
9792
10145
  }
9793
- function oy() {
10146
+ function Yy() {
9794
10147
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
9795
10148
  }
9796
- function sy() {
10149
+ function Xy() {
9797
10150
  var e = x.props.appendTo, n, r = A();
9798
10151
  /* istanbul ignore else */
9799
- n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO || e === "parent" ? r.parentNode : invokeWithArgsOrReturn(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, ay(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
10152
+ n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO || e === "parent" ? r.parentNode : invokeWithArgsOrReturn(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, Jy(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
9800
10153
  "Interactive tippy element may not be accessible via keyboard",
9801
10154
  "navigation because it is not directly after the reference element",
9802
10155
  "in the DOM source order.",
@@ -9835,31 +10188,31 @@ function createTippy(e, n) {
9835
10188
  });
9836
10189
  }
9837
10190
  }
9838
- function cy() {
10191
+ function Zy() {
9839
10192
  x.state.isEnabled = !0;
9840
10193
  }
9841
- function ly() {
10194
+ function Qy() {
9842
10195
  x.hide(), x.state.isEnabled = !1;
9843
10196
  }
9844
- function uy() {
10197
+ function $y() {
9845
10198
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
9846
10199
  }
9847
- function dy(n) {
10200
+ function eb(n) {
9848
10201
  /* istanbul ignore else */
9849
10202
  if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
9850
10203
  F("onBeforeUpdate", [x, n]), J();
9851
10204
  var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
9852
- x.props = i, ty(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(Y, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
10205
+ x.props = i, Wy(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(Y, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
9853
10206
  e.removeAttribute("aria-expanded");
9854
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ay(), Z().forEach(function(e) {
10207
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Jy(), Z().forEach(function(e) {
9855
10208
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
9856
10209
  })), F("onAfterUpdate", [x, n]);
9857
10210
  }
9858
10211
  }
9859
- function fy(e) {
10212
+ function tb(e) {
9860
10213
  x.setProps({ content: e });
9861
10214
  }
9862
- function py() {
10215
+ function nb() {
9863
10216
  /* istanbul ignore else */
9864
10217
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
9865
10218
  var e = x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = currentInput.isTouch && !x.props.touch, a = getValueAtIndexOrReturn(x.props.duration, 0, defaultProps.duration);
@@ -9879,10 +10232,10 @@ function createTippy(e, n) {
9879
10232
  x.state.isShown = !0, F("onShown", [x]);
9880
10233
  });
9881
10234
  }
9882
- }, sy();
10235
+ }, Xy();
9883
10236
  }
9884
10237
  }
9885
- function my() {
10238
+ function rb() {
9886
10239
  /* istanbul ignore else */
9887
10240
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
9888
10241
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
@@ -9894,18 +10247,18 @@ function createTippy(e, n) {
9894
10247
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
9895
10248
  }
9896
10249
  }
9897
- function hy(e) {
10250
+ function ib(e) {
9898
10251
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
9899
10252
  }
9900
- function gy() {
10253
+ function ab() {
9901
10254
  /* istanbul ignore else */
9902
- process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (oy(), Z().forEach(function(e) {
10255
+ process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (Yy(), Z().forEach(function(e) {
9903
10256
  e._tippy.unmount();
9904
10257
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
9905
10258
  return e !== x;
9906
10259
  }), x.state.isMounted = !1, F("onHidden", [x]));
9907
10260
  }
9908
- function _y() {
10261
+ function ob() {
9909
10262
  /* istanbul ignore else */
9910
10263
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("destroy")), !x.state.isDestroyed && (x.clearDelayTimeouts(), x.unmount(), J(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
9911
10264
  }
@@ -9992,7 +10345,7 @@ const OverflowTips = {
9992
10345
  e.removeEventListener("mouseenter", e.mouseEnterFunc), e.removeEventListener("mouseleave", e.mouseLeaveFunc), (n = e.unObserverFunc) == null || n.call(e), e.mouseEnterFunc = void 0, e.mouseLeaveFunc = void 0, e.unObserverFunc = void 0;
9993
10346
  }
9994
10347
  };
9995
- var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$14 = ["onClick"], _hoisted_3$11 = ["onClick"], _hoisted_4$10 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
10348
+ var _hoisted_1$21 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$15 = ["onClick"], _hoisted_3$11 = ["onClick"], _hoisted_4$11 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
9996
10349
  __name: "ai-slash-menu",
9997
10350
  props: {
9998
10351
  onSelect: { type: Function },
@@ -10005,7 +10358,7 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10005
10358
  "doc",
10006
10359
  "knowledgebase",
10007
10360
  "mcp"
10008
- ]), o = shallowRef([]), s = shallowRef([]), { activeIndex: f } = useMenuKeydown({
10361
+ ]), o = shallowRef([]), s = shallowRef([]), { activeIndex: d } = useMenuKeydown({
10009
10362
  items: o,
10010
10363
  onSelect: r.onSelect,
10011
10364
  menuRef: i
@@ -10022,7 +10375,7 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10022
10375
  items: c || []
10023
10376
  }), n.push(...c));
10024
10377
  }
10025
- f.value = 0, o.value = n, s.value = e;
10378
+ d.value = 0, o.value = n, s.value = e;
10026
10379
  });
10027
10380
  let p = (e) => {
10028
10381
  let n = a.value.findIndex((n) => n === e.type);
@@ -10038,25 +10391,25 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10038
10391
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (r, i) => (openBlock(), createElementBlock(Fragment, null, [r.items.length > 0 ? (openBlock(), createElementBlock("div", {
10039
10392
  key: i,
10040
10393
  class: "ai-slash-group"
10041
- }, [createElementVNode("div", _hoisted_1$19, [
10394
+ }, [createElementVNode("div", _hoisted_1$21, [
10042
10395
  (openBlock(), createElementBlock("svg", {
10043
10396
  class: "title-icon",
10044
10397
  style: normalizeStyle({ transform: a.value.includes(r.type) ? "rotate(90deg)" : "rotate(0deg)" }),
10045
10398
  viewBox: "0 0 1024 1024",
10046
10399
  onClick: (e) => p(r)
10047
- }, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$14)),
10400
+ }, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$15)),
10048
10401
  createElementVNode("span", { class: normalizeClass(`mark-${r.type}`) }, null, 2),
10049
10402
  createTextVNode(" " + toDisplayString(r.name) + " (" + toDisplayString(r.items.length) + ") ", 1)
10050
10403
  ]), a.value.includes(r.type) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(r.items, (e) => {
10051
10404
  var r;
10052
10405
  return openBlock(), createElementBlock("div", {
10053
10406
  key: e.id,
10054
- class: normalizeClass(["ai-slash-item ai-slash-group-item", { "is-active": ((r = o.value) == null || (r = r[unref(f)]) == null ? void 0 : r.id) === e.id }]),
10407
+ class: normalizeClass(["ai-slash-item ai-slash-group-item", { "is-active": ((r = o.value) == null || (r = r[unref(d)]) == null ? void 0 : r.id) === e.id }]),
10055
10408
  onClick: (r) => n.onSelect(e)
10056
10409
  }, [withDirectives((openBlock(), createElementBlock("span", {
10057
10410
  class: "ellipsis-text",
10058
10411
  title: e.name
10059
- }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$10)), [[unref(OverflowTips), {
10412
+ }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$11)), [[unref(OverflowTips), {
10060
10413
  text: e.name,
10061
10414
  zIndex: 9999999,
10062
10415
  placement: "right-start",
@@ -10082,7 +10435,7 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
10082
10435
  plain: (e) => e.label
10083
10436
  }) }
10084
10437
  });
10085
- var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-placeholder"], _hoisted_3$10 = { key: 0 }, _hoisted_4$9 = ["data-tag-type"], _hoisted_5$6 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
10438
+ var _hoisted_1$20 = { class: "ai-slash-input-wrapper" }, _hoisted_2$14 = ["aria-placeholder"], _hoisted_3$10 = { key: 0 }, _hoisted_4$10 = ["data-tag-type"], _hoisted_5$6 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
10086
10439
  __name: "ai-slash-input",
10087
10440
  props: {
10088
10441
  modelValue: {},
@@ -10096,20 +10449,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10096
10449
  "upload"
10097
10450
  ],
10098
10451
  setup(n, { expose: r, emit: i }) {
10099
- let a = useTemplateRef("editorRef"), o = useTemplateRef("tippyRef"), m = i, g = n, _ = customRef((e, n) => ({
10452
+ let a = useTemplateRef("editorRef"), o = useTemplateRef("tippyRef"), d = i, g = n, _ = customRef((e, n) => ({
10100
10453
  get() {
10101
10454
  return e(), typeof g.modelValue == "string" ? stringToDoc(g.modelValue) : g.modelValue;
10102
10455
  },
10103
10456
  set(e) {
10104
10457
  var r;
10105
- m("update:modelValue", e, (e == null || (r = e.flat()) == null || (r = r.filter((e) => e.type === "tag")) == null || (r = r.map((e) => {
10458
+ d("update:modelValue", e, (e == null || (r = e.flat()) == null || (r = r.filter((e) => e.type === "tag")) == null || (r = r.map((e) => {
10106
10459
  var n;
10107
10460
  return ((n = g.resources) == null ? void 0 : n.find((n) => (n.id === e.data.value || n.name === e.data.value) && n.type === e.data.type)) || null;
10108
10461
  })) == null ? void 0 : r.filter((e) => !!e)) || []), n();
10109
10462
  }
10110
- })), v = shallowRef("slash"), y = shallowRef(""), b = shallowRef([]), x = shallowRef([]), S, C, w = document.body, { commandSelection: T, GetCursorPosition: D } = useCommandSelection(), O = () => {
10463
+ })), v = shallowRef("slash"), y = shallowRef(""), b = shallowRef([]), x = shallowRef([]), S, C, w = document.body, { commandSelection: T, GetCursorPosition: E } = useCommandSelection(), O = () => {
10111
10464
  setTimeout(() => {
10112
- let e = P();
10465
+ let e = M();
10113
10466
  if (y.value = e.query || "", e.isActive) {
10114
10467
  var n, r;
10115
10468
  (n = o.value) == null || n.setProps({ getReferenceClientRect: () => {
@@ -10126,15 +10479,15 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10126
10479
  (i = o.value) == null || i.hide();
10127
10480
  }
10128
10481
  }, 16);
10129
- }, A = (e) => {
10130
- if (m("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
10482
+ }, k = (e) => {
10483
+ if (d("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
10131
10484
  var n;
10132
10485
  return e.shiftKey ? void 0 : ((n = e.preventDefault) == null || n.call(e), !1);
10133
10486
  }
10134
10487
  e.key === "@" && (v.value = "slash", O()), e.key === "/" && (v.value = "prompt", O());
10135
- }, N = () => {
10488
+ }, A = () => {
10136
10489
  y.value = "";
10137
- }, P = () => {
10490
+ }, M = () => {
10138
10491
  let e = {
10139
10492
  isActive: !1,
10140
10493
  query: "",
@@ -10171,18 +10524,18 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10171
10524
  e += ((a = r.text) == null ? void 0 : a.length) || 0;
10172
10525
  }
10173
10526
  return r.type === "tag" && (e += 1), e;
10174
- }, 0), L = (e) => {
10527
+ }, 0), I = (e) => {
10175
10528
  var n;
10176
- S.command(D);
10529
+ S.command(E);
10177
10530
  let { column: r, line: i } = T.value;
10178
- S.command(DeleteTag, [i, r - y.value.length - 1], [i, r]), S.command(InsertTag, [i, r], e), S.command(InsertText$1, [i, r + y.value.length + 1 + 1], " "), (n = o.value) == null || n.hide(), R();
10179
- }, R = () => {
10531
+ S.command(DeleteTag, [i, r - y.value.length - 1], [i, r]), S.command(InsertTag, [i, r], e), S.command(InsertText$1, [i, r + y.value.length + 1 + 1], " "), (n = o.value) == null || n.hide(), L();
10532
+ }, L = () => {
10180
10533
  setTimeout(() => {
10181
10534
  let e = window.getSelection(), n = document.createRange();
10182
10535
  a.value && e && (n.selectNodeContents(a.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
10183
10536
  }, 100);
10184
- }, V = (e) => {
10185
- S.command(ReplaceAll, e), R();
10537
+ }, z = (e) => {
10538
+ S.command(ReplaceAll, e), L();
10186
10539
  };
10187
10540
  watchEffect(() => {
10188
10541
  var e;
@@ -10195,12 +10548,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10195
10548
  (r = o.value) == null || r.hide();
10196
10549
  }
10197
10550
  });
10198
- let U = (e, n, r, i) => {
10551
+ let B = (e, n, r, i) => {
10199
10552
  if (n.type === "tag") {
10200
10553
  let n = F(e, r);
10201
10554
  S.command(DeleteTag, [i, n], [i, n + 1]);
10202
10555
  }
10203
- }, W = (e) => {
10556
+ }, U = (e) => {
10204
10557
  var n;
10205
10558
  let r = (n = e.clipboardData) == null ? void 0 : n.items;
10206
10559
  if (!r) return;
@@ -10209,7 +10562,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10209
10562
  let n = e.getAsFile();
10210
10563
  n && i.push(n);
10211
10564
  }
10212
- i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), m("upload", i));
10565
+ i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), d("upload", i));
10213
10566
  }, G = () => {
10214
10567
  C == null || C(), S = createEditor({
10215
10568
  doc: _.value,
@@ -10222,21 +10575,21 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10222
10575
  return e.apply(this, arguments);
10223
10576
  };
10224
10577
  }(),
10225
- onKeyDown: (e) => A(e)
10578
+ onKeyDown: (e) => k(e)
10226
10579
  }), C = S.input(a.value);
10227
- }, q = () => v.value === "slash" ? b.value.length < 1 ? !1 : void 0 : x.value.length < 1 ? !1 : void 0;
10580
+ }, K = () => v.value === "slash" ? b.value.length < 1 ? !1 : void 0 : x.value.length < 1 ? !1 : void 0;
10228
10581
  return onMounted(() => {
10229
10582
  var e;
10230
- G(), (e = a.value) == null || e.addEventListener("paste", W);
10583
+ G(), (e = a.value) == null || e.addEventListener("paste", U);
10231
10584
  }), onUnmounted(() => {
10232
10585
  var e;
10233
- S.command(ReplaceAll, ""), C == null || C(), (e = a.value) == null || e.removeEventListener("paste", W);
10586
+ S.command(ReplaceAll, ""), C == null || C(), (e = a.value) == null || e.removeEventListener("paste", U);
10234
10587
  }), r({
10235
10588
  cleanup: () => {
10236
10589
  S.command(ReplaceAll, "");
10237
10590
  },
10238
- focus: R
10239
- }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$18, [createElementVNode("div", {
10591
+ focus: L
10592
+ }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$20, [createElementVNode("div", {
10240
10593
  ref_key: "editorRef",
10241
10594
  ref: a,
10242
10595
  "aria-placeholder": n.placeholder,
@@ -10249,8 +10602,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10249
10602
  "data-tag-type": i.data.type
10250
10603
  }, [createTextVNode(toDisplayString(i.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
10251
10604
  class: "mention-tag-remove-icon",
10252
- onClick: (e) => U(n, i, a, r)
10253
- }, null, 8, ["onClick"])], 10, _hoisted_4$9)) : createCommentVNode("", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$6))]))), 128)) : createCommentVNode("", !0)], 8, _hoisted_2$13), createVNode(unref(TippyComponent), {
10605
+ onClick: (e) => B(n, i, a, r)
10606
+ }, null, 8, ["onClick"])], 10, _hoisted_4$10)) : createCommentVNode("", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$6))]))), 128)) : createCommentVNode("", !0)], 8, _hoisted_2$14), createVNode(unref(TippyComponent), {
10254
10607
  ref_key: "tippyRef",
10255
10608
  ref: o,
10256
10609
  "append-to": unref(w),
@@ -10263,16 +10616,16 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10263
10616
  trigger: "manual",
10264
10617
  "trigger-target": a.value,
10265
10618
  "z-index": unref(EDITOR_MENU_Z_INDEX),
10266
- onHidden: N,
10267
- onShow: q
10619
+ onHidden: A,
10620
+ onShow: K
10268
10621
  }, {
10269
10622
  content: withCtx(() => [v.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
10270
10623
  key: 0,
10271
- "on-select": L,
10624
+ "on-select": I,
10272
10625
  "resource-list": b.value
10273
10626
  }, null, 8, ["resource-list"])) : v.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
10274
10627
  key: 1,
10275
- "on-select": V,
10628
+ "on-select": z,
10276
10629
  prompts: x.value
10277
10630
  }, null, 8, ["prompts"])) : createCommentVNode("", !0)]),
10278
10631
  _: 1
@@ -10282,9 +10635,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10282
10635
  "z-index"
10283
10636
  ])]));
10284
10637
  }
10285
- }), _hoisted_1$17 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
10638
+ }), _hoisted_1$19 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
10286
10639
  __name: "input-attachment",
10287
- props: { messageState: {} },
10640
+ props: {
10641
+ messageState: {},
10642
+ tippyOptions: {}
10643
+ },
10288
10644
  emits: ["sendMessage", "stopSending"],
10289
10645
  setup(e, { emit: n }) {
10290
10646
  let r = e, i = n, a = () => {
@@ -10292,23 +10648,23 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10292
10648
  }, o = () => {
10293
10649
  r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
10294
10650
  };
10295
- return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$17, [renderSlot(n.$slots, "default"), renderSlot(n.$slots, "send-icon", {}, () => [createElementVNode("div", { class: normalizeClass(["send-message-icon", { ["send-message-icon__" + e.messageState]: !0 }]) }, [e.messageState === unref(MessageStatus).Streaming || e.messageState === unref(MessageStatus).Pending ? withDirectives((openBlock(), createBlock(unref(LoadingMessageIcon), {
10651
+ return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$19, [renderSlot(n.$slots, "default"), renderSlot(n.$slots, "send-icon", {}, () => [createElementVNode("div", { class: normalizeClass(["send-message-icon", { ["send-message-icon__" + e.messageState]: !0 }]) }, [e.messageState === unref(MessageStatus).Streaming || e.messageState === unref(MessageStatus).Pending ? withDirectives((openBlock(), createBlock(unref(LoadingMessageIcon), {
10296
10652
  key: 0,
10297
10653
  onClick: a
10298
- }, null, 512)), [[unref(directive), {
10654
+ }, null, 512)), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
10299
10655
  content: unref(t)("停止"),
10300
10656
  theme: "ai-chat-box",
10301
10657
  offset: [0, 16]
10302
- }]]) : withDirectives((openBlock(), createBlock(unref(SendMessageIcon), {
10658
+ })]]) : withDirectives((openBlock(), createBlock(unref(SendMessageIcon), {
10303
10659
  key: 1,
10304
10660
  onClick: o
10305
- }, null, 512)), [[unref(directive), {
10661
+ }, null, 512)), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
10306
10662
  content: r.messageState === unref(MessageStatus).Disabled ? void 0 : unref(t)("发送"),
10307
10663
  theme: "ai-chat-box",
10308
10664
  offset: [0, 16]
10309
- }]])], 2)])]));
10665
+ })]])], 2)])]));
10310
10666
  }
10311
- }), _hoisted_1$16 = { class: "chat-input-container" }, _hoisted_2$12 = {
10667
+ }), _hoisted_1$18 = { class: "chat-input-container" }, _hoisted_2$13 = {
10312
10668
  key: 1,
10313
10669
  class: "ai-divider"
10314
10670
  }, chat_input_default = /* @__PURE__ */ defineComponent({
@@ -10325,7 +10681,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10325
10681
  prompts: { default: () => [] },
10326
10682
  resources: { default: () => [] },
10327
10683
  shortcutId: {},
10328
- shortcuts: {}
10684
+ shortcuts: {},
10685
+ supportUpload: {
10686
+ type: Boolean,
10687
+ default: !0
10688
+ },
10689
+ tippyOptions: {}
10329
10690
  }, {
10330
10691
  cite: {
10331
10692
  required: !1,
@@ -10339,33 +10700,33 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10339
10700
  "update:modelValue"
10340
10701
  ], ["update:cite"]),
10341
10702
  setup(e, { expose: n, emit: r }) {
10342
- useCssVars((e) => ({ v673c5203: unref(CHAT_Z_INDEX) }));
10343
- let i = useTemplateRef("aiSlashInputRef"), o = useTemplateRef("filesRef"), d = useModel(e, "cite"), p = shallowRef(200), m = e, g = r, v = ref(m.defaultUploadFiles || []), y = computed(() => {
10703
+ useCssVars((e) => ({ v2746b57c: unref(CHAT_Z_INDEX) }));
10704
+ let i = useTemplateRef("aiSlashInputRef"), o = useTemplateRef("filesRef"), d = useModel(e, "cite"), f = shallowRef(200), m = e, g = r, _ = ref(m.defaultUploadFiles || []), y = computed(() => {
10344
10705
  var e;
10345
10706
  return (e = m.shortcuts) == null ? void 0 : e.find((e) => e.id === m.shortcutId);
10346
10707
  }), b = computed(() => {
10347
10708
  var e;
10348
10709
  return ((e = m.modelValue) == null ? void 0 : e.length) < 1 || Array.isArray(m.modelValue) && !docToString(m.modelValue).trim() ? MessageStatus.Disabled : m.messageStatus;
10349
- }), x = computed(() => typeof m.onUpload == "function");
10710
+ });
10350
10711
  watchPostEffect(() => {
10351
10712
  var e;
10352
10713
  let n = m.inputMaxHeight || 200;
10353
- if (v.value.length < 1 || !o.value) {
10354
- p.value = n;
10714
+ if (_.value.length < 1 || !o.value) {
10715
+ f.value = n;
10355
10716
  return;
10356
10717
  }
10357
- p.value = n + (((e = o.value) == null ? void 0 : e.clientHeight) || 0);
10718
+ f.value = n + (((e = o.value) == null ? void 0 : e.clientHeight) || 0);
10358
10719
  });
10359
- let S = function() {
10720
+ let x = function() {
10360
10721
  var e = _asyncToGenerator(function* () {
10361
10722
  try {
10362
10723
  var e, n, r, a;
10363
10724
  (e = i.value) == null || (n = e.cleanup) == null || n.call(e);
10364
10725
  let s;
10365
- if (!((r = v.value) != null && r.length)) s = typeof m.modelValue == "string" ? m.modelValue : docToString(m.modelValue);
10726
+ if (!((r = _.value) != null && r.length)) s = typeof m.modelValue == "string" ? m.modelValue : docToString(m.modelValue);
10366
10727
  else {
10367
10728
  var o;
10368
- s = (o = v.value) == null ? void 0 : o.slice().map((e) => {
10729
+ s = (o = _.value) == null ? void 0 : o.slice().map((e) => {
10369
10730
  var n, r;
10370
10731
  return {
10371
10732
  type: MessageContentType.Binary,
@@ -10378,7 +10739,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10378
10739
  text: docToString(m.modelValue)
10379
10740
  });
10380
10741
  }
10381
- (a = m.onSendMessage) == null || a.call(m, s, m.modelValue), v.value = [];
10742
+ (a = m.onSendMessage) == null || a.call(m, s, m.modelValue), _.value = [];
10382
10743
  } catch (e) {
10383
10744
  console.error(e);
10384
10745
  }
@@ -10386,12 +10747,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10386
10747
  return function() {
10387
10748
  return e.apply(this, arguments);
10388
10749
  };
10389
- }(), C = (e) => {
10750
+ }(), S = (e) => {
10390
10751
  if (e.key === "Enter" || e.key === "NumpadEnter") {
10391
10752
  if (e.shiftKey || b.value === MessageStatus.Disabled) return;
10392
- S();
10753
+ x();
10393
10754
  }
10394
- }, w = function() {
10755
+ }, C = function() {
10395
10756
  var e = _asyncToGenerator(function* () {
10396
10757
  try {
10397
10758
  var e;
@@ -10403,32 +10764,33 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10403
10764
  return function() {
10404
10765
  return e.apply(this, arguments);
10405
10766
  };
10406
- }(), T = () => {
10767
+ }(), w = () => {
10407
10768
  d.value = "";
10408
- }, E = (e) => {
10769
+ }, T = (e) => {
10409
10770
  g("selectShortcut", e);
10410
- }, k = () => {
10771
+ }, E = () => {
10411
10772
  g("deleteShortcut");
10412
- }, A = function() {
10773
+ }, D = (e) => `${e.name}_${e.size}_${e.lastModified}`, A = function() {
10413
10774
  var e = _asyncToGenerator(function* (e) {
10414
- if (x.value) for (let r of e) {
10415
- var n;
10416
- if (v.value.find((e) => {
10417
- var n;
10418
- return ((n = e.file) == null ? void 0 : n.name) === r.name;
10419
- })) continue;
10420
- let e = {
10421
- file: r,
10775
+ if (!m.supportUpload) return;
10776
+ let n = new Set(_.value.map((e) => e.file ? D(e.file) : ""));
10777
+ for (let i of e) {
10778
+ var r;
10779
+ let e = D(i);
10780
+ if (n.has(e)) continue;
10781
+ n.add(e);
10782
+ let a = {
10783
+ file: i,
10422
10784
  status: UploadStatus.Pending
10423
10785
  };
10424
- v.value.push(e), (n = m.onUpload) == null || n.call(m, r).then((n) => {
10425
- if (n && typeof n == "object" && "download_url" in n) {
10426
- e.url = n.download_url, e.status = UploadStatus.Success;
10786
+ _.value.push(a), (r = m.onUpload) == null || r.call(m, i).then((e) => {
10787
+ if (e && typeof e == "object" && "download_url" in e) {
10788
+ a.url = e.download_url, a.status = UploadStatus.Success;
10427
10789
  return;
10428
10790
  }
10429
- e.status = UploadStatus.Error;
10791
+ a.status = UploadStatus.Error;
10430
10792
  }).catch(() => {
10431
- e.status = UploadStatus.Error;
10793
+ a.status = UploadStatus.Error;
10432
10794
  });
10433
10795
  }
10434
10796
  });
@@ -10436,8 +10798,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10436
10798
  return e.apply(this, arguments);
10437
10799
  };
10438
10800
  }(), j = (e) => {
10439
- v.value = v.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
10440
- }, N = (e, n) => {
10801
+ _.value = _.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
10802
+ }, M = (e, n) => {
10441
10803
  g("update:modelValue", e, n);
10442
10804
  };
10443
10805
  return n({
@@ -10445,24 +10807,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10445
10807
  var e, n;
10446
10808
  (e = i.value) == null || (n = e.focus) == null || n.call(e);
10447
10809
  },
10448
- triggerSendMessage: S
10449
- }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$16, [renderSlot(n.$slots, "top"), createElementVNode("div", {
10810
+ triggerSendMessage: x
10811
+ }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$18, [renderSlot(n.$slots, "top"), createElementVNode("div", {
10450
10812
  class: "chat-input",
10451
- style: normalizeStyle({ maxHeight: p.value + "px" })
10813
+ style: normalizeStyle({ maxHeight: f.value + "px" })
10452
10814
  }, [
10453
10815
  renderSlot(n.$slots, "input-header", {}, () => [d.value ? (openBlock(), createBlock(cite_content_default, {
10454
10816
  key: 0,
10455
10817
  class: "chat-input-cite",
10456
10818
  content: d.value,
10457
- onClose: T
10819
+ onClose: w
10458
10820
  }, null, 8, ["content"])) : createCommentVNode("", !0)]),
10459
- renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: v.value })), () => [v.value.length ? (openBlock(), createElementBlock("div", {
10821
+ renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: _.value })), () => [_.value.length ? (openBlock(), createElementBlock("div", {
10460
10822
  key: 0,
10461
10823
  ref_key: "filesRef",
10462
10824
  ref: o,
10463
10825
  class: "chat-input-files"
10464
10826
  }, [createVNode(file_content_default, {
10465
- files: v.value,
10827
+ files: _.value,
10466
10828
  onDeleteFile: j
10467
10829
  }, null, 8, ["files"])], 512)) : createCommentVNode("", !0)]),
10468
10830
  createVNode(ai_slash_input_default, {
@@ -10472,8 +10834,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10472
10834
  placeholder: e.placeholder,
10473
10835
  prompts: e.prompts,
10474
10836
  resources: e.resources,
10475
- onKeydown: C,
10476
- "onUpdate:modelValue": N,
10837
+ onKeydown: S,
10838
+ "onUpdate:modelValue": M,
10477
10839
  onUpload: A
10478
10840
  }, null, 8, [
10479
10841
  "model-value",
@@ -10483,46 +10845,48 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10483
10845
  ]),
10484
10846
  createVNode(input_attachment_default, {
10485
10847
  "message-state": b.value,
10486
- onSendMessage: S,
10487
- onStopSending: w
10848
+ "tippy-options": e.tippyOptions,
10849
+ onSendMessage: x,
10850
+ onStopSending: C
10488
10851
  }, {
10489
10852
  default: withCtx(() => {
10490
10853
  var r;
10491
10854
  return [
10492
- x.value ? (openBlock(), createBlock(file_upload_btn_default, {
10855
+ e.supportUpload ? (openBlock(), createBlock(file_upload_btn_default, {
10493
10856
  key: 0,
10857
+ "tippy-options": e.tippyOptions,
10494
10858
  onUpload: A
10495
- })) : createCommentVNode("", !0),
10496
- x.value && ((r = e.shortcuts) != null && r.length || y.value) ? (openBlock(), createElementBlock("span", _hoisted_2$12)) : createCommentVNode("", !0),
10859
+ }, null, 8, ["tippy-options"])) : createCommentVNode("", !0),
10860
+ e.supportUpload && ((r = e.shortcuts) != null && r.length || y.value) ? (openBlock(), createElementBlock("span", _hoisted_2$13)) : createCommentVNode("", !0),
10497
10861
  renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !y.value ? (openBlock(), createBlock(shortcut_btns_default, {
10498
10862
  key: 0,
10499
10863
  shortcuts: e.shortcuts,
10500
- onSelectShortcut: E
10864
+ onSelectShortcut: T
10501
10865
  }, null, 8, ["shortcuts"])) : createCommentVNode("", !0), y.value ? (openBlock(), createBlock(shortcut_btn_default, {
10502
10866
  key: 1,
10503
10867
  class: "selected-shortcut-btn",
10504
10868
  shortcut: y.value
10505
10869
  }, {
10506
- append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: k })]),
10870
+ append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: E })]),
10507
10871
  _: 1
10508
10872
  }, 8, ["shortcut"])) : createCommentVNode("", !0)])
10509
10873
  ];
10510
10874
  }),
10511
10875
  "send-icon": withCtx(() => [renderSlot(n.$slots, "send-icon")]),
10512
10876
  _: 3
10513
- }, 8, ["message-state"])
10877
+ }, 8, ["message-state", "tippy-options"])
10514
10878
  ], 4)]));
10515
10879
  }
10516
- }), _hoisted_1$15 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
10880
+ }), _hoisted_1$17 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
10517
10881
  __name: "scroll-btn",
10518
10882
  props: {
10519
10883
  disabled: { type: Boolean },
10520
10884
  title: {}
10521
10885
  },
10522
10886
  setup(e) {
10523
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$15, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
10887
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$17, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
10524
10888
  }
10525
- }), _hoisted_1$14 = { class: "ai-delete-confirm" }, _hoisted_2$11 = { class: "ai-delete-confirm__title" }, _hoisted_3$9 = { class: "ai-delete-confirm__desc" }, _hoisted_4$8 = { class: "ai-delete-confirm__actions" }, delete_tool_default = /* @__PURE__ */ defineComponent({
10889
+ }), _hoisted_1$16 = { class: "ai-delete-confirm" }, _hoisted_2$12 = { class: "ai-delete-confirm__title" }, _hoisted_3$9 = { class: "ai-delete-confirm__desc" }, _hoisted_4$9 = { class: "ai-delete-confirm__actions" }, delete_tool_default = /* @__PURE__ */ defineComponent({
10526
10890
  __name: "delete-tool",
10527
10891
  props: {
10528
10892
  description: {},
@@ -10546,14 +10910,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10546
10910
  theme: "ai-chat-box-light light",
10547
10911
  trigger: "click",
10548
10912
  appendTo: () => document.body
10549
- }, r.tippyOptions || {})), p = () => {
10913
+ }, r.tippyOptions || {})), d = () => {
10550
10914
  if (r.disabled) return !1;
10551
10915
  }, m = () => {
10552
10916
  var e, n;
10553
10917
  (e = o.value) == null || (n = e.hide) == null || n.call(e);
10554
10918
  }, g = () => {
10555
10919
  m(), i("confirm");
10556
- }, v = () => {
10920
+ }, _ = () => {
10557
10921
  m(), i("cancel");
10558
10922
  };
10559
10923
  return onUnmounted(() => {
@@ -10561,11 +10925,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10561
10925
  }), (e, n) => (openBlock(), createBlock(unref(TippyComponent), mergeProps({
10562
10926
  ref_key: "tippyRef",
10563
10927
  ref: o
10564
- }, l.value, { onShow: p }), {
10565
- content: withCtx(() => [createElementVNode("div", _hoisted_1$14, [
10566
- createElementVNode("div", _hoisted_2$11, toDisplayString(unref(t)("确认删除该回答?")), 1),
10928
+ }, l.value, { onShow: d }), {
10929
+ content: withCtx(() => [createElementVNode("div", _hoisted_1$16, [
10930
+ createElementVNode("div", _hoisted_2$12, toDisplayString(unref(t)("确认删除该回答?")), 1),
10567
10931
  createElementVNode("div", _hoisted_3$9, toDisplayString(unref(t)("删除操作无法撤回,请谨慎操作!")), 1),
10568
- createElementVNode("div", _hoisted_4$8, [createVNode(unref(Button), {
10932
+ createElementVNode("div", _hoisted_4$9, [createVNode(unref(Button), {
10569
10933
  size: "small",
10570
10934
  theme: "danger",
10571
10935
  onClick: g
@@ -10574,7 +10938,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10574
10938
  _: 1
10575
10939
  }), createVNode(unref(Button), {
10576
10940
  size: "small",
10577
- onClick: v
10941
+ onClick: _
10578
10942
  }, {
10579
10943
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
10580
10944
  _: 1
@@ -10584,7 +10948,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10584
10948
  _: 1
10585
10949
  }, 16));
10586
10950
  }
10587
- }), _hoisted_1$13 = { class: "ai-user-feedback" }, _hoisted_2$10 = { class: "ai-feedback-title" }, _hoisted_3$8 = { class: "ai-feedback-reason-list" }, _hoisted_4$7 = ["onClick"], _hoisted_5$5 = { class: "ai-feedback-other" }, _hoisted_6$1 = { class: "ai-feedback-footer" }, user_feedback_default = /* @__PURE__ */ defineComponent({
10951
+ }), _hoisted_1$15 = { class: "ai-user-feedback" }, _hoisted_2$11 = { class: "ai-feedback-title" }, _hoisted_3$8 = { class: "ai-feedback-reason-list" }, _hoisted_4$8 = ["onClick"], _hoisted_5$5 = { class: "ai-feedback-other" }, _hoisted_6$1 = { class: "ai-feedback-footer" }, user_feedback_default = /* @__PURE__ */ defineComponent({
10588
10952
  __name: "user-feedback",
10589
10953
  props: {
10590
10954
  loading: { type: Boolean },
@@ -10597,11 +10961,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10597
10961
  o.value.includes(e) ? o.value = o.value.filter((n) => n !== e) : o.value = [...o.value, e];
10598
10962
  }, c = () => {
10599
10963
  i("submit", o.value, a.value);
10600
- }, p = () => {
10964
+ }, d = () => {
10601
10965
  o.value = [], a.value = "", i("cancel");
10602
10966
  };
10603
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$13, [
10604
- createElementVNode("div", _hoisted_2$10, toDisplayString(n.title), 1),
10967
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$15, [
10968
+ createElementVNode("div", _hoisted_2$11, toDisplayString(n.title), 1),
10605
10969
  createElementVNode("div", _hoisted_3$8, [n.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
10606
10970
  key: e,
10607
10971
  class: "reason-item ai-skeleton-element"
@@ -10609,7 +10973,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10609
10973
  key: e,
10610
10974
  class: normalizeClass(["reason-item", { "is-active": o.value.includes(e) }]),
10611
10975
  onClick: (n) => s(e)
10612
- }, toDisplayString(e), 11, _hoisted_4$7))), 128))]),
10976
+ }, toDisplayString(e), 11, _hoisted_4$8))), 128))]),
10613
10977
  createElementVNode("div", _hoisted_5$5, [createVNode(unref(Input), {
10614
10978
  modelValue: a.value,
10615
10979
  "onUpdate:modelValue": i[0] || (i[0] = (e) => a.value = e),
@@ -10630,24 +10994,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10630
10994
  class: "custom-btn",
10631
10995
  size: "small",
10632
10996
  width: "80px",
10633
- onClick: p
10997
+ onClick: d
10634
10998
  }, {
10635
10999
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
10636
11000
  _: 1
10637
11001
  })])
10638
11002
  ]));
10639
11003
  }
10640
- }), _hoisted_1$12 = {
11004
+ }), _hoisted_1$14 = {
10641
11005
  ref: "messageToolsRef",
10642
11006
  class: "message-tools-container"
10643
- }, _hoisted_2$9 = {
11007
+ }, _hoisted_2$10 = {
10644
11008
  class: "message-tools",
10645
11009
  style: { "margin-right": "8px" }
10646
11010
  }, _hoisted_3$7 = {
10647
11011
  key: 0,
10648
11012
  class: "ai-divider",
10649
11013
  style: { "margin-right": "8px" }
10650
- }, _hoisted_4$6 = { class: "message-tools" }, message_tools_default = /* @__PURE__ */ defineComponent({
11014
+ }, _hoisted_4$7 = { class: "message-tools" }, message_tools_default = /* @__PURE__ */ defineComponent({
10651
11015
  __name: "message-tools",
10652
11016
  props: {
10653
11017
  messageTools: { default: () => CONST_MESSAGE_TOOLS },
@@ -10658,7 +11022,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10658
11022
  },
10659
11023
  emits: ["feedback"],
10660
11024
  setup(n, { emit: r }) {
10661
- let i = n, o = r, d = useTemplateRef("feedbackTippyRef"), p = shallowRef(!1), m = shallowRef([]), g = shallowRef(null), _ = computed(() => _objectSpread2({
11025
+ let i = n, o = r, d = useTemplateRef("feedbackTippyRef"), f = shallowRef(!1), m = shallowRef([]), g = shallowRef(null), _ = computed(() => _objectSpread2({
10662
11026
  arrow: !1,
10663
11027
  interactive: !0,
10664
11028
  offset: [0, 6],
@@ -10671,9 +11035,9 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10671
11035
  if (e.id === "like" || e.id === "unlike") {
10672
11036
  try {
10673
11037
  var r;
10674
- p.value = !0, m.value = [], m.value = (yield (r = i.onAction) == null ? void 0 : r.call(i, e)) || [];
11038
+ f.value = !0, m.value = [], m.value = (yield (r = i.onAction) == null ? void 0 : r.call(i, e)) || [];
10675
11039
  } finally {
10676
- p.value = !1;
11040
+ f.value = !1;
10677
11041
  }
10678
11042
  return;
10679
11043
  }
@@ -10697,19 +11061,19 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10697
11061
  return e == null || (n = e.hide) == null ? void 0 : n.call(e);
10698
11062
  });
10699
11063
  }, x = (e) => g.value ? g.value === "like" && e === "like" ? "activeLike" : g.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, S = (e) => {
10700
- var n, r;
10701
- let a = x(e);
10702
- return a === "activeLike" ? t("取消满意") : a === "activeUnLike" ? t("取消不满意") : ((n = i.tippyOptions) == null ? void 0 : n.content) || ((r = i.updateTools) == null || (r = r.find((e) => e.id === a)) == null ? void 0 : r.description) || "";
11064
+ var n;
11065
+ let r = x(e);
11066
+ return r === "activeLike" ? t("取消满意") : r === "activeUnLike" ? t("取消不满意") : ((n = i.updateTools) == null || (n = n.find((e) => e.id === r)) == null ? void 0 : n.description) || "";
10703
11067
  }, C = (e, n, r) => {
10704
11068
  b(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
10705
- }, T = (e) => {
11069
+ }, w = (e) => {
10706
11070
  if (i.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
10707
11071
  if (g.value && g.value === e) return g.value = null, !1;
10708
11072
  };
10709
11073
  return onUnmounted(() => {
10710
11074
  b(), m.value = [];
10711
- }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [
10712
- createElementVNode("div", _hoisted_2$9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.messageTools, (r) => (openBlock(), createElementBlock(Fragment, { key: r.id }, [r.id === "delete" ? (openBlock(), createBlock(delete_tool_default, mergeProps({
11075
+ }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$14, [
11076
+ createElementVNode("div", _hoisted_2$10, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.messageTools, (r) => (openBlock(), createElementBlock(Fragment, { key: r.id }, [r.id === "delete" ? (openBlock(), createBlock(delete_tool_default, mergeProps({
10713
11077
  key: 0,
10714
11078
  ref_for: !0
10715
11079
  }, r, {
@@ -10733,14 +11097,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10733
11097
  "onClick"
10734
11098
  ]))], 64))), 128))]),
10735
11099
  n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7)) : createCommentVNode("", !0),
10736
- createElementVNode("div", _hoisted_4$6, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.updateTools, (r) => (openBlock(), createElementBlock(Fragment, { key: r.id }, [["like", "unlike"].includes(r.id) ? (openBlock(), createBlock(unref(TippyComponent), mergeProps({
11100
+ createElementVNode("div", _hoisted_4$7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.updateTools, (r) => (openBlock(), createElementBlock(Fragment, { key: r.id }, [["like", "unlike"].includes(r.id) ? (openBlock(), createBlock(unref(TippyComponent), mergeProps({
10737
11101
  key: 0,
10738
11102
  ref_for: !0,
10739
11103
  ref_key: "feedbackTippyRef",
10740
11104
  ref: d
10741
- }, { ref_for: !0 }, _.value, { onShow: (e) => T(r.id) }), {
11105
+ }, { ref_for: !0 }, _.value, { onShow: (e) => w(r.id) }), {
10742
11106
  content: withCtx(() => [createVNode(user_feedback_default, {
10743
- loading: p.value,
11107
+ loading: f.value,
10744
11108
  "reason-list": m.value,
10745
11109
  title: r.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
10746
11110
  onCancel: b,
@@ -10790,10 +11154,10 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10790
11154
  ]))], 64))), 128))])
10791
11155
  ], 512));
10792
11156
  }
10793
- }), _hoisted_1$11 = { class: "ai-loading-ring" }, _hoisted_2$8 = {
11157
+ }), _hoisted_1$13 = { class: "ai-loading-ring" }, _hoisted_2$9 = {
10794
11158
  fill: "none",
10795
11159
  viewBox: "0 0 26 26"
10796
- }, _hoisted_3$6 = ["fill"], _hoisted_4$5 = { class: "ai-loading-star" }, _hoisted_5$4 = {
11160
+ }, _hoisted_3$6 = ["fill"], _hoisted_4$6 = { class: "ai-loading-star" }, _hoisted_5$4 = {
10797
11161
  fill: "none",
10798
11162
  viewBox: "0 0 26 26"
10799
11163
  }, _hoisted_6 = ["fill"], ai_loading_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AiLoading" }), {}, {
@@ -10813,7 +11177,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10813
11177
  width: e.size + "px",
10814
11178
  height: e.size + "px"
10815
11179
  })
10816
- }, [createElementVNode("div", _hoisted_1$11, [(openBlock(), createElementBlock("svg", _hoisted_2$8, [createElementVNode("path", {
11180
+ }, [createElementVNode("div", _hoisted_1$13, [(openBlock(), createElementBlock("svg", _hoisted_2$9, [createElementVNode("path", {
10817
11181
  d: "M24.957 7.79785C25.6279 9.36608 26 11.0926 26 12.9062C26 19.5598 21.0013 25.0441 14.5547 25.8125L14.3154 23.8252C19.7702 23.175 24 18.5361 24 12.9062C24 11.3717 23.6848 9.91092 23.1172 8.58398L24.957 7.79785ZM11.6836 1.98633C6.2292 2.63694 2 7.27669 2 12.9062C2 14.4404 2.31452 15.9009 2.88184 17.2275L1.04199 18.0137C0.371448 16.4458 0 14.7194 0 12.9062C0 6.25306 4.99814 0.768818 11.4443 0L11.6836 1.98633Z",
10818
11182
  fill: `url(#${i})`
10819
11183
  }, null, 8, _hoisted_3$6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
@@ -10833,7 +11197,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10833
11197
  offset: "1",
10834
11198
  "stop-color": "#EB8CEC"
10835
11199
  }, null, -1)
10836
- ])])])]))]), createElementVNode("div", _hoisted_4$5, [(openBlock(), createElementBlock("svg", _hoisted_5$4, [createElementVNode("path", {
11200
+ ])])])]))]), createElementVNode("div", _hoisted_4$6, [(openBlock(), createElementBlock("svg", _hoisted_5$4, [createElementVNode("path", {
10837
11201
  d: "M13 5.90625C13 5.90625 14.1206 8.77684 15.625 10.2812C17.1294 11.7857 20 12.9062 20 12.9062C20 12.9062 17.1294 14.0268 15.625 15.5312C14.1206 17.0357 13 19.9062 13 19.9062C13 19.9062 11.8794 17.0357 10.375 15.5312C8.87059 14.0268 6 12.9062 6 12.9062C6 12.9062 8.87059 11.7857 10.375 10.2812C11.8794 8.77684 13 5.90625 13 5.90625Z",
10838
11202
  fill: `url(#${a})`
10839
11203
  }, null, 8, _hoisted_6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
@@ -10855,7 +11219,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10855
11219
  }, null, -1)
10856
11220
  ])])])]))])], 6));
10857
11221
  }
10858
- })), _hoisted_1$10 = { class: "ai-activity-message" }, _hoisted_2$7 = { class: "ai-activity-message-title-icon" }, _hoisted_3$5 = { class: "ai-activity-message-title-text" }, _hoisted_4$4 = { class: "ai-activity-message-content" }, _hoisted_5$3 = {
11222
+ })), _hoisted_1$12 = { class: "ai-activity-message" }, _hoisted_2$8 = { class: "ai-activity-message-title-icon" }, _hoisted_3$5 = { class: "ai-activity-message-title-text" }, _hoisted_4$5 = { class: "ai-activity-message-content" }, _hoisted_5$3 = {
10859
11223
  key: 0,
10860
11224
  class: "knowledge-rag-content"
10861
11225
  }, activity_message_default = /* @__PURE__ */ defineComponent({
@@ -10882,21 +11246,21 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10882
11246
  return isEn ? `Reference ${a} documents as reference` : `引用 ${a} 篇资料作为参考`;
10883
11247
  }), o = useModel(e, "collapsed");
10884
11248
  return (n, a) => {
10885
- var d, p;
10886
- return openBlock(), createElementBlock("div", _hoisted_1$10, [createElementVNode("div", {
11249
+ var d, f;
11250
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [createElementVNode("div", {
10887
11251
  class: "ai-activity-message-title",
10888
11252
  onClick: a[0] || (a[0] = (e) => o.value = !o.value)
10889
11253
  }, [
10890
- createElementVNode("span", _hoisted_2$7, [r.value && (e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming) ? (openBlock(), createBlock(ai_loading_default, { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), {
11254
+ createElementVNode("span", _hoisted_2$8, [r.value && (e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming) ? (openBlock(), createBlock(ai_loading_default, { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), {
10891
11255
  key: 1,
10892
11256
  style: { "font-size": "12px" }
10893
11257
  }))]),
10894
11258
  createElementVNode("span", _hoisted_3$5, toDisplayString(i.value), 1),
10895
11259
  createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10896
- ]), withDirectives(createElementVNode("div", _hoisted_4$4, [r.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [createVNode(markdown_content_default, { content: Array.isArray(e.content) ? e.content.join("\n") : ((d = e.content) == null ? void 0 : d.content) || "" }, null, 8, ["content"])])) : createCommentVNode("", !0), createVNode(reference_content_default, { content: Array.isArray(e.content) ? e.content : ((p = e.content) == null ? void 0 : p.referenceDocument) || [] }, null, 8, ["content"])], 512), [[vShow, !o.value]])]);
11260
+ ]), withDirectives(createElementVNode("div", _hoisted_4$5, [r.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [createVNode(markdown_content_default, { content: Array.isArray(e.content) ? e.content.join("\n") : ((d = e.content) == null ? void 0 : d.content) || "" }, null, 8, ["content"])])) : createCommentVNode("", !0), createVNode(reference_content_default, { content: Array.isArray(e.content) ? e.content : ((f = e.content) == null ? void 0 : f.referenceDocument) || [] }, null, 8, ["content"])], 512), [[vShow, !o.value]])]);
10897
11261
  };
10898
11262
  }
10899
- }), _hoisted_1$9 = { class: "toolcall-desc" }, _hoisted_2$6 = { class: "desc-title" }, _hoisted_3$4 = { class: "desc-panel" }, _hoisted_4$3 = { class: "desc-label" }, _hoisted_5$2 = { class: "desc-value" }, desc_panel_default = /* @__PURE__ */ defineComponent({
11263
+ }), _hoisted_1$11 = { class: "toolcall-desc" }, _hoisted_2$7 = { class: "desc-title" }, _hoisted_3$4 = { class: "desc-panel" }, _hoisted_4$4 = { class: "desc-label" }, _hoisted_5$2 = { class: "desc-value" }, desc_panel_default = /* @__PURE__ */ defineComponent({
10900
11264
  __name: "desc-panel",
10901
11265
  props: {
10902
11266
  desc: {},
@@ -10910,15 +11274,15 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10910
11274
  return r.desc;
10911
11275
  }
10912
11276
  });
10913
- return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", _hoisted_2$6, toDisplayString(n.title), 1), createElementVNode("div", _hoisted_3$4, [typeof i.value == "object" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(i.value, (e, n) => (openBlock(), createElementBlock("div", {
11277
+ return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$11, [createElementVNode("div", _hoisted_2$7, toDisplayString(n.title), 1), createElementVNode("div", _hoisted_3$4, [typeof i.value == "object" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(i.value, (e, n) => (openBlock(), createElementBlock("div", {
10914
11278
  key: n,
10915
11279
  class: "desc-panel-item"
10916
- }, [createElementVNode("span", _hoisted_4$3, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$2, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
11280
+ }, [createElementVNode("span", _hoisted_4$4, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$2, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
10917
11281
  text: typeof e == "object" && e ? JSON.stringify(e) : e,
10918
11282
  appendTo: "parent"
10919
11283
  }]])]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(i.value), 1)], 64))])]));
10920
11284
  }
10921
- }), _hoisted_1$8 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
11285
+ }), _hoisted_1$10 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
10922
11286
  __name: "tool-message",
10923
11287
  props: {
10924
11288
  duration: {},
@@ -10933,12 +11297,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10933
11297
  property: {}
10934
11298
  },
10935
11299
  setup(e) {
10936
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$8, [createVNode(desc_panel_default, {
11300
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$10, [createVNode(desc_panel_default, {
10937
11301
  desc: e.content || e.error,
10938
11302
  title: unref(t)("返回内容")
10939
11303
  }, null, 8, ["desc", "title"])]));
10940
11304
  }
10941
- }), _hoisted_1$7 = { class: "ai-toolcall-render" }, _hoisted_2$5 = { class: "toolcall-header-title" }, _hoisted_3$3 = { class: "toolcall-status-title" }, _hoisted_4$2 = {
11305
+ }), _hoisted_1$9 = { class: "ai-toolcall-render" }, _hoisted_2$6 = { class: "toolcall-header-title" }, _hoisted_3$3 = { class: "toolcall-status-title" }, _hoisted_4$3 = {
10942
11306
  key: 1,
10943
11307
  class: "toolcall-duration"
10944
11308
  }, _hoisted_5$1 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
@@ -10962,20 +11326,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10962
11326
  case MessageStatus.Success: return t("调用成功");
10963
11327
  case MessageStatus.Error || ((e = n.toolCall) == null || (e = e.toolMessage) == null ? void 0 : e.error): return t("调用失败");
10964
11328
  }
10965
- }), p = computed(() => {
11329
+ }), d = computed(() => {
10966
11330
  var e;
10967
11331
  let r = n.duration || ((e = n.toolCall) == null || (e = e.toolMessage) == null ? void 0 : e.duration);
10968
11332
  return r ? formatDuration(r) : "";
10969
11333
  });
10970
11334
  return (n, a) => {
10971
11335
  var m, g, _, v;
10972
- return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", { class: normalizeClass(["ai-toolcall-render-header", `toolcall-status-${e.status}`]) }, [
11336
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", { class: normalizeClass(["ai-toolcall-render-header", `toolcall-status-${e.status}`]) }, [
10973
11337
  createVNode(unref(ArrowRightIcon), {
10974
11338
  class: normalizeClass({ "is-collapsed": r.value }),
10975
11339
  onClick: a[0] || (a[0] = (e) => r.value = !r.value)
10976
11340
  }, null, 8, ["class"]),
10977
11341
  createTextVNode(" " + toDisplayString((m = e.toolCall) != null && m.function.mcpName ? unref(t)("调用 MCP:") : unref(t)("调用工具:")) + " ", 1),
10978
- withDirectives((openBlock(), createElementBlock("span", _hoisted_2$5, [createTextVNode(toDisplayString(i.value), 1)])), [[unref(OverflowTips), {
11342
+ withDirectives((openBlock(), createElementBlock("span", _hoisted_2$6, [createTextVNode(toDisplayString(i.value), 1)])), [[unref(OverflowTips), {
10979
11343
  text: i.value,
10980
11344
  appendTo: "parent"
10981
11345
  }]]),
@@ -10987,7 +11351,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10987
11351
  theme: "primary"
10988
11352
  })) : createCommentVNode("", !0),
10989
11353
  createTextVNode(" " + toDisplayString(o.value) + " ", 1),
10990
- p.value ? (openBlock(), createElementBlock("span", _hoisted_4$2, " (" + toDisplayString(p.value) + ") ", 1)) : createCommentVNode("", !0)
11354
+ d.value ? (openBlock(), createElementBlock("span", _hoisted_4$3, " (" + toDisplayString(d.value) + ") ", 1)) : createCommentVNode("", !0)
10991
11355
  ])
10992
11356
  ], 2), withDirectives(createElementVNode("div", _hoisted_5$1, [
10993
11357
  createVNode(desc_panel_default, {
@@ -11002,7 +11366,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11002
11366
  ], 512), [[vShow, !r.value]])]);
11003
11367
  };
11004
11368
  }
11005
- }), _hoisted_1$6 = { class: "assistant-message" }, _hoisted_2$4 = { class: "assistant-message-content" }, assistant_message_default = /* @__PURE__ */ defineComponent({
11369
+ }), _hoisted_1$8 = { class: "assistant-message" }, _hoisted_2$5 = { class: "assistant-message-content" }, assistant_message_default = /* @__PURE__ */ defineComponent({
11006
11370
  __name: "assistant-message",
11007
11371
  props: {
11008
11372
  toolCalls: {},
@@ -11015,7 +11379,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11015
11379
  property: {}
11016
11380
  },
11017
11381
  setup(n) {
11018
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2$4, [renderSlot(r.$slots, "default", normalizeProps(guardReactiveProps({ content: n.content })), () => [createVNode(content_render_default, {
11382
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$5, [renderSlot(r.$slots, "default", normalizeProps(guardReactiveProps({ content: n.content })), () => [createVNode(content_render_default, {
11019
11383
  content: n.content || "",
11020
11384
  status: n.status,
11021
11385
  type: unref(MessageContentType).Text
@@ -11029,7 +11393,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11029
11393
  "tool-call": e
11030
11394
  }, null, 8, ["status", "tool-call"]))), 128)) : createCommentVNode("", !0)]));
11031
11395
  }
11032
- }), _hoisted_1$5 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
11396
+ }), _hoisted_1$7 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
11033
11397
  __name: "info-message",
11034
11398
  props: {
11035
11399
  content: {},
@@ -11041,24 +11405,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11041
11405
  property: {}
11042
11406
  },
11043
11407
  setup(n) {
11044
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(Array.isArray(n.content) ? n.content : [n.content], (e, n) => (openBlock(), createElementBlock("div", {
11408
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(Array.isArray(n.content) ? n.content : [n.content], (e, n) => (openBlock(), createElementBlock("div", {
11045
11409
  key: n,
11046
11410
  class: "info-message-content"
11047
11411
  }, toDisplayString(e), 1))), 128))]));
11048
11412
  }
11049
- }), _hoisted_1$4 = { class: "ai-loading-message" }, loading_message_default = /* @__PURE__ */ ((e, n) => {
11413
+ }), _hoisted_1$6 = { class: "ai-loading-message" }, loading_message_default = /* @__PURE__ */ ((e, n) => {
11050
11414
  let r = e.__vccOpts || e;
11051
11415
  for (let [e, i] of n) r[e] = i;
11052
11416
  return r;
11053
11417
  })(/* @__PURE__ */ defineComponent({
11054
11418
  __name: "loading-message",
11055
11419
  setup(e) {
11056
- return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(ai_loading_default, { size: 18 }), renderSlot(e.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(t)("请求中...")), 1)], !0)]));
11420
+ return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$6, [createVNode(ai_loading_default, { size: 18 }), renderSlot(e.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(t)("请求中...")), 1)], !0)]));
11057
11421
  }
11058
- }), [["__scopeId", "data-v-e4b604cd"]]), _hoisted_1$3 = { class: "ai-reasoning-message" }, _hoisted_2$3 = {
11422
+ }), [["__scopeId", "data-v-e4b604cd"]]), _hoisted_1$5 = { class: "ai-reasoning-message" }, _hoisted_2$4 = {
11059
11423
  key: 0,
11060
11424
  class: "ai-reasoning-message-title-icon"
11061
- }, _hoisted_3$2 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$1 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
11425
+ }, _hoisted_3$2 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$2 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
11062
11426
  __name: "reasoning-message",
11063
11427
  props: /* @__PURE__ */ mergeModels({
11064
11428
  duration: {},
@@ -11093,7 +11457,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11093
11457
  });
11094
11458
  return (r, a) => {
11095
11459
  var o;
11096
- return openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", {
11460
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", {
11097
11461
  class: normalizeClass(["ai-reasoning-message-title", {
11098
11462
  "ai-reasoning-message-title-collapsed": i.value,
11099
11463
  "is-thinking": n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming,
@@ -11102,10 +11466,10 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11102
11466
  }]),
11103
11467
  onClick: a[0] || (a[0] = (e) => i.value = !i.value)
11104
11468
  }, [
11105
- n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock("span", _hoisted_2$3, [createVNode(ai_loading_default)])) : createCommentVNode("", !0),
11469
+ n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock("span", _hoisted_2$4, [createVNode(ai_loading_default)])) : createCommentVNode("", !0),
11106
11470
  createElementVNode("span", _hoisted_3$2, toDisplayString(d.value), 1),
11107
11471
  createElementVNode("span", { class: normalizeClass(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": i.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
11108
- ], 2), withDirectives(createElementVNode("div", _hoisted_4$1, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
11472
+ ], 2), withDirectives(createElementVNode("div", _hoisted_4$2, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
11109
11473
  key: 0,
11110
11474
  content: ((o = n.content) == null ? void 0 : o.join("\n")) || ""
11111
11475
  }, null, 8, ["content"])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(Array.isArray(n.content) ? n.content : [n.content], (e) => (openBlock(), createBlock(markdown_content_default, {
@@ -11114,29 +11478,32 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11114
11478
  }, null, 8, ["content"]))), 128))], 512), [[vShow, !i.value]])]);
11115
11479
  };
11116
11480
  }
11117
- }), _hoisted_1$2 = { class: "ai-key-value-content" }, _hoisted_2$2 = {
11481
+ }), _hoisted_1$4 = { class: "ai-key-value-content" }, _hoisted_2$3 = {
11118
11482
  key: 0,
11119
11483
  class: "ai-key-value-title"
11120
- }, _hoisted_3$1 = { class: "ai-key-value-content" }, _hoisted_4 = { class: "item-key" }, _hoisted_5 = { class: "item-value" }, key_value_content_default = /* @__PURE__ */ defineComponent({
11484
+ }, _hoisted_3$1 = { class: "ai-key-value-content" }, _hoisted_4$1 = { class: "item-key" }, _hoisted_5 = { class: "item-value" }, key_value_content_default = /* @__PURE__ */ defineComponent({
11121
11485
  __name: "key-value-content",
11122
11486
  props: {
11123
11487
  content: {},
11124
11488
  title: {}
11125
11489
  },
11126
11490
  setup(n) {
11127
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$2, [n.title ? (openBlock(), createElementBlock("div", _hoisted_2$2, [createVNode(unref(ThinkingIcon)), createTextVNode(" " + toDisplayString(n.title), 1)])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_3$1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.content, (e) => (openBlock(), createElementBlock("div", {
11491
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$4, [n.title ? (openBlock(), createElementBlock("div", _hoisted_2$3, [createVNode(unref(ThinkingIcon)), createTextVNode(" " + toDisplayString(n.title), 1)])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_3$1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.content, (e) => (openBlock(), createElementBlock("div", {
11128
11492
  key: e.key,
11129
11493
  class: "key-value-item"
11130
11494
  }, [
11131
- createElementVNode("div", _hoisted_4, toDisplayString(e.key), 1),
11495
+ createElementVNode("div", _hoisted_4$1, toDisplayString(e.key), 1),
11132
11496
  i[0] || (i[0] = createTextVNode(" : ", -1)),
11133
11497
  createElementVNode("div", _hoisted_5, toDisplayString(e.value), 1)
11134
11498
  ]))), 128))])]));
11135
11499
  }
11136
- }), _hoisted_1$1 = { class: "ai-user-message" }, _hoisted_2$1 = {
11500
+ }), _hoisted_1$3 = { class: "ai-user-message" }, _hoisted_2$2 = {
11501
+ key: 0,
11502
+ class: "ai-user-message-binary-files"
11503
+ }, _hoisted_3 = {
11137
11504
  key: 1,
11138
11505
  class: "ai-user-message-content"
11139
- }, _hoisted_3 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
11506
+ }, _hoisted_4 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
11140
11507
  __name: "user-message",
11141
11508
  props: {
11142
11509
  content: {},
@@ -11153,7 +11520,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11153
11520
  onShortcutConfirm: { type: Function }
11154
11521
  },
11155
11522
  setup(n) {
11156
- let r = n, { copy: i } = useClipboard(), o = shallowRef(!1), p = shallowRef(""), m = useTemplateRef("chatInputRef"), g = computed(() => {
11523
+ let r = n, { copy: i } = useClipboard(), o = shallowRef(!1), d = shallowRef(""), m = useTemplateRef("chatInputRef"), g = computed(() => {
11157
11524
  var e;
11158
11525
  let n = (e = r.property) == null || (e = e.extra) == null ? void 0 : e.cite;
11159
11526
  if (!(!n || typeof n == "string")) return n.title;
@@ -11186,31 +11553,34 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11186
11553
  };
11187
11554
  }
11188
11555
  return null;
11189
- }), y = computed(() => {
11556
+ }), y = (e) => {
11557
+ var n;
11558
+ return !!e.url || isImageFile(e.mimeType || ((n = e.file) == null ? void 0 : n.type));
11559
+ }, b = computed(() => {
11190
11560
  var e;
11191
11561
  return Array.isArray(r.content) ? (e = r.content) == null ? void 0 : e.filter((e) => e.type === MessageContentType.Binary) : [];
11192
- }), b = computed(() => {
11562
+ }), x = computed(() => b.value.filter((e) => y(e))), S = computed(() => b.value.filter((e) => !y(e))), C = computed(() => {
11193
11563
  var e;
11194
11564
  return r.content ? typeof r.content == "string" ? r.content : (e = r.content) == null ? void 0 : e.filter((e) => {
11195
11565
  var n;
11196
11566
  return e.type === MessageContentType.Text && !!((n = e.text) != null && n.trim());
11197
11567
  }) : "";
11198
- }), x = function() {
11568
+ }), w = function() {
11199
11569
  var e = _asyncToGenerator(function* (e) {
11200
11570
  var n;
11201
11571
  if (e.id === "edit") {
11202
- if (typeof r.content == "string" && (p.value = r.content, o.value = !0), typeof b.value == "string" && (p.value = b.value, o.value = !0), Array.isArray(b.value)) {
11203
- let e = b.value.at(0);
11204
- p.value = typeof e == "string" ? e : (e == null ? void 0 : e.text) || "", o.value = !0;
11572
+ if (typeof r.content == "string" && (d.value = r.content, o.value = !0), typeof C.value == "string" && (d.value = C.value, o.value = !0), Array.isArray(C.value)) {
11573
+ let e = C.value.at(0);
11574
+ d.value = typeof e == "string" ? e : (e == null ? void 0 : e.text) || "", o.value = !0;
11205
11575
  }
11206
- y.value.length && (o.value = !0);
11576
+ b.value.length && (o.value = !0);
11207
11577
  } else e.id === "copy" && i(typeof r.content == "string" ? r.content : JSON.stringify(r.content || ""));
11208
11578
  yield (n = r.onAction) == null ? void 0 : n.call(r, e);
11209
11579
  });
11210
11580
  return function(n) {
11211
11581
  return e.apply(this, arguments);
11212
11582
  };
11213
- }(), S = function() {
11583
+ }(), E = function() {
11214
11584
  var e = _asyncToGenerator(function* () {
11215
11585
  var e, n;
11216
11586
  yield (e = m.value) == null || (n = e.triggerSendMessage) == null ? void 0 : n.call(e), o.value = !1;
@@ -11218,11 +11588,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11218
11588
  return function() {
11219
11589
  return e.apply(this, arguments);
11220
11590
  };
11221
- }(), C = () => {
11591
+ }(), D = () => {
11222
11592
  o.value = !1;
11223
- }, T = () => {
11593
+ }, O = () => {
11224
11594
  o.value = !1;
11225
- }, E = function() {
11595
+ }, k = function() {
11226
11596
  var e = _asyncToGenerator(function* (e) {
11227
11597
  var n;
11228
11598
  (n = r.onShortcutConfirm) == null || n.call(r, e), o.value = !1;
@@ -11230,7 +11600,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11230
11600
  return function(n) {
11231
11601
  return e.apply(this, arguments);
11232
11602
  };
11233
- }(), D = function() {
11603
+ }(), A = function() {
11234
11604
  var e = _asyncToGenerator(function* (e, n) {
11235
11605
  var i;
11236
11606
  (i = r.onInputConfirm) == null || i.call(r, e, n), o.value = !1;
@@ -11239,41 +11609,44 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11239
11609
  return e.apply(this, arguments);
11240
11610
  };
11241
11611
  }();
11242
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [_.value && typeof _.value == "string" ? (openBlock(), createBlock(cite_content_default, {
11612
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$3, [_.value && typeof _.value == "string" ? (openBlock(), createBlock(cite_content_default, {
11243
11613
  key: 0,
11244
11614
  class: "ai-user-message-cite",
11245
11615
  content: _.value
11246
11616
  }, null, 8, ["content"])) : createCommentVNode("", !0), o.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [v.value ? (openBlock(), createBlock(shortcut_render_default, mergeProps({ key: 0 }, v.value, {
11247
11617
  class: "user-shortcut-render",
11248
- onClose: T,
11249
- onSubmit: E
11618
+ onClose: O,
11619
+ onSubmit: k
11250
11620
  }), null, 16)) : (openBlock(), createBlock(chat_input_default, {
11251
11621
  key: 1,
11252
11622
  ref_key: "chatInputRef",
11253
11623
  ref: m,
11254
- modelValue: p.value,
11255
- "onUpdate:modelValue": i[0] || (i[0] = (e) => p.value = e),
11624
+ modelValue: d.value,
11625
+ "onUpdate:modelValue": i[0] || (i[0] = (e) => d.value = e),
11256
11626
  class: "user-edit-input",
11257
- "default-upload-files": y.value,
11258
- "on-send-message": D
11627
+ "default-upload-files": b.value,
11628
+ "on-send-message": A
11259
11629
  }, {
11260
- "send-icon": withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(Button), {
11630
+ "send-icon": withCtx(() => [createElementVNode("div", _hoisted_4, [createVNode(unref(Button), {
11261
11631
  size: "small",
11262
- onClick: C
11632
+ onClick: D
11263
11633
  }, {
11264
11634
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
11265
11635
  _: 1
11266
11636
  }), createVNode(unref(Button), {
11267
11637
  size: "small",
11268
11638
  theme: "primary",
11269
- onClick: S
11639
+ onClick: E
11270
11640
  }, {
11271
11641
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("发送")), 1)]),
11272
11642
  _: 1
11273
11643
  })])]),
11274
11644
  _: 1
11275
11645
  }, 8, ["modelValue", "default-upload-files"]))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
11276
- y.value.length ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(y.value, (e, n) => {
11646
+ b.value.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [x.value.length ? (openBlock(), createElementBlock("div", _hoisted_2$2, [createVNode(file_content_default, {
11647
+ files: x.value,
11648
+ readonly: !0
11649
+ }, null, 8, ["files"])])) : createCommentVNode("", !0), (openBlock(!0), createElementBlock(Fragment, null, renderList(S.value, (e, n) => {
11277
11650
  var r;
11278
11651
  return openBlock(), createElementBlock("div", {
11279
11652
  key: (r = e.url) == null ? n : r,
@@ -11282,12 +11655,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11282
11655
  files: [e],
11283
11656
  readonly: !0
11284
11657
  }, null, 8, ["files"])]);
11285
- }), 128)) : createCommentVNode("", !0),
11286
- (_.value || b.value).length ? (openBlock(), createElementBlock("div", _hoisted_2$1, [Array.isArray(_.value) ? (openBlock(), createBlock(key_value_content_default, {
11658
+ }), 128))], 64)) : createCommentVNode("", !0),
11659
+ (_.value || C.value).length ? (openBlock(), createElementBlock("div", _hoisted_3, [Array.isArray(_.value) ? (openBlock(), createBlock(key_value_content_default, {
11287
11660
  key: 0,
11288
11661
  content: _.value,
11289
11662
  title: g.value
11290
- }, null, 8, ["content", "title"])) : n.content ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(Array.isArray(b.value) ? b.value : [b.value], (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [typeof n == "string" ? (openBlock(), createBlock(markdown_content_default, {
11663
+ }, null, 8, ["content", "title"])) : n.content ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(Array.isArray(C.value) ? C.value : [C.value], (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [typeof n == "string" ? (openBlock(), createBlock(markdown_content_default, {
11291
11664
  key: 0,
11292
11665
  content: n
11293
11666
  }, null, 8, ["content"])) : n.type === unref(MessageContentType).Text ? (openBlock(), createBlock(markdown_content_default, {
@@ -11299,7 +11672,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11299
11672
  class: "ai-user-message-tools",
11300
11673
  "message-tools": unref(CONST_USER_MESSAGE_TOOLS),
11301
11674
  "message-tools-status": n.messageToolsStatus,
11302
- "on-action": x,
11675
+ "on-action": w,
11303
11676
  "tippy-options": n.tippyOptions,
11304
11677
  "update-tools": []
11305
11678
  }, null, 8, [
@@ -11343,7 +11716,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11343
11716
  });
11344
11717
  return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
11345
11718
  }
11346
- }), _hoisted_1 = ["onMouseenter", "onMouseleave"], _hoisted_2 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
11719
+ }), _hoisted_1$2 = ["onMouseenter", "onMouseleave"], _hoisted_2$1 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
11347
11720
  __name: "message-container",
11348
11721
  props: /* @__PURE__ */ mergeModels({
11349
11722
  enableSelection: {
@@ -11365,18 +11738,26 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11365
11738
  }),
11366
11739
  emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
11367
11740
  setup(n) {
11368
- let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), { toScrollBottom: p, debouncedShowScrollBottomBtn: m } = useContainerScrollProvider(a, o), { copy: g } = useClipboard();
11741
+ let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), { toScrollBottom: f, debouncedShowScrollBottomBtn: m } = useContainerScrollProvider(a, o), { copy: g } = useClipboard();
11369
11742
  watchEffect(() => {
11370
11743
  var e;
11371
11744
  let n = [], i = [];
11372
11745
  for (let e of r.messages) {
11373
11746
  if (e.role === MessageRole.User) {
11374
- n.length > 0 && (i.push({
11375
- messages: n,
11376
- type: MessageRole.Assistant,
11377
- isHover: !1,
11378
- checked: !1
11379
- }), n = []), i.push({
11747
+ if (n.length > 0) {
11748
+ var a;
11749
+ i.push({
11750
+ messages: n,
11751
+ type: MessageRole.Assistant,
11752
+ isHover: !1,
11753
+ checked: !1,
11754
+ pause: (a = n == null ? void 0 : n.some((e) => {
11755
+ var n;
11756
+ return (n = e.property) == null || (n = n.extra) == null ? void 0 : n.pause;
11757
+ })) == null ? !1 : a
11758
+ }), n = [];
11759
+ }
11760
+ i.push({
11380
11761
  messages: [e],
11381
11762
  type: MessageRole.User,
11382
11763
  isHover: !1,
@@ -11397,12 +11778,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11397
11778
  }
11398
11779
  n.push(e);
11399
11780
  }
11400
- n.length > 0 && i.push({
11401
- messages: n,
11402
- type: MessageRole.Assistant,
11403
- isHover: !1,
11404
- checked: !1
11405
- }), ((e = r.messages.at(-1)) == null ? void 0 : e.role) === MessageRole.User && i.push({
11781
+ if (n.length > 0) {
11782
+ var o;
11783
+ i.push({
11784
+ messages: n,
11785
+ type: MessageRole.Assistant,
11786
+ isHover: !1,
11787
+ checked: !1,
11788
+ pause: (o = n == null ? void 0 : n.some((e) => {
11789
+ var n;
11790
+ return (n = e.property) == null || (n = n.extra) == null ? void 0 : n.pause;
11791
+ })) == null ? !1 : o
11792
+ });
11793
+ }
11794
+ ((e = r.messages.at(-1)) == null ? void 0 : e.role) === MessageRole.User && i.push({
11406
11795
  messages: [{
11407
11796
  role: MessageRole.Loading,
11408
11797
  content: "",
@@ -11513,7 +11902,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11513
11902
  "on-input-confirm",
11514
11903
  "on-shortcut-confirm",
11515
11904
  "tippy-options"
11516
- ]))])), 128)), a.type === unref(MessageRole).Assistant && n.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
11905
+ ]))])), 128)), !(n.enableSelection && a.type !== unref(MessageRole).Loading) && !a.pause && a.type === unref(MessageRole).Assistant && n.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
11517
11906
  key: 0,
11518
11907
  "message-tools-status": n.messageToolsStatus,
11519
11908
  "on-action": (e) => _(e, a.messages),
@@ -11527,14 +11916,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11527
11916
  "on-action",
11528
11917
  "tippy-options",
11529
11918
  "onFeedback"
11530
- ])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1))), 128)),
11919
+ ])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1$2))), 128)),
11531
11920
  createElementVNode("div", {
11532
11921
  ref_key: "messageContainerBottomRef",
11533
11922
  ref: o,
11534
11923
  class: "message-container-bottom",
11535
11924
  tabindex: "0"
11536
11925
  }, null, 512),
11537
- createElementVNode("div", _hoisted_2, [withDirectives(createVNode(scroll_btn_default, {
11926
+ createElementVNode("div", _hoisted_2$1, [withDirectives(createVNode(scroll_btn_default, {
11538
11927
  title: unref(t)("停止生成"),
11539
11928
  onClick: g[0] || (g[0] = (e) => i.$emit("stopStreaming"))
11540
11929
  }, {
@@ -11542,12 +11931,186 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11542
11931
  _: 1
11543
11932
  }, 8, ["title"]), [[vShow, n.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
11544
11933
  title: unref(t)("返回底部"),
11545
- onClick: unref(p)
11934
+ onClick: unref(f)
11546
11935
  }, {
11547
11936
  icon: withCtx(() => [createVNode(unref(ArrowDownIcon))]),
11548
11937
  _: 1
11549
11938
  }, 8, ["title", "onClick"]), [[vShow, unref(m)]])])
11550
11939
  ], 512));
11551
11940
  }
11552
- });
11553
- export { AIBluekingIcon, AI_BLUEKING_MESSAGE_SLOT_ID, ActiveLikeIcon, ActiveUnLikeIcon, AgentIcon, ai_selection_default as AiSelection, ArrowDownIcon, ArrowRightIcon, CHAT_Z_INDEX, CONST_MESSAGE_TOOLS, CONST_UPDATE_TOOLS, CONST_USER_MESSAGE_TOOLS, CONTAINER_SCROLL_TOKEN, chat_input_default as ChatInput, CiteIcon, CloseCircleIcon, CloseIcon, CollapsedIcon, ContentLoadingIcon, content_render_default as ContentRender, CopyIcon, DEFAULT_SHORTCUTS, Delete, DeleteCircleIcon, DeleteIcon, DocLinkIcon, DocumentIcon, EDITOR_MENU_Z_INDEX, EDITOR_Z_INDEX, EditIcon, ErrorIcon, FileUploadIcon, ImageErrorIcon, InsertText, LikeIcon, LinkIcon, LoadingMessageIcon, MAX_UPLOAD_FILES, MAX_UPLOAD_FILE_SIZE, MESSAGE_SLOT_ID, MarkdownLanguageMap, message_container_default as MessageContainer, MessageContentType, message_render_default as MessageRender, MessageRole, MessageState, MessageStatus, message_tools_default as MessageTools, MessageToolsStatus, user_feedback_default as MessageUserFeedback, MoreAgentIcon, MoreIcon, OverflowTips, PreviewIcon, RebuildIcon, RemoveIcon, ReplaceAll, SELECTION_Z_INDEX, SHORTCUT_MENU_Z_INDEX, SHOW_SCROLL_BOTTOM_BTN_DISTANCE, SendMessageIcon, ShareIcon, shortcut_btn_default as ShortcutBtn, shortcut_btns_default as ShortcutBtns, shortcut_render_default as ShortcutRender, TargetIcon, ThinkingIcon, ToolIconsMap, UnLikeIcon, UploadStatus, commonSVGProps, completeMarkdownSyntax, createEditor, docToString, formatDuration, formatFileSize, getCookieByName, getFileExtension, getFilePreviewUrl, getMessageSlotId, getScrollParent, isEn, isImageFile, lang, markdownAnimationAttrs, markdownItLatex, markdownItMermaid, microtask, min, needsMarkdownCompletion, noop, plainSchema, removeCompletionSuffix, resourceTypeMap, schema, stringToDoc, t, useAnimationText, useClipboard, useCommandSelection, useContainerScrollConsumer, useContainerScrollProvider, useGlobalConfig, useMenuKeydown, useMessageSlotId, useObserverVisibleList, useParentScrolling, voidNode };
11941
+ }), _hoisted_1$1 = { class: "ai-image-preview-group" }, image_preview_group_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ImagePreviewGroup" }), {}, {
11942
+ __name: "image-preview-group",
11943
+ props: {
11944
+ maskClosable: {
11945
+ type: Boolean,
11946
+ default: !0
11947
+ },
11948
+ onDownload: {
11949
+ type: Function,
11950
+ default: void 0
11951
+ },
11952
+ showInfo: {
11953
+ type: Boolean,
11954
+ default: !1
11955
+ }
11956
+ },
11957
+ setup(e) {
11958
+ let n = /* @__PURE__ */ new Map(), r = shallowRef(!1), i = shallowRef([]), a = shallowRef(0);
11959
+ return provide(IMAGE_PREVIEW_GROUP_KEY, {
11960
+ register: (e, r) => {
11961
+ n.set(e, r);
11962
+ },
11963
+ unregister: (e) => {
11964
+ n.delete(e);
11965
+ },
11966
+ preview: (e) => {
11967
+ let o = [...n.keys()], s = o.map((e) => n.get(e)()), c = o.indexOf(e);
11968
+ i.value = s, a.value = c >= 0 ? c : 0, r.value = !0;
11969
+ }
11970
+ }), (n, o) => (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(n.$slots, "default"), r.value ? (openBlock(), createBlock(image_preview_default, {
11971
+ key: 0,
11972
+ current: a.value,
11973
+ "onUpdate:current": o[0] || (o[0] = (e) => a.value = e),
11974
+ visible: r.value,
11975
+ "onUpdate:visible": o[1] || (o[1] = (e) => r.value = e),
11976
+ images: i.value,
11977
+ "mask-closable": e.maskClosable,
11978
+ "on-download": e.onDownload,
11979
+ "show-info": e.showInfo
11980
+ }, createSlots({ _: 2 }, [n.$slots.extra ? {
11981
+ name: "extra",
11982
+ fn: withCtx(() => [renderSlot(n.$slots, "extra")]),
11983
+ key: "0"
11984
+ } : void 0]), 1032, [
11985
+ "current",
11986
+ "visible",
11987
+ "images",
11988
+ "mask-closable",
11989
+ "on-download",
11990
+ "show-info"
11991
+ ])) : createCommentVNode("", !0)]));
11992
+ }
11993
+ })), _hoisted_1 = ["alt", "src"], _hoisted_2 = {
11994
+ key: 1,
11995
+ class: "ai-image-error"
11996
+ }, image_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AiImage" }), {}, {
11997
+ __name: "image",
11998
+ props: {
11999
+ alt: { default: "" },
12000
+ height: { default: void 0 },
12001
+ lazy: {
12002
+ type: Boolean,
12003
+ default: !1
12004
+ },
12005
+ onDownload: {},
12006
+ preview: {
12007
+ type: Boolean,
12008
+ default: !0
12009
+ },
12010
+ previewProps: { default: void 0 },
12011
+ showInfo: {
12012
+ type: Boolean,
12013
+ default: !1
12014
+ },
12015
+ src: {},
12016
+ width: { default: void 0 }
12017
+ },
12018
+ emits: [
12019
+ "load",
12020
+ "error",
12021
+ "preview"
12022
+ ],
12023
+ setup(e, { expose: n, emit: r }) {
12024
+ let i = e, o = r, f = Symbol(), m = inject(IMAGE_PREVIEW_GROUP_KEY, null), g = ref(), _ = shallowRef("loading"), v = shallowRef(!1), y = shallowRef(!i.lazy), x = null, S = computed(() => {
12025
+ var e;
12026
+ return ((e = i.previewProps) == null ? void 0 : e.src) || i.src;
12027
+ }), C = () => {
12028
+ let e = i.previewProps;
12029
+ return {
12030
+ url: S.value,
12031
+ name: e == null ? void 0 : e.name,
12032
+ width: e == null ? void 0 : e.width,
12033
+ height: e == null ? void 0 : e.height,
12034
+ resolution: e == null ? void 0 : e.resolution,
12035
+ downloadUrl: e == null ? void 0 : e.downloadUrl
12036
+ };
12037
+ }, w = shallowRef(0), T = computed(() => {
12038
+ if (!i.lazy || y.value) {
12039
+ let e = i.src;
12040
+ return w.value === 0 ? e : `${e}${e.includes("?") ? "&" : "?"}_t=${w.value}`;
12041
+ }
12042
+ return "";
12043
+ }), E = computed(() => [C()]), O = computed(() => {
12044
+ let e = {};
12045
+ return i.width && (e.width = typeof i.width == "number" ? `${i.width}px` : i.width), i.height && (e.height = typeof i.height == "number" ? `${i.height}px` : i.height), e;
12046
+ }), M = {
12047
+ width: "100%",
12048
+ height: "100%",
12049
+ objectFit: "cover"
12050
+ }, N = (e) => {
12051
+ _.value = "loaded", o("load", e);
12052
+ }, F = (e) => {
12053
+ _.value = "error", o("error", e);
12054
+ }, I = () => {
12055
+ _.value = "loading", w.value = Date.now();
12056
+ }, R = () => {
12057
+ !i.preview || _.value !== "loaded" || (m ? m.preview(f) : v.value = !0, o("preview"));
12058
+ }, B = () => {
12059
+ !i.lazy || !g.value || (x = new IntersectionObserver((e) => {
12060
+ var n;
12061
+ (n = e[0]) != null && n.isIntersecting && (y.value = !0, x == null || x.disconnect(), x = null);
12062
+ }, { rootMargin: "200px" }), x.observe(g.value));
12063
+ }, U = () => {
12064
+ x == null || x.disconnect(), x = null;
12065
+ };
12066
+ return onMounted(() => {
12067
+ B(), m == null || m.register(f, C);
12068
+ }), onBeforeUnmount(() => {
12069
+ U(), m == null || m.unregister(f);
12070
+ }), n({ previewVisible: v }), (n, r) => (openBlock(), createElementBlock("div", {
12071
+ ref_key: "containerRef",
12072
+ ref: g,
12073
+ class: normalizeClass(["ai-image", {
12074
+ "ai-image--error": _.value === "error",
12075
+ "ai-image--preview": e.preview && _.value === "loaded"
12076
+ }]),
12077
+ style: normalizeStyle(O.value),
12078
+ onClick: R
12079
+ }, [
12080
+ _.value !== "error" && T.value ? (openBlock(), createElementBlock("img", {
12081
+ key: 0,
12082
+ alt: e.alt,
12083
+ class: "ai-image-inner",
12084
+ src: T.value,
12085
+ style: M,
12086
+ onError: F,
12087
+ onLoad: N
12088
+ }, null, 40, _hoisted_1)) : createCommentVNode("", !0),
12089
+ _.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(ImageErrorIcon), { class: "ai-image-error-icon" })])) : createCommentVNode("", !0),
12090
+ _.value === "error" ? (openBlock(), createElementBlock("div", {
12091
+ key: 2,
12092
+ class: "ai-image-error-overlay",
12093
+ onClick: I
12094
+ }, [createVNode(unref(ReloadIcon), { class: "ai-image-reload-icon" }), createElementVNode("span", null, toDisplayString(unref(t)("重新加载")), 1)])) : createCommentVNode("", !0),
12095
+ renderSlot(n.$slots, "default"),
12096
+ !unref(m) && e.preview && v.value ? (openBlock(), createBlock(image_preview_default, {
12097
+ key: 3,
12098
+ visible: v.value,
12099
+ "onUpdate:visible": r[0] || (r[0] = (e) => v.value = e),
12100
+ images: E.value,
12101
+ "on-download": e.onDownload,
12102
+ "show-info": e.showInfo
12103
+ }, createSlots({ _: 2 }, [n.$slots.extra ? {
12104
+ name: "extra",
12105
+ fn: withCtx(() => [renderSlot(n.$slots, "extra")]),
12106
+ key: "0"
12107
+ } : void 0]), 1032, [
12108
+ "visible",
12109
+ "images",
12110
+ "on-download",
12111
+ "show-info"
12112
+ ])) : createCommentVNode("", !0)
12113
+ ], 6));
12114
+ }
12115
+ }));
12116
+ export { AIBluekingIcon, AI_BLUEKING_MESSAGE_SLOT_ID, ActiveLikeIcon, ActiveUnLikeIcon, AgentIcon, image_default as AiImage, ai_selection_default as AiSelection, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightPreviewIcon, CHAT_Z_INDEX, CONST_MESSAGE_TOOLS, CONST_UPDATE_TOOLS, CONST_USER_MESSAGE_TOOLS, CONTAINER_SCROLL_TOKEN, chat_input_default as ChatInput, CiteIcon, CloseCircleIcon, CloseIcon, CollapsedIcon, ContentLoadingIcon, content_render_default as ContentRender, CopyIcon, DEFAULT_SHORTCUTS, Delete, DeleteCircleIcon, DeleteIcon, DocLinkIcon, DocumentIcon, DownloadIcon, EDITOR_MENU_Z_INDEX, EDITOR_Z_INDEX, EditIcon, ErrorIcon, FileUploadIcon, FitScreenIcon, IMAGE_PREVIEW_GROUP_KEY, ImageBrokenIcon, ImageErrorIcon, image_preview_default as ImagePreview, image_preview_group_default as ImagePreviewGroup, ImageSizeIcon, InsertText, LikeIcon, LinkIcon, LoadingMessageIcon, MAX_UPLOAD_FILES, MAX_UPLOAD_FILE_SIZE, MESSAGE_SLOT_ID, MarkdownLanguageMap, message_container_default as MessageContainer, MessageContentType, message_render_default as MessageRender, MessageRole, MessageState, MessageStatus, message_tools_default as MessageTools, MessageToolsStatus, user_feedback_default as MessageUserFeedback, MoreAgentIcon, MoreIcon, OverflowTips, PreviewCloseIcon, PreviewIcon, RebuildIcon, ReloadIcon, RemoveIcon, ReplaceAll, RotateIcon, SELECTION_Z_INDEX, SHORTCUT_MENU_Z_INDEX, SHOW_SCROLL_BOTTOM_BTN_DISTANCE, SendMessageIcon, ShareIcon, shortcut_btn_default as ShortcutBtn, shortcut_btns_default as ShortcutBtns, shortcut_render_default as ShortcutRender, TargetIcon, ThinkingIcon, ToolIconsMap, UnLikeIcon, UploadStatus, ZoomInIcon, ZoomOutIcon, commonSVGProps, completeMarkdownSyntax, createEditor, docToString, formatDuration, formatFileSize, getCookieByName, getFileExtension, getFilePreviewUrl, getMessageSlotId, getScrollParent, isEn, isImageFile, lang, markdownAnimationAttrs, markdownItLatex, markdownItMermaid, microtask, min, needsMarkdownCompletion, noop, plainSchema, removeCompletionSuffix, resourceTypeMap, schema, stringToDoc, t, useAnimationText, useClipboard, useCommandSelection, useContainerScrollConsumer, useContainerScrollProvider, useGlobalConfig, useMenuKeydown, useMessageSlotId, useObserverVisibleList, useParentScrolling, voidNode };