@blueking/chat-x 0.0.49-beta.2 → 0.0.49-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/use-artifact-preview-loader.d.ts +2 -4
- package/dist/composables/use-artifact-preview.d.ts +4 -11
- package/dist/composables/use-container-scroll.d.ts +9 -2
- package/dist/index.css +1 -1
- package/dist/index.js +875 -864
- package/dist/index.js.map +1 -1
- package/dist/mcp/generated/docs/assistant-message.md +19 -15
- package/dist/mcp/generated/docs/chat-container.md +3 -3
- package/dist/mcp/generated/docs/file-artifact-panel.md +4 -4
- package/dist/mcp/generated/docs/message-container.md +3 -2
- package/dist/mcp/generated/docs/toolcall-render.md +18 -10
- package/dist/mcp/generated/docs/use-artifact-preview.md +5 -5
- package/dist/mcp/generated/docs/use-container-scroll.md +6 -2
- package/dist/mcp/generated/docs/use-message-group.md +8 -5
- package/dist/mcp/generated/index.json +4 -4
- 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
|
|
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 j, readonly as M, ref as ee, renderList as N, renderSlot as P, resolveDynamicComponent as F, shallowRef as I, toDisplayString as L, toRef as te, toValue as ne, unref as R, useAttrs as z, useModel as B, useSlots as re, useTemplateRef as V, vShow as ie, watch as H, watchEffect as ae, watchPostEffect as oe, withCtx as U, withDirectives as W, withKeys as se, withModifiers as ce } from "vue";
|
|
2
|
+
import { Button as le, Checkbox as ue, Exception as de, Form as fe, Input as pe, Loading as me, Message as he, Radio as ge, ResizeLayout as _e, Select as ve, Switcher as ye, Tab as be } from "bkui-vue";
|
|
3
3
|
import { Tippy as xe, directive as Se } from "vue-tippy";
|
|
4
4
|
import "tippy.js/dist/tippy.css";
|
|
5
5
|
import Ce from "tippy.js";
|
|
@@ -1583,12 +1583,12 @@ var Gt = m({
|
|
|
1583
1583
|
"is-disabled": e.disabled
|
|
1584
1584
|
}]),
|
|
1585
1585
|
onClick: i
|
|
1586
|
-
}, [e.loading ? (k(), o(
|
|
1586
|
+
}, [e.loading ? (k(), o(R(me), {
|
|
1587
1587
|
key: 0,
|
|
1588
1588
|
mode: "spin",
|
|
1589
1589
|
size: "mini",
|
|
1590
1590
|
theme: "primary"
|
|
1591
|
-
})) :
|
|
1591
|
+
})) : P(t.$slots, "icon", { key: 1 }), P(t.$slots, "title", {}, () => [d(L(e.title), 1)])], 2));
|
|
1592
1592
|
}
|
|
1593
1593
|
}), pr = { class: "ai-loading-ring" }, mr = {
|
|
1594
1594
|
fill: "none",
|
|
@@ -1692,8 +1692,8 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1692
1692
|
},
|
|
1693
1693
|
emits: ["click"],
|
|
1694
1694
|
setup(t, { expose: n, emit: r }) {
|
|
1695
|
-
let i = t, a =
|
|
1696
|
-
|
|
1695
|
+
let i = t, a = I(!1), l = r;
|
|
1696
|
+
H(() => {
|
|
1697
1697
|
var e;
|
|
1698
1698
|
return (e = i.shortcut) == null ? void 0 : e.icon;
|
|
1699
1699
|
}, () => {
|
|
@@ -1701,7 +1701,7 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1701
1701
|
}, { immediate: !0 });
|
|
1702
1702
|
let u = (e) => {
|
|
1703
1703
|
l("click", e);
|
|
1704
|
-
}, f =
|
|
1704
|
+
}, f = V("el");
|
|
1705
1705
|
return n({ get $el() {
|
|
1706
1706
|
return f.value;
|
|
1707
1707
|
} }), (n, r) => (k(), c("button", {
|
|
@@ -1709,9 +1709,9 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1709
1709
|
ref: f,
|
|
1710
1710
|
class: S(["ai-shortcut-btn", { "is-menu-mode": t.mode === "menu" }]),
|
|
1711
1711
|
onClick: r[1] || (r[1] = (e) => u(t.shortcut))
|
|
1712
|
-
}, [
|
|
1712
|
+
}, [P(n.$slots, "default", {}, () => {
|
|
1713
1713
|
var n, i, l, u, f, p, m;
|
|
1714
|
-
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(
|
|
1714
|
+
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(R(Qn), {
|
|
1715
1715
|
key: 1,
|
|
1716
1716
|
class: "ai-shortcut-btn-icon"
|
|
1717
1717
|
})) : (k(), c("img", {
|
|
@@ -1722,14 +1722,14 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1722
1722
|
}, null, 40, xr))], 64)) : (k(), c("span", {
|
|
1723
1723
|
key: 1,
|
|
1724
1724
|
class: S(t.shortcut.icon)
|
|
1725
|
-
}, null, 2))], 64)) : (k(), o(
|
|
1725
|
+
}, 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), {
|
|
1726
1726
|
key: 1,
|
|
1727
1727
|
class: "ai-shortcut-btn-icon"
|
|
1728
|
-
}))], 64)) : t.shortcut && !((f = t.shortcut.components) != null && f.length) ? (k(), o(
|
|
1728
|
+
}))], 64)) : t.shortcut && !((f = t.shortcut.components) != null && f.length) ? (k(), o(R(Qn), {
|
|
1729
1729
|
key: 1,
|
|
1730
1730
|
class: "ai-shortcut-btn-icon"
|
|
1731
|
-
})) : s("", !0), d(" " +
|
|
1732
|
-
}),
|
|
1731
|
+
})) : s("", !0), d(" " + L(((p = t.shortcut) == null ? void 0 : p.alias) || ((m = t.shortcut) == null ? void 0 : m.name)), 1)];
|
|
1732
|
+
}), P(n.$slots, "append")], 2));
|
|
1733
1733
|
}
|
|
1734
1734
|
}), Cr = { class: "ai-selection-popover-content" }, wr = {
|
|
1735
1735
|
key: 0,
|
|
@@ -1747,10 +1747,10 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1747
1747
|
}),
|
|
1748
1748
|
emits: /* @__PURE__ */ y(["selectShortcut", "selectionChange"], ["update:visible"]),
|
|
1749
1749
|
setup(n, { emit: i }) {
|
|
1750
|
-
let a = n, u =
|
|
1750
|
+
let a = n, u = B(n, "visible"), d = i, p = V("popoverRef"), m = V("moreMenuRef"), h = I({
|
|
1751
1751
|
x: 0,
|
|
1752
1752
|
y: 0
|
|
1753
|
-
}), g =
|
|
1753
|
+
}), g = I(""), _ = I(null), v = I(!1), y = (e) => {
|
|
1754
1754
|
if ((e == null ? void 0 : e.shadowRoot) instanceof ShadowRoot) {
|
|
1755
1755
|
try {
|
|
1756
1756
|
let t = e.shadowRoot;
|
|
@@ -1844,24 +1844,24 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1844
1844
|
}, e);
|
|
1845
1845
|
}, A = () => {
|
|
1846
1846
|
D(200);
|
|
1847
|
-
},
|
|
1847
|
+
}, j = () => {
|
|
1848
1848
|
D(300);
|
|
1849
|
-
},
|
|
1849
|
+
}, M = (e) => {
|
|
1850
1850
|
var t;
|
|
1851
1851
|
u.value && (t = p.value) != null && t.contains(e.target) || S();
|
|
1852
|
-
},
|
|
1852
|
+
}, ee = (e) => {
|
|
1853
1853
|
var t;
|
|
1854
1854
|
!_.value || !u.value || e.target instanceof HTMLElement && e.target.contains((t = _.value) == null ? void 0 : t.anchorNode) && S();
|
|
1855
|
-
},
|
|
1855
|
+
}, F = () => {
|
|
1856
1856
|
var e;
|
|
1857
1857
|
(e = m.value) == null || e.show();
|
|
1858
1858
|
};
|
|
1859
1859
|
return E(() => {
|
|
1860
|
-
document.addEventListener("selectionchange",
|
|
1860
|
+
document.addEventListener("selectionchange", j), document.addEventListener("mouseup", A), document.addEventListener("mousedown", M), document.addEventListener("scroll", ee, !0), window.addEventListener("resize", S), window.addEventListener("blur", S);
|
|
1861
1861
|
}), O(() => {
|
|
1862
|
-
document.removeEventListener("selectionchange",
|
|
1862
|
+
document.removeEventListener("selectionchange", j), document.removeEventListener("mouseup", A), document.removeEventListener("mousedown", M), document.removeEventListener("scroll", ee, !0), window.removeEventListener("resize", S), window.removeEventListener("blur", S);
|
|
1863
1863
|
}), (i, a) => (k(), o(t, { to: "body" }, [f(r, { name: "ai-fade" }, {
|
|
1864
|
-
default:
|
|
1864
|
+
default: U(() => [u.value ? (k(), c("div", {
|
|
1865
1865
|
key: 0,
|
|
1866
1866
|
ref_key: "popoverRef",
|
|
1867
1867
|
ref: p,
|
|
@@ -1869,18 +1869,18 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1869
1869
|
style: w({
|
|
1870
1870
|
left: `${h.value.x}px`,
|
|
1871
1871
|
top: `${h.value.y}px`,
|
|
1872
|
-
zIndex:
|
|
1873
|
-
"--selection-z-index":
|
|
1872
|
+
zIndex: R(Ot),
|
|
1873
|
+
"--selection-z-index": R(Ot)
|
|
1874
1874
|
}),
|
|
1875
|
-
onMousedown: a[2] || (a[2] =
|
|
1876
|
-
}, [l("div", Cr, [
|
|
1875
|
+
onMousedown: a[2] || (a[2] = ce(() => {}, ["stop"]))
|
|
1876
|
+
}, [l("div", Cr, [P(i.$slots, "default", { shortcuts: n.shortcuts }, () => [(k(!0), c(e, null, N(n.shortcuts.slice(0, n.maxShortcutCount), (t, r) => (k(), c(e, { key: t.id }, [r < n.maxShortcutCount ? (k(), o(Sr, {
|
|
1877
1877
|
key: 0,
|
|
1878
1878
|
shortcut: t,
|
|
1879
1879
|
onClick: (e) => C(t)
|
|
1880
1880
|
}, null, 8, ["shortcut", "onClick"])) : s("", !0)], 64))), 128)), n.shortcuts.length > n.maxShortcutCount ? (k(), c(e, { key: 0 }, [a[3] || (a[3] = l("div", {
|
|
1881
1881
|
class: "ai-divider",
|
|
1882
1882
|
style: { margin: "0 4px" }
|
|
1883
|
-
}, null, -1)), f(
|
|
1883
|
+
}, null, -1)), f(R(xe), {
|
|
1884
1884
|
ref_key: "moreMenuRef",
|
|
1885
1885
|
ref: m,
|
|
1886
1886
|
arrow: !1,
|
|
@@ -1895,17 +1895,17 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1895
1895
|
v.value = !0;
|
|
1896
1896
|
})
|
|
1897
1897
|
}, {
|
|
1898
|
-
content:
|
|
1898
|
+
content: U(() => [v.value ? (k(), c("div", wr, [(k(!0), c(e, null, N(n.shortcuts.slice(n.maxShortcutCount), (e) => (k(), o(Sr, {
|
|
1899
1899
|
key: e.id,
|
|
1900
1900
|
mode: "menu",
|
|
1901
1901
|
shortcut: e,
|
|
1902
1902
|
onClick: (t) => C(e)
|
|
1903
1903
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : s("", !0)]),
|
|
1904
|
-
default:
|
|
1904
|
+
default: U(() => [f(Sr, {
|
|
1905
1905
|
style: { width: "28px" },
|
|
1906
|
-
onClick:
|
|
1906
|
+
onClick: F
|
|
1907
1907
|
}, {
|
|
1908
|
-
default:
|
|
1908
|
+
default: U(() => [f(R(Wn), { class: "shortcut-btn-more-icon" })]),
|
|
1909
1909
|
_: 1
|
|
1910
1910
|
})]),
|
|
1911
1911
|
_: 1
|
|
@@ -1914,7 +1914,7 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1914
1914
|
})]));
|
|
1915
1915
|
}
|
|
1916
1916
|
}), Er = (e, t, n) => {
|
|
1917
|
-
let r =
|
|
1917
|
+
let r = I([]), i = function() {
|
|
1918
1918
|
var i = Z(function* () {
|
|
1919
1919
|
if (!e.value || t.value.length === 0) return;
|
|
1920
1920
|
yield x();
|
|
@@ -1933,7 +1933,7 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1933
1933
|
return i.apply(this, arguments);
|
|
1934
1934
|
};
|
|
1935
1935
|
}(), a = null;
|
|
1936
|
-
return
|
|
1936
|
+
return H([t, n.moreItemRef], () => {
|
|
1937
1937
|
x(() => {
|
|
1938
1938
|
i();
|
|
1939
1939
|
});
|
|
@@ -1954,14 +1954,14 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1954
1954
|
props: { shortcuts: {} },
|
|
1955
1955
|
emits: ["selectShortcut"],
|
|
1956
1956
|
setup(t, { emit: n }) {
|
|
1957
|
-
let r = () => document.body, i = t, u = n, d =
|
|
1957
|
+
let r = () => document.body, i = t, u = n, d = V("containerRef"), p = I([]), m = V("moreMenuRef"), h = V("moreBtnRef"), { visibleItems: g } = Er(d, p, {
|
|
1958
1958
|
items: a(() => i.shortcuts),
|
|
1959
1959
|
gap: Or,
|
|
1960
1960
|
moreItemRef: h
|
|
1961
|
-
}), _ = a(() => i.shortcuts.filter((e) => !g.value.includes(e))), v =
|
|
1961
|
+
}), _ = a(() => i.shortcuts.filter((e) => !g.value.includes(e))), v = I(!1), y = (e, t) => {
|
|
1962
1962
|
e && "$el" in e ? p.value[t] = e.$el : e && e instanceof HTMLElement && (p.value[t] = e);
|
|
1963
1963
|
};
|
|
1964
|
-
|
|
1964
|
+
H(() => i.shortcuts, () => {
|
|
1965
1965
|
p.value = Array(i.shortcuts.length).fill(null);
|
|
1966
1966
|
}, { deep: !0 });
|
|
1967
1967
|
let b = () => {
|
|
@@ -1969,7 +1969,7 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1969
1969
|
}, x = (e) => {
|
|
1970
1970
|
v.value = !1, u("selectShortcut", e);
|
|
1971
1971
|
};
|
|
1972
|
-
return
|
|
1972
|
+
return H(v, (e) => {
|
|
1973
1973
|
if (e) {
|
|
1974
1974
|
var t;
|
|
1975
1975
|
(t = m.value) == null || t.show();
|
|
@@ -1981,18 +1981,18 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
1981
1981
|
ref_key: "containerRef",
|
|
1982
1982
|
ref: d,
|
|
1983
1983
|
class: "ai-shortcut-btns"
|
|
1984
|
-
}, [(k(!0), c(e, null,
|
|
1984
|
+
}, [(k(!0), c(e, null, N(t.shortcuts, (e, t) => (k(), o(Sr, {
|
|
1985
1985
|
key: e.key || e.id,
|
|
1986
1986
|
ref_for: !0,
|
|
1987
1987
|
ref: (e) => y(e, t),
|
|
1988
|
-
class: S(["ai-shortcut-btns-item", { "ai-shortcut-btns-item-hidden": !
|
|
1988
|
+
class: S(["ai-shortcut-btns-item", { "ai-shortcut-btns-item-hidden": !R(g).includes(e) }]),
|
|
1989
1989
|
shortcut: e,
|
|
1990
1990
|
onClick: (t) => x(e)
|
|
1991
1991
|
}, null, 8, [
|
|
1992
1992
|
"class",
|
|
1993
1993
|
"shortcut",
|
|
1994
1994
|
"onClick"
|
|
1995
|
-
]))), 128)), _.value.length > 0 ? (k(), o(
|
|
1995
|
+
]))), 128)), _.value.length > 0 ? (k(), o(R(xe), {
|
|
1996
1996
|
key: 0,
|
|
1997
1997
|
ref_key: "moreMenuRef",
|
|
1998
1998
|
ref: m,
|
|
@@ -2002,24 +2002,24 @@ var xr = ["src"], Sr = /* @__PURE__ */ m({
|
|
|
2002
2002
|
offset: [0, 6],
|
|
2003
2003
|
theme: "ai-chat-box-light light",
|
|
2004
2004
|
trigger: "manual",
|
|
2005
|
-
"z-index":
|
|
2005
|
+
"z-index": R(Dt),
|
|
2006
2006
|
onHidden: i[0] || (i[0] = () => {
|
|
2007
2007
|
v.value = !1;
|
|
2008
2008
|
})
|
|
2009
2009
|
}, {
|
|
2010
|
-
content:
|
|
2010
|
+
content: U(() => [l("div", Dr, [(k(!0), c(e, null, N(_.value, (e) => (k(), o(Sr, {
|
|
2011
2011
|
key: e.id,
|
|
2012
2012
|
mode: "menu",
|
|
2013
2013
|
shortcut: e,
|
|
2014
2014
|
onClick: (t) => x(e)
|
|
2015
2015
|
}, null, 8, ["shortcut", "onClick"]))), 128))])]),
|
|
2016
|
-
default:
|
|
2016
|
+
default: U(() => [f(Sr, {
|
|
2017
2017
|
ref_key: "moreBtnRef",
|
|
2018
2018
|
ref: h,
|
|
2019
2019
|
class: "ai-shortcut-btns-item ai-shortcut-btns-more",
|
|
2020
2020
|
onClick: b
|
|
2021
2021
|
}, {
|
|
2022
|
-
default:
|
|
2022
|
+
default: U(() => [f(R($n), { class: "ai-shortcut-btns-more-icon" }), l("span", null, L(R(G)("更多")), 1)]),
|
|
2023
2023
|
_: 1
|
|
2024
2024
|
}, 512)]),
|
|
2025
2025
|
_: 1
|
|
@@ -2068,8 +2068,8 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2068
2068
|
},
|
|
2069
2069
|
emits: ["close", "submit"],
|
|
2070
2070
|
setup(t, { emit: n }) {
|
|
2071
|
-
let r = t, i = n, a =
|
|
2072
|
-
|
|
2071
|
+
let r = t, i = n, a = V("formRef"), s = j({}), u = I({});
|
|
2072
|
+
ae(() => {
|
|
2073
2073
|
var e;
|
|
2074
2074
|
if (r.formModel) for (let e in r.formModel) s[e] = r.formModel[e];
|
|
2075
2075
|
for (let o of (e = r == null ? void 0 : r.components) == null ? [] : e) if (o.key) {
|
|
@@ -2129,13 +2129,13 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2129
2129
|
i("close");
|
|
2130
2130
|
};
|
|
2131
2131
|
return (n, r) => (k(), c("div", Pr, [l("div", Fr, [
|
|
2132
|
-
f(
|
|
2133
|
-
l("span", Ir,
|
|
2134
|
-
f(
|
|
2132
|
+
f(R(Un), { class: "header-icon" }),
|
|
2133
|
+
l("span", Ir, L(t.alias || t.name), 1),
|
|
2134
|
+
f(R(Xn), {
|
|
2135
2135
|
class: "header-close",
|
|
2136
2136
|
onClick: y
|
|
2137
2137
|
})
|
|
2138
|
-
]), l("div", Lr, [f(
|
|
2138
|
+
]), l("div", Lr, [f(R(fe), {
|
|
2139
2139
|
ref_key: "formRef",
|
|
2140
2140
|
ref: a,
|
|
2141
2141
|
class: "shortcut-render-form",
|
|
@@ -2143,28 +2143,28 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2143
2143
|
model: s,
|
|
2144
2144
|
rules: u.value
|
|
2145
2145
|
}, {
|
|
2146
|
-
default:
|
|
2146
|
+
default: U(() => [(k(!0), c(e, null, N(t.components, (e, t) => (k(), o(R(fe).FormItem, b({
|
|
2147
2147
|
key: e.id,
|
|
2148
2148
|
ref_for: !0
|
|
2149
2149
|
}, m(e), {
|
|
2150
2150
|
class: "shortcut-render-form-item",
|
|
2151
2151
|
style: { gridColumn: p(e, t) }
|
|
2152
2152
|
}), {
|
|
2153
|
-
label:
|
|
2153
|
+
label: U(() => {
|
|
2154
2154
|
var t, n;
|
|
2155
|
-
return [l("span", Rr,
|
|
2155
|
+
return [l("span", Rr, L((t = e.name) == null ? (n = e.formItemProps) == null ? void 0 : n.label : t), 1)];
|
|
2156
2156
|
}),
|
|
2157
|
-
default:
|
|
2157
|
+
default: U(() => [(k(), o(F(h(e))))]),
|
|
2158
2158
|
_: 2
|
|
2159
|
-
}, 1040, ["style"]))), 128)), f(
|
|
2160
|
-
default:
|
|
2159
|
+
}, 1040, ["style"]))), 128)), f(R(fe).FormItem, { class: "shortcut-footer-item" }, {
|
|
2160
|
+
default: U(() => [l("div", zr, [f(R(le), {
|
|
2161
2161
|
theme: "primary",
|
|
2162
2162
|
onClick: _
|
|
2163
2163
|
}, {
|
|
2164
|
-
default:
|
|
2164
|
+
default: U(() => [d(L(R(G)("提交")), 1)]),
|
|
2165
2165
|
_: 1
|
|
2166
|
-
}), f(
|
|
2167
|
-
default:
|
|
2166
|
+
}), f(R(le), { onClick: v }, {
|
|
2167
|
+
default: U(() => [d(L(R(G)("取消")), 1)]),
|
|
2168
2168
|
_: 1
|
|
2169
2169
|
})])]),
|
|
2170
2170
|
_: 1
|
|
@@ -2173,9 +2173,9 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2173
2173
|
}, 8, ["model", "rules"])])]));
|
|
2174
2174
|
}
|
|
2175
2175
|
}), Vr = (e, t) => {
|
|
2176
|
-
let { easing: n = "ease-in-out", fadeDuration: r = 200 } = t || {}, i =
|
|
2177
|
-
return
|
|
2178
|
-
let t =
|
|
2176
|
+
let { easing: n = "ease-in-out", fadeDuration: r = 200 } = t || {}, i = ee([]), o = ee("");
|
|
2177
|
+
return H(() => e, (e) => {
|
|
2178
|
+
let t = ne(e);
|
|
2179
2179
|
if (t === o.value) return;
|
|
2180
2180
|
if (!(o.value && t.indexOf(o.value) === 0)) {
|
|
2181
2181
|
i.value = [t], o.value = t;
|
|
@@ -2190,60 +2190,48 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2190
2190
|
color: "inherit"
|
|
2191
2191
|
}))
|
|
2192
2192
|
};
|
|
2193
|
-
}, Hr = Symbol("ARTIFACT_PREVIEW_TOKEN"), Ur = "file-artifact", Wr =
|
|
2193
|
+
}, Hr = Symbol("ARTIFACT_PREVIEW_TOKEN"), Ur = "file-artifact", Wr = (e, t) => {
|
|
2194
2194
|
let n = document.createElement("a");
|
|
2195
2195
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
2196
|
-
},
|
|
2197
|
-
let t =
|
|
2196
|
+
}, Gr = (e) => {
|
|
2197
|
+
let t = I(""), n = /* @__PURE__ */ new Map(), r = a(() => {
|
|
2198
2198
|
var t;
|
|
2199
2199
|
return !!((t = e.getOnArtifactClick) != null && t.call(e));
|
|
2200
|
-
}),
|
|
2200
|
+
}), i = (e) => {
|
|
2201
2201
|
t.value = e;
|
|
2202
|
-
},
|
|
2202
|
+
}, o = (n) => {
|
|
2203
2203
|
let r = n.file.outputId;
|
|
2204
2204
|
t.value = r, e.onOpen(r);
|
|
2205
|
-
},
|
|
2206
|
-
var t = Z(function* (t
|
|
2207
|
-
var
|
|
2208
|
-
let
|
|
2209
|
-
if (
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
let s = r.get(o);
|
|
2215
|
-
if (s) return s;
|
|
2216
|
-
let c = (a = e.getOnArtifactClick) == null ? void 0 : a.call(e);
|
|
2217
|
-
if (!c) return {};
|
|
2218
|
-
let l = c(t).then((e) => {
|
|
2219
|
-
let t = e == null ? {} : e;
|
|
2220
|
-
return n.set(o, {
|
|
2221
|
-
expiresAt: Date.now() + Wr,
|
|
2222
|
-
urls: t
|
|
2223
|
-
}), r.delete(o), t;
|
|
2224
|
-
}).catch((e) => {
|
|
2225
|
-
throw r.delete(o), e;
|
|
2205
|
+
}, s = function() {
|
|
2206
|
+
var t = Z(function* (t) {
|
|
2207
|
+
var r;
|
|
2208
|
+
let i = t.outputId, a = n.get(i);
|
|
2209
|
+
if (a) return a;
|
|
2210
|
+
let o = (r = e.getOnArtifactClick) == null ? void 0 : r.call(e);
|
|
2211
|
+
if (!o) return {};
|
|
2212
|
+
let s = o(t).then((e) => (n.delete(i), e == null ? {} : e)).catch((e) => {
|
|
2213
|
+
throw n.delete(i), e;
|
|
2226
2214
|
});
|
|
2227
|
-
return
|
|
2215
|
+
return n.set(i, s), s;
|
|
2228
2216
|
});
|
|
2229
|
-
return function(e
|
|
2217
|
+
return function(e) {
|
|
2230
2218
|
return t.apply(this, arguments);
|
|
2231
2219
|
};
|
|
2232
2220
|
}();
|
|
2233
2221
|
return A(Hr, {
|
|
2234
2222
|
activeArtifactId: t,
|
|
2235
|
-
canResolveArtifactUrl:
|
|
2236
|
-
openPreview:
|
|
2237
|
-
resolveArtifactUrls:
|
|
2238
|
-
setActiveArtifactId:
|
|
2223
|
+
canResolveArtifactUrl: r,
|
|
2224
|
+
openPreview: o,
|
|
2225
|
+
resolveArtifactUrls: s,
|
|
2226
|
+
setActiveArtifactId: i
|
|
2239
2227
|
}), {
|
|
2240
2228
|
activeArtifactId: t,
|
|
2241
|
-
canResolveArtifactUrl:
|
|
2242
|
-
openPreview:
|
|
2243
|
-
resolveArtifactUrls:
|
|
2244
|
-
setActiveArtifactId:
|
|
2229
|
+
canResolveArtifactUrl: r,
|
|
2230
|
+
openPreview: o,
|
|
2231
|
+
resolveArtifactUrls: s,
|
|
2232
|
+
setActiveArtifactId: i
|
|
2245
2233
|
};
|
|
2246
|
-
},
|
|
2234
|
+
}, Kr = () => _(Hr, void 0), qr = typeof navigator < "u" && "clipboard" in navigator, Jr = (e) => {
|
|
2247
2235
|
let t = document.createElement("textarea");
|
|
2248
2236
|
t.value = e, t.style.position = "fixed", t.style.left = "-9999px", t.style.top = "-9999px", t.style.opacity = "0", document.body.appendChild(t), t.focus(), t.select();
|
|
2249
2237
|
try {
|
|
@@ -2253,15 +2241,15 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2253
2241
|
} finally {
|
|
2254
2242
|
document.body.removeChild(t);
|
|
2255
2243
|
}
|
|
2256
|
-
},
|
|
2244
|
+
}, Yr = () => ({ copy: function() {
|
|
2257
2245
|
var e = Z(function* (e) {
|
|
2258
2246
|
let t = !1;
|
|
2259
|
-
if (
|
|
2247
|
+
if (qr) try {
|
|
2260
2248
|
yield navigator.clipboard.writeText(e), t = !0;
|
|
2261
2249
|
} catch (n) {
|
|
2262
|
-
t =
|
|
2250
|
+
t = Jr(e);
|
|
2263
2251
|
}
|
|
2264
|
-
else t =
|
|
2252
|
+
else t = Jr(e);
|
|
2265
2253
|
he({
|
|
2266
2254
|
message: G(t ? "复制成功" : "复制失败"),
|
|
2267
2255
|
theme: t ? "success" : "error"
|
|
@@ -2270,11 +2258,11 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2270
2258
|
return function(t) {
|
|
2271
2259
|
return e.apply(this, arguments);
|
|
2272
2260
|
};
|
|
2273
|
-
}() }),
|
|
2274
|
-
let e =
|
|
2261
|
+
}() }), Xr = () => {
|
|
2262
|
+
let e = I({
|
|
2275
2263
|
column: 0,
|
|
2276
2264
|
line: 0
|
|
2277
|
-
}), t =
|
|
2265
|
+
}), t = I([]);
|
|
2278
2266
|
return {
|
|
2279
2267
|
commandSelection: e,
|
|
2280
2268
|
docSnapshot: t,
|
|
@@ -2289,8 +2277,8 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2289
2277
|
t.value = e;
|
|
2290
2278
|
}
|
|
2291
2279
|
};
|
|
2292
|
-
},
|
|
2293
|
-
let n =
|
|
2280
|
+
}, Zr = Symbol("CONTAINER_SCROLL_TOKEN"), Qr = 100, $r = 600, ei = (e, t) => {
|
|
2281
|
+
let n = I(!1), r = null, i = I(0), o = I(!0), s = p((e, t) => {
|
|
2294
2282
|
let n, r = !1;
|
|
2295
2283
|
return {
|
|
2296
2284
|
get() {
|
|
@@ -2307,63 +2295,77 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2307
2295
|
}
|
|
2308
2296
|
};
|
|
2309
2297
|
});
|
|
2310
|
-
A(
|
|
2298
|
+
A(Zr, a(() => ({
|
|
2311
2299
|
autoScrollEnabled: o.value,
|
|
2312
2300
|
isScrollBottom: n,
|
|
2313
2301
|
scrollBottomHeight: i,
|
|
2314
2302
|
debouncedShowScrollBottomBtn: s,
|
|
2315
|
-
|
|
2316
|
-
|
|
2303
|
+
jumpToBottom: l,
|
|
2304
|
+
toScrollBottom: u,
|
|
2305
|
+
toScrollTop: d
|
|
2317
2306
|
})));
|
|
2318
2307
|
let c = () => {
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2308
|
+
let t = ne(e);
|
|
2309
|
+
return t ? Math.max(0, t.scrollHeight - t.scrollTop - t.clientHeight) : 0;
|
|
2310
|
+
}, l = () => {
|
|
2311
|
+
let t = ne(e);
|
|
2312
|
+
t && (o.value = !0, t.scrollTop = t.scrollHeight);
|
|
2313
|
+
}, u = (e) => {
|
|
2314
|
+
var n;
|
|
2315
|
+
o.value = !0;
|
|
2316
|
+
let r = e == null ? c() > 600 ? "auto" : "smooth" : e;
|
|
2317
|
+
if (r === "auto") {
|
|
2318
|
+
l();
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
(n = ne(t)) == null || n.scrollIntoView({
|
|
2322
|
+
behavior: r,
|
|
2322
2323
|
block: "end"
|
|
2323
2324
|
});
|
|
2324
|
-
},
|
|
2325
|
+
}, d = () => {
|
|
2325
2326
|
var t;
|
|
2326
|
-
(t =
|
|
2327
|
+
(t = ne(e)) == null || t.scrollTo({
|
|
2327
2328
|
top: 0,
|
|
2328
2329
|
behavior: "smooth"
|
|
2329
2330
|
});
|
|
2330
|
-
},
|
|
2331
|
-
let t =
|
|
2331
|
+
}, f = () => {
|
|
2332
|
+
let t = ne(e);
|
|
2332
2333
|
if (!t) return;
|
|
2333
2334
|
let { scrollHeight: r, scrollTop: a, clientHeight: o } = t, c = r - a - o;
|
|
2334
2335
|
i.value = Math.max(0, c), s.value = !n.value && i.value > 100;
|
|
2335
|
-
},
|
|
2336
|
+
}, m = (e) => {
|
|
2336
2337
|
e.deltaY < 0 && (o.value = !1);
|
|
2337
2338
|
};
|
|
2338
2339
|
return E(() => {
|
|
2339
|
-
|
|
2340
|
-
let a =
|
|
2341
|
-
!a || !c || (r == null || r.disconnect(), a.removeEventListener("scroll",
|
|
2340
|
+
ae(() => {
|
|
2341
|
+
let a = ne(e), c = ne(t);
|
|
2342
|
+
!a || !c || (r == null || r.disconnect(), a.removeEventListener("scroll", f), a.removeEventListener("wheel", m), f(), r = new IntersectionObserver((e) => {
|
|
2342
2343
|
e.forEach((e) => {
|
|
2343
|
-
e.isIntersecting ? (n.value = !0, i.value = 0, o.value = !0, s.value = !1) : (n.value = !1,
|
|
2344
|
+
e.isIntersecting ? (n.value = !0, i.value = 0, o.value = !0, s.value = !1) : (n.value = !1, f());
|
|
2344
2345
|
});
|
|
2345
|
-
}), r.observe(c), a.addEventListener("scroll",
|
|
2346
|
+
}), r.observe(c), a.addEventListener("scroll", f, { passive: !0 }), a.addEventListener("wheel", m, { passive: !0 }));
|
|
2346
2347
|
});
|
|
2347
2348
|
}), D(() => {
|
|
2348
2349
|
r == null || r.disconnect();
|
|
2349
|
-
let t =
|
|
2350
|
-
t && (t.removeEventListener("scroll",
|
|
2350
|
+
let t = ne(e);
|
|
2351
|
+
t && (t.removeEventListener("scroll", f), t.removeEventListener("wheel", m));
|
|
2351
2352
|
}), {
|
|
2352
2353
|
autoScrollEnabled: o,
|
|
2353
2354
|
isScrollBottom: n,
|
|
2354
2355
|
scrollBottomHeight: i,
|
|
2355
|
-
|
|
2356
|
-
|
|
2356
|
+
jumpToBottom: l,
|
|
2357
|
+
toScrollBottom: u,
|
|
2358
|
+
toScrollTop: d,
|
|
2357
2359
|
debouncedShowScrollBottomBtn: s
|
|
2358
2360
|
};
|
|
2359
|
-
}, ti = () => _(
|
|
2361
|
+
}, ti = () => _(Zr, void 0), ni = Symbol("CUSTOM_TAB_TOKEN"), ri = "execution", ii = 100;
|
|
2360
2362
|
function ai(e) {
|
|
2361
2363
|
let t = {
|
|
2362
2364
|
closable: !1,
|
|
2363
2365
|
label: G("执行情况"),
|
|
2364
2366
|
name: ri,
|
|
2365
2367
|
order: 0
|
|
2366
|
-
}, n =
|
|
2368
|
+
}, n = I([t]), r = ee(t), i = I(!0), o = a(() => {
|
|
2367
2369
|
var t, n;
|
|
2368
2370
|
return (t = (n = e.executionTabVisible) == null ? void 0 : n.call(e)) == null ? !0 : t;
|
|
2369
2371
|
}), s = (e) => e.name === "execution" ? o.value : e.visible !== !1, c = a(() => n.value.filter(s).slice().sort((e, t) => {
|
|
@@ -2391,7 +2393,7 @@ function ai(e) {
|
|
|
2391
2393
|
}, m = () => {
|
|
2392
2394
|
n.value = [t], r.value = t, i.value = !0;
|
|
2393
2395
|
};
|
|
2394
|
-
return
|
|
2396
|
+
return H(c, (e) => {
|
|
2395
2397
|
s(r.value) || e.length && p(e[0]);
|
|
2396
2398
|
}), A(ni, {
|
|
2397
2399
|
tabs: n,
|
|
@@ -2429,14 +2431,14 @@ var oi = () => _(ni), si = (() => {
|
|
|
2429
2431
|
change: "webkitfullscreenchange"
|
|
2430
2432
|
} : null;
|
|
2431
2433
|
})(), ci = (e) => {
|
|
2432
|
-
let t = !!si, n =
|
|
2434
|
+
let t = !!si, n = I(!1), r = () => {
|
|
2433
2435
|
var t;
|
|
2434
|
-
return (t =
|
|
2436
|
+
return (t = R(e)) == null ? typeof document > "u" ? null : document.documentElement : t;
|
|
2435
2437
|
}, i = () => {
|
|
2436
2438
|
var e;
|
|
2437
2439
|
return si ? (e = document[si.element]) == null ? null : e : null;
|
|
2438
2440
|
}, a = () => {
|
|
2439
|
-
let t = i(), r =
|
|
2441
|
+
let t = i(), r = R(e);
|
|
2440
2442
|
n.value = r ? t === r : !!t;
|
|
2441
2443
|
}, o = function() {
|
|
2442
2444
|
var e = Z(function* () {
|
|
@@ -2465,7 +2467,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2465
2467
|
document.removeEventListener(si.change, a);
|
|
2466
2468
|
})), {
|
|
2467
2469
|
isSupported: t,
|
|
2468
|
-
isFullScreen:
|
|
2470
|
+
isFullScreen: M(n),
|
|
2469
2471
|
enter: o,
|
|
2470
2472
|
exit: s,
|
|
2471
2473
|
toggle: () => n.value ? s() : o()
|
|
@@ -2474,7 +2476,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2474
2476
|
size: e.size,
|
|
2475
2477
|
supportUpload: e.supportUpload
|
|
2476
2478
|
}), di = () => _(li, void 0), fi = (e) => {
|
|
2477
|
-
let t =
|
|
2479
|
+
let t = I(0);
|
|
2478
2480
|
E(() => {
|
|
2479
2481
|
window.addEventListener("keydown", i, !0);
|
|
2480
2482
|
}), D(() => {
|
|
@@ -2556,8 +2558,8 @@ var oi = () => _(ni), si = (() => {
|
|
|
2556
2558
|
return e.reason === gt.AIDevToolApproval && _i.has((t = e.metadata) == null || (t = t.ticket) == null ? void 0 : t.status);
|
|
2557
2559
|
}).length : e;
|
|
2558
2560
|
}, 0), bi = (e) => {
|
|
2559
|
-
let t =
|
|
2560
|
-
|
|
2561
|
+
let t = ee([]), n = I(!1);
|
|
2562
|
+
ae(() => {
|
|
2561
2563
|
var n;
|
|
2562
2564
|
let r = [], i = [];
|
|
2563
2565
|
for (let t of e.messages.value) {
|
|
@@ -2613,7 +2615,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2613
2615
|
})) == null ? !1 : s
|
|
2614
2616
|
});
|
|
2615
2617
|
}
|
|
2616
|
-
((n = e.messages.value.at(-1)) == null ? void 0 : n.role) === q.User &&
|
|
2618
|
+
((n = e.messages.value.at(-1)) == null ? void 0 : n.role) === q.User && ne(e.renderMode) !== Ft.Share && i.push({
|
|
2617
2619
|
messages: [{
|
|
2618
2620
|
role: q.Loading,
|
|
2619
2621
|
content: "",
|
|
@@ -2668,7 +2670,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2668
2670
|
var e;
|
|
2669
2671
|
return (e = t.value) == null ? void 0 : e.filter((e) => e.type === q.User).every((e) => e.checked);
|
|
2670
2672
|
});
|
|
2671
|
-
return
|
|
2673
|
+
return H(e.selectedUserMessages, (e) => {
|
|
2672
2674
|
if (t.value.length) for (let [r, i] of t.value.entries()) {
|
|
2673
2675
|
var n;
|
|
2674
2676
|
if (i.type === q.Assistant) continue;
|
|
@@ -2715,7 +2717,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2715
2717
|
let t = e.parentElement;
|
|
2716
2718
|
return t ? xi(t) : document.body;
|
|
2717
2719
|
}, Si = (e) => {
|
|
2718
|
-
let t =
|
|
2720
|
+
let t = I(!1), n = null, r = I(null), i = () => {
|
|
2719
2721
|
t.value = !0, n && clearTimeout(n), n = setTimeout(() => {
|
|
2720
2722
|
t.value = !1;
|
|
2721
2723
|
}, 300);
|
|
@@ -2724,7 +2726,7 @@ var oi = () => _(ni), si = (() => {
|
|
|
2724
2726
|
};
|
|
2725
2727
|
return E(() => {
|
|
2726
2728
|
var t, n, o, s;
|
|
2727
|
-
r.value = xi(
|
|
2729
|
+
r.value = xi(ne(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);
|
|
2728
2730
|
}), D(() => {
|
|
2729
2731
|
var e, t;
|
|
2730
2732
|
(e = r.value) == null || e.removeEventListener("scroll", i), (t = r.value) == null || t.removeEventListener("scrollend", a);
|
|
@@ -2733,9 +2735,9 @@ var oi = () => _(ni), si = (() => {
|
|
|
2733
2735
|
scrollParent: r
|
|
2734
2736
|
};
|
|
2735
2737
|
}, Ci = Symbol("KEYWORD_TOKEN"), wi = Symbol("RENDER_MODE_TOKEN"), Ti = Symbol("COMMON_TIPPY_OPTIONS_TOKEN"), Ei = () => {
|
|
2736
|
-
let e =
|
|
2738
|
+
let e = I("");
|
|
2737
2739
|
return A(Ci, a(() => e.value)), { keyword: e };
|
|
2738
|
-
}, Di = ({ renderMode: e }) => (A(wi, a(() =>
|
|
2740
|
+
}, Di = ({ renderMode: e }) => (A(wi, a(() => ne(e))), { renderMode: e }), Oi = () => _(wi, a(() => Ft.Chat)), ki = (e) => {
|
|
2739
2741
|
A(Ti, e.tippyOptions);
|
|
2740
2742
|
}, Ai = () => _(Ci, void 0), ji = () => _(Ti, void 0), Mi = (e) => {
|
|
2741
2743
|
let t = Ai();
|
|
@@ -2812,14 +2814,14 @@ var oi = () => _(ni), si = (() => {
|
|
|
2812
2814
|
} })), s = (e) => {
|
|
2813
2815
|
n.disabled || r("click", n, e);
|
|
2814
2816
|
};
|
|
2815
|
-
return (t, n) =>
|
|
2817
|
+
return (t, n) => W((k(), c("div", {
|
|
2816
2818
|
class: S(["ai-tool-btn", {
|
|
2817
2819
|
"is-active": e.active,
|
|
2818
2820
|
"is-disabled": e.disabled
|
|
2819
2821
|
}]),
|
|
2820
2822
|
style: w({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
|
|
2821
2823
|
onClick: s
|
|
2822
|
-
}, [
|
|
2824
|
+
}, [P(t.$slots, "default", {}, () => [e.icon ? (k(), o(F(e.icon), { key: 0 })) : e.id && e.id in R(ur) ? (k(), o(F(R(ur)[e.id]), { key: 1 })) : (k(), c("div", Fi, L(e.name), 1))])], 6)), [[R(Se), i.value]]);
|
|
2823
2825
|
}
|
|
2824
2826
|
}), Li = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ri = /[\0-\x1F\x7F-\x9F]/, zi = /[\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]/, Bi = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/, Vi = /[\$\+<->\^`\|~\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]/, Hi = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Ui = /* @__PURE__ */ Ie({
|
|
2825
2827
|
Any: () => Li,
|
|
@@ -5643,7 +5645,7 @@ var Gc = (e) => {
|
|
|
5643
5645
|
props: { token: {} },
|
|
5644
5646
|
emits: ["mounted"],
|
|
5645
5647
|
setup(t, { emit: n }) {
|
|
5646
|
-
let r = t, i = n, o =
|
|
5648
|
+
let r = t, i = n, o = V("codeRef"), u = I(""), { copy: p } = Yr(), m = I([]), g = I(""), _ = I(""), v = /* @__PURE__ */ new Map(), y = (e) => {
|
|
5647
5649
|
for (let n of e) if (n.type === "fence" || n.type === "code_block") {
|
|
5648
5650
|
var t;
|
|
5649
5651
|
return {
|
|
@@ -5704,7 +5706,7 @@ var Gc = (e) => {
|
|
|
5704
5706
|
let { language: e } = y(r.token), t = ["hljs"];
|
|
5705
5707
|
return e && t.push(`language-${e}`), t.join(" ");
|
|
5706
5708
|
});
|
|
5707
|
-
|
|
5709
|
+
H(() => r.token, (e) => {
|
|
5708
5710
|
let { content: t, language: n } = y(e);
|
|
5709
5711
|
u.value = n, E(t, n), x(() => {
|
|
5710
5712
|
i("mounted", { get el() {
|
|
@@ -5721,8 +5723,8 @@ var Gc = (e) => {
|
|
|
5721
5723
|
t && p(t);
|
|
5722
5724
|
};
|
|
5723
5725
|
return (n, r) => (k(), c("div", cl, [l("div", ll, [
|
|
5724
|
-
l("span", ul,
|
|
5725
|
-
|
|
5726
|
+
l("span", ul, L(u.value), 1),
|
|
5727
|
+
P(n.$slots, "header", C(h({
|
|
5726
5728
|
language: u.value,
|
|
5727
5729
|
token: t.token
|
|
5728
5730
|
}))),
|
|
@@ -5736,10 +5738,10 @@ var Gc = (e) => {
|
|
|
5736
5738
|
ref_key: "codeRef",
|
|
5737
5739
|
ref: o,
|
|
5738
5740
|
class: S(D.value)
|
|
5739
|
-
}, [(k(!0), c(e, null,
|
|
5741
|
+
}, [(k(!0), c(e, null, N(m.value, (t, n) => (k(), c(e, { key: `completed-${n}` }, [l("span", {
|
|
5740
5742
|
class: "code-line",
|
|
5741
5743
|
innerHTML: t.html
|
|
5742
|
-
}, null, 8, fl), r[0] || (r[0] = d(
|
|
5744
|
+
}, null, 8, fl), r[0] || (r[0] = d(L("\n"), -1))], 64))), 128)), g.value ? (k(), c("span", {
|
|
5743
5745
|
key: 0,
|
|
5744
5746
|
class: "code-line current-line",
|
|
5745
5747
|
innerHTML: _.value
|
|
@@ -5758,7 +5760,7 @@ var Gc = (e) => {
|
|
|
5758
5760
|
src: {}
|
|
5759
5761
|
},
|
|
5760
5762
|
setup(e) {
|
|
5761
|
-
let t = /* @__PURE__ */ new Set(), n = e, r = a(() => t.has(n.src)), i =
|
|
5763
|
+
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 = Ne(() => {
|
|
5762
5764
|
s.value = !0;
|
|
5763
5765
|
}, 500), h = a(() => {
|
|
5764
5766
|
var e;
|
|
@@ -5792,19 +5794,19 @@ var Gc = (e) => {
|
|
|
5792
5794
|
leading: !0,
|
|
5793
5795
|
trailing: !0
|
|
5794
5796
|
});
|
|
5795
|
-
return
|
|
5797
|
+
return H(() => n.src, (e) => {
|
|
5796
5798
|
if (t.has(e)) {
|
|
5797
5799
|
u = e, i.value = !1, o.value = !1, s.value = !0;
|
|
5798
5800
|
return;
|
|
5799
5801
|
}
|
|
5800
5802
|
s.value = !1, m(), h.value ? g(e) : (i.value = !0, o.value = !1);
|
|
5801
|
-
}, { immediate: !0 }),
|
|
5803
|
+
}, { immediate: !0 }), H(h, (e) => {
|
|
5802
5804
|
e && n.src && g(n.src);
|
|
5803
|
-
}), (t, n) => (k(), c("span", gl, [d.value ? (k(), c("span", _l, [f(
|
|
5805
|
+
}), (t, n) => (k(), c("span", gl, [d.value ? (k(), c("span", _l, [f(R(me), {
|
|
5804
5806
|
mode: "spin",
|
|
5805
5807
|
size: "mini",
|
|
5806
5808
|
theme: "primary"
|
|
5807
|
-
}), l("span", vl,
|
|
5809
|
+
}), l("span", vl, L(R(G)("图片加载中...")), 1)])) : p.value ? (k(), c("span", yl, [n[0] || (n[0] = l("span", { class: "md-image-error-icon" }, "⚠️", -1)), l("span", bl, L(e.alt || R(G)("图片加载失败")), 1)])) : (k(), c("img", {
|
|
5808
5810
|
key: 2,
|
|
5809
5811
|
alt: e.alt,
|
|
5810
5812
|
class: "md-image",
|
|
@@ -5816,7 +5818,7 @@ var Gc = (e) => {
|
|
|
5816
5818
|
__name: "latex-content",
|
|
5817
5819
|
props: { token: {} },
|
|
5818
5820
|
setup(e) {
|
|
5819
|
-
let t = e, n =
|
|
5821
|
+
let t = e, n = I(""), r = [
|
|
5820
5822
|
"frac",
|
|
5821
5823
|
"dfrac",
|
|
5822
5824
|
"tfrac",
|
|
@@ -6022,7 +6024,7 @@ var Gc = (e) => {
|
|
|
6022
6024
|
}
|
|
6023
6025
|
return t;
|
|
6024
6026
|
}, 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");
|
|
6025
|
-
return
|
|
6027
|
+
return H(() => t.token, Te(() => {
|
|
6026
6028
|
let e = h(t.token);
|
|
6027
6029
|
e && n.value !== e && (n.value = e);
|
|
6028
6030
|
}, 100, {
|
|
@@ -6031,7 +6033,7 @@ var Gc = (e) => {
|
|
|
6031
6033
|
}), {
|
|
6032
6034
|
deep: !0,
|
|
6033
6035
|
immediate: !0
|
|
6034
|
-
}), (e, t) => (k(), o(
|
|
6036
|
+
}), (e, t) => (k(), o(F(_.value), {
|
|
6035
6037
|
class: S(v.value),
|
|
6036
6038
|
innerHTML: n.value
|
|
6037
6039
|
}, null, 8, ["class", "innerHTML"]));
|
|
@@ -6041,7 +6043,7 @@ var Gc = (e) => {
|
|
|
6041
6043
|
props: { token: {} },
|
|
6042
6044
|
emits: ["mounted"],
|
|
6043
6045
|
setup(e, { emit: t }) {
|
|
6044
|
-
let n =
|
|
6046
|
+
let n = I(""), r = V("mermaidContentRef"), i = e, a = t, o = null, s = "", l = function() {
|
|
6045
6047
|
var e = Z(function* () {
|
|
6046
6048
|
if (o) return o;
|
|
6047
6049
|
if (!o) try {
|
|
@@ -6061,7 +6063,7 @@ var Gc = (e) => {
|
|
|
6061
6063
|
}
|
|
6062
6064
|
return "";
|
|
6063
6065
|
};
|
|
6064
|
-
return
|
|
6066
|
+
return H(() => i.token, Te(function() {
|
|
6065
6067
|
var e = Z(function* (e) {
|
|
6066
6068
|
let t = u(e);
|
|
6067
6069
|
if (t === s) return;
|
|
@@ -6101,7 +6103,7 @@ var Gc = (e) => {
|
|
|
6101
6103
|
__name: "common-error-content",
|
|
6102
6104
|
props: { content: {} },
|
|
6103
6105
|
setup(e) {
|
|
6104
|
-
return (t, n) => (k(), c("div", Dl, [f(
|
|
6106
|
+
return (t, n) => (k(), c("div", Dl, [f(R(Gn)), l("div", Ol, L(e.content), 1)]));
|
|
6105
6107
|
}
|
|
6106
6108
|
}), Al = /* @__PURE__ */ new Map(), jl = () => {
|
|
6107
6109
|
Al = /* @__PURE__ */ new Map();
|
|
@@ -6295,7 +6297,7 @@ var Gc = (e) => {
|
|
|
6295
6297
|
"encoding",
|
|
6296
6298
|
"style"
|
|
6297
6299
|
]
|
|
6298
|
-
}, r = t, i = ti(), a =
|
|
6300
|
+
}, r = t, i = ti(), a = I([]), s = new Hc().use(Qc).use(Ee).use(De).use(Oe).use(ke).use(Ae).use(je).use(al).use(rl, { katexOptions: { strict: !1 } }).use(sl, /^hljs-(left|center|right)$/), l = {
|
|
6299
6301
|
html: !0,
|
|
6300
6302
|
mditOptions: s.options,
|
|
6301
6303
|
renderer: s.renderer,
|
|
@@ -6337,7 +6339,7 @@ var Gc = (e) => {
|
|
|
6337
6339
|
}
|
|
6338
6340
|
return t;
|
|
6339
6341
|
};
|
|
6340
|
-
|
|
6342
|
+
H(() => r.content, Te((e) => {
|
|
6341
6343
|
if (!e) {
|
|
6342
6344
|
a.value = [];
|
|
6343
6345
|
return;
|
|
@@ -6364,32 +6366,32 @@ var Gc = (e) => {
|
|
|
6364
6366
|
leading: !0,
|
|
6365
6367
|
trailing: !0
|
|
6366
6368
|
});
|
|
6367
|
-
return (n, r) => (k(), c("div", Kl, [t.status ===
|
|
6369
|
+
return (n, r) => (k(), c("div", Kl, [t.status === R(J).Error ? (k(), o(kl, {
|
|
6368
6370
|
key: 0,
|
|
6369
6371
|
content: t.content
|
|
6370
|
-
}, null, 8, ["content"])) : (k(), c("div", ql, [(k(!0), c(e, null,
|
|
6372
|
+
}, null, 8, ["content"])) : (k(), c("div", ql, [(k(!0), c(e, null, N(a.value, (t, r) => (k(), c(e, { key: r }, [u(t) ? (k(), o(R(El), {
|
|
6371
6373
|
key: r,
|
|
6372
6374
|
token: t,
|
|
6373
|
-
onMounted:
|
|
6375
|
+
onMounted: R(m)
|
|
6374
6376
|
}, null, 8, ["token", "onMounted"])) : f(t) ? (k(), o(wl, {
|
|
6375
6377
|
key: r,
|
|
6376
6378
|
token: t,
|
|
6377
|
-
onMounted:
|
|
6378
|
-
}, null, 8, ["token", "onMounted"])) : d(t) ? (k(), o(
|
|
6379
|
+
onMounted: R(m)
|
|
6380
|
+
}, null, 8, ["token", "onMounted"])) : d(t) ? (k(), o(R(hl), {
|
|
6379
6381
|
key: r,
|
|
6380
6382
|
token: t,
|
|
6381
|
-
onMounted:
|
|
6383
|
+
onMounted: R(m)
|
|
6382
6384
|
}, {
|
|
6383
|
-
header:
|
|
6385
|
+
header: U(({ language: e, token: t }) => [P(n.$slots, "codeHeader", b({ ref_for: !0 }, {
|
|
6384
6386
|
language: e,
|
|
6385
6387
|
token: t
|
|
6386
6388
|
}))]),
|
|
6387
6389
|
_: 3
|
|
6388
|
-
}, 8, ["token", "onMounted"])) : (k(), o(
|
|
6390
|
+
}, 8, ["token", "onMounted"])) : (k(), o(R(Gl), {
|
|
6389
6391
|
key: r,
|
|
6390
6392
|
options: l,
|
|
6391
6393
|
tokens: t,
|
|
6392
|
-
onVnodeMounted:
|
|
6394
|
+
onVnodeMounted: R(m)
|
|
6393
6395
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
6394
6396
|
}
|
|
6395
6397
|
}), Yl = ["onClick"], Xl = /* @__PURE__ */ m({
|
|
@@ -6403,27 +6405,27 @@ var Gc = (e) => {
|
|
|
6403
6405
|
url: e.url,
|
|
6404
6406
|
originFileUrl: e.originFile
|
|
6405
6407
|
})));
|
|
6406
|
-
return (t, n) => (k(!0), c(e, null,
|
|
6408
|
+
return (t, n) => (k(!0), c(e, null, N(i.value, (e) => (k(), c("div", {
|
|
6407
6409
|
key: e.title,
|
|
6408
6410
|
class: "ai-reference-item"
|
|
6409
6411
|
}, [
|
|
6410
|
-
f(
|
|
6412
|
+
f(R(kn), { color: "#D66F6B" }),
|
|
6411
6413
|
l("span", {
|
|
6412
6414
|
class: "ai-reference-item-title",
|
|
6413
6415
|
onClick: (t) => e.url && r(e.url, t)
|
|
6414
|
-
},
|
|
6415
|
-
e.url && e.originFileUrl ?
|
|
6416
|
+
}, L(e.title), 9, Yl),
|
|
6417
|
+
e.url && e.originFileUrl ? W((k(), o(R(Jt), {
|
|
6416
6418
|
key: 0,
|
|
6417
6419
|
onClick: (t) => e.url && r(e.url, t)
|
|
6418
|
-
}, null, 8, ["onClick"])), [[
|
|
6419
|
-
content:
|
|
6420
|
+
}, null, 8, ["onClick"])), [[R(Se), {
|
|
6421
|
+
content: R(G)("预览内容"),
|
|
6420
6422
|
theme: "ai-chat-box"
|
|
6421
6423
|
}]]) : s("", !0),
|
|
6422
|
-
e.url && e.originFileUrl ?
|
|
6424
|
+
e.url && e.originFileUrl ? W((k(), o(R(Yt), {
|
|
6423
6425
|
key: 1,
|
|
6424
6426
|
onClick: (t) => e.originFileUrl && r(e.originFileUrl, t)
|
|
6425
|
-
}, null, 8, ["onClick"])), [[
|
|
6426
|
-
content:
|
|
6427
|
+
}, null, 8, ["onClick"])), [[R(Se), {
|
|
6428
|
+
content: R(G)("跳转详情"),
|
|
6427
6429
|
theme: "ai-chat-box"
|
|
6428
6430
|
}]]) : s("", !0)
|
|
6429
6431
|
]))), 128));
|
|
@@ -6436,7 +6438,7 @@ var Gc = (e) => {
|
|
|
6436
6438
|
type: {}
|
|
6437
6439
|
},
|
|
6438
6440
|
setup(e) {
|
|
6439
|
-
let t =
|
|
6441
|
+
let t = re(), n = e, r = a(() => {
|
|
6440
6442
|
if (typeof n.content == "string" || n.type === _t.Text) return g(Jl, {
|
|
6441
6443
|
content: n.content,
|
|
6442
6444
|
status: n.status
|
|
@@ -6446,7 +6448,7 @@ var Gc = (e) => {
|
|
|
6446
6448
|
} });
|
|
6447
6449
|
if (typeof n.content == "object" && Array.isArray(n.content)) return g(Xl, { content: n.content });
|
|
6448
6450
|
});
|
|
6449
|
-
return (e, t) =>
|
|
6451
|
+
return (e, t) => P(e.$slots, "default", C(h({ content: n.content })), () => [(k(), o(F(r.value)))]);
|
|
6450
6452
|
}
|
|
6451
6453
|
}), Ql = ([e], [t]) => e === t ? 0 : e < t ? 1 : -1, $l = (e, t) => {
|
|
6452
6454
|
let n = Ql(e, t);
|
|
@@ -6811,9 +6813,9 @@ var Gc = (e) => {
|
|
|
6811
6813
|
n && (s(t(n[0])), l = n[1]);
|
|
6812
6814
|
}
|
|
6813
6815
|
}
|
|
6814
|
-
},
|
|
6816
|
+
}, j = () => {
|
|
6815
6817
|
S || k();
|
|
6816
|
-
},
|
|
6818
|
+
}, M = (e) => {
|
|
6817
6819
|
e.preventDefault();
|
|
6818
6820
|
let t = e.inputType;
|
|
6819
6821
|
if (t.startsWith("format") || t === "historyUndo" || t === "historyRedo") return;
|
|
@@ -6828,31 +6830,31 @@ var Gc = (e) => {
|
|
|
6828
6830
|
x || (x = new su().select(...l)), $l(...i) !== 0 && x.delete(...i), a && x.insert(i[0], nu(a));
|
|
6829
6831
|
}
|
|
6830
6832
|
S || k();
|
|
6831
|
-
},
|
|
6833
|
+
}, ee = () => {
|
|
6832
6834
|
S || O(), S = !0;
|
|
6833
|
-
}, M = () => {
|
|
6834
|
-
k();
|
|
6835
6835
|
}, N = () => {
|
|
6836
|
-
|
|
6836
|
+
k();
|
|
6837
6837
|
}, P = () => {
|
|
6838
|
-
C = !
|
|
6838
|
+
C = !0, O();
|
|
6839
6839
|
}, F = () => {
|
|
6840
|
+
C = !1;
|
|
6841
|
+
}, I = () => {
|
|
6840
6842
|
if (b) {
|
|
6841
6843
|
b = !1;
|
|
6842
6844
|
return;
|
|
6843
6845
|
}
|
|
6844
6846
|
C && !S && !w && O();
|
|
6845
|
-
},
|
|
6847
|
+
}, L = (e) => {
|
|
6846
6848
|
O(), $l(...l) !== 0 && r(e, hu(f(), ...eu(l)), n);
|
|
6849
|
+
}, te = (e) => {
|
|
6850
|
+
e.preventDefault(), L(e.clipboardData);
|
|
6847
6851
|
}, ne = (e) => {
|
|
6848
|
-
e.preventDefault(),
|
|
6849
|
-
},
|
|
6850
|
-
e.preventDefault(), u || (I(e.clipboardData), h(new su().delete(...eu(l))));
|
|
6851
|
-
}, L = (e) => {
|
|
6852
|
+
e.preventDefault(), u || (L(e.clipboardData), h(new su().delete(...eu(l))));
|
|
6853
|
+
}, R = (e) => {
|
|
6852
6854
|
e.preventDefault();
|
|
6853
6855
|
let [t, n] = eu(l);
|
|
6854
6856
|
h(new su().delete(t, n).insert(t, i(e.clipboardData, E)));
|
|
6855
|
-
},
|
|
6857
|
+
}, z = (e) => {
|
|
6856
6858
|
e.preventDefault();
|
|
6857
6859
|
let t = e.dataTransfer, r = pd(T, n, e, E);
|
|
6858
6860
|
if (t && r) {
|
|
@@ -6861,13 +6863,13 @@ var Gc = (e) => {
|
|
|
6861
6863
|
let a = e.transform(r);
|
|
6862
6864
|
e.select(a, a).insert(a, i(t, E)).select(a), h(e), n.focus({ preventScroll: !0 });
|
|
6863
6865
|
}
|
|
6864
|
-
},
|
|
6865
|
-
w = !0,
|
|
6866
|
-
},
|
|
6866
|
+
}, B = (e) => {
|
|
6867
|
+
w = !0, L(e.dataTransfer);
|
|
6868
|
+
}, re = () => {
|
|
6867
6869
|
w = !1;
|
|
6868
6870
|
};
|
|
6869
|
-
return T.addEventListener("selectionchange",
|
|
6870
|
-
y || (y = !0, d = yd, n.contentEditable = a, n.role = m, n.ariaMultiLine = g, n.ariaReadOnly = _, n.style.whiteSpace = v, D._dispose(), T.removeEventListener("selectionchange",
|
|
6871
|
+
return T.addEventListener("selectionchange", I), n.addEventListener("keydown", A), n.addEventListener("input", j), n.addEventListener("beforeinput", M), n.addEventListener("compositionstart", ee), n.addEventListener("compositionend", N), n.addEventListener("focus", P), n.addEventListener("blur", F), n.addEventListener("copy", te), n.addEventListener("cut", ne), n.addEventListener("paste", R), n.addEventListener("drop", z), n.addEventListener("dragstart", B), n.addEventListener("dragend", re), () => {
|
|
6872
|
+
y || (y = !0, d = yd, n.contentEditable = a, n.role = m, n.ariaMultiLine = g, n.ariaReadOnly = _, n.style.whiteSpace = v, D._dispose(), T.removeEventListener("selectionchange", I), n.removeEventListener("keydown", A), n.removeEventListener("input", j), n.removeEventListener("beforeinput", M), n.removeEventListener("compositionstart", ee), n.removeEventListener("compositionend", N), n.removeEventListener("focus", P), n.removeEventListener("blur", F), n.removeEventListener("copy", te), n.removeEventListener("cut", ne), n.removeEventListener("paste", R), n.removeEventListener("drop", z), n.removeEventListener("dragstart", B), n.removeEventListener("dragend", re));
|
|
6871
6873
|
};
|
|
6872
6874
|
},
|
|
6873
6875
|
command: (e, ...t) => {
|
|
@@ -6969,7 +6971,7 @@ var Gc = (e) => {
|
|
|
6969
6971
|
},
|
|
6970
6972
|
emits: ["upload"],
|
|
6971
6973
|
setup(e, { emit: t }) {
|
|
6972
|
-
let n = t, r =
|
|
6974
|
+
let n = t, r = V("fileInputRef"), i = () => {
|
|
6973
6975
|
var e;
|
|
6974
6976
|
(e = r.value) == null || e.click();
|
|
6975
6977
|
}, a = (e) => {
|
|
@@ -6992,11 +6994,11 @@ var Gc = (e) => {
|
|
|
6992
6994
|
multiple: "",
|
|
6993
6995
|
type: "file",
|
|
6994
6996
|
onChange: a
|
|
6995
|
-
}, null, 40, Md),
|
|
6997
|
+
}, null, 40, Md), W((k(), c("span", {
|
|
6996
6998
|
class: "ai-shortcut-btn file-upload-btn-icon",
|
|
6997
6999
|
onClick: i
|
|
6998
|
-
}, [
|
|
6999
|
-
content:
|
|
7000
|
+
}, [P(t.$slots, "default", {}, () => [f(R(jn))])])), [[R(Se), X(X({}, e.tippyOptions), {}, {
|
|
7001
|
+
content: R(G)("上传图片, 最多支持上传 3 个, 最大支持 2.4MB"),
|
|
7000
7002
|
theme: "ai-chat-box",
|
|
7001
7003
|
offset: [0, 16]
|
|
7002
7004
|
})]])]));
|
|
@@ -7009,9 +7011,9 @@ var Gc = (e) => {
|
|
|
7009
7011
|
},
|
|
7010
7012
|
setup(e) {
|
|
7011
7013
|
return (t, n) => (k(), c("div", Pd, [
|
|
7012
|
-
f(
|
|
7013
|
-
l("span", Fd,
|
|
7014
|
-
e.onClose ? (k(), o(
|
|
7014
|
+
f(R(tr)),
|
|
7015
|
+
l("span", Fd, L(e.content), 1),
|
|
7016
|
+
e.onClose ? (k(), o(R(Xn), {
|
|
7015
7017
|
key: 0,
|
|
7016
7018
|
onClick: n[0] || (n[0] = (t) => {
|
|
7017
7019
|
var n;
|
|
@@ -7045,48 +7047,48 @@ var Gc = (e) => {
|
|
|
7045
7047
|
setup(t, { emit: n }) {
|
|
7046
7048
|
let r = n;
|
|
7047
7049
|
return (n, i) => (k(), c("div", Ld, [l("div", Rd, [
|
|
7048
|
-
t.isMultiple ? (k(), c("span", zd,
|
|
7050
|
+
t.isMultiple ? (k(), c("span", zd, L(t.activeIndex + 1) + " / " + L(t.total), 1)) : s("", !0),
|
|
7049
7051
|
t.isMultiple ? (k(), c("span", Bd)) : s("", !0),
|
|
7050
7052
|
l("div", {
|
|
7051
7053
|
class: "ai-image-preview-toolbar-btn",
|
|
7052
|
-
"data-tooltip":
|
|
7054
|
+
"data-tooltip": R(G)("缩小"),
|
|
7053
7055
|
onClick: i[0] || (i[0] = (e) => r("zoomOut"))
|
|
7054
|
-
}, [f(
|
|
7056
|
+
}, [f(R(vn))], 8, Vd),
|
|
7055
7057
|
l("div", {
|
|
7056
7058
|
class: "ai-image-preview-toolbar-btn",
|
|
7057
|
-
"data-tooltip":
|
|
7059
|
+
"data-tooltip": R(G)("放大"),
|
|
7058
7060
|
onClick: i[1] || (i[1] = (e) => r("zoomIn"))
|
|
7059
|
-
}, [f(
|
|
7061
|
+
}, [f(R(_n))], 8, Hd),
|
|
7060
7062
|
l("div", {
|
|
7061
7063
|
class: "ai-image-preview-toolbar-btn",
|
|
7062
|
-
"data-tooltip":
|
|
7064
|
+
"data-tooltip": R(G)("旋转"),
|
|
7063
7065
|
onClick: i[2] || (i[2] = (e) => r("rotate"))
|
|
7064
|
-
}, [f(
|
|
7066
|
+
}, [f(R(yn))], 8, Ud),
|
|
7065
7067
|
l("div", {
|
|
7066
7068
|
class: "ai-image-preview-toolbar-btn",
|
|
7067
|
-
"data-tooltip":
|
|
7069
|
+
"data-tooltip": R(G)("重置"),
|
|
7068
7070
|
onClick: i[3] || (i[3] = (e) => r("reset"))
|
|
7069
|
-
}, [f(
|
|
7071
|
+
}, [f(R(bn))], 8, Wd),
|
|
7070
7072
|
l("div", {
|
|
7071
7073
|
class: "ai-image-preview-toolbar-btn",
|
|
7072
|
-
"data-tooltip":
|
|
7074
|
+
"data-tooltip": R(G)("下载"),
|
|
7073
7075
|
onClick: i[4] || (i[4] = (e) => r("download"))
|
|
7074
|
-
}, [f(
|
|
7075
|
-
n.$slots.extra ? (k(), c(e, { key: 2 }, [i[5] || (i[5] = l("span", { class: "ai-image-preview-toolbar-divider" }, null, -1)),
|
|
7076
|
+
}, [f(R(xn))], 8, Gd),
|
|
7077
|
+
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),
|
|
7076
7078
|
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", Kd, [
|
|
7077
|
-
f(
|
|
7078
|
-
l("span", null,
|
|
7079
|
+
f(R(Dn), { class: "ai-image-preview-toolbar-info-icon" }),
|
|
7080
|
+
l("span", null, L(t.currentImageInfo.width) + " px " + L(R(G)("宽")), 1),
|
|
7079
7081
|
t.currentImageInfo.resolution ? (k(), c(e, { key: 0 }, [
|
|
7080
7082
|
i[6] || (i[6] = l("span", { class: "ai-image-preview-toolbar-info-dot" }, null, -1)),
|
|
7081
|
-
f(
|
|
7082
|
-
l("span", null,
|
|
7083
|
+
f(R(Dn), { class: "ai-image-preview-toolbar-info-icon" }),
|
|
7084
|
+
l("span", null, L(t.currentImageInfo.resolution), 1)
|
|
7083
7085
|
], 64)) : s("", !0)
|
|
7084
7086
|
])], 64)) : s("", !0)
|
|
7085
7087
|
])]));
|
|
7086
7088
|
}
|
|
7087
7089
|
})), Jd = .15, Yd = .1, Xd = 10;
|
|
7088
7090
|
function Zd() {
|
|
7089
|
-
let e =
|
|
7091
|
+
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(() => ({
|
|
7090
7092
|
transform: `translate(${n.value}px, ${r.value}px) scale(${e.value}) rotate(${t.value}deg)`,
|
|
7091
7093
|
cursor: i.value ? "grabbing" : "grab",
|
|
7092
7094
|
transition: i.value || o.value ? "none" : "transform 0.3s ease"
|
|
@@ -7142,7 +7144,7 @@ function Qd(e) {
|
|
|
7142
7144
|
}, s = () => {
|
|
7143
7145
|
typeof document > "u" || (document.removeEventListener("keydown", a), document.body.style.overflow = "");
|
|
7144
7146
|
};
|
|
7145
|
-
|
|
7147
|
+
H(t, (e) => {
|
|
7146
7148
|
e ? o() : s();
|
|
7147
7149
|
}, { immediate: !0 }), T(() => {
|
|
7148
7150
|
s();
|
|
@@ -7180,7 +7182,7 @@ var $d = ["src"], ef = {
|
|
|
7180
7182
|
}),
|
|
7181
7183
|
emits: ["update:visible", "update:current"],
|
|
7182
7184
|
setup(n) {
|
|
7183
|
-
let i = n, d =
|
|
7185
|
+
let i = n, d = B(n, "visible"), p = B(n, "current"), { imageStyle: m, resetTransform: h, zoomIn: g, zoomOut: _, rotateCW: v, handleWheel: y, handleDragStart: b } = Zd(), x = I("loading"), S = [], C = () => {
|
|
7184
7186
|
S.forEach((e) => URL.revokeObjectURL(e)), S.length = 0;
|
|
7185
7187
|
}, E = (e) => {
|
|
7186
7188
|
let t = URL.createObjectURL(e);
|
|
@@ -7194,23 +7196,23 @@ var $d = ["src"], ef = {
|
|
|
7194
7196
|
let O = a(() => {
|
|
7195
7197
|
var e;
|
|
7196
7198
|
return (e = D.value[p.value]) == null ? { url: "" } : e;
|
|
7197
|
-
}), A = a(() => D.value.length > 1),
|
|
7199
|
+
}), A = a(() => D.value.length > 1), j = a(() => {
|
|
7198
7200
|
let e = O.value;
|
|
7199
7201
|
return !e.width && !e.resolution ? null : {
|
|
7200
7202
|
width: e.width,
|
|
7201
7203
|
resolution: e.resolution
|
|
7202
7204
|
};
|
|
7203
|
-
}),
|
|
7205
|
+
}), M = () => {
|
|
7204
7206
|
d.value = !1;
|
|
7205
|
-
},
|
|
7206
|
-
i.maskClosable &&
|
|
7207
|
-
},
|
|
7207
|
+
}, ee = () => {
|
|
7208
|
+
i.maskClosable && M();
|
|
7209
|
+
}, N = (e) => {
|
|
7208
7210
|
p.value = e, h(), x.value = "loading";
|
|
7209
|
-
},
|
|
7210
|
-
|
|
7211
|
+
}, F = () => {
|
|
7212
|
+
N(p.value > 0 ? p.value - 1 : D.value.length - 1);
|
|
7213
|
+
}, te = () => {
|
|
7214
|
+
N(p.value < D.value.length - 1 ? p.value + 1 : 0);
|
|
7211
7215
|
}, ne = () => {
|
|
7212
|
-
M(p.value < D.value.length - 1 ? p.value + 1 : 0);
|
|
7213
|
-
}, re = () => {
|
|
7214
7216
|
let e = O.value, t = e.downloadUrl || e.url;
|
|
7215
7217
|
if (i.onDownload) {
|
|
7216
7218
|
i.onDownload(t);
|
|
@@ -7218,70 +7220,70 @@ var $d = ["src"], ef = {
|
|
|
7218
7220
|
}
|
|
7219
7221
|
let n = document.createElement("a");
|
|
7220
7222
|
n.href = t, n.download = e.name || t.split("/").pop() || "image", n.target = "_blank", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
7221
|
-
},
|
|
7223
|
+
}, z = () => {
|
|
7222
7224
|
x.value = "loaded";
|
|
7223
|
-
},
|
|
7225
|
+
}, re = () => {
|
|
7224
7226
|
x.value = "error";
|
|
7225
7227
|
};
|
|
7226
7228
|
return Qd({
|
|
7227
7229
|
visible: d,
|
|
7228
|
-
onClose:
|
|
7229
|
-
onPrev: () => A.value &&
|
|
7230
|
-
onNext: () => A.value &&
|
|
7230
|
+
onClose: M,
|
|
7231
|
+
onPrev: () => A.value && F(),
|
|
7232
|
+
onNext: () => A.value && te()
|
|
7231
7233
|
}), (i, a) => (k(), o(t, { to: "body" }, [f(r, { name: "ai-image-preview-fade" }, {
|
|
7232
|
-
default:
|
|
7234
|
+
default: U(() => [d.value ? (k(), c("div", {
|
|
7233
7235
|
key: 0,
|
|
7234
7236
|
class: "ai-image-preview",
|
|
7235
|
-
onWheel: a[1] || (a[1] =
|
|
7237
|
+
onWheel: a[1] || (a[1] = ce((...e) => R(y) && R(y)(...e), ["prevent"]))
|
|
7236
7238
|
}, [
|
|
7237
7239
|
l("div", {
|
|
7238
7240
|
class: "ai-image-preview-close",
|
|
7239
|
-
onClick:
|
|
7240
|
-
}, [f(
|
|
7241
|
+
onClick: M
|
|
7242
|
+
}, [f(R(Sn), { class: "ai-image-preview-close-icon" })]),
|
|
7241
7243
|
A.value ? (k(), c(e, { key: 0 }, [l("div", {
|
|
7242
7244
|
class: "ai-image-preview-arrow ai-image-preview-arrow-left",
|
|
7243
|
-
onClick:
|
|
7244
|
-
}, [f(
|
|
7245
|
+
onClick: F
|
|
7246
|
+
}, [f(R(Cn), { class: "ai-image-preview-arrow-icon" })]), l("div", {
|
|
7245
7247
|
class: "ai-image-preview-arrow ai-image-preview-arrow-right",
|
|
7246
|
-
onClick:
|
|
7247
|
-
}, [f(
|
|
7248
|
+
onClick: te
|
|
7249
|
+
}, [f(R(wn), { class: "ai-image-preview-arrow-icon" })])], 64)) : s("", !0),
|
|
7248
7250
|
l("div", {
|
|
7249
7251
|
class: "ai-image-preview-body",
|
|
7250
|
-
onClick:
|
|
7251
|
-
onMousedown: a[0] || (a[0] = (...e) =>
|
|
7252
|
+
onClick: ce(ee, ["self"]),
|
|
7253
|
+
onMousedown: a[0] || (a[0] = (...e) => R(b) && R(b)(...e))
|
|
7252
7254
|
}, [
|
|
7253
7255
|
x.value === "error" ? s("", !0) : (k(), c("img", {
|
|
7254
7256
|
key: 0,
|
|
7255
7257
|
class: "ai-image-preview-img",
|
|
7256
7258
|
draggable: "false",
|
|
7257
7259
|
src: O.value.url,
|
|
7258
|
-
style: w(
|
|
7259
|
-
onError:
|
|
7260
|
-
onLoad:
|
|
7260
|
+
style: w(R(m)),
|
|
7261
|
+
onError: re,
|
|
7262
|
+
onLoad: z
|
|
7261
7263
|
}, null, 44, $d)),
|
|
7262
|
-
x.value === "error" ? (k(), c("div", ef, [f(
|
|
7264
|
+
x.value === "error" ? (k(), c("div", ef, [f(R(En), { class: "ai-image-preview-error-icon" }), l("p", tf, L(R(G)("抱歉,图片加载失败,可尝试重新加载")), 1)])) : s("", !0),
|
|
7263
7265
|
x.value === "loading" ? (k(), c("div", nf, [O.value.thumbnailUrl ? (k(), c("img", {
|
|
7264
7266
|
key: 0,
|
|
7265
7267
|
class: "ai-image-preview-img ai-image-preview-img--blur",
|
|
7266
7268
|
draggable: "false",
|
|
7267
7269
|
src: O.value.thumbnailUrl,
|
|
7268
|
-
style: w(
|
|
7270
|
+
style: w(R(m))
|
|
7269
7271
|
}, null, 12, rf)) : s("", !0)])) : s("", !0)
|
|
7270
7272
|
], 32),
|
|
7271
7273
|
f(qd, {
|
|
7272
7274
|
"active-index": p.value,
|
|
7273
|
-
"current-image-info":
|
|
7275
|
+
"current-image-info": j.value,
|
|
7274
7276
|
"is-multiple": A.value,
|
|
7275
7277
|
"show-info": n.showInfo,
|
|
7276
7278
|
total: D.value.length,
|
|
7277
|
-
onDownload:
|
|
7278
|
-
onReset:
|
|
7279
|
-
onRotate:
|
|
7280
|
-
onZoomIn:
|
|
7281
|
-
onZoomOut:
|
|
7279
|
+
onDownload: ne,
|
|
7280
|
+
onReset: R(h),
|
|
7281
|
+
onRotate: R(v),
|
|
7282
|
+
onZoomIn: R(g),
|
|
7283
|
+
onZoomOut: R(_)
|
|
7282
7284
|
}, u({ _: 2 }, [i.$slots.extra ? {
|
|
7283
7285
|
name: "extra",
|
|
7284
|
-
fn:
|
|
7286
|
+
fn: U(() => [P(i.$slots, "extra")]),
|
|
7285
7287
|
key: "0"
|
|
7286
7288
|
} : void 0]), 1032, [
|
|
7287
7289
|
"active-index",
|
|
@@ -7317,7 +7319,7 @@ var $d = ["src"], ef = {
|
|
|
7317
7319
|
},
|
|
7318
7320
|
emits: ["deleteFile"],
|
|
7319
7321
|
setup(t, { emit: n }) {
|
|
7320
|
-
let r = n, i = t, u =
|
|
7322
|
+
let r = n, i = t, u = j({}), d = (e) => {
|
|
7321
7323
|
var t;
|
|
7322
7324
|
return e.url ? !0 : Le(e.mimeType || ((t = e.file) == null ? void 0 : t.type));
|
|
7323
7325
|
}, p = (e) => {
|
|
@@ -7327,11 +7329,11 @@ var $d = ["src"], ef = {
|
|
|
7327
7329
|
u[p(e)] = !0;
|
|
7328
7330
|
}, h = (e) => {
|
|
7329
7331
|
r("deleteFile", e);
|
|
7330
|
-
}, g =
|
|
7332
|
+
}, g = I(!1), _ = I(0), v = a(() => i.files.filter((e) => d(e) && !u[p(e)])), y = a(() => v.value.map((e) => e.url ? e.url : e.file ? e.file : "").filter(Boolean)), b = (e) => {
|
|
7331
7333
|
let t = v.value.indexOf(e);
|
|
7332
7334
|
t < 0 || (_.value = t, g.value = !0);
|
|
7333
7335
|
};
|
|
7334
|
-
return (n, r) => (k(), c("div", of, [(k(!0), c(e, null,
|
|
7336
|
+
return (n, r) => (k(), c("div", of, [(k(!0), c(e, null, N(t.files, (e) => {
|
|
7335
7337
|
var n, r, i, a, g;
|
|
7336
7338
|
return k(), c("div", {
|
|
7337
7339
|
key: (n = e.file) == null ? void 0 : n.name,
|
|
@@ -7340,14 +7342,14 @@ var $d = ["src"], ef = {
|
|
|
7340
7342
|
key: 0,
|
|
7341
7343
|
alt: e.filename || ((r = e.file) == null ? void 0 : r.name),
|
|
7342
7344
|
class: "file-content-image",
|
|
7343
|
-
src: e.url ||
|
|
7345
|
+
src: e.url || R(Re)(e.file),
|
|
7344
7346
|
onClick: (t) => b(e),
|
|
7345
7347
|
onError: (t) => m(e)
|
|
7346
|
-
}, null, 40, sf)) : d(e) && u[p(e)] ? (k(), c("div", cf, [f(
|
|
7347
|
-
f(
|
|
7348
|
-
l("span", df,
|
|
7349
|
-
l("span", ff,
|
|
7350
|
-
]), l("div", pf,
|
|
7348
|
+
}, null, 40, sf)) : d(e) && u[p(e)] ? (k(), c("div", cf, [f(R($t), { class: "file-error-icon" })])) : (k(), c("div", lf, [l("div", uf, [
|
|
7349
|
+
f(R(qt), { class: "file-icon" }),
|
|
7350
|
+
l("span", df, L(e.filename || ((i = e.file) == null ? void 0 : i.name)), 1),
|
|
7351
|
+
l("span", ff, L(e.file ? R(ze)(e.file) : ((a = e.filename) == null ? void 0 : a.split(".").pop()) || ((g = e.mimeType) == null ? void 0 : g.split("/").pop())), 1)
|
|
7352
|
+
]), l("div", pf, L(R(Be)(e.file)), 1)])), t.readonly ? s("", !0) : (k(), o(R(An), {
|
|
7351
7353
|
key: 3,
|
|
7352
7354
|
class: "file-delete-icon",
|
|
7353
7355
|
onClick: (t) => h(e)
|
|
@@ -7371,7 +7373,7 @@ var $d = ["src"], ef = {
|
|
|
7371
7373
|
prompts: {}
|
|
7372
7374
|
},
|
|
7373
7375
|
setup(t) {
|
|
7374
|
-
let n = t, r =
|
|
7376
|
+
let n = t, r = V("promptListRef"), { activeIndex: i } = fi({
|
|
7375
7377
|
items: a(() => n.prompts),
|
|
7376
7378
|
onSelect: n.onSelect,
|
|
7377
7379
|
menuRef: r
|
|
@@ -7380,11 +7382,11 @@ var $d = ["src"], ef = {
|
|
|
7380
7382
|
ref_key: "promptListRef",
|
|
7381
7383
|
ref: r,
|
|
7382
7384
|
class: "ai-prompt-list"
|
|
7383
|
-
}, [(k(!0), c(e, null,
|
|
7385
|
+
}, [(k(!0), c(e, null, N(t.prompts, (e, n) => (k(), c("div", {
|
|
7384
7386
|
key: e,
|
|
7385
|
-
class: S(["ai-prompt-list-item", { "is-active":
|
|
7387
|
+
class: S(["ai-prompt-list-item", { "is-active": R(i) === n }]),
|
|
7386
7388
|
onClick: (n) => t.onSelect(e)
|
|
7387
|
-
},
|
|
7389
|
+
}, L(e), 11, hf))), 128))], 512));
|
|
7388
7390
|
}
|
|
7389
7391
|
}), _f = ["onClick"], vf = ["src", "onError"], yf = {
|
|
7390
7392
|
key: 1,
|
|
@@ -7396,22 +7398,22 @@ var $d = ["src"], ef = {
|
|
|
7396
7398
|
skills: {}
|
|
7397
7399
|
},
|
|
7398
7400
|
setup(t) {
|
|
7399
|
-
let n = t, r =
|
|
7401
|
+
let n = t, r = j(/* @__PURE__ */ new Set()), i = V("skillListRef"), { activeIndex: o } = fi({
|
|
7400
7402
|
items: a(() => n.skills),
|
|
7401
7403
|
onSelect: n.onSelect,
|
|
7402
7404
|
menuRef: i
|
|
7403
7405
|
});
|
|
7404
|
-
return
|
|
7406
|
+
return ae(() => {
|
|
7405
7407
|
n.skills, o.value = 0;
|
|
7406
7408
|
}), (n, a) => (k(), c("div", {
|
|
7407
7409
|
ref_key: "skillListRef",
|
|
7408
7410
|
ref: i,
|
|
7409
7411
|
class: "ai-skill-list"
|
|
7410
|
-
}, [(k(!0), c(e, null,
|
|
7412
|
+
}, [(k(!0), c(e, null, N(t.skills, (e, n) => {
|
|
7411
7413
|
var i;
|
|
7412
7414
|
return k(), c("div", {
|
|
7413
7415
|
key: e.skill_code,
|
|
7414
|
-
class: S(["ai-skill-list-item", { "is-active":
|
|
7416
|
+
class: S(["ai-skill-list-item", { "is-active": R(o) === n }]),
|
|
7415
7417
|
onClick: (n) => t.onSelect(e)
|
|
7416
7418
|
}, [e.icon && !r.has(e.skill_code) ? (k(), c("img", {
|
|
7417
7419
|
key: 0,
|
|
@@ -7419,7 +7421,7 @@ var $d = ["src"], ef = {
|
|
|
7419
7421
|
alt: "",
|
|
7420
7422
|
class: "ai-skill-list-item-icon",
|
|
7421
7423
|
onError: (t) => r.add(e.skill_code)
|
|
7422
|
-
}, null, 40, vf)) : (k(), c("div", yf,
|
|
7424
|
+
}, null, 40, vf)) : (k(), c("div", yf, L((i = e.skill_name) == null || (i = i[0]) == null ? void 0 : i.toUpperCase()), 1)), l("div", bf, [l("div", xf, L(e.skill_name), 1)])], 10, _f);
|
|
7423
7425
|
}), 128))], 512));
|
|
7424
7426
|
}
|
|
7425
7427
|
}), Cf = { class: "ai-slash-item ai-slash-group-title" }, wf = ["onClick"], Tf = ["onClick"], Ef = ["title"], Df = /* @__PURE__ */ m({
|
|
@@ -7429,18 +7431,18 @@ var $d = ["src"], ef = {
|
|
|
7429
7431
|
resourceList: {}
|
|
7430
7432
|
},
|
|
7431
7433
|
setup(t) {
|
|
7432
|
-
let n = t, r =
|
|
7434
|
+
let n = t, r = V("menuRef"), i = ee([
|
|
7433
7435
|
"tool",
|
|
7434
7436
|
"shortcut",
|
|
7435
7437
|
"doc",
|
|
7436
7438
|
"knowledgebase",
|
|
7437
7439
|
"mcp"
|
|
7438
|
-
]), a =
|
|
7440
|
+
]), a = I([]), o = I([]), { activeIndex: u } = fi({
|
|
7439
7441
|
items: a,
|
|
7440
7442
|
onSelect: n.onSelect,
|
|
7441
7443
|
menuRef: r
|
|
7442
7444
|
});
|
|
7443
|
-
|
|
7445
|
+
ae(() => {
|
|
7444
7446
|
let e = [], t = [];
|
|
7445
7447
|
for (let [a, o] of Object.entries(Td)) {
|
|
7446
7448
|
var r, i;
|
|
@@ -7465,7 +7467,7 @@ var $d = ["src"], ef = {
|
|
|
7465
7467
|
ref_key: "menuRef",
|
|
7466
7468
|
ref: r,
|
|
7467
7469
|
class: "ai-slash-menu"
|
|
7468
|
-
}, [(k(!0), c(e, null,
|
|
7470
|
+
}, [(k(!0), c(e, null, N(o.value, (n, r) => (k(), c(e, null, [n.items.length > 0 ? (k(), c("div", {
|
|
7469
7471
|
key: r,
|
|
7470
7472
|
class: "ai-slash-group"
|
|
7471
7473
|
}, [l("div", Cf, [
|
|
@@ -7476,17 +7478,17 @@ var $d = ["src"], ef = {
|
|
|
7476
7478
|
onClick: (e) => f(n)
|
|
7477
7479
|
}, [...p[0] || (p[0] = [l("path", { d: "M800 512L288 928V96z" }, null, -1)])], 12, wf)),
|
|
7478
7480
|
l("span", { class: S(`mark-${n.type}`) }, null, 2),
|
|
7479
|
-
d(" " +
|
|
7480
|
-
]), i.value.includes(n.type) ? (k(!0), c(e, { key: 0 },
|
|
7481
|
+
d(" " + L(n.name) + " (" + L(n.items.length) + ") ", 1)
|
|
7482
|
+
]), i.value.includes(n.type) ? (k(!0), c(e, { key: 0 }, N(n.items, (e) => {
|
|
7481
7483
|
var n;
|
|
7482
7484
|
return k(), c("div", {
|
|
7483
7485
|
key: e.id,
|
|
7484
|
-
class: S(["ai-slash-item ai-slash-group-item", { "is-active": ((n = a.value) == null || (n = n[
|
|
7486
|
+
class: S(["ai-slash-item ai-slash-group-item", { "is-active": ((n = a.value) == null || (n = n[R(u)]) == null ? void 0 : n.id) === e.id }]),
|
|
7485
7487
|
onClick: (n) => t.onSelect(e)
|
|
7486
|
-
}, [
|
|
7488
|
+
}, [W((k(), c("span", {
|
|
7487
7489
|
class: "ellipsis-text",
|
|
7488
7490
|
title: e.name
|
|
7489
|
-
}, [d(
|
|
7491
|
+
}, [d(L(e.name), 1)], 8, Ef)), [[R(Pi), {
|
|
7490
7492
|
text: e.name,
|
|
7491
7493
|
zIndex: 9999999,
|
|
7492
7494
|
placement: "right-start",
|
|
@@ -7532,7 +7534,7 @@ var $d = ["src"], ef = {
|
|
|
7532
7534
|
"upload"
|
|
7533
7535
|
],
|
|
7534
7536
|
setup(t, { expose: n, emit: r }) {
|
|
7535
|
-
let i =
|
|
7537
|
+
let i = V("editorRef"), a = V("tippyRef"), u = r, m = t, h = p((e, t) => ({
|
|
7536
7538
|
get() {
|
|
7537
7539
|
return e(), typeof m.modelValue == "string" ? nu(m.modelValue) : m.modelValue;
|
|
7538
7540
|
},
|
|
@@ -7543,16 +7545,16 @@ var $d = ["src"], ef = {
|
|
|
7543
7545
|
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;
|
|
7544
7546
|
})) == null ? void 0 : n.filter((e) => !!e)) || []), t();
|
|
7545
7547
|
}
|
|
7546
|
-
})), g =
|
|
7548
|
+
})), g = I("slash"), _ = I(""), v = I([]), y = I([]), b = I([]), x, C, w = null, T = null, D = () => {
|
|
7547
7549
|
w !== null && (clearTimeout(w), w = null), T !== null && (clearTimeout(T), T = null);
|
|
7548
|
-
}, A = () => document.body, { commandSelection:
|
|
7549
|
-
|
|
7550
|
-
x.command(
|
|
7550
|
+
}, A = () => document.body, { commandSelection: j, GetCursorPosition: M, GetDocSnapshot: ee, docSnapshot: P } = Xr();
|
|
7551
|
+
H(() => m.modelValue, () => {
|
|
7552
|
+
x.command(ee), tu(P.value || []) !== tu(h.value || []) && x.command(Su, tu(h.value || []));
|
|
7551
7553
|
}, { deep: !1 });
|
|
7552
|
-
let
|
|
7554
|
+
let F = () => {
|
|
7553
7555
|
w !== null && clearTimeout(w), w = setTimeout(() => {
|
|
7554
7556
|
w = null;
|
|
7555
|
-
let e =
|
|
7557
|
+
let e = z();
|
|
7556
7558
|
if (_.value = e.query || "", e.isActive) {
|
|
7557
7559
|
var t, n;
|
|
7558
7560
|
(t = a.value) == null || t.setProps({ getReferenceClientRect: () => {
|
|
@@ -7569,15 +7571,15 @@ var $d = ["src"], ef = {
|
|
|
7569
7571
|
(r = a.value) == null || r.hide();
|
|
7570
7572
|
}
|
|
7571
7573
|
}, 16);
|
|
7572
|
-
},
|
|
7574
|
+
}, te = (e) => {
|
|
7573
7575
|
if (u("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") {
|
|
7574
7576
|
var t;
|
|
7575
7577
|
return e.shiftKey ? void 0 : ((t = e.preventDefault) == null || t.call(e), !1);
|
|
7576
7578
|
}
|
|
7577
|
-
e.key === "@" && (g.value = "slash",
|
|
7578
|
-
},
|
|
7579
|
+
e.key === "@" && (g.value = "slash", F()), e.key === "/" && (g.value = "skill", F()), e.key === "\\" && (g.value = "prompt", F());
|
|
7580
|
+
}, ne = () => {
|
|
7579
7581
|
_.value = "";
|
|
7580
|
-
},
|
|
7582
|
+
}, z = () => {
|
|
7581
7583
|
let e = {
|
|
7582
7584
|
isActive: !1,
|
|
7583
7585
|
query: "",
|
|
@@ -7609,33 +7611,33 @@ var $d = ["src"], ef = {
|
|
|
7609
7611
|
} catch (t) {
|
|
7610
7612
|
return e;
|
|
7611
7613
|
}
|
|
7612
|
-
},
|
|
7614
|
+
}, B = (e, t) => e.reduce((e, n, r) => {
|
|
7613
7615
|
if (r >= t) return e;
|
|
7614
7616
|
if (n.type === "text") {
|
|
7615
7617
|
var i;
|
|
7616
7618
|
e += ((i = n.text) == null ? void 0 : i.length) || 0;
|
|
7617
7619
|
}
|
|
7618
7620
|
return n.type === "tag" && (e += 1), e;
|
|
7619
|
-
}, 0),
|
|
7621
|
+
}, 0), re = (e) => {
|
|
7620
7622
|
var t;
|
|
7621
|
-
x.command(
|
|
7622
|
-
let { column: n, line: r } =
|
|
7623
|
-
x.command(Of, [r, n - _.value.length - 1], [r, n]), x.command(kf, [r, n], e), x.command(Af, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(),
|
|
7624
|
-
},
|
|
7623
|
+
x.command(M);
|
|
7624
|
+
let { column: n, line: r } = j.value;
|
|
7625
|
+
x.command(Of, [r, n - _.value.length - 1], [r, n]), x.command(kf, [r, n], e), x.command(Af, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(), ie();
|
|
7626
|
+
}, ie = () => {
|
|
7625
7627
|
T !== null && clearTimeout(T), T = setTimeout(() => {
|
|
7626
7628
|
if (T = null, typeof window > "u") return;
|
|
7627
7629
|
let e = window.getSelection(), t = document.createRange();
|
|
7628
7630
|
i.value && e && (t.selectNodeContents(i.value), t.collapse(!1), e.removeAllRanges(), e.addRange(t));
|
|
7629
7631
|
}, 100);
|
|
7630
|
-
},
|
|
7631
|
-
x.command(Su, e),
|
|
7632
|
-
},
|
|
7632
|
+
}, oe = (e) => {
|
|
7633
|
+
x.command(Su, e), ie();
|
|
7634
|
+
}, W = (e) => {
|
|
7633
7635
|
var t;
|
|
7634
|
-
x.command(
|
|
7635
|
-
let { column: n, line: r } =
|
|
7636
|
-
x.command(Of, [r, n - _.value.length - 1], [r, n]), x.command(jf, [r, n], e), x.command(Af, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(),
|
|
7636
|
+
x.command(M);
|
|
7637
|
+
let { column: n, line: r } = j.value;
|
|
7638
|
+
x.command(Of, [r, n - _.value.length - 1], [r, n]), x.command(jf, [r, n], e), x.command(Af, [r, n + _.value.length + 1 + 1], " "), (t = a.value) == null || t.hide(), ie();
|
|
7637
7639
|
};
|
|
7638
|
-
|
|
7640
|
+
ae(() => {
|
|
7639
7641
|
var e, t;
|
|
7640
7642
|
let n = (e = m.resources) == null ? void 0 : e.filter((e) => {
|
|
7641
7643
|
var t;
|
|
@@ -7649,12 +7651,12 @@ var $d = ["src"], ef = {
|
|
|
7649
7651
|
(i = a.value) == null || i.hide();
|
|
7650
7652
|
}
|
|
7651
7653
|
});
|
|
7652
|
-
let
|
|
7654
|
+
let se = (e, t, n, r) => {
|
|
7653
7655
|
if (t.type === "tag") {
|
|
7654
|
-
let t =
|
|
7656
|
+
let t = B(e, n);
|
|
7655
7657
|
x.command(Of, [r, t], [r, t + 1]);
|
|
7656
7658
|
}
|
|
7657
|
-
},
|
|
7659
|
+
}, ce = (e) => {
|
|
7658
7660
|
var t;
|
|
7659
7661
|
let n = (t = e.clipboardData) == null ? void 0 : t.items;
|
|
7660
7662
|
if (!n) return;
|
|
@@ -7664,32 +7666,32 @@ var $d = ["src"], ef = {
|
|
|
7664
7666
|
t && r.push(t);
|
|
7665
7667
|
}
|
|
7666
7668
|
r.length > 0 && (e.preventDefault(), u("upload", r));
|
|
7667
|
-
},
|
|
7669
|
+
}, le = () => {
|
|
7668
7670
|
C == null || C(), x = bd({
|
|
7669
7671
|
doc: h.value,
|
|
7670
7672
|
schema: Pf,
|
|
7671
7673
|
onChange: function() {
|
|
7672
7674
|
var e = Z(function* (e) {
|
|
7673
|
-
h.value = e,
|
|
7675
|
+
h.value = e, F();
|
|
7674
7676
|
});
|
|
7675
7677
|
return function(t) {
|
|
7676
7678
|
return e.apply(this, arguments);
|
|
7677
7679
|
};
|
|
7678
7680
|
}(),
|
|
7679
|
-
onKeyDown: (e) =>
|
|
7681
|
+
onKeyDown: (e) => te(e)
|
|
7680
7682
|
}), C = x.input(i.value);
|
|
7681
7683
|
}, 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;
|
|
7682
7684
|
return E(() => {
|
|
7683
7685
|
var e;
|
|
7684
|
-
|
|
7686
|
+
le(), (e = i.value) == null || e.addEventListener("paste", ce);
|
|
7685
7687
|
}), O(() => {
|
|
7686
7688
|
var e;
|
|
7687
|
-
D(), x.command(Su, ""), C == null || C(), (e = i.value) == null || e.removeEventListener("paste",
|
|
7689
|
+
D(), x.command(Su, ""), C == null || C(), (e = i.value) == null || e.removeEventListener("paste", ce);
|
|
7688
7690
|
}), n({
|
|
7689
7691
|
cleanup: () => {
|
|
7690
7692
|
x.command(Su, "");
|
|
7691
7693
|
},
|
|
7692
|
-
focus:
|
|
7694
|
+
focus: ie
|
|
7693
7695
|
}), (n, r) => {
|
|
7694
7696
|
var u;
|
|
7695
7697
|
return k(), c("div", Ff, [l("div", {
|
|
@@ -7698,16 +7700,16 @@ var $d = ["src"], ef = {
|
|
|
7698
7700
|
"aria-placeholder": t.placeholder,
|
|
7699
7701
|
class: "ai-slash-input",
|
|
7700
7702
|
spellcheck: "false"
|
|
7701
|
-
}, [(u = h.value) != null && u.length && h.value.some((e) => e.length) ? (k(!0), c(e, { key: 0 },
|
|
7703
|
+
}, [(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", Lf, L(r.text), 1)) : r.type === "tag" ? (k(), c("span", {
|
|
7702
7704
|
key: 1,
|
|
7703
7705
|
class: S(`mention-tag-${r.data.type}`),
|
|
7704
7706
|
contenteditable: "false",
|
|
7705
7707
|
"data-tag-type": r.data.type,
|
|
7706
7708
|
"data-tag-value": r.data.value
|
|
7707
|
-
}, [d(
|
|
7709
|
+
}, [d(L(r.data.label) + " ", 1), f(R(Xt), {
|
|
7708
7710
|
class: "mention-tag-remove-icon",
|
|
7709
|
-
onClick: (e) =>
|
|
7710
|
-
}, null, 8, ["onClick"])], 10, Rf)) : s("", !0)], 64))), 128)) : (k(), c("br", zf))]))), 128)) : s("", !0)], 8, If), f(
|
|
7711
|
+
onClick: (e) => se(t, r, i, n)
|
|
7712
|
+
}, null, 8, ["onClick"])], 10, Rf)) : s("", !0)], 64))), 128)) : (k(), c("br", zf))]))), 128)) : s("", !0)], 8, If), f(R(xe), {
|
|
7711
7713
|
ref_key: "tippyRef",
|
|
7712
7714
|
ref: a,
|
|
7713
7715
|
"append-to": A,
|
|
@@ -7719,21 +7721,21 @@ var $d = ["src"], ef = {
|
|
|
7719
7721
|
theme: "light ai-slash-editor-theme",
|
|
7720
7722
|
trigger: "manual",
|
|
7721
7723
|
"trigger-target": i.value,
|
|
7722
|
-
"z-index":
|
|
7723
|
-
onHidden:
|
|
7724
|
+
"z-index": R(Et),
|
|
7725
|
+
onHidden: ne,
|
|
7724
7726
|
onShow: ue
|
|
7725
7727
|
}, {
|
|
7726
|
-
content:
|
|
7728
|
+
content: U(() => [g.value === "slash" ? (k(), o(Df, {
|
|
7727
7729
|
key: 0,
|
|
7728
|
-
"on-select":
|
|
7730
|
+
"on-select": re,
|
|
7729
7731
|
"resource-list": v.value
|
|
7730
7732
|
}, null, 8, ["resource-list"])) : g.value === "skill" ? (k(), o(Sf, {
|
|
7731
7733
|
key: 1,
|
|
7732
|
-
"on-select":
|
|
7734
|
+
"on-select": W,
|
|
7733
7735
|
skills: y.value
|
|
7734
7736
|
}, null, 8, ["skills"])) : g.value === "prompt" ? (k(), o(gf, {
|
|
7735
7737
|
key: 2,
|
|
7736
|
-
"on-select":
|
|
7738
|
+
"on-select": oe,
|
|
7737
7739
|
prompts: b.value
|
|
7738
7740
|
}, null, 8, ["prompts"])) : s("", !0)]),
|
|
7739
7741
|
_: 1
|
|
@@ -7755,20 +7757,20 @@ var $d = ["src"], ef = {
|
|
|
7755
7757
|
n.sendDisabledTip || n.messageState === J.Disabled || n.messageState === J.Pending || n.messageState === J.Streaming || r("sendMessage");
|
|
7756
7758
|
};
|
|
7757
7759
|
return (t, r) => (k(), c("div", Vf, [
|
|
7758
|
-
l("div", Hf, [
|
|
7759
|
-
l("div", Uf, [
|
|
7760
|
-
|
|
7760
|
+
l("div", Hf, [P(t.$slots, "default")]),
|
|
7761
|
+
l("div", Uf, [P(t.$slots, "before-send")]),
|
|
7762
|
+
P(t.$slots, "send-icon", {}, () => [l("div", {
|
|
7761
7763
|
class: S(["send-message-icon", [e.messageState && `send-message-icon__${e.messageState}`, { "send-message-icon__disabled": e.sendDisabledTip }]]),
|
|
7762
7764
|
onClick: a
|
|
7763
|
-
}, [e.messageState ===
|
|
7765
|
+
}, [e.messageState === R(J).Streaming || e.messageState === R(J).Pending || e.messageState === R(J).Fetching ? W((k(), o(R(Hn), {
|
|
7764
7766
|
key: 0,
|
|
7765
7767
|
onClick: i
|
|
7766
|
-
}, null, 512)), [[
|
|
7767
|
-
content:
|
|
7768
|
+
}, null, 512)), [[R(Se), X(X({}, e.tippyOptions), {}, {
|
|
7769
|
+
content: R(G)("停止"),
|
|
7768
7770
|
theme: "ai-chat-box",
|
|
7769
7771
|
offset: [0, 16]
|
|
7770
|
-
})]]) :
|
|
7771
|
-
content: e.sendDisabledTip || (n.messageState ===
|
|
7772
|
+
})]]) : W((k(), o(R(Vn), { key: 1 }, null, 512)), [[R(Se), X(X({}, e.tippyOptions), {}, {
|
|
7773
|
+
content: e.sendDisabledTip || (n.messageState === R(J).Disabled ? void 0 : R(G)("发送")),
|
|
7772
7774
|
theme: "ai-chat-box",
|
|
7773
7775
|
offset: [0, 16]
|
|
7774
7776
|
})]])], 2)])
|
|
@@ -7820,12 +7822,12 @@ var $d = ["src"], ef = {
|
|
|
7820
7822
|
let i = t, o = a(() => {
|
|
7821
7823
|
let e = /* @__PURE__ */ new Map();
|
|
7822
7824
|
return i.models.forEach((t) => e.set(t.llm_name, Kf(t))), e;
|
|
7823
|
-
}), u = r, p =
|
|
7825
|
+
}), u = r, p = B(t, "keyword"), m = V("panelRef"), h = V("searchInputRef"), g = I(i.models), { activeIndex: _ } = fi({
|
|
7824
7826
|
items: g,
|
|
7825
7827
|
menuRef: m,
|
|
7826
7828
|
onSelect: (e) => v(e)
|
|
7827
7829
|
});
|
|
7828
|
-
|
|
7830
|
+
H(() => i.models, (e) => {
|
|
7829
7831
|
g.value = e, _.value = 0;
|
|
7830
7832
|
});
|
|
7831
7833
|
let v = (e) => {
|
|
@@ -7840,7 +7842,7 @@ var $d = ["src"], ef = {
|
|
|
7840
7842
|
ref_key: "panelRef",
|
|
7841
7843
|
ref: m,
|
|
7842
7844
|
class: "ai-model-selector-panel"
|
|
7843
|
-
}, [l("div", qf, [f(
|
|
7845
|
+
}, [l("div", qf, [f(R(pe), {
|
|
7844
7846
|
ref_key: "searchInputRef",
|
|
7845
7847
|
ref: h,
|
|
7846
7848
|
modelValue: p.value,
|
|
@@ -7851,15 +7853,15 @@ var $d = ["src"], ef = {
|
|
|
7851
7853
|
placeholder: t.searchPlaceholder,
|
|
7852
7854
|
type: "text"
|
|
7853
7855
|
}, {
|
|
7854
|
-
prefix:
|
|
7856
|
+
prefix: U(() => [f(R(Mn), { class: "ai-model-selector-panel-search-icon" })]),
|
|
7855
7857
|
_: 1
|
|
7856
|
-
}, 8, ["modelValue", "placeholder"])]), l("div", Jf, [(k(!0), c(e, null,
|
|
7858
|
+
}, 8, ["modelValue", "placeholder"])]), l("div", Jf, [(k(!0), c(e, null, N(t.models, (n, r) => {
|
|
7857
7859
|
var i;
|
|
7858
7860
|
return k(), c("div", {
|
|
7859
7861
|
key: n.id,
|
|
7860
7862
|
class: S(["ai-model-selector-panel-option", {
|
|
7861
7863
|
"is-selected": n.llm_name === t.selectedName,
|
|
7862
|
-
"is-active": r ===
|
|
7864
|
+
"is-active": r === R(_),
|
|
7863
7865
|
"is-disabled": n.disabled
|
|
7864
7866
|
}]),
|
|
7865
7867
|
title: n.description,
|
|
@@ -7872,17 +7874,17 @@ var $d = ["src"], ef = {
|
|
|
7872
7874
|
l("span", {
|
|
7873
7875
|
class: "ai-model-selector-panel-option-name",
|
|
7874
7876
|
title: n.llm_name
|
|
7875
|
-
},
|
|
7876
|
-
(i = o.value.get(n.llm_name)) != null && i.length ? (k(), c("span", $f, [(k(!0), c(e, null,
|
|
7877
|
+
}, L(n.llm_name), 9, Qf),
|
|
7878
|
+
(i = o.value.get(n.llm_name)) != null && i.length ? (k(), c("span", $f, [(k(!0), c(e, null, N(o.value.get(n.llm_name), (e, t) => (k(), c("span", {
|
|
7877
7879
|
key: t,
|
|
7878
7880
|
class: S(["ai-model-capability-tag", `is-${e.theme || "default"}`])
|
|
7879
|
-
},
|
|
7881
|
+
}, L(e.text), 3))), 128))])) : s("", !0)
|
|
7880
7882
|
], 10, Yf);
|
|
7881
|
-
}), 128)), t.models.length ? s("", !0) : (k(), c("div", ep, [f(
|
|
7883
|
+
}), 128)), t.models.length ? s("", !0) : (k(), c("div", ep, [f(R(de), {
|
|
7882
7884
|
scene: "part",
|
|
7883
7885
|
type: "empty"
|
|
7884
7886
|
}, {
|
|
7885
|
-
default:
|
|
7887
|
+
default: U(() => [d(L(R(G)("搜索结果为空")), 1)]),
|
|
7886
7888
|
_: 1
|
|
7887
7889
|
})]))])], 512));
|
|
7888
7890
|
}
|
|
@@ -7908,13 +7910,13 @@ var $d = ["src"], ef = {
|
|
|
7908
7910
|
alt: "",
|
|
7909
7911
|
src: e.model.icon
|
|
7910
7912
|
}, null, 8, rp)])) : s("", !0),
|
|
7911
|
-
l("span", ip,
|
|
7912
|
-
f(
|
|
7913
|
+
l("span", ip, L(((i = e.model) == null ? void 0 : i.llm_name) || e.placeholder), 1),
|
|
7914
|
+
f(R(Cn), { class: "ai-model-selector-trigger-arrow" })
|
|
7913
7915
|
], 2);
|
|
7914
7916
|
};
|
|
7915
7917
|
}
|
|
7916
7918
|
}), op = (e) => {
|
|
7917
|
-
let t =
|
|
7919
|
+
let t = I("");
|
|
7918
7920
|
return {
|
|
7919
7921
|
keyword: t,
|
|
7920
7922
|
filteredModels: a(() => {
|
|
@@ -7940,8 +7942,8 @@ var $d = ["src"], ef = {
|
|
|
7940
7942
|
}),
|
|
7941
7943
|
emits: /* @__PURE__ */ y(["change"], ["update:modelValue"]),
|
|
7942
7944
|
setup(e, { emit: t }) {
|
|
7943
|
-
let n = e, r = t, i =
|
|
7944
|
-
models:
|
|
7945
|
+
let n = e, r = t, i = B(e, "modelValue"), s = V("tippyRef"), c = V("panelRef"), l = I(!1), { keyword: u, filteredModels: d, currentModel: p, resetKeyword: m } = op({
|
|
7946
|
+
models: te(n, "models"),
|
|
7945
7947
|
selectedModel: i
|
|
7946
7948
|
}), h = a(() => X({
|
|
7947
7949
|
arrow: !1,
|
|
@@ -7961,19 +7963,19 @@ var $d = ["src"], ef = {
|
|
|
7961
7963
|
var t, n;
|
|
7962
7964
|
i.value = e.llm_name, r("change", e), (t = s.value) == null || (n = t.hide) == null || n.call(t);
|
|
7963
7965
|
};
|
|
7964
|
-
return (t, n) => (k(), o(
|
|
7966
|
+
return (t, n) => (k(), o(R(xe), b({
|
|
7965
7967
|
ref_key: "tippyRef",
|
|
7966
7968
|
ref: s
|
|
7967
7969
|
}, h.value, {
|
|
7968
7970
|
onHidden: _,
|
|
7969
7971
|
onShow: g
|
|
7970
7972
|
}), {
|
|
7971
|
-
content:
|
|
7973
|
+
content: U(() => [f(tp, {
|
|
7972
7974
|
ref_key: "panelRef",
|
|
7973
7975
|
ref: c,
|
|
7974
|
-
keyword:
|
|
7976
|
+
keyword: R(u),
|
|
7975
7977
|
"onUpdate:keyword": n[0] || (n[0] = (e) => v(u) ? u.value = e : null),
|
|
7976
|
-
models:
|
|
7978
|
+
models: R(d),
|
|
7977
7979
|
"search-placeholder": e.searchPlaceholder,
|
|
7978
7980
|
"selected-name": i.value,
|
|
7979
7981
|
onSelect: y
|
|
@@ -7983,10 +7985,10 @@ var $d = ["src"], ef = {
|
|
|
7983
7985
|
"search-placeholder",
|
|
7984
7986
|
"selected-name"
|
|
7985
7987
|
])]),
|
|
7986
|
-
default:
|
|
7988
|
+
default: U(() => [f(ap, {
|
|
7987
7989
|
disabled: e.disabled,
|
|
7988
7990
|
expanded: l.value,
|
|
7989
|
-
model:
|
|
7991
|
+
model: R(p),
|
|
7990
7992
|
placeholder: e.placeholder
|
|
7991
7993
|
}, null, 8, [
|
|
7992
7994
|
"disabled",
|
|
@@ -8039,7 +8041,7 @@ var $d = ["src"], ef = {
|
|
|
8039
8041
|
"modelChange"
|
|
8040
8042
|
], ["update:cite", "update:selectedModel"]),
|
|
8041
8043
|
setup(e, { expose: t, emit: n }) {
|
|
8042
|
-
let r =
|
|
8044
|
+
let r = V("aiSlashInputRef"), i = V("filesRef"), u = B(e, "cite"), d = B(e, "selectedModel"), p = I(200), m = e, g = n, _ = ee(m.defaultUploadFiles || []), v = a(() => {
|
|
8043
8045
|
var e;
|
|
8044
8046
|
return (e = m.shortcuts) == null ? void 0 : e.find((e) => e.id === m.shortcutId);
|
|
8045
8047
|
}), y = a(() => {
|
|
@@ -8050,7 +8052,7 @@ var $d = ["src"], ef = {
|
|
|
8050
8052
|
J.Fetching
|
|
8051
8053
|
].includes(m.messageStatus) ? m.messageStatus : ((e = m.modelValue) == null ? void 0 : e.length) < 1 || Array.isArray(m.modelValue) && !Nf(m.modelValue).trim() ? J.Disabled : m.messageStatus;
|
|
8052
8054
|
});
|
|
8053
|
-
|
|
8055
|
+
oe(() => {
|
|
8054
8056
|
var e;
|
|
8055
8057
|
let t = m.inputMaxHeight || 200;
|
|
8056
8058
|
if (_.value.length < 1 || !i.value) {
|
|
@@ -8115,12 +8117,12 @@ var $d = ["src"], ef = {
|
|
|
8115
8117
|
g("deleteShortcut");
|
|
8116
8118
|
}, O = (e) => {
|
|
8117
8119
|
g("modelChange", e);
|
|
8118
|
-
}, A = (e) => `${e.name}_${e.size}_${e.lastModified}`,
|
|
8120
|
+
}, A = (e) => `${e.name}_${e.size}_${e.lastModified}`, j = (Nt / (1024 * 1024)).toFixed(1), M = function() {
|
|
8119
8121
|
var e = Z(function* (e) {
|
|
8120
8122
|
if (!m.supportUpload) return;
|
|
8121
8123
|
if (_.value.length >= 3) {
|
|
8122
8124
|
e.length > 0 && he({
|
|
8123
|
-
message: Ve(e.length,
|
|
8125
|
+
message: Ve(e.length, j, mt),
|
|
8124
8126
|
theme: "error"
|
|
8125
8127
|
});
|
|
8126
8128
|
return;
|
|
@@ -8158,16 +8160,16 @@ var $d = ["src"], ef = {
|
|
|
8158
8160
|
});
|
|
8159
8161
|
}
|
|
8160
8162
|
n > 0 && he({
|
|
8161
|
-
message: Ve(n,
|
|
8163
|
+
message: Ve(n, j, mt),
|
|
8162
8164
|
theme: "error"
|
|
8163
8165
|
});
|
|
8164
8166
|
});
|
|
8165
8167
|
return function(t) {
|
|
8166
8168
|
return e.apply(this, arguments);
|
|
8167
8169
|
};
|
|
8168
|
-
}(),
|
|
8170
|
+
}(), N = (e) => {
|
|
8169
8171
|
_.value = _.value.filter((t) => t.file ? t.file !== e.file : t.url ? t.url !== e.url : t.filename ? t.filename !== e.filename : !0);
|
|
8170
|
-
},
|
|
8172
|
+
}, F = (e, t) => {
|
|
8171
8173
|
g("update:modelValue", e, t);
|
|
8172
8174
|
};
|
|
8173
8175
|
return t({
|
|
@@ -8178,28 +8180,28 @@ var $d = ["src"], ef = {
|
|
|
8178
8180
|
triggerSendMessage: b
|
|
8179
8181
|
}), (t, n) => (k(), c("div", {
|
|
8180
8182
|
class: "ai-chat-input-container",
|
|
8181
|
-
style: w({ "--chat-z-index":
|
|
8183
|
+
style: w({ "--chat-z-index": R(wt) })
|
|
8182
8184
|
}, [
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
+
P(t.$slots, "top"),
|
|
8186
|
+
P(t.$slots, "interrupt"),
|
|
8185
8187
|
l("div", {
|
|
8186
8188
|
class: "chat-input",
|
|
8187
8189
|
style: w({ maxHeight: p.value + "px" })
|
|
8188
8190
|
}, [
|
|
8189
|
-
|
|
8191
|
+
P(t.$slots, "input-header", {}, () => [u.value ? (k(), o(Id, {
|
|
8190
8192
|
key: 0,
|
|
8191
8193
|
class: "chat-input-cite",
|
|
8192
8194
|
content: u.value,
|
|
8193
8195
|
onClose: T
|
|
8194
8196
|
}, null, 8, ["content"])) : s("", !0)]),
|
|
8195
|
-
|
|
8197
|
+
P(t.$slots, "files", C(h({ files: _.value })), () => [_.value.length ? (k(), c("div", {
|
|
8196
8198
|
key: 0,
|
|
8197
8199
|
ref_key: "filesRef",
|
|
8198
8200
|
ref: i,
|
|
8199
8201
|
class: "chat-input-files"
|
|
8200
8202
|
}, [f(mf, {
|
|
8201
8203
|
files: _.value,
|
|
8202
|
-
onDeleteFile:
|
|
8204
|
+
onDeleteFile: N
|
|
8203
8205
|
}, null, 8, ["files"])], 512)) : s("", !0)]),
|
|
8204
8206
|
f(Bf, {
|
|
8205
8207
|
ref_key: "aiSlashInputRef",
|
|
@@ -8210,8 +8212,8 @@ var $d = ["src"], ef = {
|
|
|
8210
8212
|
resources: e.resources,
|
|
8211
8213
|
skills: e.skills,
|
|
8212
8214
|
onKeydown: x,
|
|
8213
|
-
"onUpdate:modelValue":
|
|
8214
|
-
onUpload:
|
|
8215
|
+
"onUpdate:modelValue": F,
|
|
8216
|
+
onUpload: M
|
|
8215
8217
|
}, null, 8, [
|
|
8216
8218
|
"model-value",
|
|
8217
8219
|
"placeholder",
|
|
@@ -8226,16 +8228,16 @@ var $d = ["src"], ef = {
|
|
|
8226
8228
|
onSendMessage: b,
|
|
8227
8229
|
onStopSending: S
|
|
8228
8230
|
}, {
|
|
8229
|
-
default:
|
|
8231
|
+
default: U(() => {
|
|
8230
8232
|
var n;
|
|
8231
8233
|
return [
|
|
8232
8234
|
e.supportUpload ? (k(), o(Nd, {
|
|
8233
8235
|
key: 0,
|
|
8234
8236
|
"tippy-options": e.tippyOptions,
|
|
8235
|
-
onUpload:
|
|
8237
|
+
onUpload: M
|
|
8236
8238
|
}, null, 8, ["tippy-options"])) : s("", !0),
|
|
8237
8239
|
e.supportUpload && ((n = e.shortcuts) != null && n.length || v.value) ? (k(), c("span", cp)) : s("", !0),
|
|
8238
|
-
|
|
8240
|
+
P(t.$slots, "attachment", {}, () => [e.shortcuts && !v.value ? (k(), o(kr, {
|
|
8239
8241
|
key: 0,
|
|
8240
8242
|
shortcuts: e.shortcuts,
|
|
8241
8243
|
onSelectShortcut: E
|
|
@@ -8244,17 +8246,17 @@ var $d = ["src"], ef = {
|
|
|
8244
8246
|
class: "selected-shortcut-btn",
|
|
8245
8247
|
shortcut: v.value
|
|
8246
8248
|
}, {
|
|
8247
|
-
append:
|
|
8249
|
+
append: U(() => [f(R(Xn), { onClick: D })]),
|
|
8248
8250
|
_: 1
|
|
8249
8251
|
}, 8, ["shortcut"])) : s("", !0)])
|
|
8250
8252
|
];
|
|
8251
8253
|
}),
|
|
8252
|
-
"before-send":
|
|
8254
|
+
"before-send": U(() => [P(t.$slots, "model-selector", C(h({
|
|
8253
8255
|
models: e.models,
|
|
8254
8256
|
selectedModel: d.value
|
|
8255
8257
|
})), () => {
|
|
8256
8258
|
var t;
|
|
8257
|
-
return [(t = e.models) != null && t.length ? (k(), o(
|
|
8259
|
+
return [(t = e.models) != null && t.length ? (k(), o(R(sp), {
|
|
8258
8260
|
key: 0,
|
|
8259
8261
|
modelValue: d.value,
|
|
8260
8262
|
"onUpdate:modelValue": n[0] || (n[0] = (e) => d.value = e),
|
|
@@ -8268,7 +8270,7 @@ var $d = ["src"], ef = {
|
|
|
8268
8270
|
"tippy-options"
|
|
8269
8271
|
])) : s("", !0)];
|
|
8270
8272
|
})]),
|
|
8271
|
-
"send-icon":
|
|
8273
|
+
"send-icon": U(() => [P(t.$slots, "send-icon")]),
|
|
8272
8274
|
_: 3
|
|
8273
8275
|
}, 8, [
|
|
8274
8276
|
"message-state",
|
|
@@ -8282,7 +8284,7 @@ var $d = ["src"], ef = {
|
|
|
8282
8284
|
__name: "input-info-alert",
|
|
8283
8285
|
props: { content: {} },
|
|
8284
8286
|
setup(e) {
|
|
8285
|
-
return (t, n) => (k(), c("div", up, [f(
|
|
8287
|
+
return (t, n) => (k(), c("div", up, [f(R(Rn), { class: "ai-chat-input-info-alert__icon" }), l("span", dp, L(e.content), 1)]));
|
|
8286
8288
|
}
|
|
8287
8289
|
}), pp = {
|
|
8288
8290
|
[yt.Html]: mn,
|
|
@@ -8305,7 +8307,7 @@ var $d = ["src"], ef = {
|
|
|
8305
8307
|
variant: {}
|
|
8306
8308
|
},
|
|
8307
8309
|
setup(e) {
|
|
8308
|
-
let t = e, n =
|
|
8310
|
+
let t = e, n = Kr(), r = a(() => !!t.onPreview || !!n), u = a(() => !!t.onDownload || !!(n != null && n.canResolveArtifactUrl.value)), f = a(() => mp(t.file.type)), p = a(() => i(gn)), m = I(!1), h = a(() => ({
|
|
8309
8311
|
content: G("下载"),
|
|
8310
8312
|
theme: "ai-chat-box",
|
|
8311
8313
|
placement: "top"
|
|
@@ -8326,7 +8328,7 @@ var $d = ["src"], ef = {
|
|
|
8326
8328
|
m.value = !0;
|
|
8327
8329
|
try {
|
|
8328
8330
|
let { download_url: e } = yield n.resolveArtifactUrls(t.file);
|
|
8329
|
-
e &&
|
|
8331
|
+
e && Wr(e, t.file.name);
|
|
8330
8332
|
} finally {
|
|
8331
8333
|
m.value = !1;
|
|
8332
8334
|
}
|
|
@@ -8344,19 +8346,19 @@ var $d = ["src"], ef = {
|
|
|
8344
8346
|
"is-list": e.variant === "list"
|
|
8345
8347
|
}]),
|
|
8346
8348
|
onClick: g
|
|
8347
|
-
}, [l("div", hp, [l("span", gp, [(k(), o(
|
|
8349
|
+
}, [l("div", hp, [l("span", gp, [(k(), o(F(f.value)))]), W((k(), c("span", _p, [d(L(e.file.name), 1)])), [[R(Pi), {
|
|
8348
8350
|
text: e.file.name,
|
|
8349
8351
|
placement: "top"
|
|
8350
|
-
}]])]), u.value ?
|
|
8352
|
+
}]])]), u.value ? W((k(), c("div", {
|
|
8351
8353
|
key: 0,
|
|
8352
8354
|
class: S(["ai-artifact-file-card-download", { "is-loading": m.value }]),
|
|
8353
|
-
onClick:
|
|
8354
|
-
}, [m.value ? (k(), o(
|
|
8355
|
+
onClick: ce(_, ["stop"])
|
|
8356
|
+
}, [m.value ? (k(), o(R(me), {
|
|
8355
8357
|
key: 0,
|
|
8356
8358
|
mode: "spin",
|
|
8357
8359
|
size: "mini",
|
|
8358
8360
|
theme: "primary"
|
|
8359
|
-
})) : (k(), o(
|
|
8361
|
+
})) : (k(), o(F(p.value), { key: 1 }))], 2)), [[R(Se), h.value]]) : s("", !0)], 2));
|
|
8360
8362
|
}
|
|
8361
8363
|
}), yp = ["class", "style"], bp = { class: "ai-message-loading-row" }, xp = { class: "ai-message-loading-icon-wrap" }, Sp = {
|
|
8362
8364
|
key: 0,
|
|
@@ -8378,7 +8380,7 @@ var $d = ["src"], ef = {
|
|
|
8378
8380
|
text: { default: "加载中..." }
|
|
8379
8381
|
},
|
|
8380
8382
|
setup(t) {
|
|
8381
|
-
let n = t, r =
|
|
8383
|
+
let n = t, r = z(), i = a(() => {
|
|
8382
8384
|
let { class: e, style: t } = r;
|
|
8383
8385
|
return jr(r, yp);
|
|
8384
8386
|
}), o = a(() => ({
|
|
@@ -8394,16 +8396,16 @@ var $d = ["src"], ef = {
|
|
|
8394
8396
|
return e && typeof e == "object" && !Array.isArray(e) ? X(X({}, t), e) : t;
|
|
8395
8397
|
});
|
|
8396
8398
|
return (t, n) => (k(), c("div", b({
|
|
8397
|
-
class: ["ai-message-loading",
|
|
8399
|
+
class: ["ai-message-loading", R(r).class],
|
|
8398
8400
|
style: u.value
|
|
8399
|
-
}, i.value), [l("div", bp, [l("span", xp, [
|
|
8401
|
+
}, i.value), [l("div", bp, [l("span", xp, [P(t.$slots, "icon", {}, () => [f(R(Gt), {
|
|
8400
8402
|
class: "ai-message-loading-icon-svg",
|
|
8401
8403
|
style: w(o.value)
|
|
8402
|
-
}, null, 8, ["style"])])]), t.$slots.text ? (k(), c("span", Sp, [
|
|
8404
|
+
}, null, 8, ["style"])])]), t.$slots.text ? (k(), c("span", Sp, [P(t.$slots, "text")])) : (k(), c("span", Cp, [(k(!0), c(e, null, N(s.value, (e, t) => (k(), c("span", {
|
|
8403
8405
|
key: `${t}-${e}`,
|
|
8404
8406
|
class: "ai-message-loading-char",
|
|
8405
8407
|
style: w({ "--char-index": t })
|
|
8406
|
-
},
|
|
8408
|
+
}, L(e), 5))), 128))]))])], 16));
|
|
8407
8409
|
}
|
|
8408
8410
|
})), Tp = ["srcdoc"], Ep = /* @__PURE__ */ m({
|
|
8409
8411
|
__name: "html-preview",
|
|
@@ -8420,14 +8422,14 @@ var $d = ["src"], ef = {
|
|
|
8420
8422
|
setup(e) {
|
|
8421
8423
|
return (t, n) => (k(), c("div", Dp, [f(Jl, {
|
|
8422
8424
|
content: e.content,
|
|
8423
|
-
status:
|
|
8425
|
+
status: R(J).Success
|
|
8424
8426
|
}, null, 8, ["content", "status"])]));
|
|
8425
8427
|
}
|
|
8426
8428
|
}), kp = { class: "ai-artifact-txt-preview" }, Ap = /* @__PURE__ */ m({
|
|
8427
8429
|
__name: "txt-preview",
|
|
8428
8430
|
props: { content: {} },
|
|
8429
8431
|
setup(e) {
|
|
8430
|
-
return (t, n) => (k(), c("pre", kp,
|
|
8432
|
+
return (t, n) => (k(), c("pre", kp, L(e.content), 1));
|
|
8431
8433
|
}
|
|
8432
8434
|
}), jp = ["src"], Mp = /* @__PURE__ */ m({
|
|
8433
8435
|
__name: "url-iframe-preview",
|
|
@@ -8454,24 +8456,24 @@ var $d = ["src"], ef = {
|
|
|
8454
8456
|
renderer: "urlIframe"
|
|
8455
8457
|
};
|
|
8456
8458
|
}, Fp = (e) => {
|
|
8457
|
-
let t =
|
|
8459
|
+
let t = I("idle"), n = I(""), r = I(""), i = I("urlIframe"), a, o = 0, s = () => {
|
|
8458
8460
|
n.value = "", r.value = "";
|
|
8459
8461
|
}, c = function() {
|
|
8460
|
-
var c = Z(function* (
|
|
8461
|
-
let
|
|
8462
|
+
var c = Z(function* () {
|
|
8463
|
+
let c = ++o;
|
|
8462
8464
|
a == null || a.abort(), a = void 0;
|
|
8463
|
-
let
|
|
8464
|
-
if (!
|
|
8465
|
+
let l = e.getFile();
|
|
8466
|
+
if (!l || !e.canResolve()) {
|
|
8465
8467
|
t.value = "empty", s();
|
|
8466
8468
|
return;
|
|
8467
8469
|
}
|
|
8468
8470
|
t.value = "loading", s();
|
|
8469
|
-
let
|
|
8470
|
-
i.value =
|
|
8471
|
+
let u = Pp(l.type);
|
|
8472
|
+
i.value = u.renderer;
|
|
8471
8473
|
try {
|
|
8472
|
-
let i =
|
|
8473
|
-
if (
|
|
8474
|
-
if (
|
|
8474
|
+
let i = yield e.resolveUrls(l);
|
|
8475
|
+
if (c !== o) return;
|
|
8476
|
+
if (u.load === "text_from_download") {
|
|
8475
8477
|
if (!i.download_url) {
|
|
8476
8478
|
t.value = "empty";
|
|
8477
8479
|
return;
|
|
@@ -8481,7 +8483,7 @@ var $d = ["src"], ef = {
|
|
|
8481
8483
|
let r = yield fetch(i.download_url, { signal: e.signal });
|
|
8482
8484
|
if (!r.ok) throw Error(`HTTP ${r.status}`);
|
|
8483
8485
|
let s = yield r.text();
|
|
8484
|
-
if (e.signal.aborted ||
|
|
8486
|
+
if (e.signal.aborted || c !== o) return;
|
|
8485
8487
|
n.value = s, t.value = "ready";
|
|
8486
8488
|
return;
|
|
8487
8489
|
}
|
|
@@ -8491,11 +8493,11 @@ var $d = ["src"], ef = {
|
|
|
8491
8493
|
}
|
|
8492
8494
|
r.value = i.preview_url, t.value = "ready";
|
|
8493
8495
|
} catch (e) {
|
|
8494
|
-
if (
|
|
8496
|
+
if (c !== o || a != null && a.signal.aborted) return;
|
|
8495
8497
|
t.value = "error";
|
|
8496
8498
|
}
|
|
8497
8499
|
});
|
|
8498
|
-
return function(
|
|
8500
|
+
return function() {
|
|
8499
8501
|
return c.apply(this, arguments);
|
|
8500
8502
|
};
|
|
8501
8503
|
}(), l = () => {
|
|
@@ -8522,36 +8524,36 @@ var $d = ["src"], ef = {
|
|
|
8522
8524
|
__name: "artifact-preview-host",
|
|
8523
8525
|
props: { file: {} },
|
|
8524
8526
|
setup(e) {
|
|
8525
|
-
let t = e, n =
|
|
8527
|
+
let t = e, n = Kr(), { content: r, load: i, previewUrl: a, renderer: s, status: u } = Fp({
|
|
8526
8528
|
canResolve: () => !!(n != null && n.canResolveArtifactUrl.value),
|
|
8527
8529
|
getFile: () => t.file,
|
|
8528
|
-
resolveUrls: (e
|
|
8529
|
-
var
|
|
8530
|
-
return (
|
|
8530
|
+
resolveUrls: (e) => {
|
|
8531
|
+
var t;
|
|
8532
|
+
return (t = n == null ? void 0 : n.resolveArtifactUrls(e)) == null ? Promise.resolve({}) : t;
|
|
8531
8533
|
}
|
|
8532
8534
|
});
|
|
8533
|
-
return
|
|
8535
|
+
return H(() => t.file ? `${t.file.outputId}:${t.file.type}` : "", () => {
|
|
8534
8536
|
i();
|
|
8535
|
-
}, { immediate: !0 }), (t, n) => (k(), c("div", Ip, [
|
|
8537
|
+
}, { immediate: !0 }), (t, n) => (k(), c("div", Ip, [R(u) === "loading" ? (k(), c("div", Lp, [f(wp)])) : R(u) === "error" ? (k(), c("div", Rp, [l("span", null, L(R(G)("预览加载失败")), 1), f(R(le), {
|
|
8536
8538
|
size: "small",
|
|
8537
8539
|
text: "",
|
|
8538
8540
|
theme: "primary",
|
|
8539
|
-
onClick: n[0] || (n[0] = () =>
|
|
8541
|
+
onClick: n[0] || (n[0] = () => R(i)())
|
|
8540
8542
|
}, {
|
|
8541
|
-
default:
|
|
8543
|
+
default: U(() => [d(L(R(G)("重试")), 1)]),
|
|
8542
8544
|
_: 1
|
|
8543
|
-
})])) :
|
|
8545
|
+
})])) : R(u) === "empty" || !e.file ? (k(), c("div", zp, L(R(G)("暂无可预览的文件")), 1)) : R(s) === "html" ? (k(), o(Ep, {
|
|
8544
8546
|
key: 3,
|
|
8545
|
-
content:
|
|
8546
|
-
}, null, 8, ["content"])) :
|
|
8547
|
+
content: R(r)
|
|
8548
|
+
}, null, 8, ["content"])) : R(s) === "txt" ? (k(), o(Ap, {
|
|
8547
8549
|
key: 4,
|
|
8548
|
-
content:
|
|
8549
|
-
}, null, 8, ["content"])) :
|
|
8550
|
+
content: R(r)
|
|
8551
|
+
}, null, 8, ["content"])) : R(s) === "markdown" ? (k(), o(Op, {
|
|
8550
8552
|
key: 5,
|
|
8551
|
-
content:
|
|
8553
|
+
content: R(r)
|
|
8552
8554
|
}, null, 8, ["content"])) : (k(), o(Mp, {
|
|
8553
8555
|
key: 6,
|
|
8554
|
-
url:
|
|
8556
|
+
url: R(a)
|
|
8555
8557
|
}, null, 8, ["url"]))]));
|
|
8556
8558
|
}
|
|
8557
8559
|
}), Vp = { class: "ai-file-artifact-panel" }, Hp = { class: "ai-file-artifact-panel-list" }, Up = { class: "ai-file-artifact-panel-list-title" }, Wp = { class: "ai-file-artifact-panel-list-scroll" }, Gp = {
|
|
@@ -8568,7 +8570,7 @@ var $d = ["src"], ef = {
|
|
|
8568
8570
|
},
|
|
8569
8571
|
emits: ["select"],
|
|
8570
8572
|
setup(t, { emit: n }) {
|
|
8571
|
-
let r = t, u = n, p =
|
|
8573
|
+
let r = t, u = n, p = Kr(), m = a(() => !!(p != null && p.canResolveArtifactUrl.value)), h = () => i(gn), g = I(""), _ = I(!1), v = a(() => {
|
|
8572
8574
|
let e = g.value.trim().toLowerCase();
|
|
8573
8575
|
return e ? r.artifacts.filter((t) => t.name.toLowerCase().includes(e)) : r.artifacts;
|
|
8574
8576
|
}), y = a(() => r.artifacts.find((e) => e.outputId === r.activeId)), b = (e) => {
|
|
@@ -8579,7 +8581,7 @@ var $d = ["src"], ef = {
|
|
|
8579
8581
|
_.value = !0;
|
|
8580
8582
|
try {
|
|
8581
8583
|
let { download_url: t } = yield p.resolveArtifactUrls(e);
|
|
8582
|
-
t &&
|
|
8584
|
+
t && Wr(t, e.name);
|
|
8583
8585
|
} finally {
|
|
8584
8586
|
_.value = !1;
|
|
8585
8587
|
}
|
|
@@ -8589,21 +8591,21 @@ var $d = ["src"], ef = {
|
|
|
8589
8591
|
return e.apply(this, arguments);
|
|
8590
8592
|
};
|
|
8591
8593
|
}();
|
|
8592
|
-
return
|
|
8594
|
+
return H(() => {
|
|
8593
8595
|
var e;
|
|
8594
8596
|
return (e = y.value) == null ? void 0 : e.outputId;
|
|
8595
8597
|
}, () => {
|
|
8596
8598
|
_.value = !1;
|
|
8597
8599
|
}), (n, r) => (k(), c("div", Vp, [l("div", Hp, [
|
|
8598
|
-
l("p", Up,
|
|
8599
|
-
f(
|
|
8600
|
+
l("p", Up, L(R(G)("文件列表")) + "(" + L(t.artifacts.length) + ")", 1),
|
|
8601
|
+
f(R(pe), {
|
|
8600
8602
|
modelValue: g.value,
|
|
8601
8603
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => g.value = e),
|
|
8602
8604
|
class: "ai-file-artifact-panel-list-search",
|
|
8603
8605
|
clearable: "",
|
|
8604
|
-
placeholder:
|
|
8606
|
+
placeholder: R(G)("搜索文件关键字")
|
|
8605
8607
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
8606
|
-
l("div", Wp, [v.value.length ? (k(!0), c(e, { key: 0 },
|
|
8608
|
+
l("div", Wp, [v.value.length ? (k(!0), c(e, { key: 0 }, N(v.value, (e) => (k(), o(vp, {
|
|
8607
8609
|
key: e.outputId,
|
|
8608
8610
|
active: e.outputId === t.activeId,
|
|
8609
8611
|
file: e,
|
|
@@ -8613,26 +8615,26 @@ var $d = ["src"], ef = {
|
|
|
8613
8615
|
"active",
|
|
8614
8616
|
"file",
|
|
8615
8617
|
"on-preview"
|
|
8616
|
-
]))), 128)) : (k(), c("div", Gp,
|
|
8617
|
-
]), l("div", Kp, [y.value ? (k(), c("div", qp, [l("div", Jp, [l("span", Yp, [(k(), o(
|
|
8618
|
+
]))), 128)) : (k(), c("div", Gp, L(R(G)("搜索结果为空")), 1))])
|
|
8619
|
+
]), l("div", Kp, [y.value ? (k(), c("div", qp, [l("div", Jp, [l("span", Yp, [(k(), o(F(R(mp)(y.value.type))))]), W((k(), c("span", Xp, [d(L(y.value.name), 1)])), [[R(Pi), {
|
|
8618
8620
|
text: y.value.name,
|
|
8619
8621
|
placement: "top"
|
|
8620
8622
|
}]])]), m.value ? (k(), c("span", {
|
|
8621
8623
|
key: 0,
|
|
8622
8624
|
class: S(["ai-file-artifact-panel-preview-header-download", { "is-loading": _.value }]),
|
|
8623
8625
|
onClick: r[1] || (r[1] = (e) => x(y.value))
|
|
8624
|
-
}, [_.value ? (k(), o(
|
|
8626
|
+
}, [_.value ? (k(), o(R(me), {
|
|
8625
8627
|
key: 0,
|
|
8626
8628
|
mode: "spin",
|
|
8627
8629
|
size: "mini",
|
|
8628
8630
|
theme: "primary"
|
|
8629
|
-
})) : (k(), o(
|
|
8631
|
+
})) : (k(), o(F(h()), { key: 1 }))], 2)) : s("", !0)])) : s("", !0), l("div", Zp, [f(Bp, { file: y.value }, null, 8, ["file"])])])]));
|
|
8630
8632
|
}
|
|
8631
8633
|
}), $p = "others", em = (e) => e < 26 ? String.fromCharCode(65 + e) : String(e + 1), tm = (e) => {
|
|
8632
8634
|
let t = a(() => {
|
|
8633
8635
|
var t, n;
|
|
8634
8636
|
return (t = (n = e()) == null || (n = n.metadata) == null ? void 0 : n.questions) == null ? [] : t;
|
|
8635
|
-
}), n =
|
|
8637
|
+
}), 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 = () => {
|
|
8636
8638
|
c.value && --r.value;
|
|
8637
8639
|
}, f = () => {
|
|
8638
8640
|
l.value && (r.value += 1);
|
|
@@ -8691,17 +8693,17 @@ var $d = ["src"], ef = {
|
|
|
8691
8693
|
},
|
|
8692
8694
|
setup(t) {
|
|
8693
8695
|
let n = t, r = a(() => n.status === "cancelled" ? G("已取消") : G("已回复"));
|
|
8694
|
-
return (n, i) => (k(), c("section", rm, [l("header", im, [l("div", am, [f(
|
|
8696
|
+
return (n, i) => (k(), c("section", rm, [l("header", im, [l("div", am, [f(R(Ln), { class: "ai-user-question-answered__help-icon" }), l("span", om, L(R(G)("回答内容")), 1)]), l("span", sm, L(r.value), 1)]), l("div", cm, [(k(!0), c(e, null, N(t.answers, (r, i) => (k(), c("div", {
|
|
8695
8697
|
key: i,
|
|
8696
8698
|
class: "ai-user-question-answered__item"
|
|
8697
|
-
}, [l("div", lm, [l("span", um,
|
|
8699
|
+
}, [l("div", lm, [l("span", um, L(i + 1) + ". " + L(r.question), 1), r.multiSelect === void 0 ? s("", !0) : (k(), c("span", dm, L(r.multiSelect ? R(G)("多选") : R(G)("单选")), 1))]), P(n.$slots, "answer", b({ ref_for: !0 }, {
|
|
8698
8700
|
item: r,
|
|
8699
8701
|
index: i,
|
|
8700
8702
|
status: t.status
|
|
8701
|
-
}), () => [(k(!0), c(e, null,
|
|
8703
|
+
}), () => [(k(!0), c(e, null, N(r.answer, (e, t) => (k(), c("p", {
|
|
8702
8704
|
key: t,
|
|
8703
8705
|
class: "ai-user-question-answered__answer"
|
|
8704
|
-
},
|
|
8706
|
+
}, L(e.description || e.label), 1))), 128))])]))), 128))])]));
|
|
8705
8707
|
}
|
|
8706
8708
|
}), pm = { class: "ai-user-question-option__badge" }, mm = ["placeholder", "value"], hm = {
|
|
8707
8709
|
key: 1,
|
|
@@ -8733,23 +8735,23 @@ var $d = ["src"], ef = {
|
|
|
8733
8735
|
"ai-user-question-option--others": e.option.isOthers
|
|
8734
8736
|
}]),
|
|
8735
8737
|
onClick: i
|
|
8736
|
-
}, [l("span", pm,
|
|
8738
|
+
}, [l("span", pm, L(e.option.letter), 1), e.option.isOthers ? (k(), c("input", {
|
|
8737
8739
|
key: 0,
|
|
8738
8740
|
class: "ai-user-question-option__input",
|
|
8739
|
-
placeholder:
|
|
8741
|
+
placeholder: R(G)("请输入..."),
|
|
8740
8742
|
value: e.othersText,
|
|
8741
|
-
onClick: n[0] || (n[0] =
|
|
8743
|
+
onClick: n[0] || (n[0] = ce(() => {}, ["stop"])),
|
|
8742
8744
|
onFocus: a,
|
|
8743
8745
|
onInput: o,
|
|
8744
|
-
onKeydown: n[1] || (n[1] = ce(
|
|
8745
|
-
}, null, 40, mm)) : (k(), c("span", hm,
|
|
8746
|
+
onKeydown: n[1] || (n[1] = se(ce((e) => r("confirm"), ["stop"]), ["enter"]))
|
|
8747
|
+
}, null, 40, mm)) : (k(), c("span", hm, L(e.option.description), 1))], 2));
|
|
8746
8748
|
}
|
|
8747
8749
|
}), _m = { class: "ai-user-question-choice" }, vm = /* @__PURE__ */ m({
|
|
8748
8750
|
__name: "user-question-choice",
|
|
8749
8751
|
props: { question: {} },
|
|
8750
8752
|
emits: ["answer", "confirm"],
|
|
8751
8753
|
setup(t, { emit: n }) {
|
|
8752
|
-
let r = t, i = n, s =
|
|
8754
|
+
let r = t, i = n, s = I([]), l = I(""), u = a(() => {
|
|
8753
8755
|
var e;
|
|
8754
8756
|
let t = ((e = r.question.options) == null ? [] : e).filter((e) => e.label !== $p).map((e, t) => X(X({}, e), {}, {
|
|
8755
8757
|
isOthers: !1,
|
|
@@ -8781,9 +8783,9 @@ var $d = ["src"], ef = {
|
|
|
8781
8783
|
}, _ = (e) => {
|
|
8782
8784
|
l.value = e, h();
|
|
8783
8785
|
};
|
|
8784
|
-
return
|
|
8786
|
+
return H(() => r.question, () => {
|
|
8785
8787
|
s.value = [], l.value = "", h();
|
|
8786
|
-
}), (t, n) => (k(), c("div", _m, [(k(!0), c(e, null,
|
|
8788
|
+
}), (t, n) => (k(), c("div", _m, [(k(!0), c(e, null, N(u.value, (e, t) => (k(), o(gm, {
|
|
8787
8789
|
key: t,
|
|
8788
8790
|
option: e,
|
|
8789
8791
|
"others-text": l.value,
|
|
@@ -8808,95 +8810,95 @@ var $d = ["src"], ef = {
|
|
|
8808
8810
|
onResume: { type: Function }
|
|
8809
8811
|
},
|
|
8810
8812
|
setup(t) {
|
|
8811
|
-
let n = t, r = ji(), i =
|
|
8813
|
+
let n = t, r = ji(), 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 } = tm(() => n.interrupt), O = a(() => {
|
|
8812
8814
|
var e;
|
|
8813
8815
|
return ((e = n.interrupt.metadata) == null || (e = e.questions) == null || (e = e[0]) == null ? void 0 : e.header) || n.interrupt.message || "";
|
|
8814
8816
|
}), A = () => {
|
|
8815
8817
|
i.value = !i.value;
|
|
8816
|
-
},
|
|
8818
|
+
}, j = () => {
|
|
8817
8819
|
i.value && (i.value = !1);
|
|
8818
|
-
},
|
|
8820
|
+
}, M = I(null), ee = () => {
|
|
8819
8821
|
var e;
|
|
8820
|
-
!h.value ||
|
|
8821
|
-
},
|
|
8822
|
+
!h.value || M.value !== null || (M.value = "complete", (e = n.onResume) == null || e.call(n, E(), n.interrupt));
|
|
8823
|
+
}, F = () => {
|
|
8822
8824
|
var e;
|
|
8823
|
-
|
|
8825
|
+
M.value === null && (M.value = "skip", (e = n.onResume) == null || e.call(n, D(), n.interrupt));
|
|
8824
8826
|
};
|
|
8825
8827
|
return (t, n) => (k(), c("section", { class: S(["ai-user-question-card", { "ai-user-question-card--collapsed": i.value }]) }, [
|
|
8826
8828
|
l("header", {
|
|
8827
8829
|
class: "ai-user-question-card__header",
|
|
8828
|
-
onClick:
|
|
8829
|
-
}, [l("div", ym, [f(
|
|
8830
|
+
onClick: j
|
|
8831
|
+
}, [l("div", ym, [f(R(Ln), { class: "ai-user-question-card__help-icon" }), W((k(), c("span", bm, [d(L(O.value), 1)])), [[R(Pi), X({}, R(r))]])]), l("div", xm, [
|
|
8830
8832
|
l("div", Sm, [
|
|
8831
8833
|
l("button", {
|
|
8832
|
-
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !
|
|
8833
|
-
disabled: !
|
|
8834
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !R(_) }]),
|
|
8835
|
+
disabled: !R(_),
|
|
8834
8836
|
type: "button",
|
|
8835
|
-
onClick: n[0] || (n[0] =
|
|
8836
|
-
}, [f(
|
|
8837
|
-
l("span", wm,
|
|
8837
|
+
onClick: n[0] || (n[0] = ce((...e) => R(y) && R(y)(...e), ["stop"]))
|
|
8838
|
+
}, [f(R(Cn), { class: "ai-user-question-card__nav-icon" })], 10, Cm),
|
|
8839
|
+
l("span", wm, L(R(g) + 1) + " / " + L(R(m)), 1),
|
|
8838
8840
|
l("button", {
|
|
8839
|
-
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !
|
|
8840
|
-
disabled: !
|
|
8841
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !R(v) }]),
|
|
8842
|
+
disabled: !R(v),
|
|
8841
8843
|
type: "button",
|
|
8842
|
-
onClick: n[1] || (n[1] =
|
|
8843
|
-
}, [f(
|
|
8844
|
+
onClick: n[1] || (n[1] = ce((...e) => R(x) && R(x)(...e), ["stop"]))
|
|
8845
|
+
}, [f(R(wn), { class: "ai-user-question-card__nav-icon" })], 10, Tm)
|
|
8844
8846
|
]),
|
|
8845
8847
|
n[2] || (n[2] = l("span", { class: "ai-user-question-card__divider" }, null, -1)),
|
|
8846
8848
|
l("button", {
|
|
8847
8849
|
class: "ai-user-question-card__collapse-btn",
|
|
8848
8850
|
type: "button",
|
|
8849
|
-
onClick:
|
|
8850
|
-
}, [f(
|
|
8851
|
+
onClick: ce(A, ["stop"])
|
|
8852
|
+
}, [f(R(Cn), {
|
|
8851
8853
|
class: "ai-user-question-card__arrow",
|
|
8852
8854
|
style: w({ transform: i.value ? "rotate(180deg)" : "rotate(-90deg)" })
|
|
8853
8855
|
}, null, 8, ["style"])])
|
|
8854
8856
|
])]),
|
|
8855
|
-
|
|
8857
|
+
W(l("div", Em, [(k(!0), c(e, null, N(R(u), (e, n) => W((k(), c("div", {
|
|
8856
8858
|
key: n,
|
|
8857
8859
|
class: "ai-user-question-card__question"
|
|
8858
|
-
}, [l("div", Dm, [l("span", Om,
|
|
8860
|
+
}, [l("div", Dm, [l("span", Om, L(n + 1) + ". " + L(e.question), 1), e.multiSelect === void 0 ? s("", !0) : (k(), c("span", km, L(e.multiSelect ? R(G)("多选") : R(G)("单选")), 1))]), l("div", Am, [P(t.$slots, "question", b({ ref_for: !0 }, {
|
|
8859
8861
|
question: e,
|
|
8860
8862
|
qIndex: n,
|
|
8861
|
-
answer:
|
|
8862
|
-
setAnswer: (e) =>
|
|
8863
|
-
confirm:
|
|
8863
|
+
answer: R(C)(n),
|
|
8864
|
+
setAnswer: (e) => R(T)(n, e),
|
|
8865
|
+
confirm: ee
|
|
8864
8866
|
}), () => [f(vm, {
|
|
8865
8867
|
question: e,
|
|
8866
|
-
onAnswer: (e) =>
|
|
8867
|
-
onConfirm:
|
|
8868
|
-
}, null, 8, ["question", "onAnswer"])])])])), [[
|
|
8869
|
-
|
|
8870
|
-
d(
|
|
8871
|
-
l("span", Nm,
|
|
8872
|
-
d(" " +
|
|
8873
|
-
]), l("div", Pm, [f(
|
|
8868
|
+
onAnswer: (e) => R(T)(n, e),
|
|
8869
|
+
onConfirm: ee
|
|
8870
|
+
}, null, 8, ["question", "onAnswer"])])])])), [[ie, n === R(g)]])), 128))], 512), [[ie, !i.value]]),
|
|
8871
|
+
W(l("footer", jm, [l("span", Mm, [
|
|
8872
|
+
d(L(R(G)("已完成")) + " ", 1),
|
|
8873
|
+
l("span", Nm, L(R(p)), 1),
|
|
8874
|
+
d(" " + L(R(G)("题")), 1)
|
|
8875
|
+
]), l("div", Pm, [f(R(le), {
|
|
8874
8876
|
class: "ai-user-question-card__skip",
|
|
8875
|
-
disabled:
|
|
8876
|
-
loading:
|
|
8877
|
+
disabled: M.value === "complete",
|
|
8878
|
+
loading: M.value === "skip",
|
|
8877
8879
|
size: "small",
|
|
8878
8880
|
text: "",
|
|
8879
|
-
onClick:
|
|
8881
|
+
onClick: F
|
|
8880
8882
|
}, {
|
|
8881
|
-
default:
|
|
8883
|
+
default: U(() => [M.value === "skip" ? s("", !0) : (k(), o(R(Bn), {
|
|
8882
8884
|
key: 0,
|
|
8883
8885
|
class: "ai-user-question-card__skip-icon"
|
|
8884
|
-
})), d(" " +
|
|
8886
|
+
})), d(" " + L(R(G)("跳过")), 1)]),
|
|
8885
8887
|
_: 1
|
|
8886
|
-
}, 8, ["disabled", "loading"]), f(
|
|
8888
|
+
}, 8, ["disabled", "loading"]), f(R(le), {
|
|
8887
8889
|
class: "ai-user-question-card__complete",
|
|
8888
|
-
disabled: !
|
|
8889
|
-
loading:
|
|
8890
|
+
disabled: !R(h) || M.value === "skip",
|
|
8891
|
+
loading: M.value === "complete",
|
|
8890
8892
|
size: "small",
|
|
8891
8893
|
theme: "primary",
|
|
8892
|
-
onClick:
|
|
8894
|
+
onClick: ee
|
|
8893
8895
|
}, {
|
|
8894
|
-
default:
|
|
8896
|
+
default: U(() => [M.value === "complete" ? s("", !0) : (k(), o(R(zn), {
|
|
8895
8897
|
key: 0,
|
|
8896
8898
|
class: "ai-user-question-card__enter-icon"
|
|
8897
|
-
})), d(" " +
|
|
8899
|
+
})), d(" " + L(R(G)("完成")), 1)]),
|
|
8898
8900
|
_: 1
|
|
8899
|
-
}, 8, ["disabled", "loading"])])], 512), [[
|
|
8901
|
+
}, 8, ["disabled", "loading"])])], 512), [[ie, !i.value]])
|
|
8900
8902
|
], 2));
|
|
8901
8903
|
}
|
|
8902
8904
|
}), Im = { class: "ai-delete-confirm" }, Lm = { class: "ai-delete-confirm__title" }, Rm = { class: "ai-delete-confirm__desc" }, zm = { class: "ai-delete-confirm__actions" }, Bm = /* @__PURE__ */ m({
|
|
@@ -8913,7 +8915,7 @@ var $d = ["src"], ef = {
|
|
|
8913
8915
|
},
|
|
8914
8916
|
emits: ["confirm", "cancel"],
|
|
8915
8917
|
setup(e, { emit: t }) {
|
|
8916
|
-
let n = e, r = t, i =
|
|
8918
|
+
let n = e, r = t, i = V("tippyRef"), s = a(() => ({
|
|
8917
8919
|
id: n.id,
|
|
8918
8920
|
name: n.name,
|
|
8919
8921
|
description: n.description,
|
|
@@ -8938,29 +8940,29 @@ var $d = ["src"], ef = {
|
|
|
8938
8940
|
};
|
|
8939
8941
|
return O(() => {
|
|
8940
8942
|
p();
|
|
8941
|
-
}), (e, t) => (k(), o(
|
|
8943
|
+
}), (e, t) => (k(), o(R(xe), b({
|
|
8942
8944
|
ref_key: "tippyRef",
|
|
8943
8945
|
ref: i
|
|
8944
8946
|
}, c.value, { onShow: u }), {
|
|
8945
|
-
content:
|
|
8946
|
-
l("div", Lm,
|
|
8947
|
-
l("div", Rm,
|
|
8948
|
-
l("div", zm, [f(
|
|
8947
|
+
content: U(() => [l("div", Im, [
|
|
8948
|
+
l("div", Lm, L(R(G)("确认删除该回答?")), 1),
|
|
8949
|
+
l("div", Rm, L(R(G)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
8950
|
+
l("div", zm, [f(R(le), {
|
|
8949
8951
|
size: "small",
|
|
8950
8952
|
theme: "danger",
|
|
8951
8953
|
onClick: m
|
|
8952
8954
|
}, {
|
|
8953
|
-
default:
|
|
8955
|
+
default: U(() => [d(L(R(G)("删除")), 1)]),
|
|
8954
8956
|
_: 1
|
|
8955
|
-
}), f(
|
|
8957
|
+
}), f(R(le), {
|
|
8956
8958
|
size: "small",
|
|
8957
8959
|
onClick: g
|
|
8958
8960
|
}, {
|
|
8959
|
-
default:
|
|
8961
|
+
default: U(() => [d(L(R(G)("取消")), 1)]),
|
|
8960
8962
|
_: 1
|
|
8961
8963
|
})])
|
|
8962
8964
|
])]),
|
|
8963
|
-
default:
|
|
8965
|
+
default: U(() => [f(Ii, C(h(s.value)), null, 16)]),
|
|
8964
8966
|
_: 1
|
|
8965
8967
|
}, 16));
|
|
8966
8968
|
}
|
|
@@ -8973,7 +8975,7 @@ var $d = ["src"], ef = {
|
|
|
8973
8975
|
},
|
|
8974
8976
|
emits: ["submit", "cancel"],
|
|
8975
8977
|
setup(t, { emit: n }) {
|
|
8976
|
-
let r = n, i =
|
|
8978
|
+
let r = n, i = I(""), a = I([]), o = (e) => {
|
|
8977
8979
|
a.value.includes(e) ? a.value = a.value.filter((t) => t !== e) : a.value = [...a.value, e];
|
|
8978
8980
|
}, s = () => {
|
|
8979
8981
|
r("submit", a.value, i.value);
|
|
@@ -8982,40 +8984,40 @@ var $d = ["src"], ef = {
|
|
|
8982
8984
|
};
|
|
8983
8985
|
return (n, r) => (k(), c("div", {
|
|
8984
8986
|
class: "ai-user-feedback",
|
|
8985
|
-
onMouseenter: r[1] || (r[1] =
|
|
8987
|
+
onMouseenter: r[1] || (r[1] = ce(() => {}, ["stop", "prevent"]))
|
|
8986
8988
|
}, [
|
|
8987
|
-
l("div", Vm,
|
|
8988
|
-
l("div", Hm, [t.loading ? (k(), c(e, { key: 0 },
|
|
8989
|
+
l("div", Vm, L(t.title), 1),
|
|
8990
|
+
l("div", Hm, [t.loading ? (k(), c(e, { key: 0 }, N(8, (e) => l("div", {
|
|
8989
8991
|
key: e,
|
|
8990
8992
|
class: "reason-item ai-skeleton-element"
|
|
8991
|
-
})), 64)) : (k(!0), c(e, { key: 1 },
|
|
8993
|
+
})), 64)) : (k(!0), c(e, { key: 1 }, N(t.reasonList, (e) => (k(), c("div", {
|
|
8992
8994
|
key: e,
|
|
8993
8995
|
class: S(["reason-item", { "is-active": a.value.includes(e) }]),
|
|
8994
8996
|
onClick: (t) => o(e)
|
|
8995
|
-
},
|
|
8996
|
-
l("div", Wm, [f(
|
|
8997
|
+
}, L(e), 11, Um))), 128))]),
|
|
8998
|
+
l("div", Wm, [f(R(pe), {
|
|
8997
8999
|
modelValue: i.value,
|
|
8998
9000
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => i.value = e),
|
|
8999
|
-
placeholder:
|
|
9001
|
+
placeholder: R(G)("说出您的想法"),
|
|
9000
9002
|
rows: 3,
|
|
9001
9003
|
type: "textarea"
|
|
9002
9004
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
9003
|
-
l("div", Gm, [f(
|
|
9005
|
+
l("div", Gm, [f(R(le), {
|
|
9004
9006
|
class: "custom-btn",
|
|
9005
9007
|
disabled: !i.value && a.value.length === 0,
|
|
9006
9008
|
size: "small",
|
|
9007
9009
|
theme: "primary",
|
|
9008
9010
|
onClick: s
|
|
9009
9011
|
}, {
|
|
9010
|
-
default:
|
|
9012
|
+
default: U(() => [d(L(R(G)("提交")), 1)]),
|
|
9011
9013
|
_: 1
|
|
9012
|
-
}, 8, ["disabled"]), f(
|
|
9014
|
+
}, 8, ["disabled"]), f(R(le), {
|
|
9013
9015
|
class: "custom-btn",
|
|
9014
9016
|
size: "small",
|
|
9015
9017
|
width: "80px",
|
|
9016
9018
|
onClick: u
|
|
9017
9019
|
}, {
|
|
9018
|
-
default:
|
|
9020
|
+
default: U(() => [d(L(R(G)("取消")), 1)]),
|
|
9019
9021
|
_: 1
|
|
9020
9022
|
})])
|
|
9021
9023
|
], 32));
|
|
@@ -9041,7 +9043,7 @@ var $d = ["src"], ef = {
|
|
|
9041
9043
|
},
|
|
9042
9044
|
emits: ["feedback"],
|
|
9043
9045
|
setup(t, { emit: n }) {
|
|
9044
|
-
let r = t, i = n, u =
|
|
9046
|
+
let r = t, i = n, u = V("feedbackTippyRef"), d = I(!1), p = I([]), m = I(null), h = a(() => X({
|
|
9045
9047
|
arrow: !1,
|
|
9046
9048
|
interactive: !0,
|
|
9047
9049
|
offset: [0, 6],
|
|
@@ -9092,11 +9094,11 @@ var $d = ["src"], ef = {
|
|
|
9092
9094
|
return O(() => {
|
|
9093
9095
|
v(), p.value = [];
|
|
9094
9096
|
}), (n, r) => (k(), c("div", qm, [
|
|
9095
|
-
l("div", Jm, [(k(!0), c(e, null,
|
|
9097
|
+
l("div", Jm, [(k(!0), c(e, null, N(t.messageTools, (n) => (k(), c(e, { key: n.id }, [n.id === "delete" ? (k(), o(Bm, b({
|
|
9096
9098
|
key: 0,
|
|
9097
9099
|
ref_for: !0
|
|
9098
9100
|
}, n, {
|
|
9099
|
-
disabled: t.messageToolsStatus ===
|
|
9101
|
+
disabled: t.messageToolsStatus === R(Ad).Disabled,
|
|
9100
9102
|
"tippy-options": t.tippyOptions,
|
|
9101
9103
|
onConfirm: (e) => _(n)
|
|
9102
9104
|
}), null, 16, [
|
|
@@ -9107,7 +9109,7 @@ var $d = ["src"], ef = {
|
|
|
9107
9109
|
key: 1,
|
|
9108
9110
|
ref_for: !0
|
|
9109
9111
|
}, n, {
|
|
9110
|
-
disabled: t.messageToolsStatus ===
|
|
9112
|
+
disabled: t.messageToolsStatus === R(Ad).Disabled,
|
|
9111
9113
|
"tippy-options": t.tippyOptions,
|
|
9112
9114
|
onClick: (e) => g(n)
|
|
9113
9115
|
}), null, 16, [
|
|
@@ -9116,16 +9118,16 @@ var $d = ["src"], ef = {
|
|
|
9116
9118
|
"onClick"
|
|
9117
9119
|
]))], 64))), 128))]),
|
|
9118
9120
|
t.updateTools.length > 0 ? (k(), c("div", Ym)) : s("", !0),
|
|
9119
|
-
l("div", Xm, [(k(!0), c(e, null,
|
|
9121
|
+
l("div", Xm, [(k(!0), c(e, null, N(t.updateTools, (n) => (k(), c(e, { key: n.id }, [n.id === "like" || n.id === "unlike" ? (k(), o(R(xe), b({
|
|
9120
9122
|
key: 0,
|
|
9121
9123
|
ref_for: !0,
|
|
9122
9124
|
ref_key: "feedbackTippyRef",
|
|
9123
9125
|
ref: u
|
|
9124
9126
|
}, { ref_for: !0 }, h.value, { onShow: (e) => C(n.id) }), {
|
|
9125
|
-
content:
|
|
9127
|
+
content: U(() => [f(Km, {
|
|
9126
9128
|
loading: d.value,
|
|
9127
9129
|
"reason-list": p.value,
|
|
9128
|
-
title: n.id === "like" ?
|
|
9130
|
+
title: n.id === "like" ? R(G)("什么原因让你满意?") : R(G)("什么原因让你不满意?"),
|
|
9129
9131
|
onCancel: v,
|
|
9130
9132
|
onSubmit: (e, t) => S(n, e, t)
|
|
9131
9133
|
}, null, 8, [
|
|
@@ -9134,10 +9136,10 @@ var $d = ["src"], ef = {
|
|
|
9134
9136
|
"title",
|
|
9135
9137
|
"onSubmit"
|
|
9136
9138
|
])]),
|
|
9137
|
-
default:
|
|
9139
|
+
default: U(() => [f(Ii, b({ ref_for: !0 }, n, {
|
|
9138
9140
|
id: y(n.id),
|
|
9139
9141
|
active: m.value === n.id,
|
|
9140
|
-
disabled: t.messageToolsStatus ===
|
|
9142
|
+
disabled: t.messageToolsStatus === R(Ad).Disabled,
|
|
9141
9143
|
"tippy-options": X(X({}, t.tippyOptions), {}, { content: x(n.id) }),
|
|
9142
9144
|
onClick: (e) => g(n)
|
|
9143
9145
|
}), null, 16, [
|
|
@@ -9152,7 +9154,7 @@ var $d = ["src"], ef = {
|
|
|
9152
9154
|
key: 1,
|
|
9153
9155
|
ref_for: !0
|
|
9154
9156
|
}, n, {
|
|
9155
|
-
disabled: t.messageToolsStatus ===
|
|
9157
|
+
disabled: t.messageToolsStatus === R(Ad).Disabled,
|
|
9156
9158
|
"tippy-options": t.tippyOptions,
|
|
9157
9159
|
onConfirm: (e) => _(n)
|
|
9158
9160
|
}), null, 16, [
|
|
@@ -9163,7 +9165,7 @@ var $d = ["src"], ef = {
|
|
|
9163
9165
|
key: 2,
|
|
9164
9166
|
ref_for: !0
|
|
9165
9167
|
}, n, {
|
|
9166
|
-
disabled: t.messageToolsStatus ===
|
|
9168
|
+
disabled: t.messageToolsStatus === R(Ad).Disabled,
|
|
9167
9169
|
"tippy-options": t.tippyOptions,
|
|
9168
9170
|
onClick: (e) => g(n)
|
|
9169
9171
|
}), null, 16, [
|
|
@@ -9198,14 +9200,14 @@ var $d = ["src"], ef = {
|
|
|
9198
9200
|
}),
|
|
9199
9201
|
emits: ["update:collapsed"],
|
|
9200
9202
|
setup(e) {
|
|
9201
|
-
let t =
|
|
9203
|
+
let t = B(e, "collapsed");
|
|
9202
9204
|
return (n, r) => (k(), c("div", $m, [l("div", {
|
|
9203
9205
|
class: "ai-activity-message-title",
|
|
9204
9206
|
onClick: r[0] || (r[0] = (e) => t.value = !t.value)
|
|
9205
|
-
}, [
|
|
9207
|
+
}, [P(n.$slots, "title", C(h({ collapsed: t.value }))), e.activityType === R(_t).FlowAgent ? s("", !0) : (k(), c("span", {
|
|
9206
9208
|
key: 0,
|
|
9207
9209
|
class: S(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": t.value }])
|
|
9208
|
-
}, [f(
|
|
9210
|
+
}, [f(R(Wn))], 2))]), W(l("div", eh, [P(n.$slots, "default")], 512), [[ie, !t.value]])]));
|
|
9209
9211
|
}
|
|
9210
9212
|
}), nh = [
|
|
9211
9213
|
{
|
|
@@ -9276,7 +9278,7 @@ var $d = ["src"], ef = {
|
|
|
9276
9278
|
let t = a(() => {
|
|
9277
9279
|
var t;
|
|
9278
9280
|
return Array.isArray(e.value) ? e.value : [(t = e.value) == null ? {} : t];
|
|
9279
|
-
}), n =
|
|
9281
|
+
}), n = I({}), r = (e) => n.value[e.task_id] !== !1;
|
|
9280
9282
|
return {
|
|
9281
9283
|
isTaskExpanded: r,
|
|
9282
9284
|
taskList: t,
|
|
@@ -9342,7 +9344,7 @@ var $d = ["src"], ef = {
|
|
|
9342
9344
|
pendingLabel: () => G("跳过中"),
|
|
9343
9345
|
visible: (e) => e.convergedState === "failed" && e.skippable
|
|
9344
9346
|
}], uh = (e, t) => `${e.task_id}:${t.id}:${t.retry}`, dh = (e) => {
|
|
9345
|
-
let { hideResumeActions: t, onInterruptResume: n, openNodeDetail: r } = e, i =
|
|
9347
|
+
let { hideResumeActions: t, onInterruptResume: n, openNodeDetail: r } = e, i = I({}), a = (e, t, r) => {
|
|
9346
9348
|
var a;
|
|
9347
9349
|
let o = uh(t, r);
|
|
9348
9350
|
i.value[o] || (i.value = X(X({}, i.value), {}, { [o]: e }), (a = n.value) == null || a.call(n, {
|
|
@@ -9382,7 +9384,7 @@ var $d = ["src"], ef = {
|
|
|
9382
9384
|
__name: "detail-section",
|
|
9383
9385
|
props: { title: {} },
|
|
9384
9386
|
setup(e) {
|
|
9385
|
-
return (t, n) => (k(), c("div", fh, [l("div", ph, [n[0] || (n[0] = l("span", { class: "section-bar" }, null, -1)), l("span", mh,
|
|
9387
|
+
return (t, n) => (k(), c("div", fh, [l("div", ph, [n[0] || (n[0] = l("span", { class: "section-bar" }, null, -1)), l("span", mh, L(e.title), 1)]), P(t.$slots, "default")]));
|
|
9386
9388
|
}
|
|
9387
9389
|
}), gh = { class: "ai-simple-table" }, _h = { key: 0 }, vh = ["colspan"], yh = /* @__PURE__ */ m({
|
|
9388
9390
|
__name: "simple-table",
|
|
@@ -9391,12 +9393,12 @@ var $d = ["src"], ef = {
|
|
|
9391
9393
|
data: {}
|
|
9392
9394
|
},
|
|
9393
9395
|
setup(t) {
|
|
9394
|
-
return (n, r) => (k(), c("table", gh, [l("thead", null, [l("tr", null, [(k(!0), c(e, null,
|
|
9396
|
+
return (n, r) => (k(), c("table", gh, [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) => {
|
|
9395
9397
|
var t;
|
|
9396
9398
|
return k(), c("td", {
|
|
9397
9399
|
key: e.key,
|
|
9398
9400
|
class: S({ "is-break-all": e.breakAll })
|
|
9399
|
-
},
|
|
9401
|
+
}, L((t = n[e.key]) == null ? "--" : t), 3);
|
|
9400
9402
|
}), 128))]))), 128)), t.data.length ? s("", !0) : (k(), c("tr", _h, [l("td", {
|
|
9401
9403
|
class: "is-empty",
|
|
9402
9404
|
colspan: t.columns.length
|
|
@@ -9461,7 +9463,7 @@ var $d = ["src"], ef = {
|
|
|
9461
9463
|
breakAll: !0,
|
|
9462
9464
|
key: "value",
|
|
9463
9465
|
label: G("参数值")
|
|
9464
|
-
}], p = { forced_fail: mt ? "Force Fail" : "强制失败" }, m = t, h =
|
|
9466
|
+
}], p = { forced_fail: mt ? "Force Fail" : "强制失败" }, m = t, h = I(Bh.Config), g = a(() => {
|
|
9465
9467
|
var e;
|
|
9466
9468
|
return (e = m.data) == null ? void 0 : e.basic_info;
|
|
9467
9469
|
}), _ = a(() => {
|
|
@@ -9524,55 +9526,55 @@ var $d = ["src"], ef = {
|
|
|
9524
9526
|
return (a, p) => {
|
|
9525
9527
|
var m;
|
|
9526
9528
|
return k(), c("div", bh, [
|
|
9527
|
-
l("h3", xh, [t.loading ? (k(), c(e, { key: 0 }, [l("span", null,
|
|
9528
|
-
l("div", Ch, [(k(), c(e, null,
|
|
9529
|
+
l("h3", xh, [t.loading ? (k(), c(e, { key: 0 }, [l("span", null, L(R(G)("节点")) + ":", 1), p[0] || (p[0] = l("span", { class: "skeleton-title ai-skeleton-element" }, null, -1))], 64)) : (k(), c("div", Sh, L(R(G)("节点")) + ":" + L((m = g.value) == null ? void 0 : m.node_name), 1)), P(a.$slots, "locateButton")]),
|
|
9530
|
+
l("div", Ch, [(k(), c(e, null, N(n, (e) => l("div", {
|
|
9529
9531
|
key: e.key,
|
|
9530
9532
|
class: S(["detail-tab", { "is-active": h.value === e.key }]),
|
|
9531
9533
|
onClick: (t) => h.value = e.key
|
|
9532
|
-
}, [(k(), o(
|
|
9533
|
-
l("div", Th, [h.value === Bh.Config ? (k(), c(e, { key: 0 }, [t.loading ? (k(), c(e, { key: 0 }, [l("div", Eh, [p[1] || (p[1] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
9534
|
+
}, [(k(), o(F(e.key === Bh.Config ? R(cn) : R(sn)), { class: "detail-tab-icon" })), d(" " + L(e.label), 1)], 10, wh)), 64))]),
|
|
9535
|
+
l("div", Th, [h.value === Bh.Config ? (k(), c(e, { key: 0 }, [t.loading ? (k(), c(e, { key: 0 }, [l("div", Eh, [p[1] || (p[1] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(6, (e) => l("div", {
|
|
9534
9536
|
key: e,
|
|
9535
9537
|
class: "skeleton-row ai-skeleton-element"
|
|
9536
|
-
})), 64))]), l("div", Dh, [p[2] || (p[2] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
9538
|
+
})), 64))]), l("div", Dh, [p[2] || (p[2] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(4, (e) => l("div", {
|
|
9537
9539
|
key: e,
|
|
9538
9540
|
class: "skeleton-row ai-skeleton-element"
|
|
9539
9541
|
})), 64))])], 64)) : (k(), c(e, { key: 1 }, [
|
|
9540
|
-
f(hh, { title:
|
|
9541
|
-
default:
|
|
9542
|
+
f(hh, { title: R(G)("基础信息") }, {
|
|
9543
|
+
default: U(() => {
|
|
9542
9544
|
var t, n, r;
|
|
9543
9545
|
return [l("div", Oh, [
|
|
9544
|
-
(k(!0), c(e, null,
|
|
9546
|
+
(k(!0), c(e, null, N(_.value, (e) => (k(), c("div", {
|
|
9545
9547
|
key: e.label,
|
|
9546
9548
|
class: "info-row"
|
|
9547
|
-
}, [l("div", kh,
|
|
9548
|
-
l("div", jh, [l("div", Mh,
|
|
9549
|
-
l("div", Ih, [l("div", Lh,
|
|
9549
|
+
}, [l("div", kh, L(e.label), 1), l("div", Ah, L(e.value), 1)]))), 128)),
|
|
9550
|
+
l("div", jh, [l("div", Mh, L(R(G)("失败处理")), 1), l("div", Nh, [v.value ? (k(), c(e, { key: 0 }, [(t = g.value) != null && t.skippable ? (k(), c("span", Ph, [p[3] || (p[3] = l("span", { class: "tag-badge" }, "MS", -1)), d(" " + L(R(G)("手动跳过")) + 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", Fh, [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))])]),
|
|
9551
|
+
l("div", Ih, [l("div", Lh, L(R(G)("超时控制")), 1), l("div", Rh, L(b.value), 1)])
|
|
9550
9552
|
])];
|
|
9551
9553
|
}),
|
|
9552
9554
|
_: 1
|
|
9553
9555
|
}, 8, ["title"]),
|
|
9554
|
-
f(hh, { title:
|
|
9555
|
-
default:
|
|
9556
|
+
f(hh, { title: R(G)("输入参数") }, {
|
|
9557
|
+
default: U(() => [f(yh, {
|
|
9556
9558
|
columns: r,
|
|
9557
9559
|
data: x.value
|
|
9558
9560
|
}, null, 8, ["data"])]),
|
|
9559
9561
|
_: 1
|
|
9560
9562
|
}, 8, ["title"]),
|
|
9561
|
-
f(hh, { title:
|
|
9562
|
-
default:
|
|
9563
|
+
f(hh, { title: R(G)("输出参数") }, {
|
|
9564
|
+
default: U(() => [f(yh, {
|
|
9563
9565
|
columns: i,
|
|
9564
9566
|
data: C.value
|
|
9565
9567
|
}, null, 8, ["data"])]),
|
|
9566
9568
|
_: 1
|
|
9567
9569
|
}, 8, ["title"])
|
|
9568
|
-
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div", zh, [p[5] || (p[5] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null,
|
|
9570
|
+
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div", zh, [p[5] || (p[5] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, N(5, (e) => l("div", {
|
|
9569
9571
|
key: e,
|
|
9570
9572
|
class: "skeleton-row ai-skeleton-element"
|
|
9571
9573
|
})), 64))])) : (k(), o(hh, {
|
|
9572
9574
|
key: 1,
|
|
9573
|
-
title:
|
|
9575
|
+
title: R(G)("结构化输出")
|
|
9574
9576
|
}, {
|
|
9575
|
-
default:
|
|
9577
|
+
default: U(() => [f(yh, {
|
|
9576
9578
|
columns: u,
|
|
9577
9579
|
data: w.value
|
|
9578
9580
|
}, null, 8, ["data"])]),
|
|
@@ -9585,7 +9587,7 @@ var $d = ["src"], ef = {
|
|
|
9585
9587
|
let { messageUid: t, taskList: n } = e, r = oi(), i = ti(), o = a(() => {
|
|
9586
9588
|
var e, t;
|
|
9587
9589
|
return (e = (t = r.selectedTab.value) == null ? void 0 : t.name) == null ? "" : e;
|
|
9588
|
-
}), s =
|
|
9590
|
+
}), s = I(!1), c = () => {
|
|
9589
9591
|
s.value = !0;
|
|
9590
9592
|
}, l = a(() => {
|
|
9591
9593
|
if (s.value) return o.value;
|
|
@@ -9636,7 +9638,7 @@ var $d = ["src"], ef = {
|
|
|
9636
9638
|
}
|
|
9637
9639
|
}));
|
|
9638
9640
|
};
|
|
9639
|
-
return
|
|
9641
|
+
return H(o, (e, t) => {
|
|
9640
9642
|
t !== void 0 && c();
|
|
9641
9643
|
}), E(() => {
|
|
9642
9644
|
i != null && i.value && p(n.value.find((e) => e.is_active && e.has_confidence));
|
|
@@ -9670,12 +9672,12 @@ var $d = ["src"], ef = {
|
|
|
9670
9672
|
}),
|
|
9671
9673
|
emits: ["update:collapsed"],
|
|
9672
9674
|
setup(t) {
|
|
9673
|
-
let n = t, r = ji(), i =
|
|
9674
|
-
messageUid:
|
|
9675
|
+
let n = t, r = ji(), i = B(t, "collapsed"), u = Oi(), p = a(() => u.value === Ft.Share), m = a(() => n.status === J.Pending || n.status === J.Streaming), { isTaskExpanded: h, taskList: g, toggleTaskExpanded: _, viewTasks: v, visibleStats: y } = ch(te(n, "content")), { isNodeSelected: x, isTaskSelected: C, openConfidence: T, openNodeDetail: E } = Gh({
|
|
9676
|
+
messageUid: te(n, "messageUid"),
|
|
9675
9677
|
taskList: g
|
|
9676
9678
|
}), { getNodeActions: D, isNodePending: O } = dh({
|
|
9677
9679
|
hideResumeActions: p,
|
|
9678
|
-
onInterruptResume:
|
|
9680
|
+
onInterruptResume: te(n, "onInterruptResume"),
|
|
9679
9681
|
openNodeDetail: E
|
|
9680
9682
|
}), A = (e) => {
|
|
9681
9683
|
e.disabled || e.run();
|
|
@@ -9683,23 +9685,23 @@ var $d = ["src"], ef = {
|
|
|
9683
9685
|
return (t, n) => (k(), o(th, {
|
|
9684
9686
|
collapsed: i.value,
|
|
9685
9687
|
"onUpdate:collapsed": n[0] || (n[0] = (e) => i.value = e),
|
|
9686
|
-
"activity-type":
|
|
9688
|
+
"activity-type": R(_t).FlowAgent,
|
|
9687
9689
|
class: "ai-flow-agent-activity"
|
|
9688
9690
|
}, {
|
|
9689
|
-
title:
|
|
9691
|
+
title: U(() => [f(R(xe), b({
|
|
9690
9692
|
class: "flow-agent-title-bar",
|
|
9691
9693
|
theme: "ai-chat-box-light light"
|
|
9692
|
-
}, X(X({},
|
|
9694
|
+
}, X(X({}, R(r)), {}, {
|
|
9693
9695
|
tag: "div",
|
|
9694
9696
|
arrow: !0,
|
|
9695
9697
|
followCursor: !1,
|
|
9696
9698
|
offset: [0, 10]
|
|
9697
9699
|
})), {
|
|
9698
|
-
content:
|
|
9700
|
+
content: U(() => [l("div", Jh, [(k(!0), c(e, null, N(R(y), (e) => (k(), c("div", {
|
|
9699
9701
|
key: e.key,
|
|
9700
9702
|
class: "flow-agent-stat-tooltip-item"
|
|
9701
9703
|
}, [
|
|
9702
|
-
l("span", Yh, [e.key === "running" ? (k(), o(
|
|
9704
|
+
l("span", Yh, [e.key === "running" ? (k(), o(R(me), {
|
|
9703
9705
|
key: 0,
|
|
9704
9706
|
mode: "spin",
|
|
9705
9707
|
size: "mini",
|
|
@@ -9709,19 +9711,19 @@ var $d = ["src"], ef = {
|
|
|
9709
9711
|
class: "flow-agent-stat-dot",
|
|
9710
9712
|
style: w({ borderColor: e.dotColor })
|
|
9711
9713
|
}, null, 4))]),
|
|
9712
|
-
l("span", Xh,
|
|
9714
|
+
l("span", Xh, L(e.label) + ":", 1),
|
|
9713
9715
|
l("span", {
|
|
9714
9716
|
class: "flow-agent-stat-tooltip-count",
|
|
9715
9717
|
style: w({ color: e.color })
|
|
9716
|
-
},
|
|
9718
|
+
}, L(e.display), 5)
|
|
9717
9719
|
]))), 128))])]),
|
|
9718
|
-
default:
|
|
9720
|
+
default: U(() => [l("span", { class: S(["ai-activity-message-title-icon", { "icon-collapsed": i.value }]) }, [m.value ? (k(), o(yr, {
|
|
9719
9721
|
key: 0,
|
|
9720
9722
|
size: 12
|
|
9721
|
-
})) : (k(), o(
|
|
9723
|
+
})) : (k(), o(R(Zt), { key: 1 }))], 2), l("span", Kh, [l("span", qh, L(R(G)("执行情况")) + ":", 1), (k(!0), c(e, null, N(R(y), (e) => (k(), c("span", {
|
|
9722
9724
|
key: e.key,
|
|
9723
9725
|
class: "flow-agent-stat-item"
|
|
9724
|
-
}, [e.key === "running" ? (k(), o(
|
|
9726
|
+
}, [e.key === "running" ? (k(), o(R(me), {
|
|
9725
9727
|
key: 0,
|
|
9726
9728
|
class: "flow-agent-stat-loading",
|
|
9727
9729
|
mode: "spin",
|
|
@@ -9734,42 +9736,42 @@ var $d = ["src"], ef = {
|
|
|
9734
9736
|
}, null, 4)), l("span", {
|
|
9735
9737
|
class: "flow-agent-stat-count",
|
|
9736
9738
|
style: w({ color: e.color })
|
|
9737
|
-
},
|
|
9739
|
+
}, L(e.display), 5)]))), 128))])]),
|
|
9738
9740
|
_: 1
|
|
9739
9741
|
}, 16)]),
|
|
9740
|
-
default:
|
|
9742
|
+
default: U(() => [(k(!0), c(e, null, N(R(v), (t) => {
|
|
9741
9743
|
var n;
|
|
9742
9744
|
return k(), c("div", {
|
|
9743
9745
|
key: t.taskId,
|
|
9744
9746
|
class: "flow-agent-task-group"
|
|
9745
9747
|
}, [l("div", { class: S(["flow-agent-task-header", {
|
|
9746
9748
|
"has-confidence": t.hasConfidence,
|
|
9747
|
-
"is-selected":
|
|
9749
|
+
"is-selected": R(C)(t.raw)
|
|
9748
9750
|
}]) }, [
|
|
9749
9751
|
l("span", {
|
|
9750
|
-
class: S(["flow-agent-task-arrow", { "is-expanded":
|
|
9751
|
-
onClick:
|
|
9752
|
-
}, [f(
|
|
9753
|
-
l("span", Qh, [t.convergedState === "running" ? (k(), o(
|
|
9752
|
+
class: S(["flow-agent-task-arrow", { "is-expanded": R(h)(t.raw) }]),
|
|
9753
|
+
onClick: ce((e) => R(_)(t.raw), ["stop"])
|
|
9754
|
+
}, [f(R(Zt))], 10, Zh),
|
|
9755
|
+
l("span", Qh, [t.convergedState === "running" ? (k(), o(R(me), {
|
|
9754
9756
|
key: 0,
|
|
9755
9757
|
mode: "spin",
|
|
9756
9758
|
size: "mini",
|
|
9757
9759
|
theme: "primary"
|
|
9758
|
-
})) : (k(), o(
|
|
9759
|
-
|
|
9760
|
-
l("span", eg, [l("span", tg,
|
|
9760
|
+
})) : (k(), o(F(t.stateIcon), { key: 1 }))]),
|
|
9761
|
+
W((k(), c("span", $h, [f(R(Qm), { text: t.taskName }, null, 8, ["text"])])), [[R(Pi), X({}, R(r))]]),
|
|
9762
|
+
l("span", eg, [l("span", tg, L(t.totalTimeText), 1), t.hasConfidence ? (k(), c("span", {
|
|
9761
9763
|
key: 0,
|
|
9762
9764
|
class: "flow-agent-task-action-btn flow-agent-task-confidence-btn",
|
|
9763
|
-
onClick:
|
|
9764
|
-
}, [f(
|
|
9765
|
-
], 2),
|
|
9765
|
+
onClick: ce((e) => R(T)(t.raw), ["stop"])
|
|
9766
|
+
}, [f(R(sn)), d(" " + L((n = t.confidenceTitle) == null ? R(G)("有效证据") : n), 1)], 8, ng)) : s("", !0)])
|
|
9767
|
+
], 2), W(l("div", rg, [(k(!0), c(e, null, N(t.nodes, (n) => (k(), c("div", {
|
|
9766
9768
|
key: n.id,
|
|
9767
9769
|
class: S(["flow-agent-node-item", {
|
|
9768
|
-
"is-selected":
|
|
9769
|
-
"is-pending":
|
|
9770
|
+
"is-selected": R(x)(t.raw, n.raw),
|
|
9771
|
+
"is-pending": R(O)(t, n)
|
|
9770
9772
|
}])
|
|
9771
9773
|
}, [
|
|
9772
|
-
l("span", ig, [n.convergedState === "running" ? (k(), o(
|
|
9774
|
+
l("span", ig, [n.convergedState === "running" ? (k(), o(R(me), {
|
|
9773
9775
|
key: 0,
|
|
9774
9776
|
mode: "spin",
|
|
9775
9777
|
size: "mini",
|
|
@@ -9779,26 +9781,26 @@ var $d = ["src"], ef = {
|
|
|
9779
9781
|
class: "flow-agent-status-dot",
|
|
9780
9782
|
style: w({ borderColor: n.dotColor })
|
|
9781
9783
|
}, null, 4))]),
|
|
9782
|
-
|
|
9784
|
+
W((k(), c("span", {
|
|
9783
9785
|
class: "flow-agent-node-name",
|
|
9784
9786
|
title: n.name
|
|
9785
|
-
}, [f(
|
|
9786
|
-
l("span", og, [l("span", sg,
|
|
9787
|
+
}, [f(R(Qm), { text: n.name }, null, 8, ["text"])], 8, ag)), [[R(Pi), X({}, R(r))]]),
|
|
9788
|
+
l("span", og, [l("span", sg, L(n.elapsedTimeText), 1), l("span", cg, [(k(!0), c(e, null, N(R(D)(t, n), (e) => W((k(), c("span", {
|
|
9787
9789
|
key: e.id,
|
|
9788
9790
|
class: S(["flow-agent-node-action-btn", { "is-disabled": e.disabled }]),
|
|
9789
|
-
onClick:
|
|
9790
|
-
}, [e.loading ? (k(), o(
|
|
9791
|
+
onClick: ce((t) => A(e), ["stop"])
|
|
9792
|
+
}, [e.loading ? (k(), o(R(me), {
|
|
9791
9793
|
key: 0,
|
|
9792
9794
|
class: "flow-agent-node-action-loading",
|
|
9793
9795
|
mode: "spin",
|
|
9794
9796
|
size: "mini",
|
|
9795
9797
|
theme: "primary"
|
|
9796
|
-
})) : (k(), o(
|
|
9798
|
+
})) : (k(), o(F(e.icon), { key: 1 })), d(" " + L(e.label), 1)], 10, lg)), [[R(Se), e.tooltip ? X(X({}, R(r)), {}, {
|
|
9797
9799
|
content: e.tooltip,
|
|
9798
9800
|
theme: "ai-chat-box",
|
|
9799
9801
|
offset: [0, 8]
|
|
9800
9802
|
}) : { content: "" }]])), 128))])])
|
|
9801
|
-
], 2))), 128))], 512), [[
|
|
9803
|
+
], 2))), 128))], 512), [[ie, R(h)(t.raw)]])]);
|
|
9802
9804
|
}), 128))]),
|
|
9803
9805
|
_: 1
|
|
9804
9806
|
}, 8, ["collapsed", "activity-type"]));
|
|
@@ -9815,16 +9817,16 @@ var $d = ["src"], ef = {
|
|
|
9815
9817
|
}),
|
|
9816
9818
|
emits: ["update:collapsed"],
|
|
9817
9819
|
setup(e) {
|
|
9818
|
-
let t = e, n =
|
|
9820
|
+
let t = e, n = B(e, "collapsed"), r = a(() => t.status === J.Pending || t.status === J.Streaming), i = a(() => r.value ? G("检索中") : G("检索完成"));
|
|
9819
9821
|
return (t, a) => (k(), o(th, {
|
|
9820
9822
|
collapsed: n.value,
|
|
9821
9823
|
"onUpdate:collapsed": a[0] || (a[0] = (e) => n.value = e)
|
|
9822
9824
|
}, {
|
|
9823
|
-
title:
|
|
9825
|
+
title: U(() => [l("span", dg, [r.value ? (k(), o(yr, { key: 0 })) : (k(), o(R(qt), {
|
|
9824
9826
|
key: 1,
|
|
9825
9827
|
style: { "font-size": "12px" }
|
|
9826
|
-
}))]), l("span", fg,
|
|
9827
|
-
default:
|
|
9828
|
+
}))]), l("span", fg, L(i.value), 1)]),
|
|
9829
|
+
default: U(() => {
|
|
9828
9830
|
var t, n;
|
|
9829
9831
|
return [l("div", pg, [f(Jl, { content: ((t = e.content) == null ? void 0 : t.content) || "" }, null, 8, ["content"])]), f(Xl, { content: ((n = e.content) == null ? void 0 : n.referenceDocument) || [] }, null, 8, ["content"])];
|
|
9830
9832
|
}),
|
|
@@ -9842,7 +9844,7 @@ var $d = ["src"], ef = {
|
|
|
9842
9844
|
}),
|
|
9843
9845
|
emits: ["update:collapsed"],
|
|
9844
9846
|
setup(e) {
|
|
9845
|
-
let t = e, n =
|
|
9847
|
+
let t = e, n = B(e, "collapsed"), r = a(() => {
|
|
9846
9848
|
var e, n;
|
|
9847
9849
|
let r = (e = (n = t.content) == null ? void 0 : n.length) == null ? 0 : e;
|
|
9848
9850
|
return mt ? `Reference ${r} documents as reference` : `引用 ${r} 篇资料作为参考`;
|
|
@@ -9851,8 +9853,8 @@ var $d = ["src"], ef = {
|
|
|
9851
9853
|
collapsed: n.value,
|
|
9852
9854
|
"onUpdate:collapsed": i[0] || (i[0] = (e) => n.value = e)
|
|
9853
9855
|
}, {
|
|
9854
|
-
title:
|
|
9855
|
-
default:
|
|
9856
|
+
title: U(() => [l("span", hg, [f(R(qt), { style: { "font-size": "12px" } })]), l("span", gg, L(r.value), 1)]),
|
|
9857
|
+
default: U(() => [f(Xl, { content: e.content || [] }, null, 8, ["content"])]),
|
|
9856
9858
|
_: 1
|
|
9857
9859
|
}, 8, ["collapsed"]));
|
|
9858
9860
|
}
|
|
@@ -9879,11 +9881,11 @@ var $d = ["src"], ef = {
|
|
|
9879
9881
|
[_t.FlowAgent]: ug,
|
|
9880
9882
|
[_t.KnowledgeRag]: mg,
|
|
9881
9883
|
[_t.ReferenceDocument]: _g
|
|
9882
|
-
}, n = e, r =
|
|
9884
|
+
}, n = e, r = B(e, "collapsed"), i = a(() => {
|
|
9883
9885
|
var e;
|
|
9884
9886
|
return t[(e = n.activityType) == null ? "" : e];
|
|
9885
9887
|
});
|
|
9886
|
-
return (t, n) => i.value ? (k(), o(
|
|
9888
|
+
return (t, n) => i.value ? (k(), o(F(i.value), {
|
|
9887
9889
|
key: 0,
|
|
9888
9890
|
collapsed: r.value,
|
|
9889
9891
|
"onUpdate:collapsed": n[0] || (n[0] = (e) => r.value = e),
|
|
@@ -9913,13 +9915,13 @@ var $d = ["src"], ef = {
|
|
|
9913
9915
|
return n.desc;
|
|
9914
9916
|
}
|
|
9915
9917
|
});
|
|
9916
|
-
return (n, a) => (k(), c("div", yg, [l("div", bg,
|
|
9918
|
+
return (n, a) => (k(), c("div", yg, [l("div", bg, L(t.title), 1), l("div", xg, [i.value !== null && typeof i.value == "object" ? (k(!0), c(e, { key: 0 }, N(i.value, (e, t) => (k(), c("div", {
|
|
9917
9919
|
key: t,
|
|
9918
9920
|
class: "desc-panel-item"
|
|
9919
|
-
}, [l("span", Sg, [f(
|
|
9921
|
+
}, [l("span", Sg, [f(R(Qm), { text: String(t) }, null, 8, ["text"]), a[0] || (a[0] = d(":", -1))]), l("span", Cg, [f(R(Qm), {
|
|
9920
9922
|
style: { "word-break": "break-all" },
|
|
9921
9923
|
text: r(e)
|
|
9922
|
-
}, null, 8, ["text"])])]))), 128)) : (k(), o(
|
|
9924
|
+
}, null, 8, ["text"])])]))), 128)) : (k(), o(R(Qm), {
|
|
9923
9925
|
key: 1,
|
|
9924
9926
|
style: { wordBreak: "break-all" },
|
|
9925
9927
|
text: r(i.value)
|
|
@@ -9943,11 +9945,11 @@ var $d = ["src"], ef = {
|
|
|
9943
9945
|
setup(e) {
|
|
9944
9946
|
return (t, n) => (k(), c("div", Tg, [f(wg, {
|
|
9945
9947
|
desc: e.content || (typeof e.error == "string" ? e.error : void 0),
|
|
9946
|
-
title:
|
|
9948
|
+
title: R(G)("返回内容")
|
|
9947
9949
|
}, null, 8, ["desc", "title"])]));
|
|
9948
9950
|
}
|
|
9949
9951
|
}), Dg = { class: "ai-toolcall-render" }, Og = { class: "toolcall-header-title" }, kg = { class: "toolcall-status-title" }, Ag = {
|
|
9950
|
-
key:
|
|
9952
|
+
key: 3,
|
|
9951
9953
|
class: "toolcall-duration"
|
|
9952
9954
|
}, jg = { class: "ai-toolcall-render-content" }, Mg = /* @__PURE__ */ m({
|
|
9953
9955
|
__name: "toolcall-render",
|
|
@@ -9957,7 +9959,7 @@ var $d = ["src"], ef = {
|
|
|
9957
9959
|
toolCall: {}
|
|
9958
9960
|
},
|
|
9959
9961
|
setup(e) {
|
|
9960
|
-
let t = e, n =
|
|
9962
|
+
let t = e, n = I(!0), r = I(null), i = ji(), { keywordMatched: u, keyword: p } = Mi(() => {
|
|
9961
9963
|
var e, n, r, i, a;
|
|
9962
9964
|
return [
|
|
9963
9965
|
(e = t.toolCall) == null ? void 0 : e.function.name,
|
|
@@ -9998,33 +10000,37 @@ var $d = ["src"], ef = {
|
|
|
9998
10000
|
class: S(["ai-toolcall-render-header", `toolcall-status-${e.status}`]),
|
|
9999
10001
|
onClick: h
|
|
10000
10002
|
}, [
|
|
10001
|
-
f(
|
|
10002
|
-
d(" " +
|
|
10003
|
-
|
|
10003
|
+
f(R(Zt), { class: S({ "is-collapsed": m.value }) }, null, 8, ["class"]),
|
|
10004
|
+
d(" " + L((r = e.toolCall) != null && r.function.mcpName ? R(G)("调用 MCP:") : R(G)("调用工具:")) + " ", 1),
|
|
10005
|
+
W((k(), c("span", Og, [f(R(Qm), { text: g.value }, null, 8, ["text"])])), [[R(Pi), X(X({}, R(i)), {}, {
|
|
10004
10006
|
text: g.value,
|
|
10005
10007
|
appendTo: "parent"
|
|
10006
10008
|
})]]),
|
|
10007
10009
|
l("span", kg, [
|
|
10008
|
-
e.status ===
|
|
10010
|
+
e.status === R(J).Pending || e.status === R(J).Streaming ? (k(), o(R(me), {
|
|
10009
10011
|
key: 0,
|
|
10010
10012
|
mode: "spin",
|
|
10011
10013
|
size: "mini",
|
|
10012
10014
|
theme: "primary"
|
|
10013
|
-
})) :
|
|
10014
|
-
|
|
10015
|
-
|
|
10015
|
+
})) : [
|
|
10016
|
+
R(J).Success,
|
|
10017
|
+
R(J).Complete,
|
|
10018
|
+
R(J).Completed
|
|
10019
|
+
].includes(e.status) ? (k(), o(R(en), { key: 1 })) : e.status === R(J).Error ? (k(), o(R(tn), { key: 2 })) : s("", !0),
|
|
10020
|
+
f(R(Qm), { text: _.value }, null, 8, ["text"]),
|
|
10021
|
+
v.value ? (k(), c("span", Ag, " (" + L(v.value) + ") ", 1)) : s("", !0)
|
|
10016
10022
|
])
|
|
10017
|
-
], 2),
|
|
10023
|
+
], 2), W(l("div", jg, [
|
|
10018
10024
|
f(wg, {
|
|
10019
10025
|
desc: (a = e.toolCall) == null ? void 0 : a.function.description,
|
|
10020
|
-
title:
|
|
10026
|
+
title: R(G)("描述")
|
|
10021
10027
|
}, null, 8, ["desc", "title"]),
|
|
10022
10028
|
f(wg, {
|
|
10023
10029
|
desc: (u = e.toolCall) == null ? void 0 : u.function.arguments,
|
|
10024
|
-
title:
|
|
10030
|
+
title: R(G)("参数")
|
|
10025
10031
|
}, null, 8, ["desc", "title"]),
|
|
10026
10032
|
(p = e.toolCall) != null && p.toolMessage ? (k(), o(Eg, C(b({ key: 0 }, e.toolCall.toolMessage)), null, 16)) : s("", !0)
|
|
10027
|
-
], 512), [[
|
|
10033
|
+
], 512), [[ie, !m.value]])]);
|
|
10028
10034
|
};
|
|
10029
10035
|
}
|
|
10030
10036
|
}), Ng = { class: "ai-message-artifacts" }, Pg = /* @__PURE__ */ m({
|
|
@@ -10035,7 +10041,7 @@ var $d = ["src"], ef = {
|
|
|
10035
10041
|
onPreview: { type: Function }
|
|
10036
10042
|
},
|
|
10037
10043
|
setup(t) {
|
|
10038
|
-
return (n, r) => (k(), c("div", Ng, [(k(!0), c(e, null,
|
|
10044
|
+
return (n, r) => (k(), c("div", Ng, [(k(!0), c(e, null, N(t.artifacts, (e) => (k(), o(vp, {
|
|
10039
10045
|
key: e.outputId,
|
|
10040
10046
|
file: e,
|
|
10041
10047
|
"on-download": t.onDownload,
|
|
@@ -10068,20 +10074,20 @@ var $d = ["src"], ef = {
|
|
|
10068
10074
|
return (e = n.property) == null ? void 0 : e.artifacts;
|
|
10069
10075
|
});
|
|
10070
10076
|
return (n, i) => (k(), c("div", Fg, [
|
|
10071
|
-
t.content ? (k(), c("div", Ig, [
|
|
10077
|
+
t.content ? (k(), c("div", Ig, [P(n.$slots, "default", C(h({ content: t.content })), () => [f(Zl, {
|
|
10072
10078
|
content: t.content || "",
|
|
10073
10079
|
status: t.status,
|
|
10074
|
-
type:
|
|
10080
|
+
type: R(_t).Text
|
|
10075
10081
|
}, null, 8, [
|
|
10076
10082
|
"content",
|
|
10077
10083
|
"status",
|
|
10078
10084
|
"type"
|
|
10079
10085
|
])])])) : s("", !0),
|
|
10080
|
-
t.toolCalls && t.toolCalls.length > 0 ? (k(!0), c(e, { key: 1 },
|
|
10081
|
-
var n
|
|
10086
|
+
t.toolCalls && t.toolCalls.length > 0 ? (k(!0), c(e, { key: 1 }, N(t.toolCalls, (e) => {
|
|
10087
|
+
var n;
|
|
10082
10088
|
return k(), o(Mg, {
|
|
10083
10089
|
key: e.id,
|
|
10084
|
-
status:
|
|
10090
|
+
status: e.toolMessage ? e.toolMessage.error ? R(J).Error : (n = e.toolMessage.status) == null ? t.status : n : R(J).Pending,
|
|
10085
10091
|
"tool-call": e
|
|
10086
10092
|
}, null, 8, ["status", "tool-call"]);
|
|
10087
10093
|
}), 128)) : s("", !0),
|
|
@@ -10104,10 +10110,10 @@ var $d = ["src"], ef = {
|
|
|
10104
10110
|
property: {}
|
|
10105
10111
|
},
|
|
10106
10112
|
setup(t) {
|
|
10107
|
-
return (n, r) => (k(), c("div", Rg, [l("div", zg, [(k(!0), c(e, null,
|
|
10113
|
+
return (n, r) => (k(), c("div", Rg, [l("div", zg, [(k(!0), c(e, null, N(Array.isArray(t.content) ? t.content : [t.content], (e, t) => (k(), c("div", {
|
|
10108
10114
|
key: t,
|
|
10109
10115
|
class: "ai-info-message-content"
|
|
10110
|
-
},
|
|
10116
|
+
}, L(e), 1))), 128))])]));
|
|
10111
10117
|
}
|
|
10112
10118
|
}), Vg = { class: "ai-tool-approval-card" }, Hg = { class: "ai-tool-approval-card__header" }, Ug = { class: "ai-tool-approval-card__title-wrap" }, Wg = { class: "ai-tool-approval-card__title" }, Gg = { class: "ai-tool-approval-card__fields" }, Kg = { class: "ai-tool-approval-card__field" }, qg = { class: "ai-tool-approval-card__field" }, Jg = {
|
|
10113
10119
|
key: 0,
|
|
@@ -10123,7 +10129,7 @@ var $d = ["src"], ef = {
|
|
|
10123
10129
|
readonly: { type: Boolean }
|
|
10124
10130
|
},
|
|
10125
10131
|
setup(e) {
|
|
10126
|
-
let t = e, n = ji(), r = Oi(), i = a(() => r.value === Ft.Share), { copy: u } =
|
|
10132
|
+
let t = e, n = ji(), r = Oi(), i = a(() => r.value === Ft.Share), { copy: u } = Yr(), p = new Set([K.PENDING, K.DRAFT]), m = new Set([
|
|
10127
10133
|
K.ABANDONED,
|
|
10128
10134
|
K.CANCELLED,
|
|
10129
10135
|
K.EXPIRED,
|
|
@@ -10153,89 +10159,89 @@ var $d = ["src"], ef = {
|
|
|
10153
10159
|
h.value.url && window.open(h.value.url, "_blank", "noopener");
|
|
10154
10160
|
}, D = () => {
|
|
10155
10161
|
C.value && u(C.value);
|
|
10156
|
-
}, A =
|
|
10157
|
-
|
|
10158
|
-
|
|
10162
|
+
}, A = I(!1), j = I(!1), M, ee = () => {
|
|
10163
|
+
j.value = !0, clearTimeout(M), M = setTimeout(() => {
|
|
10164
|
+
j.value = !1;
|
|
10159
10165
|
}, Qg);
|
|
10160
|
-
},
|
|
10166
|
+
}, N = () => {
|
|
10161
10167
|
var e;
|
|
10162
|
-
A.value || (A.value = !0,
|
|
10168
|
+
A.value || (A.value = !0, ee(), (e = t.onInterruptResume) == null || e.call(t, {
|
|
10163
10169
|
operation: bt.ApprovalCancel,
|
|
10164
10170
|
payload: { interrupt_id: t.interrupt.id }
|
|
10165
10171
|
}, t.interrupt));
|
|
10166
|
-
},
|
|
10172
|
+
}, P = () => {
|
|
10167
10173
|
var e;
|
|
10168
|
-
|
|
10174
|
+
j.value || i.value || (ee(), (e = t.onInterruptResume) == null || e.call(t, {
|
|
10169
10175
|
operation: bt.ApprovalRefresh,
|
|
10170
10176
|
payload: { interrupt_id: t.interrupt.id }
|
|
10171
10177
|
}, t.interrupt));
|
|
10172
10178
|
};
|
|
10173
|
-
return O(() => clearTimeout(
|
|
10179
|
+
return O(() => clearTimeout(M)), (t, r) => (k(), c("section", Vg, [
|
|
10174
10180
|
l("header", Hg, [l("div", Ug, [
|
|
10175
10181
|
r[0] || (r[0] = l("span", { class: "ai-tool-approval-card__title-bar" }, null, -1)),
|
|
10176
|
-
l("span", Wg,
|
|
10177
|
-
|
|
10182
|
+
l("span", Wg, L(h.value.title || R(G)("算法方案评审单")), 1),
|
|
10183
|
+
W(f(R(er), {
|
|
10178
10184
|
class: S(["ai-tool-approval-card__copy-icon", { "is-disabled": !C.value }]),
|
|
10179
10185
|
onClick: D
|
|
10180
|
-
}, null, 8, ["class"]), [[
|
|
10181
|
-
content:
|
|
10186
|
+
}, null, 8, ["class"]), [[R(Se), X(X({}, R(n)), {}, {
|
|
10187
|
+
content: R(G)("复制单据链接"),
|
|
10182
10188
|
theme: "ai-chat-box",
|
|
10183
10189
|
offset: [0, 8]
|
|
10184
10190
|
})]]),
|
|
10185
|
-
v.value && !e.readonly ?
|
|
10191
|
+
v.value && !e.readonly ? W((k(), o(R(nr), {
|
|
10186
10192
|
key: 0,
|
|
10187
|
-
class: S(["ai-tool-approval-card__refresh-icon", { "is-disabled":
|
|
10188
|
-
onClick:
|
|
10189
|
-
}, null, 8, ["class"])), [[
|
|
10190
|
-
content:
|
|
10193
|
+
class: S(["ai-tool-approval-card__refresh-icon", { "is-disabled": j.value || i.value }]),
|
|
10194
|
+
onClick: P
|
|
10195
|
+
}, null, 8, ["class"])), [[R(Se), X(X({}, R(n)), {}, {
|
|
10196
|
+
content: R(G)("刷新单据状态"),
|
|
10191
10197
|
theme: "ai-chat-box",
|
|
10192
10198
|
offset: [0, 8]
|
|
10193
10199
|
})]]) : s("", !0)
|
|
10194
|
-
]), l("span", { class: S(["ai-tool-approval-card__status", `ai-tool-approval-card__status--${y.value}`]) }, [h.value.status ===
|
|
10200
|
+
]), l("span", { class: S(["ai-tool-approval-card__status", `ai-tool-approval-card__status--${y.value}`]) }, [h.value.status === R(K).APPROVED ? (k(), o(R(Nn), {
|
|
10195
10201
|
key: 0,
|
|
10196
10202
|
class: "ai-tool-approval-card__status-icon"
|
|
10197
|
-
})) :
|
|
10203
|
+
})) : R(m).has(h.value.status) ? (k(), o(R(Fn), {
|
|
10198
10204
|
key: 1,
|
|
10199
10205
|
class: "ai-tool-approval-card__status-icon"
|
|
10200
|
-
})) : h.value.status ===
|
|
10206
|
+
})) : h.value.status === R(K).REVOKED ? (k(), o(R(In), {
|
|
10201
10207
|
key: 2,
|
|
10202
|
-
class: S(["ai-tool-approval-card__status-icon", { "ai-tool-approval-card__status-icon--revoked": h.value.status ===
|
|
10203
|
-
}, null, 8, ["class"])) : (k(), o(
|
|
10208
|
+
class: S(["ai-tool-approval-card__status-icon", { "ai-tool-approval-card__status-icon--revoked": h.value.status === R(K).REVOKED }])
|
|
10209
|
+
}, null, 8, ["class"])) : (k(), o(R(me), {
|
|
10204
10210
|
key: 3,
|
|
10205
10211
|
class: "ai-tool-approval-card__status-icon",
|
|
10206
10212
|
mode: "spin",
|
|
10207
10213
|
size: "mini",
|
|
10208
10214
|
theme: "primary"
|
|
10209
|
-
})), d(" " +
|
|
10210
|
-
l("dl", Gg, [l("div", Kg, [l("dt", null,
|
|
10211
|
-
v.value ? (k(), c("div", Jg, [f(
|
|
10212
|
-
l("div", Xg, [f(
|
|
10215
|
+
})), d(" " + L(b.value), 1)], 2)]),
|
|
10216
|
+
l("dl", Gg, [l("div", Kg, [l("dt", null, L(R(G)("单据编号")), 1), l("dd", null, L(h.value.sn || "--"), 1)]), l("div", qg, [l("dt", null, L(R(G)("提交时间")), 1), l("dd", null, L(h.value.submit_time || "--"), 1)])]),
|
|
10217
|
+
v.value ? (k(), c("div", Jg, [f(R(Pn), { class: "ai-tool-approval-card__processor-icon" }), W((k(), c("span", Yg, [d(L(R(G)("当前处理人")) + ":" + L(x.value), 1)])), [[R(Pi), X({}, R(n))]])])) : s("", !0),
|
|
10218
|
+
l("div", Xg, [f(R(le), {
|
|
10213
10219
|
class: "ai-tool-approval-card__detail",
|
|
10214
10220
|
disabled: !h.value.url,
|
|
10215
10221
|
theme: "primary",
|
|
10216
10222
|
onClick: E
|
|
10217
10223
|
}, {
|
|
10218
|
-
default:
|
|
10224
|
+
default: U(() => [d(L(R(G)("查看单据详情")) + " ", 1), f(R(Cn), { class: "ai-tool-approval-card__detail-icon" })]),
|
|
10219
10225
|
_: 1
|
|
10220
|
-
}, 8, ["disabled"]), v.value && !e.readonly ? (k(), o(
|
|
10226
|
+
}, 8, ["disabled"]), v.value && !e.readonly ? (k(), o(R(le), {
|
|
10221
10227
|
key: 0,
|
|
10222
10228
|
class: "ai-tool-approval-card__cancel",
|
|
10223
10229
|
disabled: A.value || i.value,
|
|
10224
10230
|
loading: A.value,
|
|
10225
10231
|
outline: "",
|
|
10226
10232
|
theme: "primary",
|
|
10227
|
-
onClick:
|
|
10233
|
+
onClick: N
|
|
10228
10234
|
}, {
|
|
10229
|
-
default:
|
|
10235
|
+
default: U(() => [d(L(R(G)("取消审批")), 1)]),
|
|
10230
10236
|
_: 1
|
|
10231
|
-
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) :
|
|
10237
|
+
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) : W((k(), c("span", Zg, [f(R(le), {
|
|
10232
10238
|
class: "ai-tool-approval-card__cancel",
|
|
10233
10239
|
disabled: "",
|
|
10234
10240
|
outline: ""
|
|
10235
10241
|
}, {
|
|
10236
|
-
default:
|
|
10242
|
+
default: U(() => [d(L(w.value), 1)]),
|
|
10237
10243
|
_: 1
|
|
10238
|
-
})])), [[
|
|
10244
|
+
})])), [[R(Se), X(X({}, R(n)), {}, {
|
|
10239
10245
|
content: T.value,
|
|
10240
10246
|
theme: "ai-chat-box",
|
|
10241
10247
|
offset: [0, 8]
|
|
@@ -10299,15 +10305,15 @@ var $d = ["src"], ef = {
|
|
|
10299
10305
|
if (r) return (n = i[r.reason]) == null ? void 0 : n.call(i, r);
|
|
10300
10306
|
});
|
|
10301
10307
|
return (n, r) => (k(), c("div", e_, [
|
|
10302
|
-
p.value ? (k(), c("div", t_,
|
|
10303
|
-
(k(!0), c(e, null,
|
|
10308
|
+
p.value ? (k(), c("div", t_, L(p.value), 1)) : s("", !0),
|
|
10309
|
+
(k(!0), c(e, null, N(f.value, (n) => (k(), c(e, { key: n.toolCallId }, [m(n) ? (k(), o(F(m(n)), {
|
|
10304
10310
|
key: 0,
|
|
10305
10311
|
interrupt: n,
|
|
10306
10312
|
"on-interrupt-resume": t.onInterruptResume
|
|
10307
|
-
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div", n_,
|
|
10308
|
-
_.value ? (k(), o(
|
|
10313
|
+
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div", n_, L(n.message || R(G)("暂不支持的中断消息")), 1))], 64))), 128)),
|
|
10314
|
+
_.value ? (k(), o(F(_.value.component), C(b({ key: 1 }, _.value.props)), u({ _: 2 }, [n.$slots.answeredQuestion ? {
|
|
10309
10315
|
name: "answer",
|
|
10310
|
-
fn:
|
|
10316
|
+
fn: U((e) => [P(n.$slots, "answeredQuestion", C(h(e)))]),
|
|
10311
10317
|
key: "0"
|
|
10312
10318
|
} : void 0]), 1040)) : s("", !0)
|
|
10313
10319
|
]));
|
|
@@ -10315,7 +10321,7 @@ var $d = ["src"], ef = {
|
|
|
10315
10321
|
}), i_ = { class: "ai-loading-message" }, a_ = /* @__PURE__ */ m({
|
|
10316
10322
|
__name: "loading-message",
|
|
10317
10323
|
setup(e) {
|
|
10318
|
-
return (e, t) => (k(), c("div", i_, [f(yr, { size: 18 }),
|
|
10324
|
+
return (e, t) => (k(), c("div", i_, [f(yr, { size: 18 }), P(e.$slots, "default", {}, () => [d(L(R(G)("请求中...")), 1)])]));
|
|
10319
10325
|
}
|
|
10320
10326
|
}), o_ = { class: "ai-reasoning-message" }, s_ = {
|
|
10321
10327
|
key: 0,
|
|
@@ -10338,7 +10344,7 @@ var $d = ["src"], ef = {
|
|
|
10338
10344
|
}),
|
|
10339
10345
|
emits: ["update:collapsed"],
|
|
10340
10346
|
setup(t) {
|
|
10341
|
-
let n = t, r =
|
|
10347
|
+
let n = t, r = B(t, "collapsed"), { stop: i } = H(() => n.duration, function() {
|
|
10342
10348
|
var e = Z(function* (e) {
|
|
10343
10349
|
e && (r.value = !0, yield x(), i == null || i());
|
|
10344
10350
|
});
|
|
@@ -10359,22 +10365,22 @@ var $d = ["src"], ef = {
|
|
|
10359
10365
|
return k(), c("div", o_, [l("div", {
|
|
10360
10366
|
class: S(["ai-reasoning-message-title", {
|
|
10361
10367
|
"ai-reasoning-message-title-collapsed": r.value,
|
|
10362
|
-
"is-thinking": t.status ===
|
|
10363
|
-
"is-complete": t.status ===
|
|
10364
|
-
"is-error": t.status ===
|
|
10368
|
+
"is-thinking": t.status === R(J).Pending || t.status === R(J).Streaming,
|
|
10369
|
+
"is-complete": t.status === R(J).Complete || t.status === R(J).Success,
|
|
10370
|
+
"is-error": t.status === R(J).Error
|
|
10365
10371
|
}]),
|
|
10366
10372
|
onClick: i[0] || (i[0] = (e) => r.value = !r.value)
|
|
10367
10373
|
}, [
|
|
10368
|
-
t.status ===
|
|
10369
|
-
l("span", c_,
|
|
10370
|
-
l("span", { class: S(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": r.value }]) }, [f(
|
|
10371
|
-
], 2),
|
|
10374
|
+
t.status === R(J).Pending || t.status === R(J).Streaming ? (k(), c("span", s_, [f(yr)])) : s("", !0),
|
|
10375
|
+
l("span", c_, L(u.value), 1),
|
|
10376
|
+
l("span", { class: S(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": r.value }]) }, [f(R(Wn))], 2)
|
|
10377
|
+
], 2), W(l("div", l_, [t.status === R(J).Error ? (k(), o(kl, {
|
|
10372
10378
|
key: 0,
|
|
10373
10379
|
content: ((a = t.content) == null ? void 0 : a.join("\n")) || ""
|
|
10374
|
-
}, null, 8, ["content"])) : (k(!0), c(e, { key: 1 },
|
|
10380
|
+
}, null, 8, ["content"])) : (k(!0), c(e, { key: 1 }, N(Array.isArray(t.content) ? t.content : [t.content], (e) => (k(), o(Jl, {
|
|
10375
10381
|
key: e,
|
|
10376
10382
|
content: e
|
|
10377
|
-
}, null, 8, ["content"]))), 128))], 512), [[
|
|
10383
|
+
}, null, 8, ["content"]))), 128))], 512), [[ie, !r.value]])]);
|
|
10378
10384
|
};
|
|
10379
10385
|
}
|
|
10380
10386
|
}), d_ = { class: "ai-key-value-content" }, f_ = {
|
|
@@ -10387,20 +10393,20 @@ var $d = ["src"], ef = {
|
|
|
10387
10393
|
title: {}
|
|
10388
10394
|
},
|
|
10389
10395
|
setup(t) {
|
|
10390
|
-
return (n, r) => (k(), c("div", d_, [t.title ? (k(), c("div", f_, [f(
|
|
10396
|
+
return (n, r) => (k(), c("div", d_, [t.title ? (k(), c("div", f_, [f(R(Un)), d(" " + L(t.title), 1)])) : s("", !0), l("div", p_, [(k(!0), c(e, null, N(t.content, (e) => (k(), c("div", {
|
|
10391
10397
|
key: e.key,
|
|
10392
10398
|
class: "key-value-item"
|
|
10393
10399
|
}, [
|
|
10394
|
-
l("div", m_,
|
|
10400
|
+
l("div", m_, L(e.key), 1),
|
|
10395
10401
|
r[0] || (r[0] = d(" : ", -1)),
|
|
10396
|
-
l("div", h_,
|
|
10402
|
+
l("div", h_, L(e.value), 1)
|
|
10397
10403
|
]))), 128))])]));
|
|
10398
10404
|
}
|
|
10399
10405
|
}), __ = { class: "ai-text-content" }, v_ = /* @__PURE__ */ m({
|
|
10400
10406
|
__name: "text-content",
|
|
10401
10407
|
props: { content: {} },
|
|
10402
10408
|
setup(e) {
|
|
10403
|
-
return (t, n) => (k(), c("div", __,
|
|
10409
|
+
return (t, n) => (k(), c("div", __, L(e.content), 1));
|
|
10404
10410
|
}
|
|
10405
10411
|
}), y_ = { class: "ai-user-message" }, b_ = {
|
|
10406
10412
|
key: 0,
|
|
@@ -10426,7 +10432,7 @@ var $d = ["src"], ef = {
|
|
|
10426
10432
|
onShortcutConfirm: { type: Function }
|
|
10427
10433
|
},
|
|
10428
10434
|
setup(t) {
|
|
10429
|
-
let n = t, r = di(), { copy: i } =
|
|
10435
|
+
let n = t, r = di(), { copy: i } = Yr(), u = I(!1), p = I(""), m = V("chatInputRef"), h = a(() => {
|
|
10430
10436
|
var e;
|
|
10431
10437
|
let t = (e = n.property) == null || (e = e.extra) == null ? void 0 : e.cite;
|
|
10432
10438
|
if (!(!t || typeof t == "string")) return t.title;
|
|
@@ -10531,20 +10537,20 @@ var $d = ["src"], ef = {
|
|
|
10531
10537
|
class: "user-edit-input",
|
|
10532
10538
|
"default-upload-files": y.value,
|
|
10533
10539
|
"on-send-message": A,
|
|
10534
|
-
"support-upload": (a = (v =
|
|
10540
|
+
"support-upload": (a = (v = R(r)) == null ? void 0 : v.supportUpload.value) == null ? !1 : a
|
|
10535
10541
|
}, {
|
|
10536
|
-
"send-icon":
|
|
10542
|
+
"send-icon": U(() => [l("div", S_, [f(R(le), {
|
|
10537
10543
|
size: "small",
|
|
10538
10544
|
onClick: E
|
|
10539
10545
|
}, {
|
|
10540
|
-
default:
|
|
10546
|
+
default: U(() => [d(L(R(G)("取消")), 1)]),
|
|
10541
10547
|
_: 1
|
|
10542
|
-
}), f(
|
|
10548
|
+
}), f(R(le), {
|
|
10543
10549
|
size: "small",
|
|
10544
10550
|
theme: "primary",
|
|
10545
10551
|
onClick: T
|
|
10546
10552
|
}, {
|
|
10547
|
-
default:
|
|
10553
|
+
default: U(() => [d(L(R(G)("发送")), 1)]),
|
|
10548
10554
|
_: 1
|
|
10549
10555
|
})])]),
|
|
10550
10556
|
_: 1
|
|
@@ -10556,7 +10562,7 @@ var $d = ["src"], ef = {
|
|
|
10556
10562
|
y.value.length ? (k(), c(e, { key: 0 }, [x.value.length ? (k(), c("div", b_, [f(mf, {
|
|
10557
10563
|
files: x.value,
|
|
10558
10564
|
readonly: !0
|
|
10559
|
-
}, null, 8, ["files"])])) : s("", !0), (k(!0), c(e, null,
|
|
10565
|
+
}, null, 8, ["files"])])) : s("", !0), (k(!0), c(e, null, N(S.value, (e, t) => {
|
|
10560
10566
|
var n;
|
|
10561
10567
|
return k(), c("div", {
|
|
10562
10568
|
key: (n = e.url) == null ? t : n,
|
|
@@ -10570,14 +10576,14 @@ var $d = ["src"], ef = {
|
|
|
10570
10576
|
key: 0,
|
|
10571
10577
|
content: g.value,
|
|
10572
10578
|
title: h.value
|
|
10573
|
-
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 },
|
|
10579
|
+
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 }, N(C.value, (e, t) => (k(), o(v_, {
|
|
10574
10580
|
key: t,
|
|
10575
10581
|
content: e
|
|
10576
10582
|
}, null, 8, ["content"]))), 128)) : s("", !0)])) : s("", !0),
|
|
10577
|
-
t.messageToolsStatus ===
|
|
10583
|
+
t.messageToolsStatus === R(Ad).Hidden ? s("", !0) : (k(), o(Zm, {
|
|
10578
10584
|
key: 2,
|
|
10579
10585
|
class: "ai-user-message-tools",
|
|
10580
|
-
"message-tools":
|
|
10586
|
+
"message-tools": R(At),
|
|
10581
10587
|
"message-tools-status": t.messageToolsStatus,
|
|
10582
10588
|
"on-action": w,
|
|
10583
10589
|
"tippy-options": t.tippyOptions,
|
|
@@ -10602,7 +10608,7 @@ var $d = ["src"], ef = {
|
|
|
10602
10608
|
onInterruptResume: { type: Function }
|
|
10603
10609
|
},
|
|
10604
10610
|
setup(e) {
|
|
10605
|
-
let t = e, n =
|
|
10611
|
+
let t = e, n = re(), r = a(() => {
|
|
10606
10612
|
switch (t.message.role) {
|
|
10607
10613
|
case q.User: return g(C_, X(X({}, t.message), {}, {
|
|
10608
10614
|
onAction: t.onAction,
|
|
@@ -10611,7 +10617,7 @@ var $d = ["src"], ef = {
|
|
|
10611
10617
|
messageToolsStatus: t.messageToolsStatus,
|
|
10612
10618
|
tippyOptions: t.tippyOptions
|
|
10613
10619
|
}));
|
|
10614
|
-
case q.Assistant: return g(Lg, t.message, { default: (e) =>
|
|
10620
|
+
case q.Assistant: return g(Lg, t.message, { default: (e) => P(n, "default", e, () => [g(Zl, {
|
|
10615
10621
|
content: t.message.content || "",
|
|
10616
10622
|
status: t.message.status
|
|
10617
10623
|
}, n.codeHeader ? { codeHeader: (e) => {
|
|
@@ -10630,7 +10636,7 @@ var $d = ["src"], ef = {
|
|
|
10630
10636
|
default: return null;
|
|
10631
10637
|
}
|
|
10632
10638
|
});
|
|
10633
|
-
return (e, t) => (k(), o(
|
|
10639
|
+
return (e, t) => (k(), o(F(r.value)));
|
|
10634
10640
|
}
|
|
10635
10641
|
}), T_ = [
|
|
10636
10642
|
"id",
|
|
@@ -10663,22 +10669,27 @@ var $d = ["src"], ef = {
|
|
|
10663
10669
|
}),
|
|
10664
10670
|
emits: /* @__PURE__ */ y(["stopStreaming"], ["update:selectedUserMessages"]),
|
|
10665
10671
|
setup(t) {
|
|
10666
|
-
let n = t, r =
|
|
10672
|
+
let n = t, r = B(t, "selectedUserMessages"), i = V("messageContainerRef"), d = V("messageContainerBottomRef"), { jumpToBottom: p, toScrollBottom: m, debouncedShowScrollBottomBtn: h } = ei(i, d);
|
|
10673
|
+
E(() => {
|
|
10674
|
+
var e;
|
|
10675
|
+
(e = n.messageGroups) != null && e.length && (p(), requestAnimationFrame(() => p()));
|
|
10676
|
+
});
|
|
10677
|
+
let { copy: g } = Yr(), _ = (e, t) => {
|
|
10667
10678
|
if (!(t != null && t.length)) return e;
|
|
10668
10679
|
let n = e.map((e) => {
|
|
10669
10680
|
let n = t.find((t) => t.id === e.id);
|
|
10670
10681
|
return n ? X(X({}, e), n) : e;
|
|
10671
10682
|
}), r = t.filter((t) => !e.some((e) => e.id === t.id));
|
|
10672
10683
|
return [...n, ...r].filter((e) => !e.hidden);
|
|
10673
|
-
},
|
|
10684
|
+
}, v = a(() => _(kt, n.messageTools).filter((e) => n.renderMode !== Ft.Test || e.id !== "share")), y = a(() => _(jt, n.updateTools)), x = a(() => n.renderMode === Ft.Share ? n.messageGroups.filter((e) => e.type !== q.Loading) : n.messageGroups), C = (e) => {
|
|
10674
10685
|
var t;
|
|
10675
10686
|
let n = (t = e.messages) == null ? void 0 : t.at(-1);
|
|
10676
10687
|
(n == null ? void 0 : n.role) !== q.Interrupt && (e.isHover = !0);
|
|
10677
|
-
},
|
|
10688
|
+
}, T = (e, t) => {
|
|
10678
10689
|
var n;
|
|
10679
10690
|
let r = (n = t.toElement) == null ? t.relatedTarget : n;
|
|
10680
10691
|
r instanceof Element && r.classList.contains("ai-user-feedback") || (e.isHover = !1);
|
|
10681
|
-
},
|
|
10692
|
+
}, D = (e, t) => {
|
|
10682
10693
|
var i, a;
|
|
10683
10694
|
let o = e.type === q.User;
|
|
10684
10695
|
(i = n.messageGroups) == null || i.forEach((r, i) => {
|
|
@@ -10688,15 +10699,15 @@ var $d = ["src"], ef = {
|
|
|
10688
10699
|
e && (e.checked = t);
|
|
10689
10700
|
}
|
|
10690
10701
|
}), r.value = (a = n.messageGroups) == null ? void 0 : a.filter((e) => e.checked).map((e) => e.messages).flat();
|
|
10691
|
-
},
|
|
10702
|
+
}, O = function() {
|
|
10692
10703
|
var e = Z(function* (e, t) {
|
|
10693
10704
|
var r;
|
|
10694
|
-
return e.id === "copy" &&
|
|
10705
|
+
return e.id === "copy" && g(t.filter((e) => e.role !== q.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n")), (r = n.onAgentAction) == null ? void 0 : r.call(n, e, t);
|
|
10695
10706
|
});
|
|
10696
10707
|
return function(t, n) {
|
|
10697
10708
|
return e.apply(this, arguments);
|
|
10698
10709
|
};
|
|
10699
|
-
}(),
|
|
10710
|
+
}(), A = function() {
|
|
10700
10711
|
var e = Z(function* (e, t) {
|
|
10701
10712
|
var r;
|
|
10702
10713
|
(r = n.onUserAction) == null || r.call(n, e, t);
|
|
@@ -10704,7 +10715,7 @@ var $d = ["src"], ef = {
|
|
|
10704
10715
|
return function(t, n) {
|
|
10705
10716
|
return e.apply(this, arguments);
|
|
10706
10717
|
};
|
|
10707
|
-
}(),
|
|
10718
|
+
}(), j = function() {
|
|
10708
10719
|
var e = Z(function* (e, t, r) {
|
|
10709
10720
|
var i;
|
|
10710
10721
|
(i = n.onUserInputConfirm) == null || i.call(n, e, t, r);
|
|
@@ -10712,7 +10723,7 @@ var $d = ["src"], ef = {
|
|
|
10712
10723
|
return function(t, n, r) {
|
|
10713
10724
|
return e.apply(this, arguments);
|
|
10714
10725
|
};
|
|
10715
|
-
}(),
|
|
10726
|
+
}(), M = function() {
|
|
10716
10727
|
var e = Z(function* (e, t) {
|
|
10717
10728
|
var r;
|
|
10718
10729
|
(r = n.onUserShortcutConfirm) == null || r.call(n, e, t);
|
|
@@ -10726,22 +10737,22 @@ var $d = ["src"], ef = {
|
|
|
10726
10737
|
ref: i,
|
|
10727
10738
|
class: "ai-message-container"
|
|
10728
10739
|
}, [
|
|
10729
|
-
(k(!0), c(e, null,
|
|
10740
|
+
(k(!0), c(e, null, N(x.value, (i, a) => (k(), c("div", {
|
|
10730
10741
|
id: i.uid,
|
|
10731
10742
|
key: a,
|
|
10732
10743
|
class: "message-group",
|
|
10733
10744
|
style: w({ backgroundColor: i.checked ? "#f5f7fa" : "transparent" }),
|
|
10734
|
-
onMouseenter: (e) =>
|
|
10735
|
-
onMouseleave: (e) =>
|
|
10736
|
-
}, [
|
|
10745
|
+
onMouseenter: (e) => C(i),
|
|
10746
|
+
onMouseleave: (e) => T(i, e)
|
|
10747
|
+
}, [P(r.$slots, "group", b({ ref_for: !0 }, { group: i }), () => [t.enableSelection && i.type !== R(q).Loading ? (k(), o(R(ue), {
|
|
10737
10748
|
key: 0,
|
|
10738
10749
|
class: "message-group-checkbox",
|
|
10739
10750
|
"model-value": i.checked,
|
|
10740
|
-
"onUpdate:modelValue": (e) =>
|
|
10751
|
+
"onUpdate:modelValue": (e) => D(i, e)
|
|
10741
10752
|
}, null, 8, ["model-value", "onUpdate:modelValue"])) : s("", !0), l("div", {
|
|
10742
|
-
class: S(["message-group-messages", { "message-group-enabled-selection": t.renderMode ===
|
|
10743
|
-
style: w({ width: t.enableSelection && i.type !==
|
|
10744
|
-
}, [(k(!0), c(e, null,
|
|
10753
|
+
class: S(["message-group-messages", { "message-group-enabled-selection": t.renderMode === R(Ft).Share || t.enableSelection && i.type !== R(q).Loading }]),
|
|
10754
|
+
style: w({ width: t.enableSelection && i.type !== R(q).Loading ? "calc(100% - 16px)" : "100%" })
|
|
10755
|
+
}, [(k(!0), c(e, null, N(i.messages, (e, i) => P(r.$slots, "default", b({
|
|
10745
10756
|
key: i,
|
|
10746
10757
|
ref_for: !0
|
|
10747
10758
|
}, {
|
|
@@ -10752,14 +10763,14 @@ var $d = ["src"], ef = {
|
|
|
10752
10763
|
key: i,
|
|
10753
10764
|
message: e,
|
|
10754
10765
|
"message-tools-status": t.messageToolsStatus,
|
|
10755
|
-
"on-action": (t) =>
|
|
10756
|
-
"on-input-confirm": (t, n) =>
|
|
10766
|
+
"on-action": (t) => A(t, e),
|
|
10767
|
+
"on-input-confirm": (t, n) => j(e, t, n),
|
|
10757
10768
|
"on-interrupt-resume": n.onInterruptResume,
|
|
10758
|
-
"on-shortcut-confirm": (t) =>
|
|
10769
|
+
"on-shortcut-confirm": (t) => M(e, t),
|
|
10759
10770
|
"tippy-options": t.messageToolsTippyOptions
|
|
10760
10771
|
}, u({ _: 2 }, [r.$slots.answeredQuestion ? {
|
|
10761
10772
|
name: "answeredQuestion",
|
|
10762
|
-
fn:
|
|
10773
|
+
fn: U((e) => [P(r.$slots, "answeredQuestion", b({ ref_for: !0 }, e))]),
|
|
10763
10774
|
key: "0"
|
|
10764
10775
|
} : void 0]), 1032, [
|
|
10765
10776
|
"message",
|
|
@@ -10769,14 +10780,14 @@ var $d = ["src"], ef = {
|
|
|
10769
10780
|
"on-interrupt-resume",
|
|
10770
10781
|
"on-shortcut-confirm",
|
|
10771
10782
|
"tippy-options"
|
|
10772
|
-
]))])), 128)), t.renderMode !==
|
|
10783
|
+
]))])), 128)), t.renderMode !== R(Ft).Share && !(t.enableSelection && i.type !== R(q).Loading) && !i.pause && i.type === R(q).Assistant && t.messageToolsStatus !== R(Ad).Hidden ? (k(), o(Zm, {
|
|
10773
10784
|
key: 0,
|
|
10774
|
-
"message-tools":
|
|
10785
|
+
"message-tools": v.value,
|
|
10775
10786
|
"message-tools-status": t.messageToolsStatus,
|
|
10776
|
-
"on-action": (e) =>
|
|
10787
|
+
"on-action": (e) => O(e, i.messages),
|
|
10777
10788
|
style: w({ visibility: i.isHover ? "visible" : "hidden" }),
|
|
10778
10789
|
"tippy-options": n.messageToolsTippyOptions,
|
|
10779
|
-
"update-tools":
|
|
10790
|
+
"update-tools": y.value,
|
|
10780
10791
|
onFeedback: (e, t, r) => {
|
|
10781
10792
|
var a;
|
|
10782
10793
|
return (a = n.onAgentFeedback) == null ? void 0 : a.call(n, e, i.messages, t, r);
|
|
@@ -10796,20 +10807,20 @@ var $d = ["src"], ef = {
|
|
|
10796
10807
|
class: "message-container-bottom",
|
|
10797
10808
|
tabindex: "0"
|
|
10798
10809
|
}, null, 512),
|
|
10799
|
-
l("div", E_, [
|
|
10800
|
-
loading: t.messageStatus ===
|
|
10801
|
-
title: t.messageStatus ===
|
|
10810
|
+
l("div", E_, [W(f(fr, {
|
|
10811
|
+
loading: t.messageStatus === R(J).StopLoading,
|
|
10812
|
+
title: t.messageStatus === R(J).StopLoading ? R(G)("正在停止") : R(G)("停止生成"),
|
|
10802
10813
|
onClick: a[0] || (a[0] = (e) => r.$emit("stopStreaming"))
|
|
10803
10814
|
}, {
|
|
10804
|
-
icon:
|
|
10815
|
+
icon: U(() => [f(R(On))]),
|
|
10805
10816
|
_: 1
|
|
10806
|
-
}, 8, ["loading", "title"]), [[
|
|
10807
|
-
title:
|
|
10808
|
-
onClick:
|
|
10817
|
+
}, 8, ["loading", "title"]), [[ie, t.renderMode !== R(Ft).Share && (t.messageStatus === R(J).Streaming || t.messageStatus === R(J).StopLoading || t.messageStatus === R(J).Fetching || t.messageStatus === R(J).Pending)]]), W(f(fr, {
|
|
10818
|
+
title: R(G)("返回底部"),
|
|
10819
|
+
onClick: a[1] || (a[1] = () => R(m)("smooth"))
|
|
10809
10820
|
}, {
|
|
10810
|
-
icon:
|
|
10821
|
+
icon: U(() => [f(R(qn))]),
|
|
10811
10822
|
_: 1
|
|
10812
|
-
}, 8, ["title"
|
|
10823
|
+
}, 8, ["title"]), [[ie, R(h)]])])
|
|
10813
10824
|
], 512));
|
|
10814
10825
|
}
|
|
10815
10826
|
}), O_ = { class: "ai-execution-summary" }, k_ = { class: "ai-execution-summary-header" }, A_ = { class: "ai-execution-summary-content" }, j_ = ["onMouseenter"], M_ = { class: "content-item-header" }, N_ = { class: "content-item-title" }, P_ = { class: "content-item-messages" }, F_ = {
|
|
@@ -10823,7 +10834,7 @@ var $d = ["src"], ef = {
|
|
|
10823
10834
|
props: { messageGroups: {} },
|
|
10824
10835
|
emits: ["locateMessageGroup", "updateKeyword"],
|
|
10825
10836
|
setup(t, { emit: n }) {
|
|
10826
|
-
let r = n, i = ji(), { keyword: a } = Ei(), u =
|
|
10837
|
+
let r = n, i = ji(), { keyword: a } = Ei(), u = I(void 0), p = (e) => {
|
|
10827
10838
|
if (!e) return "";
|
|
10828
10839
|
let t = new Date(e), n = (e) => String(e).padStart(2, "0");
|
|
10829
10840
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
@@ -10832,13 +10843,13 @@ var $d = ["src"], ef = {
|
|
|
10832
10843
|
}, h = () => {
|
|
10833
10844
|
a.value = "", r("updateKeyword", "");
|
|
10834
10845
|
};
|
|
10835
|
-
return (n, g) => (k(), c("div", O_, [l("div", k_, [f(
|
|
10836
|
-
modelValue:
|
|
10846
|
+
return (n, g) => (k(), c("div", O_, [l("div", k_, [f(R(pe), {
|
|
10847
|
+
modelValue: R(a),
|
|
10837
10848
|
"onUpdate:modelValue": [g[0] || (g[0] = (e) => v(a) ? a.value = e : null), g[1] || (g[1] = (e) => r("updateKeyword", e))],
|
|
10838
10849
|
class: "ai-execution-summary-header-input",
|
|
10839
10850
|
clearable: "",
|
|
10840
|
-
placeholder:
|
|
10841
|
-
}, null, 8, ["modelValue", "placeholder"])]), l("div", A_, [t.messageGroups.length ? (k(!0), c(e, { key: 0 },
|
|
10851
|
+
placeholder: R(G)("搜索 关键字")
|
|
10852
|
+
}, null, 8, ["modelValue", "placeholder"])]), l("div", A_, [t.messageGroups.length ? (k(!0), c(e, { key: 0 }, N(t.messageGroups, (n, r) => (k(), c("div", {
|
|
10842
10853
|
key: n.uid,
|
|
10843
10854
|
class: "ai-execution-summary-content-item",
|
|
10844
10855
|
onMouseenter: (e) => u.value = n.uid,
|
|
@@ -10846,32 +10857,32 @@ var $d = ["src"], ef = {
|
|
|
10846
10857
|
}, [
|
|
10847
10858
|
l("div", M_, [
|
|
10848
10859
|
g[3] || (g[3] = l("span", { class: "timeline-dot" }, null, -1)),
|
|
10849
|
-
|
|
10850
|
-
|
|
10860
|
+
W((k(), c("span", N_, [d(L(typeof n.userMessageTitle == "number" ? p(n.userMessageTitle) : n.userMessageTitle), 1)])), [[R(Pi), X({}, R(i))]]),
|
|
10861
|
+
W(f(R(le), {
|
|
10851
10862
|
class: "content-item-locate",
|
|
10852
10863
|
text: "",
|
|
10853
10864
|
theme: "primary",
|
|
10854
10865
|
onClick: (e) => m(n)
|
|
10855
10866
|
}, {
|
|
10856
|
-
default:
|
|
10867
|
+
default: U(() => [d(L(R(G)("在对话中定位")), 1)]),
|
|
10857
10868
|
_: 1
|
|
10858
|
-
}, 8, ["onClick"]), [[
|
|
10869
|
+
}, 8, ["onClick"]), [[ie, u.value === n.uid]])
|
|
10859
10870
|
]),
|
|
10860
|
-
l("div", P_, [(k(!0), c(e, null,
|
|
10871
|
+
l("div", P_, [(k(!0), c(e, null, N(n.messages, (e, t) => (k(), o(w_, {
|
|
10861
10872
|
key: t,
|
|
10862
10873
|
message: e
|
|
10863
10874
|
}, null, 8, ["message"]))), 128))]),
|
|
10864
10875
|
r < t.messageGroups.length - 1 ? (k(), c("div", F_)) : s("", !0)
|
|
10865
|
-
], 40, j_))), 128)) : (k(), c("div", I_, [f(
|
|
10876
|
+
], 40, j_))), 128)) : (k(), c("div", I_, [f(R(de), {
|
|
10866
10877
|
class: "empty-exception",
|
|
10867
10878
|
type: "empty"
|
|
10868
|
-
}), l("div", L_, [d(
|
|
10879
|
+
}), l("div", L_, [d(L(R(a) ? R(G)("搜索结果为空") : R(G)("暂无数据")) + " ", 1), R(a) ? (k(), o(R(le), {
|
|
10869
10880
|
key: 0,
|
|
10870
10881
|
text: "",
|
|
10871
10882
|
theme: "primary",
|
|
10872
10883
|
onClick: h
|
|
10873
10884
|
}, {
|
|
10874
|
-
default:
|
|
10885
|
+
default: U(() => [d(L(R(G)("清空搜索")), 1)]),
|
|
10875
10886
|
_: 1
|
|
10876
10887
|
})) : s("", !0)])]))])]));
|
|
10877
10888
|
}
|
|
@@ -10889,22 +10900,22 @@ var $d = ["src"], ef = {
|
|
|
10889
10900
|
],
|
|
10890
10901
|
setup(e, { emit: t }) {
|
|
10891
10902
|
let n = t;
|
|
10892
|
-
return (t, r) => (k(), c("div", z_, [l("div", B_, [f(
|
|
10903
|
+
return (t, r) => (k(), c("div", z_, [l("div", B_, [f(R(ue), {
|
|
10893
10904
|
"model-value": e.isAllSelected,
|
|
10894
10905
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => n("toggle-all", e))
|
|
10895
|
-
}, null, 8, ["model-value"]), l("span", V_,
|
|
10906
|
+
}, null, 8, ["model-value"]), l("span", V_, L(R(G)("全选")), 1)]), l("div", H_, [f(R(le), {
|
|
10896
10907
|
disabled: e.loading,
|
|
10897
10908
|
onClick: r[1] || (r[1] = (e) => n("cancel"))
|
|
10898
10909
|
}, {
|
|
10899
|
-
default:
|
|
10910
|
+
default: U(() => [d(L(R(G)("取消")), 1)]),
|
|
10900
10911
|
_: 1
|
|
10901
|
-
}, 8, ["disabled"]), f(
|
|
10912
|
+
}, 8, ["disabled"]), f(R(le), {
|
|
10902
10913
|
disabled: e.selectedCount === 0,
|
|
10903
10914
|
loading: e.loading,
|
|
10904
10915
|
theme: "primary",
|
|
10905
10916
|
onClick: r[2] || (r[2] = (e) => n("confirm"))
|
|
10906
10917
|
}, {
|
|
10907
|
-
default:
|
|
10918
|
+
default: U(() => [d(L(R(G)("确定")), 1)]),
|
|
10908
10919
|
_: 1
|
|
10909
10920
|
}, 8, ["disabled", "loading"])])]));
|
|
10910
10921
|
}
|
|
@@ -10996,7 +11007,7 @@ var $d = ["src"], ef = {
|
|
|
10996
11007
|
"update:selectedModel"
|
|
10997
11008
|
]),
|
|
10998
11009
|
setup(t, { expose: n, emit: r }) {
|
|
10999
|
-
let i = be.TabPanel, u = t, p =
|
|
11010
|
+
let i = be.TabPanel, u = t, p = B(t, "renderMode"), m = V("fullScreenRef"), { isFullScreen: _, enter: v, exit: y } = ci(m);
|
|
11000
11011
|
Di({ renderMode: p });
|
|
11001
11012
|
let T = a(() => X(X({
|
|
11002
11013
|
collapsible: !1,
|
|
@@ -11004,7 +11015,7 @@ var $d = ["src"], ef = {
|
|
|
11004
11015
|
min: 400
|
|
11005
11016
|
}, u.resizeProps), {}, { placement: u.placement })), E = a(() => {
|
|
11006
11017
|
var e, t, n, r, i;
|
|
11007
|
-
return (e = (t = u.getSideRenderComponent) == null ? void 0 : t.call(u, g, (n = (r =
|
|
11018
|
+
return (e = (t = u.getSideRenderComponent) == null ? void 0 : t.call(u, g, (n = (r = z.value.data) == null ? void 0 : r.props) == null ? {} : n)) == null ? (i = z.value.data) == null ? void 0 : i.component : e;
|
|
11008
11019
|
});
|
|
11009
11020
|
ui({
|
|
11010
11021
|
size: a(() => {
|
|
@@ -11015,30 +11026,30 @@ var $d = ["src"], ef = {
|
|
|
11015
11026
|
var e;
|
|
11016
11027
|
return (e = u.supportUpload) == null ? !1 : e;
|
|
11017
11028
|
})
|
|
11018
|
-
}),
|
|
11029
|
+
}), H(() => {
|
|
11019
11030
|
var e;
|
|
11020
11031
|
return (e = u.size) == null ? "small" : e;
|
|
11021
11032
|
}, (e) => {
|
|
11022
11033
|
typeof document < "u" && (document.body.dataset.aiSize = e);
|
|
11023
11034
|
}, { immediate: !0 });
|
|
11024
|
-
let D =
|
|
11035
|
+
let D = B(t, "selectedShortcut"), A = B(t, "cite"), j = B(t, "selectedModel"), M = r;
|
|
11025
11036
|
ki({ tippyOptions: a(() => {
|
|
11026
11037
|
var e;
|
|
11027
11038
|
return (e = u.commonTippyOptions) == null ? {} : e;
|
|
11028
11039
|
}) });
|
|
11029
|
-
let { displayTabs:
|
|
11040
|
+
let { displayTabs: te, tabs: ne, selectedTab: z, isCollapse: re, addCustomTab: ie, ensureCustomTab: ae, removeCustomTab: oe, selectCustomTab: se, resetCustomTab: ce } = ai({
|
|
11030
11041
|
executionTabVisible: () => u.executionTabVisible,
|
|
11031
11042
|
onTabChange: function() {
|
|
11032
11043
|
var e = Z(function* (e) {
|
|
11033
11044
|
var t, n;
|
|
11034
11045
|
if (e.name === "file-artifact") return;
|
|
11035
|
-
let r = ((t =
|
|
11046
|
+
let r = ((t = z.value.data) == null ? void 0 : t.props) || {
|
|
11036
11047
|
loading: !0,
|
|
11037
11048
|
data: {}
|
|
11038
11049
|
};
|
|
11039
|
-
|
|
11050
|
+
z.value.data = X(X({}, z.value.data), {}, { props: r });
|
|
11040
11051
|
let i = yield (n = u.onCustomTabChange) == null ? void 0 : n.call(u, e);
|
|
11041
|
-
|
|
11052
|
+
z.value.data = X(X({}, z.value.data), {}, { props: X(X({}, r), {}, {
|
|
11042
11053
|
loading: !1,
|
|
11043
11054
|
data: i
|
|
11044
11055
|
}) });
|
|
@@ -11048,13 +11059,13 @@ var $d = ["src"], ef = {
|
|
|
11048
11059
|
};
|
|
11049
11060
|
}()
|
|
11050
11061
|
}), ue = () => {
|
|
11051
|
-
|
|
11062
|
+
ae({
|
|
11052
11063
|
closable: !1,
|
|
11053
11064
|
label: G("文件产物"),
|
|
11054
11065
|
name: Ur,
|
|
11055
11066
|
order: -1
|
|
11056
11067
|
});
|
|
11057
|
-
}, de =
|
|
11068
|
+
}, de = I(""), fe = ee([]), pe = I(), me = I((() => {
|
|
11058
11069
|
var e;
|
|
11059
11070
|
let t = (e = u.resizeProps) == null ? void 0 : e.initialDivide;
|
|
11060
11071
|
return typeof t == "number" ? t : 400;
|
|
@@ -11063,10 +11074,10 @@ var $d = ["src"], ef = {
|
|
|
11063
11074
|
messages: a(() => u.messages),
|
|
11064
11075
|
renderMode: a(() => p.value),
|
|
11065
11076
|
selectedUserMessages: fe
|
|
11066
|
-
}), Oe = a(() =>
|
|
11077
|
+
}), Oe = a(() => ne.value.some((e) => e.name === Ur)), { activeArtifactId: ke, setActiveArtifactId: Ae } = Gr({
|
|
11067
11078
|
getOnArtifactClick: () => u.onArtifactClick,
|
|
11068
11079
|
onOpen: () => {
|
|
11069
|
-
|
|
11080
|
+
ie({
|
|
11070
11081
|
closable: !1,
|
|
11071
11082
|
label: G("文件产物"),
|
|
11072
11083
|
name: Ur,
|
|
@@ -11074,16 +11085,16 @@ var $d = ["src"], ef = {
|
|
|
11074
11085
|
});
|
|
11075
11086
|
}
|
|
11076
11087
|
});
|
|
11077
|
-
|
|
11088
|
+
H(ye, (e) => {
|
|
11078
11089
|
if (!e.length) {
|
|
11079
|
-
|
|
11090
|
+
oe(Ur), Ae("");
|
|
11080
11091
|
return;
|
|
11081
11092
|
}
|
|
11082
11093
|
ue(), e.some((e) => e.outputId === ke.value) || Ae(e[0].outputId);
|
|
11083
|
-
}, { immediate: !0 }),
|
|
11084
|
-
e && (de.value = "", me.value = 0),
|
|
11085
|
-
}),
|
|
11086
|
-
!e.length && !de.value && !Oe.value &&
|
|
11094
|
+
}, { immediate: !0 }), H(re, (e) => {
|
|
11095
|
+
e && (de.value = "", me.value = 0), M("collapseChange", e, me.value);
|
|
11096
|
+
}), H(() => ve.value, (e) => {
|
|
11097
|
+
!e.length && !de.value && !Oe.value && ce();
|
|
11087
11098
|
}, {
|
|
11088
11099
|
immediate: !0,
|
|
11089
11100
|
deep: !1
|
|
@@ -11092,15 +11103,15 @@ var $d = ["src"], ef = {
|
|
|
11092
11103
|
var e;
|
|
11093
11104
|
return u.messageStatus === J.StopLoading ? J.StopLoading : (e = ge.value) != null && e.some((e) => e.messages.some((e) => e.id === "__loading__")) ? J.Fetching : u.messageStatus;
|
|
11094
11105
|
}), Me = () => {
|
|
11095
|
-
D.value = null,
|
|
11106
|
+
D.value = null, M("shortcutClose");
|
|
11096
11107
|
}, Ne = (e) => {
|
|
11097
|
-
|
|
11108
|
+
M("shortcutSubmit", e);
|
|
11098
11109
|
}, Pe = () => {
|
|
11099
|
-
|
|
11110
|
+
M("deleteShortcut");
|
|
11100
11111
|
}, Fe = (e) => {
|
|
11101
|
-
|
|
11112
|
+
M("selectShortcut", e);
|
|
11102
11113
|
}, Ie = (e, t) => {
|
|
11103
|
-
|
|
11114
|
+
M("update:modelValue", e, t);
|
|
11104
11115
|
}, Le = function() {
|
|
11105
11116
|
var e = Z(function* (e, t) {
|
|
11106
11117
|
var n;
|
|
@@ -11114,7 +11125,7 @@ var $d = ["src"], ef = {
|
|
|
11114
11125
|
return e.apply(this, arguments);
|
|
11115
11126
|
};
|
|
11116
11127
|
}(), Re = () => {
|
|
11117
|
-
|
|
11128
|
+
re.value = !re.value;
|
|
11118
11129
|
}, ze = (e) => {
|
|
11119
11130
|
if (!e) return;
|
|
11120
11131
|
let t = document.getElementById(e);
|
|
@@ -11128,7 +11139,7 @@ var $d = ["src"], ef = {
|
|
|
11128
11139
|
}
|
|
11129
11140
|
t.scrollIntoView({ behavior: "smooth" });
|
|
11130
11141
|
}, Be = (e) => e === "execution" ? on : e === "file-artifact" ? hn : cn, Ve = (e) => {
|
|
11131
|
-
|
|
11142
|
+
se(ne.value.find((t) => t.name === e));
|
|
11132
11143
|
}, He = (e) => {
|
|
11133
11144
|
de.value = e;
|
|
11134
11145
|
}, Ue = function() {
|
|
@@ -11144,7 +11155,7 @@ var $d = ["src"], ef = {
|
|
|
11144
11155
|
return e.apply(this, arguments);
|
|
11145
11156
|
};
|
|
11146
11157
|
}(), We = () => {
|
|
11147
|
-
|
|
11158
|
+
M("confirmShare", Te(), pe.value), x(() => {
|
|
11148
11159
|
xe.value = !1, fe.value = [], pe.value = void 0;
|
|
11149
11160
|
});
|
|
11150
11161
|
}, Ge = () => {
|
|
@@ -11153,12 +11164,12 @@ var $d = ["src"], ef = {
|
|
|
11153
11164
|
me.value = e;
|
|
11154
11165
|
};
|
|
11155
11166
|
return O(() => {
|
|
11156
|
-
|
|
11167
|
+
ce(), typeof document < "u" && delete document.body.dataset.aiSize;
|
|
11157
11168
|
}), n({
|
|
11158
|
-
selectedTab:
|
|
11159
|
-
addCustomTab:
|
|
11160
|
-
removeCustomTab:
|
|
11161
|
-
selectCustomTab:
|
|
11169
|
+
selectedTab: z,
|
|
11170
|
+
addCustomTab: ie,
|
|
11171
|
+
removeCustomTab: oe,
|
|
11172
|
+
selectCustomTab: se,
|
|
11162
11173
|
enterShareMode: () => {
|
|
11163
11174
|
xe.value = !0;
|
|
11164
11175
|
},
|
|
@@ -11172,47 +11183,47 @@ var $d = ["src"], ef = {
|
|
|
11172
11183
|
"data-ai-size": t.size,
|
|
11173
11184
|
style: w({
|
|
11174
11185
|
"--resize-main-width": he.value,
|
|
11175
|
-
borderTopColor:
|
|
11186
|
+
borderTopColor: R(re) ? "transparent" : "#eaebf0"
|
|
11176
11187
|
})
|
|
11177
|
-
}, [t.chatLoading ? (k(), c("div", G_, [f(wp)])) : (k(), o(
|
|
11188
|
+
}, [t.chatLoading ? (k(), c("div", G_, [f(wp)])) : (k(), o(R(_e), b({
|
|
11178
11189
|
key: 1,
|
|
11179
|
-
class: ["ai-chat-container-resize-layout", { "ai-is-collapse":
|
|
11190
|
+
class: ["ai-chat-container-resize-layout", { "ai-is-collapse": R(re) || R(te).length > 0 && !((a = de.value) != null && a.length) && ((u = R(ve)) == null ? void 0 : u.length) < 1 && !Oe.value }]
|
|
11180
11191
|
}, T.value, { onResizing: Ke }), {
|
|
11181
|
-
aside:
|
|
11192
|
+
aside: U(() => {
|
|
11182
11193
|
var n, a, u, p, h, x;
|
|
11183
|
-
return [!
|
|
11194
|
+
return [!R(re) && R(te).length > 0 && ((n = R(ve)) != null && n.length || (a = de.value) != null && a.length || Oe.value) ? (k(), c("div", {
|
|
11184
11195
|
key: 0,
|
|
11185
11196
|
ref_key: "fullScreenRef",
|
|
11186
11197
|
ref: m,
|
|
11187
11198
|
class: "ai-full-screen-wrapper"
|
|
11188
11199
|
}, [
|
|
11189
|
-
f(
|
|
11190
|
-
active:
|
|
11200
|
+
f(R(be), {
|
|
11201
|
+
active: R(z).name,
|
|
11191
11202
|
class: "ai-chat-container-tab",
|
|
11192
11203
|
"label-height": 40,
|
|
11193
11204
|
type: "unborder-card",
|
|
11194
11205
|
onChange: Ve
|
|
11195
11206
|
}, {
|
|
11196
|
-
setting:
|
|
11207
|
+
setting: U(() => {
|
|
11197
11208
|
var e;
|
|
11198
11209
|
return [l("div", K_, [f(Ii, {
|
|
11199
11210
|
class: "screen-btn",
|
|
11200
11211
|
"tippy-options": X(X({}, t.commonTippyOptions), {}, {
|
|
11201
|
-
appendTo:
|
|
11202
|
-
content:
|
|
11212
|
+
appendTo: R(_) ? m.value : (e = t.commonTippyOptions) == null ? void 0 : e.appendTo,
|
|
11213
|
+
content: R(_) ? R(G)("退出全屏") : R(G)("全屏")
|
|
11203
11214
|
})
|
|
11204
11215
|
}, {
|
|
11205
|
-
default:
|
|
11216
|
+
default: U(() => [R(_) ? (k(), o(R(Yn), {
|
|
11206
11217
|
key: 1,
|
|
11207
|
-
onClick:
|
|
11208
|
-
}, null, 8, ["onClick"])) : (k(), o(
|
|
11218
|
+
onClick: R(y)
|
|
11219
|
+
}, null, 8, ["onClick"])) : (k(), o(R(Jn), {
|
|
11209
11220
|
key: 0,
|
|
11210
|
-
onClick:
|
|
11221
|
+
onClick: R(v)
|
|
11211
11222
|
}, null, 8, ["onClick"]))]),
|
|
11212
11223
|
_: 1
|
|
11213
11224
|
}, 8, ["tippy-options"])])];
|
|
11214
11225
|
}),
|
|
11215
|
-
default:
|
|
11226
|
+
default: U(() => [(k(!0), c(e, null, N(R(te), (e) => (k(), o(R(i), {
|
|
11216
11227
|
key: e.name,
|
|
11217
11228
|
class: "ai-chat-container-tab-panel",
|
|
11218
11229
|
label: () => {
|
|
@@ -11220,18 +11231,18 @@ var $d = ["src"], ef = {
|
|
|
11220
11231
|
return g("div", {
|
|
11221
11232
|
class: "ai-execution-summary-label",
|
|
11222
11233
|
onVnodeMounted: (t) => {
|
|
11223
|
-
if (
|
|
11234
|
+
if (R(z).name === e.name) {
|
|
11224
11235
|
var n;
|
|
11225
11236
|
(n = t.el) == null || n.scrollIntoView({ behavior: "smooth" });
|
|
11226
11237
|
}
|
|
11227
11238
|
}
|
|
11228
|
-
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab:
|
|
11239
|
+
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab: R(oe) })) == null ? [
|
|
11229
11240
|
g(Be(e.name), { class: "ai-execution-summary-icon" }),
|
|
11230
|
-
|
|
11231
|
-
e.closable !== !1 && e.name !==
|
|
11241
|
+
W(g("span", { class: "ai-execution-summary-label-text" }, (i = e.label) == null ? "" : i), [[R(Pi), X(X({}, t.commonTippyOptions), {}, { text: (a = e.label) == null ? "" : a })]]),
|
|
11242
|
+
e.closable !== !1 && e.name !== R("execution") ? g(R(Xn), {
|
|
11232
11243
|
class: "ai-execution-close-icon",
|
|
11233
11244
|
onClick: () => {
|
|
11234
|
-
|
|
11245
|
+
R(oe)(e.name);
|
|
11235
11246
|
}
|
|
11236
11247
|
}) : null
|
|
11237
11248
|
] : n);
|
|
@@ -11240,60 +11251,60 @@ var $d = ["src"], ef = {
|
|
|
11240
11251
|
}, null, 8, ["label", "name"]))), 128))]),
|
|
11241
11252
|
_: 1
|
|
11242
11253
|
}, 8, ["active"]),
|
|
11243
|
-
((u =
|
|
11254
|
+
((u = R(z)) == null ? void 0 : u.name) === R("execution") && t.executionTabVisible !== !1 ? (k(), c(e, { key: 0 }, [R(re) ? s("", !0) : (k(), o(R_, {
|
|
11244
11255
|
key: 0,
|
|
11245
|
-
"message-groups":
|
|
11256
|
+
"message-groups": R(ve),
|
|
11246
11257
|
style: { height: "calc(100% - 40px)" },
|
|
11247
11258
|
onLocateMessageGroup: ze,
|
|
11248
11259
|
onUpdateKeyword: He
|
|
11249
|
-
}, null, 8, ["message-groups"]))], 64)) : ((p =
|
|
11260
|
+
}, null, 8, ["message-groups"]))], 64)) : ((p = R(z)) == null ? void 0 : p.name) === R("file-artifact") ? (k(), o(Qp, {
|
|
11250
11261
|
key: 1,
|
|
11251
|
-
"active-id":
|
|
11252
|
-
artifacts:
|
|
11262
|
+
"active-id": R(ke),
|
|
11263
|
+
artifacts: R(ye),
|
|
11253
11264
|
style: { height: "calc(100% - 40px)" },
|
|
11254
|
-
onSelect:
|
|
11265
|
+
onSelect: R(Ae)
|
|
11255
11266
|
}, null, 8, [
|
|
11256
11267
|
"active-id",
|
|
11257
11268
|
"artifacts",
|
|
11258
11269
|
"onSelect"
|
|
11259
11270
|
])) : s("", !0),
|
|
11260
|
-
|
|
11261
|
-
key:
|
|
11271
|
+
R(z) && R(z).name !== R("file-artifact") ? (k(), c("div", {
|
|
11272
|
+
key: R(z).name,
|
|
11262
11273
|
class: "ai-chat-container-message-slot"
|
|
11263
|
-
}, [(k(), o(
|
|
11264
|
-
locateButton:
|
|
11274
|
+
}, [(k(), o(F(E.value), b({ key: R(z).name }, (h = R(z)) == null || (h = h.data) == null ? void 0 : h.props), {
|
|
11275
|
+
locateButton: U(() => [f(R(le), {
|
|
11265
11276
|
class: "ai-locate-button",
|
|
11266
11277
|
size: "small",
|
|
11267
11278
|
text: "",
|
|
11268
11279
|
theme: "primary",
|
|
11269
11280
|
onClick: r[0] || (r[0] = (e) => {
|
|
11270
11281
|
var t;
|
|
11271
|
-
return ze((t =
|
|
11282
|
+
return ze((t = R(z)) == null || (t = t.data) == null ? void 0 : t.messageUid);
|
|
11272
11283
|
})
|
|
11273
11284
|
}, {
|
|
11274
|
-
default:
|
|
11285
|
+
default: U(() => [d(L(R(G)("在对话中定位")), 1)]),
|
|
11275
11286
|
_: 1
|
|
11276
11287
|
})]),
|
|
11277
11288
|
_: 1
|
|
11278
11289
|
}, 16))])) : s("", !0)
|
|
11279
|
-
], 512)) : s("", !0),
|
|
11290
|
+
], 512)) : s("", !0), R(te).length > 0 && ((x = R(ve)) != null && x.length || Oe.value) ? (k(), c("div", {
|
|
11280
11291
|
key: 1,
|
|
11281
11292
|
class: S(["collapse-button", {
|
|
11282
11293
|
"is-right": t.placement === "right",
|
|
11283
|
-
"is-collapsed":
|
|
11294
|
+
"is-collapsed": R(re)
|
|
11284
11295
|
}]),
|
|
11285
11296
|
onClick: Re
|
|
11286
|
-
}, [f(
|
|
11297
|
+
}, [f(R(Wn))], 2)) : s("", !0)];
|
|
11287
11298
|
}),
|
|
11288
|
-
main:
|
|
11299
|
+
main: U(() => {
|
|
11289
11300
|
var i, a, u, d;
|
|
11290
|
-
return [(i = t.messages) != null && i.length ?
|
|
11301
|
+
return [(i = t.messages) != null && i.length ? P(n.$slots, "default", C(b({ key: 0 }, {
|
|
11291
11302
|
messages: t.messages,
|
|
11292
11303
|
messageStatus: t.messageStatus,
|
|
11293
|
-
messageGroups:
|
|
11304
|
+
messageGroups: R(ge),
|
|
11294
11305
|
selectedUserMessages: fe.value,
|
|
11295
11306
|
messageToolsStatus: t.messageToolsStatus,
|
|
11296
|
-
isShareMode:
|
|
11307
|
+
isShareMode: R(xe),
|
|
11297
11308
|
commonTippyOptions: t.commonTippyOptions,
|
|
11298
11309
|
handleAgentAction: Ue,
|
|
11299
11310
|
onAgentFeedback: t.onAgentFeedback,
|
|
@@ -11307,8 +11318,8 @@ var $d = ["src"], ef = {
|
|
|
11307
11318
|
key: 0,
|
|
11308
11319
|
"selected-user-messages": fe.value,
|
|
11309
11320
|
"onUpdate:selectedUserMessages": r[1] || (r[1] = (e) => fe.value = e),
|
|
11310
|
-
"enable-selection":
|
|
11311
|
-
"message-groups":
|
|
11321
|
+
"enable-selection": R(xe),
|
|
11322
|
+
"message-groups": R(ge),
|
|
11312
11323
|
"message-status": je.value,
|
|
11313
11324
|
"message-tools": t.messageTools,
|
|
11314
11325
|
"message-tools-status": t.messageToolsStatus,
|
|
@@ -11322,10 +11333,10 @@ var $d = ["src"], ef = {
|
|
|
11322
11333
|
"on-user-shortcut-confirm": t.onUserShortcutConfirm,
|
|
11323
11334
|
"render-mode": p.value,
|
|
11324
11335
|
"update-tools": t.updateTools,
|
|
11325
|
-
onStopStreaming: r[2] || (r[2] = (e) =>
|
|
11336
|
+
onStopStreaming: r[2] || (r[2] = (e) => M("stopStreaming"))
|
|
11326
11337
|
}, {
|
|
11327
|
-
group:
|
|
11328
|
-
default:
|
|
11338
|
+
group: U(({ group: e }) => [P(n.$slots, "group", C(h({ group: e })))]),
|
|
11339
|
+
default: U(({ message: e, messageToolsStatus: t, onInterruptResume: r }) => [P(n.$slots, "message", C(h({
|
|
11329
11340
|
message: e,
|
|
11330
11341
|
messageToolsStatus: t,
|
|
11331
11342
|
onInterruptResume: r
|
|
@@ -11348,24 +11359,24 @@ var $d = ["src"], ef = {
|
|
|
11348
11359
|
"render-mode",
|
|
11349
11360
|
"update-tools"
|
|
11350
11361
|
])) : s("", !0)];
|
|
11351
|
-
}) : (k(), c("div", q_, [
|
|
11362
|
+
}) : (k(), c("div", q_, [P(n.$slots, "welcome", C(h({
|
|
11352
11363
|
openingRemark: t.openingRemark,
|
|
11353
11364
|
welcomeTitle: t.welcomeTitle
|
|
11354
11365
|
})), () => {
|
|
11355
11366
|
var e;
|
|
11356
11367
|
return [
|
|
11357
|
-
f(
|
|
11358
|
-
l("h2", J_,
|
|
11368
|
+
f(R(Kt)),
|
|
11369
|
+
l("h2", J_, L((e = t.welcomeTitle) == null ? R(G)("你好,我是小鲸") : e), 1),
|
|
11359
11370
|
t.openingRemark ? (k(), c("div", Y_, [f(Zl, { content: t.openingRemark }, null, 8, ["content"])])) : s("", !0)
|
|
11360
11371
|
];
|
|
11361
|
-
})])), p.value ===
|
|
11372
|
+
})])), p.value === R(Ft).Share ? s("", !0) : (k(), c(e, { key: 2 }, [R(xe) ? (k(), o(U_, {
|
|
11362
11373
|
key: 0,
|
|
11363
|
-
"is-all-selected":
|
|
11374
|
+
"is-all-selected": R(Se),
|
|
11364
11375
|
loading: !1,
|
|
11365
11376
|
"selected-count": fe.value.length,
|
|
11366
11377
|
onCancel: Ge,
|
|
11367
11378
|
onConfirm: We,
|
|
11368
|
-
onToggleAll:
|
|
11379
|
+
onToggleAll: R(Ce)
|
|
11369
11380
|
}, null, 8, [
|
|
11370
11381
|
"is-all-selected",
|
|
11371
11382
|
"selected-count",
|
|
@@ -11378,8 +11389,8 @@ var $d = ["src"], ef = {
|
|
|
11378
11389
|
key: 2,
|
|
11379
11390
|
cite: A.value,
|
|
11380
11391
|
"onUpdate:cite": r[3] || (r[3] = (e) => A.value = e),
|
|
11381
|
-
"selected-model":
|
|
11382
|
-
"onUpdate:selectedModel": r[4] || (r[4] = (e) =>
|
|
11392
|
+
"selected-model": j.value,
|
|
11393
|
+
"onUpdate:selectedModel": r[4] || (r[4] = (e) => j.value = e),
|
|
11383
11394
|
"message-status": je.value,
|
|
11384
11395
|
"model-value": t.modelValue,
|
|
11385
11396
|
models: t.models,
|
|
@@ -11389,23 +11400,23 @@ var $d = ["src"], ef = {
|
|
|
11389
11400
|
placeholder: t.placeholder,
|
|
11390
11401
|
prompts: t.prompts,
|
|
11391
11402
|
resources: t.resources,
|
|
11392
|
-
"send-disabled-tip":
|
|
11403
|
+
"send-disabled-tip": R(Ee),
|
|
11393
11404
|
"shortcut-id": (d = D.value) == null ? void 0 : d.id,
|
|
11394
11405
|
shortcuts: t.shortcuts,
|
|
11395
11406
|
skills: t.skills,
|
|
11396
11407
|
"support-upload": t.supportUpload,
|
|
11397
11408
|
"tippy-options": t.commonTippyOptions,
|
|
11398
11409
|
onDeleteShortcut: Pe,
|
|
11399
|
-
onModelChange: r[5] || (r[5] = (e) =>
|
|
11410
|
+
onModelChange: r[5] || (r[5] = (e) => M("modelChange", e)),
|
|
11400
11411
|
onSelectShortcut: Fe,
|
|
11401
11412
|
"onUpdate:modelValue": Ie
|
|
11402
11413
|
}, {
|
|
11403
|
-
interrupt:
|
|
11414
|
+
interrupt: U(() => [R(De) ? (k(), o(R(Fm), {
|
|
11404
11415
|
key: 0,
|
|
11405
|
-
interrupt:
|
|
11416
|
+
interrupt: R(De),
|
|
11406
11417
|
"on-resume": t.onInterruptResume
|
|
11407
11418
|
}, {
|
|
11408
|
-
question:
|
|
11419
|
+
question: U(({ question: e, qIndex: t, answer: r, setAnswer: i, confirm: a }) => [P(n.$slots, "interruptQuestion", C(h({
|
|
11409
11420
|
question: e,
|
|
11410
11421
|
qIndex: t,
|
|
11411
11422
|
answer: r,
|
|
@@ -11413,9 +11424,9 @@ var $d = ["src"], ef = {
|
|
|
11413
11424
|
confirm: a
|
|
11414
11425
|
})))]),
|
|
11415
11426
|
_: 3
|
|
11416
|
-
}, 8, ["interrupt", "on-resume"])) : s("", !0),
|
|
11427
|
+
}, 8, ["interrupt", "on-resume"])) : s("", !0), R(Ee) ? (k(), o(fp, {
|
|
11417
11428
|
key: 1,
|
|
11418
|
-
content:
|
|
11429
|
+
content: R(Ee)
|
|
11419
11430
|
}, null, 8, ["content"])) : s("", !0)]),
|
|
11420
11431
|
_: 3
|
|
11421
11432
|
}, 8, [
|
|
@@ -11458,7 +11469,7 @@ var $d = ["src"], ef = {
|
|
|
11458
11469
|
}
|
|
11459
11470
|
},
|
|
11460
11471
|
setup(e) {
|
|
11461
|
-
let t = /* @__PURE__ */ new Map(), n =
|
|
11472
|
+
let t = /* @__PURE__ */ new Map(), n = I(!1), r = I([]), i = I(0);
|
|
11462
11473
|
return A(Dd, {
|
|
11463
11474
|
register: (e, n) => {
|
|
11464
11475
|
t.set(e, n);
|
|
@@ -11470,7 +11481,7 @@ var $d = ["src"], ef = {
|
|
|
11470
11481
|
let a = [...t.keys()], o = a.map((e) => t.get(e)()), s = a.indexOf(e);
|
|
11471
11482
|
r.value = o, i.value = s >= 0 ? s : 0, n.value = !0;
|
|
11472
11483
|
}
|
|
11473
|
-
}), (t, a) => (k(), c("div", Z_, [
|
|
11484
|
+
}), (t, a) => (k(), c("div", Z_, [P(t.$slots, "default"), n.value ? (k(), o(af, {
|
|
11474
11485
|
key: 0,
|
|
11475
11486
|
current: i.value,
|
|
11476
11487
|
"onUpdate:current": a[0] || (a[0] = (e) => i.value = e),
|
|
@@ -11482,7 +11493,7 @@ var $d = ["src"], ef = {
|
|
|
11482
11493
|
"show-info": e.showInfo
|
|
11483
11494
|
}, u({ _: 2 }, [t.$slots.extra ? {
|
|
11484
11495
|
name: "extra",
|
|
11485
|
-
fn:
|
|
11496
|
+
fn: U(() => [P(t.$slots, "extra")]),
|
|
11486
11497
|
key: "0"
|
|
11487
11498
|
} : void 0]), 1032, [
|
|
11488
11499
|
"current",
|
|
@@ -11524,7 +11535,7 @@ var $d = ["src"], ef = {
|
|
|
11524
11535
|
"preview"
|
|
11525
11536
|
],
|
|
11526
11537
|
setup(e, { expose: t, emit: n }) {
|
|
11527
|
-
let r = e, i = n, d = Symbol(), p = _(Dd, null), m =
|
|
11538
|
+
let r = e, i = n, d = Symbol(), p = _(Dd, null), m = ee(), h = I("loading"), g = I(!1), v = I(!r.lazy), y = null, b = a(() => {
|
|
11528
11539
|
var e;
|
|
11529
11540
|
return ((e = r.previewProps) == null ? void 0 : e.src) || r.src;
|
|
11530
11541
|
}), x = () => {
|
|
@@ -11537,7 +11548,7 @@ var $d = ["src"], ef = {
|
|
|
11537
11548
|
resolution: e == null ? void 0 : e.resolution,
|
|
11538
11549
|
downloadUrl: e == null ? void 0 : e.downloadUrl
|
|
11539
11550
|
};
|
|
11540
|
-
}, C =
|
|
11551
|
+
}, C = I(0), D = a(() => {
|
|
11541
11552
|
if (!r.lazy || v.value) {
|
|
11542
11553
|
let e = r.src;
|
|
11543
11554
|
return C.value === 0 ? e : `${e}${e.includes("?") ? "&" : "?"}_t=${C.value}`;
|
|
@@ -11546,30 +11557,30 @@ var $d = ["src"], ef = {
|
|
|
11546
11557
|
}), O = a(() => [x()]), A = a(() => {
|
|
11547
11558
|
let e = {};
|
|
11548
11559
|
return r.width && (e.width = typeof r.width == "number" ? `${r.width}px` : r.width), r.height && (e.height = typeof r.height == "number" ? `${r.height}px` : r.height), e;
|
|
11549
|
-
}),
|
|
11560
|
+
}), j = {
|
|
11550
11561
|
width: "100%",
|
|
11551
11562
|
height: "100%",
|
|
11552
11563
|
objectFit: "cover"
|
|
11553
|
-
}, j = (e) => {
|
|
11554
|
-
h.value = "loaded", i("load", e);
|
|
11555
11564
|
}, M = (e) => {
|
|
11565
|
+
h.value = "loaded", i("load", e);
|
|
11566
|
+
}, N = (e) => {
|
|
11556
11567
|
h.value = "error", i("error", e);
|
|
11557
|
-
},
|
|
11568
|
+
}, F = () => {
|
|
11558
11569
|
h.value = "loading", C.value = Date.now();
|
|
11559
|
-
},
|
|
11570
|
+
}, te = () => {
|
|
11560
11571
|
!r.preview || h.value !== "loaded" || (p ? p.preview(d) : g.value = !0, i("preview"));
|
|
11561
|
-
},
|
|
11572
|
+
}, ne = () => {
|
|
11562
11573
|
!r.lazy || !m.value || (y = new IntersectionObserver((e) => {
|
|
11563
11574
|
var t;
|
|
11564
11575
|
(t = e[0]) != null && t.isIntersecting && (v.value = !0, y == null || y.disconnect(), y = null);
|
|
11565
11576
|
}, { rootMargin: "200px" }), y.observe(m.value));
|
|
11566
|
-
},
|
|
11577
|
+
}, z = () => {
|
|
11567
11578
|
y == null || y.disconnect(), y = null;
|
|
11568
11579
|
};
|
|
11569
11580
|
return E(() => {
|
|
11570
|
-
|
|
11581
|
+
ne(), p == null || p.register(d, x);
|
|
11571
11582
|
}), T(() => {
|
|
11572
|
-
|
|
11583
|
+
z(), p == null || p.unregister(d);
|
|
11573
11584
|
}), t({ previewVisible: g }), (t, n) => (k(), c("div", {
|
|
11574
11585
|
ref_key: "containerRef",
|
|
11575
11586
|
ref: m,
|
|
@@ -11578,25 +11589,25 @@ var $d = ["src"], ef = {
|
|
|
11578
11589
|
"ai-image--preview": e.preview && h.value === "loaded"
|
|
11579
11590
|
}]),
|
|
11580
11591
|
style: w(A.value),
|
|
11581
|
-
onClick:
|
|
11592
|
+
onClick: te
|
|
11582
11593
|
}, [
|
|
11583
11594
|
h.value !== "error" && D.value ? (k(), c("img", {
|
|
11584
11595
|
key: 0,
|
|
11585
11596
|
alt: e.alt,
|
|
11586
11597
|
class: "ai-image-inner",
|
|
11587
11598
|
src: D.value,
|
|
11588
|
-
style:
|
|
11589
|
-
onError:
|
|
11590
|
-
onLoad:
|
|
11599
|
+
style: j,
|
|
11600
|
+
onError: N,
|
|
11601
|
+
onLoad: M
|
|
11591
11602
|
}, null, 40, $_)) : s("", !0),
|
|
11592
|
-
h.value === "error" ? (k(), c("div", ev, [f(
|
|
11603
|
+
h.value === "error" ? (k(), c("div", ev, [f(R($t), { class: "ai-image-error-icon" })])) : s("", !0),
|
|
11593
11604
|
h.value === "error" ? (k(), c("div", {
|
|
11594
11605
|
key: 2,
|
|
11595
11606
|
class: "ai-image-error-overlay",
|
|
11596
|
-
onClick:
|
|
11597
|
-
}, [f(
|
|
11598
|
-
|
|
11599
|
-
!
|
|
11607
|
+
onClick: F
|
|
11608
|
+
}, [f(R(Tn), { class: "ai-image-reload-icon" }), l("span", null, L(R(G)("重新加载")), 1)])) : s("", !0),
|
|
11609
|
+
P(t.$slots, "default"),
|
|
11610
|
+
!R(p) && e.preview && g.value ? (k(), o(af, {
|
|
11600
11611
|
key: 3,
|
|
11601
11612
|
visible: g.value,
|
|
11602
11613
|
"onUpdate:visible": n[0] || (n[0] = (e) => g.value = e),
|
|
@@ -11605,7 +11616,7 @@ var $d = ["src"], ef = {
|
|
|
11605
11616
|
"show-info": e.showInfo
|
|
11606
11617
|
}, u({ _: 2 }, [t.$slots.extra ? {
|
|
11607
11618
|
name: "extra",
|
|
11608
|
-
fn:
|
|
11619
|
+
fn: U(() => [P(t.$slots, "extra")]),
|
|
11609
11620
|
key: "0"
|
|
11610
11621
|
} : void 0]), 1032, [
|
|
11611
11622
|
"visible",
|
|
@@ -11617,4 +11628,4 @@ var $d = ["src"], ef = {
|
|
|
11617
11628
|
}
|
|
11618
11629
|
}));
|
|
11619
11630
|
//#endregion
|
|
11620
|
-
export { Kt as AIBluekingBannerIcon, Gt as AIBluekingIcon, yt as AIFileType, K as APPROVAL_STATUS, vt as APPROVAL_STATUS_MAP, Hr as ARTIFACT_PREVIEW_TOKEN,
|
|
11631
|
+
export { Kt as AIBluekingBannerIcon, Gt as AIBluekingIcon, yt as AIFileType, K as APPROVAL_STATUS, vt as APPROVAL_STATUS_MAP, Hr as ARTIFACT_PREVIEW_TOKEN, cr as ActiveLikeIcon, lr as ActiveUnLikeIcon, Qn as AgentIcon, tv as AiImage, yr as AiLoading, Tr as AiSelection, qn as ArrowDownIcon, Cn as ArrowLeftIcon, Zt as ArrowRightIcon, wn as ArrowRightPreviewIcon, hn as ArtifactTabIcon, tn as BkFlowFailedIcon, rn as BkFlowPendingIcon, an as BkFlowSkippedIcon, en as BkFlowSuccessIcon, nn as BkFlowSuspendedIcon, wt as CHAT_Z_INDEX, kt as CONST_MESSAGE_TOOLS, jt as CONST_UPDATE_TOOLS, At as CONST_USER_MESSAGE_TOOLS, Zr as CONTAINER_SCROLL_TOKEN, ni as CUSTOM_TAB_TOKEN, X_ as ChatContainer, lp as ChatInput, Nn as CheckCircleFillIcon, tr as CiteIcon, Fn as CloseCircleFillIcon, On as CloseCircleIcon, Xn as CloseIcon, hl as CodeContent, Wn as CollapsedIcon, Kn as ContentLoadingIcon, Zl as ContentRender, er as CopyIcon, dr as DEFAULT_SHORTCUTS, ii as DEFAULT_TAB_ORDER, bu as Delete, An as DeleteCircleIcon, or as DeleteIcon, kn as DocLinkIcon, qt as DocumentIcon, gn as DownloadFileIcon, xn as DownloadIcon, Et as EDITOR_MENU_Z_INDEX, Tt as EDITOR_Z_INDEX, ri as EXECUTION_TAB_NAME, sr as EditIcon, zn as EnterIcon, Gn as ErrorIcon, on as ExecutionIcon, R_ as ExecutionSummary, Ur as FILE_ARTIFACT_TAB_NAME, jn as FileUploadIcon, bn as FitScreenIcon, Jn as FullScreenIcon, li as GLOBAL_CONFIG_TOKEN, Pt as HIGHLIGHT_KEYWORD_CLASS_NAME, Ln as HelpDocIcon, Qm as HighlightKeyword, mn as HtmlIcon, Dd as IMAGE_PREVIEW_GROUP_KEY, $r as INSTANT_SCROLL_DISTANCE, En as ImageBrokenIcon, Sl as ImageContent, $t as ImageErrorIcon, af as ImagePreview, Q_ as ImagePreviewGroup, Dn as ImageSizeIcon, Rn as InfoIcon, xu as InsertText, r_ as InterruptMessageRender, gt as InterruptReason, bt as InterruptResumeOperation, fn as JpgIcon, dn as JsonIcon, It as LOADING_MESSAGE_ID, wl as LatexContent, ir as LikeIcon, Qt as LinkIcon, Hn as LoadingMessageIcon, Mt as MAX_UPLOAD_FILES, Nt as MAX_UPLOAD_FILE_SIZE, Jl as MarkdownContent, un as MarkdownIcon, Lt as MarkdownLanguageMap, El as MermaidContent, D_ as MessageContainer, _t as MessageContentType, wp as MessageLoading, w_ as MessageRender, q as MessageRole, Od as MessageState, J as MessageStatus, Zm as MessageTools, Ad as MessageToolsStatus, Km as MessageUserFeedback, sp as ModelSelector, $n as MoreAgentIcon, Zn as MoreIcon, sn as NodeOutputIcon, cn as NodeTabIcon, $p as OTHERS_OPTION_LABEL, Pi as OverflowTips, ln as PdfIcon, Sn as PreviewCloseIcon, Jt as PreviewIcon, nr as RebuildIcon, Tn as ReloadIcon, Xt as RemoveIcon, Ft as RenderMode, Su as ReplaceAll, In as RevokedIcon, yn as RotateIcon, Ot as SELECTION_Z_INDEX, Dt as SHORTCUT_MENU_Z_INDEX, Qr as SHOW_SCROLL_BOTTOM_BTN_DISTANCE, fr as ScrollBtn, Mn as SearchIcon, U_ as SelectionFooter, Vn as SendMessageIcon, rr as ShareIcon, Sr as ShortcutBtn, kr as ShortcutBtns, Br as ShortcutRender, Bn as SkipIcon, Yt as TargetIcon, Un as ThinkingIcon, Pn as TimeIcon, Mg as ToolCallRender, ur as ToolIconsMap, pn as TxtIcon, Yn as UnFullScreenIcon, ar as UnLikeIcon, kd as UploadStatus, St as UserMultiChoiceQuestionSchema, fm as UserQuestionAnsweredCard, Fm as UserQuestionCard, vm as UserQuestionChoice, gm as UserQuestionOption, Ct as UserQuestionSchema, xt as UserSingleChoiceQuestionSchema, Gl as VNodeRenderer, _n as ZoomInIcon, vn as ZoomOutIcon, nm as buildSkipResumePayload, kl as commonErrorContent, Y as commonSVGProps, Ze as completeMarkdownSyntax, bd as createEditor, tu as docToString, dt as formatDuration, pt as formatElapsedTime, Be as formatFileSize, Ve as formatUploadNotAddedMessage, ft as generateUUID, ut as getCookieByName, ze as getFileExtension, Re as getFilePreviewUrl, xi as getScrollParent, di as injectGlobalConfig, mt as isEn, Le as isImageFile, ht as lang, Gc as markdownAnimationAttrs, Qc as markdownItBkInlineStyle, rl as markdownItLatex, al as markdownItMermaid, wu as microtask, Cu as min, He as needsMarkdownCompletion, Ed as noop, xd as plainSchema, Ue as removeCompletionSuffix, Td as resourceTypeMap, wd as schema, nu as stringToDoc, G as t, em as toLetter, Wr as triggerArtifactDownload, Vr as useAnimationText, Kr as useArtifactPreviewConsumer, Gr as useArtifactPreviewProvider, Yr as useClipboard, Xr as useCommandSelection, ti as useContainerScrollConsumer, ei as useContainerScrollProvider, oi as useCustomTabConsumer, ai as useCustomTabProvider, ci as useFullScreen, ui as useGlobalConfig, fi as useMenuKeydown, bi as useMessageGroup, Er as useObserverVisibleList, Si as useParentScrolling, tm as useUserQuestion, Cd as voidNode };
|