@blueking/chat-x 0.0.1-beta.14 → 0.0.1-beta.15
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/components/ai-buttons/tool-btn/tool-btn.vue.d.ts +1 -1
- package/dist/components/chat-message/loading-message/loading-message.vue.d.ts +11 -1
- package/dist/components/message-tools/delete-tool/delete-tool.vue.d.ts +19 -0
- package/dist/components/message-tools/message-tools.vue.d.ts +1 -1
- package/dist/composables/use-container-scroll.d.ts +2 -0
- package/dist/composables/use-observer-visible-list.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +349 -227
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +5 -1
- package/package.json +1 -1
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),
|
|
1413
|
-
w[S] =
|
|
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, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent$1(n.elements.arrow), ty = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, ny = F + q - X - ty, ry = F + J - X, iy = within$1(m ? min$2(I, ny) : I, F, m ? max$1(L, ry) : L);
|
|
1417
|
+
w[S] = iy, A[S] = iy - F;
|
|
1414
1418
|
}
|
|
1415
1419
|
if (c) {
|
|
1416
|
-
var
|
|
1417
|
-
w[C] =
|
|
1420
|
+
var ay, oy = S === "x" ? top$1 : left$1, sy = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[oy], cy = Z - v[sy], ly = [top$1, left$1].indexOf(y) !== -1, uy = (ay = k == null ? void 0 : k[C]) == null ? 0 : ay, dy = ly ? $ : Z - T[Q] - E[Q] - uy + O.altAxis, fy = ly ? Z + T[Q] + E[Q] - uy - O.altAxis : cy, py = m && ly ? withinMaxClamp$1(dy, Z, fy) : within$1(m ? dy : $, Z, m ? fy : cy);
|
|
1421
|
+
w[C] = py, A[C] = py - Z;
|
|
1418
1422
|
}
|
|
1419
1423
|
n.modifiersData[i] = A;
|
|
1420
1424
|
}
|
|
@@ -1891,16 +1895,16 @@ function createTippy$1(e, n) {
|
|
|
1891
1895
|
isShown: !1
|
|
1892
1896
|
},
|
|
1893
1897
|
plugins: b,
|
|
1894
|
-
clearDelayTimeouts:
|
|
1895
|
-
setProps:
|
|
1896
|
-
setContent:
|
|
1897
|
-
show:
|
|
1898
|
-
hide:
|
|
1899
|
-
hideWithInteractivity:
|
|
1900
|
-
enable:
|
|
1901
|
-
disable:
|
|
1902
|
-
unmount:
|
|
1903
|
-
destroy:
|
|
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;
|
|
@@ -2029,16 +2033,16 @@ function createTippy$1(e, n) {
|
|
|
2029
2033
|
});
|
|
2030
2034
|
}
|
|
2031
2035
|
function J() {
|
|
2032
|
-
O() && (q("touchstart",
|
|
2033
|
-
if (e !== "manual") switch (q(e,
|
|
2036
|
+
O() && (q("touchstart", ty, { passive: !0 }), q("touchend", ny, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
|
|
2037
|
+
if (e !== "manual") switch (q(e, ty), e) {
|
|
2034
2038
|
case "mouseenter":
|
|
2035
|
-
q("mouseleave",
|
|
2039
|
+
q("mouseleave", ny);
|
|
2036
2040
|
break;
|
|
2037
2041
|
case "focus":
|
|
2038
|
-
q(isIE11$1 ? "focusout" : "blur",
|
|
2042
|
+
q(isIE11$1 ? "focusout" : "blur", ry);
|
|
2039
2043
|
break;
|
|
2040
2044
|
case "focusin":
|
|
2041
|
-
q("focusout",
|
|
2045
|
+
q("focusout", ry);
|
|
2042
2046
|
break;
|
|
2043
2047
|
}
|
|
2044
2048
|
});
|
|
@@ -2049,9 +2053,9 @@ function createTippy$1(e, n) {
|
|
|
2049
2053
|
n.removeEventListener(r, i, a);
|
|
2050
2054
|
}), m = [];
|
|
2051
2055
|
}
|
|
2052
|
-
function
|
|
2056
|
+
function ty(e) {
|
|
2053
2057
|
var n, r = !1;
|
|
2054
|
-
if (!(!x.state.isEnabled ||
|
|
2058
|
+
if (!(!x.state.isEnabled || iy(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);
|
|
@@ -2069,8 +2073,8 @@ function createTippy$1(e, n) {
|
|
|
2069
2073
|
} : null;
|
|
2070
2074
|
}).filter(Boolean), e) && (R(), $(e));
|
|
2071
2075
|
}
|
|
2072
|
-
function
|
|
2073
|
-
if (!(
|
|
2076
|
+
function ny(e) {
|
|
2077
|
+
if (!(iy(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
|
|
2085
|
+
function ry(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
|
|
2088
|
+
function iy(e) {
|
|
2085
2089
|
return currentInput$1.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
|
|
2086
2090
|
}
|
|
2087
|
-
function
|
|
2088
|
-
|
|
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
|
|
2150
|
+
function oy() {
|
|
2147
2151
|
x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
|
|
2148
2152
|
}
|
|
2149
|
-
function
|
|
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,
|
|
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
|
|
2181
|
+
function cy() {
|
|
2178
2182
|
x.state.isEnabled = !0;
|
|
2179
2183
|
}
|
|
2180
|
-
function
|
|
2184
|
+
function ly() {
|
|
2181
2185
|
x.hide(), x.state.isEnabled = !1;
|
|
2182
2186
|
}
|
|
2183
|
-
function
|
|
2187
|
+
function uy() {
|
|
2184
2188
|
clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
|
|
2185
2189
|
}
|
|
2186
|
-
function
|
|
2190
|
+
function dy(n) {
|
|
2187
2191
|
if (!x.state.isDestroyed) {
|
|
2188
2192
|
F("onBeforeUpdate", [x, n]), Y();
|
|
2189
2193
|
var r = x.props, i = evaluateProps$1(e, Object.assign({}, r, removeUndefinedProps$1(n), { ignoreAttributes: !0 }));
|
|
2190
2194
|
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) {
|
|
2191
2195
|
e.removeAttribute("aria-expanded");
|
|
2192
|
-
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (
|
|
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
|
|
2201
|
+
function fy(e) {
|
|
2198
2202
|
x.setProps({ content: e });
|
|
2199
2203
|
}
|
|
2200
|
-
function
|
|
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
|
-
},
|
|
2222
|
+
}, sy();
|
|
2219
2223
|
}
|
|
2220
2224
|
}
|
|
2221
|
-
function
|
|
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,17 +2232,17 @@ 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
|
|
2235
|
+
function hy(e) {
|
|
2232
2236
|
j().addEventListener("mousemove", g), pushIfUnique$1(mouseMoveListeners$1, g), g(e);
|
|
2233
2237
|
}
|
|
2234
|
-
function
|
|
2235
|
-
x.state.isVisible && x.hide(), x.state.isMounted && (
|
|
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
|
|
2245
|
+
function _y() {
|
|
2242
2246
|
x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
|
|
2243
2247
|
}
|
|
2244
2248
|
}
|
|
@@ -2957,7 +2961,7 @@ setDefaultProps$1$1({
|
|
|
2957
2961
|
animateFill
|
|
2958
2962
|
]
|
|
2959
2963
|
});
|
|
2960
|
-
var _hoisted_1$
|
|
2964
|
+
var _hoisted_1$34 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
|
|
2961
2965
|
__name: "shortcut-btn",
|
|
2962
2966
|
props: {
|
|
2963
2967
|
mode: {},
|
|
@@ -2981,7 +2985,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
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$
|
|
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), {
|
|
@@ -2990,7 +2994,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
2990
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$
|
|
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({
|
|
@@ -3132,7 +3136,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
3132
3136
|
zIndex: unref(SELECTION_Z_INDEX)
|
|
3133
3137
|
}),
|
|
3134
3138
|
onMousedown: o[2] || (o[2] = withModifiers(() => {}, ["stop"]))
|
|
3135
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
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, {
|
|
3136
3140
|
key: 0,
|
|
3137
3141
|
shortcut: n,
|
|
3138
3142
|
onClick: (e) => w(n)
|
|
@@ -3154,7 +3158,7 @@ var _hoisted_1$33 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
3154
3158
|
b.value = !0;
|
|
3155
3159
|
})
|
|
3156
3160
|
}, {
|
|
3157
|
-
content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
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, {
|
|
3158
3162
|
key: e.id,
|
|
3159
3163
|
mode: "menu",
|
|
3160
3164
|
shortcut: e,
|
|
@@ -3179,11 +3183,11 @@ const useObserverVisibleList = (e, n, r) => {
|
|
|
3179
3183
|
if (!e.value || n.value.length === 0) return;
|
|
3180
3184
|
yield nextTick();
|
|
3181
3185
|
let a = e.value.offsetWidth, o = /* @__PURE__ */ new Set(), s = 0;
|
|
3182
|
-
for (let e = 0; e < r.items.length; e++) {
|
|
3186
|
+
for (let e = 0; e < r.items.value.length; e++) {
|
|
3183
3187
|
var c, l;
|
|
3184
3188
|
let i = n.value[e];
|
|
3185
3189
|
if (!i) continue;
|
|
3186
|
-
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;
|
|
3187
3191
|
if (f && d + r.gap + p <= a) o.add(f), s = d;
|
|
3188
3192
|
else break;
|
|
3189
3193
|
}
|
|
@@ -3210,13 +3214,13 @@ const useObserverVisibleList = (e, n, r) => {
|
|
|
3210
3214
|
calculateVisibleMenuItems: a
|
|
3211
3215
|
};
|
|
3212
3216
|
};
|
|
3213
|
-
var _hoisted_1$
|
|
3217
|
+
var _hoisted_1$32 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
|
|
3214
3218
|
__name: "shortcut-btns",
|
|
3215
3219
|
props: { shortcuts: {} },
|
|
3216
3220
|
emits: ["selectShortcut"],
|
|
3217
3221
|
setup(n, { emit: r }) {
|
|
3218
3222
|
let i = document.body, o = n, d = r, p = useTemplateRef("containerRef"), m = shallowRef([]), g = useTemplateRef("moreMenuRef"), _ = useTemplateRef("moreBtnRef"), { visibleItems: v } = useObserverVisibleList(p, m, {
|
|
3219
|
-
items: o.shortcuts,
|
|
3223
|
+
items: computed(() => o.shortcuts),
|
|
3220
3224
|
gap: GAP,
|
|
3221
3225
|
moreItemRef: _
|
|
3222
3226
|
}), y = computed(() => o.shortcuts.filter((e) => !v.value.includes(e))), b = shallowRef(!1), x = (e, n) => {
|
|
@@ -3268,7 +3272,7 @@ var _hoisted_1$31 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
3268
3272
|
b.value = !1;
|
|
3269
3273
|
})
|
|
3270
3274
|
}, {
|
|
3271
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
3275
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$32, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
|
|
3272
3276
|
key: e.id,
|
|
3273
3277
|
mode: "menu",
|
|
3274
3278
|
shortcut: e,
|
|
@@ -3305,7 +3309,7 @@ function _objectWithoutProperties(e, n) {
|
|
|
3305
3309
|
}
|
|
3306
3310
|
return a;
|
|
3307
3311
|
}
|
|
3308
|
-
var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$
|
|
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({
|
|
3309
3313
|
__name: "shortcut-render",
|
|
3310
3314
|
props: {
|
|
3311
3315
|
alias: {},
|
|
@@ -3383,14 +3387,14 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$30 = { class:
|
|
|
3383
3387
|
}, x = () => {
|
|
3384
3388
|
a("close");
|
|
3385
3389
|
};
|
|
3386
|
-
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3390
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$21, [
|
|
3387
3391
|
createVNode(unref(ThinkingIcon), { class: "header-icon" }),
|
|
3388
3392
|
createElementVNode("span", _hoisted_3$15, toDisplayString(n.alias || n.name), 1),
|
|
3389
3393
|
createVNode(unref(CloseIcon), {
|
|
3390
3394
|
class: "header-close",
|
|
3391
3395
|
onClick: x
|
|
3392
3396
|
})
|
|
3393
|
-
]), createElementVNode("div", _hoisted_4$
|
|
3397
|
+
]), createElementVNode("div", _hoisted_4$14, [createVNode(unref(Form), {
|
|
3394
3398
|
ref_key: "formRef",
|
|
3395
3399
|
ref: o,
|
|
3396
3400
|
class: "shortcut-render-form",
|
|
@@ -3625,54 +3629,72 @@ const useClipboard = () => ({ copy: function() {
|
|
|
3625
3629
|
};
|
|
3626
3630
|
}
|
|
3627
3631
|
};
|
|
3628
|
-
}, CONTAINER_SCROLL_TOKEN = Symbol("CONTAINER_SCROLL_TOKEN"), useContainerScrollProvider = (e, n) => {
|
|
3629
|
-
let r = shallowRef(!1), i = null, o = shallowRef(0), s = 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
|
+
});
|
|
3630
3650
|
provide(CONTAINER_SCROLL_TOKEN, computed(() => ({
|
|
3631
3651
|
autoScrollEnabled: s.value,
|
|
3632
3652
|
isScrollBottom: r,
|
|
3633
3653
|
scrollBottomHeight: o,
|
|
3634
|
-
|
|
3635
|
-
|
|
3654
|
+
debouncedShowScrollBottomBtn: c,
|
|
3655
|
+
toScrollBottom: l,
|
|
3656
|
+
toScrollTop: u
|
|
3636
3657
|
})));
|
|
3637
|
-
let
|
|
3658
|
+
let l = () => {
|
|
3638
3659
|
var e;
|
|
3639
3660
|
s.value = !0, (e = toValue(n)) == null || e.scrollIntoView({
|
|
3640
3661
|
behavior: "smooth",
|
|
3641
3662
|
block: "end"
|
|
3642
3663
|
});
|
|
3643
|
-
},
|
|
3664
|
+
}, u = () => {
|
|
3644
3665
|
var n;
|
|
3645
3666
|
(n = toValue(e)) == null || n.scrollTo({
|
|
3646
3667
|
top: 0,
|
|
3647
3668
|
behavior: "smooth"
|
|
3648
3669
|
});
|
|
3649
|
-
},
|
|
3670
|
+
}, d = () => {
|
|
3650
3671
|
let n = toValue(e);
|
|
3651
3672
|
if (!n) return;
|
|
3652
|
-
let { scrollHeight:
|
|
3653
|
-
o.value = Math.max(0,
|
|
3654
|
-
},
|
|
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) => {
|
|
3655
3676
|
e.deltaY < 0 && (s.value = !1);
|
|
3656
3677
|
};
|
|
3657
3678
|
return onMounted(() => {
|
|
3658
3679
|
watchEffect(() => {
|
|
3659
|
-
let a = toValue(e),
|
|
3660
|
-
!a || !
|
|
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) => {
|
|
3661
3682
|
e.forEach((e) => {
|
|
3662
|
-
e.isIntersecting ? (r.value = !0, o.value = 0, s.value = !0) : (r.value = !1,
|
|
3683
|
+
e.isIntersecting ? (r.value = !0, o.value = 0, s.value = !0, c.value = !1) : (r.value = !1, d());
|
|
3663
3684
|
});
|
|
3664
|
-
}), i.observe(
|
|
3685
|
+
}), i.observe(l), a.addEventListener("scroll", d, { passive: !0 }), a.addEventListener("wheel", f, { passive: !0 }));
|
|
3665
3686
|
});
|
|
3666
3687
|
}), onScopeDispose(() => {
|
|
3667
3688
|
i == null || i.disconnect();
|
|
3668
3689
|
let n = toValue(e);
|
|
3669
|
-
n && (n.removeEventListener("scroll",
|
|
3690
|
+
n && (n.removeEventListener("scroll", d), n.removeEventListener("wheel", f));
|
|
3670
3691
|
}), {
|
|
3671
3692
|
autoScrollEnabled: s,
|
|
3672
3693
|
isScrollBottom: r,
|
|
3673
3694
|
scrollBottomHeight: o,
|
|
3674
|
-
toScrollBottom:
|
|
3675
|
-
toScrollTop:
|
|
3695
|
+
toScrollBottom: l,
|
|
3696
|
+
toScrollTop: u,
|
|
3697
|
+
debouncedShowScrollBottomBtn: c
|
|
3676
3698
|
};
|
|
3677
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 = () => {
|
|
3678
3700
|
let e = computed(() => `#${MESSAGE_SLOT_ID}`);
|
|
@@ -6807,7 +6829,7 @@ function parseLatexEnvName(e, n) {
|
|
|
6807
6829
|
endIdx: r + 1
|
|
6808
6830
|
};
|
|
6809
6831
|
}
|
|
6810
|
-
var _hoisted_1$
|
|
6832
|
+
var _hoisted_1$30 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
|
|
6811
6833
|
__name: "tool-btn",
|
|
6812
6834
|
props: {
|
|
6813
6835
|
description: {},
|
|
@@ -6832,10 +6854,11 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
6832
6854
|
"is-active": e.active,
|
|
6833
6855
|
"is-disabled": e.disabled
|
|
6834
6856
|
}]),
|
|
6857
|
+
style: normalizeStyle({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
|
|
6835
6858
|
onClick: c
|
|
6836
|
-
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
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]]);
|
|
6837
6860
|
}
|
|
6838
|
-
}), _hoisted_1$
|
|
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({
|
|
6839
6862
|
__name: "code-content",
|
|
6840
6863
|
props: { token: {} },
|
|
6841
6864
|
emits: ["mounted"],
|
|
@@ -6917,12 +6940,12 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
6917
6940
|
let n = (e = s.value) == null ? void 0 : e.innerText;
|
|
6918
6941
|
n && m(n);
|
|
6919
6942
|
};
|
|
6920
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
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, {
|
|
6921
6944
|
id: "copy",
|
|
6922
6945
|
description: "复制",
|
|
6923
6946
|
name: "复制",
|
|
6924
6947
|
onClick: O
|
|
6925
|
-
})]), createElementVNode("pre", _hoisted_4$
|
|
6948
|
+
})]), createElementVNode("pre", _hoisted_4$13, [createElementVNode("code", {
|
|
6926
6949
|
ref_key: "codeRef",
|
|
6927
6950
|
ref: s,
|
|
6928
6951
|
class: normalizeClass(D.value)
|
|
@@ -6935,10 +6958,10 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
6935
6958
|
innerHTML: v.value
|
|
6936
6959
|
}, null, 8, _hoisted_6$4)) : createCommentVNode("", !0)], 2)])]));
|
|
6937
6960
|
}
|
|
6938
|
-
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$
|
|
6961
|
+
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$28 = { class: "md-image-wrapper" }, _hoisted_2$19 = {
|
|
6939
6962
|
key: 0,
|
|
6940
6963
|
class: "md-image-loading"
|
|
6941
|
-
}, _hoisted_3$13 = { class: "md-image-loading-text" }, _hoisted_4$
|
|
6964
|
+
}, _hoisted_3$13 = { class: "md-image-loading-text" }, _hoisted_4$12 = {
|
|
6942
6965
|
key: 1,
|
|
6943
6966
|
class: "md-image-error"
|
|
6944
6967
|
}, _hoisted_5$8 = { class: "md-image-error-text" }, _hoisted_6$3 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6990,11 +7013,11 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
6990
7013
|
c.value = !1, g(), _.value ? v(e) : (o.value = !0, s.value = !1);
|
|
6991
7014
|
}, { immediate: !0 }), watch(_, (e) => {
|
|
6992
7015
|
e && r.src && v(r.src);
|
|
6993
|
-
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$
|
|
7016
|
+
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$28, [p.value ? (openBlock(), createElementBlock("span", _hoisted_2$19, [createVNode(unref(Loading), {
|
|
6994
7017
|
mode: "spin",
|
|
6995
7018
|
size: "mini",
|
|
6996
7019
|
theme: "primary"
|
|
6997
|
-
}), createElementVNode("span", _hoisted_3$13, toDisplayString(unref(t)("图片加载中...")), 1)])) : m.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
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", {
|
|
6998
7021
|
key: 2,
|
|
6999
7022
|
alt: e.alt,
|
|
7000
7023
|
class: "md-image",
|
|
@@ -7226,7 +7249,7 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
7226
7249
|
innerHTML: r.value
|
|
7227
7250
|
}, null, 8, ["class", "innerHTML"]));
|
|
7228
7251
|
}
|
|
7229
|
-
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
7252
|
+
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$27 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
|
|
7230
7253
|
__name: "mermaid-content",
|
|
7231
7254
|
props: { token: {} },
|
|
7232
7255
|
emits: ["mounted"],
|
|
@@ -7285,13 +7308,13 @@ var _hoisted_1$29 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineCompone
|
|
|
7285
7308
|
ref: i,
|
|
7286
7309
|
class: "mermaid-content",
|
|
7287
7310
|
innerHTML: r.value
|
|
7288
|
-
}, null, 8, _hoisted_1$
|
|
7311
|
+
}, null, 8, _hoisted_1$27));
|
|
7289
7312
|
}
|
|
7290
|
-
}), _hoisted_1$
|
|
7313
|
+
}), _hoisted_1$26 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
|
|
7291
7314
|
__name: "common-error-content",
|
|
7292
7315
|
props: { content: {} },
|
|
7293
7316
|
setup(e) {
|
|
7294
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7317
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
|
|
7295
7318
|
}
|
|
7296
7319
|
}), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
|
|
7297
7320
|
keyCounterMap = /* @__PURE__ */ new Map();
|
|
@@ -7457,7 +7480,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
7457
7480
|
setup(e) {
|
|
7458
7481
|
return () => tokensToVNodes(e.tokens, e.options);
|
|
7459
7482
|
}
|
|
7460
|
-
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
7483
|
+
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$25 = { class: "markdown-content" }, _hoisted_2$18 = {
|
|
7461
7484
|
key: 1,
|
|
7462
7485
|
class: "markdown-body"
|
|
7463
7486
|
}, markdown_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7554,10 +7577,10 @@ var vnode_renderer_default = defineComponent({
|
|
|
7554
7577
|
leading: !0,
|
|
7555
7578
|
trailing: !0
|
|
7556
7579
|
});
|
|
7557
|
-
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7580
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$25, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
7558
7581
|
key: 0,
|
|
7559
7582
|
content: n.content
|
|
7560
|
-
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
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), {
|
|
7561
7584
|
key: r,
|
|
7562
7585
|
token: n,
|
|
7563
7586
|
onMounted: unref(g)
|
|
@@ -7576,7 +7599,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
7576
7599
|
onVnodeMounted: unref(g)
|
|
7577
7600
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
7578
7601
|
}
|
|
7579
|
-
}), _hoisted_1$
|
|
7602
|
+
}), _hoisted_1$24 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
|
|
7580
7603
|
__name: "reference-content",
|
|
7581
7604
|
props: { content: {} },
|
|
7582
7605
|
setup(n) {
|
|
@@ -7595,7 +7618,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
7595
7618
|
createElementVNode("span", {
|
|
7596
7619
|
class: "ai-reference-item-title",
|
|
7597
7620
|
onClick: (n) => e.url && i(e.url, n)
|
|
7598
|
-
}, toDisplayString(e.title), 9, _hoisted_1$
|
|
7621
|
+
}, toDisplayString(e.title), 9, _hoisted_1$24),
|
|
7599
7622
|
e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
|
|
7600
7623
|
key: 0,
|
|
7601
7624
|
onClick: (n) => e.url && i(e.url, n)
|
|
@@ -8168,7 +8191,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
|
|
|
8168
8191
|
}({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
|
|
8169
8192
|
return e.Disabled = "disabled", e.Hidden = "hidden", e;
|
|
8170
8193
|
}({});
|
|
8171
|
-
var _hoisted_1$
|
|
8194
|
+
var _hoisted_1$23 = { class: "file-upload-btn" }, _hoisted_2$17 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
|
|
8172
8195
|
__name: "file-upload-btn",
|
|
8173
8196
|
props: {
|
|
8174
8197
|
accept: { default: "image/*" },
|
|
@@ -8197,7 +8220,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8197
8220
|
}
|
|
8198
8221
|
n.value = "";
|
|
8199
8222
|
};
|
|
8200
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8223
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$23, [createElementVNode("input", {
|
|
8201
8224
|
ref_key: "fileInputRef",
|
|
8202
8225
|
ref: a,
|
|
8203
8226
|
accept: e.accept,
|
|
@@ -8205,7 +8228,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8205
8228
|
multiple: "",
|
|
8206
8229
|
type: "file",
|
|
8207
8230
|
onChange: s
|
|
8208
|
-
}, null, 40, _hoisted_2$
|
|
8231
|
+
}, null, 40, _hoisted_2$17), withDirectives((openBlock(), createElementBlock("span", {
|
|
8209
8232
|
class: "ai-shortcut-btn file-upload-btn-icon",
|
|
8210
8233
|
onClick: o
|
|
8211
8234
|
}, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
|
|
@@ -8214,16 +8237,16 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8214
8237
|
offset: [0, 16]
|
|
8215
8238
|
}]])]));
|
|
8216
8239
|
}
|
|
8217
|
-
}), _hoisted_1$
|
|
8240
|
+
}), _hoisted_1$22 = { class: "ai-cite-content" }, _hoisted_2$16 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
|
|
8218
8241
|
__name: "cite-content",
|
|
8219
8242
|
props: {
|
|
8220
8243
|
content: {},
|
|
8221
8244
|
onClose: { type: Function }
|
|
8222
8245
|
},
|
|
8223
8246
|
setup(e) {
|
|
8224
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8247
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
|
|
8225
8248
|
createVNode(unref(CiteIcon)),
|
|
8226
|
-
createElementVNode("span", _hoisted_2$
|
|
8249
|
+
createElementVNode("span", _hoisted_2$16, toDisplayString(e.content), 1),
|
|
8227
8250
|
e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
|
|
8228
8251
|
key: 0,
|
|
8229
8252
|
onClick: r[0] || (r[0] = (n) => {
|
|
@@ -8233,14 +8256,14 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8233
8256
|
})) : createCommentVNode("", !0)
|
|
8234
8257
|
]));
|
|
8235
8258
|
}
|
|
8236
|
-
}), _hoisted_1$
|
|
8259
|
+
}), _hoisted_1$21 = { class: "ai-files-content" }, _hoisted_2$15 = [
|
|
8237
8260
|
"alt",
|
|
8238
8261
|
"src",
|
|
8239
8262
|
"onError"
|
|
8240
8263
|
], _hoisted_3$12 = {
|
|
8241
8264
|
key: 1,
|
|
8242
8265
|
class: "file-content-image image-error"
|
|
8243
|
-
}, _hoisted_4$
|
|
8266
|
+
}, _hoisted_4$11 = {
|
|
8244
8267
|
key: 2,
|
|
8245
8268
|
class: "file-content-object"
|
|
8246
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({
|
|
@@ -8262,7 +8285,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8262
8285
|
}, m = (e) => {
|
|
8263
8286
|
i("deleteFile", e);
|
|
8264
8287
|
};
|
|
8265
|
-
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8288
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$21, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
|
|
8266
8289
|
var r, i, g, _, v;
|
|
8267
8290
|
return openBlock(), createElementBlock("div", {
|
|
8268
8291
|
key: (r = e.file) == null ? void 0 : r.name,
|
|
@@ -8273,7 +8296,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8273
8296
|
class: "file-content-image",
|
|
8274
8297
|
src: e.url || unref(getFilePreviewUrl)(e.file),
|
|
8275
8298
|
onError: (n) => p(e)
|
|
8276
|
-
}, null, 40, _hoisted_2$
|
|
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, [
|
|
8277
8300
|
createVNode(unref(DocumentIcon), { class: "file-icon" }),
|
|
8278
8301
|
createElementVNode("span", _hoisted_6$2, toDisplayString(e.filename || ((g = e.file) == null ? void 0 : g.name)), 1),
|
|
8279
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)
|
|
@@ -8284,7 +8307,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8284
8307
|
}, null, 8, ["onClick"]))], 2);
|
|
8285
8308
|
}), 128))]));
|
|
8286
8309
|
}
|
|
8287
|
-
}), _hoisted_1$
|
|
8310
|
+
}), _hoisted_1$20 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
|
|
8288
8311
|
__name: "ai-prompt-list",
|
|
8289
8312
|
props: {
|
|
8290
8313
|
onSelect: { type: Function },
|
|
@@ -8304,7 +8327,7 @@ var _hoisted_1$22 = { class: "file-upload-btn" }, _hoisted_2$16 = ["accept"], fi
|
|
|
8304
8327
|
key: e,
|
|
8305
8328
|
class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(o) === r }]),
|
|
8306
8329
|
onClick: (r) => n.onSelect(e)
|
|
8307
|
-
}, toDisplayString(e), 11, _hoisted_1$
|
|
8330
|
+
}, toDisplayString(e), 11, _hoisted_1$20))), 128))], 512));
|
|
8308
8331
|
}
|
|
8309
8332
|
}), bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
|
|
8310
8333
|
"top",
|
|
@@ -8969,12 +8992,12 @@ function preventOverflow(e) {
|
|
|
8969
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) : {
|
|
8970
8993
|
width: 0,
|
|
8971
8994
|
height: 0
|
|
8972
|
-
}, 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),
|
|
8973
|
-
w[S] =
|
|
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, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent(n.elements.arrow), ty = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, ny = F + q - X - ty, ry = F + J - X, iy = within(m ? min$1(I, ny) : I, F, m ? max(L, ry) : L);
|
|
8996
|
+
w[S] = iy, A[S] = iy - F;
|
|
8974
8997
|
}
|
|
8975
8998
|
if (c) {
|
|
8976
|
-
var
|
|
8977
|
-
w[C] =
|
|
8999
|
+
var ay, oy = S === "x" ? "top" : left, sy = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[oy], cy = Z - v[sy], ly = ["top", left].indexOf(y) !== -1, uy = (ay = k == null ? void 0 : k[C]) == null ? 0 : ay, dy = ly ? $ : Z - T[Q] - E[Q] - uy + O.altAxis, fy = ly ? Z + T[Q] + E[Q] - uy - O.altAxis : cy, py = m && ly ? withinMaxClamp(dy, Z, fy) : within(m ? dy : $, Z, m ? fy : cy);
|
|
9000
|
+
w[C] = py, A[C] = py - Z;
|
|
8978
9001
|
}
|
|
8979
9002
|
n.modifiersData[i] = A;
|
|
8980
9003
|
}
|
|
@@ -9514,16 +9537,16 @@ function createTippy(e, n) {
|
|
|
9514
9537
|
isShown: !1
|
|
9515
9538
|
},
|
|
9516
9539
|
plugins: b,
|
|
9517
|
-
clearDelayTimeouts:
|
|
9518
|
-
setProps:
|
|
9519
|
-
setContent:
|
|
9520
|
-
show:
|
|
9521
|
-
hide:
|
|
9522
|
-
hideWithInteractivity:
|
|
9523
|
-
enable:
|
|
9524
|
-
disable:
|
|
9525
|
-
unmount:
|
|
9526
|
-
destroy:
|
|
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
|
|
9527
9550
|
};
|
|
9528
9551
|
/* istanbul ignore if */
|
|
9529
9552
|
if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
|
|
@@ -9652,16 +9675,16 @@ function createTippy(e, n) {
|
|
|
9652
9675
|
});
|
|
9653
9676
|
}
|
|
9654
9677
|
function J() {
|
|
9655
|
-
O() && (q("touchstart",
|
|
9656
|
-
if (e !== "manual") switch (q(e,
|
|
9678
|
+
O() && (q("touchstart", ty, { passive: !0 }), q("touchend", ny, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
|
|
9679
|
+
if (e !== "manual") switch (q(e, ty), e) {
|
|
9657
9680
|
case "mouseenter":
|
|
9658
|
-
q("mouseleave",
|
|
9681
|
+
q("mouseleave", ny);
|
|
9659
9682
|
break;
|
|
9660
9683
|
case "focus":
|
|
9661
|
-
q(isIE11 ? "focusout" : "blur",
|
|
9684
|
+
q(isIE11 ? "focusout" : "blur", ry);
|
|
9662
9685
|
break;
|
|
9663
9686
|
case "focusin":
|
|
9664
|
-
q("focusout",
|
|
9687
|
+
q("focusout", ry);
|
|
9665
9688
|
break;
|
|
9666
9689
|
}
|
|
9667
9690
|
});
|
|
@@ -9672,9 +9695,9 @@ function createTippy(e, n) {
|
|
|
9672
9695
|
n.removeEventListener(r, i, a);
|
|
9673
9696
|
}), m = [];
|
|
9674
9697
|
}
|
|
9675
|
-
function
|
|
9698
|
+
function ty(e) {
|
|
9676
9699
|
var n, r = !1;
|
|
9677
|
-
if (!(!x.state.isEnabled ||
|
|
9700
|
+
if (!(!x.state.isEnabled || iy(e) || c)) {
|
|
9678
9701
|
var i = ((n = d) == null ? void 0 : n.type) === "focus";
|
|
9679
9702
|
d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent(e) && mouseMoveListeners.forEach(function(n) {
|
|
9680
9703
|
return n(e);
|
|
@@ -9692,8 +9715,8 @@ function createTippy(e, n) {
|
|
|
9692
9715
|
} : null;
|
|
9693
9716
|
}).filter(Boolean), e) && (R(), $(e));
|
|
9694
9717
|
}
|
|
9695
|
-
function
|
|
9696
|
-
if (!(
|
|
9718
|
+
function ny(e) {
|
|
9719
|
+
if (!(iy(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
|
|
9697
9720
|
if (x.props.interactive) {
|
|
9698
9721
|
x.hideWithInteractivity(e);
|
|
9699
9722
|
return;
|
|
@@ -9701,14 +9724,14 @@ function createTippy(e, n) {
|
|
|
9701
9724
|
$(e);
|
|
9702
9725
|
}
|
|
9703
9726
|
}
|
|
9704
|
-
function
|
|
9727
|
+
function ry(e) {
|
|
9705
9728
|
x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
|
|
9706
9729
|
}
|
|
9707
|
-
function
|
|
9730
|
+
function iy(e) {
|
|
9708
9731
|
return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
|
|
9709
9732
|
}
|
|
9710
|
-
function
|
|
9711
|
-
|
|
9733
|
+
function ay() {
|
|
9734
|
+
oy();
|
|
9712
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 ? {
|
|
9713
9736
|
getBoundingClientRect: o,
|
|
9714
9737
|
contextElement: o.contextElement || A()
|
|
@@ -9766,13 +9789,13 @@ function createTippy(e, n) {
|
|
|
9766
9789
|
modifiers: u
|
|
9767
9790
|
}));
|
|
9768
9791
|
}
|
|
9769
|
-
function
|
|
9792
|
+
function oy() {
|
|
9770
9793
|
x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
|
|
9771
9794
|
}
|
|
9772
|
-
function
|
|
9795
|
+
function sy() {
|
|
9773
9796
|
var e = x.props.appendTo, n, r = A();
|
|
9774
9797
|
/* istanbul ignore else */
|
|
9775
|
-
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,
|
|
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, [
|
|
9776
9799
|
"Interactive tippy element may not be accessible via keyboard",
|
|
9777
9800
|
"navigation because it is not directly after the reference element",
|
|
9778
9801
|
"in the DOM source order.",
|
|
@@ -9811,31 +9834,31 @@ function createTippy(e, n) {
|
|
|
9811
9834
|
});
|
|
9812
9835
|
}
|
|
9813
9836
|
}
|
|
9814
|
-
function
|
|
9837
|
+
function cy() {
|
|
9815
9838
|
x.state.isEnabled = !0;
|
|
9816
9839
|
}
|
|
9817
|
-
function
|
|
9840
|
+
function ly() {
|
|
9818
9841
|
x.hide(), x.state.isEnabled = !1;
|
|
9819
9842
|
}
|
|
9820
|
-
function
|
|
9843
|
+
function uy() {
|
|
9821
9844
|
clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
|
|
9822
9845
|
}
|
|
9823
|
-
function
|
|
9846
|
+
function dy(n) {
|
|
9824
9847
|
/* istanbul ignore else */
|
|
9825
9848
|
if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
|
|
9826
9849
|
F("onBeforeUpdate", [x, n]), Y();
|
|
9827
9850
|
var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
|
|
9828
9851
|
x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
|
|
9829
9852
|
e.removeAttribute("aria-expanded");
|
|
9830
|
-
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (
|
|
9853
|
+
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (ay(), Z().forEach(function(e) {
|
|
9831
9854
|
requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
|
|
9832
9855
|
})), F("onAfterUpdate", [x, n]);
|
|
9833
9856
|
}
|
|
9834
9857
|
}
|
|
9835
|
-
function
|
|
9858
|
+
function fy(e) {
|
|
9836
9859
|
x.setProps({ content: e });
|
|
9837
9860
|
}
|
|
9838
|
-
function
|
|
9861
|
+
function py() {
|
|
9839
9862
|
/* istanbul ignore else */
|
|
9840
9863
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
|
|
9841
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);
|
|
@@ -9855,10 +9878,10 @@ function createTippy(e, n) {
|
|
|
9855
9878
|
x.state.isShown = !0, F("onShown", [x]);
|
|
9856
9879
|
});
|
|
9857
9880
|
}
|
|
9858
|
-
},
|
|
9881
|
+
}, sy();
|
|
9859
9882
|
}
|
|
9860
9883
|
}
|
|
9861
|
-
function
|
|
9884
|
+
function my() {
|
|
9862
9885
|
/* istanbul ignore else */
|
|
9863
9886
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
|
|
9864
9887
|
var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
|
|
@@ -9870,18 +9893,18 @@ function createTippy(e, n) {
|
|
|
9870
9893
|
I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
|
|
9871
9894
|
}
|
|
9872
9895
|
}
|
|
9873
|
-
function
|
|
9896
|
+
function hy(e) {
|
|
9874
9897
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
|
|
9875
9898
|
}
|
|
9876
|
-
function
|
|
9899
|
+
function gy() {
|
|
9877
9900
|
/* istanbul ignore else */
|
|
9878
|
-
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (
|
|
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) {
|
|
9879
9902
|
e._tippy.unmount();
|
|
9880
9903
|
}), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
|
|
9881
9904
|
return e !== x;
|
|
9882
9905
|
}), x.state.isMounted = !1, F("onHidden", [x]));
|
|
9883
9906
|
}
|
|
9884
|
-
function
|
|
9907
|
+
function _y() {
|
|
9885
9908
|
/* istanbul ignore else */
|
|
9886
9909
|
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]));
|
|
9887
9910
|
}
|
|
@@ -9968,7 +9991,7 @@ const OverflowTips = {
|
|
|
9968
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;
|
|
9969
9992
|
}
|
|
9970
9993
|
};
|
|
9971
|
-
var _hoisted_1$
|
|
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({
|
|
9972
9995
|
__name: "ai-slash-menu",
|
|
9973
9996
|
props: {
|
|
9974
9997
|
onSelect: { type: Function },
|
|
@@ -10013,13 +10036,13 @@ var _hoisted_1$18 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
10013
10036
|
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (r, i) => (openBlock(), createElementBlock(Fragment, null, [r.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
10014
10037
|
key: i,
|
|
10015
10038
|
class: "ai-slash-group"
|
|
10016
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
10039
|
+
}, [createElementVNode("div", _hoisted_1$19, [
|
|
10017
10040
|
(openBlock(), createElementBlock("svg", {
|
|
10018
10041
|
class: "title-icon",
|
|
10019
10042
|
style: normalizeStyle({ transform: a.value.includes(r.type) ? "rotate(90deg)" : "rotate(0deg)" }),
|
|
10020
10043
|
viewBox: "0 0 1024 1024",
|
|
10021
10044
|
onClick: (e) => p(r)
|
|
10022
|
-
}, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$
|
|
10045
|
+
}, [...m[0] || (m[0] = [createElementVNode("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, _hoisted_2$14)),
|
|
10023
10046
|
createElementVNode("span", { class: normalizeClass(`mark-${r.type}`) }, null, 2),
|
|
10024
10047
|
createTextVNode(" " + toDisplayString(r.name) + " (" + toDisplayString(r.items.length) + ") ", 1)
|
|
10025
10048
|
]), a.value.includes(r.type) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(r.items, (e) => {
|
|
@@ -10031,7 +10054,7 @@ var _hoisted_1$18 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
10031
10054
|
}, [withDirectives((openBlock(), createElementBlock("span", {
|
|
10032
10055
|
class: "ellipsis-text",
|
|
10033
10056
|
title: e.name
|
|
10034
|
-
}, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$
|
|
10057
|
+
}, [createTextVNode(toDisplayString(e.name), 1)], 8, _hoisted_4$10)), [[unref(OverflowTips), {
|
|
10035
10058
|
text: e.name,
|
|
10036
10059
|
zIndex: 9999999,
|
|
10037
10060
|
placement: "right-start",
|
|
@@ -10057,7 +10080,7 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
|
|
|
10057
10080
|
plain: (e) => e.label
|
|
10058
10081
|
}) }
|
|
10059
10082
|
});
|
|
10060
|
-
var _hoisted_1$
|
|
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({
|
|
10061
10084
|
__name: "ai-slash-input",
|
|
10062
10085
|
props: /* @__PURE__ */ mergeModels({
|
|
10063
10086
|
placeholder: { default: isEn ? "Please enter content" : "请输入内容" },
|
|
@@ -10174,7 +10197,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10174
10197
|
n && i.push(n);
|
|
10175
10198
|
}
|
|
10176
10199
|
i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), m("upload", i));
|
|
10177
|
-
},
|
|
10200
|
+
}, ty = () => {
|
|
10178
10201
|
T == null || T(), w = createEditor({
|
|
10179
10202
|
doc: v.value,
|
|
10180
10203
|
schema: tagSchema,
|
|
@@ -10188,10 +10211,10 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10188
10211
|
}(),
|
|
10189
10212
|
onKeyDown: (e) => P(e)
|
|
10190
10213
|
}), T = w.input(a.value);
|
|
10191
|
-
},
|
|
10214
|
+
}, ny = () => y.value === "slash" ? x.value.length < 1 ? !1 : void 0 : S.value.length < 1 ? !1 : void 0;
|
|
10192
10215
|
return onMounted(() => {
|
|
10193
10216
|
var e;
|
|
10194
|
-
|
|
10217
|
+
ty(), (e = a.value) == null || e.addEventListener("paste", J);
|
|
10195
10218
|
}), onUnmounted(() => {
|
|
10196
10219
|
var e;
|
|
10197
10220
|
w.command(ReplaceAll, ""), T == null || T(), (e = a.value) == null || e.removeEventListener("paste", J);
|
|
@@ -10200,7 +10223,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10200
10223
|
w.command(ReplaceAll, "");
|
|
10201
10224
|
},
|
|
10202
10225
|
focus: U
|
|
10203
|
-
}), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10226
|
+
}), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$18, [createElementVNode("div", {
|
|
10204
10227
|
ref_key: "editorRef",
|
|
10205
10228
|
ref: a,
|
|
10206
10229
|
"aria-placeholder": n.placeholder,
|
|
@@ -10214,7 +10237,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10214
10237
|
}, [createTextVNode(toDisplayString(i.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
10215
10238
|
class: "mention-tag-remove-icon",
|
|
10216
10239
|
onClick: (e) => q(n, i, a, r)
|
|
10217
|
-
}, null, 8, ["onClick"])], 10, _hoisted_4$
|
|
10240
|
+
}, 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), {
|
|
10218
10241
|
ref_key: "tippyRef",
|
|
10219
10242
|
ref: o,
|
|
10220
10243
|
"append-to": unref(D),
|
|
@@ -10228,7 +10251,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10228
10251
|
"trigger-target": a.value,
|
|
10229
10252
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
10230
10253
|
onHidden: F,
|
|
10231
|
-
onShow:
|
|
10254
|
+
onShow: ny
|
|
10232
10255
|
}, {
|
|
10233
10256
|
content: withCtx(() => [y.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
10234
10257
|
key: 0,
|
|
@@ -10246,7 +10269,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10246
10269
|
"z-index"
|
|
10247
10270
|
])]));
|
|
10248
10271
|
}
|
|
10249
|
-
}), _hoisted_1$
|
|
10272
|
+
}), _hoisted_1$17 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
|
|
10250
10273
|
__name: "input-attachment",
|
|
10251
10274
|
props: { messageState: {} },
|
|
10252
10275
|
emits: ["sendMessage", "stopSending"],
|
|
@@ -10256,7 +10279,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10256
10279
|
}, o = () => {
|
|
10257
10280
|
r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
|
|
10258
10281
|
};
|
|
10259
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10282
|
+
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), {
|
|
10260
10283
|
key: 0,
|
|
10261
10284
|
onClick: a
|
|
10262
10285
|
}, null, 512)), [[unref(directive), {
|
|
@@ -10272,7 +10295,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10272
10295
|
offset: [0, 16]
|
|
10273
10296
|
}]])], 2)])]));
|
|
10274
10297
|
}
|
|
10275
|
-
}), _hoisted_1$
|
|
10298
|
+
}), _hoisted_1$16 = { class: "chat-input-container" }, _hoisted_2$12 = {
|
|
10276
10299
|
key: 1,
|
|
10277
10300
|
class: "ai-divider"
|
|
10278
10301
|
}, chat_input_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10402,7 +10425,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10402
10425
|
(e = i.value) == null || (n = e.focus) == null || n.call(e);
|
|
10403
10426
|
},
|
|
10404
10427
|
triggerSendMessage: C
|
|
10405
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10428
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$16, [renderSlot(n.$slots, "top"), createElementVNode("div", {
|
|
10406
10429
|
class: "chat-input",
|
|
10407
10430
|
style: normalizeStyle({ maxHeight: m.value + "px" })
|
|
10408
10431
|
}, [
|
|
@@ -10449,7 +10472,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10449
10472
|
key: 0,
|
|
10450
10473
|
onUpload: j
|
|
10451
10474
|
})) : createCommentVNode("", !0),
|
|
10452
|
-
S.value && ((r = e.shortcuts) != null && r.length || b.value) ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
10475
|
+
S.value && ((r = e.shortcuts) != null && r.length || b.value) ? (openBlock(), createElementBlock("span", _hoisted_2$12)) : createCommentVNode("", !0),
|
|
10453
10476
|
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !b.value ? (openBlock(), createBlock(shortcut_btns_default, {
|
|
10454
10477
|
key: 0,
|
|
10455
10478
|
shortcuts: e.shortcuts,
|
|
@@ -10469,16 +10492,78 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10469
10492
|
}, 8, ["message-state"])
|
|
10470
10493
|
], 4)]));
|
|
10471
10494
|
}
|
|
10472
|
-
}), _hoisted_1$
|
|
10495
|
+
}), _hoisted_1$15 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
|
|
10473
10496
|
__name: "scroll-btn",
|
|
10474
10497
|
props: {
|
|
10475
10498
|
disabled: { type: Boolean },
|
|
10476
10499
|
title: {}
|
|
10477
10500
|
},
|
|
10478
10501
|
setup(e) {
|
|
10479
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10502
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$15, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
|
|
10480
10503
|
}
|
|
10481
|
-
}), _hoisted_1$
|
|
10504
|
+
}), _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({
|
|
10505
|
+
__name: "delete-tool",
|
|
10506
|
+
props: {
|
|
10507
|
+
description: {},
|
|
10508
|
+
id: {},
|
|
10509
|
+
name: {},
|
|
10510
|
+
disabled: { type: Boolean },
|
|
10511
|
+
tippyOptions: {}
|
|
10512
|
+
},
|
|
10513
|
+
emits: ["confirm", "cancel"],
|
|
10514
|
+
setup(e, { emit: n }) {
|
|
10515
|
+
let r = e, i = n, o = useTemplateRef("tippyRef"), c = computed(() => ({
|
|
10516
|
+
id: r.id,
|
|
10517
|
+
name: r.name,
|
|
10518
|
+
description: r.description,
|
|
10519
|
+
disabled: r.disabled,
|
|
10520
|
+
tippyOptions: r.tippyOptions
|
|
10521
|
+
})), l = computed(() => _objectSpread2({
|
|
10522
|
+
arrow: !1,
|
|
10523
|
+
interactive: !0,
|
|
10524
|
+
offset: [0, 6],
|
|
10525
|
+
theme: "ai-chat-box-light light",
|
|
10526
|
+
trigger: "click",
|
|
10527
|
+
appendTo: () => document.body
|
|
10528
|
+
}, r.tippyOptions || {})), p = () => {
|
|
10529
|
+
if (r.disabled) return !1;
|
|
10530
|
+
}, m = () => {
|
|
10531
|
+
var e, n;
|
|
10532
|
+
(e = o.value) == null || (n = e.hide) == null || n.call(e);
|
|
10533
|
+
}, g = () => {
|
|
10534
|
+
m(), i("confirm");
|
|
10535
|
+
}, v = () => {
|
|
10536
|
+
m(), i("cancel");
|
|
10537
|
+
};
|
|
10538
|
+
return onUnmounted(() => {
|
|
10539
|
+
m();
|
|
10540
|
+
}), (e, n) => (openBlock(), createBlock(unref(TippyComponent), mergeProps({
|
|
10541
|
+
ref_key: "tippyRef",
|
|
10542
|
+
ref: o
|
|
10543
|
+
}, l.value, { onShow: p }), {
|
|
10544
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$14, [
|
|
10545
|
+
createElementVNode("div", _hoisted_2$11, toDisplayString(unref(t)("确认删除该回答?")), 1),
|
|
10546
|
+
createElementVNode("div", _hoisted_3$9, toDisplayString(unref(t)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
10547
|
+
createElementVNode("div", _hoisted_4$8, [createVNode(unref(Button), {
|
|
10548
|
+
size: "small",
|
|
10549
|
+
theme: "danger",
|
|
10550
|
+
onClick: g
|
|
10551
|
+
}, {
|
|
10552
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("删除")), 1)]),
|
|
10553
|
+
_: 1
|
|
10554
|
+
}), createVNode(unref(Button), {
|
|
10555
|
+
size: "small",
|
|
10556
|
+
onClick: v
|
|
10557
|
+
}, {
|
|
10558
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
|
|
10559
|
+
_: 1
|
|
10560
|
+
})])
|
|
10561
|
+
])]),
|
|
10562
|
+
default: withCtx(() => [createVNode(tool_btn_default, normalizeProps(guardReactiveProps(c.value)), null, 16)]),
|
|
10563
|
+
_: 1
|
|
10564
|
+
}, 16));
|
|
10565
|
+
}
|
|
10566
|
+
}), _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({
|
|
10482
10567
|
__name: "user-feedback",
|
|
10483
10568
|
props: {
|
|
10484
10569
|
loading: { type: Boolean },
|
|
@@ -10496,7 +10581,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10496
10581
|
};
|
|
10497
10582
|
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$13, [
|
|
10498
10583
|
createElementVNode("div", _hoisted_2$10, toDisplayString(n.title), 1),
|
|
10499
|
-
createElementVNode("div", _hoisted_3$
|
|
10584
|
+
createElementVNode("div", _hoisted_3$8, [n.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
|
|
10500
10585
|
key: e,
|
|
10501
10586
|
class: "reason-item ai-skeleton-element"
|
|
10502
10587
|
})), 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(n.reasonList, (e) => (openBlock(), createElementBlock("div", {
|
|
@@ -10537,7 +10622,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10537
10622
|
}, _hoisted_2$9 = {
|
|
10538
10623
|
class: "message-tools",
|
|
10539
10624
|
style: { "margin-right": "8px" }
|
|
10540
|
-
}, _hoisted_3$
|
|
10625
|
+
}, _hoisted_3$7 = {
|
|
10541
10626
|
key: 0,
|
|
10542
10627
|
class: "ai-divider",
|
|
10543
10628
|
style: { "margin-right": "8px" }
|
|
@@ -10576,46 +10661,69 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10576
10661
|
return function(n) {
|
|
10577
10662
|
return e.apply(this, arguments);
|
|
10578
10663
|
};
|
|
10579
|
-
}(), y = ()
|
|
10664
|
+
}(), y = function() {
|
|
10665
|
+
var e = _asyncToGenerator(function* (e) {
|
|
10666
|
+
var n;
|
|
10667
|
+
yield (n = i.onAction) == null ? void 0 : n.call(i, e);
|
|
10668
|
+
});
|
|
10669
|
+
return function(n) {
|
|
10670
|
+
return e.apply(this, arguments);
|
|
10671
|
+
};
|
|
10672
|
+
}(), b = () => {
|
|
10580
10673
|
var e;
|
|
10581
10674
|
(e = d.value) == null || e.forEach((e) => {
|
|
10582
10675
|
var n;
|
|
10583
10676
|
return e == null || (n = e.hide) == null ? void 0 : n.call(e);
|
|
10584
10677
|
});
|
|
10585
|
-
},
|
|
10586
|
-
|
|
10587
|
-
|
|
10678
|
+
}, x = (e) => g.value ? g.value === "like" && e === "like" ? "activeLike" : g.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, S = (e) => {
|
|
10679
|
+
var n, r;
|
|
10680
|
+
let a = x(e);
|
|
10681
|
+
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) || "";
|
|
10682
|
+
}, C = (e, n, r) => {
|
|
10683
|
+
b(), g.value === e.id ? g.value = null : g.value = e.id, o("feedback", e, n, r);
|
|
10684
|
+
}, T = (e) => {
|
|
10588
10685
|
if (i.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
|
|
10589
10686
|
if (g.value && g.value === e) return g.value = null, !1;
|
|
10590
10687
|
};
|
|
10591
10688
|
return onUnmounted(() => {
|
|
10592
|
-
|
|
10689
|
+
b(), m.value = [];
|
|
10593
10690
|
}), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [
|
|
10594
|
-
createElementVNode("div", _hoisted_2$9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.messageTools, (
|
|
10595
|
-
key:
|
|
10691
|
+
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({
|
|
10692
|
+
key: 0,
|
|
10693
|
+
ref_for: !0
|
|
10694
|
+
}, r, {
|
|
10695
|
+
disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
|
|
10696
|
+
"tippy-options": n.tippyOptions,
|
|
10697
|
+
onConfirm: (e) => y(r)
|
|
10698
|
+
}), null, 16, [
|
|
10699
|
+
"disabled",
|
|
10700
|
+
"tippy-options",
|
|
10701
|
+
"onConfirm"
|
|
10702
|
+
])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
|
|
10703
|
+
key: 1,
|
|
10596
10704
|
ref_for: !0
|
|
10597
|
-
},
|
|
10705
|
+
}, r, {
|
|
10598
10706
|
disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
|
|
10599
10707
|
"tippy-options": n.tippyOptions,
|
|
10600
|
-
onClick: (
|
|
10708
|
+
onClick: (e) => v(r)
|
|
10601
10709
|
}), null, 16, [
|
|
10602
10710
|
"disabled",
|
|
10603
10711
|
"tippy-options",
|
|
10604
10712
|
"onClick"
|
|
10605
|
-
]))), 128))]),
|
|
10606
|
-
n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
10713
|
+
]))], 64))), 128))]),
|
|
10714
|
+
n.updateTools.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7)) : createCommentVNode("", !0),
|
|
10607
10715
|
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({
|
|
10608
10716
|
key: 0,
|
|
10609
10717
|
ref_for: !0,
|
|
10610
10718
|
ref_key: "feedbackTippyRef",
|
|
10611
10719
|
ref: d
|
|
10612
|
-
}, { ref_for: !0 }, _.value, { onShow: (e) =>
|
|
10720
|
+
}, { ref_for: !0 }, _.value, { onShow: (e) => T(r.id) }), {
|
|
10613
10721
|
content: withCtx(() => [createVNode(user_feedback_default, {
|
|
10614
10722
|
loading: p.value,
|
|
10615
10723
|
"reason-list": m.value,
|
|
10616
10724
|
title: r.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
|
|
10617
|
-
onCancel:
|
|
10618
|
-
onSubmit: (e, n) =>
|
|
10725
|
+
onCancel: b,
|
|
10726
|
+
onSubmit: (e, n) => C(r, e, n)
|
|
10619
10727
|
}, null, 8, [
|
|
10620
10728
|
"loading",
|
|
10621
10729
|
"reason-list",
|
|
@@ -10623,10 +10731,10 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10623
10731
|
"onSubmit"
|
|
10624
10732
|
])]),
|
|
10625
10733
|
default: withCtx(() => [createVNode(tool_btn_default, mergeProps({ ref_for: !0 }, r, {
|
|
10626
|
-
id:
|
|
10734
|
+
id: x(r.id),
|
|
10627
10735
|
active: g.value === r.id,
|
|
10628
10736
|
disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
|
|
10629
|
-
"tippy-options": n.tippyOptions,
|
|
10737
|
+
"tippy-options": _objectSpread2(_objectSpread2({}, n.tippyOptions), {}, { content: S(r.id) }),
|
|
10630
10738
|
onClick: (e) => v(r)
|
|
10631
10739
|
}), null, 16, [
|
|
10632
10740
|
"id",
|
|
@@ -10636,9 +10744,20 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10636
10744
|
"onClick"
|
|
10637
10745
|
])]),
|
|
10638
10746
|
_: 2
|
|
10639
|
-
}, 1040, ["onShow"])) : (openBlock(), createBlock(
|
|
10747
|
+
}, 1040, ["onShow"])) : r.id === "delete" ? (openBlock(), createBlock(delete_tool_default, mergeProps({
|
|
10640
10748
|
key: 1,
|
|
10641
10749
|
ref_for: !0
|
|
10750
|
+
}, r, {
|
|
10751
|
+
disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
|
|
10752
|
+
"tippy-options": n.tippyOptions,
|
|
10753
|
+
onConfirm: (e) => y(r)
|
|
10754
|
+
}), null, 16, [
|
|
10755
|
+
"disabled",
|
|
10756
|
+
"tippy-options",
|
|
10757
|
+
"onConfirm"
|
|
10758
|
+
])) : (openBlock(), createBlock(tool_btn_default, mergeProps({
|
|
10759
|
+
key: 2,
|
|
10760
|
+
ref_for: !0
|
|
10642
10761
|
}, r, {
|
|
10643
10762
|
disabled: n.messageToolsStatus === unref(MessageToolsStatus).Disabled,
|
|
10644
10763
|
"tippy-options": n.tippyOptions,
|
|
@@ -10653,7 +10772,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10653
10772
|
}), _hoisted_1$11 = { class: "ai-loading-ring" }, _hoisted_2$8 = {
|
|
10654
10773
|
fill: "none",
|
|
10655
10774
|
viewBox: "0 0 26 26"
|
|
10656
|
-
}, _hoisted_3$
|
|
10775
|
+
}, _hoisted_3$6 = ["fill"], _hoisted_4$5 = { class: "ai-loading-star" }, _hoisted_5$4 = {
|
|
10657
10776
|
fill: "none",
|
|
10658
10777
|
viewBox: "0 0 26 26"
|
|
10659
10778
|
}, _hoisted_6 = ["fill"], ai_loading_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AiLoading" }), {}, {
|
|
@@ -10676,7 +10795,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10676
10795
|
}, [createElementVNode("div", _hoisted_1$11, [(openBlock(), createElementBlock("svg", _hoisted_2$8, [createElementVNode("path", {
|
|
10677
10796
|
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",
|
|
10678
10797
|
fill: `url(#${i})`
|
|
10679
|
-
}, null, 8, _hoisted_3$
|
|
10798
|
+
}, null, 8, _hoisted_3$6), createElementVNode("defs", null, [createElementVNode("linearGradient", {
|
|
10680
10799
|
id: i,
|
|
10681
10800
|
gradientUnits: "userSpaceOnUse",
|
|
10682
10801
|
x1: "6.50423",
|
|
@@ -10715,7 +10834,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10715
10834
|
}, null, -1)
|
|
10716
10835
|
])])])]))])], 6));
|
|
10717
10836
|
}
|
|
10718
|
-
})), _hoisted_1$10 = { class: "ai-activity-message" }, _hoisted_2$7 = { class: "ai-activity-message-title-icon" }, _hoisted_3$
|
|
10837
|
+
})), _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 = {
|
|
10719
10838
|
key: 0,
|
|
10720
10839
|
class: "knowledge-rag-content"
|
|
10721
10840
|
}, activity_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10751,12 +10870,12 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10751
10870
|
key: 1,
|
|
10752
10871
|
style: { "font-size": "12px" }
|
|
10753
10872
|
}))]),
|
|
10754
|
-
createElementVNode("span", _hoisted_3$
|
|
10873
|
+
createElementVNode("span", _hoisted_3$5, toDisplayString(i.value), 1),
|
|
10755
10874
|
createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
|
|
10756
10875
|
]), 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]])]);
|
|
10757
10876
|
};
|
|
10758
10877
|
}
|
|
10759
|
-
}), _hoisted_1$9 = { class: "toolcall-desc" }, _hoisted_2$6 = { class: "desc-title" }, _hoisted_3$
|
|
10878
|
+
}), _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({
|
|
10760
10879
|
__name: "desc-panel",
|
|
10761
10880
|
props: {
|
|
10762
10881
|
desc: {},
|
|
@@ -10770,7 +10889,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10770
10889
|
return r.desc;
|
|
10771
10890
|
}
|
|
10772
10891
|
});
|
|
10773
|
-
return (r, a) => (openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", _hoisted_2$6, toDisplayString(n.title), 1), createElementVNode("div", _hoisted_3$
|
|
10892
|
+
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", {
|
|
10774
10893
|
key: n,
|
|
10775
10894
|
class: "desc-panel-item"
|
|
10776
10895
|
}, [createElementVNode("span", _hoisted_4$3, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$2, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
|
|
@@ -10798,7 +10917,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10798
10917
|
title: unref(t)("返回内容")
|
|
10799
10918
|
}, null, 8, ["desc", "title"])]));
|
|
10800
10919
|
}
|
|
10801
|
-
}), _hoisted_1$7 = { class: "ai-toolcall-render" }, _hoisted_2$5 = { class: "toolcall-header-title" }, _hoisted_3$
|
|
10920
|
+
}), _hoisted_1$7 = { class: "ai-toolcall-render" }, _hoisted_2$5 = { class: "toolcall-header-title" }, _hoisted_3$3 = { class: "toolcall-status-title" }, _hoisted_4$2 = {
|
|
10802
10921
|
key: 1,
|
|
10803
10922
|
class: "toolcall-duration"
|
|
10804
10923
|
}, _hoisted_5$1 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10839,7 +10958,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10839
10958
|
text: i.value,
|
|
10840
10959
|
appendTo: "parent"
|
|
10841
10960
|
}]]),
|
|
10842
|
-
createElementVNode("span", _hoisted_3$
|
|
10961
|
+
createElementVNode("span", _hoisted_3$3, [
|
|
10843
10962
|
e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming ? (openBlock(), createBlock(unref(Loading), {
|
|
10844
10963
|
key: 0,
|
|
10845
10964
|
mode: "spin",
|
|
@@ -10913,12 +11032,12 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10913
11032
|
})(/* @__PURE__ */ defineComponent({
|
|
10914
11033
|
__name: "loading-message",
|
|
10915
11034
|
setup(e) {
|
|
10916
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(ai_loading_default, { size: 18 }),
|
|
11035
|
+
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)]));
|
|
10917
11036
|
}
|
|
10918
|
-
}), [["__scopeId", "data-v-
|
|
11037
|
+
}), [["__scopeId", "data-v-e4b604cd"]]), _hoisted_1$3 = { class: "ai-reasoning-message" }, _hoisted_2$3 = {
|
|
10919
11038
|
key: 0,
|
|
10920
11039
|
class: "ai-reasoning-message-title-icon"
|
|
10921
|
-
}, _hoisted_3$
|
|
11040
|
+
}, _hoisted_3$2 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$1 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
|
|
10922
11041
|
__name: "reasoning-message",
|
|
10923
11042
|
props: /* @__PURE__ */ mergeModels({
|
|
10924
11043
|
duration: {},
|
|
@@ -10963,7 +11082,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10963
11082
|
onClick: a[0] || (a[0] = (e) => i.value = !i.value)
|
|
10964
11083
|
}, [
|
|
10965
11084
|
n.status === unref(MessageStatus).Pending || n.status === unref(MessageStatus).Streaming ? (openBlock(), createElementBlock("span", _hoisted_2$3, [createVNode(ai_loading_default)])) : createCommentVNode("", !0),
|
|
10966
|
-
createElementVNode("span", _hoisted_3$
|
|
11085
|
+
createElementVNode("span", _hoisted_3$2, toDisplayString(d.value), 1),
|
|
10967
11086
|
createElementVNode("span", { class: normalizeClass(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": i.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
|
|
10968
11087
|
], 2), withDirectives(createElementVNode("div", _hoisted_4$1, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
10969
11088
|
key: 0,
|
|
@@ -10977,14 +11096,14 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10977
11096
|
}), _hoisted_1$2 = { class: "ai-key-value-content" }, _hoisted_2$2 = {
|
|
10978
11097
|
key: 0,
|
|
10979
11098
|
class: "ai-key-value-title"
|
|
10980
|
-
}, _hoisted_3$
|
|
11099
|
+
}, _hoisted_3$1 = { class: "ai-key-value-content" }, _hoisted_4 = { class: "item-key" }, _hoisted_5 = { class: "item-value" }, key_value_content_default = /* @__PURE__ */ defineComponent({
|
|
10981
11100
|
__name: "key-value-content",
|
|
10982
11101
|
props: {
|
|
10983
11102
|
content: {},
|
|
10984
11103
|
title: {}
|
|
10985
11104
|
},
|
|
10986
11105
|
setup(n) {
|
|
10987
|
-
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$
|
|
11106
|
+
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", {
|
|
10988
11107
|
key: e.key,
|
|
10989
11108
|
class: "key-value-item"
|
|
10990
11109
|
}, [
|
|
@@ -10996,7 +11115,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
10996
11115
|
}), _hoisted_1$1 = { class: "ai-user-message" }, _hoisted_2$1 = {
|
|
10997
11116
|
key: 1,
|
|
10998
11117
|
class: "ai-user-message-content"
|
|
10999
|
-
}, _hoisted_3
|
|
11118
|
+
}, _hoisted_3 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
|
|
11000
11119
|
__name: "user-message",
|
|
11001
11120
|
props: {
|
|
11002
11121
|
content: {},
|
|
@@ -11116,7 +11235,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11116
11235
|
"default-upload-files": y.value,
|
|
11117
11236
|
"on-send-message": D
|
|
11118
11237
|
}, {
|
|
11119
|
-
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_3
|
|
11238
|
+
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(Button), {
|
|
11120
11239
|
size: "small",
|
|
11121
11240
|
onClick: C
|
|
11122
11241
|
}, {
|
|
@@ -11195,7 +11314,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11195
11314
|
});
|
|
11196
11315
|
return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
|
|
11197
11316
|
}
|
|
11198
|
-
}), _hoisted_1 = ["onMouseenter", "onMouseleave"], _hoisted_2 = { class: "
|
|
11317
|
+
}), _hoisted_1 = ["onMouseenter", "onMouseleave"], _hoisted_2 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
|
|
11199
11318
|
__name: "message-container",
|
|
11200
11319
|
props: /* @__PURE__ */ mergeModels({
|
|
11201
11320
|
enableSelection: {
|
|
@@ -11217,7 +11336,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11217
11336
|
}),
|
|
11218
11337
|
emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
|
|
11219
11338
|
setup(n) {
|
|
11220
|
-
let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), {
|
|
11339
|
+
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();
|
|
11221
11340
|
watchEffect(() => {
|
|
11222
11341
|
var e;
|
|
11223
11342
|
let n = [], i = [];
|
|
@@ -11278,15 +11397,15 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11278
11397
|
immediate: !0,
|
|
11279
11398
|
flush: "post"
|
|
11280
11399
|
});
|
|
11281
|
-
let
|
|
11400
|
+
let _ = function() {
|
|
11282
11401
|
var e = _asyncToGenerator(function* (e, n) {
|
|
11283
11402
|
var i;
|
|
11284
|
-
return e.id === "copy" && (console.log("messages", n),
|
|
11403
|
+
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);
|
|
11285
11404
|
});
|
|
11286
11405
|
return function(n, r) {
|
|
11287
11406
|
return e.apply(this, arguments);
|
|
11288
11407
|
};
|
|
11289
|
-
}(),
|
|
11408
|
+
}(), v = function() {
|
|
11290
11409
|
var e = _asyncToGenerator(function* (e, n) {
|
|
11291
11410
|
var i;
|
|
11292
11411
|
(i = r.onUserAction) == null || i.call(r, e, n);
|
|
@@ -11294,11 +11413,11 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11294
11413
|
return function(n, r) {
|
|
11295
11414
|
return e.apply(this, arguments);
|
|
11296
11415
|
};
|
|
11297
|
-
}(),
|
|
11416
|
+
}(), y = (e) => {
|
|
11298
11417
|
e.isHover = !0;
|
|
11299
|
-
},
|
|
11418
|
+
}, b = (e) => {
|
|
11300
11419
|
e.isHover = !1;
|
|
11301
|
-
},
|
|
11420
|
+
}, x = (e, n) => {
|
|
11302
11421
|
var r, a;
|
|
11303
11422
|
let o = e.type === MessageRole.User;
|
|
11304
11423
|
(r = d.value) == null || r.forEach((r, i) => {
|
|
@@ -11308,7 +11427,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11308
11427
|
e && (e.checked = n);
|
|
11309
11428
|
}
|
|
11310
11429
|
}), i.value = (a = d.value) == null ? void 0 : a.filter((e) => e.checked).map((e) => e.messages).flat();
|
|
11311
|
-
},
|
|
11430
|
+
}, S = function() {
|
|
11312
11431
|
var e = _asyncToGenerator(function* (e, n, i) {
|
|
11313
11432
|
var a;
|
|
11314
11433
|
(a = r.onUserInputConfirm) == null || a.call(r, e, n, i);
|
|
@@ -11316,7 +11435,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11316
11435
|
return function(n, r, i) {
|
|
11317
11436
|
return e.apply(this, arguments);
|
|
11318
11437
|
};
|
|
11319
|
-
}(),
|
|
11438
|
+
}(), C = function() {
|
|
11320
11439
|
var e = _asyncToGenerator(function* (e, n) {
|
|
11321
11440
|
var i;
|
|
11322
11441
|
(i = r.onUserShortcutConfirm) == null || i.call(r, e, n);
|
|
@@ -11325,7 +11444,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11325
11444
|
return e.apply(this, arguments);
|
|
11326
11445
|
};
|
|
11327
11446
|
}();
|
|
11328
|
-
return (i,
|
|
11447
|
+
return (i, g) => (openBlock(), createElementBlock("div", {
|
|
11329
11448
|
ref_key: "messageContainerRef",
|
|
11330
11449
|
ref: a,
|
|
11331
11450
|
class: "ai-message-container"
|
|
@@ -11334,14 +11453,17 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11334
11453
|
key: o,
|
|
11335
11454
|
class: "message-group",
|
|
11336
11455
|
style: normalizeStyle({ backgroundColor: a.checked ? "#f5f7fa" : "transparent" }),
|
|
11337
|
-
onMouseenter: (e) =>
|
|
11338
|
-
onMouseleave: (e) =>
|
|
11456
|
+
onMouseenter: (e) => y(a),
|
|
11457
|
+
onMouseleave: (e) => b(a)
|
|
11339
11458
|
}, [n.enableSelection && a.type !== unref(MessageRole).Loading ? (openBlock(), createBlock(unref(Checkbox), {
|
|
11340
|
-
key:
|
|
11459
|
+
key: 0,
|
|
11341
11460
|
class: "message-group-checkbox",
|
|
11342
11461
|
"model-value": a.checked,
|
|
11343
|
-
"onUpdate:modelValue": (e) =>
|
|
11344
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div",
|
|
11462
|
+
"onUpdate:modelValue": (e) => x(a, e)
|
|
11463
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", {
|
|
11464
|
+
class: "message-group-messages",
|
|
11465
|
+
style: normalizeStyle({ width: n.enableSelection && a.type !== unref(MessageRole).Loading ? "calc(100% - 16px)" : "100%" })
|
|
11466
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.messages, (e, r) => renderSlot(i.$slots, "default", mergeProps({
|
|
11345
11467
|
key: r,
|
|
11346
11468
|
ref_for: !0
|
|
11347
11469
|
}, {
|
|
@@ -11351,9 +11473,9 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11351
11473
|
key: r,
|
|
11352
11474
|
message: e,
|
|
11353
11475
|
"message-tools-status": n.messageToolsStatus,
|
|
11354
|
-
"on-action": (n) =>
|
|
11355
|
-
"on-input-confirm": (n, r) =>
|
|
11356
|
-
"on-shortcut-confirm": (n) =>
|
|
11476
|
+
"on-action": (n) => v(n, e),
|
|
11477
|
+
"on-input-confirm": (n, r) => S(e, n, r),
|
|
11478
|
+
"on-shortcut-confirm": (n) => C(e, n)
|
|
11357
11479
|
}, null, 8, [
|
|
11358
11480
|
"message",
|
|
11359
11481
|
"message-tools-status",
|
|
@@ -11363,7 +11485,7 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11363
11485
|
]))])), 128)), a.type === unref(MessageRole).Assistant && n.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
|
|
11364
11486
|
key: 0,
|
|
11365
11487
|
"message-tools-status": n.messageToolsStatus,
|
|
11366
|
-
"on-action": (e) =>
|
|
11488
|
+
"on-action": (e) => _(e, a.messages),
|
|
11367
11489
|
"tippy-options": r.messageToolsTippyOptions,
|
|
11368
11490
|
onFeedback: (e, n, i) => {
|
|
11369
11491
|
var o;
|
|
@@ -11374,27 +11496,27 @@ var _hoisted_1$17 = { class: "ai-slash-input-wrapper" }, _hoisted_2$12 = ["aria-
|
|
|
11374
11496
|
"on-action",
|
|
11375
11497
|
"tippy-options",
|
|
11376
11498
|
"onFeedback"
|
|
11377
|
-
])) : createCommentVNode("", !0)])], 44, _hoisted_1))), 128)),
|
|
11499
|
+
])) : createCommentVNode("", !0)], 4)], 44, _hoisted_1))), 128)),
|
|
11378
11500
|
createElementVNode("div", {
|
|
11379
11501
|
ref_key: "messageContainerBottomRef",
|
|
11380
11502
|
ref: o,
|
|
11381
11503
|
class: "message-container-bottom",
|
|
11382
11504
|
tabindex: "0"
|
|
11383
11505
|
}, null, 512),
|
|
11384
|
-
createElementVNode("div",
|
|
11506
|
+
createElementVNode("div", _hoisted_2, [withDirectives(createVNode(scroll_btn_default, {
|
|
11385
11507
|
title: unref(t)("停止生成"),
|
|
11386
|
-
onClick:
|
|
11508
|
+
onClick: g[0] || (g[0] = (e) => i.$emit("stopStreaming"))
|
|
11387
11509
|
}, {
|
|
11388
11510
|
icon: withCtx(() => [createVNode(unref(CloseCircleIcon))]),
|
|
11389
11511
|
_: 1
|
|
11390
11512
|
}, 8, ["title"]), [[vShow, n.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
|
|
11391
11513
|
title: unref(t)("返回底部"),
|
|
11392
|
-
onClick: unref(
|
|
11514
|
+
onClick: unref(p)
|
|
11393
11515
|
}, {
|
|
11394
11516
|
icon: withCtx(() => [createVNode(unref(ArrowDownIcon))]),
|
|
11395
11517
|
_: 1
|
|
11396
|
-
}, 8, ["title", "onClick"]), [[vShow,
|
|
11518
|
+
}, 8, ["title", "onClick"]), [[vShow, unref(m)]])])
|
|
11397
11519
|
], 512));
|
|
11398
11520
|
}
|
|
11399
11521
|
});
|
|
11400
|
-
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 };
|
|
11522
|
+
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 };
|