@blueking/chat-x 0.0.2 → 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)
@@ -8180,8 +8241,9 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
8180
8241
  tool: "工具",
8181
8242
  mcp: "MCP",
8182
8243
  doc: "知识库",
8244
+ knowledgebase: "知识库",
8183
8245
  shortcut: "快捷指令"
8184
- }, noop = () => {}, MessageState = {
8246
+ }, noop = () => {}, IMAGE_PREVIEW_GROUP_KEY = Symbol("imagePreviewGroup"), MessageState = {
8185
8247
  ACTIVE: "active",
8186
8248
  DISABLED: "disabled",
8187
8249
  LOADING: "loading"
@@ -8191,7 +8253,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
8191
8253
  }({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
8192
8254
  return e.Disabled = "disabled", e.Hidden = "hidden", e;
8193
8255
  }({});
8194
- 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({
8195
8257
  __name: "file-upload-btn",
8196
8258
  props: {
8197
8259
  accept: { default: "image/*" },
@@ -8199,7 +8261,8 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8199
8261
  multiple: {
8200
8262
  type: Boolean,
8201
8263
  default: !0
8202
- }
8264
+ },
8265
+ tippyOptions: {}
8203
8266
  },
8204
8267
  emits: ["upload"],
8205
8268
  setup(e, { emit: n }) {
@@ -8220,7 +8283,7 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8220
8283
  }
8221
8284
  n.value = "";
8222
8285
  };
8223
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$23, [createElementVNode("input", {
8286
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("input", {
8224
8287
  ref_key: "fileInputRef",
8225
8288
  ref: a,
8226
8289
  accept: e.accept,
@@ -8228,25 +8291,25 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8228
8291
  multiple: "",
8229
8292
  type: "file",
8230
8293
  onChange: s
8231
- }, null, 40, _hoisted_2$17), withDirectives((openBlock(), createElementBlock("span", {
8294
+ }, null, 40, _hoisted_2$20), withDirectives((openBlock(), createElementBlock("span", {
8232
8295
  class: "ai-shortcut-btn file-upload-btn-icon",
8233
8296
  onClick: o
8234
- }, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
8235
- content: unref(t)("上传文件"),
8297
+ }, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
8298
+ content: unref(t)("上传图片"),
8236
8299
  theme: "ai-chat-box",
8237
8300
  offset: [0, 16]
8238
- }]])]));
8301
+ })]])]));
8239
8302
  }
8240
- }), _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({
8241
8304
  __name: "cite-content",
8242
8305
  props: {
8243
8306
  content: {},
8244
8307
  onClose: { type: Function }
8245
8308
  },
8246
8309
  setup(e) {
8247
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
8310
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [
8248
8311
  createVNode(unref(CiteIcon)),
8249
- createElementVNode("span", _hoisted_2$16, toDisplayString(e.content), 1),
8312
+ createElementVNode("span", _hoisted_2$19, toDisplayString(e.content), 1),
8250
8313
  e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
8251
8314
  key: 0,
8252
8315
  onClick: r[0] || (r[0] = (n) => {
@@ -8256,14 +8319,291 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8256
8319
  })) : createCommentVNode("", !0)
8257
8320
  ]));
8258
8321
  }
8259
- }), _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 = [
8260
8599
  "alt",
8261
8600
  "src",
8601
+ "onClick",
8262
8602
  "onError"
8263
8603
  ], _hoisted_3$12 = {
8264
8604
  key: 1,
8265
8605
  class: "file-content-image image-error"
8266
- }, _hoisted_4$11 = {
8606
+ }, _hoisted_4$12 = {
8267
8607
  key: 2,
8268
8608
  class: "file-content-object"
8269
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({
@@ -8274,40 +8614,54 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8274
8614
  },
8275
8615
  emits: ["deleteFile"],
8276
8616
  setup(n, { emit: r }) {
8277
- let i = r, a = reactive({}), o = (e) => {
8617
+ let i = r, o = n, d = reactive({}), f = (e) => {
8278
8618
  var n;
8279
8619
  return e.url ? !0 : isImageFile(e.mimeType || ((n = e.file) == null ? void 0 : n.type));
8280
- }, d = (e) => {
8620
+ }, m = (e) => {
8281
8621
  var n;
8282
8622
  return e.url || ((n = e.file) == null ? void 0 : n.name) || "";
8283
- }, p = (e) => {
8284
- a[d(e)] = !0;
8285
- }, m = (e) => {
8623
+ }, g = (e) => {
8624
+ d[m(e)] = !0;
8625
+ }, _ = (e) => {
8286
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);
8287
8630
  };
8288
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
8289
- 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;
8290
8633
  return openBlock(), createElementBlock("div", {
8291
8634
  key: (r = e.file) == null ? void 0 : r.name,
8292
- class: normalizeClass(["file-content", { "is-file-object": !o(e) || a[d(e)] }])
8293
- }, [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", {
8294
8637
  key: 0,
8295
8638
  alt: e.filename || ((i = e.file) == null ? void 0 : i.name),
8296
8639
  class: "file-content-image",
8297
8640
  src: e.url || unref(getFilePreviewUrl)(e.file),
8298
- onError: (n) => p(e)
8299
- }, 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, [
8300
8644
  createVNode(unref(DocumentIcon), { class: "file-icon" }),
8301
- createElementVNode("span", _hoisted_6$2, toDisplayString(e.filename || ((g = e.file) == null ? void 0 : g.name)), 1),
8302
- 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)
8303
8647
  ]), createElementVNode("div", _hoisted_8, toDisplayString(unref(formatFileSize)(e.file)), 1)])), n.readonly ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(DeleteCircleIcon), {
8304
8648
  key: 3,
8305
8649
  class: "file-delete-icon",
8306
- onClick: (n) => m(e)
8650
+ onClick: (n) => _(e)
8307
8651
  }, null, 8, ["onClick"]))], 2);
8308
- }), 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
+ ])]));
8309
8663
  }
8310
- }), _hoisted_1$20 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8664
+ }), _hoisted_1$22 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8311
8665
  __name: "ai-prompt-list",
8312
8666
  props: {
8313
8667
  onSelect: { type: Function },
@@ -8327,7 +8681,7 @@ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], fi
8327
8681
  key: e,
8328
8682
  class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(o) === r }]),
8329
8683
  onClick: (r) => n.onSelect(e)
8330
- }, toDisplayString(e), 11, _hoisted_1$20))), 128))], 512));
8684
+ }, toDisplayString(e), 11, _hoisted_1$22))), 128))], 512));
8331
8685
  }
8332
8686
  }), bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
8333
8687
  "top",
@@ -8992,12 +9346,12 @@ function preventOverflow(e) {
8992
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) : {
8993
9347
  width: 0,
8994
9348
  height: 0
8995
- }, 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);
8996
9350
  w[S] = X, A[S] = X - F;
8997
9351
  }
8998
9352
  if (c) {
8999
- 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);
9000
- 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;
9001
9355
  }
9002
9356
  n.modifiersData[i] = A;
9003
9357
  }
@@ -9537,16 +9891,16 @@ function createTippy(e, n) {
9537
9891
  isShown: !1
9538
9892
  },
9539
9893
  plugins: b,
9540
- clearDelayTimeouts: uy,
9541
- setProps: dy,
9542
- setContent: fy,
9543
- show: py,
9544
- hide: my,
9545
- hideWithInteractivity: hy,
9546
- enable: cy,
9547
- disable: ly,
9548
- unmount: gy,
9549
- 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
9550
9904
  };
9551
9905
  /* istanbul ignore if */
9552
9906
  if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
@@ -9555,7 +9909,7 @@ function createTippy(e, n) {
9555
9909
  var T = b.map(function(e) {
9556
9910
  return e.fn(x);
9557
9911
  }), E = e.hasAttribute("aria-expanded");
9558
- 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() {
9559
9913
  x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
9560
9914
  }), C.addEventListener("mouseleave", function() {
9561
9915
  x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
@@ -9674,17 +10028,17 @@ function createTippy(e, n) {
9674
10028
  });
9675
10029
  });
9676
10030
  }
9677
- function ty() {
9678
- O() && (q("touchstart", ny, { passive: !0 }), q("touchend", ry, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
9679
- 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) {
9680
10034
  case "mouseenter":
9681
- q("mouseleave", ry);
10035
+ q("mouseleave", Ky);
9682
10036
  break;
9683
10037
  case "focus":
9684
- q(isIE11 ? "focusout" : "blur", iy);
10038
+ q(isIE11 ? "focusout" : "blur", qy);
9685
10039
  break;
9686
10040
  case "focusin":
9687
- q("focusout", iy);
10041
+ q("focusout", qy);
9688
10042
  break;
9689
10043
  }
9690
10044
  });
@@ -9695,7 +10049,7 @@ function createTippy(e, n) {
9695
10049
  n.removeEventListener(r, i, a);
9696
10050
  }), m = [];
9697
10051
  }
9698
- function ny(e) {
10052
+ function Gy(e) {
9699
10053
  var n, r = !1;
9700
10054
  if (!(!x.state.isEnabled || X(e) || c)) {
9701
10055
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
@@ -9715,7 +10069,7 @@ function createTippy(e, n) {
9715
10069
  } : null;
9716
10070
  }).filter(Boolean), e) && (R(), $(e));
9717
10071
  }
9718
- function ry(e) {
10072
+ function Ky(e) {
9719
10073
  if (!(X(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9720
10074
  if (x.props.interactive) {
9721
10075
  x.hideWithInteractivity(e);
@@ -9724,14 +10078,14 @@ function createTippy(e, n) {
9724
10078
  $(e);
9725
10079
  }
9726
10080
  }
9727
- function iy(e) {
10081
+ function qy(e) {
9728
10082
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
9729
10083
  }
9730
10084
  function X(e) {
9731
10085
  return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
9732
10086
  }
9733
- function ay() {
9734
- oy();
10087
+ function Jy() {
10088
+ Yy();
9735
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 ? {
9736
10090
  getBoundingClientRect: o,
9737
10091
  contextElement: o.contextElement || A()
@@ -9789,13 +10143,13 @@ function createTippy(e, n) {
9789
10143
  modifiers: u
9790
10144
  }));
9791
10145
  }
9792
- function oy() {
10146
+ function Yy() {
9793
10147
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
9794
10148
  }
9795
- function sy() {
10149
+ function Xy() {
9796
10150
  var e = x.props.appendTo, n, r = A();
9797
10151
  /* istanbul ignore else */
9798
- 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, [
9799
10153
  "Interactive tippy element may not be accessible via keyboard",
9800
10154
  "navigation because it is not directly after the reference element",
9801
10155
  "in the DOM source order.",
@@ -9834,31 +10188,31 @@ function createTippy(e, n) {
9834
10188
  });
9835
10189
  }
9836
10190
  }
9837
- function cy() {
10191
+ function Zy() {
9838
10192
  x.state.isEnabled = !0;
9839
10193
  }
9840
- function ly() {
10194
+ function Qy() {
9841
10195
  x.hide(), x.state.isEnabled = !1;
9842
10196
  }
9843
- function uy() {
10197
+ function $y() {
9844
10198
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
9845
10199
  }
9846
- function dy(n) {
10200
+ function eb(n) {
9847
10201
  /* istanbul ignore else */
9848
10202
  if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
9849
10203
  F("onBeforeUpdate", [x, n]), J();
9850
10204
  var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
9851
- 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) {
9852
10206
  e.removeAttribute("aria-expanded");
9853
- }) : 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) {
9854
10208
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
9855
10209
  })), F("onAfterUpdate", [x, n]);
9856
10210
  }
9857
10211
  }
9858
- function fy(e) {
10212
+ function tb(e) {
9859
10213
  x.setProps({ content: e });
9860
10214
  }
9861
- function py() {
10215
+ function nb() {
9862
10216
  /* istanbul ignore else */
9863
10217
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
9864
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);
@@ -9878,10 +10232,10 @@ function createTippy(e, n) {
9878
10232
  x.state.isShown = !0, F("onShown", [x]);
9879
10233
  });
9880
10234
  }
9881
- }, sy();
10235
+ }, Xy();
9882
10236
  }
9883
10237
  }
9884
- function my() {
10238
+ function rb() {
9885
10239
  /* istanbul ignore else */
9886
10240
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
9887
10241
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
@@ -9893,18 +10247,18 @@ function createTippy(e, n) {
9893
10247
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
9894
10248
  }
9895
10249
  }
9896
- function hy(e) {
10250
+ function ib(e) {
9897
10251
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
9898
10252
  }
9899
- function gy() {
10253
+ function ab() {
9900
10254
  /* istanbul ignore else */
9901
- 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) {
9902
10256
  e._tippy.unmount();
9903
10257
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
9904
10258
  return e !== x;
9905
10259
  }), x.state.isMounted = !1, F("onHidden", [x]));
9906
10260
  }
9907
- function _y() {
10261
+ function ob() {
9908
10262
  /* istanbul ignore else */
9909
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]));
9910
10264
  }
@@ -9991,7 +10345,7 @@ const OverflowTips = {
9991
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;
9992
10346
  }
9993
10347
  };
9994
- 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({
9995
10349
  __name: "ai-slash-menu",
9996
10350
  props: {
9997
10351
  onSelect: { type: Function },
@@ -10002,8 +10356,9 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10002
10356
  "tool",
10003
10357
  "shortcut",
10004
10358
  "doc",
10359
+ "knowledgebase",
10005
10360
  "mcp"
10006
- ]), o = shallowRef([]), s = shallowRef([]), { activeIndex: f } = useMenuKeydown({
10361
+ ]), o = shallowRef([]), s = shallowRef([]), { activeIndex: d } = useMenuKeydown({
10007
10362
  items: o,
10008
10363
  onSelect: r.onSelect,
10009
10364
  menuRef: i
@@ -10020,7 +10375,7 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10020
10375
  items: c || []
10021
10376
  }), n.push(...c));
10022
10377
  }
10023
- f.value = 0, o.value = n, s.value = e;
10378
+ d.value = 0, o.value = n, s.value = e;
10024
10379
  });
10025
10380
  let p = (e) => {
10026
10381
  let n = a.value.findIndex((n) => n === e.type);
@@ -10036,25 +10391,25 @@ var _hoisted_1$19 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10036
10391
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (r, i) => (openBlock(), createElementBlock(Fragment, null, [r.items.length > 0 ? (openBlock(), createElementBlock("div", {
10037
10392
  key: i,
10038
10393
  class: "ai-slash-group"
10039
- }, [createElementVNode("div", _hoisted_1$19, [
10394
+ }, [createElementVNode("div", _hoisted_1$21, [
10040
10395
  (openBlock(), createElementBlock("svg", {
10041
10396
  class: "title-icon",
10042
10397
  style: normalizeStyle({ transform: a.value.includes(r.type) ? "rotate(90deg)" : "rotate(0deg)" }),
10043
10398
  viewBox: "0 0 1024 1024",
10044
10399
  onClick: (e) => p(r)
10045
- }, [...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)),
10046
10401
  createElementVNode("span", { class: normalizeClass(`mark-${r.type}`) }, null, 2),
10047
10402
  createTextVNode(" " + toDisplayString(r.name) + " (" + toDisplayString(r.items.length) + ") ", 1)
10048
10403
  ]), a.value.includes(r.type) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(r.items, (e) => {
10049
10404
  var r;
10050
10405
  return openBlock(), createElementBlock("div", {
10051
10406
  key: e.id,
10052
- 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 }]),
10053
10408
  onClick: (r) => n.onSelect(e)
10054
10409
  }, [withDirectives((openBlock(), createElementBlock("span", {
10055
10410
  class: "ellipsis-text",
10056
10411
  title: e.name
10057
- }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$10)), [[unref(OverflowTips), {
10412
+ }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$11)), [[unref(OverflowTips), {
10058
10413
  text: e.name,
10059
10414
  zIndex: 9999999,
10060
10415
  placement: "right-start",
@@ -10080,7 +10435,7 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
10080
10435
  plain: (e) => e.label
10081
10436
  }) }
10082
10437
  });
10083
- 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({
10084
10439
  __name: "ai-slash-input",
10085
10440
  props: {
10086
10441
  modelValue: {},
@@ -10094,20 +10449,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10094
10449
  "upload"
10095
10450
  ],
10096
10451
  setup(n, { expose: r, emit: i }) {
10097
- 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) => ({
10098
10453
  get() {
10099
10454
  return e(), typeof g.modelValue == "string" ? stringToDoc(g.modelValue) : g.modelValue;
10100
10455
  },
10101
10456
  set(e) {
10102
10457
  var r;
10103
- 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) => {
10104
10459
  var n;
10105
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;
10106
10461
  })) == null ? void 0 : r.filter((e) => !!e)) || []), n();
10107
10462
  }
10108
- })), 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 = () => {
10109
10464
  setTimeout(() => {
10110
- let e = P();
10465
+ let e = M();
10111
10466
  if (y.value = e.query || "", e.isActive) {
10112
10467
  var n, r;
10113
10468
  (n = o.value) == null || n.setProps({ getReferenceClientRect: () => {
@@ -10124,15 +10479,15 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10124
10479
  (i = o.value) == null || i.hide();
10125
10480
  }
10126
10481
  }, 16);
10127
- }, A = (e) => {
10128
- if (m("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
10482
+ }, k = (e) => {
10483
+ if (d("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
10129
10484
  var n;
10130
10485
  return e.shiftKey ? void 0 : ((n = e.preventDefault) == null || n.call(e), !1);
10131
10486
  }
10132
10487
  e.key === "@" && (v.value = "slash", O()), e.key === "/" && (v.value = "prompt", O());
10133
- }, N = () => {
10488
+ }, A = () => {
10134
10489
  y.value = "";
10135
- }, P = () => {
10490
+ }, M = () => {
10136
10491
  let e = {
10137
10492
  isActive: !1,
10138
10493
  query: "",
@@ -10169,18 +10524,18 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10169
10524
  e += ((a = r.text) == null ? void 0 : a.length) || 0;
10170
10525
  }
10171
10526
  return r.type === "tag" && (e += 1), e;
10172
- }, 0), L = (e) => {
10527
+ }, 0), I = (e) => {
10173
10528
  var n;
10174
- S.command(D);
10529
+ S.command(E);
10175
10530
  let { column: r, line: i } = T.value;
10176
- 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();
10177
- }, 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 = () => {
10178
10533
  setTimeout(() => {
10179
10534
  let e = window.getSelection(), n = document.createRange();
10180
10535
  a.value && e && (n.selectNodeContents(a.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
10181
10536
  }, 100);
10182
- }, V = (e) => {
10183
- S.command(ReplaceAll, e), R();
10537
+ }, z = (e) => {
10538
+ S.command(ReplaceAll, e), L();
10184
10539
  };
10185
10540
  watchEffect(() => {
10186
10541
  var e;
@@ -10193,12 +10548,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10193
10548
  (r = o.value) == null || r.hide();
10194
10549
  }
10195
10550
  });
10196
- let U = (e, n, r, i) => {
10551
+ let B = (e, n, r, i) => {
10197
10552
  if (n.type === "tag") {
10198
10553
  let n = F(e, r);
10199
10554
  S.command(DeleteTag, [i, n], [i, n + 1]);
10200
10555
  }
10201
- }, W = (e) => {
10556
+ }, U = (e) => {
10202
10557
  var n;
10203
10558
  let r = (n = e.clipboardData) == null ? void 0 : n.items;
10204
10559
  if (!r) return;
@@ -10207,7 +10562,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10207
10562
  let n = e.getAsFile();
10208
10563
  n && i.push(n);
10209
10564
  }
10210
- 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));
10211
10566
  }, G = () => {
10212
10567
  C == null || C(), S = createEditor({
10213
10568
  doc: _.value,
@@ -10220,21 +10575,21 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10220
10575
  return e.apply(this, arguments);
10221
10576
  };
10222
10577
  }(),
10223
- onKeyDown: (e) => A(e)
10578
+ onKeyDown: (e) => k(e)
10224
10579
  }), C = S.input(a.value);
10225
- }, 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;
10226
10581
  return onMounted(() => {
10227
10582
  var e;
10228
- G(), (e = a.value) == null || e.addEventListener("paste", W);
10583
+ G(), (e = a.value) == null || e.addEventListener("paste", U);
10229
10584
  }), onUnmounted(() => {
10230
10585
  var e;
10231
- 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);
10232
10587
  }), r({
10233
10588
  cleanup: () => {
10234
10589
  S.command(ReplaceAll, "");
10235
10590
  },
10236
- focus: R
10237
- }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$18, [createElementVNode("div", {
10591
+ focus: L
10592
+ }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$20, [createElementVNode("div", {
10238
10593
  ref_key: "editorRef",
10239
10594
  ref: a,
10240
10595
  "aria-placeholder": n.placeholder,
@@ -10247,8 +10602,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10247
10602
  "data-tag-type": i.data.type
10248
10603
  }, [createTextVNode(toDisplayString(i.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
10249
10604
  class: "mention-tag-remove-icon",
10250
- onClick: (e) => U(n, i, a, r)
10251
- }, 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), {
10252
10607
  ref_key: "tippyRef",
10253
10608
  ref: o,
10254
10609
  "append-to": unref(w),
@@ -10261,16 +10616,16 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10261
10616
  trigger: "manual",
10262
10617
  "trigger-target": a.value,
10263
10618
  "z-index": unref(EDITOR_MENU_Z_INDEX),
10264
- onHidden: N,
10265
- onShow: q
10619
+ onHidden: A,
10620
+ onShow: K
10266
10621
  }, {
10267
10622
  content: withCtx(() => [v.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
10268
10623
  key: 0,
10269
- "on-select": L,
10624
+ "on-select": I,
10270
10625
  "resource-list": b.value
10271
10626
  }, null, 8, ["resource-list"])) : v.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
10272
10627
  key: 1,
10273
- "on-select": V,
10628
+ "on-select": z,
10274
10629
  prompts: x.value
10275
10630
  }, null, 8, ["prompts"])) : createCommentVNode("", !0)]),
10276
10631
  _: 1
@@ -10280,9 +10635,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10280
10635
  "z-index"
10281
10636
  ])]));
10282
10637
  }
10283
- }), _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({
10284
10639
  __name: "input-attachment",
10285
- props: { messageState: {} },
10640
+ props: {
10641
+ messageState: {},
10642
+ tippyOptions: {}
10643
+ },
10286
10644
  emits: ["sendMessage", "stopSending"],
10287
10645
  setup(e, { emit: n }) {
10288
10646
  let r = e, i = n, a = () => {
@@ -10290,23 +10648,23 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10290
10648
  }, o = () => {
10291
10649
  r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
10292
10650
  };
10293
- 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), {
10294
10652
  key: 0,
10295
10653
  onClick: a
10296
- }, null, 512)), [[unref(directive), {
10654
+ }, null, 512)), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
10297
10655
  content: unref(t)("停止"),
10298
10656
  theme: "ai-chat-box",
10299
10657
  offset: [0, 16]
10300
- }]]) : withDirectives((openBlock(), createBlock(unref(SendMessageIcon), {
10658
+ })]]) : withDirectives((openBlock(), createBlock(unref(SendMessageIcon), {
10301
10659
  key: 1,
10302
10660
  onClick: o
10303
- }, null, 512)), [[unref(directive), {
10661
+ }, null, 512)), [[unref(directive), _objectSpread2(_objectSpread2({}, e.tippyOptions), {}, {
10304
10662
  content: r.messageState === unref(MessageStatus).Disabled ? void 0 : unref(t)("发送"),
10305
10663
  theme: "ai-chat-box",
10306
10664
  offset: [0, 16]
10307
- }]])], 2)])]));
10665
+ })]])], 2)])]));
10308
10666
  }
10309
- }), _hoisted_1$16 = { class: "chat-input-container" }, _hoisted_2$12 = {
10667
+ }), _hoisted_1$18 = { class: "chat-input-container" }, _hoisted_2$13 = {
10310
10668
  key: 1,
10311
10669
  class: "ai-divider"
10312
10670
  }, chat_input_default = /* @__PURE__ */ defineComponent({
@@ -10323,7 +10681,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10323
10681
  prompts: { default: () => [] },
10324
10682
  resources: { default: () => [] },
10325
10683
  shortcutId: {},
10326
- shortcuts: {}
10684
+ shortcuts: {},
10685
+ supportUpload: {
10686
+ type: Boolean,
10687
+ default: !0
10688
+ },
10689
+ tippyOptions: {}
10327
10690
  }, {
10328
10691
  cite: {
10329
10692
  required: !1,
@@ -10337,33 +10700,33 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10337
10700
  "update:modelValue"
10338
10701
  ], ["update:cite"]),
10339
10702
  setup(e, { expose: n, emit: r }) {
10340
- useCssVars((e) => ({ v673c5203: unref(CHAT_Z_INDEX) }));
10341
- 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(() => {
10342
10705
  var e;
10343
10706
  return (e = m.shortcuts) == null ? void 0 : e.find((e) => e.id === m.shortcutId);
10344
10707
  }), b = computed(() => {
10345
10708
  var e;
10346
10709
  return ((e = m.modelValue) == null ? void 0 : e.length) < 1 || Array.isArray(m.modelValue) && !docToString(m.modelValue).trim() ? MessageStatus.Disabled : m.messageStatus;
10347
- }), x = computed(() => typeof m.onUpload == "function");
10710
+ });
10348
10711
  watchPostEffect(() => {
10349
10712
  var e;
10350
10713
  let n = m.inputMaxHeight || 200;
10351
- if (v.value.length < 1 || !o.value) {
10352
- p.value = n;
10714
+ if (_.value.length < 1 || !o.value) {
10715
+ f.value = n;
10353
10716
  return;
10354
10717
  }
10355
- 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);
10356
10719
  });
10357
- let S = function() {
10720
+ let x = function() {
10358
10721
  var e = _asyncToGenerator(function* () {
10359
10722
  try {
10360
10723
  var e, n, r, a;
10361
10724
  (e = i.value) == null || (n = e.cleanup) == null || n.call(e);
10362
10725
  let s;
10363
- 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);
10364
10727
  else {
10365
10728
  var o;
10366
- s = (o = v.value) == null ? void 0 : o.slice().map((e) => {
10729
+ s = (o = _.value) == null ? void 0 : o.slice().map((e) => {
10367
10730
  var n, r;
10368
10731
  return {
10369
10732
  type: MessageContentType.Binary,
@@ -10376,7 +10739,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10376
10739
  text: docToString(m.modelValue)
10377
10740
  });
10378
10741
  }
10379
- (a = m.onSendMessage) == null || a.call(m, s, m.modelValue), v.value = [];
10742
+ (a = m.onSendMessage) == null || a.call(m, s, m.modelValue), _.value = [];
10380
10743
  } catch (e) {
10381
10744
  console.error(e);
10382
10745
  }
@@ -10384,12 +10747,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10384
10747
  return function() {
10385
10748
  return e.apply(this, arguments);
10386
10749
  };
10387
- }(), C = (e) => {
10750
+ }(), S = (e) => {
10388
10751
  if (e.key === "Enter" || e.key === "NumpadEnter") {
10389
10752
  if (e.shiftKey || b.value === MessageStatus.Disabled) return;
10390
- S();
10753
+ x();
10391
10754
  }
10392
- }, w = function() {
10755
+ }, C = function() {
10393
10756
  var e = _asyncToGenerator(function* () {
10394
10757
  try {
10395
10758
  var e;
@@ -10401,32 +10764,33 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10401
10764
  return function() {
10402
10765
  return e.apply(this, arguments);
10403
10766
  };
10404
- }(), T = () => {
10767
+ }(), w = () => {
10405
10768
  d.value = "";
10406
- }, E = (e) => {
10769
+ }, T = (e) => {
10407
10770
  g("selectShortcut", e);
10408
- }, k = () => {
10771
+ }, E = () => {
10409
10772
  g("deleteShortcut");
10410
- }, A = function() {
10773
+ }, D = (e) => `${e.name}_${e.size}_${e.lastModified}`, A = function() {
10411
10774
  var e = _asyncToGenerator(function* (e) {
10412
- if (x.value) for (let r of e) {
10413
- var n;
10414
- if (v.value.find((e) => {
10415
- var n;
10416
- return ((n = e.file) == null ? void 0 : n.name) === r.name;
10417
- })) continue;
10418
- let e = {
10419
- 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,
10420
10784
  status: UploadStatus.Pending
10421
10785
  };
10422
- v.value.push(e), (n = m.onUpload) == null || n.call(m, r).then((n) => {
10423
- if (n && typeof n == "object" && "download_url" in n) {
10424
- 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;
10425
10789
  return;
10426
10790
  }
10427
- e.status = UploadStatus.Error;
10791
+ a.status = UploadStatus.Error;
10428
10792
  }).catch(() => {
10429
- e.status = UploadStatus.Error;
10793
+ a.status = UploadStatus.Error;
10430
10794
  });
10431
10795
  }
10432
10796
  });
@@ -10434,8 +10798,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10434
10798
  return e.apply(this, arguments);
10435
10799
  };
10436
10800
  }(), j = (e) => {
10437
- 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);
10438
- }, 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) => {
10439
10803
  g("update:modelValue", e, n);
10440
10804
  };
10441
10805
  return n({
@@ -10443,24 +10807,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10443
10807
  var e, n;
10444
10808
  (e = i.value) == null || (n = e.focus) == null || n.call(e);
10445
10809
  },
10446
- triggerSendMessage: S
10447
- }), (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", {
10448
10812
  class: "chat-input",
10449
- style: normalizeStyle({ maxHeight: p.value + "px" })
10813
+ style: normalizeStyle({ maxHeight: f.value + "px" })
10450
10814
  }, [
10451
10815
  renderSlot(n.$slots, "input-header", {}, () => [d.value ? (openBlock(), createBlock(cite_content_default, {
10452
10816
  key: 0,
10453
10817
  class: "chat-input-cite",
10454
10818
  content: d.value,
10455
- onClose: T
10819
+ onClose: w
10456
10820
  }, null, 8, ["content"])) : createCommentVNode("", !0)]),
10457
- 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", {
10458
10822
  key: 0,
10459
10823
  ref_key: "filesRef",
10460
10824
  ref: o,
10461
10825
  class: "chat-input-files"
10462
10826
  }, [createVNode(file_content_default, {
10463
- files: v.value,
10827
+ files: _.value,
10464
10828
  onDeleteFile: j
10465
10829
  }, null, 8, ["files"])], 512)) : createCommentVNode("", !0)]),
10466
10830
  createVNode(ai_slash_input_default, {
@@ -10470,8 +10834,8 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10470
10834
  placeholder: e.placeholder,
10471
10835
  prompts: e.prompts,
10472
10836
  resources: e.resources,
10473
- onKeydown: C,
10474
- "onUpdate:modelValue": N,
10837
+ onKeydown: S,
10838
+ "onUpdate:modelValue": M,
10475
10839
  onUpload: A
10476
10840
  }, null, 8, [
10477
10841
  "model-value",
@@ -10481,46 +10845,48 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10481
10845
  ]),
10482
10846
  createVNode(input_attachment_default, {
10483
10847
  "message-state": b.value,
10484
- onSendMessage: S,
10485
- onStopSending: w
10848
+ "tippy-options": e.tippyOptions,
10849
+ onSendMessage: x,
10850
+ onStopSending: C
10486
10851
  }, {
10487
10852
  default: withCtx(() => {
10488
10853
  var r;
10489
10854
  return [
10490
- x.value ? (openBlock(), createBlock(file_upload_btn_default, {
10855
+ e.supportUpload ? (openBlock(), createBlock(file_upload_btn_default, {
10491
10856
  key: 0,
10857
+ "tippy-options": e.tippyOptions,
10492
10858
  onUpload: A
10493
- })) : createCommentVNode("", !0),
10494
- 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),
10495
10861
  renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !y.value ? (openBlock(), createBlock(shortcut_btns_default, {
10496
10862
  key: 0,
10497
10863
  shortcuts: e.shortcuts,
10498
- onSelectShortcut: E
10864
+ onSelectShortcut: T
10499
10865
  }, null, 8, ["shortcuts"])) : createCommentVNode("", !0), y.value ? (openBlock(), createBlock(shortcut_btn_default, {
10500
10866
  key: 1,
10501
10867
  class: "selected-shortcut-btn",
10502
10868
  shortcut: y.value
10503
10869
  }, {
10504
- append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: k })]),
10870
+ append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: E })]),
10505
10871
  _: 1
10506
10872
  }, 8, ["shortcut"])) : createCommentVNode("", !0)])
10507
10873
  ];
10508
10874
  }),
10509
10875
  "send-icon": withCtx(() => [renderSlot(n.$slots, "send-icon")]),
10510
10876
  _: 3
10511
- }, 8, ["message-state"])
10877
+ }, 8, ["message-state", "tippy-options"])
10512
10878
  ], 4)]));
10513
10879
  }
10514
- }), _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({
10515
10881
  __name: "scroll-btn",
10516
10882
  props: {
10517
10883
  disabled: { type: Boolean },
10518
10884
  title: {}
10519
10885
  },
10520
10886
  setup(e) {
10521
- 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)])]));
10522
10888
  }
10523
- }), _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({
10524
10890
  __name: "delete-tool",
10525
10891
  props: {
10526
10892
  description: {},
@@ -10544,14 +10910,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10544
10910
  theme: "ai-chat-box-light light",
10545
10911
  trigger: "click",
10546
10912
  appendTo: () => document.body
10547
- }, r.tippyOptions || {})), p = () => {
10913
+ }, r.tippyOptions || {})), d = () => {
10548
10914
  if (r.disabled) return !1;
10549
10915
  }, m = () => {
10550
10916
  var e, n;
10551
10917
  (e = o.value) == null || (n = e.hide) == null || n.call(e);
10552
10918
  }, g = () => {
10553
10919
  m(), i("confirm");
10554
- }, v = () => {
10920
+ }, _ = () => {
10555
10921
  m(), i("cancel");
10556
10922
  };
10557
10923
  return onUnmounted(() => {
@@ -10559,11 +10925,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10559
10925
  }), (e, n) => (openBlock(), createBlock(unref(TippyComponent), mergeProps({
10560
10926
  ref_key: "tippyRef",
10561
10927
  ref: o
10562
- }, l.value, { onShow: p }), {
10563
- content: withCtx(() => [createElementVNode("div", _hoisted_1$14, [
10564
- 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),
10565
10931
  createElementVNode("div", _hoisted_3$9, toDisplayString(unref(t)("删除操作无法撤回,请谨慎操作!")), 1),
10566
- createElementVNode("div", _hoisted_4$8, [createVNode(unref(Button), {
10932
+ createElementVNode("div", _hoisted_4$9, [createVNode(unref(Button), {
10567
10933
  size: "small",
10568
10934
  theme: "danger",
10569
10935
  onClick: g
@@ -10572,7 +10938,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10572
10938
  _: 1
10573
10939
  }), createVNode(unref(Button), {
10574
10940
  size: "small",
10575
- onClick: v
10941
+ onClick: _
10576
10942
  }, {
10577
10943
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
10578
10944
  _: 1
@@ -10582,7 +10948,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10582
10948
  _: 1
10583
10949
  }, 16));
10584
10950
  }
10585
- }), _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({
10586
10952
  __name: "user-feedback",
10587
10953
  props: {
10588
10954
  loading: { type: Boolean },
@@ -10595,11 +10961,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10595
10961
  o.value.includes(e) ? o.value = o.value.filter((n) => n !== e) : o.value = [...o.value, e];
10596
10962
  }, c = () => {
10597
10963
  i("submit", o.value, a.value);
10598
- }, p = () => {
10964
+ }, d = () => {
10599
10965
  o.value = [], a.value = "", i("cancel");
10600
10966
  };
10601
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$13, [
10602
- 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),
10603
10969
  createElementVNode("div", _hoisted_3$8, [n.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
10604
10970
  key: e,
10605
10971
  class: "reason-item ai-skeleton-element"
@@ -10607,7 +10973,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10607
10973
  key: e,
10608
10974
  class: normalizeClass(["reason-item", { "is-active": o.value.includes(e) }]),
10609
10975
  onClick: (n) => s(e)
10610
- }, toDisplayString(e), 11, _hoisted_4$7))), 128))]),
10976
+ }, toDisplayString(e), 11, _hoisted_4$8))), 128))]),
10611
10977
  createElementVNode("div", _hoisted_5$5, [createVNode(unref(Input), {
10612
10978
  modelValue: a.value,
10613
10979
  "onUpdate:modelValue": i[0] || (i[0] = (e) => a.value = e),
@@ -10628,24 +10994,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10628
10994
  class: "custom-btn",
10629
10995
  size: "small",
10630
10996
  width: "80px",
10631
- onClick: p
10997
+ onClick: d
10632
10998
  }, {
10633
10999
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
10634
11000
  _: 1
10635
11001
  })])
10636
11002
  ]));
10637
11003
  }
10638
- }), _hoisted_1$12 = {
11004
+ }), _hoisted_1$14 = {
10639
11005
  ref: "messageToolsRef",
10640
11006
  class: "message-tools-container"
10641
- }, _hoisted_2$9 = {
11007
+ }, _hoisted_2$10 = {
10642
11008
  class: "message-tools",
10643
11009
  style: { "margin-right": "8px" }
10644
11010
  }, _hoisted_3$7 = {
10645
11011
  key: 0,
10646
11012
  class: "ai-divider",
10647
11013
  style: { "margin-right": "8px" }
10648
- }, _hoisted_4$6 = { class: "message-tools" }, message_tools_default = /* @__PURE__ */ defineComponent({
11014
+ }, _hoisted_4$7 = { class: "message-tools" }, message_tools_default = /* @__PURE__ */ defineComponent({
10649
11015
  __name: "message-tools",
10650
11016
  props: {
10651
11017
  messageTools: { default: () => CONST_MESSAGE_TOOLS },
@@ -10656,7 +11022,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10656
11022
  },
10657
11023
  emits: ["feedback"],
10658
11024
  setup(n, { emit: r }) {
10659
- 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({
10660
11026
  arrow: !1,
10661
11027
  interactive: !0,
10662
11028
  offset: [0, 6],
@@ -10669,9 +11035,9 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10669
11035
  if (e.id === "like" || e.id === "unlike") {
10670
11036
  try {
10671
11037
  var r;
10672
- 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)) || [];
10673
11039
  } finally {
10674
- p.value = !1;
11040
+ f.value = !1;
10675
11041
  }
10676
11042
  return;
10677
11043
  }
@@ -10695,19 +11061,19 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10695
11061
  return e == null || (n = e.hide) == null ? void 0 : n.call(e);
10696
11062
  });
10697
11063
  }, x = (e) => g.value ? g.value === "like" && e === "like" ? "activeLike" : g.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, S = (e) => {
10698
- var n, r;
10699
- let a = x(e);
10700
- 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) || "";
10701
11067
  }, C = (e, n, r) => {
10702
11068
  b(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
10703
- }, T = (e) => {
11069
+ }, w = (e) => {
10704
11070
  if (i.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
10705
11071
  if (g.value && g.value === e) return g.value = null, !1;
10706
11072
  };
10707
11073
  return onUnmounted(() => {
10708
11074
  b(), m.value = [];
10709
- }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [
10710
- 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({
10711
11077
  key: 0,
10712
11078
  ref_for: !0
10713
11079
  }, r, {
@@ -10731,14 +11097,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10731
11097
  "onClick"
10732
11098
  ]))], 64))), 128))]),
10733
11099
  n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7)) : createCommentVNode("", !0),
10734
- 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({
10735
11101
  key: 0,
10736
11102
  ref_for: !0,
10737
11103
  ref_key: "feedbackTippyRef",
10738
11104
  ref: d
10739
- }, { ref_for: !0 }, _.value, { onShow: (e) => T(r.id) }), {
11105
+ }, { ref_for: !0 }, _.value, { onShow: (e) => w(r.id) }), {
10740
11106
  content: withCtx(() => [createVNode(user_feedback_default, {
10741
- loading: p.value,
11107
+ loading: f.value,
10742
11108
  "reason-list": m.value,
10743
11109
  title: r.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
10744
11110
  onCancel: b,
@@ -10788,10 +11154,10 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10788
11154
  ]))], 64))), 128))])
10789
11155
  ], 512));
10790
11156
  }
10791
- }), _hoisted_1$11 = { class: "ai-loading-ring" }, _hoisted_2$8 = {
11157
+ }), _hoisted_1$13 = { class: "ai-loading-ring" }, _hoisted_2$9 = {
10792
11158
  fill: "none",
10793
11159
  viewBox: "0 0 26 26"
10794
- }, _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 = {
10795
11161
  fill: "none",
10796
11162
  viewBox: "0 0 26 26"
10797
11163
  }, _hoisted_6 = ["fill"], ai_loading_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AiLoading" }), {}, {
@@ -10811,7 +11177,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10811
11177
  width: e.size + "px",
10812
11178
  height: e.size + "px"
10813
11179
  })
10814
- }, [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", {
10815
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",
10816
11182
  fill: `url(#${i})`
10817
11183
  }, null, 8, _hoisted_3$6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
@@ -10831,7 +11197,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10831
11197
  offset: "1",
10832
11198
  "stop-color": "#EB8CEC"
10833
11199
  }, null, -1)
10834
- ])])])]))]), 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", {
10835
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",
10836
11202
  fill: `url(#${a})`
10837
11203
  }, null, 8, _hoisted_6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
@@ -10853,7 +11219,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10853
11219
  }, null, -1)
10854
11220
  ])])])]))])], 6));
10855
11221
  }
10856
- })), _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 = {
10857
11223
  key: 0,
10858
11224
  class: "knowledge-rag-content"
10859
11225
  }, activity_message_default = /* @__PURE__ */ defineComponent({
@@ -10880,21 +11246,21 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10880
11246
  return isEn ? `Reference ${a} documents as reference` : `引用 ${a} 篇资料作为参考`;
10881
11247
  }), o = useModel(e, "collapsed");
10882
11248
  return (n, a) => {
10883
- var d, p;
10884
- return openBlock(), createElementBlock("div", _hoisted_1$10, [createElementVNode("div", {
11249
+ var d, f;
11250
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [createElementVNode("div", {
10885
11251
  class: "ai-activity-message-title",
10886
11252
  onClick: a[0] || (a[0] = (e) => o.value = !o.value)
10887
11253
  }, [
10888
- 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), {
10889
11255
  key: 1,
10890
11256
  style: { "font-size": "12px" }
10891
11257
  }))]),
10892
11258
  createElementVNode("span", _hoisted_3$5, toDisplayString(i.value), 1),
10893
11259
  createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10894
- ]), 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]])]);
10895
11261
  };
10896
11262
  }
10897
- }), _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({
10898
11264
  __name: "desc-panel",
10899
11265
  props: {
10900
11266
  desc: {},
@@ -10908,15 +11274,15 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10908
11274
  return r.desc;
10909
11275
  }
10910
11276
  });
10911
- 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", {
10912
11278
  key: n,
10913
11279
  class: "desc-panel-item"
10914
- }, [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), {
10915
11281
  text: typeof e == "object" && e ? JSON.stringify(e) : e,
10916
11282
  appendTo: "parent"
10917
11283
  }]])]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(i.value), 1)], 64))])]));
10918
11284
  }
10919
- }), _hoisted_1$8 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
11285
+ }), _hoisted_1$10 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
10920
11286
  __name: "tool-message",
10921
11287
  props: {
10922
11288
  duration: {},
@@ -10931,12 +11297,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10931
11297
  property: {}
10932
11298
  },
10933
11299
  setup(e) {
10934
- 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, {
10935
11301
  desc: e.content || e.error,
10936
11302
  title: unref(t)("返回内容")
10937
11303
  }, null, 8, ["desc", "title"])]));
10938
11304
  }
10939
- }), _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 = {
10940
11306
  key: 1,
10941
11307
  class: "toolcall-duration"
10942
11308
  }, _hoisted_5$1 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
@@ -10960,20 +11326,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10960
11326
  case MessageStatus.Success: return t("调用成功");
10961
11327
  case MessageStatus.Error || ((e = n.toolCall) == null || (e = e.toolMessage) == null ? void 0 : e.error): return t("调用失败");
10962
11328
  }
10963
- }), p = computed(() => {
11329
+ }), d = computed(() => {
10964
11330
  var e;
10965
11331
  let r = n.duration || ((e = n.toolCall) == null || (e = e.toolMessage) == null ? void 0 : e.duration);
10966
11332
  return r ? formatDuration(r) : "";
10967
11333
  });
10968
11334
  return (n, a) => {
10969
11335
  var m, g, _, v;
10970
- 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}`]) }, [
10971
11337
  createVNode(unref(ArrowRightIcon), {
10972
11338
  class: normalizeClass({ "is-collapsed": r.value }),
10973
11339
  onClick: a[0] || (a[0] = (e) => r.value = !r.value)
10974
11340
  }, null, 8, ["class"]),
10975
11341
  createTextVNode(" " + toDisplayString((m = e.toolCall) != null && m.function.mcpName ? unref(t)("调用 MCP:") : unref(t)("调用工具:")) + " ", 1),
10976
- 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), {
10977
11343
  text: i.value,
10978
11344
  appendTo: "parent"
10979
11345
  }]]),
@@ -10985,7 +11351,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
10985
11351
  theme: "primary"
10986
11352
  })) : createCommentVNode("", !0),
10987
11353
  createTextVNode(" " + toDisplayString(o.value) + " ", 1),
10988
- 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)
10989
11355
  ])
10990
11356
  ], 2), withDirectives(createElementVNode("div", _hoisted_5$1, [
10991
11357
  createVNode(desc_panel_default, {
@@ -11000,7 +11366,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11000
11366
  ], 512), [[vShow, !r.value]])]);
11001
11367
  };
11002
11368
  }
11003
- }), _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({
11004
11370
  __name: "assistant-message",
11005
11371
  props: {
11006
11372
  toolCalls: {},
@@ -11013,7 +11379,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11013
11379
  property: {}
11014
11380
  },
11015
11381
  setup(n) {
11016
- 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, {
11017
11383
  content: n.content || "",
11018
11384
  status: n.status,
11019
11385
  type: unref(MessageContentType).Text
@@ -11027,7 +11393,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11027
11393
  "tool-call": e
11028
11394
  }, null, 8, ["status", "tool-call"]))), 128)) : createCommentVNode("", !0)]));
11029
11395
  }
11030
- }), _hoisted_1$5 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
11396
+ }), _hoisted_1$7 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
11031
11397
  __name: "info-message",
11032
11398
  props: {
11033
11399
  content: {},
@@ -11039,24 +11405,24 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11039
11405
  property: {}
11040
11406
  },
11041
11407
  setup(n) {
11042
- 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", {
11043
11409
  key: n,
11044
11410
  class: "info-message-content"
11045
11411
  }, toDisplayString(e), 1))), 128))]));
11046
11412
  }
11047
- }), _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) => {
11048
11414
  let r = e.__vccOpts || e;
11049
11415
  for (let [e, i] of n) r[e] = i;
11050
11416
  return r;
11051
11417
  })(/* @__PURE__ */ defineComponent({
11052
11418
  __name: "loading-message",
11053
11419
  setup(e) {
11054
- 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)]));
11055
11421
  }
11056
- }), [["__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 = {
11057
11423
  key: 0,
11058
11424
  class: "ai-reasoning-message-title-icon"
11059
- }, _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({
11060
11426
  __name: "reasoning-message",
11061
11427
  props: /* @__PURE__ */ mergeModels({
11062
11428
  duration: {},
@@ -11091,7 +11457,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11091
11457
  });
11092
11458
  return (r, a) => {
11093
11459
  var o;
11094
- return openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", {
11460
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", {
11095
11461
  class: normalizeClass(["ai-reasoning-message-title", {
11096
11462
  "ai-reasoning-message-title-collapsed": i.value,
11097
11463
  "is-thinking": n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming,
@@ -11100,10 +11466,10 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11100
11466
  }]),
11101
11467
  onClick: a[0] || (a[0] = (e) => i.value = !i.value)
11102
11468
  }, [
11103
- 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),
11104
11470
  createElementVNode("span", _hoisted_3$2, toDisplayString(d.value), 1),
11105
11471
  createElementVNode("span", { class: normalizeClass(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": i.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
11106
- ], 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, {
11107
11473
  key: 0,
11108
11474
  content: ((o = n.content) == null ? void 0 : o.join("\n")) || ""
11109
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, {
@@ -11112,29 +11478,32 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11112
11478
  }, null, 8, ["content"]))), 128))], 512), [[vShow, !i.value]])]);
11113
11479
  };
11114
11480
  }
11115
- }), _hoisted_1$2 = { class: "ai-key-value-content" }, _hoisted_2$2 = {
11481
+ }), _hoisted_1$4 = { class: "ai-key-value-content" }, _hoisted_2$3 = {
11116
11482
  key: 0,
11117
11483
  class: "ai-key-value-title"
11118
- }, _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({
11119
11485
  __name: "key-value-content",
11120
11486
  props: {
11121
11487
  content: {},
11122
11488
  title: {}
11123
11489
  },
11124
11490
  setup(n) {
11125
- 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", {
11126
11492
  key: e.key,
11127
11493
  class: "key-value-item"
11128
11494
  }, [
11129
- createElementVNode("div", _hoisted_4, toDisplayString(e.key), 1),
11495
+ createElementVNode("div", _hoisted_4$1, toDisplayString(e.key), 1),
11130
11496
  i[0] || (i[0] = createTextVNode(" : ", -1)),
11131
11497
  createElementVNode("div", _hoisted_5, toDisplayString(e.value), 1)
11132
11498
  ]))), 128))])]));
11133
11499
  }
11134
- }), _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 = {
11135
11504
  key: 1,
11136
11505
  class: "ai-user-message-content"
11137
- }, _hoisted_3 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
11506
+ }, _hoisted_4 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
11138
11507
  __name: "user-message",
11139
11508
  props: {
11140
11509
  content: {},
@@ -11151,7 +11520,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11151
11520
  onShortcutConfirm: { type: Function }
11152
11521
  },
11153
11522
  setup(n) {
11154
- 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(() => {
11155
11524
  var e;
11156
11525
  let n = (e = r.property) == null || (e = e.extra) == null ? void 0 : e.cite;
11157
11526
  if (!(!n || typeof n == "string")) return n.title;
@@ -11184,31 +11553,34 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11184
11553
  };
11185
11554
  }
11186
11555
  return null;
11187
- }), 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(() => {
11188
11560
  var e;
11189
11561
  return Array.isArray(r.content) ? (e = r.content) == null ? void 0 : e.filter((e) => e.type === MessageContentType.Binary) : [];
11190
- }), b = computed(() => {
11562
+ }), x = computed(() => b.value.filter((e) => y(e))), S = computed(() => b.value.filter((e) => !y(e))), C = computed(() => {
11191
11563
  var e;
11192
11564
  return r.content ? typeof r.content == "string" ? r.content : (e = r.content) == null ? void 0 : e.filter((e) => {
11193
11565
  var n;
11194
11566
  return e.type === MessageContentType.Text && !!((n = e.text) != null && n.trim());
11195
11567
  }) : "";
11196
- }), x = function() {
11568
+ }), w = function() {
11197
11569
  var e = _asyncToGenerator(function* (e) {
11198
11570
  var n;
11199
11571
  if (e.id === "edit") {
11200
- 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)) {
11201
- let e = b.value.at(0);
11202
- 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;
11203
11575
  }
11204
- y.value.length && (o.value = !0);
11576
+ b.value.length && (o.value = !0);
11205
11577
  } else e.id === "copy" && i(typeof r.content == "string" ? r.content : JSON.stringify(r.content || ""));
11206
11578
  yield (n = r.onAction) == null ? void 0 : n.call(r, e);
11207
11579
  });
11208
11580
  return function(n) {
11209
11581
  return e.apply(this, arguments);
11210
11582
  };
11211
- }(), S = function() {
11583
+ }(), E = function() {
11212
11584
  var e = _asyncToGenerator(function* () {
11213
11585
  var e, n;
11214
11586
  yield (e = m.value) == null || (n = e.triggerSendMessage) == null ? void 0 : n.call(e), o.value = !1;
@@ -11216,11 +11588,11 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11216
11588
  return function() {
11217
11589
  return e.apply(this, arguments);
11218
11590
  };
11219
- }(), C = () => {
11591
+ }(), D = () => {
11220
11592
  o.value = !1;
11221
- }, T = () => {
11593
+ }, O = () => {
11222
11594
  o.value = !1;
11223
- }, E = function() {
11595
+ }, k = function() {
11224
11596
  var e = _asyncToGenerator(function* (e) {
11225
11597
  var n;
11226
11598
  (n = r.onShortcutConfirm) == null || n.call(r, e), o.value = !1;
@@ -11228,7 +11600,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11228
11600
  return function(n) {
11229
11601
  return e.apply(this, arguments);
11230
11602
  };
11231
- }(), D = function() {
11603
+ }(), A = function() {
11232
11604
  var e = _asyncToGenerator(function* (e, n) {
11233
11605
  var i;
11234
11606
  (i = r.onInputConfirm) == null || i.call(r, e, n), o.value = !1;
@@ -11237,41 +11609,44 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11237
11609
  return e.apply(this, arguments);
11238
11610
  };
11239
11611
  }();
11240
- 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, {
11241
11613
  key: 0,
11242
11614
  class: "ai-user-message-cite",
11243
11615
  content: _.value
11244
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, {
11245
11617
  class: "user-shortcut-render",
11246
- onClose: T,
11247
- onSubmit: E
11618
+ onClose: O,
11619
+ onSubmit: k
11248
11620
  }), null, 16)) : (openBlock(), createBlock(chat_input_default, {
11249
11621
  key: 1,
11250
11622
  ref_key: "chatInputRef",
11251
11623
  ref: m,
11252
- modelValue: p.value,
11253
- "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),
11254
11626
  class: "user-edit-input",
11255
- "default-upload-files": y.value,
11256
- "on-send-message": D
11627
+ "default-upload-files": b.value,
11628
+ "on-send-message": A
11257
11629
  }, {
11258
- "send-icon": withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(Button), {
11630
+ "send-icon": withCtx(() => [createElementVNode("div", _hoisted_4, [createVNode(unref(Button), {
11259
11631
  size: "small",
11260
- onClick: C
11632
+ onClick: D
11261
11633
  }, {
11262
11634
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
11263
11635
  _: 1
11264
11636
  }), createVNode(unref(Button), {
11265
11637
  size: "small",
11266
11638
  theme: "primary",
11267
- onClick: S
11639
+ onClick: E
11268
11640
  }, {
11269
11641
  default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("发送")), 1)]),
11270
11642
  _: 1
11271
11643
  })])]),
11272
11644
  _: 1
11273
11645
  }, 8, ["modelValue", "default-upload-files"]))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
11274
- 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) => {
11275
11650
  var r;
11276
11651
  return openBlock(), createElementBlock("div", {
11277
11652
  key: (r = e.url) == null ? n : r,
@@ -11280,12 +11655,12 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11280
11655
  files: [e],
11281
11656
  readonly: !0
11282
11657
  }, null, 8, ["files"])]);
11283
- }), 128)) : createCommentVNode("", !0),
11284
- (_.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, {
11285
11660
  key: 0,
11286
11661
  content: _.value,
11287
11662
  title: g.value
11288
- }, 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, {
11289
11664
  key: 0,
11290
11665
  content: n
11291
11666
  }, null, 8, ["content"])) : n.type === unref(MessageContentType).Text ? (openBlock(), createBlock(markdown_content_default, {
@@ -11297,7 +11672,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11297
11672
  class: "ai-user-message-tools",
11298
11673
  "message-tools": unref(CONST_USER_MESSAGE_TOOLS),
11299
11674
  "message-tools-status": n.messageToolsStatus,
11300
- "on-action": x,
11675
+ "on-action": w,
11301
11676
  "tippy-options": n.tippyOptions,
11302
11677
  "update-tools": []
11303
11678
  }, null, 8, [
@@ -11341,7 +11716,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11341
11716
  });
11342
11717
  return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
11343
11718
  }
11344
- }), _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({
11345
11720
  __name: "message-container",
11346
11721
  props: /* @__PURE__ */ mergeModels({
11347
11722
  enableSelection: {
@@ -11363,18 +11738,26 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11363
11738
  }),
11364
11739
  emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
11365
11740
  setup(n) {
11366
- 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();
11367
11742
  watchEffect(() => {
11368
11743
  var e;
11369
11744
  let n = [], i = [];
11370
11745
  for (let e of r.messages) {
11371
11746
  if (e.role === MessageRole.User) {
11372
- n.length > 0 && (i.push({
11373
- messages: n,
11374
- type: MessageRole.Assistant,
11375
- isHover: !1,
11376
- checked: !1
11377
- }), 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({
11378
11761
  messages: [e],
11379
11762
  type: MessageRole.User,
11380
11763
  isHover: !1,
@@ -11395,12 +11778,20 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11395
11778
  }
11396
11779
  n.push(e);
11397
11780
  }
11398
- n.length > 0 && i.push({
11399
- messages: n,
11400
- type: MessageRole.Assistant,
11401
- isHover: !1,
11402
- checked: !1
11403
- }), ((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({
11404
11795
  messages: [{
11405
11796
  role: MessageRole.Loading,
11406
11797
  content: "",
@@ -11511,7 +11902,7 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11511
11902
  "on-input-confirm",
11512
11903
  "on-shortcut-confirm",
11513
11904
  "tippy-options"
11514
- ]))])), 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, {
11515
11906
  key: 0,
11516
11907
  "message-tools-status": n.messageToolsStatus,
11517
11908
  "on-action": (e) => _(e, a.messages),
@@ -11525,14 +11916,14 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11525
11916
  "on-action",
11526
11917
  "tippy-options",
11527
11918
  "onFeedback"
11528
- ])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1))), 128)),
11919
+ ])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1$2))), 128)),
11529
11920
  createElementVNode("div", {
11530
11921
  ref_key: "messageContainerBottomRef",
11531
11922
  ref: o,
11532
11923
  class: "message-container-bottom",
11533
11924
  tabindex: "0"
11534
11925
  }, null, 512),
11535
- createElementVNode("div", _hoisted_2, [withDirectives(createVNode(scroll_btn_default, {
11926
+ createElementVNode("div", _hoisted_2$1, [withDirectives(createVNode(scroll_btn_default, {
11536
11927
  title: unref(t)("停止生成"),
11537
11928
  onClick: g[0] || (g[0] = (e) => i.$emit("stopStreaming"))
11538
11929
  }, {
@@ -11540,12 +11931,186 @@ var _hoisted_1$18 = { class: "ai-slash-input-wrapper" }, _hoisted_2$13 = ["aria-
11540
11931
  _: 1
11541
11932
  }, 8, ["title"]), [[vShow, n.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
11542
11933
  title: unref(t)("返回底部"),
11543
- onClick: unref(p)
11934
+ onClick: unref(f)
11544
11935
  }, {
11545
11936
  icon: withCtx(() => [createVNode(unref(ArrowDownIcon))]),
11546
11937
  _: 1
11547
11938
  }, 8, ["title", "onClick"]), [[vShow, unref(m)]])])
11548
11939
  ], 512));
11549
11940
  }
11550
- });
11551
- 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 };