@blueking/chat-x 0.0.51-beta.5 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +823 -820
- package/dist/index.js.map +1 -1
- package/dist/mcp/generated/docs/ai-selection.md +1 -1
- package/dist/mcp/generated/index.json +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, Transition as r, cloneVNode as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, customRef as p, defineComponent as m, guardReactiveProps as h, h as g, inject as _, isRef as v, mergeModels as y, mergeProps as b, nextTick as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as T, onMounted as E, onScopeDispose as D, onUnmounted as O, openBlock as k, provide as A, reactive as ee, readonly as j, ref as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, cloneVNode as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, customRef as p, defineComponent as m, guardReactiveProps as h, h as g, inject as _, isRef as v, mergeModels as y, mergeProps as b, nextTick as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as T, onMounted as E, onScopeDispose as D, onUnmounted as O, openBlock as k, provide as A, reactive as ee, readonly as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, shallowReactive as te, shallowRef as I, toDisplayString as L, toRef as ne, toValue as R, unref as z, useAttrs as re, useModel as ie, useSlots as ae, useTemplateRef as B, vShow as V, watch as H, watchEffect as oe, watchPostEffect as se, withCtx as U, withDirectives as W, withKeys as ce, withModifiers as le } from "vue";
|
|
2
|
+
import { Button as ue, Checkbox as de, Exception as fe, Form as pe, Input as me, Loading as he, Message as ge, Radio as _e, ResizeLayout as ve, Select as ye, Switcher as be, Tab as xe } from "bkui-vue";
|
|
3
3
|
import { Tippy as Se, directive as Ce } from "vue-tippy";
|
|
4
4
|
import "tippy.js/dist/tippy.css";
|
|
5
5
|
import we from "tippy.js";
|
|
@@ -1773,12 +1773,12 @@ var pn = m({
|
|
|
1773
1773
|
"is-disabled": e.disabled
|
|
1774
1774
|
}]),
|
|
1775
1775
|
onClick: i
|
|
1776
|
-
}, [e.loading ? (k(), o(
|
|
1776
|
+
}, [e.loading ? (k(), o(z(he), {
|
|
1777
1777
|
key: 0,
|
|
1778
1778
|
mode: "spin",
|
|
1779
1779
|
size: "mini",
|
|
1780
1780
|
theme: "primary"
|
|
1781
|
-
})) :
|
|
1781
|
+
})) : P(t.$slots, "icon", { key: 1 }), P(t.$slots, "title", {}, () => [d(L(e.title), 1)])], 2));
|
|
1782
1782
|
}
|
|
1783
1783
|
}), Si = { class: "ai-loading-ring" }, Ci = {
|
|
1784
1784
|
fill: "none",
|
|
@@ -1882,8 +1882,8 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1882
1882
|
},
|
|
1883
1883
|
emits: ["click"],
|
|
1884
1884
|
setup(t, { expose: n, emit: r }) {
|
|
1885
|
-
let i = t, a =
|
|
1886
|
-
|
|
1885
|
+
let i = t, a = I(!1), l = r;
|
|
1886
|
+
H(() => {
|
|
1887
1887
|
var e;
|
|
1888
1888
|
return (e = i.shortcut) == null ? void 0 : e.icon;
|
|
1889
1889
|
}, () => {
|
|
@@ -1891,7 +1891,7 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1891
1891
|
}, { immediate: !0 });
|
|
1892
1892
|
let u = (e) => {
|
|
1893
1893
|
l("click", e);
|
|
1894
|
-
}, f =
|
|
1894
|
+
}, f = B("el");
|
|
1895
1895
|
return n({ get $el() {
|
|
1896
1896
|
return f.value;
|
|
1897
1897
|
} }), (n, r) => (k(), c("button", {
|
|
@@ -1899,9 +1899,9 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1899
1899
|
ref: f,
|
|
1900
1900
|
class: S(["ai-shortcut-btn", { "is-menu-mode": t.mode === "menu" }]),
|
|
1901
1901
|
onClick: r[1] || (r[1] = (e) => u(t.shortcut))
|
|
1902
|
-
}, [
|
|
1902
|
+
}, [P(n.$slots, "default", {}, () => {
|
|
1903
1903
|
var n, i, l, u, f, p, m;
|
|
1904
|
-
return [(n = t.shortcut) != null && n.icon ? (k(), c(e, { key: 0 }, [typeof t.shortcut.icon == "string" ? (k(), c(e, { key: 0 }, [t.shortcut.icon.startsWith("http") ? (k(), c(e, { key: 0 }, [a.value ? (k(), o(
|
|
1904
|
+
return [(n = t.shortcut) != null && n.icon ? (k(), c(e, { key: 0 }, [typeof t.shortcut.icon == "string" ? (k(), c(e, { key: 0 }, [t.shortcut.icon.startsWith("http") ? (k(), c(e, { key: 0 }, [a.value ? (k(), o(z(oi), {
|
|
1905
1905
|
key: 1,
|
|
1906
1906
|
class: "ai-shortcut-btn-icon"
|
|
1907
1907
|
})) : (k(), c("img", {
|
|
@@ -1912,14 +1912,14 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1912
1912
|
}, null, 40, Ai))], 64)) : (k(), c("span", {
|
|
1913
1913
|
key: 1,
|
|
1914
1914
|
class: S(t.shortcut.icon)
|
|
1915
|
-
}, null, 2))], 64)) : (k(), o(
|
|
1915
|
+
}, null, 2))], 64)) : (k(), o(F(typeof ((i = t.shortcut) == null ? void 0 : i.icon) == "function" ? (l = (u = t.shortcut).icon) == null ? void 0 : l.call(u, g) : t.shortcut.icon), {
|
|
1916
1916
|
key: 1,
|
|
1917
1917
|
class: "ai-shortcut-btn-icon"
|
|
1918
|
-
}))], 64)) : t.shortcut && !((f = t.shortcut.components) != null && f.length) ? (k(), o(
|
|
1918
|
+
}))], 64)) : t.shortcut && !((f = t.shortcut.components) != null && f.length) ? (k(), o(z(oi), {
|
|
1919
1919
|
key: 1,
|
|
1920
1920
|
class: "ai-shortcut-btn-icon"
|
|
1921
|
-
})) : s("", !0), d(" " +
|
|
1922
|
-
}),
|
|
1921
|
+
})) : s("", !0), d(" " + L(((p = t.shortcut) == null ? void 0 : p.alias) || ((m = t.shortcut) == null ? void 0 : m.name)), 1)];
|
|
1922
|
+
}), P(n.$slots, "append")], 2));
|
|
1923
1923
|
}
|
|
1924
1924
|
}), Mi = { class: "ai-selection-popover-content" }, Ni = {
|
|
1925
1925
|
key: 0,
|
|
@@ -1937,10 +1937,13 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1937
1937
|
}),
|
|
1938
1938
|
emits: /* @__PURE__ */ y(["selectShortcut", "selectionChange"], ["update:visible"]),
|
|
1939
1939
|
setup(n, { emit: i }) {
|
|
1940
|
-
let
|
|
1940
|
+
let u = n, d = ie(n, "visible"), p = a(() => {
|
|
1941
|
+
var e;
|
|
1942
|
+
return (e = u.shortcuts) != null && e.length ? u.shortcuts : bi;
|
|
1943
|
+
}), m = i, h = B("popoverRef"), g = B("moreMenuRef"), _ = I({
|
|
1941
1944
|
x: 0,
|
|
1942
1945
|
y: 0
|
|
1943
|
-
}),
|
|
1946
|
+
}), v = I(""), y = I(null), b = I(!1), S = (e) => {
|
|
1944
1947
|
if ((e == null ? void 0 : e.shadowRoot) instanceof ShadowRoot) {
|
|
1945
1948
|
try {
|
|
1946
1949
|
let t = e.shadowRoot;
|
|
@@ -1949,153 +1952,153 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
1949
1952
|
if (e && !e.isCollapsed && e.toString().trim()) return e;
|
|
1950
1953
|
}
|
|
1951
1954
|
} catch (e) {
|
|
1952
|
-
|
|
1955
|
+
T();
|
|
1953
1956
|
return;
|
|
1954
1957
|
}
|
|
1955
1958
|
try {
|
|
1956
1959
|
let t = document.createTreeWalker(e.shadowRoot, NodeFilter.SHOW_ELEMENT, null), n = t.nextNode();
|
|
1957
1960
|
for (; n;) {
|
|
1958
1961
|
if (n instanceof Element) {
|
|
1959
|
-
let e =
|
|
1962
|
+
let e = S(n);
|
|
1960
1963
|
if (e) return e;
|
|
1961
1964
|
}
|
|
1962
1965
|
n = t.nextNode();
|
|
1963
1966
|
}
|
|
1964
1967
|
} catch (e) {
|
|
1965
|
-
|
|
1968
|
+
T();
|
|
1966
1969
|
}
|
|
1967
1970
|
}
|
|
1968
|
-
},
|
|
1971
|
+
}, C = function() {
|
|
1969
1972
|
var e = Z(function* () {
|
|
1970
1973
|
var e, t;
|
|
1971
|
-
if (
|
|
1974
|
+
if (y.value = window.getSelection(), !y.value) {
|
|
1972
1975
|
let e = document.activeElement;
|
|
1973
1976
|
if (e) {
|
|
1974
|
-
let t =
|
|
1975
|
-
t && (
|
|
1977
|
+
let t = S(e);
|
|
1978
|
+
t && (y.value = t);
|
|
1976
1979
|
}
|
|
1977
1980
|
}
|
|
1978
|
-
let n = (e =
|
|
1981
|
+
let n = (e = y.value) == null || (e = e.toString()) == null ? void 0 : e.trim();
|
|
1979
1982
|
if (!n) {
|
|
1980
|
-
|
|
1983
|
+
T();
|
|
1981
1984
|
return;
|
|
1982
1985
|
}
|
|
1983
|
-
if (
|
|
1984
|
-
let e =
|
|
1986
|
+
if (u.excludeSelectors.length > 0 && (t = y.value) != null && t.rangeCount) try {
|
|
1987
|
+
let e = y.value.getRangeAt(0).commonAncestorContainer, t = e.nodeType === Node.TEXT_NODE ? e.parentNode : e;
|
|
1985
1988
|
for (; t && t !== document.body;) {
|
|
1986
1989
|
if (t instanceof Element) {
|
|
1987
|
-
for (let e of
|
|
1988
|
-
|
|
1990
|
+
for (let e of u.excludeSelectors) if (t.closest(e)) {
|
|
1991
|
+
T();
|
|
1989
1992
|
return;
|
|
1990
1993
|
}
|
|
1991
1994
|
}
|
|
1992
1995
|
t = t.parentNode;
|
|
1993
1996
|
}
|
|
1994
1997
|
} catch (e) {}
|
|
1995
|
-
n !==
|
|
1998
|
+
n !== v.value && m("selectionChange", n), v.value = n;
|
|
1996
1999
|
let r = null;
|
|
1997
2000
|
try {
|
|
1998
2001
|
var i;
|
|
1999
|
-
if ((i =
|
|
2000
|
-
var
|
|
2001
|
-
let e = (
|
|
2002
|
+
if ((i = y.value) != null && i.rangeCount) {
|
|
2003
|
+
var a;
|
|
2004
|
+
let e = (a = y.value) == null ? void 0 : a.getRangeAt(0);
|
|
2002
2005
|
(e == null ? void 0 : e.getClientRects()).length > 0 && (r = e.getBoundingClientRect());
|
|
2003
2006
|
}
|
|
2004
2007
|
} catch (e) {
|
|
2005
|
-
|
|
2008
|
+
T();
|
|
2006
2009
|
return;
|
|
2007
2010
|
}
|
|
2008
|
-
let
|
|
2009
|
-
if (!r || r.width === 0 && r.height === 0) if (
|
|
2011
|
+
let o = document.activeElement;
|
|
2012
|
+
if (!r || r.width === 0 && r.height === 0) if (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement) r = o.getBoundingClientRect();
|
|
2010
2013
|
else {
|
|
2011
|
-
|
|
2014
|
+
T();
|
|
2012
2015
|
return;
|
|
2013
2016
|
}
|
|
2014
|
-
|
|
2015
|
-
let
|
|
2016
|
-
|
|
2017
|
-
let
|
|
2018
|
-
|
|
2019
|
-
x:
|
|
2020
|
-
y:
|
|
2017
|
+
d.value = !0, yield x();
|
|
2018
|
+
let s = h.value.getBoundingClientRect(), c = window.innerWidth, l = window.innerHeight, f = r.left + r.width / 2 - s.width / 2;
|
|
2019
|
+
f < 8 ? f = 8 : f + s.width > c - 8 && (f = c - s.width - 8);
|
|
2020
|
+
let p, g = r.top, b = l - r.bottom, C = s.height + u.offset;
|
|
2021
|
+
p = g >= C ? r.top - s.height - u.offset : b >= C ? r.bottom + u.offset : g >= b ? Math.max(8, r.top - s.height - u.offset) : Math.min(l - s.height - 8, r.bottom + u.offset), _.value = {
|
|
2022
|
+
x: f,
|
|
2023
|
+
y: p
|
|
2021
2024
|
};
|
|
2022
2025
|
});
|
|
2023
2026
|
return function() {
|
|
2024
2027
|
return e.apply(this, arguments);
|
|
2025
2028
|
};
|
|
2026
|
-
}(),
|
|
2029
|
+
}(), T = () => {
|
|
2027
2030
|
var e;
|
|
2028
|
-
|
|
2029
|
-
},
|
|
2030
|
-
|
|
2031
|
-
},
|
|
2032
|
-
|
|
2033
|
-
|
|
2031
|
+
d.value && ((e = y.value) == null || e.removeAllRanges(), d.value = !1);
|
|
2032
|
+
}, D = (e) => {
|
|
2033
|
+
T(), m("selectShortcut", e, v.value);
|
|
2034
|
+
}, A = null, ee = (e) => {
|
|
2035
|
+
A && clearTimeout(A), A = window.setTimeout(() => {
|
|
2036
|
+
C();
|
|
2034
2037
|
}, e);
|
|
2035
|
-
},
|
|
2036
|
-
|
|
2037
|
-
},
|
|
2038
|
-
|
|
2039
|
-
},
|
|
2038
|
+
}, j = () => {
|
|
2039
|
+
ee(200);
|
|
2040
|
+
}, M = () => {
|
|
2041
|
+
ee(300);
|
|
2042
|
+
}, F = (e) => {
|
|
2040
2043
|
var t;
|
|
2041
|
-
|
|
2044
|
+
d.value && (t = h.value) != null && t.contains(e.target) || T();
|
|
2042
2045
|
}, te = (e) => {
|
|
2043
2046
|
var t;
|
|
2044
|
-
!
|
|
2045
|
-
},
|
|
2047
|
+
!y.value || !d.value || e.target instanceof HTMLElement && e.target.contains((t = y.value) == null ? void 0 : t.anchorNode) && T();
|
|
2048
|
+
}, L = () => {
|
|
2046
2049
|
var e;
|
|
2047
|
-
(e =
|
|
2050
|
+
(e = g.value) == null || e.show();
|
|
2048
2051
|
};
|
|
2049
2052
|
return E(() => {
|
|
2050
|
-
document.addEventListener("selectionchange",
|
|
2053
|
+
document.addEventListener("selectionchange", M), document.addEventListener("mouseup", j), document.addEventListener("mousedown", F), document.addEventListener("scroll", te, !0), window.addEventListener("resize", T), window.addEventListener("blur", T);
|
|
2051
2054
|
}), O(() => {
|
|
2052
|
-
document.removeEventListener("selectionchange",
|
|
2055
|
+
document.removeEventListener("selectionchange", M), document.removeEventListener("mouseup", j), document.removeEventListener("mousedown", F), document.removeEventListener("scroll", te, !0), window.removeEventListener("resize", T), window.removeEventListener("blur", T);
|
|
2053
2056
|
}), (i, a) => (k(), o(t, { to: "body" }, [f(r, { name: "ai-fade" }, {
|
|
2054
|
-
default:
|
|
2057
|
+
default: U(() => [d.value ? (k(), c("div", {
|
|
2055
2058
|
key: 0,
|
|
2056
2059
|
ref_key: "popoverRef",
|
|
2057
|
-
ref:
|
|
2060
|
+
ref: h,
|
|
2058
2061
|
class: "ai-selection-popover",
|
|
2059
2062
|
style: w({
|
|
2060
|
-
left: `${
|
|
2061
|
-
top: `${
|
|
2062
|
-
zIndex:
|
|
2063
|
-
"--selection-z-index":
|
|
2063
|
+
left: `${_.value.x}px`,
|
|
2064
|
+
top: `${_.value.y}px`,
|
|
2065
|
+
zIndex: z(en),
|
|
2066
|
+
"--selection-z-index": z(en)
|
|
2064
2067
|
}),
|
|
2065
|
-
onMousedown: a[2] || (a[2] =
|
|
2066
|
-
}, [l("div", Mi, [
|
|
2068
|
+
onMousedown: a[2] || (a[2] = le(() => {}, ["stop"]))
|
|
2069
|
+
}, [l("div", Mi, [P(i.$slots, "default", { shortcuts: p.value }, () => [(k(!0), c(e, null, N(p.value.slice(0, n.maxShortcutCount), (t, r) => (k(), c(e, { key: t.id }, [r < n.maxShortcutCount ? (k(), o(ji, {
|
|
2067
2070
|
key: 0,
|
|
2068
2071
|
shortcut: t,
|
|
2069
|
-
onClick: (e) =>
|
|
2070
|
-
}, null, 8, ["shortcut", "onClick"])) : s("", !0)], 64))), 128)),
|
|
2072
|
+
onClick: (e) => D(t)
|
|
2073
|
+
}, null, 8, ["shortcut", "onClick"])) : s("", !0)], 64))), 128)), p.value.length > n.maxShortcutCount ? (k(), c(e, { key: 0 }, [a[3] || (a[3] = l("div", {
|
|
2071
2074
|
class: "ai-divider",
|
|
2072
2075
|
style: { margin: "0 4px" }
|
|
2073
|
-
}, null, -1)), f(
|
|
2076
|
+
}, null, -1)), f(z(Se), {
|
|
2074
2077
|
ref_key: "moreMenuRef",
|
|
2075
|
-
ref:
|
|
2078
|
+
ref: g,
|
|
2076
2079
|
arrow: !1,
|
|
2077
2080
|
interactive: "",
|
|
2078
2081
|
offset: [0, 6],
|
|
2079
2082
|
theme: "ai-chat-box-light light",
|
|
2080
2083
|
trigger: "manual",
|
|
2081
2084
|
onHidden: a[0] || (a[0] = () => {
|
|
2082
|
-
|
|
2085
|
+
b.value = !1;
|
|
2083
2086
|
}),
|
|
2084
2087
|
onShow: a[1] || (a[1] = () => {
|
|
2085
|
-
|
|
2088
|
+
b.value = !0;
|
|
2086
2089
|
})
|
|
2087
2090
|
}, {
|
|
2088
|
-
content:
|
|
2091
|
+
content: U(() => [b.value ? (k(), c("div", Ni, [(k(!0), c(e, null, N(p.value.slice(n.maxShortcutCount), (e) => (k(), o(ji, {
|
|
2089
2092
|
key: e.id,
|
|
2090
2093
|
mode: "menu",
|
|
2091
2094
|
shortcut: e,
|
|
2092
|
-
onClick: (t) =>
|
|
2095
|
+
onClick: (t) => D(e)
|
|
2093
2096
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : s("", !0)]),
|
|
2094
|
-
default:
|
|
2097
|
+
default: U(() => [f(ji, {
|
|
2095
2098
|
style: { width: "28px" },
|
|
2096
|
-
onClick:
|
|
2099
|
+
onClick: L
|
|
2097
2100
|
}, {
|
|
2098
|
-
default:
|
|
2101
|
+
default: U(() => [f(z(Qr), { class: "shortcut-btn-more-icon" })]),
|
|
2099
2102
|
_: 1
|
|
2100
2103
|
})]),
|
|
2101
2104
|
_: 1
|
|
@@ -2104,7 +2107,7 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2104
2107
|
})]));
|
|
2105
2108
|
}
|
|
2106
2109
|
}), Fi = (e, t, n) => {
|
|
2107
|
-
let r =
|
|
2110
|
+
let r = I([]), i = function() {
|
|
2108
2111
|
var i = Z(function* () {
|
|
2109
2112
|
if (!e.value || t.value.length === 0) return;
|
|
2110
2113
|
yield x();
|
|
@@ -2123,7 +2126,7 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2123
2126
|
return i.apply(this, arguments);
|
|
2124
2127
|
};
|
|
2125
2128
|
}(), a = null;
|
|
2126
|
-
return
|
|
2129
|
+
return H([t, n.moreItemRef], () => {
|
|
2127
2130
|
x(() => {
|
|
2128
2131
|
i();
|
|
2129
2132
|
});
|
|
@@ -2144,14 +2147,14 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2144
2147
|
props: { shortcuts: {} },
|
|
2145
2148
|
emits: ["selectShortcut"],
|
|
2146
2149
|
setup(t, { emit: n }) {
|
|
2147
|
-
let r = () => document.body, i = t, u = n, d =
|
|
2150
|
+
let r = () => document.body, i = t, u = n, d = B("containerRef"), p = I([]), m = B("moreMenuRef"), h = B("moreBtnRef"), { visibleItems: g } = Fi(d, p, {
|
|
2148
2151
|
items: a(() => i.shortcuts),
|
|
2149
2152
|
gap: Li,
|
|
2150
2153
|
moreItemRef: h
|
|
2151
|
-
}), _ = a(() => i.shortcuts.filter((e) => !g.value.includes(e))), v =
|
|
2154
|
+
}), _ = a(() => i.shortcuts.filter((e) => !g.value.includes(e))), v = I(!1), y = (e, t) => {
|
|
2152
2155
|
e && "$el" in e ? p.value[t] = e.$el : e && e instanceof HTMLElement && (p.value[t] = e);
|
|
2153
2156
|
};
|
|
2154
|
-
|
|
2157
|
+
H(() => i.shortcuts, () => {
|
|
2155
2158
|
p.value = Array(i.shortcuts.length).fill(null);
|
|
2156
2159
|
}, { deep: !0 });
|
|
2157
2160
|
let b = () => {
|
|
@@ -2159,7 +2162,7 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2159
2162
|
}, x = (e) => {
|
|
2160
2163
|
v.value = !1, u("selectShortcut", e);
|
|
2161
2164
|
};
|
|
2162
|
-
return
|
|
2165
|
+
return H(v, (e) => {
|
|
2163
2166
|
if (e) {
|
|
2164
2167
|
var t;
|
|
2165
2168
|
(t = m.value) == null || t.show();
|
|
@@ -2171,18 +2174,18 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2171
2174
|
ref_key: "containerRef",
|
|
2172
2175
|
ref: d,
|
|
2173
2176
|
class: "ai-shortcut-btns"
|
|
2174
|
-
}, [(k(!0), c(e, null,
|
|
2177
|
+
}, [(k(!0), c(e, null, N(t.shortcuts, (e, t) => (k(), o(ji, {
|
|
2175
2178
|
key: e.key || e.id,
|
|
2176
2179
|
ref_for: !0,
|
|
2177
2180
|
ref: (e) => y(e, t),
|
|
2178
|
-
class: S(["ai-shortcut-btns-item", { "ai-shortcut-btns-item-hidden": !
|
|
2181
|
+
class: S(["ai-shortcut-btns-item", { "ai-shortcut-btns-item-hidden": !z(g).includes(e) }]),
|
|
2179
2182
|
shortcut: e,
|
|
2180
2183
|
onClick: (t) => x(e)
|
|
2181
2184
|
}, null, 8, [
|
|
2182
2185
|
"class",
|
|
2183
2186
|
"shortcut",
|
|
2184
2187
|
"onClick"
|
|
2185
|
-
]))), 128)), _.value.length > 0 ? (k(), o(
|
|
2188
|
+
]))), 128)), _.value.length > 0 ? (k(), o(z(Se), {
|
|
2186
2189
|
key: 0,
|
|
2187
2190
|
ref_key: "moreMenuRef",
|
|
2188
2191
|
ref: m,
|
|
@@ -2192,24 +2195,24 @@ var Ai = ["src"], ji = /* @__PURE__ */ m({
|
|
|
2192
2195
|
offset: [0, 6],
|
|
2193
2196
|
theme: "ai-chat-box-light light",
|
|
2194
2197
|
trigger: "manual",
|
|
2195
|
-
"z-index":
|
|
2198
|
+
"z-index": z($t),
|
|
2196
2199
|
onHidden: i[0] || (i[0] = () => {
|
|
2197
2200
|
v.value = !1;
|
|
2198
2201
|
})
|
|
2199
2202
|
}, {
|
|
2200
|
-
content:
|
|
2203
|
+
content: U(() => [l("div", Ii, [(k(!0), c(e, null, N(_.value, (e) => (k(), o(ji, {
|
|
2201
2204
|
key: e.id,
|
|
2202
2205
|
mode: "menu",
|
|
2203
2206
|
shortcut: e,
|
|
2204
2207
|
onClick: (t) => x(e)
|
|
2205
2208
|
}, null, 8, ["shortcut", "onClick"]))), 128))])]),
|
|
2206
|
-
default:
|
|
2209
|
+
default: U(() => [f(ji, {
|
|
2207
2210
|
ref_key: "moreBtnRef",
|
|
2208
2211
|
ref: h,
|
|
2209
2212
|
class: "ai-shortcut-btns-item ai-shortcut-btns-more",
|
|
2210
2213
|
onClick: b
|
|
2211
2214
|
}, {
|
|
2212
|
-
default:
|
|
2215
|
+
default: U(() => [f(z(si), { class: "ai-shortcut-btns-more-icon" }), l("span", null, L(z(K)("更多")), 1)]),
|
|
2213
2216
|
_: 1
|
|
2214
2217
|
}, 512)]),
|
|
2215
2218
|
_: 1
|
|
@@ -2258,8 +2261,8 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2258
2261
|
},
|
|
2259
2262
|
emits: ["close", "submit"],
|
|
2260
2263
|
setup(t, { emit: n }) {
|
|
2261
|
-
let r = t, i = n, a =
|
|
2262
|
-
|
|
2264
|
+
let r = t, i = n, a = B("formRef"), s = ee({}), u = I({});
|
|
2265
|
+
oe(() => {
|
|
2263
2266
|
var e;
|
|
2264
2267
|
if (r.formModel) for (let e in r.formModel) s[e] = r.formModel[e];
|
|
2265
2268
|
for (let o of (e = r == null ? void 0 : r.components) == null ? [] : e) if (o.key) {
|
|
@@ -2319,13 +2322,13 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2319
2322
|
i("close");
|
|
2320
2323
|
};
|
|
2321
2324
|
return (n, r) => (k(), c("div", Ui, [l("div", Wi, [
|
|
2322
|
-
f(
|
|
2323
|
-
l("span", Gi,
|
|
2324
|
-
f(
|
|
2325
|
+
f(z(Zr), { class: "header-icon" }),
|
|
2326
|
+
l("span", Gi, L(t.alias || t.name), 1),
|
|
2327
|
+
f(z(ii), {
|
|
2325
2328
|
class: "header-close",
|
|
2326
2329
|
onClick: y
|
|
2327
2330
|
})
|
|
2328
|
-
]), l("div", Ki, [f(
|
|
2331
|
+
]), l("div", Ki, [f(z(pe), {
|
|
2329
2332
|
ref_key: "formRef",
|
|
2330
2333
|
ref: a,
|
|
2331
2334
|
class: "shortcut-render-form",
|
|
@@ -2333,28 +2336,28 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2333
2336
|
model: s,
|
|
2334
2337
|
rules: u.value
|
|
2335
2338
|
}, {
|
|
2336
|
-
default:
|
|
2339
|
+
default: U(() => [(k(!0), c(e, null, N(t.components, (e, t) => (k(), o(z(pe).FormItem, b({
|
|
2337
2340
|
key: e.id,
|
|
2338
2341
|
ref_for: !0
|
|
2339
2342
|
}, m(e), {
|
|
2340
2343
|
class: "shortcut-render-form-item",
|
|
2341
2344
|
style: { gridColumn: p(e, t) }
|
|
2342
2345
|
}), {
|
|
2343
|
-
label:
|
|
2346
|
+
label: U(() => {
|
|
2344
2347
|
var t, n;
|
|
2345
|
-
return [l("span", qi,
|
|
2348
|
+
return [l("span", qi, L((t = e.name) == null ? (n = e.formItemProps) == null ? void 0 : n.label : t), 1)];
|
|
2346
2349
|
}),
|
|
2347
|
-
default:
|
|
2350
|
+
default: U(() => [(k(), o(F(h(e))))]),
|
|
2348
2351
|
_: 2
|
|
2349
|
-
}, 1040, ["style"]))), 128)), f(
|
|
2350
|
-
default:
|
|
2352
|
+
}, 1040, ["style"]))), 128)), f(z(pe).FormItem, { class: "shortcut-footer-item" }, {
|
|
2353
|
+
default: U(() => [l("div", Ji, [f(z(ue), {
|
|
2351
2354
|
theme: "primary",
|
|
2352
2355
|
onClick: _
|
|
2353
2356
|
}, {
|
|
2354
|
-
default:
|
|
2357
|
+
default: U(() => [d(L(z(K)("提交")), 1)]),
|
|
2355
2358
|
_: 1
|
|
2356
|
-
}), f(
|
|
2357
|
-
default:
|
|
2359
|
+
}), f(z(ue), { onClick: v }, {
|
|
2360
|
+
default: U(() => [d(L(z(K)("取消")), 1)]),
|
|
2358
2361
|
_: 1
|
|
2359
2362
|
})])]),
|
|
2360
2363
|
_: 1
|
|
@@ -2363,9 +2366,9 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2363
2366
|
}, 8, ["model", "rules"])])]));
|
|
2364
2367
|
}
|
|
2365
2368
|
}), Xi = (e, t) => {
|
|
2366
|
-
let { easing: n = "ease-in-out", fadeDuration: r = 200 } = t || {}, i =
|
|
2367
|
-
return
|
|
2368
|
-
let t =
|
|
2369
|
+
let { easing: n = "ease-in-out", fadeDuration: r = 200 } = t || {}, i = M([]), o = M("");
|
|
2370
|
+
return H(() => e, (e) => {
|
|
2371
|
+
let t = R(e);
|
|
2369
2372
|
if (t === o.value) return;
|
|
2370
2373
|
if (!(o.value && t.indexOf(o.value) === 0)) {
|
|
2371
2374
|
i.value = [t], o.value = t;
|
|
@@ -2384,7 +2387,7 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2384
2387
|
let n = document.createElement("a");
|
|
2385
2388
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
2386
2389
|
}, ea = (e) => {
|
|
2387
|
-
let t =
|
|
2390
|
+
let t = I(""), n = /* @__PURE__ */ new Map(), r = a(() => {
|
|
2388
2391
|
var t;
|
|
2389
2392
|
return !!((t = e.getOnArtifactClick) != null && t.call(e));
|
|
2390
2393
|
}), i = (e) => {
|
|
@@ -2449,10 +2452,10 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2449
2452
|
return e.apply(this, arguments);
|
|
2450
2453
|
};
|
|
2451
2454
|
}() }), aa = () => {
|
|
2452
|
-
let e =
|
|
2455
|
+
let e = I({
|
|
2453
2456
|
column: 0,
|
|
2454
2457
|
line: 0
|
|
2455
|
-
}), t =
|
|
2458
|
+
}), t = I([]);
|
|
2456
2459
|
return {
|
|
2457
2460
|
commandSelection: e,
|
|
2458
2461
|
docSnapshot: t,
|
|
@@ -2468,7 +2471,7 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2468
2471
|
}
|
|
2469
2472
|
};
|
|
2470
2473
|
}, oa = Symbol("CONTAINER_SCROLL_TOKEN"), sa = 100, ca = 600, la = (e, t) => {
|
|
2471
|
-
let n =
|
|
2474
|
+
let n = I(!1), r = null, i = I(0), o = I(!0), s = p((e, t) => {
|
|
2472
2475
|
let n, r = !1;
|
|
2473
2476
|
return {
|
|
2474
2477
|
get() {
|
|
@@ -2495,10 +2498,10 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2495
2498
|
toScrollTop: d
|
|
2496
2499
|
})));
|
|
2497
2500
|
let c = () => {
|
|
2498
|
-
let t =
|
|
2501
|
+
let t = R(e);
|
|
2499
2502
|
return t ? Math.max(0, t.scrollHeight - t.scrollTop - t.clientHeight) : 0;
|
|
2500
2503
|
}, l = () => {
|
|
2501
|
-
let t =
|
|
2504
|
+
let t = R(e);
|
|
2502
2505
|
t && (o.value = !0, t.scrollTop = t.scrollHeight);
|
|
2503
2506
|
}, u = (e) => {
|
|
2504
2507
|
var n;
|
|
@@ -2508,18 +2511,18 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2508
2511
|
l();
|
|
2509
2512
|
return;
|
|
2510
2513
|
}
|
|
2511
|
-
(n =
|
|
2514
|
+
(n = R(t)) == null || n.scrollIntoView({
|
|
2512
2515
|
behavior: r,
|
|
2513
2516
|
block: "end"
|
|
2514
2517
|
});
|
|
2515
2518
|
}, d = () => {
|
|
2516
2519
|
var t;
|
|
2517
|
-
(t =
|
|
2520
|
+
(t = R(e)) == null || t.scrollTo({
|
|
2518
2521
|
top: 0,
|
|
2519
2522
|
behavior: "smooth"
|
|
2520
2523
|
});
|
|
2521
2524
|
}, f = () => {
|
|
2522
|
-
let t =
|
|
2525
|
+
let t = R(e);
|
|
2523
2526
|
if (!t) return;
|
|
2524
2527
|
let { scrollHeight: r, scrollTop: a, clientHeight: o } = t, c = r - a - o;
|
|
2525
2528
|
i.value = Math.max(0, c), s.value = !n.value && i.value > 100;
|
|
@@ -2527,8 +2530,8 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2527
2530
|
e.deltaY < 0 && (o.value = !1);
|
|
2528
2531
|
};
|
|
2529
2532
|
return E(() => {
|
|
2530
|
-
|
|
2531
|
-
let a =
|
|
2533
|
+
oe(() => {
|
|
2534
|
+
let a = R(e), c = R(t);
|
|
2532
2535
|
!a || !c || (r == null || r.disconnect(), a.removeEventListener("scroll", f), a.removeEventListener("wheel", m), f(), r = new IntersectionObserver((e) => {
|
|
2533
2536
|
e.forEach((e) => {
|
|
2534
2537
|
e.isIntersecting ? (n.value = !0, i.value = 0, o.value = !0, s.value = !1) : (n.value = !1, f());
|
|
@@ -2537,7 +2540,7 @@ var Vi = ["options"], Hi = ["options"], Ui = { class: "ai-shortcut-render" }, Wi
|
|
|
2537
2540
|
});
|
|
2538
2541
|
}), D(() => {
|
|
2539
2542
|
r == null || r.disconnect();
|
|
2540
|
-
let t =
|
|
2543
|
+
let t = R(e);
|
|
2541
2544
|
t && (t.removeEventListener("scroll", f), t.removeEventListener("wheel", m));
|
|
2542
2545
|
}), {
|
|
2543
2546
|
autoScrollEnabled: o,
|
|
@@ -2556,7 +2559,7 @@ function ma(e) {
|
|
|
2556
2559
|
label: K("执行情况"),
|
|
2557
2560
|
name: fa,
|
|
2558
2561
|
order: 0
|
|
2559
|
-
}, r =
|
|
2562
|
+
}, r = I([n]), i = M(n), o = (t = e.collapsed) == null ? I(!0) : t, s = I(!1), c = a(() => {
|
|
2560
2563
|
var t, n;
|
|
2561
2564
|
return (t = (n = e.executionTabVisible) == null ? void 0 : n.call(e)) == null ? !0 : t;
|
|
2562
2565
|
}), l = (e) => e.name === "execution" ? c.value : e.visible !== !1, u = a(() => r.value.filter(l).slice().sort((e, t) => {
|
|
@@ -2586,7 +2589,7 @@ function ma(e) {
|
|
|
2586
2589
|
}, _ = () => {
|
|
2587
2590
|
r.value = [n], i.value = n, s.value = !1, o.value = !0;
|
|
2588
2591
|
};
|
|
2589
|
-
return
|
|
2592
|
+
return H(u, (e) => {
|
|
2590
2593
|
if (e.length) {
|
|
2591
2594
|
if (!s.value) {
|
|
2592
2595
|
i.value.name !== e[0].name && h(e[0]);
|
|
@@ -2630,14 +2633,14 @@ var ha = () => _(da), ga = (() => {
|
|
|
2630
2633
|
change: "webkitfullscreenchange"
|
|
2631
2634
|
} : null;
|
|
2632
2635
|
})(), _a = (e) => {
|
|
2633
|
-
let t = !!ga, n =
|
|
2636
|
+
let t = !!ga, n = I(!1), r = () => {
|
|
2634
2637
|
var t;
|
|
2635
|
-
return (t =
|
|
2638
|
+
return (t = z(e)) == null ? typeof document > "u" ? null : document.documentElement : t;
|
|
2636
2639
|
}, i = () => {
|
|
2637
2640
|
var e;
|
|
2638
2641
|
return ga ? (e = document[ga.element]) == null ? null : e : null;
|
|
2639
2642
|
}, a = () => {
|
|
2640
|
-
let t = i(), r =
|
|
2643
|
+
let t = i(), r = z(e);
|
|
2641
2644
|
n.value = r ? t === r : !!t;
|
|
2642
2645
|
}, o = function() {
|
|
2643
2646
|
var e = Z(function* () {
|
|
@@ -2676,7 +2679,7 @@ var ha = () => _(da), ga = (() => {
|
|
|
2676
2679
|
supportUpload: e.supportUpload,
|
|
2677
2680
|
timezone: e.timezone
|
|
2678
2681
|
}), ba = () => _(va, void 0), xa = (e) => {
|
|
2679
|
-
let t =
|
|
2682
|
+
let t = I(0);
|
|
2680
2683
|
E(() => {
|
|
2681
2684
|
window.addEventListener("keydown", i, !0);
|
|
2682
2685
|
}), D(() => {
|
|
@@ -2758,8 +2761,8 @@ var ha = () => _(da), ga = (() => {
|
|
|
2758
2761
|
return e.reason === Ut.AIDevToolApproval && Ea.has((t = e.metadata) == null || (t = t.ticket) == null ? void 0 : t.status);
|
|
2759
2762
|
}).length : e;
|
|
2760
2763
|
}, 0), ka = (e) => {
|
|
2761
|
-
let t =
|
|
2762
|
-
|
|
2764
|
+
let t = M([]), n = I(!1);
|
|
2765
|
+
oe(() => {
|
|
2763
2766
|
var n;
|
|
2764
2767
|
let r = [], i = [];
|
|
2765
2768
|
for (let t of e.messages.value) {
|
|
@@ -2815,7 +2818,7 @@ var ha = () => _(da), ga = (() => {
|
|
|
2815
2818
|
})) == null ? !1 : s
|
|
2816
2819
|
});
|
|
2817
2820
|
}
|
|
2818
|
-
((n = e.messages.value.at(-1)) == null ? void 0 : n.role) === J.User &&
|
|
2821
|
+
((n = e.messages.value.at(-1)) == null ? void 0 : n.role) === J.User && R(e.renderMode) !== cn.Share && i.push({
|
|
2819
2822
|
messages: [{
|
|
2820
2823
|
role: J.Loading,
|
|
2821
2824
|
content: "",
|
|
@@ -2870,7 +2873,7 @@ var ha = () => _(da), ga = (() => {
|
|
|
2870
2873
|
var e;
|
|
2871
2874
|
return (e = t.value) == null ? void 0 : e.filter((e) => e.type === J.User).every((e) => e.checked);
|
|
2872
2875
|
});
|
|
2873
|
-
return
|
|
2876
|
+
return H(e.selectedUserMessages, (e) => {
|
|
2874
2877
|
if (t.value.length) for (let [r, i] of t.value.entries()) {
|
|
2875
2878
|
var n;
|
|
2876
2879
|
if (i.type === J.Assistant) continue;
|
|
@@ -2917,7 +2920,7 @@ var ha = () => _(da), ga = (() => {
|
|
|
2917
2920
|
let t = e.parentElement;
|
|
2918
2921
|
return t ? Aa(t) : document.body;
|
|
2919
2922
|
}, ja = (e) => {
|
|
2920
|
-
let t =
|
|
2923
|
+
let t = I(!1), n = null, r = I(null), i = () => {
|
|
2921
2924
|
t.value = !0, n && clearTimeout(n), n = setTimeout(() => {
|
|
2922
2925
|
t.value = !1;
|
|
2923
2926
|
}, 300);
|
|
@@ -2926,7 +2929,7 @@ var ha = () => _(da), ga = (() => {
|
|
|
2926
2929
|
};
|
|
2927
2930
|
return E(() => {
|
|
2928
2931
|
var t, n, o, s;
|
|
2929
|
-
r.value = Aa(
|
|
2932
|
+
r.value = Aa(R(e)), (t = r.value) == null || t.removeEventListener("scroll", i), (n = r.value) == null || n.removeEventListener("scrollend", a), (o = r.value) == null || o.addEventListener("scroll", i), (s = r.value) == null || s.addEventListener("scrollend", a);
|
|
2930
2933
|
}), D(() => {
|
|
2931
2934
|
var e, t;
|
|
2932
2935
|
(e = r.value) == null || e.removeEventListener("scroll", i), (t = r.value) == null || t.removeEventListener("scrollend", a);
|
|
@@ -2935,9 +2938,9 @@ var ha = () => _(da), ga = (() => {
|
|
|
2935
2938
|
scrollParent: r
|
|
2936
2939
|
};
|
|
2937
2940
|
}, Ma = Symbol("KEYWORD_TOKEN"), Na = Symbol("RENDER_MODE_TOKEN"), Pa = Symbol("COMMON_TIPPY_OPTIONS_TOKEN"), Fa = Symbol("EXECUTION_PANEL_TOKEN"), Ia = () => {
|
|
2938
|
-
let e =
|
|
2941
|
+
let e = I("");
|
|
2939
2942
|
return A(Ma, a(() => e.value)), { keyword: e };
|
|
2940
|
-
}, La = ({ renderMode: e }) => (A(Na, a(() =>
|
|
2943
|
+
}, La = ({ renderMode: e }) => (A(Na, a(() => R(e))), { renderMode: e }), Ra = () => _(Na, a(() => cn.Chat)), za = (e) => {
|
|
2941
2944
|
A(Pa, e.tippyOptions);
|
|
2942
2945
|
}, Ba = () => _(Ma, void 0), Va = () => _(Pa, void 0), Ha = () => {
|
|
2943
2946
|
A(Fa, !0);
|
|
@@ -3016,14 +3019,14 @@ var ha = () => _(da), ga = (() => {
|
|
|
3016
3019
|
} })), s = (e) => {
|
|
3017
3020
|
n.disabled || r("click", n, e);
|
|
3018
3021
|
};
|
|
3019
|
-
return (t, n) =>
|
|
3022
|
+
return (t, n) => W((k(), c("div", {
|
|
3020
3023
|
class: S(["ai-tool-btn", {
|
|
3021
3024
|
"is-active": e.active,
|
|
3022
3025
|
"is-disabled": e.disabled
|
|
3023
3026
|
}]),
|
|
3024
3027
|
style: w({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
|
|
3025
3028
|
onClick: s
|
|
3026
|
-
}, [
|
|
3029
|
+
}, [P(t.$slots, "default", {}, () => [e.icon ? (k(), o(F(e.icon), { key: 0 })) : e.id && e.id in z(yi) ? (k(), o(F(z(yi)[e.id]), { key: 1 })) : (k(), c("div", qa, L(e.name), 1))])], 6)), [[z(Ce), i.value]]);
|
|
3027
3030
|
}
|
|
3028
3031
|
}), Ya = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Xa = /[\0-\x1F\x7F-\x9F]/, Za = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, Qa = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, $a = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, eo = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, to = /* @__PURE__ */ Le({
|
|
3029
3032
|
Any: () => Ya,
|
|
@@ -5847,7 +5850,7 @@ var ru = (e) => {
|
|
|
5847
5850
|
props: { token: {} },
|
|
5848
5851
|
emits: ["mounted"],
|
|
5849
5852
|
setup(t, { emit: n }) {
|
|
5850
|
-
let r = t, i = n, o =
|
|
5853
|
+
let r = t, i = n, o = B("codeRef"), u = I(""), { copy: p } = ia(), m = I([]), g = I(""), _ = I(""), v = /* @__PURE__ */ new Map(), y = (e) => {
|
|
5851
5854
|
for (let n of e) if (n.type === "fence" || n.type === "code_block") {
|
|
5852
5855
|
var t;
|
|
5853
5856
|
return {
|
|
@@ -5908,7 +5911,7 @@ var ru = (e) => {
|
|
|
5908
5911
|
let { language: e } = y(r.token), t = ["hljs"];
|
|
5909
5912
|
return e && t.push(`language-${e}`), t.join(" ");
|
|
5910
5913
|
});
|
|
5911
|
-
|
|
5914
|
+
H(() => r.token, (e) => {
|
|
5912
5915
|
let { content: t, language: n } = y(e);
|
|
5913
5916
|
u.value = n, E(t, n), x(() => {
|
|
5914
5917
|
i("mounted", { get el() {
|
|
@@ -5925,8 +5928,8 @@ var ru = (e) => {
|
|
|
5925
5928
|
t && p(t);
|
|
5926
5929
|
};
|
|
5927
5930
|
return (n, r) => (k(), c("div", bu, [l("div", xu, [
|
|
5928
|
-
l("span", Su,
|
|
5929
|
-
|
|
5931
|
+
l("span", Su, L(u.value), 1),
|
|
5932
|
+
P(n.$slots, "header", C(h({
|
|
5930
5933
|
language: u.value,
|
|
5931
5934
|
token: t.token
|
|
5932
5935
|
}))),
|
|
@@ -5940,10 +5943,10 @@ var ru = (e) => {
|
|
|
5940
5943
|
ref_key: "codeRef",
|
|
5941
5944
|
ref: o,
|
|
5942
5945
|
class: S(D.value)
|
|
5943
|
-
}, [(k(!0), c(e, null,
|
|
5946
|
+
}, [(k(!0), c(e, null, N(m.value, (t, n) => (k(), c(e, { key: `completed-${n}` }, [l("span", {
|
|
5944
5947
|
class: "code-line",
|
|
5945
5948
|
innerHTML: t.html
|
|
5946
|
-
}, null, 8, wu), r[0] || (r[0] = d(
|
|
5949
|
+
}, null, 8, wu), r[0] || (r[0] = d(L("\n"), -1))], 64))), 128)), g.value ? (k(), c("span", {
|
|
5947
5950
|
key: 0,
|
|
5948
5951
|
class: "code-line current-line",
|
|
5949
5952
|
innerHTML: _.value
|
|
@@ -5962,7 +5965,7 @@ var ru = (e) => {
|
|
|
5962
5965
|
src: {}
|
|
5963
5966
|
},
|
|
5964
5967
|
setup(e) {
|
|
5965
|
-
let t = /* @__PURE__ */ new Set(), n = e, r = a(() => t.has(n.src)), i =
|
|
5968
|
+
let t = /* @__PURE__ */ new Set(), n = e, r = a(() => t.has(n.src)), i = I(!r.value), o = I(!1), s = I(r.value), u = r.value ? n.src : "", d = a(() => r.value ? !1 : !!(!h.value || i.value || !s.value && o.value)), p = a(() => s.value && o.value && !i.value), m = Pe(() => {
|
|
5966
5969
|
s.value = !0;
|
|
5967
5970
|
}, 500), h = a(() => {
|
|
5968
5971
|
var e;
|
|
@@ -5996,19 +5999,19 @@ var ru = (e) => {
|
|
|
5996
5999
|
leading: !0,
|
|
5997
6000
|
trailing: !0
|
|
5998
6001
|
});
|
|
5999
|
-
return
|
|
6002
|
+
return H(() => n.src, (e) => {
|
|
6000
6003
|
if (t.has(e)) {
|
|
6001
6004
|
u = e, i.value = !1, o.value = !1, s.value = !0;
|
|
6002
6005
|
return;
|
|
6003
6006
|
}
|
|
6004
6007
|
s.value = !1, m(), h.value ? g(e) : (i.value = !0, o.value = !1);
|
|
6005
|
-
}, { immediate: !0 }),
|
|
6008
|
+
}, { immediate: !0 }), H(h, (e) => {
|
|
6006
6009
|
e && n.src && g(n.src);
|
|
6007
|
-
}), (t, n) => (k(), c("span", Ou, [d.value ? (k(), c("span", ku, [f(
|
|
6010
|
+
}), (t, n) => (k(), c("span", Ou, [d.value ? (k(), c("span", ku, [f(z(he), {
|
|
6008
6011
|
mode: "spin",
|
|
6009
6012
|
size: "mini",
|
|
6010
6013
|
theme: "primary"
|
|
6011
|
-
}), l("span", Au,
|
|
6014
|
+
}), l("span", Au, L(z(K)("图片加载中...")), 1)])) : p.value ? (k(), c("span", ju, [n[0] || (n[0] = l("span", { class: "md-image-error-icon" }, "⚠️", -1)), l("span", Mu, L(e.alt || z(K)("图片加载失败")), 1)])) : (k(), c("img", {
|
|
6012
6015
|
key: 2,
|
|
6013
6016
|
alt: e.alt,
|
|
6014
6017
|
class: "md-image",
|
|
@@ -6020,7 +6023,7 @@ var ru = (e) => {
|
|
|
6020
6023
|
__name: "latex-content",
|
|
6021
6024
|
props: { token: {} },
|
|
6022
6025
|
setup(e) {
|
|
6023
|
-
let t = e, n =
|
|
6026
|
+
let t = e, n = I(""), r = [
|
|
6024
6027
|
"frac",
|
|
6025
6028
|
"dfrac",
|
|
6026
6029
|
"tfrac",
|
|
@@ -6226,7 +6229,7 @@ var ru = (e) => {
|
|
|
6226
6229
|
}
|
|
6227
6230
|
return t;
|
|
6228
6231
|
}, g = a(() => t.token.filter((e) => e.type === "math_block").length === 1 && t.token.length <= 1), _ = a(() => g.value ? "div" : "span"), v = a(() => g.value ? "ai-block-latex-content" : "ai-inline-latex-content");
|
|
6229
|
-
return
|
|
6232
|
+
return H(() => t.token, Ee(() => {
|
|
6230
6233
|
let e = h(t.token);
|
|
6231
6234
|
e && n.value !== e && (n.value = e);
|
|
6232
6235
|
}, 100, {
|
|
@@ -6235,7 +6238,7 @@ var ru = (e) => {
|
|
|
6235
6238
|
}), {
|
|
6236
6239
|
deep: !0,
|
|
6237
6240
|
immediate: !0
|
|
6238
|
-
}), (e, t) => (k(), o(
|
|
6241
|
+
}), (e, t) => (k(), o(F(_.value), {
|
|
6239
6242
|
class: S(v.value),
|
|
6240
6243
|
innerHTML: n.value
|
|
6241
6244
|
}, null, 8, ["class", "innerHTML"]));
|
|
@@ -6245,7 +6248,7 @@ var ru = (e) => {
|
|
|
6245
6248
|
props: { token: {} },
|
|
6246
6249
|
emits: ["mounted"],
|
|
6247
6250
|
setup(e, { emit: t }) {
|
|
6248
|
-
let n =
|
|
6251
|
+
let n = I(""), r = B("mermaidContentRef"), i = e, a = t, o = null, s = "", l = function() {
|
|
6249
6252
|
var e = Z(function* () {
|
|
6250
6253
|
if (o) return o;
|
|
6251
6254
|
if (!o) try {
|
|
@@ -6265,7 +6268,7 @@ var ru = (e) => {
|
|
|
6265
6268
|
}
|
|
6266
6269
|
return "";
|
|
6267
6270
|
};
|
|
6268
|
-
return
|
|
6271
|
+
return H(() => i.token, Ee(function() {
|
|
6269
6272
|
var e = Z(function* (e) {
|
|
6270
6273
|
let t = u(e);
|
|
6271
6274
|
if (t === s) return;
|
|
@@ -6305,7 +6308,7 @@ var ru = (e) => {
|
|
|
6305
6308
|
__name: "common-error-content",
|
|
6306
6309
|
props: { content: {} },
|
|
6307
6310
|
setup(e) {
|
|
6308
|
-
return (t, n) => (k(), c("div", zu, [f(
|
|
6311
|
+
return (t, n) => (k(), c("div", zu, [f(z($r)), l("div", Bu, L(e.content), 1)]));
|
|
6309
6312
|
}
|
|
6310
6313
|
}), Hu = /* @__PURE__ */ new Map(), Uu = () => {
|
|
6311
6314
|
Hu = /* @__PURE__ */ new Map();
|
|
@@ -6499,7 +6502,7 @@ var ru = (e) => {
|
|
|
6499
6502
|
"encoding",
|
|
6500
6503
|
"style"
|
|
6501
6504
|
]
|
|
6502
|
-
}, r = t, i = ua(), a =
|
|
6505
|
+
}, r = t, i = ua(), a = I([]), s = new eu().use(uu).use(De).use(Oe).use(ke).use(Ae).use(je).use(Me).use(_u).use(hu, { katexOptions: { strict: !1 } }).use(yu, /^hljs-(left|center|right)$/), l = {
|
|
6503
6506
|
html: !0,
|
|
6504
6507
|
mditOptions: s.options,
|
|
6505
6508
|
renderer: s.renderer,
|
|
@@ -6541,7 +6544,7 @@ var ru = (e) => {
|
|
|
6541
6544
|
}
|
|
6542
6545
|
return t;
|
|
6543
6546
|
};
|
|
6544
|
-
|
|
6547
|
+
H(() => r.content, Ee((e) => {
|
|
6545
6548
|
if (!e) {
|
|
6546
6549
|
a.value = [];
|
|
6547
6550
|
return;
|
|
@@ -6568,32 +6571,32 @@ var ru = (e) => {
|
|
|
6568
6571
|
leading: !0,
|
|
6569
6572
|
trailing: !0
|
|
6570
6573
|
});
|
|
6571
|
-
return (n, r) => (k(), c("div", id, [t.status ===
|
|
6574
|
+
return (n, r) => (k(), c("div", id, [t.status === z(Y).Error ? (k(), o(Vu, {
|
|
6572
6575
|
key: 0,
|
|
6573
6576
|
content: t.content
|
|
6574
|
-
}, null, 8, ["content"])) : (k(), c("div", ad, [(k(!0), c(e, null,
|
|
6577
|
+
}, null, 8, ["content"])) : (k(), c("div", ad, [(k(!0), c(e, null, N(a.value, (t, r) => (k(), c(e, { key: r }, [u(t) ? (k(), o(z(Ru), {
|
|
6575
6578
|
key: r,
|
|
6576
6579
|
token: t,
|
|
6577
|
-
onMounted:
|
|
6580
|
+
onMounted: z(m)
|
|
6578
6581
|
}, null, 8, ["token", "onMounted"])) : f(t) ? (k(), o(Iu, {
|
|
6579
6582
|
key: r,
|
|
6580
6583
|
token: t,
|
|
6581
|
-
onMounted:
|
|
6582
|
-
}, null, 8, ["token", "onMounted"])) : d(t) ? (k(), o(
|
|
6584
|
+
onMounted: z(m)
|
|
6585
|
+
}, null, 8, ["token", "onMounted"])) : d(t) ? (k(), o(z(Du), {
|
|
6583
6586
|
key: r,
|
|
6584
6587
|
token: t,
|
|
6585
|
-
onMounted:
|
|
6588
|
+
onMounted: z(m)
|
|
6586
6589
|
}, {
|
|
6587
|
-
header:
|
|
6590
|
+
header: U(({ language: e, token: t }) => [P(n.$slots, "codeHeader", b({ ref_for: !0 }, {
|
|
6588
6591
|
language: e,
|
|
6589
6592
|
token: t
|
|
6590
6593
|
}))]),
|
|
6591
6594
|
_: 3
|
|
6592
|
-
}, 8, ["token", "onMounted"])) : (k(), o(
|
|
6595
|
+
}, 8, ["token", "onMounted"])) : (k(), o(z(rd), {
|
|
6593
6596
|
key: r,
|
|
6594
6597
|
options: l,
|
|
6595
6598
|
tokens: t,
|
|
6596
|
-
onVnodeMounted:
|
|
6599
|
+
onVnodeMounted: z(m)
|
|
6597
6600
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
6598
6601
|
}
|
|
6599
6602
|
}), sd = ["onClick"], cd = /* @__PURE__ */ m({
|
|
@@ -6607,27 +6610,27 @@ var ru = (e) => {
|
|
|
6607
6610
|
url: e.url,
|
|
6608
6611
|
originFileUrl: e.originFile
|
|
6609
6612
|
})));
|
|
6610
|
-
return (t, n) => (k(!0), c(e, null,
|
|
6613
|
+
return (t, n) => (k(!0), c(e, null, N(i.value, (e) => (k(), c("div", {
|
|
6611
6614
|
key: e.title,
|
|
6612
6615
|
class: "ai-reference-item"
|
|
6613
6616
|
}, [
|
|
6614
|
-
f(
|
|
6617
|
+
f(z(Lr), { color: "#D66F6B" }),
|
|
6615
6618
|
l("span", {
|
|
6616
6619
|
class: "ai-reference-item-title",
|
|
6617
6620
|
onClick: (t) => e.url && r(e.url, t)
|
|
6618
|
-
},
|
|
6619
|
-
e.url && e.originFileUrl ?
|
|
6621
|
+
}, L(e.title), 9, sd),
|
|
6622
|
+
e.url && e.originFileUrl ? W((k(), o(z(gn), {
|
|
6620
6623
|
key: 0,
|
|
6621
6624
|
onClick: (t) => e.url && r(e.url, t)
|
|
6622
|
-
}, null, 8, ["onClick"])), [[
|
|
6623
|
-
content:
|
|
6625
|
+
}, null, 8, ["onClick"])), [[z(Ce), {
|
|
6626
|
+
content: z(K)("预览内容"),
|
|
6624
6627
|
theme: "ai-chat-box"
|
|
6625
6628
|
}]]) : s("", !0),
|
|
6626
|
-
e.url && e.originFileUrl ?
|
|
6629
|
+
e.url && e.originFileUrl ? W((k(), o(z(_n), {
|
|
6627
6630
|
key: 1,
|
|
6628
6631
|
onClick: (t) => e.originFileUrl && r(e.originFileUrl, t)
|
|
6629
|
-
}, null, 8, ["onClick"])), [[
|
|
6630
|
-
content:
|
|
6632
|
+
}, null, 8, ["onClick"])), [[z(Ce), {
|
|
6633
|
+
content: z(K)("跳转详情"),
|
|
6631
6634
|
theme: "ai-chat-box"
|
|
6632
6635
|
}]]) : s("", !0)
|
|
6633
6636
|
]))), 128));
|
|
@@ -6640,7 +6643,7 @@ var ru = (e) => {
|
|
|
6640
6643
|
type: {}
|
|
6641
6644
|
},
|
|
6642
6645
|
setup(e) {
|
|
6643
|
-
let t =
|
|
6646
|
+
let t = ae(), n = e, r = a(() => {
|
|
6644
6647
|
if (typeof n.content == "string" || n.type === Wt.Text) return g(od, {
|
|
6645
6648
|
content: n.content,
|
|
6646
6649
|
status: n.status
|
|
@@ -6650,7 +6653,7 @@ var ru = (e) => {
|
|
|
6650
6653
|
} });
|
|
6651
6654
|
if (typeof n.content == "object" && Array.isArray(n.content)) return g(cd, { content: n.content });
|
|
6652
6655
|
});
|
|
6653
|
-
return (e, t) =>
|
|
6656
|
+
return (e, t) => P(e.$slots, "default", C(h({ content: n.content })), () => [(k(), o(F(r.value)))]);
|
|
6654
6657
|
}
|
|
6655
6658
|
}), ud = ([e], [t]) => e === t ? 0 : e < t ? 1 : -1, dd = (e, t) => {
|
|
6656
6659
|
let n = ud(e, t);
|
|
@@ -7032,31 +7035,31 @@ var ru = (e) => {
|
|
|
7032
7035
|
x || (x = new yd().select(...l)), dd(...i) !== 0 && x.delete(...i), a && x.insert(i[0], md(a));
|
|
7033
7036
|
}
|
|
7034
7037
|
S || k();
|
|
7035
|
-
}, te = () => {
|
|
7036
|
-
S || O(), S = !0;
|
|
7037
7038
|
}, M = () => {
|
|
7038
|
-
|
|
7039
|
+
S || O(), S = !0;
|
|
7039
7040
|
}, N = () => {
|
|
7040
|
-
|
|
7041
|
+
k();
|
|
7041
7042
|
}, P = () => {
|
|
7043
|
+
C = !0, O();
|
|
7044
|
+
}, F = () => {
|
|
7042
7045
|
C = !1;
|
|
7043
|
-
},
|
|
7046
|
+
}, te = () => {
|
|
7044
7047
|
if (b) {
|
|
7045
7048
|
b = !1;
|
|
7046
7049
|
return;
|
|
7047
7050
|
}
|
|
7048
7051
|
C && !S && !w && O();
|
|
7049
|
-
}, F = (e) => {
|
|
7050
|
-
O(), dd(...l) !== 0 && r(e, Dd(f(), ...fd(l)), n);
|
|
7051
7052
|
}, I = (e) => {
|
|
7052
|
-
|
|
7053
|
-
}, re = (e) => {
|
|
7054
|
-
e.preventDefault(), u || (F(e.clipboardData), h(new yd().delete(...fd(l))));
|
|
7053
|
+
O(), dd(...l) !== 0 && r(e, Dd(f(), ...fd(l)), n);
|
|
7055
7054
|
}, L = (e) => {
|
|
7055
|
+
e.preventDefault(), I(e.clipboardData);
|
|
7056
|
+
}, ne = (e) => {
|
|
7057
|
+
e.preventDefault(), u || (I(e.clipboardData), h(new yd().delete(...fd(l))));
|
|
7058
|
+
}, R = (e) => {
|
|
7056
7059
|
e.preventDefault();
|
|
7057
7060
|
let [t, n] = fd(l);
|
|
7058
7061
|
h(new yd().delete(t, n).insert(t, i(e.clipboardData, E)));
|
|
7059
|
-
},
|
|
7062
|
+
}, z = (e) => {
|
|
7060
7063
|
e.preventDefault();
|
|
7061
7064
|
let t = e.dataTransfer, r = Ef(T, n, e, E);
|
|
7062
7065
|
if (t && r) {
|
|
@@ -7065,13 +7068,13 @@ var ru = (e) => {
|
|
|
7065
7068
|
let a = e.transform(r);
|
|
7066
7069
|
e.select(a, a).insert(a, i(t, E)).select(a), h(e), n.focus({ preventScroll: !0 });
|
|
7067
7070
|
}
|
|
7068
|
-
},
|
|
7069
|
-
w = !0,
|
|
7070
|
-
},
|
|
7071
|
+
}, re = (e) => {
|
|
7072
|
+
w = !0, I(e.dataTransfer);
|
|
7073
|
+
}, ie = () => {
|
|
7071
7074
|
w = !1;
|
|
7072
7075
|
};
|
|
7073
|
-
return T.addEventListener("selectionchange",
|
|
7074
|
-
y || (y = !0, d = Mf, n.contentEditable = a, n.role = m, n.ariaMultiLine = g, n.ariaReadOnly = _, n.style.whiteSpace = v, D._dispose(), T.removeEventListener("selectionchange",
|
|
7076
|
+
return T.addEventListener("selectionchange", te), n.addEventListener("keydown", A), n.addEventListener("input", ee), n.addEventListener("beforeinput", j), n.addEventListener("compositionstart", M), n.addEventListener("compositionend", N), n.addEventListener("focus", P), n.addEventListener("blur", F), n.addEventListener("copy", L), n.addEventListener("cut", ne), n.addEventListener("paste", R), n.addEventListener("drop", z), n.addEventListener("dragstart", re), n.addEventListener("dragend", ie), () => {
|
|
7077
|
+
y || (y = !0, d = Mf, n.contentEditable = a, n.role = m, n.ariaMultiLine = g, n.ariaReadOnly = _, n.style.whiteSpace = v, D._dispose(), T.removeEventListener("selectionchange", te), n.removeEventListener("keydown", A), n.removeEventListener("input", ee), n.removeEventListener("beforeinput", j), n.removeEventListener("compositionstart", M), n.removeEventListener("compositionend", N), n.removeEventListener("focus", P), n.removeEventListener("blur", F), n.removeEventListener("copy", L), n.removeEventListener("cut", ne), n.removeEventListener("paste", R), n.removeEventListener("drop", z), n.removeEventListener("dragstart", re), n.removeEventListener("dragend", ie));
|
|
7075
7078
|
};
|
|
7076
7079
|
},
|
|
7077
7080
|
command: (e, ...t) => {
|
|
@@ -7172,7 +7175,7 @@ var ru = (e) => {
|
|
|
7172
7175
|
},
|
|
7173
7176
|
emits: ["upload"],
|
|
7174
7177
|
setup(e, { emit: t }) {
|
|
7175
|
-
let n = e, r = t, i =
|
|
7178
|
+
let n = e, r = t, i = B("fileInputRef"), o = (on / (1024 * 1024)).toFixed(1), s = a(() => {
|
|
7176
7179
|
let e = K("上传文件,最多支持 {count} 个,单个最大 {size}MB").replace("{count}", "9").replace("{size}", o);
|
|
7177
7180
|
return n.accept ? `${e}\n${qe(n.accept) ? Xe(Vt) : K("支持格式:{formats}").replace("{formats}", n.accept)}` : e;
|
|
7178
7181
|
}), u = () => {
|
|
@@ -7198,10 +7201,10 @@ var ru = (e) => {
|
|
|
7198
7201
|
multiple: "",
|
|
7199
7202
|
type: "file",
|
|
7200
7203
|
onChange: d
|
|
7201
|
-
}, null, 40, Gf),
|
|
7204
|
+
}, null, 40, Gf), W((k(), c("span", {
|
|
7202
7205
|
class: "ai-shortcut-btn file-upload-btn-icon",
|
|
7203
7206
|
onClick: u
|
|
7204
|
-
}, [
|
|
7207
|
+
}, [P(t.$slots, "default", {}, () => [f(z(zr))])])), [[z(Ce), G(G({}, e.tippyOptions), {}, {
|
|
7205
7208
|
content: s.value,
|
|
7206
7209
|
theme: "ai-chat-box ai-file-upload-tip",
|
|
7207
7210
|
offset: [0, 16],
|
|
@@ -7216,9 +7219,9 @@ var ru = (e) => {
|
|
|
7216
7219
|
},
|
|
7217
7220
|
setup(e) {
|
|
7218
7221
|
return (t, n) => (k(), c("div", qf, [
|
|
7219
|
-
f(
|
|
7220
|
-
l("span", Jf,
|
|
7221
|
-
e.onClose ? (k(), o(
|
|
7222
|
+
f(z(li)),
|
|
7223
|
+
l("span", Jf, L(e.content), 1),
|
|
7224
|
+
e.onClose ? (k(), o(z(ii), {
|
|
7222
7225
|
key: 0,
|
|
7223
7226
|
onClick: n[0] || (n[0] = (t) => {
|
|
7224
7227
|
var n;
|
|
@@ -7252,48 +7255,48 @@ var ru = (e) => {
|
|
|
7252
7255
|
setup(t, { emit: n }) {
|
|
7253
7256
|
let r = n;
|
|
7254
7257
|
return (n, i) => (k(), c("div", Xf, [l("div", Zf, [
|
|
7255
|
-
t.isMultiple ? (k(), c("span", Qf,
|
|
7258
|
+
t.isMultiple ? (k(), c("span", Qf, L(t.activeIndex + 1) + " / " + L(t.total), 1)) : s("", !0),
|
|
7256
7259
|
t.isMultiple ? (k(), c("span", $f)) : s("", !0),
|
|
7257
7260
|
l("div", {
|
|
7258
7261
|
class: "ai-image-preview-toolbar-btn",
|
|
7259
|
-
"data-tooltip":
|
|
7262
|
+
"data-tooltip": z(K)("缩小"),
|
|
7260
7263
|
onClick: i[0] || (i[0] = (e) => r("zoomOut"))
|
|
7261
|
-
}, [f(
|
|
7264
|
+
}, [f(z(Er))], 8, ep),
|
|
7262
7265
|
l("div", {
|
|
7263
7266
|
class: "ai-image-preview-toolbar-btn",
|
|
7264
|
-
"data-tooltip":
|
|
7267
|
+
"data-tooltip": z(K)("放大"),
|
|
7265
7268
|
onClick: i[1] || (i[1] = (e) => r("zoomIn"))
|
|
7266
|
-
}, [f(
|
|
7269
|
+
}, [f(z(Tr))], 8, tp),
|
|
7267
7270
|
l("div", {
|
|
7268
7271
|
class: "ai-image-preview-toolbar-btn",
|
|
7269
|
-
"data-tooltip":
|
|
7272
|
+
"data-tooltip": z(K)("旋转"),
|
|
7270
7273
|
onClick: i[2] || (i[2] = (e) => r("rotate"))
|
|
7271
|
-
}, [f(
|
|
7274
|
+
}, [f(z(Dr))], 8, np),
|
|
7272
7275
|
l("div", {
|
|
7273
7276
|
class: "ai-image-preview-toolbar-btn",
|
|
7274
|
-
"data-tooltip":
|
|
7277
|
+
"data-tooltip": z(K)("重置"),
|
|
7275
7278
|
onClick: i[3] || (i[3] = (e) => r("reset"))
|
|
7276
|
-
}, [f(
|
|
7279
|
+
}, [f(z(Or))], 8, rp),
|
|
7277
7280
|
l("div", {
|
|
7278
7281
|
class: "ai-image-preview-toolbar-btn",
|
|
7279
|
-
"data-tooltip":
|
|
7282
|
+
"data-tooltip": z(K)("下载"),
|
|
7280
7283
|
onClick: i[4] || (i[4] = (e) => r("download"))
|
|
7281
|
-
}, [f(
|
|
7282
|
-
n.$slots.extra ? (k(), c(e, { key: 2 }, [i[5] || (i[5] = l("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)),
|
|
7284
|
+
}, [f(z(kr))], 8, ip),
|
|
7285
|
+
n.$slots.extra ? (k(), c(e, { key: 2 }, [i[5] || (i[5] = l("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)), P(n.$slots, "extra")], 64)) : s("", !0),
|
|
7283
7286
|
t.showInfo && t.currentImageInfo ? (k(), c(e, { key: 3 }, [i[7] || (i[7] = l("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)), l("div", ap, [
|
|
7284
|
-
f(
|
|
7285
|
-
l("span", null,
|
|
7287
|
+
f(z(Fr), { class: "ai-image-preview-toolbar-info-icon" }),
|
|
7288
|
+
l("span", null, L(t.currentImageInfo.width) + " px " + L(z(K)("宽")), 1),
|
|
7286
7289
|
t.currentImageInfo.resolution ? (k(), c(e, { key: 0 }, [
|
|
7287
7290
|
i[6] || (i[6] = l("span", { class: "ai-image-preview-toolbar-info-dot" }, null, -1)),
|
|
7288
|
-
f(
|
|
7289
|
-
l("span", null,
|
|
7291
|
+
f(z(Fr), { class: "ai-image-preview-toolbar-info-icon" }),
|
|
7292
|
+
l("span", null, L(t.currentImageInfo.resolution), 1)
|
|
7290
7293
|
], 64)) : s("", !0)
|
|
7291
7294
|
])], 64)) : s("", !0)
|
|
7292
7295
|
])]));
|
|
7293
7296
|
}
|
|
7294
7297
|
})), sp = .15, cp = .1, lp = 10;
|
|
7295
7298
|
function up() {
|
|
7296
|
-
let e =
|
|
7299
|
+
let e = I(1), t = I(0), n = I(0), r = I(0), i = I(!1), o = I(!1), s = 0, c = 0, l = 0, u = 0, d = a(() => ({
|
|
7297
7300
|
transform: `translate(${n.value}px, ${r.value}px) scale(${e.value}) rotate(${t.value}deg)`,
|
|
7298
7301
|
cursor: i.value ? "grabbing" : "grab",
|
|
7299
7302
|
transition: i.value || o.value ? "none" : "transform 0.3s ease"
|
|
@@ -7349,7 +7352,7 @@ function dp(e) {
|
|
|
7349
7352
|
}, s = () => {
|
|
7350
7353
|
typeof document > "u" || (document.removeEventListener("keydown", a), document.body.style.overflow = "");
|
|
7351
7354
|
};
|
|
7352
|
-
|
|
7355
|
+
H(t, (e) => {
|
|
7353
7356
|
e ? o() : s();
|
|
7354
7357
|
}, { immediate: !0 }), T(() => {
|
|
7355
7358
|
s();
|
|
@@ -7387,7 +7390,7 @@ var fp = ["src"], pp = {
|
|
|
7387
7390
|
}),
|
|
7388
7391
|
emits: ["update:visible", "update:current"],
|
|
7389
7392
|
setup(n) {
|
|
7390
|
-
let i = n, d =
|
|
7393
|
+
let i = n, d = ie(n, "visible"), p = ie(n, "current"), { imageStyle: m, resetTransform: h, zoomIn: g, zoomOut: _, rotateCW: v, handleWheel: y, handleDragStart: b } = up(), x = I("loading"), S = [], C = () => {
|
|
7391
7394
|
S.forEach((e) => URL.revokeObjectURL(e)), S.length = 0;
|
|
7392
7395
|
}, E = (e) => {
|
|
7393
7396
|
let t = URL.createObjectURL(e);
|
|
@@ -7409,15 +7412,15 @@ var fp = ["src"], pp = {
|
|
|
7409
7412
|
};
|
|
7410
7413
|
}), j = () => {
|
|
7411
7414
|
d.value = !1;
|
|
7412
|
-
},
|
|
7415
|
+
}, M = () => {
|
|
7413
7416
|
i.maskClosable && j();
|
|
7414
|
-
},
|
|
7417
|
+
}, N = (e) => {
|
|
7415
7418
|
p.value = e, h(), x.value = "loading";
|
|
7416
|
-
},
|
|
7417
|
-
|
|
7419
|
+
}, F = () => {
|
|
7420
|
+
N(p.value > 0 ? p.value - 1 : D.value.length - 1);
|
|
7421
|
+
}, te = () => {
|
|
7422
|
+
N(p.value < D.value.length - 1 ? p.value + 1 : 0);
|
|
7418
7423
|
}, ne = () => {
|
|
7419
|
-
M(p.value < D.value.length - 1 ? p.value + 1 : 0);
|
|
7420
|
-
}, re = () => {
|
|
7421
7424
|
let e = O.value, t = e.downloadUrl || e.url;
|
|
7422
7425
|
if (i.onDownload) {
|
|
7423
7426
|
i.onDownload(t);
|
|
@@ -7425,54 +7428,54 @@ var fp = ["src"], pp = {
|
|
|
7425
7428
|
}
|
|
7426
7429
|
let n = document.createElement("a");
|
|
7427
7430
|
n.href = t, n.download = e.name || t.split("/").pop() || "image", n.target = "_blank", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
7428
|
-
},
|
|
7431
|
+
}, R = () => {
|
|
7429
7432
|
x.value = "loaded";
|
|
7430
|
-
},
|
|
7433
|
+
}, re = () => {
|
|
7431
7434
|
x.value = "error";
|
|
7432
7435
|
};
|
|
7433
7436
|
return dp({
|
|
7434
7437
|
visible: d,
|
|
7435
7438
|
onClose: j,
|
|
7436
|
-
onPrev: () => A.value &&
|
|
7437
|
-
onNext: () => A.value &&
|
|
7439
|
+
onPrev: () => A.value && F(),
|
|
7440
|
+
onNext: () => A.value && te()
|
|
7438
7441
|
}), (i, a) => (k(), o(t, { to: "body" }, [f(r, { name: "ai-image-preview-fade" }, {
|
|
7439
|
-
default:
|
|
7442
|
+
default: U(() => [d.value ? (k(), c("div", {
|
|
7440
7443
|
key: 0,
|
|
7441
7444
|
class: "ai-image-preview",
|
|
7442
|
-
onWheel: a[1] || (a[1] =
|
|
7445
|
+
onWheel: a[1] || (a[1] = le((...e) => z(y) && z(y)(...e), ["prevent"]))
|
|
7443
7446
|
}, [
|
|
7444
7447
|
l("div", {
|
|
7445
7448
|
class: "ai-image-preview-close",
|
|
7446
7449
|
onClick: j
|
|
7447
|
-
}, [f(
|
|
7450
|
+
}, [f(z(Ar), { class: "ai-image-preview-close-icon" })]),
|
|
7448
7451
|
A.value ? (k(), c(e, { key: 0 }, [l("div", {
|
|
7449
7452
|
class: "ai-image-preview-arrow ai-image-preview-arrow-left",
|
|
7450
|
-
onClick:
|
|
7451
|
-
}, [f(
|
|
7453
|
+
onClick: F
|
|
7454
|
+
}, [f(z(jr), { class: "ai-image-preview-arrow-icon" })]), l("div", {
|
|
7452
7455
|
class: "ai-image-preview-arrow ai-image-preview-arrow-right",
|
|
7453
|
-
onClick:
|
|
7454
|
-
}, [f(
|
|
7456
|
+
onClick: te
|
|
7457
|
+
}, [f(z(Mr), { class: "ai-image-preview-arrow-icon" })])], 64)) : s("", !0),
|
|
7455
7458
|
l("div", {
|
|
7456
7459
|
class: "ai-image-preview-body",
|
|
7457
|
-
onClick:
|
|
7458
|
-
onMousedown: a[0] || (a[0] = (...e) =>
|
|
7460
|
+
onClick: le(M, ["self"]),
|
|
7461
|
+
onMousedown: a[0] || (a[0] = (...e) => z(b) && z(b)(...e))
|
|
7459
7462
|
}, [
|
|
7460
7463
|
x.value === "error" ? s("", !0) : (k(), c("img", {
|
|
7461
7464
|
key: 0,
|
|
7462
7465
|
class: "ai-image-preview-img",
|
|
7463
7466
|
draggable: "false",
|
|
7464
7467
|
src: O.value.url,
|
|
7465
|
-
style: w(
|
|
7466
|
-
onError:
|
|
7467
|
-
onLoad:
|
|
7468
|
+
style: w(z(m)),
|
|
7469
|
+
onError: re,
|
|
7470
|
+
onLoad: R
|
|
7468
7471
|
}, null, 44, fp)),
|
|
7469
|
-
x.value === "error" ? (k(), c("div", pp, [f(
|
|
7472
|
+
x.value === "error" ? (k(), c("div", pp, [f(z(Pr), { class: "ai-image-preview-error-icon" }), l("p", mp, L(z(K)("抱歉,图片加载失败,可尝试重新加载")), 1)])) : s("", !0),
|
|
7470
7473
|
x.value === "loading" ? (k(), c("div", hp, [O.value.thumbnailUrl ? (k(), c("img", {
|
|
7471
7474
|
key: 0,
|
|
7472
7475
|
class: "ai-image-preview-img ai-image-preview-img--blur",
|
|
7473
7476
|
draggable: "false",
|
|
7474
7477
|
src: O.value.thumbnailUrl,
|
|
7475
|
-
style: w(
|
|
7478
|
+
style: w(z(m))
|
|
7476
7479
|
}, null, 12, gp)) : s("", !0)])) : s("", !0)
|
|
7477
7480
|
], 32),
|
|
7478
7481
|
f(op, {
|
|
@@ -7481,14 +7484,14 @@ var fp = ["src"], pp = {
|
|
|
7481
7484
|
"is-multiple": A.value,
|
|
7482
7485
|
"show-info": n.showInfo,
|
|
7483
7486
|
total: D.value.length,
|
|
7484
|
-
onDownload:
|
|
7485
|
-
onReset:
|
|
7486
|
-
onRotate:
|
|
7487
|
-
onZoomIn:
|
|
7488
|
-
onZoomOut:
|
|
7487
|
+
onDownload: ne,
|
|
7488
|
+
onReset: z(h),
|
|
7489
|
+
onRotate: z(v),
|
|
7490
|
+
onZoomIn: z(g),
|
|
7491
|
+
onZoomOut: z(_)
|
|
7489
7492
|
}, u({ _: 2 }, [i.$slots.extra ? {
|
|
7490
7493
|
name: "extra",
|
|
7491
|
-
fn:
|
|
7494
|
+
fn: U(() => [P(i.$slots, "extra")]),
|
|
7492
7495
|
key: "0"
|
|
7493
7496
|
} : void 0]), 1032, [
|
|
7494
7497
|
"active-index",
|
|
@@ -7544,19 +7547,19 @@ var fp = ["src"], pp = {
|
|
|
7544
7547
|
"is-error": m.value
|
|
7545
7548
|
}]) }, [
|
|
7546
7549
|
l("span", Sp, [f(yp, { "file-name": o.value }, null, 8, ["file-name"])]),
|
|
7547
|
-
l("div", Cp, [
|
|
7550
|
+
l("div", Cp, [W((k(), c("span", wp, [d(L(o.value), 1)])), [[z(Ka), G(G({}, z(i)), {}, {
|
|
7548
7551
|
text: o.value,
|
|
7549
7552
|
placement: "top"
|
|
7550
7553
|
})]]), m.value || u.value ? (k(), c("span", {
|
|
7551
7554
|
key: 0,
|
|
7552
7555
|
class: S(["ai-upload-file-item-size", { "is-error": m.value }])
|
|
7553
|
-
},
|
|
7556
|
+
}, L(m.value ? z(K)("上传失败") : u.value), 3)) : s("", !0)]),
|
|
7554
7557
|
p.value ? (k(), c("div", Tp, [f(xp)])) : s("", !0),
|
|
7555
7558
|
e.readonly ? s("", !0) : (k(), c("span", {
|
|
7556
7559
|
key: 1,
|
|
7557
7560
|
class: "ai-upload-file-item-delete",
|
|
7558
|
-
onClick: n[0] || (n[0] =
|
|
7559
|
-
}, [f(
|
|
7561
|
+
onClick: n[0] || (n[0] = le((e) => r("delete"), ["stop"]))
|
|
7562
|
+
}, [f(z(ii))]))
|
|
7560
7563
|
], 2));
|
|
7561
7564
|
}
|
|
7562
7565
|
})), Dp = ["alt", "src"], Op = {
|
|
@@ -7585,7 +7588,7 @@ var fp = ["src"], pp = {
|
|
|
7585
7588
|
o.value ? (k(), c("div", {
|
|
7586
7589
|
key: 1,
|
|
7587
7590
|
class: S(["ai-upload-image-item-thumb is-error", `is-${e.variant}`])
|
|
7588
|
-
}, [f(
|
|
7591
|
+
}, [f(z(xn), { class: "ai-upload-image-item-error-icon" })], 2)) : (k(), c("img", {
|
|
7589
7592
|
key: 0,
|
|
7590
7593
|
alt: e.name,
|
|
7591
7594
|
class: S(["ai-upload-image-item-thumb", `is-${e.variant}`]),
|
|
@@ -7597,8 +7600,8 @@ var fp = ["src"], pp = {
|
|
|
7597
7600
|
e.readonly ? s("", !0) : (k(), c("span", {
|
|
7598
7601
|
key: 3,
|
|
7599
7602
|
class: "ai-upload-image-item-delete",
|
|
7600
|
-
onClick: n[1] || (n[1] =
|
|
7601
|
-
}, [f(
|
|
7603
|
+
onClick: n[1] || (n[1] = le((e) => r("delete"), ["stop"]))
|
|
7604
|
+
}, [f(z(ii))]))
|
|
7602
7605
|
], 2));
|
|
7603
7606
|
}
|
|
7604
7607
|
})), Ap = {
|
|
@@ -7616,7 +7619,7 @@ var fp = ["src"], pp = {
|
|
|
7616
7619
|
},
|
|
7617
7620
|
emits: ["deleteFile"],
|
|
7618
7621
|
setup(t, { emit: n }) {
|
|
7619
|
-
let r = n, i = t, l =
|
|
7622
|
+
let r = n, i = t, l = te({}), u = /* @__PURE__ */ new Map(), d = (e, t) => {
|
|
7620
7623
|
if (t.url) return t.url;
|
|
7621
7624
|
if (!t.file) return "";
|
|
7622
7625
|
let n = u.get(e);
|
|
@@ -7638,8 +7641,8 @@ var fp = ["src"], pp = {
|
|
|
7638
7641
|
file: e,
|
|
7639
7642
|
key: jt(e)
|
|
7640
7643
|
})));
|
|
7641
|
-
|
|
7642
|
-
let _ =
|
|
7644
|
+
H(h, (e) => p(new Set(e.map((e) => e.key))), { flush: "post" }), T(() => p());
|
|
7645
|
+
let _ = I(!1), v = I(0), y = a(() => h.value.filter((e) => !e.hasError && e.src && e.file.status !== Hf.Pending && e.file.status !== Hf.Error)), b = a(() => y.value.map((e) => ({
|
|
7643
7646
|
name: e.name,
|
|
7644
7647
|
url: e.src
|
|
7645
7648
|
}))), x = (e) => {
|
|
@@ -7651,7 +7654,7 @@ var fp = ["src"], pp = {
|
|
|
7651
7654
|
t < 0 || (v.value = t, _.value = !0);
|
|
7652
7655
|
};
|
|
7653
7656
|
return (n, r) => (k(), c("div", { class: S(["ai-files-content", `is-${t.variant}`]) }, [
|
|
7654
|
-
h.value.length ? (k(), c("div", Ap, [(k(!0), c(e, null,
|
|
7657
|
+
h.value.length ? (k(), c("div", Ap, [(k(!0), c(e, null, N(h.value, (e) => (k(), o(kp, {
|
|
7655
7658
|
key: e.key,
|
|
7656
7659
|
"has-error": e.hasError,
|
|
7657
7660
|
name: e.name,
|
|
@@ -7673,7 +7676,7 @@ var fp = ["src"], pp = {
|
|
|
7673
7676
|
"onError",
|
|
7674
7677
|
"onPreview"
|
|
7675
7678
|
]))), 128))])) : s("", !0),
|
|
7676
|
-
g.value.length ? (k(), c("div", jp, [(k(!0), c(e, null,
|
|
7679
|
+
g.value.length ? (k(), c("div", jp, [(k(!0), c(e, null, N(g.value, (e) => (k(), o(Ep, {
|
|
7677
7680
|
key: e.key,
|
|
7678
7681
|
file: e.file,
|
|
7679
7682
|
readonly: t.readonly,
|
|
@@ -7703,7 +7706,7 @@ var fp = ["src"], pp = {
|
|
|
7703
7706
|
prompts: {}
|
|
7704
7707
|
},
|
|
7705
7708
|
setup(t) {
|
|
7706
|
-
let n = t, r =
|
|
7709
|
+
let n = t, r = B("promptListRef"), { activeIndex: i } = xa({
|
|
7707
7710
|
items: a(() => n.prompts),
|
|
7708
7711
|
onSelect: n.onSelect,
|
|
7709
7712
|
menuRef: r
|
|
@@ -7712,11 +7715,11 @@ var fp = ["src"], pp = {
|
|
|
7712
7715
|
ref_key: "promptListRef",
|
|
7713
7716
|
ref: r,
|
|
7714
7717
|
class: "ai-prompt-list"
|
|
7715
|
-
}, [(k(!0), c(e, null,
|
|
7718
|
+
}, [(k(!0), c(e, null, N(t.prompts, (e, n) => (k(), c("div", {
|
|
7716
7719
|
key: e,
|
|
7717
|
-
class: S(["ai-prompt-list-item", { "is-active":
|
|
7720
|
+
class: S(["ai-prompt-list-item", { "is-active": z(i) === n }]),
|
|
7718
7721
|
onClick: (n) => t.onSelect(e)
|
|
7719
|
-
},
|
|
7722
|
+
}, L(e), 11, Np))), 128))], 512));
|
|
7720
7723
|
}
|
|
7721
7724
|
}), Fp = ["onClick"], Ip = ["src", "onError"], Lp = {
|
|
7722
7725
|
key: 1,
|
|
@@ -7728,22 +7731,22 @@ var fp = ["src"], pp = {
|
|
|
7728
7731
|
skills: {}
|
|
7729
7732
|
},
|
|
7730
7733
|
setup(t) {
|
|
7731
|
-
let n = t, r = ee(/* @__PURE__ */ new Set()), i =
|
|
7734
|
+
let n = t, r = ee(/* @__PURE__ */ new Set()), i = B("skillListRef"), { activeIndex: o } = xa({
|
|
7732
7735
|
items: a(() => n.skills),
|
|
7733
7736
|
onSelect: n.onSelect,
|
|
7734
7737
|
menuRef: i
|
|
7735
7738
|
});
|
|
7736
|
-
return
|
|
7739
|
+
return oe(() => {
|
|
7737
7740
|
n.skills, o.value = 0;
|
|
7738
7741
|
}), (n, a) => (k(), c("div", {
|
|
7739
7742
|
ref_key: "skillListRef",
|
|
7740
7743
|
ref: i,
|
|
7741
7744
|
class: "ai-skill-list"
|
|
7742
|
-
}, [(k(!0), c(e, null,
|
|
7745
|
+
}, [(k(!0), c(e, null, N(t.skills, (e, n) => {
|
|
7743
7746
|
var i;
|
|
7744
7747
|
return k(), c("div", {
|
|
7745
7748
|
key: e.skill_code,
|
|
7746
|
-
class: S(["ai-skill-list-item", { "is-active":
|
|
7749
|
+
class: S(["ai-skill-list-item", { "is-active": z(o) === n }]),
|
|
7747
7750
|
onClick: (n) => t.onSelect(e)
|
|
7748
7751
|
}, [e.icon && !r.has(e.skill_code) ? (k(), c("img", {
|
|
7749
7752
|
key: 0,
|
|
@@ -7751,7 +7754,7 @@ var fp = ["src"], pp = {
|
|
|
7751
7754
|
alt: "",
|
|
7752
7755
|
class: "ai-skill-list-item-icon",
|
|
7753
7756
|
onError: (t) => r.add(e.skill_code)
|
|
7754
|
-
}, null, 40, Ip)) : (k(), c("div", Lp,
|
|
7757
|
+
}, null, 40, Ip)) : (k(), c("div", Lp, L((i = e.skill_name) == null || (i = i[0]) == null ? void 0 : i.toUpperCase()), 1)), l("div", Rp, [l("div", zp, L(e.skill_name), 1)])], 10, Fp);
|
|
7755
7758
|
}), 128))], 512));
|
|
7756
7759
|
}
|
|
7757
7760
|
}), Vp = { class: "ai-slash-item ai-slash-group-title" }, Hp = ["onClick"], Up = ["onClick"], Wp = ["title"], Gp = /* @__PURE__ */ m({
|
|
@@ -7761,18 +7764,18 @@ var fp = ["src"], pp = {
|
|
|
7761
7764
|
resourceList: {}
|
|
7762
7765
|
},
|
|
7763
7766
|
setup(t) {
|
|
7764
|
-
let n = t, r =
|
|
7767
|
+
let n = t, r = B("menuRef"), i = M([
|
|
7765
7768
|
"tool",
|
|
7766
7769
|
"shortcut",
|
|
7767
7770
|
"doc",
|
|
7768
7771
|
"knowledgebase",
|
|
7769
7772
|
"mcp"
|
|
7770
|
-
]), a =
|
|
7773
|
+
]), a = I([]), o = I([]), { activeIndex: u } = xa({
|
|
7771
7774
|
items: a,
|
|
7772
7775
|
onSelect: n.onSelect,
|
|
7773
7776
|
menuRef: r
|
|
7774
7777
|
});
|
|
7775
|
-
|
|
7778
|
+
oe(() => {
|
|
7776
7779
|
let e = [], t = [];
|
|
7777
7780
|
for (let [a, o] of Object.entries(Rf)) {
|
|
7778
7781
|
var r, i;
|
|
@@ -7797,7 +7800,7 @@ var fp = ["src"], pp = {
|
|
|
7797
7800
|
ref_key: "menuRef",
|
|
7798
7801
|
ref: r,
|
|
7799
7802
|
class: "ai-slash-menu"
|
|
7800
|
-
}, [(k(!0), c(e, null,
|
|
7803
|
+
}, [(k(!0), c(e, null, N(o.value, (n, r) => (k(), c(e, null, [n.items.length > 0 ? (k(), c("div", {
|
|
7801
7804
|
key: r,
|
|
7802
7805
|
class: "ai-slash-group"
|
|
7803
7806
|
}, [l("div", Vp, [
|
|
@@ -7808,17 +7811,17 @@ var fp = ["src"], pp = {
|
|
|
7808
7811
|
onClick: (e) => f(n)
|
|
7809
7812
|
}, [...p[0] || (p[0] = [l("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, Hp)),
|
|
7810
7813
|
l("span", { class: S(`mark-${n.type}`) }, null, 2),
|
|
7811
|
-
d(" " +
|
|
7812
|
-
]), i.value.includes(n.type) ? (k(!0), c(e, { key: 0 },
|
|
7814
|
+
d(" " + L(n.name) + " (" + L(n.items.length) + ") ", 1)
|
|
7815
|
+
]), i.value.includes(n.type) ? (k(!0), c(e, { key: 0 }, N(n.items, (e) => {
|
|
7813
7816
|
var n;
|
|
7814
7817
|
return k(), c("div", {
|
|
7815
7818
|
key: e.id,
|
|
7816
|
-
class: S(["ai-slash-item ai-slash-group-item", { "is-active": ((n = a.value) == null || (n = n[
|
|
7819
|
+
class: S(["ai-slash-item ai-slash-group-item", { "is-active": ((n = a.value) == null || (n = n[z(u)]) == null ? void 0 : n.id) === e.id }]),
|
|
7817
7820
|
onClick: (n) => t.onSelect(e)
|
|
7818
|
-
}, [
|
|
7821
|
+
}, [W((k(), c("span", {
|
|
7819
7822
|
class: "ellipsis-text",
|
|
7820
7823
|
title: e.name
|
|
7821
|
-
}, [d(
|
|
7824
|
+
}, [d(L(e.name), 1)], 8, Wp)), [[z(Ka), {
|
|
7822
7825
|
text: e.name,
|
|
7823
7826
|
zIndex: 9999999,
|
|
7824
7827
|
placement: "right-start",
|
|
@@ -7864,7 +7867,7 @@ var fp = ["src"], pp = {
|
|
|
7864
7867
|
"upload"
|
|
7865
7868
|
],
|
|
7866
7869
|
setup(t, { expose: n, emit: r }) {
|
|
7867
|
-
let i =
|
|
7870
|
+
let i = B("editorRef"), a = B("tippyRef"), u = r, m = t, h = p((e, t) => ({
|
|
7868
7871
|
get() {
|
|
7869
7872
|
return e(), typeof m.modelValue == "string" ? md(m.modelValue) : m.modelValue;
|
|
7870
7873
|
},
|
|
@@ -7875,16 +7878,16 @@ var fp = ["src"], pp = {
|
|
|
7875
7878
|
return ((t = m.resources) == null ? void 0 : t.find((t) => (t.id === e.data.value || t.name === e.data.value) && t.type === e.data.type)) || null;
|
|
7876
7879
|
})) == null ? void 0 : n.filter((e) => !!e)) || []), t();
|
|
7877
7880
|
}
|
|
7878
|
-
})), g =
|
|
7881
|
+
})), g = I("slash"), _ = I(""), v = I([]), y = I([]), b = I([]), x, C, w = null, T = null, D = () => {
|
|
7879
7882
|
w !== null && (clearTimeout(w), w = null), T !== null && (clearTimeout(T), T = null);
|
|
7880
|
-
}, A = () => document.body, { commandSelection: ee, GetCursorPosition: j, GetDocSnapshot:
|
|
7881
|
-
|
|
7882
|
-
x.command(
|
|
7883
|
+
}, A = () => document.body, { commandSelection: ee, GetCursorPosition: j, GetDocSnapshot: M, docSnapshot: P } = aa();
|
|
7884
|
+
H(() => m.modelValue, () => {
|
|
7885
|
+
x.command(M), pd(P.value || []) !== pd(h.value || []) && x.command(Pd, pd(h.value || []));
|
|
7883
7886
|
}, { deep: !1 });
|
|
7884
|
-
let
|
|
7887
|
+
let F = () => {
|
|
7885
7888
|
w !== null && clearTimeout(w), w = setTimeout(() => {
|
|
7886
7889
|
w = null;
|
|
7887
|
-
let e =
|
|
7890
|
+
let e = R();
|
|
7888
7891
|
if (_.value = e.query || "", e.isActive) {
|
|
7889
7892
|
var t, n;
|
|
7890
7893
|
(t = a.value) == null || t.setProps({ getReferenceClientRect: () => {
|
|
@@ -7901,15 +7904,15 @@ var fp = ["src"], pp = {
|
|
|
7901
7904
|
(r = a.value) == null || r.hide();
|
|
7902
7905
|
}
|
|
7903
7906
|
}, 16);
|
|
7904
|
-
},
|
|
7907
|
+
}, te = (e) => {
|
|
7905
7908
|
if (u("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
|
|
7906
7909
|
var t;
|
|
7907
7910
|
return e.shiftKey ? void 0 : ((t = e.preventDefault) == null || t.call(e), !1);
|
|
7908
7911
|
}
|
|
7909
|
-
e.key === "@" && (g.value = "slash",
|
|
7910
|
-
},
|
|
7912
|
+
e.key === "@" && (g.value = "slash", F()), e.key === "/" && (g.value = "skill", F()), e.key === "\\" && (g.value = "prompt", F());
|
|
7913
|
+
}, ne = () => {
|
|
7911
7914
|
_.value = "";
|
|
7912
|
-
},
|
|
7915
|
+
}, R = () => {
|
|
7913
7916
|
let e = {
|
|
7914
7917
|
isActive: !1,
|
|
7915
7918
|
query: "",
|
|
@@ -7941,33 +7944,33 @@ var fp = ["src"], pp = {
|
|
|
7941
7944
|
} catch (t) {
|
|
7942
7945
|
return e;
|
|
7943
7946
|
}
|
|
7944
|
-
},
|
|
7947
|
+
}, re = (e, t) => e.reduce((e, n, r) => {
|
|
7945
7948
|
if (r >= t) return e;
|
|
7946
7949
|
if (n.type === "text") {
|
|
7947
7950
|
var i;
|
|
7948
7951
|
e += ((i = n.text) == null ? void 0 : i.length) || 0;
|
|
7949
7952
|
}
|
|
7950
7953
|
return n.type === "tag" && (e += 1), e;
|
|
7951
|
-
}, 0),
|
|
7954
|
+
}, 0), ie = (e) => {
|
|
7952
7955
|
var t;
|
|
7953
7956
|
x.command(j);
|
|
7954
7957
|
let { column: n, line: r } = ee.value;
|
|
7955
|
-
x.command(Kp, [r, n - _.value.length - 1], [r, n]), x.command(qp, [r, n], e), x.command(Jp, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(),
|
|
7956
|
-
},
|
|
7958
|
+
x.command(Kp, [r, n - _.value.length - 1], [r, n]), x.command(qp, [r, n], e), x.command(Jp, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(), ae();
|
|
7959
|
+
}, ae = () => {
|
|
7957
7960
|
T !== null && clearTimeout(T), T = setTimeout(() => {
|
|
7958
7961
|
if (T = null, typeof window > "u") return;
|
|
7959
7962
|
let e = window.getSelection(), t = document.createRange();
|
|
7960
7963
|
i.value && e && (t.selectNodeContents(i.value), t.collapse(!1), e.removeAllRanges(), e.addRange(t));
|
|
7961
7964
|
}, 100);
|
|
7962
|
-
},
|
|
7963
|
-
x.command(Pd, e),
|
|
7964
|
-
},
|
|
7965
|
+
}, V = (e) => {
|
|
7966
|
+
x.command(Pd, e), ae();
|
|
7967
|
+
}, se = (e) => {
|
|
7965
7968
|
var t;
|
|
7966
7969
|
x.command(j);
|
|
7967
7970
|
let { column: n, line: r } = ee.value;
|
|
7968
|
-
x.command(Kp, [r, n - _.value.length - 1], [r, n]), x.command(Yp, [r, n], e), x.command(Jp, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(),
|
|
7971
|
+
x.command(Kp, [r, n - _.value.length - 1], [r, n]), x.command(Yp, [r, n], e), x.command(Jp, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(), ae();
|
|
7969
7972
|
};
|
|
7970
|
-
|
|
7973
|
+
oe(() => {
|
|
7971
7974
|
var e, t;
|
|
7972
7975
|
let n = (e = m.resources) == null ? void 0 : e.filter((e) => {
|
|
7973
7976
|
var t;
|
|
@@ -7981,12 +7984,12 @@ var fp = ["src"], pp = {
|
|
|
7981
7984
|
(i = a.value) == null || i.hide();
|
|
7982
7985
|
}
|
|
7983
7986
|
});
|
|
7984
|
-
let
|
|
7987
|
+
let W = (e, t, n, r) => {
|
|
7985
7988
|
if (t.type === "tag") {
|
|
7986
|
-
let t =
|
|
7989
|
+
let t = re(e, n);
|
|
7987
7990
|
x.command(Kp, [r, t], [r, t + 1]);
|
|
7988
7991
|
}
|
|
7989
|
-
},
|
|
7992
|
+
}, ce = (e) => {
|
|
7990
7993
|
var t;
|
|
7991
7994
|
let n = (t = e.clipboardData) == null ? void 0 : t.items;
|
|
7992
7995
|
if (!n) return;
|
|
@@ -7996,32 +7999,32 @@ var fp = ["src"], pp = {
|
|
|
7996
7999
|
t && r.push(t);
|
|
7997
8000
|
}
|
|
7998
8001
|
r.length > 0 && (e.preventDefault(), u("upload", r));
|
|
7999
|
-
},
|
|
8002
|
+
}, le = () => {
|
|
8000
8003
|
C == null || C(), x = Nf({
|
|
8001
8004
|
doc: h.value,
|
|
8002
8005
|
schema: Qp,
|
|
8003
8006
|
onChange: function() {
|
|
8004
8007
|
var e = Z(function* (e) {
|
|
8005
|
-
h.value = e,
|
|
8008
|
+
h.value = e, F();
|
|
8006
8009
|
});
|
|
8007
8010
|
return function(t) {
|
|
8008
8011
|
return e.apply(this, arguments);
|
|
8009
8012
|
};
|
|
8010
8013
|
}(),
|
|
8011
|
-
onKeyDown: (e) =>
|
|
8014
|
+
onKeyDown: (e) => te(e)
|
|
8012
8015
|
}), C = x.input(i.value);
|
|
8013
|
-
},
|
|
8016
|
+
}, ue = () => g.value === "slash" ? v.value.length < 1 ? !1 : void 0 : g.value === "skill" ? y.value.length < 1 ? !1 : void 0 : b.value.length < 1 ? !1 : void 0;
|
|
8014
8017
|
return E(() => {
|
|
8015
8018
|
var e;
|
|
8016
|
-
|
|
8019
|
+
le(), (e = i.value) == null || e.addEventListener("paste", ce);
|
|
8017
8020
|
}), O(() => {
|
|
8018
8021
|
var e;
|
|
8019
|
-
D(), x.command(Pd, ""), C == null || C(), (e = i.value) == null || e.removeEventListener("paste",
|
|
8022
|
+
D(), x.command(Pd, ""), C == null || C(), (e = i.value) == null || e.removeEventListener("paste", ce);
|
|
8020
8023
|
}), n({
|
|
8021
8024
|
cleanup: () => {
|
|
8022
8025
|
x.command(Pd, "");
|
|
8023
8026
|
},
|
|
8024
|
-
focus:
|
|
8027
|
+
focus: ae
|
|
8025
8028
|
}), (n, r) => {
|
|
8026
8029
|
var u;
|
|
8027
8030
|
return k(), c("div", $p, [l("div", {
|
|
@@ -8030,16 +8033,16 @@ var fp = ["src"], pp = {
|
|
|
8030
8033
|
"aria-placeholder": t.placeholder,
|
|
8031
8034
|
class: "ai-slash-input",
|
|
8032
8035
|
spellcheck: "false"
|
|
8033
|
-
}, [(u = h.value) != null && u.length && h.value.some((e) => e.length) ? (k(!0), c(e, { key: 0 },
|
|
8036
|
+
}, [(u = h.value) != null && u.length && h.value.some((e) => e.length) ? (k(!0), c(e, { key: 0 }, N(h.value, (t, n) => (k(), c("div", { key: n }, [t.length ? (k(!0), c(e, { key: 0 }, N(t, (r, i) => (k(), c(e, { key: i }, [r.type === "text" ? (k(), c("span", tm, L(r.text), 1)) : r.type === "tag" ? (k(), c("span", {
|
|
8034
8037
|
key: 1,
|
|
8035
8038
|
class: S(`mention-tag-${r.data.type}`),
|
|
8036
8039
|
contenteditable: "false",
|
|
8037
8040
|
"data-tag-type": r.data.type,
|
|
8038
8041
|
"data-tag-value": r.data.value
|
|
8039
|
-
}, [d(
|
|
8042
|
+
}, [d(L(r.data.label) + " ", 1), f(z(vn), {
|
|
8040
8043
|
class: "mention-tag-remove-icon",
|
|
8041
|
-
onClick: (e) =>
|
|
8042
|
-
}, null, 8, ["onClick"])], 10, nm)) : s("", !0)], 64))), 128)) : (k(), c("br", rm))]))), 128)) : s("", !0)], 8, em), f(
|
|
8044
|
+
onClick: (e) => W(t, r, i, n)
|
|
8045
|
+
}, null, 8, ["onClick"])], 10, nm)) : s("", !0)], 64))), 128)) : (k(), c("br", rm))]))), 128)) : s("", !0)], 8, em), f(z(Se), {
|
|
8043
8046
|
ref_key: "tippyRef",
|
|
8044
8047
|
ref: a,
|
|
8045
8048
|
"append-to": A,
|
|
@@ -8051,21 +8054,21 @@ var fp = ["src"], pp = {
|
|
|
8051
8054
|
theme: "light ai-slash-editor-theme",
|
|
8052
8055
|
trigger: "manual",
|
|
8053
8056
|
"trigger-target": i.value,
|
|
8054
|
-
"z-index":
|
|
8055
|
-
onHidden:
|
|
8056
|
-
onShow:
|
|
8057
|
+
"z-index": z(Qt),
|
|
8058
|
+
onHidden: ne,
|
|
8059
|
+
onShow: ue
|
|
8057
8060
|
}, {
|
|
8058
|
-
content:
|
|
8061
|
+
content: U(() => [g.value === "slash" ? (k(), o(Gp, {
|
|
8059
8062
|
key: 0,
|
|
8060
|
-
"on-select":
|
|
8063
|
+
"on-select": ie,
|
|
8061
8064
|
"resource-list": v.value
|
|
8062
8065
|
}, null, 8, ["resource-list"])) : g.value === "skill" ? (k(), o(Bp, {
|
|
8063
8066
|
key: 1,
|
|
8064
|
-
"on-select":
|
|
8067
|
+
"on-select": se,
|
|
8065
8068
|
skills: y.value
|
|
8066
8069
|
}, null, 8, ["skills"])) : g.value === "prompt" ? (k(), o(Pp, {
|
|
8067
8070
|
key: 2,
|
|
8068
|
-
"on-select":
|
|
8071
|
+
"on-select": V,
|
|
8069
8072
|
prompts: b.value
|
|
8070
8073
|
}, null, 8, ["prompts"])) : s("", !0)]),
|
|
8071
8074
|
_: 1
|
|
@@ -8096,20 +8099,20 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8096
8099
|
n.sendDisabledTip || n.messageState === Y.Disabled || n.messageState === Y.Pending || n.messageState === Y.Streaming || r("sendMessage");
|
|
8097
8100
|
};
|
|
8098
8101
|
return (t, r) => (k(), c("div", om, [
|
|
8099
|
-
l("div", sm, [
|
|
8100
|
-
l("div", cm, [
|
|
8101
|
-
|
|
8102
|
+
l("div", sm, [P(t.$slots, "default")]),
|
|
8103
|
+
l("div", cm, [P(t.$slots, "before-send")]),
|
|
8104
|
+
P(t.$slots, "send-icon", {}, () => [l("div", {
|
|
8102
8105
|
class: S(["send-message-icon", [e.messageState && `send-message-icon__${e.messageState}`, { "send-message-icon__disabled": e.sendDisabledTip }]]),
|
|
8103
8106
|
onClick: a
|
|
8104
|
-
}, [e.messageState ===
|
|
8107
|
+
}, [e.messageState === z(Y).Streaming || e.messageState === z(Y).Pending || e.messageState === z(Y).Fetching ? W((k(), o(z(Xr), {
|
|
8105
8108
|
key: 0,
|
|
8106
8109
|
onClick: i
|
|
8107
|
-
}, null, 512)), [[
|
|
8108
|
-
content:
|
|
8110
|
+
}, null, 512)), [[z(Ce), G(G({}, e.tippyOptions), {}, {
|
|
8111
|
+
content: z(K)("停止"),
|
|
8109
8112
|
theme: "ai-chat-box",
|
|
8110
8113
|
offset: [0, 16]
|
|
8111
|
-
})]]) :
|
|
8112
|
-
content: e.sendDisabledTip || (n.messageState ===
|
|
8114
|
+
})]]) : W((k(), o(z(Yr), { key: 1 }, null, 512)), [[z(Ce), G(G({}, e.tippyOptions), {}, {
|
|
8115
|
+
content: e.sendDisabledTip || (n.messageState === z(Y).Disabled ? void 0 : z(K)("发送")),
|
|
8113
8116
|
theme: "ai-chat-box",
|
|
8114
8117
|
offset: [0, 16]
|
|
8115
8118
|
})]])], 2)])
|
|
@@ -8161,12 +8164,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8161
8164
|
let i = t, o = a(() => {
|
|
8162
8165
|
let e = /* @__PURE__ */ new Map();
|
|
8163
8166
|
return i.models.forEach((t) => e.set(t.llm_name, dm(t))), e;
|
|
8164
|
-
}), u = r, p =
|
|
8167
|
+
}), u = r, p = ie(t, "keyword"), m = B("panelRef"), h = B("searchInputRef"), g = I(i.models), { activeIndex: _ } = xa({
|
|
8165
8168
|
items: g,
|
|
8166
8169
|
menuRef: m,
|
|
8167
8170
|
onSelect: (e) => v(e)
|
|
8168
8171
|
});
|
|
8169
|
-
|
|
8172
|
+
H(() => i.models, (e) => {
|
|
8170
8173
|
g.value = e, _.value = 0;
|
|
8171
8174
|
});
|
|
8172
8175
|
let v = (e) => {
|
|
@@ -8181,7 +8184,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8181
8184
|
ref_key: "panelRef",
|
|
8182
8185
|
ref: m,
|
|
8183
8186
|
class: "ai-model-selector-panel"
|
|
8184
|
-
}, [l("div", fm, [f(
|
|
8187
|
+
}, [l("div", fm, [f(z(me), {
|
|
8185
8188
|
ref_key: "searchInputRef",
|
|
8186
8189
|
ref: h,
|
|
8187
8190
|
modelValue: p.value,
|
|
@@ -8192,15 +8195,15 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8192
8195
|
placeholder: t.searchPlaceholder,
|
|
8193
8196
|
type: "text"
|
|
8194
8197
|
}, {
|
|
8195
|
-
prefix:
|
|
8198
|
+
prefix: U(() => [f(z(Br), { class: "ai-model-selector-panel-search-icon" })]),
|
|
8196
8199
|
_: 1
|
|
8197
|
-
}, 8, ["modelValue", "placeholder"])]), l("div", pm, [(k(!0), c(e, null,
|
|
8200
|
+
}, 8, ["modelValue", "placeholder"])]), l("div", pm, [(k(!0), c(e, null, N(t.models, (n, r) => {
|
|
8198
8201
|
var i;
|
|
8199
8202
|
return k(), c("div", {
|
|
8200
8203
|
key: n.id,
|
|
8201
8204
|
class: S(["ai-model-selector-panel-option", {
|
|
8202
8205
|
"is-selected": n.llm_name === t.selectedName,
|
|
8203
|
-
"is-active": r ===
|
|
8206
|
+
"is-active": r === z(_),
|
|
8204
8207
|
"is-disabled": n.disabled
|
|
8205
8208
|
}]),
|
|
8206
8209
|
title: n.description,
|
|
@@ -8213,17 +8216,17 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8213
8216
|
l("span", {
|
|
8214
8217
|
class: "ai-model-selector-panel-option-name",
|
|
8215
8218
|
title: n.llm_name
|
|
8216
|
-
},
|
|
8217
|
-
(i = o.value.get(n.llm_name)) != null && i.length ? (k(), c("span", vm, [(k(!0), c(e, null,
|
|
8219
|
+
}, L(n.llm_name), 9, _m),
|
|
8220
|
+
(i = o.value.get(n.llm_name)) != null && i.length ? (k(), c("span", vm, [(k(!0), c(e, null, N(o.value.get(n.llm_name), (e, t) => (k(), c("span", {
|
|
8218
8221
|
key: t,
|
|
8219
8222
|
class: S(["ai-model-capability-tag", `is-${e.theme || "default"}`])
|
|
8220
|
-
},
|
|
8223
|
+
}, L(e.text), 3))), 128))])) : s("", !0)
|
|
8221
8224
|
], 10, mm);
|
|
8222
|
-
}), 128)), t.models.length ? s("", !0) : (k(), c("div", ym, [f(
|
|
8225
|
+
}), 128)), t.models.length ? s("", !0) : (k(), c("div", ym, [f(z(fe), {
|
|
8223
8226
|
scene: "part",
|
|
8224
8227
|
type: "empty"
|
|
8225
8228
|
}, {
|
|
8226
|
-
default:
|
|
8229
|
+
default: U(() => [d(L(z(K)("搜索结果为空")), 1)]),
|
|
8227
8230
|
_: 1
|
|
8228
8231
|
})]))])], 512));
|
|
8229
8232
|
}
|
|
@@ -8249,13 +8252,13 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8249
8252
|
alt: "",
|
|
8250
8253
|
src: e.model.icon
|
|
8251
8254
|
}, null, 8, Sm)])) : s("", !0),
|
|
8252
|
-
l("span", Cm,
|
|
8253
|
-
f(
|
|
8255
|
+
l("span", Cm, L(((i = e.model) == null ? void 0 : i.llm_name) || e.placeholder), 1),
|
|
8256
|
+
f(z(jr), { class: "ai-model-selector-trigger-arrow" })
|
|
8254
8257
|
], 2);
|
|
8255
8258
|
};
|
|
8256
8259
|
}
|
|
8257
8260
|
}), Tm = (e) => {
|
|
8258
|
-
let t =
|
|
8261
|
+
let t = I("");
|
|
8259
8262
|
return {
|
|
8260
8263
|
keyword: t,
|
|
8261
8264
|
filteredModels: a(() => {
|
|
@@ -8281,8 +8284,8 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8281
8284
|
}),
|
|
8282
8285
|
emits: /* @__PURE__ */ y(["change"], ["update:modelValue"]),
|
|
8283
8286
|
setup(e, { emit: t }) {
|
|
8284
|
-
let n = e, r = t, i =
|
|
8285
|
-
models:
|
|
8287
|
+
let n = e, r = t, i = ie(e, "modelValue"), s = B("tippyRef"), c = B("panelRef"), l = I(!1), { keyword: u, filteredModels: d, currentModel: p, resetKeyword: m } = Tm({
|
|
8288
|
+
models: ne(n, "models"),
|
|
8286
8289
|
selectedModel: i
|
|
8287
8290
|
}), h = a(() => G({
|
|
8288
8291
|
arrow: !1,
|
|
@@ -8302,19 +8305,19 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8302
8305
|
var t, n;
|
|
8303
8306
|
i.value = e.llm_name, r("change", e), (t = s.value) == null || (n = t.hide) == null || n.call(t);
|
|
8304
8307
|
};
|
|
8305
|
-
return (t, n) => (k(), o(
|
|
8308
|
+
return (t, n) => (k(), o(z(Se), b({
|
|
8306
8309
|
ref_key: "tippyRef",
|
|
8307
8310
|
ref: s
|
|
8308
8311
|
}, h.value, {
|
|
8309
8312
|
onHidden: _,
|
|
8310
8313
|
onShow: g
|
|
8311
8314
|
}), {
|
|
8312
|
-
content:
|
|
8315
|
+
content: U(() => [f(bm, {
|
|
8313
8316
|
ref_key: "panelRef",
|
|
8314
8317
|
ref: c,
|
|
8315
|
-
keyword:
|
|
8318
|
+
keyword: z(u),
|
|
8316
8319
|
"onUpdate:keyword": n[0] || (n[0] = (e) => v(u) ? u.value = e : null),
|
|
8317
|
-
models:
|
|
8320
|
+
models: z(d),
|
|
8318
8321
|
"search-placeholder": e.searchPlaceholder,
|
|
8319
8322
|
"selected-name": i.value,
|
|
8320
8323
|
onSelect: y
|
|
@@ -8324,10 +8327,10 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8324
8327
|
"search-placeholder",
|
|
8325
8328
|
"selected-name"
|
|
8326
8329
|
])]),
|
|
8327
|
-
default:
|
|
8330
|
+
default: U(() => [f(wm, {
|
|
8328
8331
|
disabled: e.disabled,
|
|
8329
8332
|
expanded: l.value,
|
|
8330
|
-
model:
|
|
8333
|
+
model: z(p),
|
|
8331
8334
|
placeholder: e.placeholder
|
|
8332
8335
|
}, null, 8, [
|
|
8333
8336
|
"disabled",
|
|
@@ -8381,7 +8384,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8381
8384
|
"modelChange"
|
|
8382
8385
|
], ["update:cite", "update:selectedModel"]),
|
|
8383
8386
|
setup(e, { expose: t, emit: n }) {
|
|
8384
|
-
let r =
|
|
8387
|
+
let r = B("aiSlashInputRef"), i = B("filesRef"), u = ie(e, "cite"), d = ie(e, "selectedModel"), p = I(280), m = e, g = n, _ = a(() => {
|
|
8385
8388
|
var e, t, n, r, i, a;
|
|
8386
8389
|
return m.placeholder === void 0 ? am({
|
|
8387
8390
|
isEn: Vt,
|
|
@@ -8389,7 +8392,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8389
8392
|
hasPrompts: ((n = (r = m.prompts) == null ? void 0 : r.length) == null ? 0 : n) > 0,
|
|
8390
8393
|
hasResources: ((i = (a = m.resources) == null ? void 0 : a.length) == null ? 0 : i) > 0
|
|
8391
8394
|
}) : m.placeholder;
|
|
8392
|
-
}), v =
|
|
8395
|
+
}), v = M(m.defaultUploadFiles || []), y = a(() => {
|
|
8393
8396
|
var e;
|
|
8394
8397
|
return (e = m.shortcuts) == null ? void 0 : e.find((e) => e.id === m.shortcutId);
|
|
8395
8398
|
}), b = a(() => typeof m.modelValue == "string" ? m.modelValue : Zp(m.modelValue)), x = a(() => m.messageStatus && [
|
|
@@ -8401,7 +8404,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8401
8404
|
if (T.value) return K("文件上传中,请稍候");
|
|
8402
8405
|
if (E.value) return K("存在上传失败的文件,请删除后重试");
|
|
8403
8406
|
});
|
|
8404
|
-
|
|
8407
|
+
se(() => {
|
|
8405
8408
|
var e;
|
|
8406
8409
|
let t = m.inputMaxHeight || 280;
|
|
8407
8410
|
if (v.value.length < 1 || !i.value) {
|
|
@@ -8460,21 +8463,21 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8460
8463
|
return function() {
|
|
8461
8464
|
return e.apply(this, arguments);
|
|
8462
8465
|
};
|
|
8463
|
-
}(),
|
|
8466
|
+
}(), N = () => {
|
|
8464
8467
|
u.value = "";
|
|
8465
|
-
},
|
|
8468
|
+
}, F = (e) => {
|
|
8466
8469
|
g("selectShortcut", e);
|
|
8467
|
-
},
|
|
8470
|
+
}, te = () => {
|
|
8468
8471
|
g("deleteShortcut");
|
|
8469
|
-
},
|
|
8472
|
+
}, L = (e) => {
|
|
8470
8473
|
g("modelChange", e);
|
|
8471
|
-
},
|
|
8474
|
+
}, ne = (on / (1024 * 1024)).toFixed(1), R = (e, t) => {
|
|
8472
8475
|
if ((t == null ? void 0 : t.status) !== "failed" && (t != null && t.id || t != null && t.download_url || (t == null ? void 0 : t.status) === "success")) {
|
|
8473
8476
|
e.id = t.id, e.url = t.download_url, e.status = Hf.Success;
|
|
8474
8477
|
return;
|
|
8475
8478
|
}
|
|
8476
8479
|
e.status = Hf.Error;
|
|
8477
|
-
},
|
|
8480
|
+
}, re = function() {
|
|
8478
8481
|
var e = Z(function* (e) {
|
|
8479
8482
|
if (!m.supportUpload) return;
|
|
8480
8483
|
let t = new Set(v.value.map((e) => e.file ? At(e.file) : "")), n = [], r = 0, i = 0;
|
|
@@ -8505,7 +8508,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8505
8508
|
message: K("有 {count} 个文件因格式不支持未添加").replace("{count}", String(i)),
|
|
8506
8509
|
theme: "error"
|
|
8507
8510
|
}), r > 0 && ge({
|
|
8508
|
-
message: Ge(r,
|
|
8511
|
+
message: Ge(r, ne, Vt),
|
|
8509
8512
|
theme: "error"
|
|
8510
8513
|
}), n.length > 0) {
|
|
8511
8514
|
var a;
|
|
@@ -8515,7 +8518,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8515
8518
|
t.then((e) => {
|
|
8516
8519
|
let t = Array.isArray(e) ? e : [e];
|
|
8517
8520
|
n.forEach((e, n) => {
|
|
8518
|
-
|
|
8521
|
+
R(e, t[n]);
|
|
8519
8522
|
});
|
|
8520
8523
|
}).catch(() => {
|
|
8521
8524
|
n.forEach((e) => {
|
|
@@ -8527,21 +8530,21 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8527
8530
|
return function(t) {
|
|
8528
8531
|
return e.apply(this, arguments);
|
|
8529
8532
|
};
|
|
8530
|
-
}(),
|
|
8533
|
+
}(), ae = I(!1), V = 0, H = (e) => {
|
|
8531
8534
|
var t;
|
|
8532
8535
|
return !!(!((t = e.dataTransfer) == null || (t = t.types) == null) && t.includes("Files"));
|
|
8533
|
-
},
|
|
8534
|
-
|
|
8536
|
+
}, oe = (e) => m.supportUpload && H(e), W = (e) => {
|
|
8537
|
+
oe(e) && (V += 1, ae.value = !0);
|
|
8538
|
+
}, ce = (e) => {
|
|
8539
|
+
oe(e) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "copy"));
|
|
8535
8540
|
}, le = (e) => {
|
|
8536
|
-
|
|
8541
|
+
oe(e) && (V = Math.max(V - 1, 0), V === 0 && (ae.value = !1));
|
|
8537
8542
|
}, ue = (e) => {
|
|
8538
|
-
se(e) && (B = Math.max(B - 1, 0), B === 0 && (oe.value = !1));
|
|
8539
|
-
}, W = (e) => {
|
|
8540
8543
|
var t, n;
|
|
8541
|
-
if (!
|
|
8542
|
-
e.preventDefault(),
|
|
8544
|
+
if (!oe(e)) return;
|
|
8545
|
+
e.preventDefault(), V = 0, ae.value = !1;
|
|
8543
8546
|
let r = Array.from((t = (n = e.dataTransfer) == null ? void 0 : n.files) == null ? [] : t);
|
|
8544
|
-
r.length &&
|
|
8547
|
+
r.length && re(r);
|
|
8545
8548
|
}, de = (e) => {
|
|
8546
8549
|
v.value = v.value.filter((t) => t.file ? t.file !== e.file : t.url ? t.url !== e.url : t.filename ? t.filename !== e.filename : !0);
|
|
8547
8550
|
}, fe = (e, t) => {
|
|
@@ -8555,25 +8558,25 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8555
8558
|
triggerSendMessage: O
|
|
8556
8559
|
}), (t, n) => (k(), c("div", {
|
|
8557
8560
|
class: "ai-chat-input-container",
|
|
8558
|
-
style: w({ "--chat-z-index":
|
|
8561
|
+
style: w({ "--chat-z-index": z(Xt) })
|
|
8559
8562
|
}, [
|
|
8560
|
-
|
|
8561
|
-
|
|
8563
|
+
P(t.$slots, "top"),
|
|
8564
|
+
P(t.$slots, "interrupt"),
|
|
8562
8565
|
l("div", {
|
|
8563
|
-
class: S(["chat-input", { "is-dragover":
|
|
8566
|
+
class: S(["chat-input", { "is-dragover": ae.value }]),
|
|
8564
8567
|
style: w({ maxHeight: p.value + "px" }),
|
|
8565
|
-
onDragenter:
|
|
8566
|
-
onDragleave:
|
|
8567
|
-
onDragover:
|
|
8568
|
-
onDrop:
|
|
8568
|
+
onDragenter: W,
|
|
8569
|
+
onDragleave: le,
|
|
8570
|
+
onDragover: ce,
|
|
8571
|
+
onDrop: ue
|
|
8569
8572
|
}, [
|
|
8570
|
-
|
|
8573
|
+
P(t.$slots, "input-header", {}, () => [u.value ? (k(), o(Yf, {
|
|
8571
8574
|
key: 0,
|
|
8572
8575
|
class: "chat-input-cite",
|
|
8573
8576
|
content: u.value,
|
|
8574
|
-
onClose:
|
|
8577
|
+
onClose: N
|
|
8575
8578
|
}, null, 8, ["content"])) : s("", !0)]),
|
|
8576
|
-
|
|
8579
|
+
P(t.$slots, "files", C(h({ files: v.value })), () => [v.value.length ? (k(), c("div", {
|
|
8577
8580
|
key: 0,
|
|
8578
8581
|
ref_key: "filesRef",
|
|
8579
8582
|
ref: i,
|
|
@@ -8592,7 +8595,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8592
8595
|
skills: e.skills,
|
|
8593
8596
|
onKeydown: A,
|
|
8594
8597
|
"onUpdate:modelValue": fe,
|
|
8595
|
-
onUpload:
|
|
8598
|
+
onUpload: re
|
|
8596
8599
|
}, null, 8, [
|
|
8597
8600
|
"model-value",
|
|
8598
8601
|
"placeholder",
|
|
@@ -8607,50 +8610,50 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8607
8610
|
onSendMessage: O,
|
|
8608
8611
|
onStopSending: j
|
|
8609
8612
|
}, {
|
|
8610
|
-
default:
|
|
8613
|
+
default: U(() => {
|
|
8611
8614
|
var n;
|
|
8612
8615
|
return [
|
|
8613
8616
|
e.supportUpload ? (k(), o(Kf, {
|
|
8614
8617
|
key: 0,
|
|
8615
8618
|
accept: e.accept,
|
|
8616
8619
|
"tippy-options": e.tippyOptions,
|
|
8617
|
-
onUpload:
|
|
8620
|
+
onUpload: re
|
|
8618
8621
|
}, null, 8, ["accept", "tippy-options"])) : s("", !0),
|
|
8619
8622
|
e.supportUpload && ((n = e.shortcuts) != null && n.length || y.value) ? (k(), c("span", Dm)) : s("", !0),
|
|
8620
|
-
|
|
8623
|
+
P(t.$slots, "attachment", {}, () => [e.shortcuts && !y.value ? (k(), o(Ri, {
|
|
8621
8624
|
key: 0,
|
|
8622
8625
|
shortcuts: e.shortcuts,
|
|
8623
|
-
onSelectShortcut:
|
|
8626
|
+
onSelectShortcut: F
|
|
8624
8627
|
}, null, 8, ["shortcuts"])) : s("", !0), y.value ? (k(), o(ji, {
|
|
8625
8628
|
key: 1,
|
|
8626
8629
|
class: "selected-shortcut-btn",
|
|
8627
8630
|
shortcut: y.value
|
|
8628
8631
|
}, {
|
|
8629
|
-
append:
|
|
8632
|
+
append: U(() => [f(z(ii), { onClick: te })]),
|
|
8630
8633
|
_: 1
|
|
8631
8634
|
}, 8, ["shortcut"])) : s("", !0)])
|
|
8632
8635
|
];
|
|
8633
8636
|
}),
|
|
8634
|
-
"before-send":
|
|
8637
|
+
"before-send": U(() => [P(t.$slots, "model-selector", C(h({
|
|
8635
8638
|
models: e.models,
|
|
8636
8639
|
selectedModel: d.value
|
|
8637
8640
|
})), () => {
|
|
8638
8641
|
var t;
|
|
8639
|
-
return [(t = e.models) != null && t.length ? (k(), o(
|
|
8642
|
+
return [(t = e.models) != null && t.length ? (k(), o(z(Em), {
|
|
8640
8643
|
key: 0,
|
|
8641
8644
|
modelValue: d.value,
|
|
8642
8645
|
"onUpdate:modelValue": n[0] || (n[0] = (e) => d.value = e),
|
|
8643
8646
|
class: "chat-input-model-selector",
|
|
8644
8647
|
models: e.models,
|
|
8645
8648
|
"tippy-options": e.tippyOptions,
|
|
8646
|
-
onChange:
|
|
8649
|
+
onChange: L
|
|
8647
8650
|
}, null, 8, [
|
|
8648
8651
|
"modelValue",
|
|
8649
8652
|
"models",
|
|
8650
8653
|
"tippy-options"
|
|
8651
8654
|
])) : s("", !0)];
|
|
8652
8655
|
})]),
|
|
8653
|
-
"send-icon":
|
|
8656
|
+
"send-icon": U(() => [P(t.$slots, "send-icon")]),
|
|
8654
8657
|
_: 3
|
|
8655
8658
|
}, 8, [
|
|
8656
8659
|
"message-state",
|
|
@@ -8664,7 +8667,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8664
8667
|
__name: "input-info-alert",
|
|
8665
8668
|
props: { content: {} },
|
|
8666
8669
|
setup(e) {
|
|
8667
|
-
return (t, n) => (k(), c("div", km, [f(
|
|
8670
|
+
return (t, n) => (k(), c("div", km, [f(z(Kr), { class: "ai-chat-input-info-alert__icon" }), l("span", Am, L(e.content), 1)]));
|
|
8668
8671
|
}
|
|
8669
8672
|
}), Mm = { class: "ai-artifact-file-card-info" }, Nm = { class: "ai-artifact-file-card-name" }, Pm = /* @__PURE__ */ m({
|
|
8670
8673
|
__name: "artifact-file-card",
|
|
@@ -8676,7 +8679,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8676
8679
|
variant: {}
|
|
8677
8680
|
},
|
|
8678
8681
|
setup(e) {
|
|
8679
|
-
let t = e, n = ta(), r = Va(), u = a(() => !!t.onPreview || !!n), p = a(() => !!t.onDownload || !!(n != null && n.canResolveArtifactUrl.value)), m = a(() => i(Nn)), h =
|
|
8682
|
+
let t = e, n = ta(), r = Va(), u = a(() => !!t.onPreview || !!n), p = a(() => !!t.onDownload || !!(n != null && n.canResolveArtifactUrl.value)), m = a(() => i(Nn)), h = I(!1), g = a(() => G(G({}, r == null ? void 0 : r.value), {}, {
|
|
8680
8683
|
content: K("下载"),
|
|
8681
8684
|
theme: "ai-chat-box",
|
|
8682
8685
|
placement: "top"
|
|
@@ -8719,19 +8722,19 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8719
8722
|
class: "ai-artifact-file-card-icon",
|
|
8720
8723
|
"file-name": e.file.name,
|
|
8721
8724
|
"file-type": e.file.type
|
|
8722
|
-
}, null, 8, ["file-name", "file-type"]),
|
|
8725
|
+
}, null, 8, ["file-name", "file-type"]), W((k(), c("span", Nm, [d(L(e.file.name), 1)])), [[z(Ka), G(G({}, z(r)), {}, {
|
|
8723
8726
|
text: e.file.name,
|
|
8724
8727
|
placement: "top"
|
|
8725
|
-
})]])]), p.value ?
|
|
8728
|
+
})]])]), p.value ? W((k(), c("div", {
|
|
8726
8729
|
key: 0,
|
|
8727
8730
|
class: S(["ai-artifact-file-card-download", { "is-loading": h.value }]),
|
|
8728
|
-
onClick:
|
|
8729
|
-
}, [h.value ? (k(), o(
|
|
8731
|
+
onClick: le(v, ["stop"])
|
|
8732
|
+
}, [h.value ? (k(), o(z(he), {
|
|
8730
8733
|
key: 0,
|
|
8731
8734
|
mode: "spin",
|
|
8732
8735
|
size: "mini",
|
|
8733
8736
|
theme: "primary"
|
|
8734
|
-
})) : (k(), o(
|
|
8737
|
+
})) : (k(), o(F(m.value), { key: 1 }))], 2)), [[z(Ce), g.value]]) : s("", !0)], 2));
|
|
8735
8738
|
}
|
|
8736
8739
|
}), Fm = ["class", "style"], Im = { class: "ai-message-loading-row" }, Lm = { class: "ai-message-loading-icon-wrap" }, Rm = {
|
|
8737
8740
|
key: 0,
|
|
@@ -8753,7 +8756,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8753
8756
|
text: { default: "加载中..." }
|
|
8754
8757
|
},
|
|
8755
8758
|
setup(t) {
|
|
8756
|
-
let n = t, r =
|
|
8759
|
+
let n = t, r = re(), i = a(() => {
|
|
8757
8760
|
let { class: e, style: t } = r;
|
|
8758
8761
|
return Bi(r, Fm);
|
|
8759
8762
|
}), o = a(() => ({
|
|
@@ -8769,16 +8772,16 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8769
8772
|
return e && typeof e == "object" && !Array.isArray(e) ? G(G({}, t), e) : t;
|
|
8770
8773
|
});
|
|
8771
8774
|
return (t, n) => (k(), c("div", b({
|
|
8772
|
-
class: ["ai-message-loading",
|
|
8775
|
+
class: ["ai-message-loading", z(r).class],
|
|
8773
8776
|
style: u.value
|
|
8774
|
-
}, i.value), [l("div", Im, [l("span", Lm, [
|
|
8777
|
+
}, i.value), [l("div", Im, [l("span", Lm, [P(t.$slots, "icon", {}, () => [f(z(pn), {
|
|
8775
8778
|
class: "ai-message-loading-icon-svg",
|
|
8776
8779
|
style: w(o.value)
|
|
8777
|
-
}, null, 8, ["style"])])]), t.$slots.text ? (k(), c("span", Rm, [
|
|
8780
|
+
}, null, 8, ["style"])])]), t.$slots.text ? (k(), c("span", Rm, [P(t.$slots, "text")])) : (k(), c("span", zm, [(k(!0), c(e, null, N(s.value, (e, t) => (k(), c("span", {
|
|
8778
8781
|
key: `${t}-${e}`,
|
|
8779
8782
|
class: "ai-message-loading-char",
|
|
8780
8783
|
style: w({ "--char-index": t })
|
|
8781
|
-
},
|
|
8784
|
+
}, L(e), 5))), 128))]))])], 16));
|
|
8782
8785
|
}
|
|
8783
8786
|
})), Vm = { class: "ai-artifact-code-preview" }, Hm = ["innerHTML"], Um = 3e5, Wm = /* @__PURE__ */ m({
|
|
8784
8787
|
__name: "code-preview",
|
|
@@ -8845,14 +8848,14 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8845
8848
|
setup(e) {
|
|
8846
8849
|
return (t, n) => (k(), c("div", Xm, [f(od, {
|
|
8847
8850
|
content: e.content,
|
|
8848
|
-
status:
|
|
8851
|
+
status: z(Y).Success
|
|
8849
8852
|
}, null, 8, ["content", "status"])]));
|
|
8850
8853
|
}
|
|
8851
8854
|
}), Qm = { class: "ai-artifact-txt-preview" }, $m = /* @__PURE__ */ m({
|
|
8852
8855
|
__name: "txt-preview",
|
|
8853
8856
|
props: { content: {} },
|
|
8854
8857
|
setup(e) {
|
|
8855
|
-
return (t, n) => (k(), c("pre", Qm,
|
|
8858
|
+
return (t, n) => (k(), c("pre", Qm, L(e.content), 1));
|
|
8856
8859
|
}
|
|
8857
8860
|
}), eh = ["src"], th = /* @__PURE__ */ m({
|
|
8858
8861
|
__name: "url-iframe-preview",
|
|
@@ -8889,7 +8892,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8889
8892
|
renderer: "txt"
|
|
8890
8893
|
}
|
|
8891
8894
|
}, rh = (e, t) => nh[tt(e, t)], ih = (e) => {
|
|
8892
|
-
let t =
|
|
8895
|
+
let t = I("idle"), n = I(""), r = I(""), i = I(""), a = I("urlIframe"), o, s = 0, c = () => {
|
|
8893
8896
|
n.value = "", r.value = "", i.value = "";
|
|
8894
8897
|
}, l = function() {
|
|
8895
8898
|
var l = Z(function* () {
|
|
@@ -8977,7 +8980,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8977
8980
|
var e, t;
|
|
8978
8981
|
return et((e = n.file) == null ? void 0 : e.type, (t = n.file) == null ? void 0 : t.name);
|
|
8979
8982
|
});
|
|
8980
|
-
return
|
|
8983
|
+
return H(() => n.file ? `${n.file.outputId}:${n.file.type}` : "", () => {
|
|
8981
8984
|
u();
|
|
8982
8985
|
}, { immediate: !0 }), t({
|
|
8983
8986
|
content: i,
|
|
@@ -8985,34 +8988,34 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
8985
8988
|
status: h
|
|
8986
8989
|
}), (t, n) => {
|
|
8987
8990
|
var r;
|
|
8988
|
-
return k(), c("div", ah, [
|
|
8991
|
+
return k(), c("div", ah, [z(h) === "loading" ? (k(), c("div", oh, [f(Bm)])) : z(h) === "error" ? (k(), c("div", sh, [l("span", null, L(z(K)("预览加载失败")), 1), f(z(ue), {
|
|
8989
8992
|
size: "small",
|
|
8990
8993
|
text: "",
|
|
8991
8994
|
theme: "primary",
|
|
8992
|
-
onClick: n[0] || (n[0] = () =>
|
|
8995
|
+
onClick: n[0] || (n[0] = () => z(u)())
|
|
8993
8996
|
}, {
|
|
8994
|
-
default:
|
|
8997
|
+
default: U(() => [d(L(z(K)("重试")), 1)]),
|
|
8995
8998
|
_: 1
|
|
8996
|
-
})])) :
|
|
8999
|
+
})])) : z(h) === "empty" || !e.file ? (k(), c("div", ch, L(z(K)("暂无可预览的文件")), 1)) : z(m) === "html" ? (k(), o(Km, {
|
|
8997
9000
|
key: 3,
|
|
8998
|
-
content:
|
|
8999
|
-
}, null, 8, ["content"])) :
|
|
9001
|
+
content: z(i)
|
|
9002
|
+
}, null, 8, ["content"])) : z(m) === "code" ? (k(), o(Wm, {
|
|
9000
9003
|
key: 4,
|
|
9001
|
-
content:
|
|
9004
|
+
content: z(i),
|
|
9002
9005
|
extension: g.value
|
|
9003
|
-
}, null, 8, ["content", "extension"])) :
|
|
9006
|
+
}, null, 8, ["content", "extension"])) : z(m) === "txt" ? (k(), o($m, {
|
|
9004
9007
|
key: 5,
|
|
9005
|
-
content:
|
|
9006
|
-
}, null, 8, ["content"])) :
|
|
9008
|
+
content: z(i)
|
|
9009
|
+
}, null, 8, ["content"])) : z(m) === "markdown" ? (k(), o(Zm, {
|
|
9007
9010
|
key: 6,
|
|
9008
|
-
content:
|
|
9009
|
-
}, null, 8, ["content"])) :
|
|
9011
|
+
content: z(i)
|
|
9012
|
+
}, null, 8, ["content"])) : z(m) === "image" ? (k(), o(Ym, {
|
|
9010
9013
|
key: 7,
|
|
9011
9014
|
name: (r = e.file) == null ? void 0 : r.name,
|
|
9012
|
-
url:
|
|
9015
|
+
url: z(s)
|
|
9013
9016
|
}, null, 8, ["name", "url"])) : (k(), o(th, {
|
|
9014
9017
|
key: 8,
|
|
9015
|
-
url:
|
|
9018
|
+
url: z(p)
|
|
9016
9019
|
}, null, 8, ["url"]))]);
|
|
9017
9020
|
};
|
|
9018
9021
|
}
|
|
@@ -9041,7 +9044,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9041
9044
|
"html",
|
|
9042
9045
|
"markdown",
|
|
9043
9046
|
"text"
|
|
9044
|
-
]), u = t, p = n, m = ta(), h = a(() => !!(m != null && m.canResolveArtifactUrl.value)), { copy: g } = ia(), _ = Va(), v =
|
|
9047
|
+
]), u = t, p = n, m = ta(), h = a(() => !!(m != null && m.canResolveArtifactUrl.value)), { copy: g } = ia(), _ = Va(), v = B("previewHostRef"), y = () => i(Nn), b = () => i(ci), x = I(""), C = I(!1), w = a(() => G(G({}, _ == null ? void 0 : _.value), {}, {
|
|
9045
9048
|
content: K("复制"),
|
|
9046
9049
|
placement: "top",
|
|
9047
9050
|
theme: "ai-chat-box"
|
|
@@ -9065,7 +9068,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9065
9068
|
if (!A.value) return;
|
|
9066
9069
|
let t = (e = v.value) == null ? void 0 : e.content;
|
|
9067
9070
|
t && g(t);
|
|
9068
|
-
},
|
|
9071
|
+
}, M = function() {
|
|
9069
9072
|
var e = Z(function* (e) {
|
|
9070
9073
|
if (!(C.value || !(m != null && m.canResolveArtifactUrl.value))) {
|
|
9071
9074
|
C.value = !0;
|
|
@@ -9081,21 +9084,21 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9081
9084
|
return e.apply(this, arguments);
|
|
9082
9085
|
};
|
|
9083
9086
|
}();
|
|
9084
|
-
return
|
|
9087
|
+
return H(() => {
|
|
9085
9088
|
var e;
|
|
9086
9089
|
return (e = D.value) == null ? void 0 : e.outputId;
|
|
9087
9090
|
}, () => {
|
|
9088
9091
|
C.value = !1;
|
|
9089
9092
|
}), (n, r) => t.artifacts.length ? (k(), c("div", fh, [l("div", ph, [
|
|
9090
|
-
l("p", mh,
|
|
9091
|
-
f(
|
|
9093
|
+
l("p", mh, L(z(K)("文件列表")) + "(" + L(t.artifacts.length) + ")", 1),
|
|
9094
|
+
f(z(me), {
|
|
9092
9095
|
modelValue: x.value,
|
|
9093
9096
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => x.value = e),
|
|
9094
9097
|
class: "ai-file-artifact-panel-list-search",
|
|
9095
9098
|
clearable: "",
|
|
9096
|
-
placeholder:
|
|
9099
|
+
placeholder: z(K)("搜索文件关键字")
|
|
9097
9100
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
9098
|
-
l("div", hh, [E.value.length ? (k(!0), c(e, { key: 0 },
|
|
9101
|
+
l("div", hh, [E.value.length ? (k(!0), c(e, { key: 0 }, N(E.value, (e) => (k(), o(Pm, {
|
|
9099
9102
|
key: e.outputId,
|
|
9100
9103
|
active: e.outputId === t.activeId,
|
|
9101
9104
|
file: e,
|
|
@@ -9105,42 +9108,42 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9105
9108
|
"active",
|
|
9106
9109
|
"file",
|
|
9107
9110
|
"on-preview"
|
|
9108
|
-
]))), 128)) : (k(), c("div", gh,
|
|
9111
|
+
]))), 128)) : (k(), c("div", gh, L(z(K)("搜索结果为空")), 1))])
|
|
9109
9112
|
]), l("div", _h, [D.value ? (k(), c("div", vh, [l("div", yh, [f(yp, {
|
|
9110
9113
|
class: "ai-file-artifact-panel-preview-header-icon",
|
|
9111
9114
|
"file-name": D.value.name,
|
|
9112
9115
|
"file-type": D.value.type
|
|
9113
|
-
}, null, 8, ["file-name", "file-type"]),
|
|
9116
|
+
}, null, 8, ["file-name", "file-type"]), W((k(), c("span", bh, [d(L(D.value.name), 1)])), [[z(Ka), G(G({}, z(_)), {}, {
|
|
9114
9117
|
text: D.value.name,
|
|
9115
9118
|
placement: "top"
|
|
9116
|
-
})]])]), l("div", xh, [O.value ?
|
|
9119
|
+
})]])]), l("div", xh, [O.value ? W((k(), c("span", {
|
|
9117
9120
|
key: 0,
|
|
9118
9121
|
class: S(["ai-file-artifact-panel-preview-header-action", { "is-disabled": !A.value }]),
|
|
9119
9122
|
onClick: j
|
|
9120
|
-
}, [(k(), o(
|
|
9123
|
+
}, [(k(), o(F(b())))], 2)), [[z(Ce), w.value]]) : s("", !0), h.value ? W((k(), c("span", {
|
|
9121
9124
|
key: 1,
|
|
9122
9125
|
class: S(["ai-file-artifact-panel-preview-header-action", { "is-loading": C.value }]),
|
|
9123
|
-
onClick: r[1] || (r[1] = (e) =>
|
|
9124
|
-
}, [C.value ? (k(), o(
|
|
9126
|
+
onClick: r[1] || (r[1] = (e) => M(D.value))
|
|
9127
|
+
}, [C.value ? (k(), o(z(he), {
|
|
9125
9128
|
key: 0,
|
|
9126
9129
|
mode: "spin",
|
|
9127
9130
|
size: "mini",
|
|
9128
9131
|
theme: "primary"
|
|
9129
|
-
})) : (k(), o(
|
|
9132
|
+
})) : (k(), o(F(y()), { key: 1 }))], 2)), [[z(Ce), T.value]]) : s("", !0)])])) : s("", !0), l("div", Sh, [f(lh, {
|
|
9130
9133
|
ref_key: "previewHostRef",
|
|
9131
9134
|
ref: v,
|
|
9132
9135
|
file: D.value
|
|
9133
|
-
}, null, 8, ["file"])])])])) : (k(), c("div", uh, [f(
|
|
9136
|
+
}, null, 8, ["file"])])])])) : (k(), c("div", uh, [f(z(fe), {
|
|
9134
9137
|
class: "ai-file-artifact-panel-empty-exception",
|
|
9135
9138
|
scene: "part",
|
|
9136
9139
|
type: "empty"
|
|
9137
|
-
}), l("div", dh,
|
|
9140
|
+
}), l("div", dh, L(z(K)("暂无数据")), 1)]));
|
|
9138
9141
|
}
|
|
9139
9142
|
}), wh = "others", Th = (e) => e < 26 ? String.fromCharCode(65 + e) : String(e + 1), Eh = (e) => {
|
|
9140
9143
|
let t = a(() => {
|
|
9141
9144
|
var t, n;
|
|
9142
9145
|
return (t = (n = e()) == null || (n = n.metadata) == null ? void 0 : n.questions) == null ? [] : t;
|
|
9143
|
-
}), n =
|
|
9146
|
+
}), n = I({}), r = I(0), i = a(() => t.value.length), o = a(() => t.value.reduce((e, t, r) => e + +!!n.value[r], 0)), s = a(() => i.value > 0 && o.value === i.value), c = a(() => r.value > 0), l = a(() => r.value < i.value - 1), u = (e) => n.value[e], d = () => {
|
|
9144
9147
|
c.value && --r.value;
|
|
9145
9148
|
}, f = () => {
|
|
9146
9149
|
l.value && (r.value += 1);
|
|
@@ -9199,17 +9202,17 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9199
9202
|
},
|
|
9200
9203
|
setup(t) {
|
|
9201
9204
|
let n = t, r = a(() => n.status === "cancelled" ? K("已取消") : K("已回复"));
|
|
9202
|
-
return (n, i) => (k(), c("section", Oh, [l("header", kh, [l("div", Ah, [f(
|
|
9205
|
+
return (n, i) => (k(), c("section", Oh, [l("header", kh, [l("div", Ah, [f(z(Gr), { class: "ai-user-question-answered__help-icon" }), l("span", jh, L(z(K)("回答内容")), 1)]), l("span", Mh, L(r.value), 1)]), l("div", Nh, [(k(!0), c(e, null, N(t.answers, (r, i) => (k(), c("div", {
|
|
9203
9206
|
key: i,
|
|
9204
9207
|
class: "ai-user-question-answered__item"
|
|
9205
|
-
}, [l("div", Ph, [l("span", Fh,
|
|
9208
|
+
}, [l("div", Ph, [l("span", Fh, L(i + 1) + ". " + L(r.question), 1), r.multiSelect === void 0 ? s("", !0) : (k(), c("span", Ih, L(r.multiSelect ? z(K)("多选") : z(K)("单选")), 1))]), P(n.$slots, "answer", b({ ref_for: !0 }, {
|
|
9206
9209
|
item: r,
|
|
9207
9210
|
index: i,
|
|
9208
9211
|
status: t.status
|
|
9209
|
-
}), () => [(k(!0), c(e, null,
|
|
9212
|
+
}), () => [(k(!0), c(e, null, N(r.answer, (e, t) => (k(), c("p", {
|
|
9210
9213
|
key: t,
|
|
9211
9214
|
class: "ai-user-question-answered__answer"
|
|
9212
|
-
},
|
|
9215
|
+
}, L(e.description || e.label), 1))), 128))])]))), 128))])]));
|
|
9213
9216
|
}
|
|
9214
9217
|
}), Rh = { class: "ai-user-question-option__badge" }, zh = ["placeholder", "value"], Bh = {
|
|
9215
9218
|
key: 1,
|
|
@@ -9241,23 +9244,23 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9241
9244
|
"ai-user-question-option--others": e.option.isOthers
|
|
9242
9245
|
}]),
|
|
9243
9246
|
onClick: i
|
|
9244
|
-
}, [l("span", Rh,
|
|
9247
|
+
}, [l("span", Rh, L(e.option.letter), 1), e.option.isOthers ? (k(), c("input", {
|
|
9245
9248
|
key: 0,
|
|
9246
9249
|
class: "ai-user-question-option__input",
|
|
9247
|
-
placeholder:
|
|
9250
|
+
placeholder: z(K)("请输入..."),
|
|
9248
9251
|
value: e.othersText,
|
|
9249
|
-
onClick: n[0] || (n[0] =
|
|
9252
|
+
onClick: n[0] || (n[0] = le(() => {}, ["stop"])),
|
|
9250
9253
|
onFocus: a,
|
|
9251
9254
|
onInput: o,
|
|
9252
|
-
onKeydown: n[1] || (n[1] = le(
|
|
9253
|
-
}, null, 40, zh)) : (k(), c("span", Bh,
|
|
9255
|
+
onKeydown: n[1] || (n[1] = ce(le((e) => r("confirm"), ["stop"]), ["enter"]))
|
|
9256
|
+
}, null, 40, zh)) : (k(), c("span", Bh, L(e.option.description), 1))], 2));
|
|
9254
9257
|
}
|
|
9255
9258
|
}), Hh = { class: "ai-user-question-choice" }, Uh = /* @__PURE__ */ m({
|
|
9256
9259
|
__name: "user-question-choice",
|
|
9257
9260
|
props: { question: {} },
|
|
9258
9261
|
emits: ["answer", "confirm"],
|
|
9259
9262
|
setup(t, { emit: n }) {
|
|
9260
|
-
let r = t, i = n, s =
|
|
9263
|
+
let r = t, i = n, s = I([]), l = I(""), u = a(() => {
|
|
9261
9264
|
var e;
|
|
9262
9265
|
let t = ((e = r.question.options) == null ? [] : e).filter((e) => e.label !== wh).map((e, t) => G(G({}, e), {}, {
|
|
9263
9266
|
isOthers: !1,
|
|
@@ -9289,9 +9292,9 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9289
9292
|
}, _ = (e) => {
|
|
9290
9293
|
l.value = e, h();
|
|
9291
9294
|
};
|
|
9292
|
-
return
|
|
9295
|
+
return H(() => r.question, () => {
|
|
9293
9296
|
s.value = [], l.value = "", h();
|
|
9294
|
-
}), (t, n) => (k(), c("div", Hh, [(k(!0), c(e, null,
|
|
9297
|
+
}), (t, n) => (k(), c("div", Hh, [(k(!0), c(e, null, N(u.value, (e, t) => (k(), o(Vh, {
|
|
9295
9298
|
key: t,
|
|
9296
9299
|
option: e,
|
|
9297
9300
|
"others-text": l.value,
|
|
@@ -9316,17 +9319,17 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9316
9319
|
onResume: { type: Function }
|
|
9317
9320
|
},
|
|
9318
9321
|
setup(t) {
|
|
9319
|
-
let n = t, r = Va(), i =
|
|
9322
|
+
let n = t, r = Va(), i = I(!1), { questions: u, answeredCount: p, totalCount: m, completed: h, currentIndex: g, canGoPrev: _, canGoNext: v, goPrev: y, goNext: x, getAnswer: C, setAnswer: T, buildResolvePayload: E, buildSkipPayload: D } = Eh(() => n.interrupt), O = a(() => {
|
|
9320
9323
|
var e;
|
|
9321
9324
|
return ((e = n.interrupt.metadata) == null || (e = e.questions) == null || (e = e[0]) == null ? void 0 : e.header) || n.interrupt.message || "";
|
|
9322
9325
|
}), A = () => {
|
|
9323
9326
|
i.value = !i.value;
|
|
9324
9327
|
}, ee = () => {
|
|
9325
9328
|
i.value && (i.value = !1);
|
|
9326
|
-
}, j =
|
|
9329
|
+
}, j = I(null), M = () => {
|
|
9327
9330
|
var e;
|
|
9328
9331
|
!h.value || j.value !== null || (j.value = "complete", (e = n.onResume) == null || e.call(n, E(), n.interrupt));
|
|
9329
|
-
},
|
|
9332
|
+
}, F = () => {
|
|
9330
9333
|
var e;
|
|
9331
9334
|
j.value === null && (j.value = "skip", (e = n.onResume) == null || e.call(n, D(), n.interrupt));
|
|
9332
9335
|
};
|
|
@@ -9334,77 +9337,77 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9334
9337
|
l("header", {
|
|
9335
9338
|
class: "ai-user-question-card__header",
|
|
9336
9339
|
onClick: ee
|
|
9337
|
-
}, [l("div", Wh, [f(
|
|
9340
|
+
}, [l("div", Wh, [f(z(Gr), { class: "ai-user-question-card__help-icon" }), W((k(), c("span", Gh, [d(L(O.value), 1)])), [[z(Ka), G({}, z(r))]])]), l("div", Kh, [
|
|
9338
9341
|
l("div", qh, [
|
|
9339
9342
|
l("button", {
|
|
9340
|
-
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !
|
|
9341
|
-
disabled: !
|
|
9343
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !z(_) }]),
|
|
9344
|
+
disabled: !z(_),
|
|
9342
9345
|
type: "button",
|
|
9343
|
-
onClick: n[0] || (n[0] =
|
|
9344
|
-
}, [f(
|
|
9345
|
-
l("span", Yh,
|
|
9346
|
+
onClick: n[0] || (n[0] = le((...e) => z(y) && z(y)(...e), ["stop"]))
|
|
9347
|
+
}, [f(z(jr), { class: "ai-user-question-card__nav-icon" })], 10, Jh),
|
|
9348
|
+
l("span", Yh, L(z(g) + 1) + " / " + L(z(m)), 1),
|
|
9346
9349
|
l("button", {
|
|
9347
|
-
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !
|
|
9348
|
-
disabled: !
|
|
9350
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !z(v) }]),
|
|
9351
|
+
disabled: !z(v),
|
|
9349
9352
|
type: "button",
|
|
9350
|
-
onClick: n[1] || (n[1] =
|
|
9351
|
-
}, [f(
|
|
9353
|
+
onClick: n[1] || (n[1] = le((...e) => z(x) && z(x)(...e), ["stop"]))
|
|
9354
|
+
}, [f(z(Mr), { class: "ai-user-question-card__nav-icon" })], 10, Xh)
|
|
9352
9355
|
]),
|
|
9353
9356
|
n[2] || (n[2] = l("span", { class: "ai-user-question-card__divider" }, null, -1)),
|
|
9354
9357
|
l("button", {
|
|
9355
9358
|
class: "ai-user-question-card__collapse-btn",
|
|
9356
9359
|
type: "button",
|
|
9357
|
-
onClick:
|
|
9358
|
-
}, [f(
|
|
9360
|
+
onClick: le(A, ["stop"])
|
|
9361
|
+
}, [f(z(jr), {
|
|
9359
9362
|
class: "ai-user-question-card__arrow",
|
|
9360
9363
|
style: w({ transform: i.value ? "rotate(180deg)" : "rotate(-90deg)" })
|
|
9361
9364
|
}, null, 8, ["style"])])
|
|
9362
9365
|
])]),
|
|
9363
|
-
|
|
9366
|
+
W(l("div", Zh, [(k(!0), c(e, null, N(z(u), (e, n) => W((k(), c("div", {
|
|
9364
9367
|
key: n,
|
|
9365
9368
|
class: "ai-user-question-card__question"
|
|
9366
|
-
}, [l("div", Qh, [l("span", $h,
|
|
9369
|
+
}, [l("div", Qh, [l("span", $h, L(n + 1) + ". " + L(e.question), 1), e.multiSelect === void 0 ? s("", !0) : (k(), c("span", eg, L(e.multiSelect ? z(K)("多选") : z(K)("单选")), 1))]), l("div", tg, [P(t.$slots, "question", b({ ref_for: !0 }, {
|
|
9367
9370
|
question: e,
|
|
9368
9371
|
qIndex: n,
|
|
9369
|
-
answer:
|
|
9370
|
-
setAnswer: (e) =>
|
|
9371
|
-
confirm:
|
|
9372
|
+
answer: z(C)(n),
|
|
9373
|
+
setAnswer: (e) => z(T)(n, e),
|
|
9374
|
+
confirm: M
|
|
9372
9375
|
}), () => [f(Uh, {
|
|
9373
9376
|
question: e,
|
|
9374
|
-
onAnswer: (e) =>
|
|
9375
|
-
onConfirm:
|
|
9376
|
-
}, null, 8, ["question", "onAnswer"])])])])), [[
|
|
9377
|
-
|
|
9378
|
-
d(
|
|
9379
|
-
l("span", ig,
|
|
9380
|
-
d(" " +
|
|
9381
|
-
]), l("div", ag, [f(
|
|
9377
|
+
onAnswer: (e) => z(T)(n, e),
|
|
9378
|
+
onConfirm: M
|
|
9379
|
+
}, null, 8, ["question", "onAnswer"])])])])), [[V, n === z(g)]])), 128))], 512), [[V, !i.value]]),
|
|
9380
|
+
W(l("footer", ng, [l("span", rg, [
|
|
9381
|
+
d(L(z(K)("已完成")) + " ", 1),
|
|
9382
|
+
l("span", ig, L(z(p)), 1),
|
|
9383
|
+
d(" " + L(z(K)("题")), 1)
|
|
9384
|
+
]), l("div", ag, [f(z(ue), {
|
|
9382
9385
|
class: "ai-user-question-card__skip",
|
|
9383
9386
|
disabled: j.value === "complete",
|
|
9384
9387
|
loading: j.value === "skip",
|
|
9385
9388
|
size: "small",
|
|
9386
9389
|
text: "",
|
|
9387
|
-
onClick:
|
|
9390
|
+
onClick: F
|
|
9388
9391
|
}, {
|
|
9389
|
-
default:
|
|
9392
|
+
default: U(() => [j.value === "skip" ? s("", !0) : (k(), o(z(Jr), {
|
|
9390
9393
|
key: 0,
|
|
9391
9394
|
class: "ai-user-question-card__skip-icon"
|
|
9392
|
-
})), d(" " +
|
|
9395
|
+
})), d(" " + L(z(K)("跳过")), 1)]),
|
|
9393
9396
|
_: 1
|
|
9394
|
-
}, 8, ["disabled", "loading"]), f(
|
|
9397
|
+
}, 8, ["disabled", "loading"]), f(z(ue), {
|
|
9395
9398
|
class: "ai-user-question-card__complete",
|
|
9396
|
-
disabled: !
|
|
9399
|
+
disabled: !z(h) || j.value === "skip",
|
|
9397
9400
|
loading: j.value === "complete",
|
|
9398
9401
|
size: "small",
|
|
9399
9402
|
theme: "primary",
|
|
9400
|
-
onClick:
|
|
9403
|
+
onClick: M
|
|
9401
9404
|
}, {
|
|
9402
|
-
default:
|
|
9405
|
+
default: U(() => [j.value === "complete" ? s("", !0) : (k(), o(z(qr), {
|
|
9403
9406
|
key: 0,
|
|
9404
9407
|
class: "ai-user-question-card__enter-icon"
|
|
9405
|
-
})), d(" " +
|
|
9408
|
+
})), d(" " + L(z(K)("完成")), 1)]),
|
|
9406
9409
|
_: 1
|
|
9407
|
-
}, 8, ["disabled", "loading"])])], 512), [[
|
|
9410
|
+
}, 8, ["disabled", "loading"])])], 512), [[V, !i.value]])
|
|
9408
9411
|
], 2));
|
|
9409
9412
|
}
|
|
9410
9413
|
}), sg = 864e5, cg = {
|
|
@@ -9459,7 +9462,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9459
9462
|
var e, r;
|
|
9460
9463
|
return (e = t.timezone) == null ? n == null || (r = n.timezone) == null ? void 0 : r.value : e;
|
|
9461
9464
|
}), i = a(() => mg(t.createdAt, r.value));
|
|
9462
|
-
return (e, t) => i.value ? (k(), c("span", hg,
|
|
9465
|
+
return (e, t) => i.value ? (k(), c("span", hg, L(i.value), 1)) : s("", !0);
|
|
9463
9466
|
}
|
|
9464
9467
|
}), _g = { class: "ai-delete-confirm" }, vg = { class: "ai-delete-confirm__title" }, yg = { class: "ai-delete-confirm__desc" }, bg = { class: "ai-delete-confirm__actions" }, xg = /* @__PURE__ */ m({
|
|
9465
9468
|
__name: "delete-tool",
|
|
@@ -9475,7 +9478,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9475
9478
|
},
|
|
9476
9479
|
emits: ["confirm", "cancel"],
|
|
9477
9480
|
setup(e, { emit: t }) {
|
|
9478
|
-
let n = e, r = t, i =
|
|
9481
|
+
let n = e, r = t, i = B("tippyRef"), s = a(() => ({
|
|
9479
9482
|
id: n.id,
|
|
9480
9483
|
name: n.name,
|
|
9481
9484
|
description: n.description,
|
|
@@ -9500,29 +9503,29 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9500
9503
|
};
|
|
9501
9504
|
return O(() => {
|
|
9502
9505
|
p();
|
|
9503
|
-
}), (e, t) => (k(), o(
|
|
9506
|
+
}), (e, t) => (k(), o(z(Se), b({
|
|
9504
9507
|
ref_key: "tippyRef",
|
|
9505
9508
|
ref: i
|
|
9506
9509
|
}, c.value, { onShow: u }), {
|
|
9507
|
-
content:
|
|
9508
|
-
l("div", vg,
|
|
9509
|
-
l("div", yg,
|
|
9510
|
-
l("div", bg, [f(
|
|
9510
|
+
content: U(() => [l("div", _g, [
|
|
9511
|
+
l("div", vg, L(z(K)("确认删除该回答?")), 1),
|
|
9512
|
+
l("div", yg, L(z(K)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
9513
|
+
l("div", bg, [f(z(ue), {
|
|
9511
9514
|
size: "small",
|
|
9512
9515
|
theme: "danger",
|
|
9513
9516
|
onClick: m
|
|
9514
9517
|
}, {
|
|
9515
|
-
default:
|
|
9518
|
+
default: U(() => [d(L(z(K)("删除")), 1)]),
|
|
9516
9519
|
_: 1
|
|
9517
|
-
}), f(
|
|
9520
|
+
}), f(z(ue), {
|
|
9518
9521
|
size: "small",
|
|
9519
9522
|
onClick: g
|
|
9520
9523
|
}, {
|
|
9521
|
-
default:
|
|
9524
|
+
default: U(() => [d(L(z(K)("取消")), 1)]),
|
|
9522
9525
|
_: 1
|
|
9523
9526
|
})])
|
|
9524
9527
|
])]),
|
|
9525
|
-
default:
|
|
9528
|
+
default: U(() => [f(Ja, C(h(s.value)), null, 16)]),
|
|
9526
9529
|
_: 1
|
|
9527
9530
|
}, 16));
|
|
9528
9531
|
}
|
|
@@ -9535,7 +9538,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9535
9538
|
},
|
|
9536
9539
|
emits: ["submit", "cancel"],
|
|
9537
9540
|
setup(t, { emit: n }) {
|
|
9538
|
-
let r = n, i =
|
|
9541
|
+
let r = n, i = I(""), a = I([]), o = (e) => {
|
|
9539
9542
|
a.value.includes(e) ? a.value = a.value.filter((t) => t !== e) : a.value = [...a.value, e];
|
|
9540
9543
|
}, s = () => {
|
|
9541
9544
|
r("submit", a.value, i.value);
|
|
@@ -9544,40 +9547,40 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9544
9547
|
};
|
|
9545
9548
|
return (n, r) => (k(), c("div", {
|
|
9546
9549
|
class: "ai-user-feedback",
|
|
9547
|
-
onMouseenter: r[1] || (r[1] =
|
|
9550
|
+
onMouseenter: r[1] || (r[1] = le(() => {}, ["stop", "prevent"]))
|
|
9548
9551
|
}, [
|
|
9549
|
-
l("div", Sg,
|
|
9550
|
-
l("div", Cg, [t.loading ? (k(), c(e, { key: 0 },
|
|
9552
|
+
l("div", Sg, L(t.title), 1),
|
|
9553
|
+
l("div", Cg, [t.loading ? (k(), c(e, { key: 0 }, N(8, (e) => l("div", {
|
|
9551
9554
|
key: e,
|
|
9552
9555
|
class: "reason-item ai-skeleton-element"
|
|
9553
|
-
})), 64)) : (k(!0), c(e, { key: 1 },
|
|
9556
|
+
})), 64)) : (k(!0), c(e, { key: 1 }, N(t.reasonList, (e) => (k(), c("div", {
|
|
9554
9557
|
key: e,
|
|
9555
9558
|
class: S(["reason-item", { "is-active": a.value.includes(e) }]),
|
|
9556
9559
|
onClick: (t) => o(e)
|
|
9557
|
-
},
|
|
9558
|
-
l("div", Tg, [f(
|
|
9560
|
+
}, L(e), 11, wg))), 128))]),
|
|
9561
|
+
l("div", Tg, [f(z(me), {
|
|
9559
9562
|
modelValue: i.value,
|
|
9560
9563
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => i.value = e),
|
|
9561
|
-
placeholder:
|
|
9564
|
+
placeholder: z(K)("说出您的想法"),
|
|
9562
9565
|
rows: 3,
|
|
9563
9566
|
type: "textarea"
|
|
9564
9567
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
9565
|
-
l("div", Eg, [f(
|
|
9568
|
+
l("div", Eg, [f(z(ue), {
|
|
9566
9569
|
class: "custom-btn",
|
|
9567
9570
|
disabled: !i.value && a.value.length === 0,
|
|
9568
9571
|
size: "small",
|
|
9569
9572
|
theme: "primary",
|
|
9570
9573
|
onClick: s
|
|
9571
9574
|
}, {
|
|
9572
|
-
default:
|
|
9575
|
+
default: U(() => [d(L(z(K)("提交")), 1)]),
|
|
9573
9576
|
_: 1
|
|
9574
|
-
}, 8, ["disabled"]), f(
|
|
9577
|
+
}, 8, ["disabled"]), f(z(ue), {
|
|
9575
9578
|
class: "custom-btn",
|
|
9576
9579
|
size: "small",
|
|
9577
9580
|
width: "80px",
|
|
9578
9581
|
onClick: u
|
|
9579
9582
|
}, {
|
|
9580
|
-
default:
|
|
9583
|
+
default: U(() => [d(L(z(K)("取消")), 1)]),
|
|
9581
9584
|
_: 1
|
|
9582
9585
|
})])
|
|
9583
9586
|
], 32));
|
|
@@ -9612,7 +9615,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9612
9615
|
},
|
|
9613
9616
|
emits: ["feedback"],
|
|
9614
9617
|
setup(t, { emit: n }) {
|
|
9615
|
-
let r = t, i = n, u =
|
|
9618
|
+
let r = t, i = n, u = B("feedbackTippyRef"), d = I(!1), p = I([]), m = I(null), h = a(() => G({
|
|
9616
9619
|
arrow: !1,
|
|
9617
9620
|
interactive: !0,
|
|
9618
9621
|
offset: [0, 6],
|
|
@@ -9663,12 +9666,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9663
9666
|
return O(() => {
|
|
9664
9667
|
v(), p.value = [];
|
|
9665
9668
|
}), (n, r) => (k(), c("div", Og, [
|
|
9666
|
-
n.$slots.prepend ? (k(), c("div", kg, [
|
|
9667
|
-
l("div", Ag, [(k(!0), c(e, null,
|
|
9669
|
+
n.$slots.prepend ? (k(), c("div", kg, [P(n.$slots, "prepend")])) : s("", !0),
|
|
9670
|
+
l("div", Ag, [(k(!0), c(e, null, N(t.messageTools, (n) => (k(), c(e, { key: n.id }, [n.id === "delete" ? (k(), o(xg, b({
|
|
9668
9671
|
key: 0,
|
|
9669
9672
|
ref_for: !0
|
|
9670
9673
|
}, n, {
|
|
9671
|
-
disabled: t.messageToolsStatus ===
|
|
9674
|
+
disabled: t.messageToolsStatus === z(Uf).Disabled,
|
|
9672
9675
|
"tippy-options": t.tippyOptions,
|
|
9673
9676
|
onConfirm: (e) => _(n)
|
|
9674
9677
|
}), null, 16, [
|
|
@@ -9679,7 +9682,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9679
9682
|
key: 1,
|
|
9680
9683
|
ref_for: !0
|
|
9681
9684
|
}, n, {
|
|
9682
|
-
disabled: t.messageToolsStatus ===
|
|
9685
|
+
disabled: t.messageToolsStatus === z(Uf).Disabled,
|
|
9683
9686
|
"tippy-options": t.tippyOptions,
|
|
9684
9687
|
onClick: (e) => g(n)
|
|
9685
9688
|
}), null, 16, [
|
|
@@ -9688,16 +9691,16 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9688
9691
|
"onClick"
|
|
9689
9692
|
]))], 64))), 128))]),
|
|
9690
9693
|
t.updateTools.length > 0 ? (k(), c("div", jg)) : s("", !0),
|
|
9691
|
-
t.updateTools.length > 0 ? (k(), c("div", Mg, [(k(!0), c(e, null,
|
|
9694
|
+
t.updateTools.length > 0 ? (k(), c("div", Mg, [(k(!0), c(e, null, N(t.updateTools, (n) => (k(), c(e, { key: n.id }, [n.id === "like" || n.id === "unlike" ? (k(), o(z(Se), b({
|
|
9692
9695
|
key: 0,
|
|
9693
9696
|
ref_for: !0,
|
|
9694
9697
|
ref_key: "feedbackTippyRef",
|
|
9695
9698
|
ref: u
|
|
9696
9699
|
}, { ref_for: !0 }, h.value, { onShow: (e) => C(n.id) }), {
|
|
9697
|
-
content:
|
|
9700
|
+
content: U(() => [f(Dg, {
|
|
9698
9701
|
loading: d.value,
|
|
9699
9702
|
"reason-list": p.value,
|
|
9700
|
-
title: n.id === "like" ?
|
|
9703
|
+
title: n.id === "like" ? z(K)("什么原因让你满意?") : z(K)("什么原因让你不满意?"),
|
|
9701
9704
|
onCancel: v,
|
|
9702
9705
|
onSubmit: (e, t) => S(n, e, t)
|
|
9703
9706
|
}, null, 8, [
|
|
@@ -9706,10 +9709,10 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9706
9709
|
"title",
|
|
9707
9710
|
"onSubmit"
|
|
9708
9711
|
])]),
|
|
9709
|
-
default:
|
|
9712
|
+
default: U(() => [f(Ja, b({ ref_for: !0 }, n, {
|
|
9710
9713
|
id: y(n.id),
|
|
9711
9714
|
active: m.value === n.id,
|
|
9712
|
-
disabled: t.messageToolsStatus ===
|
|
9715
|
+
disabled: t.messageToolsStatus === z(Uf).Disabled,
|
|
9713
9716
|
"tippy-options": G(G({}, t.tippyOptions), {}, { content: x(n.id) }),
|
|
9714
9717
|
onClick: (e) => g(n)
|
|
9715
9718
|
}), null, 16, [
|
|
@@ -9724,7 +9727,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9724
9727
|
key: 1,
|
|
9725
9728
|
ref_for: !0
|
|
9726
9729
|
}, n, {
|
|
9727
|
-
disabled: t.messageToolsStatus ===
|
|
9730
|
+
disabled: t.messageToolsStatus === z(Uf).Disabled,
|
|
9728
9731
|
"tippy-options": t.tippyOptions,
|
|
9729
9732
|
onConfirm: (e) => _(n)
|
|
9730
9733
|
}), null, 16, [
|
|
@@ -9735,7 +9738,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9735
9738
|
key: 2,
|
|
9736
9739
|
ref_for: !0
|
|
9737
9740
|
}, n, {
|
|
9738
|
-
disabled: t.messageToolsStatus ===
|
|
9741
|
+
disabled: t.messageToolsStatus === z(Uf).Disabled,
|
|
9739
9742
|
"tippy-options": t.tippyOptions,
|
|
9740
9743
|
onClick: (e) => g(n)
|
|
9741
9744
|
}), null, 16, [
|
|
@@ -9743,7 +9746,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9743
9746
|
"tippy-options",
|
|
9744
9747
|
"onClick"
|
|
9745
9748
|
]))], 64))), 128))])) : s("", !0),
|
|
9746
|
-
n.$slots.append ? (k(), c("div", Ng, [
|
|
9749
|
+
n.$slots.append ? (k(), c("div", Ng, [P(n.$slots, "append")])) : s("", !0)
|
|
9747
9750
|
], 512));
|
|
9748
9751
|
}
|
|
9749
9752
|
}), Fg = m({
|
|
@@ -9771,14 +9774,14 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9771
9774
|
}),
|
|
9772
9775
|
emits: ["update:collapsed"],
|
|
9773
9776
|
setup(e) {
|
|
9774
|
-
let t =
|
|
9777
|
+
let t = ie(e, "collapsed");
|
|
9775
9778
|
return (n, r) => (k(), c("div", Ig, [l("div", {
|
|
9776
9779
|
class: "ai-activity-message-title",
|
|
9777
9780
|
onClick: r[0] || (r[0] = (e) => t.value = !t.value)
|
|
9778
|
-
}, [
|
|
9781
|
+
}, [P(n.$slots, "title", C(h({ collapsed: t.value }))), e.activityType === z(Wt).FlowAgent ? s("", !0) : (k(), c("span", {
|
|
9779
9782
|
key: 0,
|
|
9780
9783
|
class: S(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": t.value }])
|
|
9781
|
-
}, [f(
|
|
9784
|
+
}, [f(z(Qr))], 2))]), W(l("div", Lg, [P(n.$slots, "default")], 512), [[V, !t.value]])]));
|
|
9782
9785
|
}
|
|
9783
9786
|
}), zg = [
|
|
9784
9787
|
{
|
|
@@ -9849,7 +9852,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9849
9852
|
let t = a(() => {
|
|
9850
9853
|
var t;
|
|
9851
9854
|
return Array.isArray(e.value) ? e.value : [(t = e.value) == null ? {} : t];
|
|
9852
|
-
}), n =
|
|
9855
|
+
}), n = I({}), r = (e) => n.value[e.task_id] !== !1;
|
|
9853
9856
|
return {
|
|
9854
9857
|
isTaskExpanded: r,
|
|
9855
9858
|
taskList: t,
|
|
@@ -9915,7 +9918,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9915
9918
|
pendingLabel: () => K("跳过中"),
|
|
9916
9919
|
visible: (e) => e.convergedState === "failed" && e.skippable
|
|
9917
9920
|
}], qg = (e, t) => `${e.task_id}:${t.id}:${t.retry}`, Jg = (e) => {
|
|
9918
|
-
let { hideResumeActions: t, onInterruptResume: n, openNodeDetail: r } = e, i =
|
|
9921
|
+
let { hideResumeActions: t, onInterruptResume: n, openNodeDetail: r } = e, i = I({}), a = (e, t, r) => {
|
|
9919
9922
|
var a;
|
|
9920
9923
|
let o = qg(t, r);
|
|
9921
9924
|
i.value[o] || (i.value = G(G({}, i.value), {}, { [o]: e }), (a = n.value) == null || a.call(n, {
|
|
@@ -9955,7 +9958,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9955
9958
|
__name: "detail-section",
|
|
9956
9959
|
props: { title: {} },
|
|
9957
9960
|
setup(e) {
|
|
9958
|
-
return (t, n) => (k(), c("div", Yg, [l("div", Xg, [n[0] || (n[0] = l("span", { class: "section-bar" }, null, -1)), l("span", Zg,
|
|
9961
|
+
return (t, n) => (k(), c("div", Yg, [l("div", Xg, [n[0] || (n[0] = l("span", { class: "section-bar" }, null, -1)), l("span", Zg, L(e.title), 1)]), P(t.$slots, "default")]));
|
|
9959
9962
|
}
|
|
9960
9963
|
}), $g = { class: "ai-simple-table" }, e_ = { key: 0 }, t_ = ["colspan"], n_ = /* @__PURE__ */ m({
|
|
9961
9964
|
__name: "simple-table",
|
|
@@ -9964,12 +9967,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
9964
9967
|
data: {}
|
|
9965
9968
|
},
|
|
9966
9969
|
setup(t) {
|
|
9967
|
-
return (n, r) => (k(), c("table", $g, [l("thead", null, [l("tr", null, [(k(!0), c(e, null,
|
|
9970
|
+
return (n, r) => (k(), c("table", $g, [l("thead", null, [l("tr", null, [(k(!0), c(e, null, N(t.columns, (e) => (k(), c("th", { key: e.key }, L(e.label), 1))), 128))])]), l("tbody", null, [(k(!0), c(e, null, N(t.data, (n, r) => (k(), c("tr", { key: r }, [(k(!0), c(e, null, N(t.columns, (e) => {
|
|
9968
9971
|
var t;
|
|
9969
9972
|
return k(), c("td", {
|
|
9970
9973
|
key: e.key,
|
|
9971
9974
|
class: S({ "is-break-all": e.breakAll })
|
|
9972
|
-
},
|
|
9975
|
+
}, L((t = n[e.key]) == null ? "--" : t), 3);
|
|
9973
9976
|
}), 128))]))), 128)), t.data.length ? s("", !0) : (k(), c("tr", e_, [l("td", {
|
|
9974
9977
|
class: "is-empty",
|
|
9975
9978
|
colspan: t.columns.length
|
|
@@ -10034,7 +10037,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10034
10037
|
breakAll: !0,
|
|
10035
10038
|
key: "value",
|
|
10036
10039
|
label: K("参数值")
|
|
10037
|
-
}], p = { forced_fail: Vt ? "Force Fail" : "强制失败" }, m = t, h =
|
|
10040
|
+
}], p = { forced_fail: Vt ? "Force Fail" : "强制失败" }, m = t, h = I(C_.Config), g = a(() => {
|
|
10038
10041
|
var e;
|
|
10039
10042
|
return (e = m.data) == null ? void 0 : e.basic_info;
|
|
10040
10043
|
}), _ = a(() => {
|
|
@@ -10097,55 +10100,55 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10097
10100
|
return (a, p) => {
|
|
10098
10101
|
var m;
|
|
10099
10102
|
return k(), c("div", r_, [
|
|
10100
|
-
l("h3", i_, [t.loading ? (k(), c(e, { key: 0 }, [l("span", null,
|
|
10101
|
-
l("div", o_, [(k(), c(e, null,
|
|
10103
|
+
l("h3", i_, [t.loading ? (k(), c(e, { key: 0 }, [l("span", null, L(z(K)("节点")) + ":", 1), p[0] || (p[0] = l("span", { class: "skeleton-title ai-skeleton-element" }, null, -1))], 64)) : (k(), c("div", a_, L(z(K)("节点")) + ":" + L((m = g.value) == null ? void 0 : m.node_name), 1)), P(a.$slots, "locateButton")]),
|
|
10104
|
+
l("div", o_, [(k(), c(e, null, N(n, (e) => l("div", {
|
|
10102
10105
|
key: e.key,
|
|
10103
10106
|
class: S(["detail-tab", { "is-active": h.value === e.key }]),
|
|
10104
10107
|
onClick: (t) => h.value = e.key
|
|
10105
|
-
}, [(k(), o(
|
|
10106
|
-
l("div", c_, [h.value === C_.Config ? (k(), c(e, { key: 0 }, [t.loading ? (k(), c(e, { key: 0 }, [l("div", l_, [p[1] || (p[1] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
10108
|
+
}, [(k(), o(F(e.key === C_.Config ? z(jn) : z(On)), { class: "detail-tab-icon" })), d(" " + L(e.label), 1)], 10, s_)), 64))]),
|
|
10109
|
+
l("div", c_, [h.value === C_.Config ? (k(), c(e, { key: 0 }, [t.loading ? (k(), c(e, { key: 0 }, [l("div", l_, [p[1] || (p[1] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(6, (e) => l("div", {
|
|
10107
10110
|
key: e,
|
|
10108
10111
|
class: "skeleton-row ai-skeleton-element"
|
|
10109
|
-
})), 64))]), l("div", u_, [p[2] || (p[2] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
10112
|
+
})), 64))]), l("div", u_, [p[2] || (p[2] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(4, (e) => l("div", {
|
|
10110
10113
|
key: e,
|
|
10111
10114
|
class: "skeleton-row ai-skeleton-element"
|
|
10112
10115
|
})), 64))])], 64)) : (k(), c(e, { key: 1 }, [
|
|
10113
|
-
f(Qg, { title:
|
|
10114
|
-
default:
|
|
10116
|
+
f(Qg, { title: z(K)("基础信息") }, {
|
|
10117
|
+
default: U(() => {
|
|
10115
10118
|
var t, n, r;
|
|
10116
10119
|
return [l("div", d_, [
|
|
10117
|
-
(k(!0), c(e, null,
|
|
10120
|
+
(k(!0), c(e, null, N(_.value, (e) => (k(), c("div", {
|
|
10118
10121
|
key: e.label,
|
|
10119
10122
|
class: "info-row"
|
|
10120
|
-
}, [l("div", f_,
|
|
10121
|
-
l("div", m_, [l("div", h_,
|
|
10122
|
-
l("div", y_, [l("div", b_,
|
|
10123
|
+
}, [l("div", f_, L(e.label), 1), l("div", p_, L(e.value), 1)]))), 128)),
|
|
10124
|
+
l("div", m_, [l("div", h_, L(z(K)("失败处理")), 1), l("div", g_, [v.value ? (k(), c(e, { key: 0 }, [(t = g.value) != null && t.skippable ? (k(), c("span", __, [p[3] || (p[3] = l("span", { class: "tag-badge" }, "MS", -1)), d(" " + L(z(K)("手动跳过")) + L(!((n = g.value) == null || (n = n.auto_retry) == null) && n.enable ? ";" : ""), 1)])) : s("", !0), !((r = g.value) == null || (r = r.auto_retry) == null) && r.enable ? (k(), c("span", v_, [p[4] || (p[4] = l("span", { class: "tag-badge" }, "AR", -1)), d(" " + L(y.value), 1)])) : s("", !0)], 64)) : (k(), c(e, { key: 1 }, [d("--")], 64))])]),
|
|
10125
|
+
l("div", y_, [l("div", b_, L(z(K)("超时控制")), 1), l("div", x_, L(b.value), 1)])
|
|
10123
10126
|
])];
|
|
10124
10127
|
}),
|
|
10125
10128
|
_: 1
|
|
10126
10129
|
}, 8, ["title"]),
|
|
10127
|
-
f(Qg, { title:
|
|
10128
|
-
default:
|
|
10130
|
+
f(Qg, { title: z(K)("输入参数") }, {
|
|
10131
|
+
default: U(() => [f(n_, {
|
|
10129
10132
|
columns: r,
|
|
10130
10133
|
data: x.value
|
|
10131
10134
|
}, null, 8, ["data"])]),
|
|
10132
10135
|
_: 1
|
|
10133
10136
|
}, 8, ["title"]),
|
|
10134
|
-
f(Qg, { title:
|
|
10135
|
-
default:
|
|
10137
|
+
f(Qg, { title: z(K)("输出参数") }, {
|
|
10138
|
+
default: U(() => [f(n_, {
|
|
10136
10139
|
columns: i,
|
|
10137
10140
|
data: C.value
|
|
10138
10141
|
}, null, 8, ["data"])]),
|
|
10139
10142
|
_: 1
|
|
10140
10143
|
}, 8, ["title"])
|
|
10141
|
-
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div", S_, [p[5] || (p[5] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
10144
|
+
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div", S_, [p[5] || (p[5] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(5, (e) => l("div", {
|
|
10142
10145
|
key: e,
|
|
10143
10146
|
class: "skeleton-row ai-skeleton-element"
|
|
10144
10147
|
})), 64))])) : (k(), o(Qg, {
|
|
10145
10148
|
key: 1,
|
|
10146
|
-
title:
|
|
10149
|
+
title: z(K)("结构化输出")
|
|
10147
10150
|
}, {
|
|
10148
|
-
default:
|
|
10151
|
+
default: U(() => [f(n_, {
|
|
10149
10152
|
columns: u,
|
|
10150
10153
|
data: w.value
|
|
10151
10154
|
}, null, 8, ["data"])]),
|
|
@@ -10158,7 +10161,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10158
10161
|
let { messageUid: t, taskList: n } = e, r = ha(), i = ua(), o = a(() => {
|
|
10159
10162
|
var e, t;
|
|
10160
10163
|
return (e = (t = r.selectedTab.value) == null ? void 0 : t.name) == null ? "" : e;
|
|
10161
|
-
}), s =
|
|
10164
|
+
}), s = I(!1), c = () => {
|
|
10162
10165
|
s.value = !0;
|
|
10163
10166
|
}, l = a(() => {
|
|
10164
10167
|
if (s.value) return o.value;
|
|
@@ -10209,7 +10212,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10209
10212
|
}
|
|
10210
10213
|
}));
|
|
10211
10214
|
};
|
|
10212
|
-
return
|
|
10215
|
+
return H(o, (e, t) => {
|
|
10213
10216
|
t !== void 0 && c();
|
|
10214
10217
|
}), E(() => {
|
|
10215
10218
|
i != null && i.value && p(n.value.find((e) => e.is_active && e.has_confidence));
|
|
@@ -10243,12 +10246,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10243
10246
|
}),
|
|
10244
10247
|
emits: ["update:collapsed"],
|
|
10245
10248
|
setup(t) {
|
|
10246
|
-
let n = t, r = Va(), i =
|
|
10247
|
-
messageUid:
|
|
10249
|
+
let n = t, r = Va(), i = ie(t, "collapsed"), u = Ra(), p = a(() => u.value === cn.Share), m = Ua(), h = a(() => p.value || m), g = a(() => n.status === Y.Pending || n.status === Y.Streaming), { isTaskExpanded: _, taskList: v, toggleTaskExpanded: y, viewTasks: x, visibleStats: C } = Gg(ne(n, "content")), { isNodeSelected: T, isTaskSelected: E, openConfidence: D, openNodeDetail: O } = O_({
|
|
10250
|
+
messageUid: ne(n, "messageUid"),
|
|
10248
10251
|
taskList: v
|
|
10249
10252
|
}), { getNodeActions: A, isNodePending: ee } = Jg({
|
|
10250
10253
|
hideResumeActions: h,
|
|
10251
|
-
onInterruptResume:
|
|
10254
|
+
onInterruptResume: ne(n, "onInterruptResume"),
|
|
10252
10255
|
openNodeDetail: O
|
|
10253
10256
|
}), j = (e) => {
|
|
10254
10257
|
e.disabled || e.run();
|
|
@@ -10256,23 +10259,23 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10256
10259
|
return (t, n) => (k(), o(Rg, {
|
|
10257
10260
|
collapsed: i.value,
|
|
10258
10261
|
"onUpdate:collapsed": n[0] || (n[0] = (e) => i.value = e),
|
|
10259
|
-
"activity-type":
|
|
10262
|
+
"activity-type": z(Wt).FlowAgent,
|
|
10260
10263
|
class: "ai-flow-agent-activity"
|
|
10261
10264
|
}, {
|
|
10262
|
-
title:
|
|
10265
|
+
title: U(() => [f(z(Se), b({
|
|
10263
10266
|
class: "flow-agent-title-bar",
|
|
10264
10267
|
theme: "ai-chat-box-light light"
|
|
10265
|
-
}, G(G({},
|
|
10268
|
+
}, G(G({}, z(r)), {}, {
|
|
10266
10269
|
tag: "div",
|
|
10267
10270
|
arrow: !0,
|
|
10268
10271
|
followCursor: !1,
|
|
10269
10272
|
offset: [0, 10]
|
|
10270
10273
|
})), {
|
|
10271
|
-
content:
|
|
10274
|
+
content: U(() => [l("div", j_, [(k(!0), c(e, null, N(z(C), (e) => (k(), c("div", {
|
|
10272
10275
|
key: e.key,
|
|
10273
10276
|
class: "flow-agent-stat-tooltip-item"
|
|
10274
10277
|
}, [
|
|
10275
|
-
l("span", M_, [e.key === "running" ? (k(), o(
|
|
10278
|
+
l("span", M_, [e.key === "running" ? (k(), o(z(he), {
|
|
10276
10279
|
key: 0,
|
|
10277
10280
|
mode: "spin",
|
|
10278
10281
|
size: "mini",
|
|
@@ -10282,19 +10285,19 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10282
10285
|
class: "flow-agent-stat-dot",
|
|
10283
10286
|
style: w({ borderColor: e.dotColor })
|
|
10284
10287
|
}, null, 4))]),
|
|
10285
|
-
l("span", N_,
|
|
10288
|
+
l("span", N_, L(e.label) + ":", 1),
|
|
10286
10289
|
l("span", {
|
|
10287
10290
|
class: "flow-agent-stat-tooltip-count",
|
|
10288
10291
|
style: w({ color: e.color })
|
|
10289
|
-
},
|
|
10292
|
+
}, L(e.display), 5)
|
|
10290
10293
|
]))), 128))])]),
|
|
10291
|
-
default:
|
|
10294
|
+
default: U(() => [l("span", { class: S(["ai-activity-message-title-icon", { "icon-collapsed": i.value }]) }, [g.value ? (k(), o(Oi, {
|
|
10292
10295
|
key: 0,
|
|
10293
10296
|
size: 12
|
|
10294
|
-
})) : (k(), o(
|
|
10297
|
+
})) : (k(), o(z(yn), { key: 1 }))], 2), l("span", k_, [l("span", A_, L(z(K)("执行情况")) + ":", 1), (k(!0), c(e, null, N(z(C), (e) => (k(), c("span", {
|
|
10295
10298
|
key: e.key,
|
|
10296
10299
|
class: "flow-agent-stat-item"
|
|
10297
|
-
}, [e.key === "running" ? (k(), o(
|
|
10300
|
+
}, [e.key === "running" ? (k(), o(z(he), {
|
|
10298
10301
|
key: 0,
|
|
10299
10302
|
class: "flow-agent-stat-loading",
|
|
10300
10303
|
mode: "spin",
|
|
@@ -10307,42 +10310,42 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10307
10310
|
}, null, 4)), l("span", {
|
|
10308
10311
|
class: "flow-agent-stat-count",
|
|
10309
10312
|
style: w({ color: e.color })
|
|
10310
|
-
},
|
|
10313
|
+
}, L(e.display), 5)]))), 128))])]),
|
|
10311
10314
|
_: 1
|
|
10312
10315
|
}, 16)]),
|
|
10313
|
-
default:
|
|
10316
|
+
default: U(() => [(k(!0), c(e, null, N(z(x), (t) => {
|
|
10314
10317
|
var n;
|
|
10315
10318
|
return k(), c("div", {
|
|
10316
10319
|
key: t.taskId,
|
|
10317
10320
|
class: "flow-agent-task-group"
|
|
10318
10321
|
}, [l("div", { class: S(["flow-agent-task-header", {
|
|
10319
10322
|
"has-confidence": t.hasConfidence,
|
|
10320
|
-
"is-selected":
|
|
10323
|
+
"is-selected": z(E)(t.raw)
|
|
10321
10324
|
}]) }, [
|
|
10322
10325
|
l("span", {
|
|
10323
|
-
class: S(["flow-agent-task-arrow", { "is-expanded":
|
|
10324
|
-
onClick:
|
|
10325
|
-
}, [f(
|
|
10326
|
-
l("span", F_, [t.convergedState === "running" ? (k(), o(
|
|
10326
|
+
class: S(["flow-agent-task-arrow", { "is-expanded": z(_)(t.raw) }]),
|
|
10327
|
+
onClick: le((e) => z(y)(t.raw), ["stop"])
|
|
10328
|
+
}, [f(z(yn))], 10, P_),
|
|
10329
|
+
l("span", F_, [t.convergedState === "running" ? (k(), o(z(he), {
|
|
10327
10330
|
key: 0,
|
|
10328
10331
|
mode: "spin",
|
|
10329
10332
|
size: "mini",
|
|
10330
10333
|
theme: "primary"
|
|
10331
|
-
})) : (k(), o(
|
|
10332
|
-
|
|
10333
|
-
l("span", L_, [l("span", R_,
|
|
10334
|
+
})) : (k(), o(F(t.stateIcon), { key: 1 }))]),
|
|
10335
|
+
W((k(), c("span", I_, [f(z(Fg), { text: t.taskName }, null, 8, ["text"])])), [[z(Ka), G({}, z(r))]]),
|
|
10336
|
+
l("span", L_, [l("span", R_, L(t.totalTimeText), 1), t.hasConfidence ? (k(), c("span", {
|
|
10334
10337
|
key: 0,
|
|
10335
10338
|
class: "flow-agent-task-action-btn flow-agent-task-confidence-btn",
|
|
10336
|
-
onClick:
|
|
10337
|
-
}, [f(
|
|
10338
|
-
], 2),
|
|
10339
|
+
onClick: le((e) => z(D)(t.raw), ["stop"])
|
|
10340
|
+
}, [f(z(On)), d(" " + L((n = t.confidenceTitle) == null ? z(K)("有效证据") : n), 1)], 8, z_)) : s("", !0)])
|
|
10341
|
+
], 2), W(l("div", B_, [(k(!0), c(e, null, N(t.nodes, (n) => (k(), c("div", {
|
|
10339
10342
|
key: n.id,
|
|
10340
10343
|
class: S(["flow-agent-node-item", {
|
|
10341
|
-
"is-selected":
|
|
10342
|
-
"is-pending":
|
|
10344
|
+
"is-selected": z(T)(t.raw, n.raw),
|
|
10345
|
+
"is-pending": z(ee)(t, n)
|
|
10343
10346
|
}])
|
|
10344
10347
|
}, [
|
|
10345
|
-
l("span", V_, [n.convergedState === "running" ? (k(), o(
|
|
10348
|
+
l("span", V_, [n.convergedState === "running" ? (k(), o(z(he), {
|
|
10346
10349
|
key: 0,
|
|
10347
10350
|
mode: "spin",
|
|
10348
10351
|
size: "mini",
|
|
@@ -10352,26 +10355,26 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10352
10355
|
class: "flow-agent-status-dot",
|
|
10353
10356
|
style: w({ borderColor: n.dotColor })
|
|
10354
10357
|
}, null, 4))]),
|
|
10355
|
-
|
|
10358
|
+
W((k(), c("span", {
|
|
10356
10359
|
class: "flow-agent-node-name",
|
|
10357
10360
|
title: n.name
|
|
10358
|
-
}, [f(
|
|
10359
|
-
l("span", U_, [l("span", W_,
|
|
10361
|
+
}, [f(z(Fg), { text: n.name }, null, 8, ["text"])], 8, H_)), [[z(Ka), G({}, z(r))]]),
|
|
10362
|
+
l("span", U_, [l("span", W_, L(n.elapsedTimeText), 1), l("span", G_, [(k(!0), c(e, null, N(z(A)(t, n), (e) => W((k(), c("span", {
|
|
10360
10363
|
key: e.id,
|
|
10361
10364
|
class: S(["flow-agent-node-action-btn", { "is-disabled": e.disabled }]),
|
|
10362
|
-
onClick:
|
|
10363
|
-
}, [e.loading ? (k(), o(
|
|
10365
|
+
onClick: le((t) => j(e), ["stop"])
|
|
10366
|
+
}, [e.loading ? (k(), o(z(he), {
|
|
10364
10367
|
key: 0,
|
|
10365
10368
|
class: "flow-agent-node-action-loading",
|
|
10366
10369
|
mode: "spin",
|
|
10367
10370
|
size: "mini",
|
|
10368
10371
|
theme: "primary"
|
|
10369
|
-
})) : (k(), o(
|
|
10372
|
+
})) : (k(), o(F(e.icon), { key: 1 })), d(" " + L(e.label), 1)], 10, K_)), [[z(Ce), e.tooltip ? G(G({}, z(r)), {}, {
|
|
10370
10373
|
content: e.tooltip,
|
|
10371
10374
|
theme: "ai-chat-box",
|
|
10372
10375
|
offset: [0, 8]
|
|
10373
10376
|
}) : { content: "" }]])), 128))])])
|
|
10374
|
-
], 2))), 128))], 512), [[
|
|
10377
|
+
], 2))), 128))], 512), [[V, z(_)(t.raw)]])]);
|
|
10375
10378
|
}), 128))]),
|
|
10376
10379
|
_: 1
|
|
10377
10380
|
}, 8, ["collapsed", "activity-type"]));
|
|
@@ -10388,16 +10391,16 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10388
10391
|
}),
|
|
10389
10392
|
emits: ["update:collapsed"],
|
|
10390
10393
|
setup(e) {
|
|
10391
|
-
let t = e, n =
|
|
10394
|
+
let t = e, n = ie(e, "collapsed"), r = a(() => t.status === Y.Pending || t.status === Y.Streaming), i = a(() => r.value ? K("检索中") : K("检索完成"));
|
|
10392
10395
|
return (t, a) => (k(), o(Rg, {
|
|
10393
10396
|
collapsed: n.value,
|
|
10394
10397
|
"onUpdate:collapsed": a[0] || (a[0] = (e) => n.value = e)
|
|
10395
10398
|
}, {
|
|
10396
|
-
title:
|
|
10399
|
+
title: U(() => [l("span", J_, [r.value ? (k(), o(Oi, { key: 0 })) : (k(), o(z(hn), {
|
|
10397
10400
|
key: 1,
|
|
10398
10401
|
style: { "font-size": "12px" }
|
|
10399
|
-
}))]), l("span", Y_,
|
|
10400
|
-
default:
|
|
10402
|
+
}))]), l("span", Y_, L(i.value), 1)]),
|
|
10403
|
+
default: U(() => {
|
|
10401
10404
|
var t, n;
|
|
10402
10405
|
return [l("div", X_, [f(od, { content: ((t = e.content) == null ? void 0 : t.content) || "" }, null, 8, ["content"])]), f(cd, { content: ((n = e.content) == null ? void 0 : n.referenceDocument) || [] }, null, 8, ["content"])];
|
|
10403
10406
|
}),
|
|
@@ -10415,7 +10418,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10415
10418
|
}),
|
|
10416
10419
|
emits: ["update:collapsed"],
|
|
10417
10420
|
setup(e) {
|
|
10418
|
-
let t = e, n =
|
|
10421
|
+
let t = e, n = ie(e, "collapsed"), r = a(() => {
|
|
10419
10422
|
var e, n;
|
|
10420
10423
|
let r = (e = (n = t.content) == null ? void 0 : n.length) == null ? 0 : e;
|
|
10421
10424
|
return Vt ? `Reference ${r} documents as reference` : `引用 ${r} 篇资料作为参考`;
|
|
@@ -10424,8 +10427,8 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10424
10427
|
collapsed: n.value,
|
|
10425
10428
|
"onUpdate:collapsed": i[0] || (i[0] = (e) => n.value = e)
|
|
10426
10429
|
}, {
|
|
10427
|
-
title:
|
|
10428
|
-
default:
|
|
10430
|
+
title: U(() => [l("span", Q_, [f(z(hn), { style: { "font-size": "12px" } })]), l("span", $_, L(r.value), 1)]),
|
|
10431
|
+
default: U(() => [f(cd, { content: e.content || [] }, null, 8, ["content"])]),
|
|
10429
10432
|
_: 1
|
|
10430
10433
|
}, 8, ["collapsed"]));
|
|
10431
10434
|
}
|
|
@@ -10453,11 +10456,11 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10453
10456
|
[Wt.FlowAgent]: q_,
|
|
10454
10457
|
[Wt.KnowledgeRag]: Z_,
|
|
10455
10458
|
[Wt.ReferenceDocument]: ev
|
|
10456
|
-
}, n = e, r =
|
|
10459
|
+
}, n = e, r = ie(e, "collapsed"), i = a(() => {
|
|
10457
10460
|
var e;
|
|
10458
10461
|
return t[(e = n.activityType) == null ? "" : e];
|
|
10459
10462
|
});
|
|
10460
|
-
return (t, n) => i.value ? (k(), o(
|
|
10463
|
+
return (t, n) => i.value ? (k(), o(F(i.value), {
|
|
10461
10464
|
key: 0,
|
|
10462
10465
|
collapsed: r.value,
|
|
10463
10466
|
"onUpdate:collapsed": n[0] || (n[0] = (e) => r.value = e),
|
|
@@ -10489,18 +10492,18 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10489
10492
|
}), p = () => {
|
|
10490
10493
|
n.desc && r(n.desc);
|
|
10491
10494
|
};
|
|
10492
|
-
return (n, r) => (k(), c("div", nv, [l("div", rv, [d(
|
|
10495
|
+
return (n, r) => (k(), c("div", nv, [l("div", rv, [d(L(t.title) + " ", 1), t.desc ? (k(), c("span", {
|
|
10493
10496
|
key: 0,
|
|
10494
10497
|
class: "desc-copy",
|
|
10495
|
-
title:
|
|
10498
|
+
title: z(K)("复制"),
|
|
10496
10499
|
onClick: p
|
|
10497
|
-
}, [f(
|
|
10500
|
+
}, [f(z(ci))], 8, iv)) : s("", !0)]), l("div", av, [u.value !== null && typeof u.value == "object" ? (k(!0), c(e, { key: 0 }, N(u.value, (e, t) => (k(), c("div", {
|
|
10498
10501
|
key: t,
|
|
10499
10502
|
class: "desc-panel-item"
|
|
10500
|
-
}, [l("span", ov, [f(
|
|
10503
|
+
}, [l("span", ov, [f(z(Fg), { text: String(t) }, null, 8, ["text"]), r[0] || (r[0] = d(":", -1))]), l("span", sv, [f(z(Fg), {
|
|
10501
10504
|
style: { "word-break": "break-all" },
|
|
10502
10505
|
text: i(e)
|
|
10503
|
-
}, null, 8, ["text"])])]))), 128)) : (k(), o(
|
|
10506
|
+
}, null, 8, ["text"])])]))), 128)) : (k(), o(z(Fg), {
|
|
10504
10507
|
key: 1,
|
|
10505
10508
|
style: { wordBreak: "break-all" },
|
|
10506
10509
|
text: i(u.value)
|
|
@@ -10525,7 +10528,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10525
10528
|
setup(e) {
|
|
10526
10529
|
return (t, n) => (k(), c("div", lv, [f(cv, {
|
|
10527
10530
|
desc: e.content || (typeof e.error == "string" ? e.error : void 0),
|
|
10528
|
-
title:
|
|
10531
|
+
title: z(K)("返回内容")
|
|
10529
10532
|
}, null, 8, ["desc", "title"])]));
|
|
10530
10533
|
}
|
|
10531
10534
|
}), dv = { class: "ai-toolcall-render" }, fv = { class: "toolcall-header-text" }, pv = {
|
|
@@ -10539,7 +10542,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10539
10542
|
toolCall: {}
|
|
10540
10543
|
},
|
|
10541
10544
|
setup(t) {
|
|
10542
|
-
let n = t, r =
|
|
10545
|
+
let n = t, r = I(!0), i = I(null), u = Va(), { keywordMatched: p, keyword: m } = Wa(() => {
|
|
10543
10546
|
var e, t, r, i, a;
|
|
10544
10547
|
return [
|
|
10545
10548
|
(e = n.toolCall) == null ? void 0 : e.function.name,
|
|
@@ -10586,31 +10589,31 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10586
10589
|
class: S(["ai-toolcall-render-header", { "is-expanded": !h.value }]),
|
|
10587
10590
|
onClick: g
|
|
10588
10591
|
}, [
|
|
10589
|
-
f(
|
|
10590
|
-
|
|
10592
|
+
f(z(kn)),
|
|
10593
|
+
W((k(), c("span", fv, [l("span", { class: S(["toolcall-header-title", { "is-loading": y.value }]) }, [d(L(y.value ? T.value : w.value) + " ", 1), f(z(Fg), { text: E.value }, null, 8, ["text"])], 2), D.value ? (k(), c("span", pv, [
|
|
10591
10594
|
r[0] || (r[0] = d("\xA0(\xA0", -1)),
|
|
10592
|
-
l("span", { class: S(["toolcall-header-result", v.value ? "is-error" : "is-success"]) },
|
|
10593
|
-
O.value ? (k(), c(e, { key: 0 }, [d("," +
|
|
10595
|
+
l("span", { class: S(["toolcall-header-result", v.value ? "is-error" : "is-success"]) }, L(D.value), 3),
|
|
10596
|
+
O.value ? (k(), c(e, { key: 0 }, [d("," + L(z(K)("耗时")) + ":" + L(O.value), 1)], 64)) : s("", !0),
|
|
10594
10597
|
r[1] || (r[1] = d("\xA0)", -1))
|
|
10595
|
-
])) : s("", !0)])), [[
|
|
10598
|
+
])) : s("", !0)])), [[z(Ka), G(G({}, z(u)), {}, {
|
|
10596
10599
|
text: A.value,
|
|
10597
10600
|
appendTo: "parent"
|
|
10598
10601
|
})]]),
|
|
10599
|
-
y.value ? s("", !0) : (k(), o(
|
|
10602
|
+
y.value ? s("", !0) : (k(), o(z(An), {
|
|
10600
10603
|
key: 0,
|
|
10601
10604
|
class: S({ "is-expanded": !h.value })
|
|
10602
10605
|
}, null, 8, ["class"]))
|
|
10603
|
-
], 2),
|
|
10606
|
+
], 2), W(l("div", mv, [
|
|
10604
10607
|
f(cv, {
|
|
10605
10608
|
desc: (i = t.toolCall) == null ? void 0 : i.function.description,
|
|
10606
|
-
title:
|
|
10609
|
+
title: z(K)("描述")
|
|
10607
10610
|
}, null, 8, ["desc", "title"]),
|
|
10608
10611
|
f(cv, {
|
|
10609
10612
|
desc: (a = t.toolCall) == null ? void 0 : a.function.arguments,
|
|
10610
|
-
title:
|
|
10613
|
+
title: z(K)("参数")
|
|
10611
10614
|
}, null, 8, ["desc", "title"]),
|
|
10612
10615
|
(p = t.toolCall) != null && p.toolMessage ? (k(), o(uv, C(b({ key: 0 }, t.toolCall.toolMessage)), null, 16)) : s("", !0)
|
|
10613
|
-
], 512), [[
|
|
10616
|
+
], 512), [[V, !h.value]])]);
|
|
10614
10617
|
};
|
|
10615
10618
|
}
|
|
10616
10619
|
}), gv = { class: "ai-message-artifacts" }, _v = /* @__PURE__ */ m({
|
|
@@ -10621,7 +10624,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10621
10624
|
onPreview: { type: Function }
|
|
10622
10625
|
},
|
|
10623
10626
|
setup(t) {
|
|
10624
|
-
return (n, r) => (k(), c("div", gv, [(k(!0), c(e, null,
|
|
10627
|
+
return (n, r) => (k(), c("div", gv, [(k(!0), c(e, null, N(t.artifacts, (e) => (k(), o(Pm, {
|
|
10625
10628
|
key: e.outputId,
|
|
10626
10629
|
file: e,
|
|
10627
10630
|
"on-download": t.onDownload,
|
|
@@ -10657,20 +10660,20 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10657
10660
|
return (e = n.property) == null ? void 0 : e.artifacts;
|
|
10658
10661
|
});
|
|
10659
10662
|
return (n, i) => (k(), c("div", vv, [
|
|
10660
|
-
t.content ? (k(), c("div", yv, [
|
|
10663
|
+
t.content ? (k(), c("div", yv, [P(n.$slots, "default", C(h({ content: t.content })), () => [f(ld, {
|
|
10661
10664
|
content: t.content || "",
|
|
10662
10665
|
status: t.status,
|
|
10663
|
-
type:
|
|
10666
|
+
type: z(Wt).Text
|
|
10664
10667
|
}, null, 8, [
|
|
10665
10668
|
"content",
|
|
10666
10669
|
"status",
|
|
10667
10670
|
"type"
|
|
10668
10671
|
])])])) : s("", !0),
|
|
10669
|
-
t.toolCalls && t.toolCalls.length > 0 ? (k(), c("div", bv, [(k(!0), c(e, null,
|
|
10672
|
+
t.toolCalls && t.toolCalls.length > 0 ? (k(), c("div", bv, [(k(!0), c(e, null, N(t.toolCalls, (e) => {
|
|
10670
10673
|
var n;
|
|
10671
10674
|
return k(), o(hv, {
|
|
10672
10675
|
key: e.id,
|
|
10673
|
-
status: e.toolMessage ? e.toolMessage.error ?
|
|
10676
|
+
status: e.toolMessage ? e.toolMessage.error ? z(Y).Error : (n = e.toolMessage.status) == null ? t.status : n : z(Y).Pending,
|
|
10674
10677
|
"tool-call": e
|
|
10675
10678
|
}, null, 8, ["status", "tool-call"]);
|
|
10676
10679
|
}), 128))])) : s("", !0),
|
|
@@ -10694,10 +10697,10 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10694
10697
|
property: {}
|
|
10695
10698
|
},
|
|
10696
10699
|
setup(t) {
|
|
10697
|
-
return (n, r) => (k(), c("div", Sv, [l("div", Cv, [(k(!0), c(e, null,
|
|
10700
|
+
return (n, r) => (k(), c("div", Sv, [l("div", Cv, [(k(!0), c(e, null, N(Array.isArray(t.content) ? t.content : [t.content], (e, t) => (k(), c("div", {
|
|
10698
10701
|
key: t,
|
|
10699
10702
|
class: "ai-info-message-content"
|
|
10700
|
-
},
|
|
10703
|
+
}, L(e), 1))), 128))])]));
|
|
10701
10704
|
}
|
|
10702
10705
|
}), Tv = { class: "ai-tool-approval-card" }, Ev = { class: "ai-tool-approval-card__header" }, Dv = { class: "ai-tool-approval-card__title-wrap" }, Ov = { class: "ai-tool-approval-card__title" }, kv = { class: "ai-tool-approval-card__fields" }, Av = { class: "ai-tool-approval-card__field" }, jv = { class: "ai-tool-approval-card__field" }, Mv = {
|
|
10703
10706
|
key: 0,
|
|
@@ -10743,19 +10746,19 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10743
10746
|
h.value.url && window.open(h.value.url, "_blank", "noopener");
|
|
10744
10747
|
}, D = () => {
|
|
10745
10748
|
C.value && u(C.value);
|
|
10746
|
-
}, A =
|
|
10749
|
+
}, A = I(!1), ee = I(!1), j, M = () => {
|
|
10747
10750
|
ee.value = !0, clearTimeout(j), j = setTimeout(() => {
|
|
10748
10751
|
ee.value = !1;
|
|
10749
10752
|
}, Iv);
|
|
10750
|
-
},
|
|
10753
|
+
}, N = () => {
|
|
10751
10754
|
var e;
|
|
10752
|
-
A.value || (A.value = !0,
|
|
10755
|
+
A.value || (A.value = !0, M(), (e = t.onInterruptResume) == null || e.call(t, {
|
|
10753
10756
|
operation: Kt.ApprovalCancel,
|
|
10754
10757
|
payload: { interrupt_id: t.interrupt.id }
|
|
10755
10758
|
}, t.interrupt));
|
|
10756
|
-
},
|
|
10759
|
+
}, P = () => {
|
|
10757
10760
|
var e;
|
|
10758
|
-
ee.value || i.value || (
|
|
10761
|
+
ee.value || i.value || (M(), (e = t.onInterruptResume) == null || e.call(t, {
|
|
10759
10762
|
operation: Kt.ApprovalRefresh,
|
|
10760
10763
|
payload: { interrupt_id: t.interrupt.id }
|
|
10761
10764
|
}, t.interrupt));
|
|
@@ -10763,69 +10766,69 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10763
10766
|
return O(() => clearTimeout(j)), (t, r) => (k(), c("section", Tv, [
|
|
10764
10767
|
l("header", Ev, [l("div", Dv, [
|
|
10765
10768
|
r[0] || (r[0] = l("span", { class: "ai-tool-approval-card__title-bar" }, null, -1)),
|
|
10766
|
-
l("span", Ov,
|
|
10767
|
-
|
|
10769
|
+
l("span", Ov, L(h.value.title || z(K)("算法方案评审单")), 1),
|
|
10770
|
+
W(f(z(ci), {
|
|
10768
10771
|
class: S(["ai-tool-approval-card__copy-icon", { "is-disabled": !C.value }]),
|
|
10769
10772
|
onClick: D
|
|
10770
|
-
}, null, 8, ["class"]), [[
|
|
10771
|
-
content:
|
|
10773
|
+
}, null, 8, ["class"]), [[z(Ce), G(G({}, z(n)), {}, {
|
|
10774
|
+
content: z(K)("复制单据链接"),
|
|
10772
10775
|
theme: "ai-chat-box",
|
|
10773
10776
|
offset: [0, 8]
|
|
10774
10777
|
})]]),
|
|
10775
|
-
v.value && !e.readonly ?
|
|
10778
|
+
v.value && !e.readonly ? W((k(), o(z(ui), {
|
|
10776
10779
|
key: 0,
|
|
10777
10780
|
class: S(["ai-tool-approval-card__refresh-icon", { "is-disabled": ee.value || i.value }]),
|
|
10778
|
-
onClick:
|
|
10779
|
-
}, null, 8, ["class"])), [[
|
|
10780
|
-
content:
|
|
10781
|
+
onClick: P
|
|
10782
|
+
}, null, 8, ["class"])), [[z(Ce), G(G({}, z(n)), {}, {
|
|
10783
|
+
content: z(K)("刷新单据状态"),
|
|
10781
10784
|
theme: "ai-chat-box",
|
|
10782
10785
|
offset: [0, 8]
|
|
10783
10786
|
})]]) : s("", !0)
|
|
10784
|
-
]), l("span", { class: S(["ai-tool-approval-card__status", `ai-tool-approval-card__status--${y.value}`]) }, [h.value.status ===
|
|
10787
|
+
]), l("span", { class: S(["ai-tool-approval-card__status", `ai-tool-approval-card__status--${y.value}`]) }, [h.value.status === z(q).APPROVED ? (k(), o(z(Vr), {
|
|
10785
10788
|
key: 0,
|
|
10786
10789
|
class: "ai-tool-approval-card__status-icon"
|
|
10787
|
-
})) :
|
|
10790
|
+
})) : z(m).has(h.value.status) ? (k(), o(z(Ur), {
|
|
10788
10791
|
key: 1,
|
|
10789
10792
|
class: "ai-tool-approval-card__status-icon"
|
|
10790
|
-
})) : h.value.status ===
|
|
10793
|
+
})) : h.value.status === z(q).REVOKED ? (k(), o(z(Wr), {
|
|
10791
10794
|
key: 2,
|
|
10792
|
-
class: S(["ai-tool-approval-card__status-icon", { "ai-tool-approval-card__status-icon--revoked": h.value.status ===
|
|
10793
|
-
}, null, 8, ["class"])) : (k(), o(
|
|
10795
|
+
class: S(["ai-tool-approval-card__status-icon", { "ai-tool-approval-card__status-icon--revoked": h.value.status === z(q).REVOKED }])
|
|
10796
|
+
}, null, 8, ["class"])) : (k(), o(z(he), {
|
|
10794
10797
|
key: 3,
|
|
10795
10798
|
class: "ai-tool-approval-card__status-icon",
|
|
10796
10799
|
mode: "spin",
|
|
10797
10800
|
size: "mini",
|
|
10798
10801
|
theme: "primary"
|
|
10799
|
-
})), d(" " +
|
|
10800
|
-
l("dl", kv, [l("div", Av, [l("dt", null,
|
|
10801
|
-
v.value ? (k(), c("div", Mv, [f(
|
|
10802
|
-
l("div", Pv, [f(
|
|
10802
|
+
})), d(" " + L(b.value), 1)], 2)]),
|
|
10803
|
+
l("dl", kv, [l("div", Av, [l("dt", null, L(z(K)("单据编号")), 1), l("dd", null, L(h.value.sn || "--"), 1)]), l("div", jv, [l("dt", null, L(z(K)("提交时间")), 1), l("dd", null, L(h.value.submit_time || "--"), 1)])]),
|
|
10804
|
+
v.value ? (k(), c("div", Mv, [f(z(Hr), { class: "ai-tool-approval-card__processor-icon" }), W((k(), c("span", Nv, [d(L(z(K)("当前处理人")) + ":" + L(x.value), 1)])), [[z(Ka), G({}, z(n))]])])) : s("", !0),
|
|
10805
|
+
l("div", Pv, [f(z(ue), {
|
|
10803
10806
|
class: "ai-tool-approval-card__detail",
|
|
10804
10807
|
disabled: !h.value.url,
|
|
10805
10808
|
theme: "primary",
|
|
10806
10809
|
onClick: E
|
|
10807
10810
|
}, {
|
|
10808
|
-
default:
|
|
10811
|
+
default: U(() => [d(L(z(K)("查看单据详情")) + " ", 1), f(z(jr), { class: "ai-tool-approval-card__detail-icon" })]),
|
|
10809
10812
|
_: 1
|
|
10810
|
-
}, 8, ["disabled"]), v.value && !e.readonly ? (k(), o(
|
|
10813
|
+
}, 8, ["disabled"]), v.value && !e.readonly ? (k(), o(z(ue), {
|
|
10811
10814
|
key: 0,
|
|
10812
10815
|
class: "ai-tool-approval-card__cancel",
|
|
10813
10816
|
disabled: A.value || i.value,
|
|
10814
10817
|
loading: A.value,
|
|
10815
10818
|
outline: "",
|
|
10816
10819
|
theme: "primary",
|
|
10817
|
-
onClick:
|
|
10820
|
+
onClick: N
|
|
10818
10821
|
}, {
|
|
10819
|
-
default:
|
|
10822
|
+
default: U(() => [d(L(z(K)("取消审批")), 1)]),
|
|
10820
10823
|
_: 1
|
|
10821
|
-
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) :
|
|
10824
|
+
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) : W((k(), c("span", Fv, [f(z(ue), {
|
|
10822
10825
|
class: "ai-tool-approval-card__cancel",
|
|
10823
10826
|
disabled: "",
|
|
10824
10827
|
outline: ""
|
|
10825
10828
|
}, {
|
|
10826
|
-
default:
|
|
10829
|
+
default: U(() => [d(L(w.value), 1)]),
|
|
10827
10830
|
_: 1
|
|
10828
|
-
})])), [[
|
|
10831
|
+
})])), [[z(Ce), G(G({}, z(n)), {}, {
|
|
10829
10832
|
content: T.value,
|
|
10830
10833
|
theme: "ai-chat-box",
|
|
10831
10834
|
offset: [0, 8]
|
|
@@ -10890,15 +10893,15 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10890
10893
|
if (r) return (n = i[r.reason]) == null ? void 0 : n.call(i, r);
|
|
10891
10894
|
});
|
|
10892
10895
|
return (n, r) => (k(), c("div", Rv, [
|
|
10893
|
-
p.value ? (k(), c("div", zv,
|
|
10894
|
-
(k(!0), c(e, null,
|
|
10896
|
+
p.value ? (k(), c("div", zv, L(p.value), 1)) : s("", !0),
|
|
10897
|
+
(k(!0), c(e, null, N(f.value, (n) => (k(), c(e, { key: n.toolCallId }, [m(n) ? (k(), o(F(m(n)), {
|
|
10895
10898
|
key: 0,
|
|
10896
10899
|
interrupt: n,
|
|
10897
10900
|
"on-interrupt-resume": t.onInterruptResume
|
|
10898
|
-
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div", Bv,
|
|
10899
|
-
_.value ? (k(), o(
|
|
10901
|
+
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div", Bv, L(n.message || z(K)("暂不支持的中断消息")), 1))], 64))), 128)),
|
|
10902
|
+
_.value ? (k(), o(F(_.value.component), C(b({ key: 1 }, _.value.props)), u({ _: 2 }, [n.$slots.answeredQuestion ? {
|
|
10900
10903
|
name: "answer",
|
|
10901
|
-
fn:
|
|
10904
|
+
fn: U((e) => [P(n.$slots, "answeredQuestion", C(h(e)))]),
|
|
10902
10905
|
key: "0"
|
|
10903
10906
|
} : void 0]), 1040)) : s("", !0)
|
|
10904
10907
|
]));
|
|
@@ -10910,7 +10913,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10910
10913
|
return E(() => {
|
|
10911
10914
|
var e, n;
|
|
10912
10915
|
t == null || (e = t.value) == null || (n = e.jumpToBottom) == null || n.call(e);
|
|
10913
|
-
}), (e, t) => (k(), c("div", Hv, [f(Oi, { size: 18 }),
|
|
10916
|
+
}), (e, t) => (k(), c("div", Hv, [f(Oi, { size: 18 }), P(e.$slots, "default", {}, () => [d(L(z(K)("请求中...")), 1)])]));
|
|
10914
10917
|
}
|
|
10915
10918
|
}), Wv = { class: "ai-reasoning-message" }, Gv = {
|
|
10916
10919
|
key: 0,
|
|
@@ -10934,7 +10937,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10934
10937
|
}),
|
|
10935
10938
|
emits: ["update:collapsed"],
|
|
10936
10939
|
setup(t) {
|
|
10937
|
-
let n = t, r =
|
|
10940
|
+
let n = t, r = ie(t, "collapsed"), { stop: i } = H(() => n.duration, function() {
|
|
10938
10941
|
var e = Z(function* (e) {
|
|
10939
10942
|
e && (r.value = !0, yield x(), i == null || i());
|
|
10940
10943
|
});
|
|
@@ -10955,22 +10958,22 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10955
10958
|
return k(), c("div", Wv, [l("div", {
|
|
10956
10959
|
class: S(["ai-reasoning-message-title", {
|
|
10957
10960
|
"ai-reasoning-message-title-collapsed": r.value,
|
|
10958
|
-
"is-thinking": t.status ===
|
|
10959
|
-
"is-complete": t.status ===
|
|
10960
|
-
"is-error": t.status ===
|
|
10961
|
+
"is-thinking": t.status === z(Y).Pending || t.status === z(Y).Streaming,
|
|
10962
|
+
"is-complete": t.status === z(Y).Complete || t.status === z(Y).Success,
|
|
10963
|
+
"is-error": t.status === z(Y).Error
|
|
10961
10964
|
}]),
|
|
10962
10965
|
onClick: i[0] || (i[0] = (e) => r.value = !r.value)
|
|
10963
10966
|
}, [
|
|
10964
|
-
t.status ===
|
|
10965
|
-
l("span", Kv,
|
|
10966
|
-
l("span", { class: S(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": r.value }]) }, [f(
|
|
10967
|
-
], 2),
|
|
10967
|
+
t.status === z(Y).Pending || t.status === z(Y).Streaming ? (k(), c("span", Gv, [f(Oi)])) : s("", !0),
|
|
10968
|
+
l("span", Kv, L(u.value), 1),
|
|
10969
|
+
l("span", { class: S(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": r.value }]) }, [f(z(Qr))], 2)
|
|
10970
|
+
], 2), W(l("div", qv, [t.status === z(Y).Error ? (k(), o(Vu, {
|
|
10968
10971
|
key: 0,
|
|
10969
10972
|
content: ((a = t.content) == null ? void 0 : a.join("\n")) || ""
|
|
10970
|
-
}, null, 8, ["content"])) : (k(!0), c(e, { key: 1 },
|
|
10973
|
+
}, null, 8, ["content"])) : (k(!0), c(e, { key: 1 }, N(Array.isArray(t.content) ? t.content : [t.content], (e) => (k(), o(od, {
|
|
10971
10974
|
key: e,
|
|
10972
10975
|
content: e
|
|
10973
|
-
}, null, 8, ["content"]))), 128))], 512), [[
|
|
10976
|
+
}, null, 8, ["content"]))), 128))], 512), [[V, !r.value]])]);
|
|
10974
10977
|
};
|
|
10975
10978
|
}
|
|
10976
10979
|
}), Yv = { class: "ai-key-value-content" }, Xv = {
|
|
@@ -10983,20 +10986,20 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
10983
10986
|
title: {}
|
|
10984
10987
|
},
|
|
10985
10988
|
setup(t) {
|
|
10986
|
-
return (n, r) => (k(), c("div", Yv, [t.title ? (k(), c("div", Xv, [f(
|
|
10989
|
+
return (n, r) => (k(), c("div", Yv, [t.title ? (k(), c("div", Xv, [f(z(Zr)), d(" " + L(t.title), 1)])) : s("", !0), l("div", Zv, [(k(!0), c(e, null, N(t.content, (e) => (k(), c("div", {
|
|
10987
10990
|
key: e.key,
|
|
10988
10991
|
class: "key-value-item"
|
|
10989
10992
|
}, [
|
|
10990
|
-
l("div", Qv,
|
|
10993
|
+
l("div", Qv, L(e.key), 1),
|
|
10991
10994
|
r[0] || (r[0] = d(" : ", -1)),
|
|
10992
|
-
l("div", $v,
|
|
10995
|
+
l("div", $v, L(e.value), 1)
|
|
10993
10996
|
]))), 128))])]));
|
|
10994
10997
|
}
|
|
10995
10998
|
}), ty = { class: "ai-text-content" }, ny = /* @__PURE__ */ m({
|
|
10996
10999
|
__name: "text-content",
|
|
10997
11000
|
props: { content: {} },
|
|
10998
11001
|
setup(e) {
|
|
10999
|
-
return (t, n) => (k(), c("div", ty,
|
|
11002
|
+
return (t, n) => (k(), c("div", ty, L(e.content), 1));
|
|
11000
11003
|
}
|
|
11001
11004
|
}), ry = { class: "ai-user-message" }, iy = {
|
|
11002
11005
|
key: 1,
|
|
@@ -11021,7 +11024,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11021
11024
|
onShortcutConfirm: { type: Function }
|
|
11022
11025
|
},
|
|
11023
11026
|
setup(t) {
|
|
11024
|
-
let n = t, r = ba(), { copy: i } = ia(), u = a(() => lt(nn, n.messageTools)), p =
|
|
11027
|
+
let n = t, r = ba(), { copy: i } = ia(), u = a(() => lt(nn, n.messageTools)), p = I(!1), m = I(""), h = B("chatInputRef"), g = a(() => {
|
|
11025
11028
|
var e;
|
|
11026
11029
|
let t = (e = n.property) == null || (e = e.extra) == null ? void 0 : e.cite;
|
|
11027
11030
|
if (!(!t || typeof t == "string")) return t.title;
|
|
@@ -11123,20 +11126,20 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11123
11126
|
class: "user-edit-input",
|
|
11124
11127
|
"default-upload-files": y.value,
|
|
11125
11128
|
"on-send-message": D,
|
|
11126
|
-
"support-upload": (a = (O =
|
|
11129
|
+
"support-upload": (a = (O = z(r)) == null ? void 0 : O.supportUpload.value) == null ? !1 : a
|
|
11127
11130
|
}, {
|
|
11128
|
-
"send-icon":
|
|
11131
|
+
"send-icon": U(() => [l("div", ay, [f(z(ue), {
|
|
11129
11132
|
size: "small",
|
|
11130
11133
|
onClick: w
|
|
11131
11134
|
}, {
|
|
11132
|
-
default:
|
|
11135
|
+
default: U(() => [d(L(z(K)("取消")), 1)]),
|
|
11133
11136
|
_: 1
|
|
11134
|
-
}), f(
|
|
11137
|
+
}), f(z(ue), {
|
|
11135
11138
|
size: "small",
|
|
11136
11139
|
theme: "primary",
|
|
11137
11140
|
onClick: C
|
|
11138
11141
|
}, {
|
|
11139
|
-
default:
|
|
11142
|
+
default: U(() => [d(L(z(K)("发送")), 1)]),
|
|
11140
11143
|
_: 1
|
|
11141
11144
|
})])]),
|
|
11142
11145
|
_: 1
|
|
@@ -11156,11 +11159,11 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11156
11159
|
key: 0,
|
|
11157
11160
|
content: _.value,
|
|
11158
11161
|
title: g.value
|
|
11159
|
-
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 },
|
|
11162
|
+
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 }, N(x.value, (e, t) => (k(), o(ny, {
|
|
11160
11163
|
key: t,
|
|
11161
11164
|
content: e
|
|
11162
11165
|
}, null, 8, ["content"]))), 128)) : s("", !0)])) : s("", !0),
|
|
11163
|
-
t.messageToolsStatus ===
|
|
11166
|
+
t.messageToolsStatus === z(Uf).Hidden ? s("", !0) : (k(), o(Pg, {
|
|
11164
11167
|
key: 2,
|
|
11165
11168
|
class: "ai-user-message-tools",
|
|
11166
11169
|
"message-tools": u.value,
|
|
@@ -11169,7 +11172,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11169
11172
|
"tippy-options": t.tippyOptions,
|
|
11170
11173
|
"update-tools": []
|
|
11171
11174
|
}, {
|
|
11172
|
-
prepend:
|
|
11175
|
+
prepend: U(() => [f(gg, { "created-at": t.createdAt }, null, 8, ["created-at"])]),
|
|
11173
11176
|
_: 1
|
|
11174
11177
|
}, 8, [
|
|
11175
11178
|
"message-tools",
|
|
@@ -11192,7 +11195,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11192
11195
|
onInterruptResume: { type: Function }
|
|
11193
11196
|
},
|
|
11194
11197
|
setup(e) {
|
|
11195
|
-
let t = e, n =
|
|
11198
|
+
let t = e, n = ae(), r = a(() => {
|
|
11196
11199
|
switch (t.message.role) {
|
|
11197
11200
|
case J.User: return g(oy, G(G({}, t.message), {}, {
|
|
11198
11201
|
onAction: t.onAction,
|
|
@@ -11202,7 +11205,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11202
11205
|
messageToolsStatus: t.messageToolsStatus,
|
|
11203
11206
|
tippyOptions: t.tippyOptions
|
|
11204
11207
|
}));
|
|
11205
|
-
case J.Assistant: return g(xv, t.message, { default: (e) =>
|
|
11208
|
+
case J.Assistant: return g(xv, t.message, { default: (e) => P(n, "default", e, () => [g(ld, {
|
|
11206
11209
|
content: t.message.content || "",
|
|
11207
11210
|
status: t.message.status
|
|
11208
11211
|
}, n.codeHeader ? { codeHeader: (e) => {
|
|
@@ -11221,7 +11224,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11221
11224
|
default: return null;
|
|
11222
11225
|
}
|
|
11223
11226
|
});
|
|
11224
|
-
return (e, t) => (k(), o(
|
|
11227
|
+
return (e, t) => (k(), o(F(r.value)));
|
|
11225
11228
|
}
|
|
11226
11229
|
}), cy = [
|
|
11227
11230
|
"id",
|
|
@@ -11256,7 +11259,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11256
11259
|
}),
|
|
11257
11260
|
emits: /* @__PURE__ */ y(["stopStreaming"], ["update:selectedUserMessages"]),
|
|
11258
11261
|
setup(t) {
|
|
11259
|
-
let n = t, r =
|
|
11262
|
+
let n = t, r = ie(t, "selectedUserMessages"), i = (e) => {
|
|
11260
11263
|
let t = e.id || e.uid;
|
|
11261
11264
|
return t === void 0 ? void 0 : String(t);
|
|
11262
11265
|
}, d = (e) => {
|
|
@@ -11265,7 +11268,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11265
11268
|
let r = (t = e[n]) == null ? void 0 : t.createdAt;
|
|
11266
11269
|
if (r) return r;
|
|
11267
11270
|
}
|
|
11268
|
-
}, p =
|
|
11271
|
+
}, p = B("messageContainerRef"), m = B("messageContainerBottomRef"), { jumpToBottom: h, toScrollBottom: g, debouncedShowScrollBottomBtn: _ } = la(p, m);
|
|
11269
11272
|
E(() => {
|
|
11270
11273
|
var e;
|
|
11271
11274
|
(e = n.messageGroups) != null && e.length && (h(), requestAnimationFrame(() => h()));
|
|
@@ -11312,7 +11315,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11312
11315
|
return function(t, n, r) {
|
|
11313
11316
|
return e.apply(this, arguments);
|
|
11314
11317
|
};
|
|
11315
|
-
}(),
|
|
11318
|
+
}(), M = function() {
|
|
11316
11319
|
var e = Z(function* (e, t) {
|
|
11317
11320
|
var r;
|
|
11318
11321
|
(r = n.onUserShortcutConfirm) == null || r.call(n, e, t);
|
|
@@ -11326,7 +11329,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11326
11329
|
ref: p,
|
|
11327
11330
|
class: "ai-message-container"
|
|
11328
11331
|
}, [
|
|
11329
|
-
(k(!0), c(e, null,
|
|
11332
|
+
(k(!0), c(e, null, N(C.value, (a, p) => (k(), c("div", {
|
|
11330
11333
|
id: a.uid,
|
|
11331
11334
|
key: p,
|
|
11332
11335
|
class: "message-group",
|
|
@@ -11334,9 +11337,9 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11334
11337
|
style: w({ backgroundColor: a.checked ? "#f5f7fa" : "transparent" }),
|
|
11335
11338
|
onMouseenter: (e) => T(a),
|
|
11336
11339
|
onMouseleave: (e) => D(a, e)
|
|
11337
|
-
}, [
|
|
11340
|
+
}, [P(r.$slots, "group", b({ ref_for: !0 }, { group: a }), () => [t.enableSelection && a.type !== z(J).Loading ? (k(), o(z(de), {
|
|
11338
11341
|
key: 0,
|
|
11339
|
-
class: S(["message-group-checkbox", { "is-user-group": a.type ===
|
|
11342
|
+
class: S(["message-group-checkbox", { "is-user-group": a.type === z(J).User }]),
|
|
11340
11343
|
"model-value": a.checked,
|
|
11341
11344
|
"onUpdate:modelValue": (e) => O(a, e)
|
|
11342
11345
|
}, null, 8, [
|
|
@@ -11344,13 +11347,13 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11344
11347
|
"model-value",
|
|
11345
11348
|
"onUpdate:modelValue"
|
|
11346
11349
|
])) : s("", !0), l("div", {
|
|
11347
|
-
class: S(["message-group-messages", { "message-group-enabled-selection": t.renderMode ===
|
|
11348
|
-
style: w({ width: t.enableSelection && a.type !==
|
|
11349
|
-
}, [(k(!0), c(e, null,
|
|
11350
|
+
class: S(["message-group-messages", { "message-group-enabled-selection": t.renderMode === z(cn).Share || t.enableSelection && a.type !== z(J).Loading }]),
|
|
11351
|
+
style: w({ width: t.enableSelection && a.type !== z(J).Loading ? "calc(100% - 16px)" : "100%" })
|
|
11352
|
+
}, [(k(!0), c(e, null, N(a.messages, (e, a) => (k(), c("div", {
|
|
11350
11353
|
key: a,
|
|
11351
11354
|
class: "ai-message-item",
|
|
11352
11355
|
"data-message-id": i(e)
|
|
11353
|
-
}, [
|
|
11356
|
+
}, [P(r.$slots, "default", b({ ref_for: !0 }, {
|
|
11354
11357
|
message: e,
|
|
11355
11358
|
messageToolsStatus: t.messageToolsStatus,
|
|
11356
11359
|
onInterruptResume: n.onInterruptResume
|
|
@@ -11362,11 +11365,11 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11362
11365
|
"on-action": (t) => ee(t, e),
|
|
11363
11366
|
"on-input-confirm": (t, n) => j(e, t, n),
|
|
11364
11367
|
"on-interrupt-resume": n.onInterruptResume,
|
|
11365
|
-
"on-shortcut-confirm": (t) =>
|
|
11368
|
+
"on-shortcut-confirm": (t) => M(e, t),
|
|
11366
11369
|
"tippy-options": t.messageToolsTippyOptions
|
|
11367
11370
|
}, u({ _: 2 }, [r.$slots.answeredQuestion ? {
|
|
11368
11371
|
name: "answeredQuestion",
|
|
11369
|
-
fn:
|
|
11372
|
+
fn: U((e) => [P(r.$slots, "answeredQuestion", b({ ref_for: !0 }, e))]),
|
|
11370
11373
|
key: "0"
|
|
11371
11374
|
} : void 0]), 1032, [
|
|
11372
11375
|
"message",
|
|
@@ -11377,7 +11380,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11377
11380
|
"on-interrupt-resume",
|
|
11378
11381
|
"on-shortcut-confirm",
|
|
11379
11382
|
"tippy-options"
|
|
11380
|
-
]))])], 8, ly))), 128)), t.renderMode !==
|
|
11383
|
+
]))])], 8, ly))), 128)), t.renderMode !== z(cn).Share && !(t.enableSelection && a.type !== z(J).Loading) && !a.pause && a.type === z(J).Assistant && t.messageToolsStatus !== z(Uf).Hidden ? (k(), o(Pg, {
|
|
11381
11384
|
key: 0,
|
|
11382
11385
|
"message-tools": y.value,
|
|
11383
11386
|
"message-tools-status": t.messageToolsStatus,
|
|
@@ -11390,7 +11393,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11390
11393
|
return (i = n.onAgentFeedback) == null ? void 0 : i.call(n, e, a.messages, t, r);
|
|
11391
11394
|
}
|
|
11392
11395
|
}, {
|
|
11393
|
-
append:
|
|
11396
|
+
append: U(() => [f(gg, { "created-at": d(a.messages) }, null, 8, ["created-at"])]),
|
|
11394
11397
|
_: 2
|
|
11395
11398
|
}, 1032, [
|
|
11396
11399
|
"message-tools",
|
|
@@ -11407,20 +11410,20 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11407
11410
|
class: "message-container-bottom",
|
|
11408
11411
|
tabindex: "0"
|
|
11409
11412
|
}, null, 512),
|
|
11410
|
-
l("div", uy, [
|
|
11411
|
-
loading: t.messageStatus ===
|
|
11412
|
-
title: t.messageStatus ===
|
|
11413
|
+
l("div", uy, [W(f(xi, {
|
|
11414
|
+
loading: t.messageStatus === z(Y).StopLoading,
|
|
11415
|
+
title: t.messageStatus === z(Y).StopLoading ? z(K)("正在停止") : z(K)("停止生成"),
|
|
11413
11416
|
onClick: a[0] || (a[0] = (e) => r.$emit("stopStreaming"))
|
|
11414
11417
|
}, {
|
|
11415
|
-
icon:
|
|
11418
|
+
icon: U(() => [f(z(Ir))]),
|
|
11416
11419
|
_: 1
|
|
11417
|
-
}, 8, ["loading", "title"]), [[
|
|
11418
|
-
title:
|
|
11419
|
-
onClick: a[1] || (a[1] = () =>
|
|
11420
|
+
}, 8, ["loading", "title"]), [[V, t.renderMode !== z(cn).Share && (t.messageStatus === z(Y).Streaming || t.messageStatus === z(Y).StopLoading || t.messageStatus === z(Y).Fetching || t.messageStatus === z(Y).Pending)]]), W(f(xi, {
|
|
11421
|
+
title: z(K)("返回底部"),
|
|
11422
|
+
onClick: a[1] || (a[1] = () => z(g)("smooth"))
|
|
11420
11423
|
}, {
|
|
11421
|
-
icon:
|
|
11424
|
+
icon: U(() => [f(z(ti))]),
|
|
11422
11425
|
_: 1
|
|
11423
|
-
}, 8, ["title"]), [[
|
|
11426
|
+
}, 8, ["title"]), [[V, z(_)]])])
|
|
11424
11427
|
], 512));
|
|
11425
11428
|
}
|
|
11426
11429
|
}), fy = { class: "ai-execution-summary" }, py = {
|
|
@@ -11439,7 +11442,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11439
11442
|
setup(t, { emit: n }) {
|
|
11440
11443
|
let r = n, i = Va(), { keyword: a } = Ia();
|
|
11441
11444
|
Ha();
|
|
11442
|
-
let u =
|
|
11445
|
+
let u = I(void 0), p = (e) => {
|
|
11443
11446
|
if (!e) return "";
|
|
11444
11447
|
let t = new Date(e), n = (e) => String(e).padStart(2, "0");
|
|
11445
11448
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
@@ -11448,13 +11451,13 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11448
11451
|
}, h = () => {
|
|
11449
11452
|
a.value = "", r("updateKeyword", "");
|
|
11450
11453
|
};
|
|
11451
|
-
return (n, g) => (k(), c("div", fy, [t.messageGroups.length ? (k(), c("div", py, [f(
|
|
11452
|
-
modelValue:
|
|
11454
|
+
return (n, g) => (k(), c("div", fy, [t.messageGroups.length ? (k(), c("div", py, [f(z(me), {
|
|
11455
|
+
modelValue: z(a),
|
|
11453
11456
|
"onUpdate:modelValue": [g[0] || (g[0] = (e) => v(a) ? a.value = e : null), g[1] || (g[1] = (e) => r("updateKeyword", e))],
|
|
11454
11457
|
class: "ai-execution-summary-header-input",
|
|
11455
11458
|
clearable: "",
|
|
11456
|
-
placeholder:
|
|
11457
|
-
}, null, 8, ["modelValue", "placeholder"])])) : s("", !0), l("div", my, [t.messageGroups.length ? (k(!0), c(e, { key: 0 },
|
|
11459
|
+
placeholder: z(K)("搜索 关键字")
|
|
11460
|
+
}, null, 8, ["modelValue", "placeholder"])])) : s("", !0), l("div", my, [t.messageGroups.length ? (k(!0), c(e, { key: 0 }, N(t.messageGroups, (n, r) => (k(), c("div", {
|
|
11458
11461
|
key: n.uid,
|
|
11459
11462
|
class: "ai-execution-summary-content-item",
|
|
11460
11463
|
onMouseenter: (e) => u.value = n.uid,
|
|
@@ -11462,33 +11465,33 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11462
11465
|
}, [
|
|
11463
11466
|
l("div", gy, [
|
|
11464
11467
|
g[3] || (g[3] = l("span", { class: "timeline-dot" }, null, -1)),
|
|
11465
|
-
|
|
11466
|
-
|
|
11468
|
+
W((k(), c("span", _y, [d(L(typeof n.userMessageTitle == "number" ? p(n.userMessageTitle) : n.userMessageTitle), 1)])), [[z(Ka), G({}, z(i))]]),
|
|
11469
|
+
W(f(z(ue), {
|
|
11467
11470
|
class: "content-item-locate",
|
|
11468
11471
|
text: "",
|
|
11469
11472
|
theme: "primary",
|
|
11470
11473
|
onClick: (e) => m(n)
|
|
11471
11474
|
}, {
|
|
11472
|
-
default:
|
|
11475
|
+
default: U(() => [d(L(z(K)("在对话中定位")), 1)]),
|
|
11473
11476
|
_: 1
|
|
11474
|
-
}, 8, ["onClick"]), [[
|
|
11477
|
+
}, 8, ["onClick"]), [[V, u.value === n.uid]])
|
|
11475
11478
|
]),
|
|
11476
|
-
l("div", vy, [(k(!0), c(e, null,
|
|
11479
|
+
l("div", vy, [(k(!0), c(e, null, N(n.messages, (e, t) => (k(), o(sy, {
|
|
11477
11480
|
key: t,
|
|
11478
11481
|
message: e
|
|
11479
11482
|
}, null, 8, ["message"]))), 128))]),
|
|
11480
11483
|
r < t.messageGroups.length - 1 ? (k(), c("div", yy)) : s("", !0)
|
|
11481
|
-
], 40, hy))), 128)) : (k(), c("div", by, [f(
|
|
11484
|
+
], 40, hy))), 128)) : (k(), c("div", by, [f(z(fe), {
|
|
11482
11485
|
class: "empty-exception",
|
|
11483
11486
|
scene: "part",
|
|
11484
11487
|
type: "empty"
|
|
11485
|
-
}), l("div", xy, [d(
|
|
11488
|
+
}), l("div", xy, [d(L(z(a) ? z(K)("搜索结果为空") : z(K)("暂无数据")) + " ", 1), z(a) ? (k(), o(z(ue), {
|
|
11486
11489
|
key: 0,
|
|
11487
11490
|
text: "",
|
|
11488
11491
|
theme: "primary",
|
|
11489
11492
|
onClick: h
|
|
11490
11493
|
}, {
|
|
11491
|
-
default:
|
|
11494
|
+
default: U(() => [d(L(z(K)("清空搜索")), 1)]),
|
|
11492
11495
|
_: 1
|
|
11493
11496
|
})) : s("", !0)])]))])]));
|
|
11494
11497
|
}
|
|
@@ -11506,22 +11509,22 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11506
11509
|
],
|
|
11507
11510
|
setup(e, { emit: t }) {
|
|
11508
11511
|
let n = t;
|
|
11509
|
-
return (t, r) => (k(), c("div", Cy, [l("div", wy, [f(
|
|
11512
|
+
return (t, r) => (k(), c("div", Cy, [l("div", wy, [f(z(de), {
|
|
11510
11513
|
"model-value": e.isAllSelected,
|
|
11511
11514
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => n("toggle-all", e))
|
|
11512
|
-
}, null, 8, ["model-value"]), l("span", Ty,
|
|
11515
|
+
}, null, 8, ["model-value"]), l("span", Ty, L(z(K)("全选")), 1)]), l("div", Ey, [f(z(ue), {
|
|
11513
11516
|
disabled: e.loading,
|
|
11514
11517
|
onClick: r[1] || (r[1] = (e) => n("cancel"))
|
|
11515
11518
|
}, {
|
|
11516
|
-
default:
|
|
11519
|
+
default: U(() => [d(L(z(K)("取消")), 1)]),
|
|
11517
11520
|
_: 1
|
|
11518
|
-
}, 8, ["disabled"]), f(
|
|
11521
|
+
}, 8, ["disabled"]), f(z(ue), {
|
|
11519
11522
|
disabled: e.selectedCount === 0,
|
|
11520
11523
|
loading: e.loading,
|
|
11521
11524
|
theme: "primary",
|
|
11522
11525
|
onClick: r[2] || (r[2] = (e) => n("confirm"))
|
|
11523
11526
|
}, {
|
|
11524
|
-
default:
|
|
11527
|
+
default: U(() => [d(L(z(K)("确定")), 1)]),
|
|
11525
11528
|
_: 1
|
|
11526
11529
|
}, 8, ["disabled", "loading"])])]));
|
|
11527
11530
|
}
|
|
@@ -11620,7 +11623,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11620
11623
|
"update:selectedModel"
|
|
11621
11624
|
]),
|
|
11622
11625
|
setup(t, { expose: n, emit: i }) {
|
|
11623
|
-
let u = xe.TabPanel, p = t, m =
|
|
11626
|
+
let u = xe.TabPanel, p = t, m = ie(t, "renderMode"), _ = B("fullScreenRef"), { isFullScreen: v, enter: y, exit: S } = _a(_);
|
|
11624
11627
|
La({ renderMode: m });
|
|
11625
11628
|
let T = a(() => G(G({
|
|
11626
11629
|
collapsible: !1,
|
|
@@ -11628,7 +11631,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11628
11631
|
min: 400
|
|
11629
11632
|
}, p.resizeProps), {}, { placement: "right" })), E = a(() => {
|
|
11630
11633
|
var e, t, n, r, i;
|
|
11631
|
-
return (e = (t = p.getSideRenderComponent) == null ? void 0 : t.call(p, g, (n = (r =
|
|
11634
|
+
return (e = (t = p.getSideRenderComponent) == null ? void 0 : t.call(p, g, (n = (r = V.value.data) == null ? void 0 : r.props) == null ? {} : n)) == null ? (i = V.value.data) == null ? void 0 : i.component : e;
|
|
11632
11635
|
});
|
|
11633
11636
|
ya({
|
|
11634
11637
|
size: a(() => {
|
|
@@ -11640,36 +11643,36 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11640
11643
|
return (e = p.supportUpload) == null ? !1 : e;
|
|
11641
11644
|
}),
|
|
11642
11645
|
timezone: a(() => p.timezone)
|
|
11643
|
-
}),
|
|
11646
|
+
}), H(() => {
|
|
11644
11647
|
var e;
|
|
11645
11648
|
return (e = p.size) == null ? "small" : e;
|
|
11646
11649
|
}, (e) => {
|
|
11647
11650
|
typeof document < "u" && (document.body.dataset.aiSize = e);
|
|
11648
11651
|
}, { immediate: !0 });
|
|
11649
|
-
let D =
|
|
11652
|
+
let D = ie(t, "selectedShortcut"), A = ie(t, "cite"), ee = ie(t, "selectedModel"), j = i, te = I(!0), ne = a({
|
|
11650
11653
|
get: () => {
|
|
11651
11654
|
var e;
|
|
11652
|
-
return (e = p.asideCollapsed) == null ?
|
|
11655
|
+
return (e = p.asideCollapsed) == null ? te.value : e;
|
|
11653
11656
|
},
|
|
11654
11657
|
set: (e) => {
|
|
11655
|
-
p.asideCollapsed === void 0 && (
|
|
11658
|
+
p.asideCollapsed === void 0 && (te.value = e), j("update:asideCollapsed", e);
|
|
11656
11659
|
}
|
|
11657
|
-
}),
|
|
11658
|
-
za({ tippyOptions:
|
|
11659
|
-
let { displayTabs:
|
|
11660
|
-
collapsed:
|
|
11660
|
+
}), R = a(() => v.value && _.value ? G(G({}, p.commonTippyOptions), {}, { appendTo: _.value }) : G({}, p.commonTippyOptions));
|
|
11661
|
+
za({ tippyOptions: R });
|
|
11662
|
+
let { displayTabs: re, tabs: ae, selectedTab: V, isCollapse: oe, addCustomTab: se, ensureCustomTab: ce, removeCustomTab: le, selectCustomTab: de, resetCustomTab: fe } = ma({
|
|
11663
|
+
collapsed: ne,
|
|
11661
11664
|
executionTabVisible: () => p.executionTabVisible,
|
|
11662
11665
|
onTabChange: function() {
|
|
11663
11666
|
var e = Z(function* (e) {
|
|
11664
11667
|
var t, n;
|
|
11665
11668
|
if (e.name === "file-artifact") return;
|
|
11666
|
-
let r = ((t =
|
|
11669
|
+
let r = ((t = V.value.data) == null ? void 0 : t.props) || {
|
|
11667
11670
|
loading: !0,
|
|
11668
11671
|
data: {}
|
|
11669
11672
|
};
|
|
11670
|
-
|
|
11673
|
+
V.value.data = G(G({}, V.value.data), {}, { props: r });
|
|
11671
11674
|
let i = yield (n = p.onCustomTabChange) == null ? void 0 : n.call(p, e);
|
|
11672
|
-
|
|
11675
|
+
V.value.data = G(G({}, V.value.data), {}, { props: G(G({}, r), {}, {
|
|
11673
11676
|
loading: !1,
|
|
11674
11677
|
data: i
|
|
11675
11678
|
}) });
|
|
@@ -11684,12 +11687,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11684
11687
|
name: Qi,
|
|
11685
11688
|
order: -1
|
|
11686
11689
|
};
|
|
11687
|
-
|
|
11688
|
-
let me =
|
|
11690
|
+
ce(pe);
|
|
11691
|
+
let me = I(""), he = M([]), ge = I(), _e = () => {
|
|
11689
11692
|
var e;
|
|
11690
11693
|
let t = (e = p.resizeProps) == null ? void 0 : e.initialDivide;
|
|
11691
11694
|
return typeof t == "number" ? t : 400;
|
|
11692
|
-
}, ye =
|
|
11695
|
+
}, ye = I(_e()), be = I(_e()), Se = I(!1), Ce = a(() => `calc(100% - ${ye.value}px)`), we = a(() => `${be.value}px`), { messageGroups: Te, executionGroups: Ee, sessionArtifacts: De, isShareMode: Oe, isAllSelected: ke, onToggleShareAll: Ae, onCancelShare: je, onConfirmShare: Me, pendingApprovalTipText: Ne, activeUserQuestionInterrupt: Pe } = ka({
|
|
11693
11696
|
keyword: me,
|
|
11694
11697
|
messages: a(() => p.messages),
|
|
11695
11698
|
renderMode: a(() => m.value),
|
|
@@ -11697,16 +11700,16 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11697
11700
|
}), { activeArtifactId: Fe, setActiveArtifactId: Ie } = ea({
|
|
11698
11701
|
getOnArtifactClick: () => p.onArtifactClick,
|
|
11699
11702
|
onOpen: () => {
|
|
11700
|
-
|
|
11703
|
+
se(pe);
|
|
11701
11704
|
}
|
|
11702
11705
|
});
|
|
11703
|
-
|
|
11706
|
+
H(De, (e) => {
|
|
11704
11707
|
if (!e.length) {
|
|
11705
11708
|
Ie("");
|
|
11706
11709
|
return;
|
|
11707
11710
|
}
|
|
11708
11711
|
e.some((e) => e.outputId === Fe.value) || Ie(e[0].outputId);
|
|
11709
|
-
}, { immediate: !0 }),
|
|
11712
|
+
}, { immediate: !0 }), H(oe, (e) => {
|
|
11710
11713
|
e ? (me.value = "", ye.value = 0) : ye.value = be.value, j("collapseChange", e, ye.value);
|
|
11711
11714
|
});
|
|
11712
11715
|
let Le = a(() => {
|
|
@@ -11747,7 +11750,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11747
11750
|
}
|
|
11748
11751
|
t.scrollIntoView({ behavior: "smooth" });
|
|
11749
11752
|
}, Ge = (e) => e === "execution" ? Dn : e === "file-artifact" ? Mn : jn, Ke = (e) => {
|
|
11750
|
-
de(
|
|
11753
|
+
de(ae.value.find((t) => t.name === e));
|
|
11751
11754
|
}, qe = (e) => {
|
|
11752
11755
|
me.value = e;
|
|
11753
11756
|
}, Je = function() {
|
|
@@ -11776,9 +11779,9 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11776
11779
|
return O(() => {
|
|
11777
11780
|
fe(), typeof document < "u" && delete document.body.dataset.aiSize;
|
|
11778
11781
|
}), n({
|
|
11779
|
-
selectedTab:
|
|
11780
|
-
addCustomTab:
|
|
11781
|
-
removeCustomTab:
|
|
11782
|
+
selectedTab: V,
|
|
11783
|
+
addCustomTab: se,
|
|
11784
|
+
removeCustomTab: le,
|
|
11782
11785
|
selectCustomTab: de,
|
|
11783
11786
|
enterShareMode: () => {
|
|
11784
11787
|
Oe.value = !0;
|
|
@@ -11795,10 +11798,10 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11795
11798
|
"--resize-main-width": Ce.value,
|
|
11796
11799
|
"--resize-aside-width": we.value
|
|
11797
11800
|
})
|
|
11798
|
-
}, [t.chatLoading ? (k(), c("div", ky, [f(Bm)])) : (k(), o(
|
|
11801
|
+
}, [t.chatLoading ? (k(), c("div", ky, [f(Bm)])) : (k(), o(z(ve), b({
|
|
11799
11802
|
key: 1,
|
|
11800
11803
|
class: ["ai-chat-container-resize-layout", {
|
|
11801
|
-
"ai-is-collapse":
|
|
11804
|
+
"ai-is-collapse": z(oe) || z(re).length === 0,
|
|
11802
11805
|
"ai-is-welcome": !((a = t.messages) != null && a.length),
|
|
11803
11806
|
"is-resizing": Se.value
|
|
11804
11807
|
}]
|
|
@@ -11806,36 +11809,36 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11806
11809
|
onAfterResize: Qe,
|
|
11807
11810
|
onResizing: Ze
|
|
11808
11811
|
}), {
|
|
11809
|
-
aside:
|
|
11810
|
-
default:
|
|
11812
|
+
aside: U(() => [f(r, { name: "ai-aside-content" }, {
|
|
11813
|
+
default: U(() => {
|
|
11811
11814
|
var n, r, a;
|
|
11812
|
-
return [!
|
|
11815
|
+
return [!z(oe) && z(re).length > 0 ? (k(), c("div", {
|
|
11813
11816
|
key: 0,
|
|
11814
11817
|
ref_key: "fullScreenRef",
|
|
11815
11818
|
ref: _,
|
|
11816
11819
|
class: "ai-full-screen-wrapper"
|
|
11817
11820
|
}, [
|
|
11818
|
-
f(
|
|
11819
|
-
active:
|
|
11821
|
+
f(z(xe), {
|
|
11822
|
+
active: z(V).name,
|
|
11820
11823
|
class: "ai-chat-container-tab",
|
|
11821
11824
|
"label-height": 40,
|
|
11822
11825
|
type: "unborder-card",
|
|
11823
11826
|
onChange: Ke
|
|
11824
11827
|
}, {
|
|
11825
|
-
setting:
|
|
11828
|
+
setting: U(() => [l("div", Ay, [f(Ja, {
|
|
11826
11829
|
class: "screen-btn",
|
|
11827
|
-
"tippy-options": G(G({},
|
|
11830
|
+
"tippy-options": G(G({}, R.value), {}, { content: z(v) ? z(K)("退出全屏") : z(K)("全屏") })
|
|
11828
11831
|
}, {
|
|
11829
|
-
default:
|
|
11832
|
+
default: U(() => [z(v) ? (k(), o(z(ri), {
|
|
11830
11833
|
key: 1,
|
|
11831
|
-
onClick:
|
|
11832
|
-
}, null, 8, ["onClick"])) : (k(), o(
|
|
11834
|
+
onClick: z(S)
|
|
11835
|
+
}, null, 8, ["onClick"])) : (k(), o(z(ni), {
|
|
11833
11836
|
key: 0,
|
|
11834
|
-
onClick:
|
|
11837
|
+
onClick: z(y)
|
|
11835
11838
|
}, null, 8, ["onClick"]))]),
|
|
11836
11839
|
_: 1
|
|
11837
11840
|
}, 8, ["tippy-options"])])]),
|
|
11838
|
-
default:
|
|
11841
|
+
default: U(() => [(k(!0), c(e, null, N(z(re), (e) => (k(), o(z(u), {
|
|
11839
11842
|
key: e.name,
|
|
11840
11843
|
class: "ai-chat-container-tab-panel",
|
|
11841
11844
|
label: () => {
|
|
@@ -11843,18 +11846,18 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11843
11846
|
return g("div", {
|
|
11844
11847
|
class: "ai-execution-summary-label",
|
|
11845
11848
|
onVnodeMounted: (t) => {
|
|
11846
|
-
if (
|
|
11849
|
+
if (z(V).name === e.name) {
|
|
11847
11850
|
var n;
|
|
11848
11851
|
(n = t.el) == null || n.scrollIntoView({ behavior: "smooth" });
|
|
11849
11852
|
}
|
|
11850
11853
|
}
|
|
11851
|
-
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab:
|
|
11854
|
+
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab: z(le) })) == null ? [
|
|
11852
11855
|
g(Ge(e.name), { class: "ai-execution-summary-icon" }),
|
|
11853
|
-
|
|
11854
|
-
e.closable !== !1 && e.name !==
|
|
11856
|
+
W(g("span", { class: "ai-execution-summary-label-text" }, (i = e.label) == null ? "" : i), [[z(Ka), G(G({}, R.value), {}, { text: (a = e.label) == null ? "" : a })]]),
|
|
11857
|
+
e.closable !== !1 && e.name !== z("execution") ? g(z(ii), {
|
|
11855
11858
|
class: "ai-execution-close-icon",
|
|
11856
11859
|
onClick: () => {
|
|
11857
|
-
|
|
11860
|
+
z(le)(e.name);
|
|
11858
11861
|
}
|
|
11859
11862
|
}) : null
|
|
11860
11863
|
] : n);
|
|
@@ -11863,38 +11866,38 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11863
11866
|
}, null, 8, ["label", "name"]))), 128))]),
|
|
11864
11867
|
_: 1
|
|
11865
11868
|
}, 8, ["active"]),
|
|
11866
|
-
((n =
|
|
11869
|
+
((n = z(V)) == null ? void 0 : n.name) === z("execution") && t.executionTabVisible !== !1 ? (k(), c(e, { key: 0 }, [z(oe) ? s("", !0) : (k(), o(Sy, {
|
|
11867
11870
|
key: 0,
|
|
11868
|
-
"message-groups":
|
|
11871
|
+
"message-groups": z(Ee),
|
|
11869
11872
|
style: { height: "calc(100% - 40px)" },
|
|
11870
11873
|
onLocateMessageGroup: We,
|
|
11871
11874
|
onUpdateKeyword: qe
|
|
11872
|
-
}, null, 8, ["message-groups"]))], 64)) : ((r =
|
|
11875
|
+
}, null, 8, ["message-groups"]))], 64)) : ((r = z(V)) == null ? void 0 : r.name) === z("file-artifact") ? (k(), o(Ch, {
|
|
11873
11876
|
key: 1,
|
|
11874
|
-
"active-id":
|
|
11875
|
-
artifacts:
|
|
11877
|
+
"active-id": z(Fe),
|
|
11878
|
+
artifacts: z(De),
|
|
11876
11879
|
style: { height: "calc(100% - 40px)" },
|
|
11877
|
-
onSelect:
|
|
11880
|
+
onSelect: z(Ie)
|
|
11878
11881
|
}, null, 8, [
|
|
11879
11882
|
"active-id",
|
|
11880
11883
|
"artifacts",
|
|
11881
11884
|
"onSelect"
|
|
11882
11885
|
])) : s("", !0),
|
|
11883
|
-
|
|
11884
|
-
key:
|
|
11886
|
+
z(V) && z(V).name !== z("file-artifact") ? (k(), c("div", {
|
|
11887
|
+
key: z(V).name,
|
|
11885
11888
|
class: "ai-chat-container-message-slot"
|
|
11886
|
-
}, [(k(), o(
|
|
11887
|
-
locateButton:
|
|
11889
|
+
}, [(k(), o(F(E.value), b({ key: z(V).name }, (a = z(V)) == null || (a = a.data) == null ? void 0 : a.props), {
|
|
11890
|
+
locateButton: U(() => [f(z(ue), {
|
|
11888
11891
|
class: "ai-locate-button",
|
|
11889
11892
|
size: "small",
|
|
11890
11893
|
text: "",
|
|
11891
11894
|
theme: "primary",
|
|
11892
11895
|
onClick: i[0] || (i[0] = (e) => {
|
|
11893
11896
|
var t;
|
|
11894
|
-
return We((t =
|
|
11897
|
+
return We((t = z(V)) == null || (t = t.data) == null ? void 0 : t.messageUid);
|
|
11895
11898
|
})
|
|
11896
11899
|
}, {
|
|
11897
|
-
default:
|
|
11900
|
+
default: U(() => [d(L(z(K)("在对话中定位")), 1)]),
|
|
11898
11901
|
_: 1
|
|
11899
11902
|
})]),
|
|
11900
11903
|
_: 1
|
|
@@ -11903,16 +11906,16 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11903
11906
|
}),
|
|
11904
11907
|
_: 1
|
|
11905
11908
|
})]),
|
|
11906
|
-
main:
|
|
11909
|
+
main: U(() => {
|
|
11907
11910
|
var r, a, u, d;
|
|
11908
|
-
return [(r = t.messages) != null && r.length ?
|
|
11911
|
+
return [(r = t.messages) != null && r.length ? P(n.$slots, "default", C(b({ key: 0 }, {
|
|
11909
11912
|
messages: t.messages,
|
|
11910
11913
|
messageStatus: t.messageStatus,
|
|
11911
|
-
messageGroups:
|
|
11914
|
+
messageGroups: z(Te),
|
|
11912
11915
|
selectedUserMessages: he.value,
|
|
11913
11916
|
messageToolsStatus: t.messageToolsStatus,
|
|
11914
|
-
isShareMode:
|
|
11915
|
-
commonTippyOptions:
|
|
11917
|
+
isShareMode: z(Oe),
|
|
11918
|
+
commonTippyOptions: R.value,
|
|
11916
11919
|
handleAgentAction: Je,
|
|
11917
11920
|
onAgentFeedback: t.onAgentFeedback,
|
|
11918
11921
|
onInterruptResume: t.onInterruptResume,
|
|
@@ -11925,12 +11928,12 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11925
11928
|
key: 0,
|
|
11926
11929
|
"selected-user-messages": he.value,
|
|
11927
11930
|
"onUpdate:selectedUserMessages": i[1] || (i[1] = (e) => he.value = e),
|
|
11928
|
-
"enable-selection":
|
|
11929
|
-
"message-groups":
|
|
11931
|
+
"enable-selection": z(Oe),
|
|
11932
|
+
"message-groups": z(Te),
|
|
11930
11933
|
"message-status": Le.value,
|
|
11931
11934
|
"message-tools": t.messageTools,
|
|
11932
11935
|
"message-tools-status": t.messageToolsStatus,
|
|
11933
|
-
"message-tools-tippy-options":
|
|
11936
|
+
"message-tools-tippy-options": R.value,
|
|
11934
11937
|
messages: t.messages,
|
|
11935
11938
|
"on-agent-action": Je,
|
|
11936
11939
|
"on-agent-feedback": t.onAgentFeedback,
|
|
@@ -11943,8 +11946,8 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11943
11946
|
"user-message-tools": t.userMessageTools,
|
|
11944
11947
|
onStopStreaming: i[2] || (i[2] = (e) => j("stopStreaming"))
|
|
11945
11948
|
}, {
|
|
11946
|
-
group:
|
|
11947
|
-
default:
|
|
11949
|
+
group: U(({ group: e }) => [P(n.$slots, "group", C(h({ group: e })))]),
|
|
11950
|
+
default: U(({ message: e, messageToolsStatus: t, onInterruptResume: r }) => [P(n.$slots, "message", C(h({
|
|
11948
11951
|
message: e,
|
|
11949
11952
|
messageToolsStatus: t,
|
|
11950
11953
|
onInterruptResume: r
|
|
@@ -11968,24 +11971,24 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
11968
11971
|
"update-tools",
|
|
11969
11972
|
"user-message-tools"
|
|
11970
11973
|
])) : s("", !0)];
|
|
11971
|
-
}) : (k(), c("div", jy, [
|
|
11974
|
+
}) : (k(), c("div", jy, [P(n.$slots, "welcome", C(h({
|
|
11972
11975
|
openingRemark: t.openingRemark,
|
|
11973
11976
|
welcomeTitle: t.welcomeTitle
|
|
11974
11977
|
})), () => {
|
|
11975
11978
|
var e;
|
|
11976
11979
|
return [
|
|
11977
|
-
f(
|
|
11978
|
-
l("h2", My,
|
|
11980
|
+
f(z(mn)),
|
|
11981
|
+
l("h2", My, L((e = t.welcomeTitle) == null ? z(K)("你好,我是小鲸") : e), 1),
|
|
11979
11982
|
t.openingRemark ? (k(), c("div", Ny, [f(ld, { content: t.openingRemark }, null, 8, ["content"])])) : s("", !0)
|
|
11980
11983
|
];
|
|
11981
|
-
})])), m.value ===
|
|
11984
|
+
})])), m.value === z(cn).Share ? s("", !0) : (k(), c(e, { key: 2 }, [z(Oe) ? (k(), o(Dy, {
|
|
11982
11985
|
key: 0,
|
|
11983
|
-
"is-all-selected":
|
|
11986
|
+
"is-all-selected": z(ke),
|
|
11984
11987
|
loading: !1,
|
|
11985
11988
|
"selected-count": he.value.length,
|
|
11986
11989
|
onCancel: Xe,
|
|
11987
11990
|
onConfirm: Ye,
|
|
11988
|
-
onToggleAll:
|
|
11991
|
+
onToggleAll: z(Ae)
|
|
11989
11992
|
}, null, 8, [
|
|
11990
11993
|
"is-all-selected",
|
|
11991
11994
|
"selected-count",
|
|
@@ -12009,23 +12012,23 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12009
12012
|
placeholder: t.placeholder,
|
|
12010
12013
|
prompts: t.prompts,
|
|
12011
12014
|
resources: t.resources,
|
|
12012
|
-
"send-disabled-tip":
|
|
12015
|
+
"send-disabled-tip": z(Ne),
|
|
12013
12016
|
"shortcut-id": (d = D.value) == null ? void 0 : d.id,
|
|
12014
12017
|
shortcuts: t.shortcuts,
|
|
12015
12018
|
skills: t.skills,
|
|
12016
12019
|
"support-upload": t.supportUpload,
|
|
12017
|
-
"tippy-options":
|
|
12020
|
+
"tippy-options": R.value,
|
|
12018
12021
|
onDeleteShortcut: Be,
|
|
12019
12022
|
onModelChange: i[5] || (i[5] = (e) => j("modelChange", e)),
|
|
12020
12023
|
onSelectShortcut: Ve,
|
|
12021
12024
|
"onUpdate:modelValue": He
|
|
12022
12025
|
}, {
|
|
12023
|
-
interrupt:
|
|
12026
|
+
interrupt: U(() => [z(Pe) ? (k(), o(z(og), {
|
|
12024
12027
|
key: 0,
|
|
12025
|
-
interrupt:
|
|
12028
|
+
interrupt: z(Pe),
|
|
12026
12029
|
"on-resume": t.onInterruptResume
|
|
12027
12030
|
}, {
|
|
12028
|
-
question:
|
|
12031
|
+
question: U(({ question: e, qIndex: t, answer: r, setAnswer: i, confirm: a }) => [P(n.$slots, "interruptQuestion", C(h({
|
|
12029
12032
|
question: e,
|
|
12030
12033
|
qIndex: t,
|
|
12031
12034
|
answer: r,
|
|
@@ -12033,9 +12036,9 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12033
12036
|
confirm: a
|
|
12034
12037
|
})))]),
|
|
12035
12038
|
_: 3
|
|
12036
|
-
}, 8, ["interrupt", "on-resume"])) : s("", !0),
|
|
12039
|
+
}, 8, ["interrupt", "on-resume"])) : s("", !0), z(Ne) ? (k(), o(jm, {
|
|
12037
12040
|
key: 1,
|
|
12038
|
-
content:
|
|
12041
|
+
content: z(Ne)
|
|
12039
12042
|
}, null, 8, ["content"])) : s("", !0)]),
|
|
12040
12043
|
_: 3
|
|
12041
12044
|
}, 8, [
|
|
@@ -12078,7 +12081,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12078
12081
|
}
|
|
12079
12082
|
},
|
|
12080
12083
|
setup(e) {
|
|
12081
|
-
let t = /* @__PURE__ */ new Map(), n =
|
|
12084
|
+
let t = /* @__PURE__ */ new Map(), n = I(!1), r = I([]), i = I(0);
|
|
12082
12085
|
return A(Bf, {
|
|
12083
12086
|
register: (e, n) => {
|
|
12084
12087
|
t.set(e, n);
|
|
@@ -12090,7 +12093,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12090
12093
|
let a = [...t.keys()], o = a.map((e) => t.get(e)()), s = a.indexOf(e);
|
|
12091
12094
|
r.value = o, i.value = s >= 0 ? s : 0, n.value = !0;
|
|
12092
12095
|
}
|
|
12093
|
-
}), (t, a) => (k(), c("div", Fy, [
|
|
12096
|
+
}), (t, a) => (k(), c("div", Fy, [P(t.$slots, "default"), n.value ? (k(), o(_p, {
|
|
12094
12097
|
key: 0,
|
|
12095
12098
|
current: i.value,
|
|
12096
12099
|
"onUpdate:current": a[0] || (a[0] = (e) => i.value = e),
|
|
@@ -12102,7 +12105,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12102
12105
|
"show-info": e.showInfo
|
|
12103
12106
|
}, u({ _: 2 }, [t.$slots.extra ? {
|
|
12104
12107
|
name: "extra",
|
|
12105
|
-
fn:
|
|
12108
|
+
fn: U(() => [P(t.$slots, "extra")]),
|
|
12106
12109
|
key: "0"
|
|
12107
12110
|
} : void 0]), 1032, [
|
|
12108
12111
|
"current",
|
|
@@ -12144,7 +12147,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12144
12147
|
"preview"
|
|
12145
12148
|
],
|
|
12146
12149
|
setup(e, { expose: t, emit: n }) {
|
|
12147
|
-
let r = e, i = n, d = Symbol(), p = _(Bf, null), m =
|
|
12150
|
+
let r = e, i = n, d = Symbol(), p = _(Bf, null), m = M(), h = I("loading"), g = I(!1), v = I(!r.lazy), y = null, b = a(() => {
|
|
12148
12151
|
var e;
|
|
12149
12152
|
return ((e = r.previewProps) == null ? void 0 : e.src) || r.src;
|
|
12150
12153
|
}), x = () => {
|
|
@@ -12157,7 +12160,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12157
12160
|
resolution: e == null ? void 0 : e.resolution,
|
|
12158
12161
|
downloadUrl: e == null ? void 0 : e.downloadUrl
|
|
12159
12162
|
};
|
|
12160
|
-
}, C =
|
|
12163
|
+
}, C = I(0), D = a(() => {
|
|
12161
12164
|
if (!r.lazy || v.value) {
|
|
12162
12165
|
let e = r.src;
|
|
12163
12166
|
return C.value === 0 ? e : `${e}${e.includes("?") ? "&" : "?"}_t=${C.value}`;
|
|
@@ -12172,24 +12175,24 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12172
12175
|
objectFit: "cover"
|
|
12173
12176
|
}, j = (e) => {
|
|
12174
12177
|
h.value = "loaded", i("load", e);
|
|
12175
|
-
},
|
|
12178
|
+
}, N = (e) => {
|
|
12176
12179
|
h.value = "error", i("error", e);
|
|
12177
|
-
},
|
|
12180
|
+
}, F = () => {
|
|
12178
12181
|
h.value = "loading", C.value = Date.now();
|
|
12179
|
-
},
|
|
12182
|
+
}, te = () => {
|
|
12180
12183
|
!r.preview || h.value !== "loaded" || (p ? p.preview(d) : g.value = !0, i("preview"));
|
|
12181
|
-
},
|
|
12184
|
+
}, ne = () => {
|
|
12182
12185
|
!r.lazy || !m.value || (y = new IntersectionObserver((e) => {
|
|
12183
12186
|
var t;
|
|
12184
12187
|
(t = e[0]) != null && t.isIntersecting && (v.value = !0, y == null || y.disconnect(), y = null);
|
|
12185
12188
|
}, { rootMargin: "200px" }), y.observe(m.value));
|
|
12186
|
-
},
|
|
12189
|
+
}, R = () => {
|
|
12187
12190
|
y == null || y.disconnect(), y = null;
|
|
12188
12191
|
};
|
|
12189
12192
|
return E(() => {
|
|
12190
|
-
|
|
12193
|
+
ne(), p == null || p.register(d, x);
|
|
12191
12194
|
}), T(() => {
|
|
12192
|
-
|
|
12195
|
+
R(), p == null || p.unregister(d);
|
|
12193
12196
|
}), t({ previewVisible: g }), (t, n) => (k(), c("div", {
|
|
12194
12197
|
ref_key: "containerRef",
|
|
12195
12198
|
ref: m,
|
|
@@ -12198,7 +12201,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12198
12201
|
"ai-image--preview": e.preview && h.value === "loaded"
|
|
12199
12202
|
}]),
|
|
12200
12203
|
style: w(A.value),
|
|
12201
|
-
onClick:
|
|
12204
|
+
onClick: te
|
|
12202
12205
|
}, [
|
|
12203
12206
|
h.value !== "error" && D.value ? (k(), c("img", {
|
|
12204
12207
|
key: 0,
|
|
@@ -12206,17 +12209,17 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12206
12209
|
class: "ai-image-inner",
|
|
12207
12210
|
src: D.value,
|
|
12208
12211
|
style: ee,
|
|
12209
|
-
onError:
|
|
12212
|
+
onError: N,
|
|
12210
12213
|
onLoad: j
|
|
12211
12214
|
}, null, 40, Ly)) : s("", !0),
|
|
12212
|
-
h.value === "error" ? (k(), c("div", Ry, [f(
|
|
12215
|
+
h.value === "error" ? (k(), c("div", Ry, [f(z(xn), { class: "ai-image-error-icon" })])) : s("", !0),
|
|
12213
12216
|
h.value === "error" ? (k(), c("div", {
|
|
12214
12217
|
key: 2,
|
|
12215
12218
|
class: "ai-image-error-overlay",
|
|
12216
|
-
onClick:
|
|
12217
|
-
}, [f(
|
|
12218
|
-
|
|
12219
|
-
!
|
|
12219
|
+
onClick: F
|
|
12220
|
+
}, [f(z(Nr), { class: "ai-image-reload-icon" }), l("span", null, L(z(K)("重新加载")), 1)])) : s("", !0),
|
|
12221
|
+
P(t.$slots, "default"),
|
|
12222
|
+
!z(p) && e.preview && g.value ? (k(), o(_p, {
|
|
12220
12223
|
key: 3,
|
|
12221
12224
|
visible: g.value,
|
|
12222
12225
|
"onUpdate:visible": n[0] || (n[0] = (e) => g.value = e),
|
|
@@ -12225,7 +12228,7 @@ var om = { class: "ai-input-attachment" }, sm = { class: "ai-input-attachment-de
|
|
|
12225
12228
|
"show-info": e.showInfo
|
|
12226
12229
|
}, u({ _: 2 }, [t.$slots.extra ? {
|
|
12227
12230
|
name: "extra",
|
|
12228
|
-
fn:
|
|
12231
|
+
fn: U(() => [P(t.$slots, "extra")]),
|
|
12229
12232
|
key: "0"
|
|
12230
12233
|
} : void 0]), 1032, [
|
|
12231
12234
|
"visible",
|