@blueking/chat-x 0.0.1-beta.9 → 0.0.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
@@ -303,7 +303,11 @@ const getCookieByName = (e) => {
303
303
  检索中: "Searching",
304
304
  检索完成: "Search Completed",
305
305
  上传文件: "Upload File",
306
- "请求中...": "Requesting..."
306
+ "请求中...": "Requesting...",
307
+ 取消满意: "Cancel satisfied",
308
+ 取消不满意: "Cancel dissatisfied",
309
+ "确认删除该回答?": "Confirm delete this answer?",
310
+ "删除操作无法撤回,请谨慎操作!": "This operation cannot be undone. Please proceed with caution!"
307
311
  }, 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 = [
308
312
  {
309
313
  description: t("复制"),
@@ -1409,12 +1413,12 @@ function preventOverflow$1(e) {
1409
1413
  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) : {
1410
1414
  width: 0,
1411
1415
  height: 0
1412
- }, 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, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent$1(n.elements.arrow), Xv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Zv = F + q - X - Xv, Qv = F + J - X, $v = within$1(m ? min$2(I, Zv) : I, F, m ? max$1(L, Qv) : L);
1413
- w[S] = $v, A[S] = $v - F;
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);
1417
+ w[S] = X, A[S] = X - F;
1414
1418
  }
1415
1419
  if (c) {
1416
- var ey, ty = S === "x" ? top$1 : left$1, ny = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[ty], ry = Z - v[ny], iy = [top$1, left$1].indexOf(y) !== -1, ay = (ey = k == null ? void 0 : k[C]) == null ? 0 : ey, oy = iy ? $ : Z - T[Q] - E[Q] - ay + O.altAxis, sy = iy ? Z + T[Q] + E[Q] - ay - O.altAxis : ry, cy = m && iy ? withinMaxClamp$1(oy, Z, sy) : within$1(m ? oy : $, Z, m ? sy : ry);
1417
- w[C] = cy, A[C] = cy - Z;
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;
1418
1422
  }
1419
1423
  n.modifiersData[i] = A;
1420
1424
  }
@@ -1877,7 +1881,7 @@ function render$1(e) {
1877
1881
  render$1.$$tippy = !0;
1878
1882
  var idCounter$1 = 1, mouseMoveListeners$1 = [], mountedInstances$1 = [];
1879
1883
  function createTippy$1(e, n) {
1880
- var r = evaluateProps$1(e, Object.assign({}, defaultProps$1, getExtendedPassedProps$1(removeUndefinedProps$1(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce$1$1(X, r.interactiveDebounce), _, v = idCounter$1++, y = null, b = unique$1(r.plugins), x = {
1884
+ var r = evaluateProps$1(e, Object.assign({}, defaultProps$1, getExtendedPassedProps$1(removeUndefinedProps$1(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce$1$1(Y, r.interactiveDebounce), _, v = idCounter$1++, y = null, b = unique$1(r.plugins), x = {
1881
1885
  id: v,
1882
1886
  reference: e,
1883
1887
  popper: div$1(),
@@ -1891,16 +1895,16 @@ function createTippy$1(e, n) {
1891
1895
  isShown: !1
1892
1896
  },
1893
1897
  plugins: b,
1894
- clearDelayTimeouts: ay,
1895
- setProps: oy,
1896
- setContent: sy,
1897
- show: cy,
1898
- hide: ly,
1899
- hideWithInteractivity: uy,
1900
- enable: ry,
1901
- disable: iy,
1902
- unmount: dy,
1903
- destroy: fy
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
1904
1908
  };
1905
1909
  /* istanbul ignore if */
1906
1910
  if (!r.render) return x;
@@ -1909,7 +1913,7 @@ function createTippy$1(e, n) {
1909
1913
  var T = b.map(function(e) {
1910
1914
  return e.fn(x);
1911
1915
  }), E = e.hasAttribute("aria-expanded");
1912
- return J(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
1916
+ return ty(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
1913
1917
  x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
1914
1918
  }), C.addEventListener("mouseleave", function() {
1915
1919
  x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
@@ -2028,37 +2032,37 @@ function createTippy$1(e, n) {
2028
2032
  });
2029
2033
  });
2030
2034
  }
2031
- function J() {
2032
- O() && (q("touchstart", Xv, { passive: !0 }), q("touchend", Zv, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
2033
- if (e !== "manual") switch (q(e, Xv), e) {
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) {
2034
2038
  case "mouseenter":
2035
- q("mouseleave", Zv);
2039
+ q("mouseleave", ry);
2036
2040
  break;
2037
2041
  case "focus":
2038
- q(isIE11$1 ? "focusout" : "blur", Qv);
2042
+ q(isIE11$1 ? "focusout" : "blur", iy);
2039
2043
  break;
2040
2044
  case "focusin":
2041
- q("focusout", Qv);
2045
+ q("focusout", iy);
2042
2046
  break;
2043
2047
  }
2044
2048
  });
2045
2049
  }
2046
- function Y() {
2050
+ function J() {
2047
2051
  m.forEach(function(e) {
2048
2052
  var n = e.node, r = e.eventType, i = e.handler, a = e.options;
2049
2053
  n.removeEventListener(r, i, a);
2050
2054
  }), m = [];
2051
2055
  }
2052
- function Xv(e) {
2056
+ function ny(e) {
2053
2057
  var n, r = !1;
2054
- if (!(!x.state.isEnabled || $v(e) || c)) {
2058
+ if (!(!x.state.isEnabled || X(e) || c)) {
2055
2059
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
2056
2060
  d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent$1(e) && mouseMoveListeners$1.forEach(function(n) {
2057
2061
  return n(e);
2058
2062
  }), e.type === "click" && (x.props.trigger.indexOf("mouseenter") < 0 || s) && x.props.hideOnClick !== !1 && x.state.isVisible ? r = !0 : Q(e), e.type === "click" && (s = !r), r && !i && $(e);
2059
2063
  }
2060
2064
  }
2061
- function X(e) {
2065
+ function Y(e) {
2062
2066
  var n = e.target, i = A().contains(n) || C.contains(n);
2063
2067
  e.type === "mousemove" && i || isCursorOutsideInteractiveBorder$1(Z().concat(C).map(function(e) {
2064
2068
  var n, i = (n = e._tippy.popperInstance) == null ? void 0 : n.state;
@@ -2069,8 +2073,8 @@ function createTippy$1(e, n) {
2069
2073
  } : null;
2070
2074
  }).filter(Boolean), e) && (R(), $(e));
2071
2075
  }
2072
- function Zv(e) {
2073
- if (!($v(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
2076
+ function ry(e) {
2077
+ if (!(X(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
2074
2078
  if (x.props.interactive) {
2075
2079
  x.hideWithInteractivity(e);
2076
2080
  return;
@@ -2078,14 +2082,14 @@ function createTippy$1(e, n) {
2078
2082
  $(e);
2079
2083
  }
2080
2084
  }
2081
- function Qv(e) {
2085
+ function iy(e) {
2082
2086
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
2083
2087
  }
2084
- function $v(e) {
2088
+ function X(e) {
2085
2089
  return currentInput$1.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
2086
2090
  }
2087
- function ey() {
2088
- ty();
2091
+ function ay() {
2092
+ oy();
2089
2093
  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 ? {
2090
2094
  getBoundingClientRect: o,
2091
2095
  contextElement: o.contextElement || A()
@@ -2143,12 +2147,12 @@ function createTippy$1(e, n) {
2143
2147
  modifiers: u
2144
2148
  }));
2145
2149
  }
2146
- function ty() {
2150
+ function oy() {
2147
2151
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
2148
2152
  }
2149
- function ny() {
2153
+ function sy() {
2150
2154
  var e = x.props.appendTo, n, r = A();
2151
- 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, ey();
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();
2152
2156
  }
2153
2157
  function Z() {
2154
2158
  return arrayFrom$1(C.querySelectorAll("[data-tippy-root]"));
@@ -2174,30 +2178,30 @@ function createTippy$1(e, n) {
2174
2178
  });
2175
2179
  }
2176
2180
  }
2177
- function ry() {
2181
+ function cy() {
2178
2182
  x.state.isEnabled = !0;
2179
2183
  }
2180
- function iy() {
2184
+ function ly() {
2181
2185
  x.hide(), x.state.isEnabled = !1;
2182
2186
  }
2183
- function ay() {
2187
+ function uy() {
2184
2188
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
2185
2189
  }
2186
- function oy(n) {
2190
+ function dy(n) {
2187
2191
  if (!x.state.isDestroyed) {
2188
- F("onBeforeUpdate", [x, n]), Y();
2192
+ F("onBeforeUpdate", [x, n]), J();
2189
2193
  var r = x.props, i = evaluateProps$1(e, Object.assign({}, r, removeUndefinedProps$1(n), { ignoreAttributes: !0 }));
2190
- x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce$1$1(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray$1(r.triggerTarget).forEach(function(e) {
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) {
2191
2195
  e.removeAttribute("aria-expanded");
2192
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ey(), Z().forEach(function(e) {
2196
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ay(), Z().forEach(function(e) {
2193
2197
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
2194
2198
  })), F("onAfterUpdate", [x, n]);
2195
2199
  }
2196
2200
  }
2197
- function sy(e) {
2201
+ function fy(e) {
2198
2202
  x.setProps({ content: e });
2199
2203
  }
2200
- function cy() {
2204
+ function py() {
2201
2205
  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);
2202
2206
  if (!(e || n || r || i) && !A().hasAttribute("disabled") && (F("onShow", [x], !1), x.props.onShow(x) !== !1)) {
2203
2207
  if (x.state.isVisible = !0, k() && (C.style.visibility = "visible"), P(), H(), x.state.isMounted || (C.style.transition = "none"), k()) {
@@ -2215,10 +2219,10 @@ function createTippy$1(e, n) {
2215
2219
  x.state.isShown = !0, F("onShown", [x]);
2216
2220
  });
2217
2221
  }
2218
- }, ny();
2222
+ }, sy();
2219
2223
  }
2220
2224
  }
2221
- function ly() {
2225
+ function my() {
2222
2226
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn$1(x.props.duration, 1, defaultProps$1.duration);
2223
2227
  if (!(e || n || r) && (F("onHide", [x], !1), x.props.onHide(x) !== !1)) {
2224
2228
  if (x.state.isVisible = !1, x.state.isShown = !1, u = !1, s = !1, k() && (C.style.visibility = "hidden"), R(), U(), P(!0), k()) {
@@ -2228,18 +2232,18 @@ function createTippy$1(e, n) {
2228
2232
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
2229
2233
  }
2230
2234
  }
2231
- function uy(e) {
2235
+ function hy(e) {
2232
2236
  j().addEventListener("mousemove", g), pushIfUnique$1(mouseMoveListeners$1, g), g(e);
2233
2237
  }
2234
- function dy() {
2235
- x.state.isVisible && x.hide(), x.state.isMounted && (ty(), Z().forEach(function(e) {
2238
+ function gy() {
2239
+ x.state.isVisible && x.hide(), x.state.isMounted && (oy(), Z().forEach(function(e) {
2236
2240
  e._tippy.unmount();
2237
2241
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances$1 = mountedInstances$1.filter(function(e) {
2238
2242
  return e !== x;
2239
2243
  }), x.state.isMounted = !1, F("onHidden", [x]));
2240
2244
  }
2241
- function fy() {
2242
- x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
2245
+ function _y() {
2246
+ x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), J(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
2243
2247
  }
2244
2248
  }
2245
2249
  function tippy$1(e, n) {
@@ -2957,7 +2961,7 @@ setDefaultProps$1$1({
2957
2961
  animateFill
2958
2962
  ]
2959
2963
  });
2960
- var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
2964
+ var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
2961
2965
  __name: "shortcut-btn",
2962
2966
  props: {
2963
2967
  mode: {},
@@ -2976,21 +2980,21 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
2976
2980
  class: normalizeClass(["ai-shortcut-btn", { "is-menu-mode": n.mode === "menu" }]),
2977
2981
  onClick: i[0] || (i[0] = (e) => o(n.shortcut))
2978
2982
  }, [renderSlot(r.$slots, "default", {}, () => {
2979
- var r, i, a, o, f, p;
2983
+ var r, i, a, o, f, p, m;
2980
2984
  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", {
2981
2985
  key: 0,
2982
2986
  class: "ai-common-icon ai-shortcut-btn-icon",
2983
2987
  src: n.shortcut.icon
2984
- }, null, 8, _hoisted_1$33)) : 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), {
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), {
2985
2989
  key: 1,
2986
2990
  class: "ai-shortcut-btn-icon"
2987
2991
  }))], 64)) : n.shortcut && !((f = n.shortcut.components) != null && f.length) ? (openBlock(), createBlock(unref(AgentIcon), {
2988
2992
  key: 1,
2989
2993
  class: "ai-shortcut-btn-icon"
2990
- })) : createCommentVNode("", !0), createTextVNode(" " + toDisplayString((p = n.shortcut) == null ? void 0 : p.name), 1)];
2994
+ })) : createCommentVNode("", !0), createTextVNode(" " + toDisplayString(((p = n.shortcut) == null ? void 0 : p.alias) || ((m = n.shortcut) == null ? void 0 : m.name)), 1)];
2991
2995
  }), renderSlot(r.$slots, "append")], 2));
2992
2996
  }
2993
- }), _hoisted_1$32 = { class: "ai-selection-popover-content" }, _hoisted_2$21 = {
2997
+ }), _hoisted_1$33 = { class: "ai-selection-popover-content" }, _hoisted_2$22 = {
2994
2998
  key: 0,
2995
2999
  class: "shortcut-menu"
2996
3000
  }, ai_selection_default = /* @__PURE__ */ defineComponent({
@@ -2998,14 +3002,15 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
2998
3002
  props: /* @__PURE__ */ mergeModels({
2999
3003
  maxShortcutCount: { default: 3 },
3000
3004
  offset: { default: 10 },
3001
- shortcuts: { default: () => DEFAULT_SHORTCUTS }
3005
+ shortcuts: { default: () => DEFAULT_SHORTCUTS },
3006
+ excludeSelectors: { default: () => [] }
3002
3007
  }, {
3003
3008
  visible: _objectSpread2({ type: Boolean }, { required: !0 }),
3004
3009
  visibleModifiers: {}
3005
3010
  }),
3006
3011
  emits: /* @__PURE__ */ mergeModels(["selectShortcut", "selectionChange"], ["update:visible"]),
3007
3012
  setup(r, { emit: a }) {
3008
- useCssVars((e) => ({ f9eb3404: unref(SELECTION_Z_INDEX) }));
3013
+ useCssVars((e) => ({ e53ba118: unref(SELECTION_Z_INDEX) }));
3009
3014
  let o = r, d = useModel(r, "visible"), p = a, m = useTemplateRef("popoverRef"), g = useTemplateRef("moreMenuRef"), _ = shallowRef({
3010
3015
  x: 0,
3011
3016
  y: 0
@@ -3036,7 +3041,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3036
3041
  }
3037
3042
  }, S = function() {
3038
3043
  var e = _asyncToGenerator(function* () {
3039
- var e;
3044
+ var e, n;
3040
3045
  if (y.value = window.getSelection(), !y.value) {
3041
3046
  let e = document.activeElement;
3042
3047
  if (e) {
@@ -3044,37 +3049,49 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3044
3049
  n && (y.value = n);
3045
3050
  }
3046
3051
  }
3047
- let n = (e = y.value) == null || (e = e.toString()) == null ? void 0 : e.trim();
3048
- if (!n) {
3052
+ let r = (e = y.value) == null || (e = e.toString()) == null ? void 0 : e.trim();
3053
+ if (!r) {
3049
3054
  C();
3050
3055
  return;
3051
3056
  }
3052
- n !== v.value && p("selectionChange", n), v.value = n;
3053
- let r = null;
3057
+ if (o.excludeSelectors.length > 0 && (n = y.value) != null && n.rangeCount) try {
3058
+ let e = y.value.getRangeAt(0).commonAncestorContainer, n = e.nodeType === Node.TEXT_NODE ? e.parentNode : e;
3059
+ for (; n && n !== document.body;) {
3060
+ if (n instanceof Element) {
3061
+ for (let e of o.excludeSelectors) if (n.closest(e)) {
3062
+ C();
3063
+ return;
3064
+ }
3065
+ }
3066
+ n = n.parentNode;
3067
+ }
3068
+ } catch (e) {}
3069
+ r !== v.value && p("selectionChange", r), v.value = r;
3070
+ let i = null;
3054
3071
  try {
3055
- var i;
3056
- if ((i = y.value) != null && i.rangeCount) {
3057
- var a;
3058
- let e = (a = y.value) == null ? void 0 : a.getRangeAt(0);
3059
- (e == null ? void 0 : e.getClientRects()).length > 0 && (r = e.getBoundingClientRect());
3072
+ var a;
3073
+ if ((a = y.value) != null && a.rangeCount) {
3074
+ var s;
3075
+ let e = (s = y.value) == null ? void 0 : s.getRangeAt(0);
3076
+ (e == null ? void 0 : e.getClientRects()).length > 0 && (i = e.getBoundingClientRect());
3060
3077
  }
3061
3078
  } catch (e) {
3062
3079
  C();
3063
3080
  return;
3064
3081
  }
3065
- let s = document.activeElement;
3066
- if (!r || r.width === 0 && r.height === 0) if (s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement) r = s.getBoundingClientRect();
3082
+ let c = document.activeElement;
3083
+ if (!i || i.width === 0 && i.height === 0) if (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement) i = c.getBoundingClientRect();
3067
3084
  else {
3068
3085
  C();
3069
3086
  return;
3070
3087
  }
3071
3088
  d.value = !0, yield nextTick();
3072
- let c = m.value.getBoundingClientRect(), l = window.innerWidth, u = window.innerHeight, f = r.left + r.width / 2 - c.width / 2;
3073
- f < 8 ? f = 8 : f + c.width > l - 8 && (f = l - c.width - 8);
3074
- let g, b = r.top, S = u - r.bottom, w = c.height + o.offset;
3075
- g = b >= w ? r.top - c.height - o.offset : S >= w ? r.bottom + o.offset : b >= S ? Math.max(8, r.top - c.height - o.offset) : Math.min(u - c.height - 8, r.bottom + o.offset), _.value = {
3076
- x: f,
3077
- y: g
3089
+ let l = m.value.getBoundingClientRect(), u = window.innerWidth, f = window.innerHeight, g = i.left + i.width / 2 - l.width / 2;
3090
+ 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 = {
3093
+ x: g,
3094
+ y: b
3078
3095
  };
3079
3096
  });
3080
3097
  return function() {
@@ -3119,7 +3136,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3119
3136
  zIndex: unref(SELECTION_Z_INDEX)
3120
3137
  }),
3121
3138
  onMousedown: o[2] || (o[2] = withModifiers(() => {}, ["stop"]))
3122
- }, [createElementVNode("div", _hoisted_1$32, [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, {
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, {
3123
3140
  key: 0,
3124
3141
  shortcut: n,
3125
3142
  onClick: (e) => w(n)
@@ -3141,7 +3158,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
3141
3158
  b.value = !0;
3142
3159
  })
3143
3160
  }, {
3144
- content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(r.maxShortcutCount), (e) => (openBlock(), createBlock(shortcut_btn_default, {
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, {
3145
3162
  key: e.id,
3146
3163
  mode: "menu",
3147
3164
  shortcut: e,
@@ -3166,11 +3183,11 @@ const useObserverVisibleList = (e, n, r) => {
3166
3183
  if (!e.value || n.value.length === 0) return;
3167
3184
  yield nextTick();
3168
3185
  let a = e.value.offsetWidth, o = /* @__PURE__ */ new Set(), s = 0;
3169
- for (let e = 0; e < r.items.length; e++) {
3186
+ for (let e = 0; e < r.items.value.length; e++) {
3170
3187
  var c, l;
3171
3188
  let i = n.value[e];
3172
3189
  if (!i) continue;
3173
- let u = i.offsetWidth, d = s + u + (o.size > 0 ? r.gap : 0), f = r.items[e], p = (c = (l = r.moreItemRef) == null || (l = l.value) == null || (l = l.$el) == null ? void 0 : l.offsetWidth) == null ? 0 : c;
3190
+ let u = i.offsetWidth, d = s + u + (o.size > 0 ? r.gap : 0), f = r.items.value[e], p = (c = (l = r.moreItemRef) == null || (l = l.value) == null || (l = l.$el) == null ? void 0 : l.offsetWidth) == null ? 0 : c;
3174
3191
  if (f && d + r.gap + p <= a) o.add(f), s = d;
3175
3192
  else break;
3176
3193
  }
@@ -3197,13 +3214,13 @@ const useObserverVisibleList = (e, n, r) => {
3197
3214
  calculateVisibleMenuItems: a
3198
3215
  };
3199
3216
  };
3200
- var _hoisted_1$31 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
3217
+ var _hoisted_1$32 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
3201
3218
  __name: "shortcut-btns",
3202
3219
  props: { shortcuts: {} },
3203
3220
  emits: ["selectShortcut"],
3204
3221
  setup(n, { emit: r }) {
3205
3222
  let i = document.body, o = n, d = r, p = useTemplateRef("containerRef"), m = shallowRef([]), g = useTemplateRef("moreMenuRef"), _ = useTemplateRef("moreBtnRef"), { visibleItems: v } = useObserverVisibleList(p, m, {
3206
- items: o.shortcuts,
3223
+ items: computed(() => o.shortcuts),
3207
3224
  gap: GAP,
3208
3225
  moreItemRef: _
3209
3226
  }), y = computed(() => o.shortcuts.filter((e) => !v.value.includes(e))), b = shallowRef(!1), x = (e, n) => {
@@ -3255,7 +3272,7 @@ var _hoisted_1$31 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
3255
3272
  b.value = !1;
3256
3273
  })
3257
3274
  }, {
3258
- content: withCtx(() => [createElementVNode("div", _hoisted_1$31, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
3275
+ content: withCtx(() => [createElementVNode("div", _hoisted_1$32, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
3259
3276
  key: e.id,
3260
3277
  mode: "menu",
3261
3278
  shortcut: e,
@@ -3292,9 +3309,10 @@ function _objectWithoutProperties(e, n) {
3292
3309
  }
3293
3310
  return a;
3294
3311
  }
3295
- var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$30 = { class: "shortcut-render" }, _hoisted_2$20 = { class: "shortcut-render-header" }, _hoisted_3$15 = { class: "header-name" }, _hoisted_4$13 = { class: "shortcut-render-content" }, _hoisted_5$10 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
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({
3296
3313
  __name: "shortcut-render",
3297
3314
  props: {
3315
+ alias: {},
3298
3316
  components: {},
3299
3317
  description: {},
3300
3318
  formModel: {},
@@ -3369,14 +3387,14 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$30 = { class:
3369
3387
  }, x = () => {
3370
3388
  a("close");
3371
3389
  };
3372
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$30, [createElementVNode("div", _hoisted_2$20, [
3390
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$21, [
3373
3391
  createVNode(unref(ThinkingIcon), { class: "header-icon" }),
3374
- createElementVNode("span", _hoisted_3$15, toDisplayString(n.name), 1),
3392
+ createElementVNode("span", _hoisted_3$15, toDisplayString(n.alias || n.name), 1),
3375
3393
  createVNode(unref(CloseIcon), {
3376
3394
  class: "header-close",
3377
3395
  onClick: x
3378
3396
  })
3379
- ]), createElementVNode("div", _hoisted_4$13, [createVNode(unref(Form), {
3397
+ ]), createElementVNode("div", _hoisted_4$14, [createVNode(unref(Form), {
3380
3398
  ref_key: "formRef",
3381
3399
  ref: o,
3382
3400
  class: "shortcut-render-form",
@@ -3611,50 +3629,72 @@ const useClipboard = () => ({ copy: function() {
3611
3629
  };
3612
3630
  }
3613
3631
  };
3614
- }, CONTAINER_SCROLL_TOKEN = Symbol("CONTAINER_SCROLL_TOKEN"), useContainerScrollProvider = (e, n) => {
3615
- let r = shallowRef(!1), i = null, o = shallowRef(0);
3632
+ }, CONTAINER_SCROLL_TOKEN = Symbol("CONTAINER_SCROLL_TOKEN"), SHOW_SCROLL_BOTTOM_BTN_DISTANCE = 100, useContainerScrollProvider = (e, n) => {
3633
+ let r = shallowRef(!1), i = null, o = shallowRef(0), s = shallowRef(!0), c = customRef((e, n) => {
3634
+ let r, i = !1;
3635
+ return {
3636
+ get() {
3637
+ return e(), i;
3638
+ },
3639
+ set(e) {
3640
+ if (e === !1) {
3641
+ i = !1, r && clearTimeout(r), n();
3642
+ return;
3643
+ }
3644
+ r && clearTimeout(r), r = setTimeout(() => {
3645
+ i = e, n();
3646
+ }, 300);
3647
+ }
3648
+ };
3649
+ });
3616
3650
  provide(CONTAINER_SCROLL_TOKEN, computed(() => ({
3651
+ autoScrollEnabled: s.value,
3617
3652
  isScrollBottom: r,
3618
3653
  scrollBottomHeight: o,
3619
- toScrollBottom: s,
3620
- toScrollTop: c
3654
+ debouncedShowScrollBottomBtn: c,
3655
+ toScrollBottom: l,
3656
+ toScrollTop: u
3621
3657
  })));
3622
- let s = () => {
3658
+ let l = () => {
3623
3659
  var e;
3624
- (e = toValue(n)) == null || e.scrollIntoView({
3660
+ s.value = !0, (e = toValue(n)) == null || e.scrollIntoView({
3625
3661
  behavior: "smooth",
3626
3662
  block: "end"
3627
3663
  });
3628
- }, c = () => {
3664
+ }, u = () => {
3629
3665
  var n;
3630
3666
  (n = toValue(e)) == null || n.scrollTo({
3631
3667
  top: 0,
3632
3668
  behavior: "smooth"
3633
3669
  });
3634
- }, l = () => {
3670
+ }, d = () => {
3635
3671
  let n = toValue(e);
3636
3672
  if (!n) return;
3637
- let { scrollHeight: r, scrollTop: i, clientHeight: a } = n, s = r - i - a;
3638
- o.value = Math.max(0, s);
3673
+ let { scrollHeight: i, scrollTop: a, clientHeight: s } = n, l = i - a - s;
3674
+ o.value = Math.max(0, l), c.value = !r.value && o.value > 100;
3675
+ }, f = (e) => {
3676
+ e.deltaY < 0 && (s.value = !1);
3639
3677
  };
3640
3678
  return onMounted(() => {
3641
3679
  watchEffect(() => {
3642
- let a = toValue(e), s = toValue(n);
3643
- !a || !s || (i == null || i.disconnect(), a.removeEventListener("scroll", l), l(), i = new IntersectionObserver((e) => {
3680
+ let a = toValue(e), l = toValue(n);
3681
+ !a || !l || (i == null || i.disconnect(), a.removeEventListener("scroll", d), a.removeEventListener("wheel", f), d(), i = new IntersectionObserver((e) => {
3644
3682
  e.forEach((e) => {
3645
- e.isIntersecting ? (r.value = !0, o.value = 0) : (r.value = !1, l());
3683
+ e.isIntersecting ? (r.value = !0, o.value = 0, s.value = !0, c.value = !1) : (r.value = !1, d());
3646
3684
  });
3647
- }), i.observe(s), a.addEventListener("scroll", l, { passive: !0 }));
3685
+ }), i.observe(l), a.addEventListener("scroll", d, { passive: !0 }), a.addEventListener("wheel", f, { passive: !0 }));
3648
3686
  });
3649
3687
  }), onScopeDispose(() => {
3650
3688
  i == null || i.disconnect();
3651
3689
  let n = toValue(e);
3652
- n && n.removeEventListener("scroll", l);
3690
+ n && (n.removeEventListener("scroll", d), n.removeEventListener("wheel", f));
3653
3691
  }), {
3692
+ autoScrollEnabled: s,
3654
3693
  isScrollBottom: r,
3655
3694
  scrollBottomHeight: o,
3656
- toScrollBottom: s,
3657
- toScrollTop: c
3695
+ toScrollBottom: l,
3696
+ toScrollTop: u,
3697
+ debouncedShowScrollBottomBtn: c
3658
3698
  };
3659
3699
  }, useContainerScrollConsumer = () => inject(CONTAINER_SCROLL_TOKEN), MESSAGE_SLOT_ID = "ai-blueking-message-slot", AI_BLUEKING_MESSAGE_SLOT_ID = Symbol(MESSAGE_SLOT_ID), getMessageSlotId = () => inject(AI_BLUEKING_MESSAGE_SLOT_ID), useGlobalConfig = () => {
3660
3700
  let e = computed(() => `#${MESSAGE_SLOT_ID}`);
@@ -6789,24 +6829,24 @@ function parseLatexEnvName(e, n) {
6789
6829
  endIdx: r + 1
6790
6830
  };
6791
6831
  }
6792
- var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
6832
+ var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
6793
6833
  __name: "tool-btn",
6794
6834
  props: {
6795
6835
  description: {},
6796
6836
  id: {},
6797
6837
  name: {},
6798
6838
  active: { type: Boolean },
6799
- disabled: { type: Boolean }
6839
+ disabled: { type: Boolean },
6840
+ tippyOptions: {}
6800
6841
  },
6801
6842
  emits: ["click"],
6802
6843
  setup(e, { emit: n }) {
6803
- let r = e, i = n, o = computed(() => ({
6844
+ let r = e, i = n, o = computed(() => _objectSpread2(_objectSpread2({
6804
6845
  content: r.description,
6805
- theme: "ai-chat-box",
6806
- onShow: () => {
6807
- if (r.disabled) return !1;
6808
- }
6809
- })), c = (e) => {
6846
+ theme: "ai-chat-box"
6847
+ }, r.tippyOptions || {}), {}, { onShow: () => {
6848
+ if (r.disabled) return !1;
6849
+ } })), c = (e) => {
6810
6850
  r.disabled || i("click", r, e);
6811
6851
  };
6812
6852
  return (n, r) => withDirectives((openBlock(), createElementBlock("div", {
@@ -6814,18 +6854,16 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6814
6854
  "is-active": e.active,
6815
6855
  "is-disabled": e.disabled
6816
6856
  }]),
6857
+ style: normalizeStyle({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
6817
6858
  onClick: c
6818
- }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$29, toDisplayString(e.name), 1))], 2)), [[unref(directive), o.value]]);
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]]);
6819
6860
  }
6820
- }), _hoisted_1$28 = { class: "code-content-wrapper" }, _hoisted_2$19 = { class: "code-content-header" }, _hoisted_3$14 = { class: "code-header-language" }, _hoisted_4$12 = { class: "hljs-pre" }, _hoisted_5$9 = ["innerHTML"], _hoisted_6$4 = {
6821
- key: 0,
6822
- class: "code-line current-line"
6823
- }, MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
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({
6824
6862
  __name: "code-content",
6825
6863
  props: { token: {} },
6826
6864
  emits: ["mounted"],
6827
6865
  setup(n, { emit: r }) {
6828
- let i = n, o = r, s = useTemplateRef("codeRef"), p = shallowRef(""), { copy: m } = useClipboard(), g = shallowRef([]), _ = shallowRef(""), v = /* @__PURE__ */ new Map(), y = null, b = (e) => {
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) => {
6829
6867
  for (let r of e) if (r.type === "fence" || r.type === "code_block") {
6830
6868
  var n;
6831
6869
  return {
@@ -6838,16 +6876,18 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6838
6876
  language: ""
6839
6877
  };
6840
6878
  }, x = (e) => {
6841
- let n = MarkdownLanguageMap[e] || e, r = hljs.getLanguage(n);
6842
- if (!r) {
6843
- var i;
6844
- let n = (i = e.match(/\.\w+$/)) == null ? void 0 : i[0];
6845
- n && (r = hljs.getLanguage(n.slice(1)));
6879
+ var n;
6880
+ let r = MarkdownLanguageMap[e] || e;
6881
+ if (hljs.getLanguage(r)) return r;
6882
+ let i = (n = e.match(/\.\w+$/)) == null ? void 0 : n[0];
6883
+ if (i) {
6884
+ let e = i.slice(1);
6885
+ if (hljs.getLanguage(e)) return e;
6846
6886
  }
6847
- return (r == null ? void 0 : r.name) || null;
6887
+ return null;
6848
6888
  }, S = (e, n) => {
6849
6889
  if (!e) return "";
6850
- let r = `${n || ""}:${e}`, i = v.get(r);
6890
+ let r = `${n || ""}:${e}`, i = y.get(r);
6851
6891
  if (i !== void 0) return i;
6852
6892
  let a;
6853
6893
  if (n) try {
@@ -6859,13 +6899,15 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6859
6899
  a = C(e);
6860
6900
  }
6861
6901
  else a = C(e);
6862
- return v.set(r, a), v.size > MAX_CACHE_SIZE && Array.from(v.keys()).slice(0, Math.floor(MAX_CACHE_SIZE / 2)).forEach((e) => v.delete(e)), a;
6902
+ return y.set(r, a), y.size > MAX_CACHE_SIZE && Array.from(y.keys()).slice(0, Math.floor(MAX_CACHE_SIZE / 2)).forEach((e) => y.delete(e)), a;
6863
6903
  }, C = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), w = (e, n) => {
6864
6904
  var r;
6865
6905
  let i = x(n), a = e.split("\n");
6866
6906
  if (a.length === 1) {
6867
6907
  var o;
6868
- g.value = [], _.value = (o = a[0]) == null ? "" : o, D();
6908
+ g.value = [];
6909
+ let e = (o = a[0]) == null ? "" : o;
6910
+ _.value = e, v.value = e ? S(e, i) : "";
6869
6911
  return;
6870
6912
  }
6871
6913
  let s = a.slice(0, -1), c = (r = a[a.length - 1]) == null ? "" : r, l = g.value, u = [];
@@ -6877,14 +6919,8 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6877
6919
  html: S(n, i)
6878
6920
  });
6879
6921
  }
6880
- g.value = u, _.value = c, D();
6881
- }, D = () => {
6882
- y !== null && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
6883
- y = requestAnimationFrame(() => {
6884
- y = null;
6885
- });
6886
- });
6887
- }, O = computed(() => {
6922
+ g.value = u, _.value = c, v.value = c ? S(c, i) : "";
6923
+ }, D = computed(() => {
6888
6924
  let { language: e } = b(i.token), n = ["hljs"];
6889
6925
  return e && n.push(`language-${e}`), n.join(" ");
6890
6926
  });
@@ -6899,29 +6935,33 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6899
6935
  immediate: !0,
6900
6936
  deep: !0
6901
6937
  });
6902
- let k = () => {
6938
+ let O = () => {
6903
6939
  var e;
6904
6940
  let n = (e = s.value) == null ? void 0 : e.innerText;
6905
6941
  n && m(n);
6906
6942
  };
6907
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$28, [createElementVNode("div", _hoisted_2$19, [createElementVNode("span", _hoisted_3$14, toDisplayString(p.value), 1), createVNode(tool_btn_default, {
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, {
6908
6944
  id: "copy",
6909
6945
  description: "复制",
6910
6946
  name: "复制",
6911
- onClick: k
6912
- })]), createElementVNode("pre", _hoisted_4$12, [createElementVNode("code", {
6947
+ onClick: O
6948
+ })]), createElementVNode("pre", _hoisted_4$13, [createElementVNode("code", {
6913
6949
  ref_key: "codeRef",
6914
6950
  ref: s,
6915
- class: normalizeClass(O.value)
6951
+ class: normalizeClass(D.value)
6916
6952
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (n, i) => (openBlock(), createElementBlock(Fragment, { key: `completed-${i}` }, [createElementVNode("span", {
6917
6953
  class: "code-line",
6918
6954
  innerHTML: n.html
6919
- }, null, 8, _hoisted_5$9), r[0] || (r[0] = createTextVNode(toDisplayString("\n"), -1))], 64))), 128)), _.value ? (openBlock(), createElementBlock("span", _hoisted_6$4, toDisplayString(_.value), 1)) : createCommentVNode("", !0)], 2)])]));
6955
+ }, null, 8, _hoisted_5$9), r[0] || (r[0] = createTextVNode(toDisplayString("\n"), -1))], 64))), 128)), _.value ? (openBlock(), createElementBlock("span", {
6956
+ key: 0,
6957
+ class: "code-line current-line",
6958
+ innerHTML: v.value
6959
+ }, null, 8, _hoisted_6$4)) : createCommentVNode("", !0)], 2)])]));
6920
6960
  }
6921
- }), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$27 = { class: "md-image-wrapper" }, _hoisted_2$18 = {
6961
+ }), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$28 = { class: "md-image-wrapper" }, _hoisted_2$19 = {
6922
6962
  key: 0,
6923
6963
  class: "md-image-loading"
6924
- }, _hoisted_3$13 = { class: "md-image-loading-text" }, _hoisted_4$11 = {
6964
+ }, _hoisted_3$13 = { class: "md-image-loading-text" }, _hoisted_4$12 = {
6925
6965
  key: 1,
6926
6966
  class: "md-image-error"
6927
6967
  }, _hoisted_5$8 = { class: "md-image-error-text" }, _hoisted_6$3 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
@@ -6973,11 +7013,11 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
6973
7013
  c.value = !1, g(), _.value ? v(e) : (o.value = !0, s.value = !1);
6974
7014
  }, { immediate: !0 }), watch(_, (e) => {
6975
7015
  e && r.src && v(r.src);
6976
- }), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$27, [p.value ? (openBlock(), createElementBlock("span", _hoisted_2$18, [createVNode(unref(Loading), {
7016
+ }), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$28, [p.value ? (openBlock(), createElementBlock("span", _hoisted_2$19, [createVNode(unref(Loading), {
6977
7017
  mode: "spin",
6978
7018
  size: "mini",
6979
7019
  theme: "primary"
6980
- }), createElementVNode("span", _hoisted_3$13, toDisplayString(unref(t)("图片加载中...")), 1)])) : m.value ? (openBlock(), createElementBlock("span", _hoisted_4$11, [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", {
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", {
6981
7021
  key: 2,
6982
7022
  alt: e.alt,
6983
7023
  class: "md-image",
@@ -7209,7 +7249,7 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
7209
7249
  innerHTML: r.value
7210
7250
  }, null, 8, ["class", "innerHTML"]));
7211
7251
  }
7212
- }), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$26 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
7252
+ }), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$27 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
7213
7253
  __name: "mermaid-content",
7214
7254
  props: { token: {} },
7215
7255
  emits: ["mounted"],
@@ -7268,13 +7308,13 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
7268
7308
  ref: i,
7269
7309
  class: "mermaid-content",
7270
7310
  innerHTML: r.value
7271
- }, null, 8, _hoisted_1$26));
7311
+ }, null, 8, _hoisted_1$27));
7272
7312
  }
7273
- }), _hoisted_1$25 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
7313
+ }), _hoisted_1$26 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
7274
7314
  __name: "common-error-content",
7275
7315
  props: { content: {} },
7276
7316
  setup(e) {
7277
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$25, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
7317
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
7278
7318
  }
7279
7319
  }), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
7280
7320
  keyCounterMap = /* @__PURE__ */ new Map();
@@ -7440,7 +7480,7 @@ var vnode_renderer_default = defineComponent({
7440
7480
  setup(e) {
7441
7481
  return () => tokensToVNodes(e.tokens, e.options);
7442
7482
  }
7443
- }), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$24 = { class: "markdown-content" }, _hoisted_2$17 = {
7483
+ }), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$25 = { class: "markdown-content" }, _hoisted_2$18 = {
7444
7484
  key: 1,
7445
7485
  class: "markdown-body"
7446
7486
  }, markdown_content_default = /* @__PURE__ */ defineComponent({
@@ -7528,16 +7568,19 @@ var vnode_renderer_default = defineComponent({
7528
7568
  trailing: !0
7529
7569
  }), { immediate: !0 });
7530
7570
  let g = (0, import_throttle.default)(() => {
7531
- var e, n;
7532
- a == null || (e = a.value) == null || (n = e.toScrollBottom) == null || n.call(e);
7571
+ var e;
7572
+ if ((a == null || (e = a.value) == null ? void 0 : e.autoScrollEnabled) !== !1) {
7573
+ var n, r;
7574
+ a == null || (n = a.value) == null || (r = n.toScrollBottom) == null || r.call(n);
7575
+ }
7533
7576
  }, 100, {
7534
7577
  leading: !0,
7535
7578
  trailing: !0
7536
7579
  });
7537
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$24, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
7580
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$25, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
7538
7581
  key: 0,
7539
7582
  content: n.content
7540
- }, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$17, [(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [d(n) ? (openBlock(), createBlock(unref(mermaid_content_default), {
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), {
7541
7584
  key: r,
7542
7585
  token: n,
7543
7586
  onMounted: unref(g)
@@ -7556,7 +7599,7 @@ var vnode_renderer_default = defineComponent({
7556
7599
  onVnodeMounted: unref(g)
7557
7600
  }, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
7558
7601
  }
7559
- }), _hoisted_1$23 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
7602
+ }), _hoisted_1$24 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
7560
7603
  __name: "reference-content",
7561
7604
  props: { content: {} },
7562
7605
  setup(n) {
@@ -7575,7 +7618,7 @@ var vnode_renderer_default = defineComponent({
7575
7618
  createElementVNode("span", {
7576
7619
  class: "ai-reference-item-title",
7577
7620
  onClick: (n) => e.url && i(e.url, n)
7578
- }, toDisplayString(e.title), 9, _hoisted_1$23),
7621
+ }, toDisplayString(e.title), 9, _hoisted_1$24),
7579
7622
  e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
7580
7623
  key: 0,
7581
7624
  onClick: (n) => e.url && i(e.url, n)
@@ -8148,7 +8191,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
8148
8191
  }({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
8149
8192
  return e.Disabled = "disabled", e.Hidden = "hidden", e;
8150
8193
  }({});
8151
- var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
8194
+ var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
8152
8195
  __name: "file-upload-btn",
8153
8196
  props: {
8154
8197
  accept: { default: "image/*" },
@@ -8177,7 +8220,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8177
8220
  }
8178
8221
  n.value = "";
8179
8222
  };
8180
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [createElementVNode("input", {
8223
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$23, [createElementVNode("input", {
8181
8224
  ref_key: "fileInputRef",
8182
8225
  ref: a,
8183
8226
  accept: e.accept,
@@ -8185,7 +8228,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8185
8228
  multiple: "",
8186
8229
  type: "file",
8187
8230
  onChange: s
8188
- }, null, 40, _hoisted_2$16), withDirectives((openBlock(), createElementBlock("span", {
8231
+ }, null, 40, _hoisted_2$17), withDirectives((openBlock(), createElementBlock("span", {
8189
8232
  class: "ai-shortcut-btn file-upload-btn-icon",
8190
8233
  onClick: o
8191
8234
  }, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
@@ -8194,16 +8237,16 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8194
8237
  offset: [0, 16]
8195
8238
  }]])]));
8196
8239
  }
8197
- }), _hoisted_1$21 = { class: "ai-cite-content" }, _hoisted_2$15 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
8240
+ }), _hoisted_1$22 = { class: "ai-cite-content" }, _hoisted_2$16 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
8198
8241
  __name: "cite-content",
8199
8242
  props: {
8200
8243
  content: {},
8201
8244
  onClose: { type: Function }
8202
8245
  },
8203
8246
  setup(e) {
8204
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$21, [
8247
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
8205
8248
  createVNode(unref(CiteIcon)),
8206
- createElementVNode("span", _hoisted_2$15, toDisplayString(e.content), 1),
8249
+ createElementVNode("span", _hoisted_2$16, toDisplayString(e.content), 1),
8207
8250
  e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
8208
8251
  key: 0,
8209
8252
  onClick: r[0] || (r[0] = (n) => {
@@ -8213,14 +8256,14 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8213
8256
  })) : createCommentVNode("", !0)
8214
8257
  ]));
8215
8258
  }
8216
- }), _hoisted_1$20 = { class: "ai-files-content" }, _hoisted_2$14 = [
8259
+ }), _hoisted_1$21 = { class: "ai-files-content" }, _hoisted_2$15 = [
8217
8260
  "alt",
8218
8261
  "src",
8219
8262
  "onError"
8220
8263
  ], _hoisted_3$12 = {
8221
8264
  key: 1,
8222
8265
  class: "file-content-image image-error"
8223
- }, _hoisted_4$10 = {
8266
+ }, _hoisted_4$11 = {
8224
8267
  key: 2,
8225
8268
  class: "file-content-object"
8226
8269
  }, _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({
@@ -8242,7 +8285,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8242
8285
  }, m = (e) => {
8243
8286
  i("deleteFile", e);
8244
8287
  };
8245
- return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$20, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
8288
+ return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
8246
8289
  var r, i, g, _, v;
8247
8290
  return openBlock(), createElementBlock("div", {
8248
8291
  key: (r = e.file) == null ? void 0 : r.name,
@@ -8253,7 +8296,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8253
8296
  class: "file-content-image",
8254
8297
  src: e.url || unref(getFilePreviewUrl)(e.file),
8255
8298
  onError: (n) => p(e)
8256
- }, null, 40, _hoisted_2$14)) : o(e) && a[d(e)] ? (openBlock(), createElementBlock("div", _hoisted_3$12, [createVNode(unref(ImageErrorIcon), { class: "file-error-icon" })])) : (openBlock(), createElementBlock("div", _hoisted_4$10, [createElementVNode("div", _hoisted_5$7, [
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, [
8257
8300
  createVNode(unref(DocumentIcon), { class: "file-icon" }),
8258
8301
  createElementVNode("span", _hoisted_6$2, toDisplayString(e.filename || ((g = e.file) == null ? void 0 : g.name)), 1),
8259
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)
@@ -8264,7 +8307,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8264
8307
  }, null, 8, ["onClick"]))], 2);
8265
8308
  }), 128))]));
8266
8309
  }
8267
- }), _hoisted_1$19 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8310
+ }), _hoisted_1$20 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
8268
8311
  __name: "ai-prompt-list",
8269
8312
  props: {
8270
8313
  onSelect: { type: Function },
@@ -8284,7 +8327,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
8284
8327
  key: e,
8285
8328
  class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(o) === r }]),
8286
8329
  onClick: (r) => n.onSelect(e)
8287
- }, toDisplayString(e), 11, _hoisted_1$19))), 128))], 512));
8330
+ }, toDisplayString(e), 11, _hoisted_1$20))), 128))], 512));
8288
8331
  }
8289
8332
  }), bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
8290
8333
  "top",
@@ -8949,12 +8992,12 @@ function preventOverflow(e) {
8949
8992
  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) : {
8950
8993
  width: 0,
8951
8994
  height: 0
8952
- }, 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, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent(n.elements.arrow), Xv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Zv = F + q - X - Xv, Qv = F + J - X, $v = within(m ? min$1(I, Zv) : I, F, m ? max(L, Qv) : L);
8953
- w[S] = $v, A[S] = $v - F;
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);
8996
+ w[S] = X, A[S] = X - F;
8954
8997
  }
8955
8998
  if (c) {
8956
- var ey, ty = S === "x" ? "top" : left, ny = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[ty], ry = Z - v[ny], iy = ["top", left].indexOf(y) !== -1, ay = (ey = k == null ? void 0 : k[C]) == null ? 0 : ey, oy = iy ? $ : Z - T[Q] - E[Q] - ay + O.altAxis, sy = iy ? Z + T[Q] + E[Q] - ay - O.altAxis : ry, cy = m && iy ? withinMaxClamp(oy, Z, sy) : within(m ? oy : $, Z, m ? sy : ry);
8957
- w[C] = cy, A[C] = cy - Z;
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;
8958
9001
  }
8959
9002
  n.modifiersData[i] = A;
8960
9003
  }
@@ -9480,7 +9523,7 @@ function render(e) {
9480
9523
  render.$$tippy = !0;
9481
9524
  var idCounter = 1, mouseMoveListeners = [], mountedInstances = [];
9482
9525
  function createTippy(e, n) {
9483
- var r = evaluateProps(e, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce(X, r.interactiveDebounce), _, v = idCounter++, y = null, b = unique(r.plugins), x = {
9526
+ var r = evaluateProps(e, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce(Y, r.interactiveDebounce), _, v = idCounter++, y = null, b = unique(r.plugins), x = {
9484
9527
  id: v,
9485
9528
  reference: e,
9486
9529
  popper: div(),
@@ -9494,16 +9537,16 @@ function createTippy(e, n) {
9494
9537
  isShown: !1
9495
9538
  },
9496
9539
  plugins: b,
9497
- clearDelayTimeouts: ay,
9498
- setProps: oy,
9499
- setContent: sy,
9500
- show: cy,
9501
- hide: ly,
9502
- hideWithInteractivity: uy,
9503
- enable: ry,
9504
- disable: iy,
9505
- unmount: dy,
9506
- destroy: fy
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
9507
9550
  };
9508
9551
  /* istanbul ignore if */
9509
9552
  if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
@@ -9512,7 +9555,7 @@ function createTippy(e, n) {
9512
9555
  var T = b.map(function(e) {
9513
9556
  return e.fn(x);
9514
9557
  }), E = e.hasAttribute("aria-expanded");
9515
- return J(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
9558
+ return ty(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
9516
9559
  x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
9517
9560
  }), C.addEventListener("mouseleave", function() {
9518
9561
  x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
@@ -9631,37 +9674,37 @@ function createTippy(e, n) {
9631
9674
  });
9632
9675
  });
9633
9676
  }
9634
- function J() {
9635
- O() && (q("touchstart", Xv, { passive: !0 }), q("touchend", Zv, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
9636
- if (e !== "manual") switch (q(e, Xv), e) {
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) {
9637
9680
  case "mouseenter":
9638
- q("mouseleave", Zv);
9681
+ q("mouseleave", ry);
9639
9682
  break;
9640
9683
  case "focus":
9641
- q(isIE11 ? "focusout" : "blur", Qv);
9684
+ q(isIE11 ? "focusout" : "blur", iy);
9642
9685
  break;
9643
9686
  case "focusin":
9644
- q("focusout", Qv);
9687
+ q("focusout", iy);
9645
9688
  break;
9646
9689
  }
9647
9690
  });
9648
9691
  }
9649
- function Y() {
9692
+ function J() {
9650
9693
  m.forEach(function(e) {
9651
9694
  var n = e.node, r = e.eventType, i = e.handler, a = e.options;
9652
9695
  n.removeEventListener(r, i, a);
9653
9696
  }), m = [];
9654
9697
  }
9655
- function Xv(e) {
9698
+ function ny(e) {
9656
9699
  var n, r = !1;
9657
- if (!(!x.state.isEnabled || $v(e) || c)) {
9700
+ if (!(!x.state.isEnabled || X(e) || c)) {
9658
9701
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
9659
9702
  d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent(e) && mouseMoveListeners.forEach(function(n) {
9660
9703
  return n(e);
9661
9704
  }), e.type === "click" && (x.props.trigger.indexOf("mouseenter") < 0 || s) && x.props.hideOnClick !== !1 && x.state.isVisible ? r = !0 : Q(e), e.type === "click" && (s = !r), r && !i && $(e);
9662
9705
  }
9663
9706
  }
9664
- function X(e) {
9707
+ function Y(e) {
9665
9708
  var n = e.target, i = A().contains(n) || C.contains(n);
9666
9709
  e.type === "mousemove" && i || isCursorOutsideInteractiveBorder(Z().concat(C).map(function(e) {
9667
9710
  var n, i = (n = e._tippy.popperInstance) == null ? void 0 : n.state;
@@ -9672,8 +9715,8 @@ function createTippy(e, n) {
9672
9715
  } : null;
9673
9716
  }).filter(Boolean), e) && (R(), $(e));
9674
9717
  }
9675
- function Zv(e) {
9676
- if (!($v(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9718
+ function ry(e) {
9719
+ if (!(X(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9677
9720
  if (x.props.interactive) {
9678
9721
  x.hideWithInteractivity(e);
9679
9722
  return;
@@ -9681,14 +9724,14 @@ function createTippy(e, n) {
9681
9724
  $(e);
9682
9725
  }
9683
9726
  }
9684
- function Qv(e) {
9727
+ function iy(e) {
9685
9728
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
9686
9729
  }
9687
- function $v(e) {
9730
+ function X(e) {
9688
9731
  return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
9689
9732
  }
9690
- function ey() {
9691
- ty();
9733
+ function ay() {
9734
+ oy();
9692
9735
  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 ? {
9693
9736
  getBoundingClientRect: o,
9694
9737
  contextElement: o.contextElement || A()
@@ -9746,13 +9789,13 @@ function createTippy(e, n) {
9746
9789
  modifiers: u
9747
9790
  }));
9748
9791
  }
9749
- function ty() {
9792
+ function oy() {
9750
9793
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
9751
9794
  }
9752
- function ny() {
9795
+ function sy() {
9753
9796
  var e = x.props.appendTo, n, r = A();
9754
9797
  /* istanbul ignore else */
9755
- 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, ey(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
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, [
9756
9799
  "Interactive tippy element may not be accessible via keyboard",
9757
9800
  "navigation because it is not directly after the reference element",
9758
9801
  "in the DOM source order.",
@@ -9791,31 +9834,31 @@ function createTippy(e, n) {
9791
9834
  });
9792
9835
  }
9793
9836
  }
9794
- function ry() {
9837
+ function cy() {
9795
9838
  x.state.isEnabled = !0;
9796
9839
  }
9797
- function iy() {
9840
+ function ly() {
9798
9841
  x.hide(), x.state.isEnabled = !1;
9799
9842
  }
9800
- function ay() {
9843
+ function uy() {
9801
9844
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
9802
9845
  }
9803
- function oy(n) {
9846
+ function dy(n) {
9804
9847
  /* istanbul ignore else */
9805
9848
  if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
9806
- F("onBeforeUpdate", [x, n]), Y();
9849
+ F("onBeforeUpdate", [x, n]), J();
9807
9850
  var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
9808
- x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
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) {
9809
9852
  e.removeAttribute("aria-expanded");
9810
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ey(), Z().forEach(function(e) {
9853
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ay(), Z().forEach(function(e) {
9811
9854
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
9812
9855
  })), F("onAfterUpdate", [x, n]);
9813
9856
  }
9814
9857
  }
9815
- function sy(e) {
9858
+ function fy(e) {
9816
9859
  x.setProps({ content: e });
9817
9860
  }
9818
- function cy() {
9861
+ function py() {
9819
9862
  /* istanbul ignore else */
9820
9863
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
9821
9864
  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);
@@ -9835,10 +9878,10 @@ function createTippy(e, n) {
9835
9878
  x.state.isShown = !0, F("onShown", [x]);
9836
9879
  });
9837
9880
  }
9838
- }, ny();
9881
+ }, sy();
9839
9882
  }
9840
9883
  }
9841
- function ly() {
9884
+ function my() {
9842
9885
  /* istanbul ignore else */
9843
9886
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
9844
9887
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
@@ -9850,20 +9893,20 @@ function createTippy(e, n) {
9850
9893
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
9851
9894
  }
9852
9895
  }
9853
- function uy(e) {
9896
+ function hy(e) {
9854
9897
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
9855
9898
  }
9856
- function dy() {
9899
+ function gy() {
9857
9900
  /* istanbul ignore else */
9858
- process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (ty(), Z().forEach(function(e) {
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) {
9859
9902
  e._tippy.unmount();
9860
9903
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
9861
9904
  return e !== x;
9862
9905
  }), x.state.isMounted = !1, F("onHidden", [x]));
9863
9906
  }
9864
- function fy() {
9907
+ function _y() {
9865
9908
  /* istanbul ignore else */
9866
- process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("destroy")), !x.state.isDestroyed && (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
9909
+ 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]));
9867
9910
  }
9868
9911
  }
9869
9912
  function tippy(e, n) {
@@ -9948,7 +9991,7 @@ const OverflowTips = {
9948
9991
  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;
9949
9992
  }
9950
9993
  };
9951
- var _hoisted_1$18 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$13 = ["onClick"], _hoisted_3$11 = ["onClick"], _hoisted_4$9 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
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({
9952
9995
  __name: "ai-slash-menu",
9953
9996
  props: {
9954
9997
  onSelect: { type: Function },
@@ -9993,13 +10036,13 @@ var _hoisted_1$18 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
9993
10036
  }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (r, i) => (openBlock(), createElementBlock(Fragment, null, [r.items.length > 0 ? (openBlock(), createElementBlock("div", {
9994
10037
  key: i,
9995
10038
  class: "ai-slash-group"
9996
- }, [createElementVNode("div", _hoisted_1$18, [
10039
+ }, [createElementVNode("div", _hoisted_1$19, [
9997
10040
  (openBlock(), createElementBlock("svg", {
9998
10041
  class: "title-icon",
9999
10042
  style: normalizeStyle({ transform: a.value.includes(r.type) ? "rotate(90deg)" : "rotate(0deg)" }),
10000
10043
  viewBox: "0 0 1024 1024",
10001
10044
  onClick: (e) => p(r)
10002
- }, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$13)),
10045
+ }, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$14)),
10003
10046
  createElementVNode("span", { class: normalizeClass(`mark-${r.type}`) }, null, 2),
10004
10047
  createTextVNode(" " + toDisplayString(r.name) + " (" + toDisplayString(r.items.length) + ") ", 1)
10005
10048
  ]), a.value.includes(r.type) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(r.items, (e) => {
@@ -10011,7 +10054,7 @@ var _hoisted_1$18 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
10011
10054
  }, [withDirectives((openBlock(), createElementBlock("span", {
10012
10055
  class: "ellipsis-text",
10013
10056
  title: e.name
10014
- }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$9)), [[unref(OverflowTips), {
10057
+ }, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$10)), [[unref(OverflowTips), {
10015
10058
  text: e.name,
10016
10059
  zIndex: 9999999,
10017
10060
  placement: "right-start",
@@ -10037,29 +10080,35 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
10037
10080
  plain: (e) => e.label
10038
10081
  }) }
10039
10082
  });
10040
- var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-placeholder"], _hoisted_3$10 = { key: 0 }, _hoisted_4$8 = ["data-tag-type"], _hoisted_5$6 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
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({
10041
10084
  __name: "ai-slash-input",
10042
- props: /* @__PURE__ */ mergeModels({
10085
+ props: {
10086
+ modelValue: {},
10043
10087
  placeholder: { default: isEn ? "Please enter content" : "请输入内容" },
10044
10088
  prompts: { default: () => [] },
10045
10089
  resources: { default: () => [] }
10046
- }, {
10047
- modelValue: { required: !0 },
10048
- modelModifiers: {}
10049
- }),
10050
- emits: /* @__PURE__ */ mergeModels(["keydown", "upload"], ["update:modelValue"]),
10090
+ },
10091
+ emits: [
10092
+ "update:modelValue",
10093
+ "keydown",
10094
+ "upload"
10095
+ ],
10051
10096
  setup(n, { expose: r, emit: i }) {
10052
- let a = useTemplateRef("editorRef"), o = useTemplateRef("tippyRef"), m = i, g = useModel(n, "modelValue"), _ = n, v = customRef((e, n) => ({
10097
+ let a = useTemplateRef("editorRef"), o = useTemplateRef("tippyRef"), m = i, g = n, _ = customRef((e, n) => ({
10053
10098
  get() {
10054
- return e(), typeof g.value == "string" ? stringToDoc(g.value) : g.value;
10099
+ return e(), typeof g.modelValue == "string" ? stringToDoc(g.modelValue) : g.modelValue;
10055
10100
  },
10056
10101
  set(e) {
10057
- g.value = e, n();
10102
+ 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) => {
10104
+ var n;
10105
+ 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
+ })) == null ? void 0 : r.filter((e) => !!e)) || []), n();
10058
10107
  }
10059
- })), y = shallowRef("slash"), b = shallowRef(""), x = shallowRef([]), S = shallowRef([]), C = shallowRef([]), w, T, D = document.body, { commandSelection: O, GetCursorPosition: A } = useCommandSelection(), N = () => {
10108
+ })), v = shallowRef("slash"), y = shallowRef(""), b = shallowRef([]), x = shallowRef([]), S, C, w = document.body, { commandSelection: T, GetCursorPosition: D } = useCommandSelection(), O = () => {
10060
10109
  setTimeout(() => {
10061
- let e = L();
10062
- if (b.value = e.query || "", e.isActive) {
10110
+ let e = P();
10111
+ if (y.value = e.query || "", e.isActive) {
10063
10112
  var n, r;
10064
10113
  (n = o.value) == null || n.setProps({ getReferenceClientRect: () => {
10065
10114
  var n, r;
@@ -10075,15 +10124,15 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10075
10124
  (i = o.value) == null || i.hide();
10076
10125
  }
10077
10126
  }, 16);
10078
- }, P = (e) => {
10127
+ }, A = (e) => {
10079
10128
  if (m("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
10080
10129
  var n;
10081
10130
  return e.shiftKey ? void 0 : ((n = e.preventDefault) == null || n.call(e), !1);
10082
10131
  }
10083
- e.key === "@" && (y.value = "slash", N()), e.key === "/" && (y.value = "prompt", N());
10084
- }, F = () => {
10085
- b.value = "";
10086
- }, L = () => {
10132
+ e.key === "@" && (v.value = "slash", O()), e.key === "/" && (v.value = "prompt", O());
10133
+ }, N = () => {
10134
+ y.value = "";
10135
+ }, P = () => {
10087
10136
  let e = {
10088
10137
  isActive: !1,
10089
10138
  query: "",
@@ -10093,9 +10142,9 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10093
10142
  if (!n || n.rangeCount === 0) return e;
10094
10143
  let r = n.getRangeAt(0), i = r.startContainer, a = r.startOffset;
10095
10144
  if (i.nodeType !== Node.TEXT_NODE) return e;
10096
- let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${y.value === "slash" ? "@" : "/"}[^\\s]*)$`), c = o.match(s);
10145
+ let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${v.value === "slash" ? "@" : "/"}[^\\s]*)$`), c = o.match(s);
10097
10146
  if (!c) return e;
10098
- let l = c[1], u = l == null ? void 0 : l.slice(1), d = c.index + c[0].indexOf(y.value === "slash" ? "@" : "/");
10147
+ let l = c[1], u = l == null ? void 0 : l.slice(1), d = c.index + c[0].indexOf(v.value === "slash" ? "@" : "/");
10099
10148
  try {
10100
10149
  let e = document.createRange();
10101
10150
  e.setStart(i, d), e.setEnd(i, d + 1);
@@ -10113,38 +10162,43 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10113
10162
  } catch (n) {
10114
10163
  return e;
10115
10164
  }
10116
- }, R = (e, n) => e.reduce((e, r, i) => {
10165
+ }, F = (e, n) => e.reduce((e, r, i) => {
10117
10166
  if (i >= n) return e;
10118
10167
  if (r.type === "text") {
10119
10168
  var a;
10120
10169
  e += ((a = r.text) == null ? void 0 : a.length) || 0;
10121
10170
  }
10122
10171
  return r.type === "tag" && (e += 1), e;
10123
- }, 0), V = (e) => {
10172
+ }, 0), L = (e) => {
10124
10173
  var n;
10125
- C.value.push(e), w.command(A);
10126
- let { column: r, line: i } = O.value;
10127
- w.command(DeleteTag, [i, r - b.value.length - 1], [i, r]), w.command(InsertTag, [i, r], e), w.command(InsertText$1, [i, r + b.value.length + 1 + 1], " "), (n = o.value) == null || n.hide(), U();
10128
- }, U = () => {
10174
+ S.command(D);
10175
+ 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 = () => {
10129
10178
  setTimeout(() => {
10130
10179
  let e = window.getSelection(), n = document.createRange();
10131
10180
  a.value && e && (n.selectNodeContents(a.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
10132
10181
  }, 100);
10133
- }, G = (e) => {
10134
- w.command(ReplaceAll, e), U();
10182
+ }, V = (e) => {
10183
+ S.command(ReplaceAll, e), R();
10135
10184
  };
10136
10185
  watchEffect(() => {
10137
- if (b.value ? (x.value = _.resources.filter((e) => e.name.toLowerCase().includes(b.value.toLowerCase())), S.value = _.prompts.filter((e) => e.toLowerCase().includes(b.value.toLowerCase()))) : (x.value = _.resources, S.value = _.prompts), !x.value.length && !S.value.length) {
10138
- var e;
10139
- (e = o.value) == null || e.hide();
10186
+ var e;
10187
+ let n = (e = g.resources) == null ? void 0 : e.filter((e) => {
10188
+ var n;
10189
+ return !((n = _.value) != null && n.some((n) => n.some((n) => n.type === "tag" && n.data.value === e.id && n.data.type === e.type)));
10190
+ });
10191
+ if (y.value ? (b.value = n.filter((e) => e.name.toLowerCase().includes(y.value.toLowerCase())), x.value = g.prompts.filter((e) => e.toLowerCase().includes(y.value.toLowerCase()))) : (b.value = n, x.value = g.prompts), !b.value.length && !x.value.length) {
10192
+ var r;
10193
+ (r = o.value) == null || r.hide();
10140
10194
  }
10141
10195
  });
10142
- let q = (e, n, r, i) => {
10196
+ let U = (e, n, r, i) => {
10143
10197
  if (n.type === "tag") {
10144
- let n = R(e, r);
10145
- w.command(DeleteTag, [i, n], [i, n + 1]);
10198
+ let n = F(e, r);
10199
+ S.command(DeleteTag, [i, n], [i, n + 1]);
10146
10200
  }
10147
- }, J = (e) => {
10201
+ }, W = (e) => {
10148
10202
  var n;
10149
10203
  let r = (n = e.clipboardData) == null ? void 0 : n.items;
10150
10204
  if (!r) return;
@@ -10154,50 +10208,50 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10154
10208
  n && i.push(n);
10155
10209
  }
10156
10210
  i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), m("upload", i));
10157
- }, Xv = () => {
10158
- T == null || T(), w = createEditor({
10159
- doc: v.value,
10211
+ }, G = () => {
10212
+ C == null || C(), S = createEditor({
10213
+ doc: _.value,
10160
10214
  schema: tagSchema,
10161
10215
  onChange: function() {
10162
10216
  var e = _asyncToGenerator(function* (e) {
10163
- v.value = e, N();
10217
+ _.value = e, O();
10164
10218
  });
10165
10219
  return function(n) {
10166
10220
  return e.apply(this, arguments);
10167
10221
  };
10168
10222
  }(),
10169
- onKeyDown: (e) => P(e)
10170
- }), T = w.input(a.value);
10171
- }, Zv = () => y.value === "slash" ? x.value.length < 1 ? !1 : void 0 : S.value.length < 1 ? !1 : void 0;
10223
+ onKeyDown: (e) => A(e)
10224
+ }), C = S.input(a.value);
10225
+ }, q = () => v.value === "slash" ? b.value.length < 1 ? !1 : void 0 : x.value.length < 1 ? !1 : void 0;
10172
10226
  return onMounted(() => {
10173
10227
  var e;
10174
- Xv(), (e = a.value) == null || e.addEventListener("paste", J);
10228
+ G(), (e = a.value) == null || e.addEventListener("paste", W);
10175
10229
  }), onUnmounted(() => {
10176
10230
  var e;
10177
- w.command(ReplaceAll, ""), T == null || T(), (e = a.value) == null || e.removeEventListener("paste", J);
10231
+ S.command(ReplaceAll, ""), C == null || C(), (e = a.value) == null || e.removeEventListener("paste", W);
10178
10232
  }), r({
10179
10233
  cleanup: () => {
10180
- w.command(ReplaceAll, "");
10234
+ S.command(ReplaceAll, "");
10181
10235
  },
10182
- focus: U
10183
- }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$17, [createElementVNode("div", {
10236
+ focus: R
10237
+ }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$18, [createElementVNode("div", {
10184
10238
  ref_key: "editorRef",
10185
10239
  ref: a,
10186
10240
  "aria-placeholder": n.placeholder,
10187
10241
  class: "ai-slash-input",
10188
10242
  spellcheck: "false"
10189
- }, [v.value.length && v.value.some((e) => e.length) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(v.value, (n, r) => (openBlock(), createElementBlock("div", { key: r }, [n.length ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(n, (i, a) => (openBlock(), createElementBlock(Fragment, { key: a }, [i.type === "text" ? (openBlock(), createElementBlock("span", _hoisted_3$10, toDisplayString(i.text), 1)) : i.type === "tag" ? (openBlock(), createElementBlock("span", {
10243
+ }, [_.value.length && _.value.some((e) => e.length) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(_.value, (n, r) => (openBlock(), createElementBlock("div", { key: r }, [n.length ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(n, (i, a) => (openBlock(), createElementBlock(Fragment, { key: a }, [i.type === "text" ? (openBlock(), createElementBlock("span", _hoisted_3$10, toDisplayString(i.text), 1)) : i.type === "tag" ? (openBlock(), createElementBlock("span", {
10190
10244
  key: 1,
10191
10245
  class: normalizeClass(`mention-tag-${i.data.type}`),
10192
10246
  contenteditable: "false",
10193
10247
  "data-tag-type": i.data.type
10194
10248
  }, [createTextVNode(toDisplayString(i.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
10195
10249
  class: "mention-tag-remove-icon",
10196
- onClick: (e) => q(n, i, a, r)
10197
- }, null, 8, ["onClick"])], 10, _hoisted_4$8)) : createCommentVNode("", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$6))]))), 128)) : createCommentVNode("", !0)], 8, _hoisted_2$12), createVNode(unref(TippyComponent), {
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), {
10198
10252
  ref_key: "tippyRef",
10199
10253
  ref: o,
10200
- "append-to": unref(D),
10254
+ "append-to": unref(w),
10201
10255
  arrow: !1,
10202
10256
  "hide-on-click": !0,
10203
10257
  interactive: !0,
@@ -10207,17 +10261,17 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10207
10261
  trigger: "manual",
10208
10262
  "trigger-target": a.value,
10209
10263
  "z-index": unref(EDITOR_MENU_Z_INDEX),
10210
- onHidden: F,
10211
- onShow: Zv
10264
+ onHidden: N,
10265
+ onShow: q
10212
10266
  }, {
10213
- content: withCtx(() => [y.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
10267
+ content: withCtx(() => [v.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
10214
10268
  key: 0,
10215
- "on-select": V,
10216
- "resource-list": x.value
10217
- }, null, 8, ["resource-list"])) : y.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
10269
+ "on-select": L,
10270
+ "resource-list": b.value
10271
+ }, null, 8, ["resource-list"])) : v.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
10218
10272
  key: 1,
10219
- "on-select": G,
10220
- prompts: S.value
10273
+ "on-select": V,
10274
+ prompts: x.value
10221
10275
  }, null, 8, ["prompts"])) : createCommentVNode("", !0)]),
10222
10276
  _: 1
10223
10277
  }, 8, [
@@ -10226,7 +10280,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10226
10280
  "z-index"
10227
10281
  ])]));
10228
10282
  }
10229
- }), _hoisted_1$16 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
10283
+ }), _hoisted_1$17 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
10230
10284
  __name: "input-attachment",
10231
10285
  props: { messageState: {} },
10232
10286
  emits: ["sendMessage", "stopSending"],
@@ -10234,9 +10288,9 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10234
10288
  let r = e, i = n, a = () => {
10235
10289
  i("stopSending");
10236
10290
  }, o = () => {
10237
- r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
10291
+ r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
10238
10292
  };
10239
- return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$16, [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), {
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), {
10240
10294
  key: 0,
10241
10295
  onClick: a
10242
10296
  }, null, 512)), [[unref(directive), {
@@ -10252,7 +10306,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10252
10306
  offset: [0, 16]
10253
10307
  }]])], 2)])]));
10254
10308
  }
10255
- }), _hoisted_1$15 = { class: "chat-input-container" }, _hoisted_2$11 = {
10309
+ }), _hoisted_1$16 = { class: "chat-input-container" }, _hoisted_2$12 = {
10256
10310
  key: 1,
10257
10311
  class: "ai-divider"
10258
10312
  }, chat_input_default = /* @__PURE__ */ defineComponent({
@@ -10261,6 +10315,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10261
10315
  defaultUploadFiles: {},
10262
10316
  inputMaxHeight: { default: 200 },
10263
10317
  messageStatus: {},
10318
+ modelValue: {},
10264
10319
  onSendMessage: {},
10265
10320
  onStopSending: {},
10266
10321
  onUpload: {},
@@ -10270,40 +10325,45 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10270
10325
  shortcutId: {},
10271
10326
  shortcuts: {}
10272
10327
  }, {
10273
- modelValue: { required: !0 },
10274
- modelModifiers: {},
10275
10328
  cite: {
10276
10329
  required: !1,
10277
10330
  default: ""
10278
10331
  },
10279
10332
  citeModifiers: {}
10280
10333
  }),
10281
- emits: /* @__PURE__ */ mergeModels(["selectShortcut", "deleteShortcut"], ["update:modelValue", "update:cite"]),
10334
+ emits: /* @__PURE__ */ mergeModels([
10335
+ "selectShortcut",
10336
+ "deleteShortcut",
10337
+ "update:modelValue"
10338
+ ], ["update:cite"]),
10282
10339
  setup(e, { expose: n, emit: r }) {
10283
- useCssVars((e) => ({ d9f0f2b4: unref(CHAT_Z_INDEX) }));
10284
- let i = useTemplateRef("aiSlashInputRef"), o = useTemplateRef("filesRef"), d = useModel(e, "modelValue"), p = useModel(e, "cite"), m = shallowRef(200), g = e, v = r, y = ref(g.defaultUploadFiles || []), b = computed(() => {
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(() => {
10285
10342
  var e;
10286
- return (e = g.shortcuts) == null ? void 0 : e.find((e) => e.id === g.shortcutId);
10287
- }), x = computed(() => d.value.length < 1 || Array.isArray(d.value) && !d.value[0] ? MessageStatus.Disabled : g.messageStatus), S = computed(() => typeof g.onUpload == "function");
10343
+ return (e = m.shortcuts) == null ? void 0 : e.find((e) => e.id === m.shortcutId);
10344
+ }), b = computed(() => {
10345
+ var e;
10346
+ 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");
10288
10348
  watchPostEffect(() => {
10289
10349
  var e;
10290
- let n = g.inputMaxHeight || 200;
10291
- if (y.value.length < 1 || !o.value) {
10292
- m.value = n;
10350
+ let n = m.inputMaxHeight || 200;
10351
+ if (v.value.length < 1 || !o.value) {
10352
+ p.value = n;
10293
10353
  return;
10294
10354
  }
10295
- m.value = n + (((e = o.value) == null ? void 0 : e.clientHeight) || 0);
10355
+ p.value = n + (((e = o.value) == null ? void 0 : e.clientHeight) || 0);
10296
10356
  });
10297
- let C = function() {
10357
+ let S = function() {
10298
10358
  var e = _asyncToGenerator(function* () {
10299
10359
  try {
10300
10360
  var e, n, r, a;
10301
10361
  (e = i.value) == null || (n = e.cleanup) == null || n.call(e);
10302
10362
  let s;
10303
- if (!((r = y.value) != null && r.length)) s = typeof d.value == "string" ? d.value : docToString(d.value);
10363
+ if (!((r = v.value) != null && r.length)) s = typeof m.modelValue == "string" ? m.modelValue : docToString(m.modelValue);
10304
10364
  else {
10305
10365
  var o;
10306
- s = (o = y.value) == null ? void 0 : o.slice().map((e) => {
10366
+ s = (o = v.value) == null ? void 0 : o.slice().map((e) => {
10307
10367
  var n, r;
10308
10368
  return {
10309
10369
  type: MessageContentType.Binary,
@@ -10311,12 +10371,12 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10311
10371
  mimeType: ((n = e.file) == null ? void 0 : n.type) || "",
10312
10372
  filename: ((r = e.file) == null ? void 0 : r.name) || ""
10313
10373
  };
10314
- }), d.value && s.push({
10374
+ }), m.modelValue && s.push({
10315
10375
  type: MessageContentType.Text,
10316
- text: docToString(d.value)
10376
+ text: docToString(m.modelValue)
10317
10377
  });
10318
10378
  }
10319
- (a = g.onSendMessage) == null || a.call(g, s, d.value), y.value = [];
10379
+ (a = m.onSendMessage) == null || a.call(m, s, m.modelValue), v.value = [];
10320
10380
  } catch (e) {
10321
10381
  console.error(e);
10322
10382
  }
@@ -10324,16 +10384,16 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10324
10384
  return function() {
10325
10385
  return e.apply(this, arguments);
10326
10386
  };
10327
- }(), w = (e) => {
10387
+ }(), C = (e) => {
10328
10388
  if (e.key === "Enter" || e.key === "NumpadEnter") {
10329
- if (e.shiftKey) return;
10330
- C();
10389
+ if (e.shiftKey || b.value === MessageStatus.Disabled) return;
10390
+ S();
10331
10391
  }
10332
- }, T = function() {
10392
+ }, w = function() {
10333
10393
  var e = _asyncToGenerator(function* () {
10334
10394
  try {
10335
10395
  var e;
10336
- (e = g.onStopSending) == null || e.call(g);
10396
+ (e = m.onStopSending) == null || e.call(m);
10337
10397
  } catch (e) {
10338
10398
  console.error(e);
10339
10399
  }
@@ -10341,17 +10401,17 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10341
10401
  return function() {
10342
10402
  return e.apply(this, arguments);
10343
10403
  };
10344
- }(), E = () => {
10345
- p.value = "";
10346
- }, k = (e) => {
10347
- v("selectShortcut", e);
10348
- }, A = () => {
10349
- v("deleteShortcut");
10350
- }, j = function() {
10404
+ }(), T = () => {
10405
+ d.value = "";
10406
+ }, E = (e) => {
10407
+ g("selectShortcut", e);
10408
+ }, k = () => {
10409
+ g("deleteShortcut");
10410
+ }, A = function() {
10351
10411
  var e = _asyncToGenerator(function* (e) {
10352
- if (S.value) for (let r of e) {
10412
+ if (x.value) for (let r of e) {
10353
10413
  var n;
10354
- if (y.value.find((e) => {
10414
+ if (v.value.find((e) => {
10355
10415
  var n;
10356
10416
  return ((n = e.file) == null ? void 0 : n.name) === r.name;
10357
10417
  })) continue;
@@ -10359,7 +10419,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10359
10419
  file: r,
10360
10420
  status: UploadStatus.Pending
10361
10421
  };
10362
- y.value.push(e), (n = g.onUpload) == null || n.call(g, r).then((n) => {
10422
+ v.value.push(e), (n = m.onUpload) == null || n.call(m, r).then((n) => {
10363
10423
  if (n && typeof n == "object" && "download_url" in n) {
10364
10424
  e.url = n.download_url, e.status = UploadStatus.Success;
10365
10425
  return;
@@ -10373,73 +10433,75 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10373
10433
  return function(n) {
10374
10434
  return e.apply(this, arguments);
10375
10435
  };
10376
- }(), N = (e) => {
10377
- y.value = y.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
10436
+ }(), 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) => {
10439
+ g("update:modelValue", e, n);
10378
10440
  };
10379
10441
  return n({
10380
10442
  focus: () => {
10381
10443
  var e, n;
10382
10444
  (e = i.value) == null || (n = e.focus) == null || n.call(e);
10383
10445
  },
10384
- triggerSendMessage: C
10385
- }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$15, [renderSlot(n.$slots, "top"), createElementVNode("div", {
10446
+ triggerSendMessage: S
10447
+ }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$16, [renderSlot(n.$slots, "top"), createElementVNode("div", {
10386
10448
  class: "chat-input",
10387
- style: normalizeStyle({ maxHeight: m.value + "px" })
10449
+ style: normalizeStyle({ maxHeight: p.value + "px" })
10388
10450
  }, [
10389
- renderSlot(n.$slots, "input-header", {}, () => [p.value ? (openBlock(), createBlock(cite_content_default, {
10451
+ renderSlot(n.$slots, "input-header", {}, () => [d.value ? (openBlock(), createBlock(cite_content_default, {
10390
10452
  key: 0,
10391
10453
  class: "chat-input-cite",
10392
- content: p.value,
10393
- onClose: E
10454
+ content: d.value,
10455
+ onClose: T
10394
10456
  }, null, 8, ["content"])) : createCommentVNode("", !0)]),
10395
- renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: y.value })), () => [y.value.length ? (openBlock(), createElementBlock("div", {
10457
+ renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: v.value })), () => [v.value.length ? (openBlock(), createElementBlock("div", {
10396
10458
  key: 0,
10397
10459
  ref_key: "filesRef",
10398
10460
  ref: o,
10399
10461
  class: "chat-input-files"
10400
10462
  }, [createVNode(file_content_default, {
10401
- files: y.value,
10402
- onDeleteFile: N
10463
+ files: v.value,
10464
+ onDeleteFile: j
10403
10465
  }, null, 8, ["files"])], 512)) : createCommentVNode("", !0)]),
10404
10466
  createVNode(ai_slash_input_default, {
10405
10467
  ref_key: "aiSlashInputRef",
10406
10468
  ref: i,
10407
- modelValue: d.value,
10408
- "onUpdate:modelValue": r[0] || (r[0] = (e) => d.value = e),
10469
+ "model-value": e.modelValue,
10409
10470
  placeholder: e.placeholder,
10410
10471
  prompts: e.prompts,
10411
10472
  resources: e.resources,
10412
- onKeydown: w,
10413
- onUpload: j
10473
+ onKeydown: C,
10474
+ "onUpdate:modelValue": N,
10475
+ onUpload: A
10414
10476
  }, null, 8, [
10415
- "modelValue",
10477
+ "model-value",
10416
10478
  "placeholder",
10417
10479
  "prompts",
10418
10480
  "resources"
10419
10481
  ]),
10420
10482
  createVNode(input_attachment_default, {
10421
- "message-state": x.value,
10422
- onSendMessage: C,
10423
- onStopSending: T
10483
+ "message-state": b.value,
10484
+ onSendMessage: S,
10485
+ onStopSending: w
10424
10486
  }, {
10425
10487
  default: withCtx(() => {
10426
10488
  var r;
10427
10489
  return [
10428
- S.value ? (openBlock(), createBlock(file_upload_btn_default, {
10490
+ x.value ? (openBlock(), createBlock(file_upload_btn_default, {
10429
10491
  key: 0,
10430
- onUpload: j
10492
+ onUpload: A
10431
10493
  })) : createCommentVNode("", !0),
10432
- S.value && ((r = e.shortcuts) != null && r.length || b.value) ? (openBlock(), createElementBlock("span", _hoisted_2$11)) : createCommentVNode("", !0),
10433
- renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !b.value ? (openBlock(), createBlock(shortcut_btns_default, {
10494
+ x.value && ((r = e.shortcuts) != null && r.length || y.value) ? (openBlock(), createElementBlock("span", _hoisted_2$12)) : createCommentVNode("", !0),
10495
+ renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !y.value ? (openBlock(), createBlock(shortcut_btns_default, {
10434
10496
  key: 0,
10435
10497
  shortcuts: e.shortcuts,
10436
- onSelectShortcut: k
10437
- }, null, 8, ["shortcuts"])) : createCommentVNode("", !0), b.value ? (openBlock(), createBlock(shortcut_btn_default, {
10498
+ onSelectShortcut: E
10499
+ }, null, 8, ["shortcuts"])) : createCommentVNode("", !0), y.value ? (openBlock(), createBlock(shortcut_btn_default, {
10438
10500
  key: 1,
10439
10501
  class: "selected-shortcut-btn",
10440
- shortcut: b.value
10502
+ shortcut: y.value
10441
10503
  }, {
10442
- append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: A })]),
10504
+ append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: k })]),
10443
10505
  _: 1
10444
10506
  }, 8, ["shortcut"])) : createCommentVNode("", !0)])
10445
10507
  ];
@@ -10449,16 +10511,78 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10449
10511
  }, 8, ["message-state"])
10450
10512
  ], 4)]));
10451
10513
  }
10452
- }), _hoisted_1$14 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
10514
+ }), _hoisted_1$15 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
10453
10515
  __name: "scroll-btn",
10454
10516
  props: {
10455
10517
  disabled: { type: Boolean },
10456
10518
  title: {}
10457
10519
  },
10458
10520
  setup(e) {
10459
- return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$14, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
10521
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$15, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
10460
10522
  }
10461
- }), _hoisted_1$13 = { class: "ai-user-feedback" }, _hoisted_2$10 = { class: "ai-feedback-title" }, _hoisted_3$9 = { 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({
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({
10524
+ __name: "delete-tool",
10525
+ props: {
10526
+ description: {},
10527
+ id: {},
10528
+ name: {},
10529
+ disabled: { type: Boolean },
10530
+ tippyOptions: {}
10531
+ },
10532
+ emits: ["confirm", "cancel"],
10533
+ setup(e, { emit: n }) {
10534
+ let r = e, i = n, o = useTemplateRef("tippyRef"), c = computed(() => ({
10535
+ id: r.id,
10536
+ name: r.name,
10537
+ description: r.description,
10538
+ disabled: r.disabled,
10539
+ tippyOptions: r.tippyOptions
10540
+ })), l = computed(() => _objectSpread2({
10541
+ arrow: !1,
10542
+ interactive: !0,
10543
+ offset: [0, 6],
10544
+ theme: "ai-chat-box-light light",
10545
+ trigger: "click",
10546
+ appendTo: () => document.body
10547
+ }, r.tippyOptions || {})), p = () => {
10548
+ if (r.disabled) return !1;
10549
+ }, m = () => {
10550
+ var e, n;
10551
+ (e = o.value) == null || (n = e.hide) == null || n.call(e);
10552
+ }, g = () => {
10553
+ m(), i("confirm");
10554
+ }, v = () => {
10555
+ m(), i("cancel");
10556
+ };
10557
+ return onUnmounted(() => {
10558
+ m();
10559
+ }), (e, n) => (openBlock(), createBlock(unref(TippyComponent), mergeProps({
10560
+ ref_key: "tippyRef",
10561
+ 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),
10565
+ createElementVNode("div", _hoisted_3$9, toDisplayString(unref(t)("删除操作无法撤回,请谨慎操作!")), 1),
10566
+ createElementVNode("div", _hoisted_4$8, [createVNode(unref(Button), {
10567
+ size: "small",
10568
+ theme: "danger",
10569
+ onClick: g
10570
+ }, {
10571
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("删除")), 1)]),
10572
+ _: 1
10573
+ }), createVNode(unref(Button), {
10574
+ size: "small",
10575
+ onClick: v
10576
+ }, {
10577
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
10578
+ _: 1
10579
+ })])
10580
+ ])]),
10581
+ default: withCtx(() => [createVNode(tool_btn_default, normalizeProps(guardReactiveProps(c.value)), null, 16)]),
10582
+ _: 1
10583
+ }, 16));
10584
+ }
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({
10462
10586
  __name: "user-feedback",
10463
10587
  props: {
10464
10588
  loading: { type: Boolean },
@@ -10476,7 +10600,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10476
10600
  };
10477
10601
  return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$13, [
10478
10602
  createElementVNode("div", _hoisted_2$10, toDisplayString(n.title), 1),
10479
- createElementVNode("div", _hoisted_3$9, [n.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
10603
+ createElementVNode("div", _hoisted_3$8, [n.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
10480
10604
  key: e,
10481
10605
  class: "reason-item ai-skeleton-element"
10482
10606
  })), 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(n.reasonList, (e) => (openBlock(), createElementBlock("div", {
@@ -10517,7 +10641,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10517
10641
  }, _hoisted_2$9 = {
10518
10642
  class: "message-tools",
10519
10643
  style: { "margin-right": "8px" }
10520
- }, _hoisted_3$8 = {
10644
+ }, _hoisted_3$7 = {
10521
10645
  key: 0,
10522
10646
  class: "ai-divider",
10523
10647
  style: { "margin-right": "8px" }
@@ -10556,41 +10680,69 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10556
10680
  return function(n) {
10557
10681
  return e.apply(this, arguments);
10558
10682
  };
10559
- }(), y = () => {
10683
+ }(), y = function() {
10684
+ var e = _asyncToGenerator(function* (e) {
10685
+ var n;
10686
+ yield (n = i.onAction) == null ? void 0 : n.call(i, e);
10687
+ });
10688
+ return function(n) {
10689
+ return e.apply(this, arguments);
10690
+ };
10691
+ }(), b = () => {
10560
10692
  var e;
10561
10693
  (e = d.value) == null || e.forEach((e) => {
10562
10694
  var n;
10563
10695
  return e == null || (n = e.hide) == null ? void 0 : n.call(e);
10564
10696
  });
10565
- }, b = (e) => g.value ? g.value === "like" && e === "like" ? "activeLike" : g.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, x = (e, n, r) => {
10566
- y(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
10567
- }, S = (e) => {
10697
+ }, 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) || "";
10701
+ }, C = (e, n, r) => {
10702
+ b(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
10703
+ }, T = (e) => {
10568
10704
  if (i.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
10569
10705
  if (g.value && g.value === e) return g.value = null, !1;
10570
10706
  };
10571
10707
  return onUnmounted(() => {
10572
- y(), m.value = [];
10708
+ b(), m.value = [];
10573
10709
  }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [
10574
- createElementVNode("div", _hoisted_2$9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.messageTools, (e) => (openBlock(), createBlock(tool_btn_default, mergeProps({
10575
- key: e.id,
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({
10711
+ key: 0,
10712
+ ref_for: !0
10713
+ }, r, {
10714
+ disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10715
+ "tippy-options": n.tippyOptions,
10716
+ onConfirm: (e) => y(r)
10717
+ }), null, 16, [
10718
+ "disabled",
10719
+ "tippy-options",
10720
+ "onConfirm"
10721
+ ])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
10722
+ key: 1,
10576
10723
  ref_for: !0
10577
- }, e, {
10724
+ }, r, {
10578
10725
  disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10579
- onClick: (n) => v(e)
10580
- }), null, 16, ["disabled", "onClick"]))), 128))]),
10581
- n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$8)) : createCommentVNode("", !0),
10726
+ "tippy-options": n.tippyOptions,
10727
+ onClick: (e) => v(r)
10728
+ }), null, 16, [
10729
+ "disabled",
10730
+ "tippy-options",
10731
+ "onClick"
10732
+ ]))], 64))), 128))]),
10733
+ n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7)) : createCommentVNode("", !0),
10582
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({
10583
10735
  key: 0,
10584
10736
  ref_for: !0,
10585
10737
  ref_key: "feedbackTippyRef",
10586
10738
  ref: d
10587
- }, { ref_for: !0 }, _.value, { onShow: (e) => S(r.id) }), {
10739
+ }, { ref_for: !0 }, _.value, { onShow: (e) => T(r.id) }), {
10588
10740
  content: withCtx(() => [createVNode(user_feedback_default, {
10589
10741
  loading: p.value,
10590
10742
  "reason-list": m.value,
10591
10743
  title: r.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
10592
- onCancel: y,
10593
- onSubmit: (e, n) => x(r, e, n)
10744
+ onCancel: b,
10745
+ onSubmit: (e, n) => C(r, e, n)
10594
10746
  }, null, 8, [
10595
10747
  "loading",
10596
10748
  "reason-list",
@@ -10598,30 +10750,48 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10598
10750
  "onSubmit"
10599
10751
  ])]),
10600
10752
  default: withCtx(() => [createVNode(tool_btn_default, mergeProps({ ref_for: !0 }, r, {
10601
- id: b(r.id),
10753
+ id: x(r.id),
10602
10754
  active: g.value === r.id,
10603
10755
  disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10756
+ "tippy-options": _objectSpread2(_objectSpread2({}, n.tippyOptions), {}, { content: S(r.id) }),
10604
10757
  onClick: (e) => v(r)
10605
10758
  }), null, 16, [
10606
10759
  "id",
10607
10760
  "active",
10608
10761
  "disabled",
10762
+ "tippy-options",
10609
10763
  "onClick"
10610
10764
  ])]),
10611
10765
  _: 2
10612
- }, 1040, ["onShow"])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
10766
+ }, 1040, ["onShow"])) : r.id === "delete" ? (openBlock(), createBlock(delete_tool_default, mergeProps({
10613
10767
  key: 1,
10614
10768
  ref_for: !0
10615
10769
  }, r, {
10616
10770
  disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10771
+ "tippy-options": n.tippyOptions,
10772
+ onConfirm: (e) => y(r)
10773
+ }), null, 16, [
10774
+ "disabled",
10775
+ "tippy-options",
10776
+ "onConfirm"
10777
+ ])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
10778
+ key: 2,
10779
+ ref_for: !0
10780
+ }, r, {
10781
+ disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10782
+ "tippy-options": n.tippyOptions,
10617
10783
  onClick: (e) => v(r)
10618
- }), null, 16, ["disabled", "onClick"]))], 64))), 128))])
10784
+ }), null, 16, [
10785
+ "disabled",
10786
+ "tippy-options",
10787
+ "onClick"
10788
+ ]))], 64))), 128))])
10619
10789
  ], 512));
10620
10790
  }
10621
10791
  }), _hoisted_1$11 = { class: "ai-loading-ring" }, _hoisted_2$8 = {
10622
10792
  fill: "none",
10623
10793
  viewBox: "0 0 26 26"
10624
- }, _hoisted_3$7 = ["fill"], _hoisted_4$5 = { class: "ai-loading-star" }, _hoisted_5$4 = {
10794
+ }, _hoisted_3$6 = ["fill"], _hoisted_4$5 = { class: "ai-loading-star" }, _hoisted_5$4 = {
10625
10795
  fill: "none",
10626
10796
  viewBox: "0 0 26 26"
10627
10797
  }, _hoisted_6 = ["fill"], ai_loading_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AiLoading" }), {}, {
@@ -10644,7 +10814,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10644
10814
  }, [createElementVNode("div", _hoisted_1$11, [(openBlock(), createElementBlock("svg", _hoisted_2$8, [createElementVNode("path", {
10645
10815
  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",
10646
10816
  fill: `url(#${i})`
10647
- }, null, 8, _hoisted_3$7), createElementVNode("defs", null, [createElementVNode("linearGradient", {
10817
+ }, null, 8, _hoisted_3$6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
10648
10818
  id: i,
10649
10819
  gradientUnits: "userSpaceOnUse",
10650
10820
  x1: "6.50423",
@@ -10683,7 +10853,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10683
10853
  }, null, -1)
10684
10854
  ])])])]))])], 6));
10685
10855
  }
10686
- })), _hoisted_1$10 = { class: "ai-activity-message" }, _hoisted_2$7 = { class: "ai-activity-message-title-icon" }, _hoisted_3$6 = { class: "ai-activity-message-title-text" }, _hoisted_4$4 = { class: "ai-activity-message-content" }, _hoisted_5$3 = {
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 = {
10687
10857
  key: 0,
10688
10858
  class: "knowledge-rag-content"
10689
10859
  }, activity_message_default = /* @__PURE__ */ defineComponent({
@@ -10715,13 +10885,16 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10715
10885
  class: "ai-activity-message-title",
10716
10886
  onClick: a[0] || (a[0] = (e) => o.value = !o.value)
10717
10887
  }, [
10718
- 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), { key: 1 }))]),
10719
- createElementVNode("span", _hoisted_3$6, toDisplayString(i.value), 1),
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), {
10889
+ key: 1,
10890
+ style: { "font-size": "12px" }
10891
+ }))]),
10892
+ createElementVNode("span", _hoisted_3$5, toDisplayString(i.value), 1),
10720
10893
  createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10721
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]])]);
10722
10895
  };
10723
10896
  }
10724
- }), _hoisted_1$9 = { class: "toolcall-desc" }, _hoisted_2$6 = { class: "desc-title" }, _hoisted_3$5 = { class: "desc-panel" }, _hoisted_4$3 = { class: "desc-label" }, _hoisted_5$2 = { class: "desc-value" }, desc_panel_default = /* @__PURE__ */ defineComponent({
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({
10725
10898
  __name: "desc-panel",
10726
10899
  props: {
10727
10900
  desc: {},
@@ -10735,7 +10908,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10735
10908
  return r.desc;
10736
10909
  }
10737
10910
  });
10738
- return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", _hoisted_2$6, toDisplayString(n.title), 1), createElementVNode("div", _hoisted_3$5, [typeof i.value == "object" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(i.value, (e, n) => (openBlock(), createElementBlock("div", {
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", {
10739
10912
  key: n,
10740
10913
  class: "desc-panel-item"
10741
10914
  }, [createElementVNode("span", _hoisted_4$3, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$2, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
@@ -10763,7 +10936,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10763
10936
  title: unref(t)("返回内容")
10764
10937
  }, null, 8, ["desc", "title"])]));
10765
10938
  }
10766
- }), _hoisted_1$7 = { class: "ai-toolcall-render" }, _hoisted_2$5 = { class: "toolcall-header-title" }, _hoisted_3$4 = { class: "toolcall-status-title" }, _hoisted_4$2 = {
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 = {
10767
10940
  key: 1,
10768
10941
  class: "toolcall-duration"
10769
10942
  }, _hoisted_5$1 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
@@ -10804,7 +10977,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10804
10977
  text: i.value,
10805
10978
  appendTo: "parent"
10806
10979
  }]]),
10807
- createElementVNode("span", _hoisted_3$4, [
10980
+ createElementVNode("span", _hoisted_3$3, [
10808
10981
  e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming ? (openBlock(), createBlock(unref(Loading), {
10809
10982
  key: 0,
10810
10983
  mode: "spin",
@@ -10878,12 +11051,12 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10878
11051
  })(/* @__PURE__ */ defineComponent({
10879
11052
  __name: "loading-message",
10880
11053
  setup(e) {
10881
- return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(ai_loading_default, { size: 18 }), createTextVNode(" " + toDisplayString(unref(t)("请求中...")), 1)]));
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)]));
10882
11055
  }
10883
- }), [["__scopeId", "data-v-8bb47301"]]), _hoisted_1$3 = { class: "ai-reasoning-message" }, _hoisted_2$3 = {
11056
+ }), [["__scopeId", "data-v-e4b604cd"]]), _hoisted_1$3 = { class: "ai-reasoning-message" }, _hoisted_2$3 = {
10884
11057
  key: 0,
10885
11058
  class: "ai-reasoning-message-title-icon"
10886
- }, _hoisted_3$3 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$1 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
11059
+ }, _hoisted_3$2 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$1 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
10887
11060
  __name: "reasoning-message",
10888
11061
  props: /* @__PURE__ */ mergeModels({
10889
11062
  duration: {},
@@ -10928,7 +11101,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10928
11101
  onClick: a[0] || (a[0] = (e) => i.value = !i.value)
10929
11102
  }, [
10930
11103
  n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock("span", _hoisted_2$3, [createVNode(ai_loading_default)])) : createCommentVNode("", !0),
10931
- createElementVNode("span", _hoisted_3$3, toDisplayString(d.value), 1),
11104
+ createElementVNode("span", _hoisted_3$2, toDisplayString(d.value), 1),
10932
11105
  createElementVNode("span", { class: normalizeClass(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": i.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10933
11106
  ], 2), withDirectives(createElementVNode("div", _hoisted_4$1, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
10934
11107
  key: 0,
@@ -10942,14 +11115,14 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10942
11115
  }), _hoisted_1$2 = { class: "ai-key-value-content" }, _hoisted_2$2 = {
10943
11116
  key: 0,
10944
11117
  class: "ai-key-value-title"
10945
- }, _hoisted_3$2 = { class: "ai-key-value-content" }, _hoisted_4 = { class: "item-key" }, _hoisted_5 = { class: "item-value" }, key_value_content_default = /* @__PURE__ */ defineComponent({
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({
10946
11119
  __name: "key-value-content",
10947
11120
  props: {
10948
11121
  content: {},
10949
11122
  title: {}
10950
11123
  },
10951
11124
  setup(n) {
10952
- 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$2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.content, (e) => (openBlock(), createElementBlock("div", {
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", {
10953
11126
  key: e.key,
10954
11127
  class: "key-value-item"
10955
11128
  }, [
@@ -10961,7 +11134,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10961
11134
  }), _hoisted_1$1 = { class: "ai-user-message" }, _hoisted_2$1 = {
10962
11135
  key: 1,
10963
11136
  class: "ai-user-message-content"
10964
- }, _hoisted_3$1 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
11137
+ }, _hoisted_3 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
10965
11138
  __name: "user-message",
10966
11139
  props: {
10967
11140
  content: {},
@@ -10972,6 +11145,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
10972
11145
  status: {},
10973
11146
  property: {},
10974
11147
  onAction: { type: Function },
11148
+ tippyOptions: {},
10975
11149
  messageToolsStatus: {},
10976
11150
  onInputConfirm: { type: Function },
10977
11151
  onShortcutConfirm: { type: Function }
@@ -11081,7 +11255,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11081
11255
  "default-upload-files": y.value,
11082
11256
  "on-send-message": D
11083
11257
  }, {
11084
- "send-icon": withCtx(() => [createElementVNode("div", _hoisted_3$1, [createVNode(unref(Button), {
11258
+ "send-icon": withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(Button), {
11085
11259
  size: "small",
11086
11260
  onClick: C
11087
11261
  }, {
@@ -11124,8 +11298,13 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11124
11298
  "message-tools": unref(CONST_USER_MESSAGE_TOOLS),
11125
11299
  "message-tools-status": n.messageToolsStatus,
11126
11300
  "on-action": x,
11301
+ "tippy-options": n.tippyOptions,
11127
11302
  "update-tools": []
11128
- }, null, 8, ["message-tools", "message-tools-status"]))
11303
+ }, null, 8, [
11304
+ "message-tools",
11305
+ "message-tools-status",
11306
+ "tippy-options"
11307
+ ]))
11129
11308
  ], 64))]));
11130
11309
  }
11131
11310
  }), message_render_default = /* @__PURE__ */ defineComponent({
@@ -11135,6 +11314,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11135
11314
  onInputConfirm: { type: Function },
11136
11315
  onShortcutConfirm: { type: Function },
11137
11316
  onAction: { type: Function },
11317
+ tippyOptions: {},
11138
11318
  message: {}
11139
11319
  },
11140
11320
  setup(e) {
@@ -11144,7 +11324,8 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11144
11324
  onAction: n.onAction,
11145
11325
  onInputConfirm: n.onInputConfirm,
11146
11326
  onShortcutConfirm: n.onShortcutConfirm,
11147
- messageToolsStatus: n.messageToolsStatus
11327
+ messageToolsStatus: n.messageToolsStatus,
11328
+ tippyOptions: n.tippyOptions
11148
11329
  }));
11149
11330
  case MessageRole.Assistant: return h(assistant_message_default, n.message, { default: (e) => renderSlot(r, "default", e, () => [h(content_render_default, {
11150
11331
  content: n.message.content || "",
@@ -11160,16 +11341,17 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11160
11341
  });
11161
11342
  return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
11162
11343
  }
11163
- }), _hoisted_1 = ["onMouseenter", "onMouseleave"], _hoisted_2 = { class: "message-group-messages" }, _hoisted_3 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
11344
+ }), _hoisted_1 = ["onMouseenter", "onMouseleave"], _hoisted_2 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
11164
11345
  __name: "message-container",
11165
11346
  props: /* @__PURE__ */ mergeModels({
11166
11347
  enableSelection: {
11167
11348
  type: Boolean,
11168
- default: !0
11349
+ default: !1
11169
11350
  },
11170
11351
  messages: {},
11171
11352
  messageStatus: {},
11172
11353
  messageToolsStatus: {},
11354
+ messageToolsTippyOptions: {},
11173
11355
  onAgentAction: {},
11174
11356
  onAgentFeedback: {},
11175
11357
  onUserAction: {},
@@ -11181,7 +11363,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11181
11363
  }),
11182
11364
  emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
11183
11365
  setup(n) {
11184
- let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), { isScrollBottom: p, toScrollBottom: m, scrollBottomHeight: g } = useContainerScrollProvider(a, o), { copy: _ } = useClipboard(), v = { appendTo: () => document.querySelector(".draggable-container-content") || document.body };
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();
11185
11367
  watchEffect(() => {
11186
11368
  var e;
11187
11369
  let n = [], i = [];
@@ -11242,15 +11424,15 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11242
11424
  immediate: !0,
11243
11425
  flush: "post"
11244
11426
  });
11245
- let y = function() {
11427
+ let _ = function() {
11246
11428
  var e = _asyncToGenerator(function* (e, n) {
11247
11429
  var i;
11248
- return e.id === "copy" && (console.log("messages", n), _(n.filter((e) => e.role !== MessageRole.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"))), (i = r.onAgentAction) == null ? void 0 : i.call(r, e, n);
11430
+ return e.id === "copy" && (console.log("messages", n), g(n.filter((e) => e.role !== MessageRole.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"))), (i = r.onAgentAction) == null ? void 0 : i.call(r, e, n);
11249
11431
  });
11250
11432
  return function(n, r) {
11251
11433
  return e.apply(this, arguments);
11252
11434
  };
11253
- }(), b = function() {
11435
+ }(), v = function() {
11254
11436
  var e = _asyncToGenerator(function* (e, n) {
11255
11437
  var i;
11256
11438
  (i = r.onUserAction) == null || i.call(r, e, n);
@@ -11258,11 +11440,11 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11258
11440
  return function(n, r) {
11259
11441
  return e.apply(this, arguments);
11260
11442
  };
11261
- }(), x = (e) => {
11443
+ }(), y = (e) => {
11262
11444
  e.isHover = !0;
11263
- }, S = (e) => {
11445
+ }, b = (e) => {
11264
11446
  e.isHover = !1;
11265
- }, C = (e, n) => {
11447
+ }, x = (e, n) => {
11266
11448
  var r, a;
11267
11449
  let o = e.type === MessageRole.User;
11268
11450
  (r = d.value) == null || r.forEach((r, i) => {
@@ -11272,7 +11454,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11272
11454
  e && (e.checked = n);
11273
11455
  }
11274
11456
  }), i.value = (a = d.value) == null ? void 0 : a.filter((e) => e.checked).map((e) => e.messages).flat();
11275
- }, T = function() {
11457
+ }, S = function() {
11276
11458
  var e = _asyncToGenerator(function* (e, n, i) {
11277
11459
  var a;
11278
11460
  (a = r.onUserInputConfirm) == null || a.call(r, e, n, i);
@@ -11280,7 +11462,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11280
11462
  return function(n, r, i) {
11281
11463
  return e.apply(this, arguments);
11282
11464
  };
11283
- }(), E = function() {
11465
+ }(), C = function() {
11284
11466
  var e = _asyncToGenerator(function* (e, n) {
11285
11467
  var i;
11286
11468
  (i = r.onUserShortcutConfirm) == null || i.call(r, e, n);
@@ -11289,7 +11471,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11289
11471
  return e.apply(this, arguments);
11290
11472
  };
11291
11473
  }();
11292
- return (i, _) => (openBlock(), createElementBlock("div", {
11474
+ return (i, g) => (openBlock(), createElementBlock("div", {
11293
11475
  ref_key: "messageContainerRef",
11294
11476
  ref: a,
11295
11477
  class: "ai-message-container"
@@ -11298,14 +11480,17 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11298
11480
  key: o,
11299
11481
  class: "message-group",
11300
11482
  style: normalizeStyle({ backgroundColor: a.checked ? "#f5f7fa" : "transparent" }),
11301
- onMouseenter: (e) => x(a),
11302
- onMouseleave: (e) => S(a)
11483
+ onMouseenter: (e) => y(a),
11484
+ onMouseleave: (e) => b(a)
11303
11485
  }, [n.enableSelection && a.type !== unref(MessageRole).Loading ? (openBlock(), createBlock(unref(Checkbox), {
11304
- key: o,
11486
+ key: 0,
11305
11487
  class: "message-group-checkbox",
11306
11488
  "model-value": a.checked,
11307
- "onUpdate:modelValue": (e) => C(a, e)
11308
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.messages, (e, r) => renderSlot(i.$slots, "default", mergeProps({
11489
+ "onUpdate:modelValue": (e) => x(a, e)
11490
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", {
11491
+ class: "message-group-messages",
11492
+ style: normalizeStyle({ width: n.enableSelection && a.type !== unref(MessageRole).Loading ? "calc(100% - 16px)" : "100%" })
11493
+ }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.messages, (e, r) => renderSlot(i.$slots, "default", mergeProps({
11309
11494
  key: r,
11310
11495
  ref_for: !0
11311
11496
  }, {
@@ -11315,20 +11500,22 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11315
11500
  key: r,
11316
11501
  message: e,
11317
11502
  "message-tools-status": n.messageToolsStatus,
11318
- "on-action": (n) => b(n, e),
11319
- "on-input-confirm": (n, r) => T(e, n, r),
11320
- "on-shortcut-confirm": (n) => E(e, n)
11503
+ "on-action": (n) => v(n, e),
11504
+ "on-input-confirm": (n, r) => S(e, n, r),
11505
+ "on-shortcut-confirm": (n) => C(e, n),
11506
+ "tippy-options": n.messageToolsTippyOptions
11321
11507
  }, null, 8, [
11322
11508
  "message",
11323
11509
  "message-tools-status",
11324
11510
  "on-action",
11325
11511
  "on-input-confirm",
11326
- "on-shortcut-confirm"
11512
+ "on-shortcut-confirm",
11513
+ "tippy-options"
11327
11514
  ]))])), 128)), a.type === unref(MessageRole).Assistant && n.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
11328
11515
  key: 0,
11329
11516
  "message-tools-status": n.messageToolsStatus,
11330
- "on-action": (e) => y(e, a.messages),
11331
- "tippy-options": v,
11517
+ "on-action": (e) => _(e, a.messages),
11518
+ "tippy-options": r.messageToolsTippyOptions,
11332
11519
  onFeedback: (e, n, i) => {
11333
11520
  var o;
11334
11521
  return (o = r.onAgentFeedback) == null ? void 0 : o.call(r, e, a.messages, n, i);
@@ -11336,28 +11523,29 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
11336
11523
  }, null, 8, [
11337
11524
  "message-tools-status",
11338
11525
  "on-action",
11526
+ "tippy-options",
11339
11527
  "onFeedback"
11340
- ])) : createCommentVNode("", !0)])], 44, _hoisted_1))), 128)),
11528
+ ])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1))), 128)),
11341
11529
  createElementVNode("div", {
11342
11530
  ref_key: "messageContainerBottomRef",
11343
11531
  ref: o,
11344
11532
  class: "message-container-bottom",
11345
11533
  tabindex: "0"
11346
11534
  }, null, 512),
11347
- createElementVNode("div", _hoisted_3, [withDirectives(createVNode(scroll_btn_default, {
11535
+ createElementVNode("div", _hoisted_2, [withDirectives(createVNode(scroll_btn_default, {
11348
11536
  title: unref(t)("停止生成"),
11349
- onClick: _[0] || (_[0] = (e) => i.$emit("stopStreaming"))
11537
+ onClick: g[0] || (g[0] = (e) => i.$emit("stopStreaming"))
11350
11538
  }, {
11351
11539
  icon: withCtx(() => [createVNode(unref(CloseCircleIcon))]),
11352
11540
  _: 1
11353
11541
  }, 8, ["title"]), [[vShow, n.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
11354
11542
  title: unref(t)("返回底部"),
11355
- onClick: unref(m)
11543
+ onClick: unref(p)
11356
11544
  }, {
11357
11545
  icon: withCtx(() => [createVNode(unref(ArrowDownIcon))]),
11358
11546
  _: 1
11359
- }, 8, ["title", "onClick"]), [[vShow, !unref(p) && unref(g) > 100]])])
11547
+ }, 8, ["title", "onClick"]), [[vShow, unref(m)]])])
11360
11548
  ], 512));
11361
11549
  }
11362
11550
  });
11363
- 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, 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 };
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 };