@blueking/chat-x 0.0.1-beta.6 → 0.0.1-beta.7

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
@@ -300,7 +300,7 @@ const getCookieByName = (e) => {
300
300
  "节点输出内容...": "Node output content...",
301
301
  "调用 MCP:": "Call MCP:",
302
302
  更多: "More",
303
- "检索中...": "Searching...",
303
+ 检索中: "Searching",
304
304
  检索完成: "Search Completed",
305
305
  上传文件: "Upload File"
306
306
  }, 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 = [
@@ -721,7 +721,19 @@ const AIBluekingIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps
721
721
  ])]), EditIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
722
722
  [commonSVGProps.class]: !0,
723
723
  "ai-edit-icon": !0
724
- } }), [h("path", { d: "M160.07583932 763.37440051h703.84832136v100.54976017H160.07583932zM336.03791965 687.96208035h-100.5497602v-100.54976021l351.92416069-351.92416069 100.54976021 100.5497602zM613.25360852 210.60209379l49.77213129-49.77213128 99.5442626 99.54426259-49.77213131 49.77213129z" })]), ToolIconsMap = {
724
+ } }), [h("path", { d: "M160.07583932 763.37440051h703.84832136v100.54976017H160.07583932zM336.03791965 687.96208035h-100.5497602v-100.54976021l351.92416069-351.92416069 100.54976021 100.5497602zM613.25360852 210.60209379l49.77213129-49.77213128 99.5442626 99.54426259-49.77213131 49.77213129z" })]), ActiveLikeIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
725
+ [commonSVGProps.class]: !0,
726
+ "ai-active-like-icon": !0
727
+ } }), [h("path", {
728
+ "fill-rule": "evenodd",
729
+ d: "M192 448.9971328L192 896 128 896 128 448.9971328 192 448.9971328ZM288 448L288 896 759.7584608 896C774.0948672 896 786.6817696 886.464816 790.5632896 872.6638592L916.5632896 424.6638592C921.348208 407.6508192 911.4353568 389.9800864 894.4223168 385.1951712 891.6026752 384.402144 888.6875008 384 885.7584608 384L608 384 608 384 608 288C608 234.66666656 586.6666656 192 544 160 524.4018176 145.30136288 492.4018176 134.634696 448 128L288 448Z"
730
+ })]), ActiveUnLikeIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
731
+ [commonSVGProps.class]: !0,
732
+ "ai-active-un-like-icon": !0
733
+ } }), [h("path", {
734
+ "fill-rule": "evenodd",
735
+ d: "M192 575.0028672000001L192 128 128 128 128 575.0028672000001 192 575.0028672000001ZM448 896C492.4018176 889.365304 524.4018176 878.6986371200001 544 864 586.6666656 832 608 789.3333334399999 608 736L608 640 843.5169184 640C849.3750016 640 855.2053472 639.1957087999999 860.8446368 637.6096608 894.8707136 628.0398272 914.6964128 592.6983584 905.1265792 558.6722816L797.1265792 174.67228160000002C789.3635424 147.07037119999995 764.1897344 128 735.5169184 128L288 128 288 576 448 896Z"
736
+ })]), ToolIconsMap = {
725
737
  copy: CopyIcon,
726
738
  cite: CiteIcon,
727
739
  rebuild: RebuildIcon,
@@ -729,7 +741,9 @@ const AIBluekingIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps
729
741
  like: LikeIcon,
730
742
  unlike: UnLikeIcon,
731
743
  delete: DeleteIcon,
732
- edit: EditIcon
744
+ edit: EditIcon,
745
+ activeLike: ActiveLikeIcon,
746
+ activeUnLike: ActiveUnLikeIcon
733
747
  }, DEFAULT_SHORTCUTS = [{
734
748
  id: "ai-chat",
735
749
  name: t("问问小鲸"),
@@ -1394,12 +1408,12 @@ function preventOverflow$1(e) {
1394
1408
  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) : {
1395
1409
  width: 0,
1396
1410
  height: 0
1397
- }, 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), Lv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Rv = F + q - X - Lv, zv = F + J - X, Bv = within$1(m ? min$2(I, Rv) : I, F, m ? max$1(L, zv) : L);
1398
- w[S] = Bv, A[S] = Bv - F;
1411
+ }, 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), Bv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Vv = F + q - X - Bv, Hv = F + J - X, Uv = within$1(m ? min$2(I, Vv) : I, F, m ? max$1(L, Hv) : L);
1412
+ w[S] = Uv, A[S] = Uv - F;
1399
1413
  }
1400
1414
  if (c) {
1401
- var Vv, Hv = S === "x" ? top$1 : left$1, Uv = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Hv], Wv = Z - v[Uv], Gv = [top$1, left$1].indexOf(y) !== -1, Kv = (Vv = k == null ? void 0 : k[C]) == null ? 0 : Vv, qv = Gv ? $ : Z - T[Q] - E[Q] - Kv + O.altAxis, Jv = Gv ? Z + T[Q] + E[Q] - Kv - O.altAxis : Wv, Yv = m && Gv ? withinMaxClamp$1(qv, Z, Jv) : within$1(m ? qv : $, Z, m ? Jv : Wv);
1402
- w[C] = Yv, A[C] = Yv - Z;
1415
+ var Wv, Gv = S === "x" ? top$1 : left$1, Kv = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Gv], qv = Z - v[Kv], Jv = [top$1, left$1].indexOf(y) !== -1, Yv = (Wv = k == null ? void 0 : k[C]) == null ? 0 : Wv, Xv = Jv ? $ : Z - T[Q] - E[Q] - Yv + O.altAxis, Zv = Jv ? Z + T[Q] + E[Q] - Yv - O.altAxis : qv, Qv = m && Jv ? withinMaxClamp$1(Xv, Z, Zv) : within$1(m ? Xv : $, Z, m ? Zv : qv);
1416
+ w[C] = Qv, A[C] = Qv - Z;
1403
1417
  }
1404
1418
  n.modifiersData[i] = A;
1405
1419
  }
@@ -1876,16 +1890,16 @@ function createTippy$1(e, n) {
1876
1890
  isShown: !1
1877
1891
  },
1878
1892
  plugins: b,
1879
- clearDelayTimeouts: Kv,
1880
- setProps: qv,
1881
- setContent: Jv,
1882
- show: Yv,
1883
- hide: Xv,
1884
- hideWithInteractivity: Zv,
1885
- enable: Wv,
1886
- disable: Gv,
1887
- unmount: Qv,
1888
- destroy: $v
1893
+ clearDelayTimeouts: Yv,
1894
+ setProps: Xv,
1895
+ setContent: Zv,
1896
+ show: Qv,
1897
+ hide: $v,
1898
+ hideWithInteractivity: ey,
1899
+ enable: qv,
1900
+ disable: Jv,
1901
+ unmount: ty,
1902
+ destroy: ny
1889
1903
  };
1890
1904
  /* istanbul ignore if */
1891
1905
  if (!r.render) return x;
@@ -2014,16 +2028,16 @@ function createTippy$1(e, n) {
2014
2028
  });
2015
2029
  }
2016
2030
  function J() {
2017
- O() && (q("touchstart", Lv, { passive: !0 }), q("touchend", Rv, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
2018
- if (e !== "manual") switch (q(e, Lv), e) {
2031
+ O() && (q("touchstart", Bv, { passive: !0 }), q("touchend", Vv, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
2032
+ if (e !== "manual") switch (q(e, Bv), e) {
2019
2033
  case "mouseenter":
2020
- q("mouseleave", Rv);
2034
+ q("mouseleave", Vv);
2021
2035
  break;
2022
2036
  case "focus":
2023
- q(isIE11$1 ? "focusout" : "blur", zv);
2037
+ q(isIE11$1 ? "focusout" : "blur", Hv);
2024
2038
  break;
2025
2039
  case "focusin":
2026
- q("focusout", zv);
2040
+ q("focusout", Hv);
2027
2041
  break;
2028
2042
  }
2029
2043
  });
@@ -2034,9 +2048,9 @@ function createTippy$1(e, n) {
2034
2048
  n.removeEventListener(r, i, a);
2035
2049
  }), m = [];
2036
2050
  }
2037
- function Lv(e) {
2051
+ function Bv(e) {
2038
2052
  var n, r = !1;
2039
- if (!(!x.state.isEnabled || Bv(e) || c)) {
2053
+ if (!(!x.state.isEnabled || Uv(e) || c)) {
2040
2054
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
2041
2055
  d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent$1(e) && mouseMoveListeners$1.forEach(function(n) {
2042
2056
  return n(e);
@@ -2054,8 +2068,8 @@ function createTippy$1(e, n) {
2054
2068
  } : null;
2055
2069
  }).filter(Boolean), e) && (R(), $(e));
2056
2070
  }
2057
- function Rv(e) {
2058
- if (!(Bv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
2071
+ function Vv(e) {
2072
+ if (!(Uv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
2059
2073
  if (x.props.interactive) {
2060
2074
  x.hideWithInteractivity(e);
2061
2075
  return;
@@ -2063,14 +2077,14 @@ function createTippy$1(e, n) {
2063
2077
  $(e);
2064
2078
  }
2065
2079
  }
2066
- function zv(e) {
2080
+ function Hv(e) {
2067
2081
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
2068
2082
  }
2069
- function Bv(e) {
2083
+ function Uv(e) {
2070
2084
  return currentInput$1.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
2071
2085
  }
2072
- function Vv() {
2073
- Hv();
2086
+ function Wv() {
2087
+ Gv();
2074
2088
  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 ? {
2075
2089
  getBoundingClientRect: o,
2076
2090
  contextElement: o.contextElement || A()
@@ -2128,12 +2142,12 @@ function createTippy$1(e, n) {
2128
2142
  modifiers: u
2129
2143
  }));
2130
2144
  }
2131
- function Hv() {
2145
+ function Gv() {
2132
2146
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
2133
2147
  }
2134
- function Uv() {
2148
+ function Kv() {
2135
2149
  var e = x.props.appendTo, n, r = A();
2136
- 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, Vv();
2150
+ 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, Wv();
2137
2151
  }
2138
2152
  function Z() {
2139
2153
  return arrayFrom$1(C.querySelectorAll("[data-tippy-root]"));
@@ -2159,30 +2173,30 @@ function createTippy$1(e, n) {
2159
2173
  });
2160
2174
  }
2161
2175
  }
2162
- function Wv() {
2176
+ function qv() {
2163
2177
  x.state.isEnabled = !0;
2164
2178
  }
2165
- function Gv() {
2179
+ function Jv() {
2166
2180
  x.hide(), x.state.isEnabled = !1;
2167
2181
  }
2168
- function Kv() {
2182
+ function Yv() {
2169
2183
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
2170
2184
  }
2171
- function qv(n) {
2185
+ function Xv(n) {
2172
2186
  if (!x.state.isDestroyed) {
2173
2187
  F("onBeforeUpdate", [x, n]), Y();
2174
2188
  var r = x.props, i = evaluateProps$1(e, Object.assign({}, r, removeUndefinedProps$1(n), { ignoreAttributes: !0 }));
2175
2189
  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) {
2176
2190
  e.removeAttribute("aria-expanded");
2177
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Vv(), Z().forEach(function(e) {
2191
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Wv(), Z().forEach(function(e) {
2178
2192
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
2179
2193
  })), F("onAfterUpdate", [x, n]);
2180
2194
  }
2181
2195
  }
2182
- function Jv(e) {
2196
+ function Zv(e) {
2183
2197
  x.setProps({ content: e });
2184
2198
  }
2185
- function Yv() {
2199
+ function Qv() {
2186
2200
  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);
2187
2201
  if (!(e || n || r || i) && !A().hasAttribute("disabled") && (F("onShow", [x], !1), x.props.onShow(x) !== !1)) {
2188
2202
  if (x.state.isVisible = !0, k() && (C.style.visibility = "visible"), P(), H(), x.state.isMounted || (C.style.transition = "none"), k()) {
@@ -2200,10 +2214,10 @@ function createTippy$1(e, n) {
2200
2214
  x.state.isShown = !0, F("onShown", [x]);
2201
2215
  });
2202
2216
  }
2203
- }, Uv();
2217
+ }, Kv();
2204
2218
  }
2205
2219
  }
2206
- function Xv() {
2220
+ function $v() {
2207
2221
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn$1(x.props.duration, 1, defaultProps$1.duration);
2208
2222
  if (!(e || n || r) && (F("onHide", [x], !1), x.props.onHide(x) !== !1)) {
2209
2223
  if (x.state.isVisible = !1, x.state.isShown = !1, u = !1, s = !1, k() && (C.style.visibility = "hidden"), R(), U(), P(!0), k()) {
@@ -2213,17 +2227,17 @@ function createTippy$1(e, n) {
2213
2227
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
2214
2228
  }
2215
2229
  }
2216
- function Zv(e) {
2230
+ function ey(e) {
2217
2231
  j().addEventListener("mousemove", g), pushIfUnique$1(mouseMoveListeners$1, g), g(e);
2218
2232
  }
2219
- function Qv() {
2220
- x.state.isVisible && x.hide(), x.state.isMounted && (Hv(), Z().forEach(function(e) {
2233
+ function ty() {
2234
+ x.state.isVisible && x.hide(), x.state.isMounted && (Gv(), Z().forEach(function(e) {
2221
2235
  e._tippy.unmount();
2222
2236
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances$1 = mountedInstances$1.filter(function(e) {
2223
2237
  return e !== x;
2224
2238
  }), x.state.isMounted = !1, F("onHidden", [x]));
2225
2239
  }
2226
- function $v() {
2240
+ function ny() {
2227
2241
  x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
2228
2242
  }
2229
2243
  }
@@ -8091,6 +8105,8 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
8091
8105
  };
8092
8106
  let UploadStatus = /* @__PURE__ */ function(e) {
8093
8107
  return e.Error = "error", e.Pending = "pending", e.Success = "success", e;
8108
+ }({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
8109
+ return e.Disabled = "disabled", e.Hidden = "hidden", e;
8094
8110
  }({});
8095
8111
  var _hoisted_1$21 = { class: "file-upload-btn" }, _hoisted_2$15 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
8096
8112
  __name: "file-upload-btn",
@@ -8890,12 +8906,12 @@ function preventOverflow(e) {
8890
8906
  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) : {
8891
8907
  width: 0,
8892
8908
  height: 0
8893
- }, 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), Lv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Rv = F + q - X - Lv, zv = F + J - X, Bv = within(m ? min$1(I, Rv) : I, F, m ? max(L, zv) : L);
8894
- w[S] = Bv, A[S] = Bv - F;
8909
+ }, 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), Bv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Vv = F + q - X - Bv, Hv = F + J - X, Uv = within(m ? min$1(I, Vv) : I, F, m ? max(L, Hv) : L);
8910
+ w[S] = Uv, A[S] = Uv - F;
8895
8911
  }
8896
8912
  if (c) {
8897
- var Vv, Hv = S === "x" ? "top" : left, Uv = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Hv], Wv = Z - v[Uv], Gv = ["top", left].indexOf(y) !== -1, Kv = (Vv = k == null ? void 0 : k[C]) == null ? 0 : Vv, qv = Gv ? $ : Z - T[Q] - E[Q] - Kv + O.altAxis, Jv = Gv ? Z + T[Q] + E[Q] - Kv - O.altAxis : Wv, Yv = m && Gv ? withinMaxClamp(qv, Z, Jv) : within(m ? qv : $, Z, m ? Jv : Wv);
8898
- w[C] = Yv, A[C] = Yv - Z;
8913
+ var Wv, Gv = S === "x" ? "top" : left, Kv = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Gv], qv = Z - v[Kv], Jv = ["top", left].indexOf(y) !== -1, Yv = (Wv = k == null ? void 0 : k[C]) == null ? 0 : Wv, Xv = Jv ? $ : Z - T[Q] - E[Q] - Yv + O.altAxis, Zv = Jv ? Z + T[Q] + E[Q] - Yv - O.altAxis : qv, Qv = m && Jv ? withinMaxClamp(Xv, Z, Zv) : within(m ? Xv : $, Z, m ? Zv : qv);
8914
+ w[C] = Qv, A[C] = Qv - Z;
8899
8915
  }
8900
8916
  n.modifiersData[i] = A;
8901
8917
  }
@@ -9435,16 +9451,16 @@ function createTippy(e, n) {
9435
9451
  isShown: !1
9436
9452
  },
9437
9453
  plugins: b,
9438
- clearDelayTimeouts: Kv,
9439
- setProps: qv,
9440
- setContent: Jv,
9441
- show: Yv,
9442
- hide: Xv,
9443
- hideWithInteractivity: Zv,
9444
- enable: Wv,
9445
- disable: Gv,
9446
- unmount: Qv,
9447
- destroy: $v
9454
+ clearDelayTimeouts: Yv,
9455
+ setProps: Xv,
9456
+ setContent: Zv,
9457
+ show: Qv,
9458
+ hide: $v,
9459
+ hideWithInteractivity: ey,
9460
+ enable: qv,
9461
+ disable: Jv,
9462
+ unmount: ty,
9463
+ destroy: ny
9448
9464
  };
9449
9465
  /* istanbul ignore if */
9450
9466
  if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
@@ -9573,16 +9589,16 @@ function createTippy(e, n) {
9573
9589
  });
9574
9590
  }
9575
9591
  function J() {
9576
- O() && (q("touchstart", Lv, { passive: !0 }), q("touchend", Rv, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
9577
- if (e !== "manual") switch (q(e, Lv), e) {
9592
+ O() && (q("touchstart", Bv, { passive: !0 }), q("touchend", Vv, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
9593
+ if (e !== "manual") switch (q(e, Bv), e) {
9578
9594
  case "mouseenter":
9579
- q("mouseleave", Rv);
9595
+ q("mouseleave", Vv);
9580
9596
  break;
9581
9597
  case "focus":
9582
- q(isIE11 ? "focusout" : "blur", zv);
9598
+ q(isIE11 ? "focusout" : "blur", Hv);
9583
9599
  break;
9584
9600
  case "focusin":
9585
- q("focusout", zv);
9601
+ q("focusout", Hv);
9586
9602
  break;
9587
9603
  }
9588
9604
  });
@@ -9593,9 +9609,9 @@ function createTippy(e, n) {
9593
9609
  n.removeEventListener(r, i, a);
9594
9610
  }), m = [];
9595
9611
  }
9596
- function Lv(e) {
9612
+ function Bv(e) {
9597
9613
  var n, r = !1;
9598
- if (!(!x.state.isEnabled || Bv(e) || c)) {
9614
+ if (!(!x.state.isEnabled || Uv(e) || c)) {
9599
9615
  var i = ((n = d) == null ? void 0 : n.type) === "focus";
9600
9616
  d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent(e) && mouseMoveListeners.forEach(function(n) {
9601
9617
  return n(e);
@@ -9613,8 +9629,8 @@ function createTippy(e, n) {
9613
9629
  } : null;
9614
9630
  }).filter(Boolean), e) && (R(), $(e));
9615
9631
  }
9616
- function Rv(e) {
9617
- if (!(Bv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9632
+ function Vv(e) {
9633
+ if (!(Uv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
9618
9634
  if (x.props.interactive) {
9619
9635
  x.hideWithInteractivity(e);
9620
9636
  return;
@@ -9622,14 +9638,14 @@ function createTippy(e, n) {
9622
9638
  $(e);
9623
9639
  }
9624
9640
  }
9625
- function zv(e) {
9641
+ function Hv(e) {
9626
9642
  x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
9627
9643
  }
9628
- function Bv(e) {
9644
+ function Uv(e) {
9629
9645
  return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
9630
9646
  }
9631
- function Vv() {
9632
- Hv();
9647
+ function Wv() {
9648
+ Gv();
9633
9649
  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 ? {
9634
9650
  getBoundingClientRect: o,
9635
9651
  contextElement: o.contextElement || A()
@@ -9687,13 +9703,13 @@ function createTippy(e, n) {
9687
9703
  modifiers: u
9688
9704
  }));
9689
9705
  }
9690
- function Hv() {
9706
+ function Gv() {
9691
9707
  x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
9692
9708
  }
9693
- function Uv() {
9709
+ function Kv() {
9694
9710
  var e = x.props.appendTo, n, r = A();
9695
9711
  /* istanbul ignore else */
9696
- 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, Vv(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
9712
+ 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, Wv(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
9697
9713
  "Interactive tippy element may not be accessible via keyboard",
9698
9714
  "navigation because it is not directly after the reference element",
9699
9715
  "in the DOM source order.",
@@ -9732,31 +9748,31 @@ function createTippy(e, n) {
9732
9748
  });
9733
9749
  }
9734
9750
  }
9735
- function Wv() {
9751
+ function qv() {
9736
9752
  x.state.isEnabled = !0;
9737
9753
  }
9738
- function Gv() {
9754
+ function Jv() {
9739
9755
  x.hide(), x.state.isEnabled = !1;
9740
9756
  }
9741
- function Kv() {
9757
+ function Yv() {
9742
9758
  clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
9743
9759
  }
9744
- function qv(n) {
9760
+ function Xv(n) {
9745
9761
  /* istanbul ignore else */
9746
9762
  if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
9747
9763
  F("onBeforeUpdate", [x, n]), Y();
9748
9764
  var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
9749
9765
  x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
9750
9766
  e.removeAttribute("aria-expanded");
9751
- }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Vv(), Z().forEach(function(e) {
9767
+ }) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Wv(), Z().forEach(function(e) {
9752
9768
  requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
9753
9769
  })), F("onAfterUpdate", [x, n]);
9754
9770
  }
9755
9771
  }
9756
- function Jv(e) {
9772
+ function Zv(e) {
9757
9773
  x.setProps({ content: e });
9758
9774
  }
9759
- function Yv() {
9775
+ function Qv() {
9760
9776
  /* istanbul ignore else */
9761
9777
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
9762
9778
  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);
@@ -9776,10 +9792,10 @@ function createTippy(e, n) {
9776
9792
  x.state.isShown = !0, F("onShown", [x]);
9777
9793
  });
9778
9794
  }
9779
- }, Uv();
9795
+ }, Kv();
9780
9796
  }
9781
9797
  }
9782
- function Xv() {
9798
+ function $v() {
9783
9799
  /* istanbul ignore else */
9784
9800
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
9785
9801
  var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
@@ -9791,18 +9807,18 @@ function createTippy(e, n) {
9791
9807
  I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
9792
9808
  }
9793
9809
  }
9794
- function Zv(e) {
9810
+ function ey(e) {
9795
9811
  process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
9796
9812
  }
9797
- function Qv() {
9813
+ function ty() {
9798
9814
  /* istanbul ignore else */
9799
- process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (Hv(), Z().forEach(function(e) {
9815
+ process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (Gv(), Z().forEach(function(e) {
9800
9816
  e._tippy.unmount();
9801
9817
  }), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
9802
9818
  return e !== x;
9803
9819
  }), x.state.isMounted = !1, F("onHidden", [x]));
9804
9820
  }
9805
- function $v() {
9821
+ function ny() {
9806
9822
  /* istanbul ignore else */
9807
9823
  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]));
9808
9824
  }
@@ -10095,7 +10111,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10095
10111
  n && i.push(n);
10096
10112
  }
10097
10113
  i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), m("upload", i));
10098
- }, Lv = () => {
10114
+ }, Bv = () => {
10099
10115
  T == null || T(), w = createEditor({
10100
10116
  doc: v.value,
10101
10117
  schema: tagSchema,
@@ -10109,10 +10125,10 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10109
10125
  }(),
10110
10126
  onKeyDown: (e) => P(e)
10111
10127
  }), T = w.input(a.value);
10112
- }, Rv = () => y.value === "slash" ? x.value.length < 1 ? !1 : void 0 : S.value.length < 1 ? !1 : void 0;
10128
+ }, Vv = () => y.value === "slash" ? x.value.length < 1 ? !1 : void 0 : S.value.length < 1 ? !1 : void 0;
10113
10129
  return onMounted(() => {
10114
10130
  var e;
10115
- Lv(), (e = a.value) == null || e.addEventListener("paste", J);
10131
+ Bv(), (e = a.value) == null || e.addEventListener("paste", J);
10116
10132
  }), onUnmounted(() => {
10117
10133
  var e;
10118
10134
  w.command(ReplaceAll, ""), T == null || T(), (e = a.value) == null || e.removeEventListener("paste", J);
@@ -10149,7 +10165,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10149
10165
  "trigger-target": a.value,
10150
10166
  "z-index": unref(EDITOR_MENU_Z_INDEX),
10151
10167
  onHidden: F,
10152
- onShow: Rv
10168
+ onShow: Vv
10153
10169
  }, {
10154
10170
  content: withCtx(() => [y.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
10155
10171
  key: 0,
@@ -10400,20 +10416,28 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10400
10416
  props: {
10401
10417
  description: {},
10402
10418
  id: {},
10403
- name: {}
10419
+ name: {},
10420
+ active: { type: Boolean },
10421
+ disabled: { type: Boolean }
10404
10422
  },
10405
10423
  emits: ["click"],
10406
10424
  setup(e, { emit: n }) {
10407
- let r = e, i = n, a = (e) => {
10408
- i("click", r, e);
10425
+ let r = e, i = n, o = computed(() => ({
10426
+ content: r.description,
10427
+ theme: "ai-chat-box",
10428
+ onShow: () => {
10429
+ if (r.disabled) return !1;
10430
+ }
10431
+ })), c = (e) => {
10432
+ r.disabled || i("click", r, e);
10409
10433
  };
10410
10434
  return (n, r) => withDirectives((openBlock(), createElementBlock("div", {
10411
- class: "tool-btn",
10412
- onClick: a
10413
- }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$12, toDisplayString(e.name), 1))])), [[unref(directive), {
10414
- content: e.description,
10415
- theme: "ai-chat-box"
10416
- }]]);
10435
+ class: normalizeClass(["tool-btn", {
10436
+ "is-active": e.active,
10437
+ "is-disabled": e.disabled
10438
+ }]),
10439
+ onClick: c
10440
+ }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$12, toDisplayString(e.name), 1))], 2)), [[unref(directive), o.value]]);
10417
10441
  }
10418
10442
  }), _hoisted_1$11 = { class: "ai-user-feedback" }, _hoisted_2$9 = { class: "ai-feedback-title" }, _hoisted_3$8 = { class: "ai-feedback-reason-list" }, _hoisted_4$6 = {
10419
10443
  key: 0,
@@ -10489,20 +10513,23 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10489
10513
  __name: "message-tools",
10490
10514
  props: {
10491
10515
  messageTools: { default: () => CONST_MESSAGE_TOOLS },
10516
+ messageToolsStatus: {},
10492
10517
  onAction: {},
10493
10518
  tippyOptions: {},
10494
10519
  updateTools: { default: () => CONST_UPDATE_TOOLS }
10495
10520
  },
10496
10521
  emits: ["feedback"],
10497
10522
  setup(n, { emit: r }) {
10498
- let i = n, o = r, d = useTemplateRef("feedbackTippyRef"), p = shallowRef(!1), m = shallowRef([]), g = computed(() => _objectSpread2({
10523
+ let i = n, o = r, d = useTemplateRef("feedbackTippyRef"), p = shallowRef(!1), m = shallowRef([]), g = shallowRef(null), _ = computed(() => _objectSpread2(_objectSpread2({
10499
10524
  arrow: !1,
10500
10525
  interactive: !0,
10501
10526
  offset: [0, 6],
10502
10527
  theme: "ai-chat-box-light light",
10503
10528
  trigger: "click",
10504
10529
  appendTo: () => document.body
10505
- }, i.tippyOptions || {})), _ = function() {
10530
+ }, i.tippyOptions || {}), {}, { onShow: () => {
10531
+ if (i.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
10532
+ } })), v = function() {
10506
10533
  var e = _asyncToGenerator(function* (e) {
10507
10534
  var n;
10508
10535
  if (e.id === "like" || e.id === "unlike") {
@@ -10519,47 +10546,65 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10519
10546
  return function(n) {
10520
10547
  return e.apply(this, arguments);
10521
10548
  };
10522
- }(), v = () => {
10549
+ }(), y = () => {
10523
10550
  var e;
10524
10551
  (e = d.value) == null || e.forEach((e) => {
10525
10552
  var n;
10526
10553
  return e == null || (n = e.hide) == null ? void 0 : n.call(e);
10527
10554
  });
10528
- }, y = (e, n, r) => {
10529
- v(), o("feedback", e, n, r);
10555
+ }, b = (e) => g.value ? g.value === "like" && e === "like" ? "activeLike" : g.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, x = (e, n, r) => {
10556
+ y(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
10557
+ }, S = (e) => {
10558
+ if (g.value && g.value === e) return g.value = null, !1;
10530
10559
  };
10531
10560
  return onUnmounted(() => {
10532
- v(), m.value = [];
10561
+ y(), m.value = [];
10533
10562
  }), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$10, [
10534
10563
  createElementVNode("div", _hoisted_2$8, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.messageTools, (e) => (openBlock(), createBlock(tool_btn_default, mergeProps({
10535
10564
  key: e.id,
10536
10565
  ref_for: !0
10537
- }, e, { onClick: (n) => _(e) }), null, 16, ["onClick"]))), 128))]),
10566
+ }, e, {
10567
+ disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10568
+ onClick: (n) => v(e)
10569
+ }), null, 16, ["disabled", "onClick"]))), 128))]),
10538
10570
  n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7)) : createCommentVNode("", !0),
10539
- createElementVNode("div", _hoisted_4$5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.updateTools, (n) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [n.id === "like" || n.id === "unlike" ? (openBlock(), createBlock(unref(TippyComponent), mergeProps({
10571
+ createElementVNode("div", _hoisted_4$5, [(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({
10540
10572
  key: 0,
10541
10573
  ref_for: !0,
10542
10574
  ref_key: "feedbackTippyRef",
10543
10575
  ref: d
10544
- }, { ref_for: !0 }, g.value), {
10576
+ }, { ref_for: !0 }, _.value, { onShow: (e) => S(r.id) }), {
10545
10577
  content: withCtx(() => [createVNode(user_feedback_default, {
10546
10578
  loading: p.value,
10547
10579
  "reason-list": m.value,
10548
- title: n.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
10549
- onCancel: v,
10550
- onSubmit: (e, r) => y(n, e, r)
10580
+ title: r.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
10581
+ onCancel: y,
10582
+ onSubmit: (e, n) => x(r, e, n)
10551
10583
  }, null, 8, [
10552
10584
  "loading",
10553
10585
  "reason-list",
10554
10586
  "title",
10555
10587
  "onSubmit"
10556
10588
  ])]),
10557
- default: withCtx(() => [createVNode(tool_btn_default, mergeProps({ ref_for: !0 }, n, { onClick: (e) => _(n) }), null, 16, ["onClick"])]),
10589
+ default: withCtx(() => [createVNode(tool_btn_default, mergeProps({ ref_for: !0 }, r, {
10590
+ id: b(r.id),
10591
+ active: g.value === r.id,
10592
+ disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10593
+ onClick: (e) => v(r)
10594
+ }), null, 16, [
10595
+ "id",
10596
+ "active",
10597
+ "disabled",
10598
+ "onClick"
10599
+ ])]),
10558
10600
  _: 2
10559
- }, 1040)) : (openBlock(), createBlock(tool_btn_default, mergeProps({
10601
+ }, 1040, ["onShow"])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
10560
10602
  key: 1,
10561
10603
  ref_for: !0
10562
- }, n, { onClick: (e) => _(n) }), null, 16, ["onClick"]))], 64))), 128))])
10604
+ }, r, {
10605
+ disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
10606
+ onClick: (e) => v(r)
10607
+ }), null, 16, ["disabled", "onClick"]))], 64))), 128))])
10563
10608
  ], 512));
10564
10609
  }
10565
10610
  }), _hoisted_1$9 = { 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 = {
@@ -10581,23 +10626,27 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10581
10626
  collapsedModifiers: {}
10582
10627
  }),
10583
10628
  emits: ["update:collapsed"],
10584
- setup(e) {
10585
- let n = e, r = computed(() => n.activityType === "knowledge_rag"), i = computed(() => {
10586
- var e, i;
10587
- if (r.value) return n.status === MessageStatus.Pending ? t("检索中...") : t("检索完成");
10588
- let a = Array.isArray(n.content) ? (e = n.content) == null ? void 0 : e.length : (i = n.content) == null || (i = i.referenceDocument) == null ? void 0 : i.length;
10629
+ setup(n) {
10630
+ let r = n, i = computed(() => r.activityType === "knowledge_rag"), o = computed(() => {
10631
+ var e, n;
10632
+ if (i.value) return r.status === MessageStatus.Pending || r.status === MessageStatus.Streaming ? t("检索中") : t("检索完成");
10633
+ let a = Array.isArray(r.content) ? (e = r.content) == null ? void 0 : e.length : (n = r.content) == null || (n = n.referenceDocument) == null ? void 0 : n.length;
10589
10634
  return isEn ? `Reference ${a} documents as reference` : `引用 ${a} 篇资料作为参考`;
10590
- }), o = useModel(e, "collapsed");
10591
- return (n, a) => {
10592
- var d, p;
10635
+ }), d = useModel(n, "collapsed");
10636
+ return (r, a) => {
10637
+ var p, m;
10593
10638
  return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", {
10594
10639
  class: "ai-activity-message-title",
10595
- onClick: a[0] || (a[0] = (e) => o.value = !o.value)
10640
+ onClick: a[0] || (a[0] = (e) => d.value = !d.value)
10596
10641
  }, [
10597
- createElementVNode("span", _hoisted_2$7, [r.value ? (openBlock(), createBlock(unref(ThinkingIcon), { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), { key: 1 }))]),
10598
- createElementVNode("span", _hoisted_3$6, toDisplayString(i.value), 1),
10599
- createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10600
- ]), 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]])]);
10642
+ createElementVNode("span", _hoisted_2$7, [i.value ? (openBlock(), createBlock(unref(ThinkingIcon), { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), { key: 1 }))]),
10643
+ createElementVNode("span", _hoisted_3$6, toDisplayString(o.value), 1),
10644
+ n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(3, (e) => createVNode(unref(ContentLoadingIcon), {
10645
+ key: e,
10646
+ class: normalizeClass(`loading-status-${e}`)
10647
+ }, null, 8, ["class"])), 64)) : createCommentVNode("", !0),
10648
+ createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": d.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
10649
+ ]), withDirectives(createElementVNode("div", _hoisted_4$4, [i.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [createVNode(markdown_content_default, { content: Array.isArray(n.content) ? n.content.join("\n") : ((p = n.content) == null ? void 0 : p.content) || "" }, null, 8, ["content"])])) : createCommentVNode("", !0), createVNode(reference_content_default, { content: Array.isArray(n.content) ? n.content : ((m = n.content) == null ? void 0 : m.referenceDocument) || [] }, null, 8, ["content"])], 512), [[vShow, !d.value]])]);
10601
10650
  };
10602
10651
  }
10603
10652
  }), _hoisted_1$8 = { 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({
@@ -10617,7 +10666,10 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10617
10666
  return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$8, [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", {
10618
10667
  key: n,
10619
10668
  class: "desc-panel-item"
10620
- }, [createElementVNode("span", _hoisted_4$3, toDisplayString(n) + ":", 1), createElementVNode("span", _hoisted_5$2, toDisplayString(e), 1)]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(i.value), 1)], 64))])]));
10669
+ }, [createElementVNode("span", _hoisted_4$3, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$2, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
10670
+ text: typeof e == "object" && e ? JSON.stringify(e) : e,
10671
+ appendTo: "parent"
10672
+ }]])]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(i.value), 1)], 64))])]));
10621
10673
  }
10622
10674
  }), _hoisted_1$7 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
10623
10675
  __name: "tool-message",
@@ -10778,7 +10830,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10778
10830
  return openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", {
10779
10831
  class: normalizeClass(["ai-reasoning-message-title", {
10780
10832
  "ai-reasoning-message-title-collapsed": i.value,
10781
- "is-thinking": n.status === unref(MessageStatus).Pending,
10833
+ "is-thinking": n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming,
10782
10834
  "is-complete": n.status === unref(MessageStatus).Complete,
10783
10835
  "is-error": n.status === unref(MessageStatus).Error
10784
10836
  }]),
@@ -10786,7 +10838,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10786
10838
  }, [
10787
10839
  createElementVNode("span", _hoisted_2$3, [createVNode(unref(ThinkingIcon))]),
10788
10840
  createElementVNode("span", _hoisted_3$3, toDisplayString(d.value), 1),
10789
- n.status === unref(MessageStatus).Pending ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(3, (e) => createVNode(unref(ContentLoadingIcon), {
10841
+ n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(3, (e) => createVNode(unref(ContentLoadingIcon), {
10790
10842
  key: e,
10791
10843
  class: normalizeClass(`loading-status-${e}`)
10792
10844
  }, null, 8, ["class"])), 64)) : createCommentVNode("", !0),
@@ -10833,6 +10885,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10833
10885
  status: {},
10834
10886
  property: {},
10835
10887
  onAction: { type: Function },
10888
+ messageToolsStatus: {},
10836
10889
  onInputConfirm: { type: Function },
10837
10890
  onShortcutConfirm: { type: Function }
10838
10891
  },
@@ -10978,17 +11031,20 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
10978
11031
  key: 1,
10979
11032
  content: n.text
10980
11033
  }, null, 8, ["content"])) : createCommentVNode("", !0)], 64))), 128)) : createCommentVNode("", !0)])) : createCommentVNode("", !0),
10981
- createVNode(message_tools_default, {
11034
+ n.messageToolsStatus === unref(MessageToolsStatus).Hidden ? createCommentVNode("", !0) : (openBlock(), createBlock(message_tools_default, {
11035
+ key: 2,
10982
11036
  class: "ai-user-message-tools",
10983
11037
  "message-tools": unref(CONST_USER_MESSAGE_TOOLS),
11038
+ "message-tools-status": n.messageToolsStatus,
10984
11039
  "on-action": x,
10985
11040
  "update-tools": []
10986
- }, null, 8, ["message-tools"])
11041
+ }, null, 8, ["message-tools", "message-tools-status"]))
10987
11042
  ], 64))]));
10988
11043
  }
10989
11044
  }), message_render_default = /* @__PURE__ */ defineComponent({
10990
11045
  __name: "message-render",
10991
11046
  props: {
11047
+ messageToolsStatus: {},
10992
11048
  onInputConfirm: { type: Function },
10993
11049
  onShortcutConfirm: { type: Function },
10994
11050
  onAction: { type: Function },
@@ -11000,7 +11056,8 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
11000
11056
  case MessageRole.User: return h(user_message_default, _objectSpread2(_objectSpread2({}, n.message), {}, {
11001
11057
  onAction: n.onAction,
11002
11058
  onInputConfirm: n.onInputConfirm,
11003
- onShortcutConfirm: n.onShortcutConfirm
11059
+ onShortcutConfirm: n.onShortcutConfirm,
11060
+ messageToolsStatus: n.messageToolsStatus
11004
11061
  }));
11005
11062
  case MessageRole.Assistant: return h(assistant_message_default, n.message, { default: (e) => renderSlot(r, "default", e, () => [h(content_render_default, {
11006
11063
  content: n.message.content || "",
@@ -11024,6 +11081,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
11024
11081
  },
11025
11082
  messages: {},
11026
11083
  messageStatus: {},
11084
+ messageToolsStatus: {},
11027
11085
  onAgentAction: {},
11028
11086
  onAgentFeedback: {},
11029
11087
  onUserAction: {},
@@ -11147,32 +11205,37 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
11147
11205
  class: "message-group-checkbox",
11148
11206
  "model-value": a.checked,
11149
11207
  "onUpdate:modelValue": (e) => C(a, e)
11150
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.messages, (e, n) => renderSlot(i.$slots, "default", mergeProps({
11151
- key: n,
11208
+ }, 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({
11209
+ key: r,
11152
11210
  ref_for: !0
11153
- }, { message: e }), () => [(openBlock(), createBlock(message_render_default, {
11154
- key: n,
11211
+ }, {
11212
+ message: e,
11213
+ messageToolsStatus: n.messageToolsStatus
11214
+ }), () => [(openBlock(), createBlock(message_render_default, {
11215
+ key: r,
11155
11216
  message: e,
11217
+ "message-tools-status": n.messageToolsStatus,
11156
11218
  "on-action": (n) => b(n, e),
11157
11219
  "on-input-confirm": (n, r) => T(e, n, r),
11158
11220
  "on-shortcut-confirm": (n) => E(e, n)
11159
11221
  }, null, 8, [
11160
11222
  "message",
11223
+ "message-tools-status",
11161
11224
  "on-action",
11162
11225
  "on-input-confirm",
11163
11226
  "on-shortcut-confirm"
11164
- ]))])), 128)), a.type === unref(MessageRole).Assistant ? (openBlock(), createBlock(message_tools_default, {
11227
+ ]))])), 128)), a.type === unref(MessageRole).Assistant && n.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
11165
11228
  key: 0,
11229
+ "message-tools-status": n.messageToolsStatus,
11166
11230
  "on-action": (e) => y(e, a.messages),
11167
- style: normalizeStyle({ visibility: a.isHover ? "visible" : "hidden" }),
11168
11231
  "tippy-options": v,
11169
11232
  onFeedback: (e, n, i) => {
11170
11233
  var o;
11171
11234
  return (o = r.onAgentFeedback) == null ? void 0 : o.call(r, e, a.messages, n, i);
11172
11235
  }
11173
11236
  }, null, 8, [
11237
+ "message-tools-status",
11174
11238
  "on-action",
11175
- "style",
11176
11239
  "onFeedback"
11177
11240
  ])) : createCommentVNode("", !0)])], 44, _hoisted_1))), 128)),
11178
11241
  createElementVNode("div", {
@@ -11197,4 +11260,4 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
11197
11260
  ], 512));
11198
11261
  }
11199
11262
  });
11200
- export { AIBluekingIcon, AI_BLUEKING_MESSAGE_SLOT_ID, 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, 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 };
11263
+ 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 };