@ibiz-template-plugin/ai-chat 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +326 -260
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +32 -4
- package/dist/types/entity/ai-agent/ai-agent.d.ts +10 -1
- package/dist/types/interface/i-ai-agent/i-ai-agent.d.ts +15 -2
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +31 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -61,13 +61,13 @@ function ys(n) {
|
|
|
61
61
|
}
|
|
62
62
|
function ni() {
|
|
63
63
|
for (var n, e, t, i, s, r, o, l = 1; vt.length; )
|
|
64
|
-
vt.length > l && vt.sort(Il), n = vt.shift(), l = vt.length, n.__d && (t = void 0, i = void 0, s = (i = (e = n).__v).__e, r = [], o = [], e.__P && ((t = Ye({}, i)).__v = i.__v + 1, D.vnode && D.vnode(t),
|
|
64
|
+
vt.length > l && vt.sort(Il), n = vt.shift(), l = vt.length, n.__d && (t = void 0, i = void 0, s = (i = (e = n).__v).__e, r = [], o = [], e.__P && ((t = Ye({}, i)).__v = i.__v + 1, D.vnode && D.vnode(t), Us(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [s] : null, r, s == null ? Zt(i) : s, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, Bl(r, t, o), i.__e = i.__ = null, t.__e != s && Pl(t)));
|
|
65
65
|
ni.__r = 0;
|
|
66
66
|
}
|
|
67
67
|
function zl(n, e, t, i, s, r, o, l, a, c, d) {
|
|
68
68
|
var h, u, f, m, g, y, v, w = i && i.__k || $l, b = e.length;
|
|
69
69
|
for (a = Td(t, e, w, a, b), h = 0; h < b; h++)
|
|
70
|
-
(f = t.__k[h]) != null && (u = f.__i == -1 ? bn : w[f.__i] || bn, f.__i = h, y =
|
|
70
|
+
(f = t.__k[h]) != null && (u = f.__i == -1 ? bn : w[f.__i] || bn, f.__i = h, y = Us(n, f, u, s, r, o, l, a, c, d), m = f.__e, f.ref && u.ref != f.ref && (u.ref && qs(u.ref, null, f), d.push(f.ref, f.__c || m, f)), g == null && m != null && (g = m), (v = !!(4 & f.__u)) || u.__k === f.__k ? a = Ll(f, a, n, v) : typeof f.type == "function" && y !== void 0 ? a = y : m && (a = m.nextSibling), f.__u &= -7);
|
|
71
71
|
return t.__e = g, a;
|
|
72
72
|
}
|
|
73
73
|
function Td(n, e, t, i, s) {
|
|
@@ -151,7 +151,7 @@ function Ir(n) {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Us(n, e, t, i, s, r, o, l, a, c) {
|
|
155
155
|
var d, h, u, f, m, g, y, v, w, b, C, k, T, S, M, O, W, H = e.type;
|
|
156
156
|
if (e.constructor != null)
|
|
157
157
|
return null;
|
|
@@ -207,7 +207,7 @@ function vs(n) {
|
|
|
207
207
|
}
|
|
208
208
|
function Bl(n, e, t) {
|
|
209
209
|
for (var i = 0; i < t.length; i++)
|
|
210
|
-
|
|
210
|
+
qs(t[i], t[++i], t[++i]);
|
|
211
211
|
D.__c && D.__c(e, n), n.some(function(s) {
|
|
212
212
|
try {
|
|
213
213
|
n = s.__h, s.__h = [], n.some(function(r) {
|
|
@@ -262,7 +262,7 @@ function Ed(n, e, t, i, s, r, o, l, a) {
|
|
|
262
262
|
}
|
|
263
263
|
return n;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function qs(n, e, t) {
|
|
266
266
|
try {
|
|
267
267
|
if (typeof n == "function") {
|
|
268
268
|
var i = typeof n.__u == "function";
|
|
@@ -275,7 +275,7 @@ function Us(n, e, t) {
|
|
|
275
275
|
}
|
|
276
276
|
function Vl(n, e, t) {
|
|
277
277
|
var i, s;
|
|
278
|
-
if (D.unmount && D.unmount(n), (i = n.ref) && (i.current && i.current != n.__e ||
|
|
278
|
+
if (D.unmount && D.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || qs(i, null, e)), (i = n.__c) != null) {
|
|
279
279
|
if (i.componentWillUnmount)
|
|
280
280
|
try {
|
|
281
281
|
i.componentWillUnmount();
|
|
@@ -294,7 +294,7 @@ function Ad(n, e, t) {
|
|
|
294
294
|
}
|
|
295
295
|
function wt(n, e, t) {
|
|
296
296
|
var i, s, r, o;
|
|
297
|
-
e == document && (e = document.documentElement), D.__ && D.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, r = [], o = [],
|
|
297
|
+
e == document && (e = document.documentElement), D.__ && D.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, r = [], o = [], Us(e, n = (!i && t || e).__k = Be(We, null, [n]), s || bn, bn, e.namespaceURI, !i && t ? [t] : s ? null : e.firstChild ? Ci.call(e.childNodes) : null, r, !i && t ? t : s ? s.__e : e.firstChild, i, o), Bl(r, n, o);
|
|
298
298
|
}
|
|
299
299
|
function Od(n) {
|
|
300
300
|
function e(t) {
|
|
@@ -1372,7 +1372,7 @@ class jd {
|
|
|
1372
1372
|
return { completed: t, toolCalls: r };
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
|
-
class
|
|
1375
|
+
class Ul {
|
|
1376
1376
|
/**
|
|
1377
1377
|
* 解析聊天步骤字符串
|
|
1378
1378
|
* @param chatStepString
|
|
@@ -1415,7 +1415,7 @@ class ql {
|
|
|
1415
1415
|
return l;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
class
|
|
1418
|
+
class Ud {
|
|
1419
1419
|
/**
|
|
1420
1420
|
* 解析界面操作字符串
|
|
1421
1421
|
* @param chatStepString
|
|
@@ -1442,21 +1442,21 @@ class qd {
|
|
|
1442
1442
|
return t;
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
var Et,
|
|
1445
|
+
var Et, U, Bi, Rr, Qt = 0, ql = [], Y = D, $r = Y.__b, Pr = Y.__r, zr = Y.diffed, Lr = Y.__c, Br = Y.unmount, Fr = Y.__;
|
|
1446
1446
|
function On(n, e) {
|
|
1447
|
-
Y.__h && Y.__h(
|
|
1448
|
-
var t =
|
|
1447
|
+
Y.__h && Y.__h(U, n, Qt || e), Qt = 0;
|
|
1448
|
+
var t = U.__H || (U.__H = { __: [], __h: [] });
|
|
1449
1449
|
return n >= t.__.length && t.__.push({}), t.__[n];
|
|
1450
1450
|
}
|
|
1451
1451
|
function K(n) {
|
|
1452
|
-
return Qt = 1,
|
|
1452
|
+
return Qt = 1, qd(Kl, n);
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function qd(n, e, t) {
|
|
1455
1455
|
var i = On(Et++, 2);
|
|
1456
1456
|
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : Kl(void 0, e), function(l) {
|
|
1457
1457
|
var a = i.__N ? i.__N[0] : i.__[0], c = i.t(a, l);
|
|
1458
1458
|
a !== c && (i.__N = [c, i.__[1]], i.__c.setState({}));
|
|
1459
|
-
}], i.__c =
|
|
1459
|
+
}], i.__c = U, !U.__f)) {
|
|
1460
1460
|
var s = function(l, a, c) {
|
|
1461
1461
|
if (!i.__c.__H)
|
|
1462
1462
|
return !0;
|
|
@@ -1475,25 +1475,25 @@ function Ud(n, e, t) {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
}), r && r.call(this, l, a, c) || h;
|
|
1477
1477
|
};
|
|
1478
|
-
|
|
1479
|
-
var r =
|
|
1480
|
-
|
|
1478
|
+
U.__f = !0;
|
|
1479
|
+
var r = U.shouldComponentUpdate, o = U.componentWillUpdate;
|
|
1480
|
+
U.componentWillUpdate = function(l, a, c) {
|
|
1481
1481
|
if (this.__e) {
|
|
1482
1482
|
var d = r;
|
|
1483
1483
|
r = void 0, s(l, a, c), r = d;
|
|
1484
1484
|
}
|
|
1485
1485
|
o && o.call(this, l, a, c);
|
|
1486
|
-
},
|
|
1486
|
+
}, U.shouldComponentUpdate = s;
|
|
1487
1487
|
}
|
|
1488
1488
|
return i.__N || i.__;
|
|
1489
1489
|
}
|
|
1490
1490
|
function L(n, e) {
|
|
1491
1491
|
var t = On(Et++, 3);
|
|
1492
|
-
!Y.__s && Js(t.__H, e) && (t.__ = n, t.u = e,
|
|
1492
|
+
!Y.__s && Js(t.__H, e) && (t.__ = n, t.u = e, U.__H.__h.push(t));
|
|
1493
1493
|
}
|
|
1494
1494
|
function Kd(n, e) {
|
|
1495
1495
|
var t = On(Et++, 4);
|
|
1496
|
-
!Y.__s && Js(t.__H, e) && (t.__ = n, t.u = e,
|
|
1496
|
+
!Y.__s && Js(t.__H, e) && (t.__ = n, t.u = e, U.__h.push(t));
|
|
1497
1497
|
}
|
|
1498
1498
|
function F(n) {
|
|
1499
1499
|
return Qt = 5, Pe(function() {
|
|
@@ -1524,11 +1524,11 @@ function Vr(n, e) {
|
|
|
1524
1524
|
}, e);
|
|
1525
1525
|
}
|
|
1526
1526
|
function Ks(n) {
|
|
1527
|
-
var e =
|
|
1528
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
1527
|
+
var e = U.context[n.__c], t = On(Et++, 9);
|
|
1528
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(U)), e.props.value) : n.__;
|
|
1529
1529
|
}
|
|
1530
1530
|
function Xd() {
|
|
1531
|
-
for (var n; n =
|
|
1531
|
+
for (var n; n = ql.shift(); )
|
|
1532
1532
|
if (n.__P && n.__H)
|
|
1533
1533
|
try {
|
|
1534
1534
|
n.__H.__h.forEach(Yn), n.__H.__h.forEach(bs), n.__H.__h = [];
|
|
@@ -1537,21 +1537,21 @@ function Xd() {
|
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
1539
|
Y.__b = function(n) {
|
|
1540
|
-
|
|
1540
|
+
U = null, $r && $r(n);
|
|
1541
1541
|
}, Y.__ = function(n, e) {
|
|
1542
1542
|
n && e.__k && e.__k.__m && (n.__m = e.__k.__m), Fr && Fr(n, e);
|
|
1543
1543
|
}, Y.__r = function(n) {
|
|
1544
1544
|
Pr && Pr(n), Et = 0;
|
|
1545
|
-
var e = (
|
|
1546
|
-
e && (Bi ===
|
|
1545
|
+
var e = (U = n.__c).__H;
|
|
1546
|
+
e && (Bi === U ? (e.__h = [], U.__h = [], e.__.forEach(function(t) {
|
|
1547
1547
|
t.__N && (t.__ = t.__N), t.u = t.__N = void 0;
|
|
1548
|
-
})) : (e.__h.forEach(Yn), e.__h.forEach(bs), e.__h = [], Et = 0)), Bi =
|
|
1548
|
+
})) : (e.__h.forEach(Yn), e.__h.forEach(bs), e.__h = [], Et = 0)), Bi = U;
|
|
1549
1549
|
}, Y.diffed = function(n) {
|
|
1550
1550
|
zr && zr(n);
|
|
1551
1551
|
var e = n.__c;
|
|
1552
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1552
|
+
e && e.__H && (e.__H.__h.length && (ql.push(e) !== 1 && Rr === Y.requestAnimationFrame || ((Rr = Y.requestAnimationFrame) || Yd)(Xd)), e.__H.__.forEach(function(t) {
|
|
1553
1553
|
t.u && (t.__H = t.u), t.u = void 0;
|
|
1554
|
-
})), Bi =
|
|
1554
|
+
})), Bi = U = null;
|
|
1555
1555
|
}, Y.__c = function(n, e) {
|
|
1556
1556
|
e.some(function(t) {
|
|
1557
1557
|
try {
|
|
@@ -1583,12 +1583,12 @@ function Yd(n) {
|
|
|
1583
1583
|
Hr && (e = requestAnimationFrame(t));
|
|
1584
1584
|
}
|
|
1585
1585
|
function Yn(n) {
|
|
1586
|
-
var e =
|
|
1587
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
1586
|
+
var e = U, t = n.__c;
|
|
1587
|
+
typeof t == "function" && (n.__c = void 0, t()), U = e;
|
|
1588
1588
|
}
|
|
1589
1589
|
function bs(n) {
|
|
1590
|
-
var e =
|
|
1591
|
-
n.__c = n.__(),
|
|
1590
|
+
var e = U;
|
|
1591
|
+
n.__c = n.__(), U = e;
|
|
1592
1592
|
}
|
|
1593
1593
|
function Js(n, e) {
|
|
1594
1594
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
@@ -1710,7 +1710,7 @@ Object.defineProperty(fe.prototype, "value", { get: function() {
|
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
1712
|
} });
|
|
1713
|
-
function
|
|
1713
|
+
function _e(n, e) {
|
|
1714
1714
|
return new fe(n, e);
|
|
1715
1715
|
}
|
|
1716
1716
|
function Yl(n) {
|
|
@@ -1934,7 +1934,7 @@ ln("diffed", function(n, e) {
|
|
|
1934
1934
|
n(e);
|
|
1935
1935
|
});
|
|
1936
1936
|
function Qd(n, e, t, i) {
|
|
1937
|
-
var s = e in n && n.ownerSVGElement === void 0, r =
|
|
1937
|
+
var s = e in n && n.ownerSVGElement === void 0, r = _e(t);
|
|
1938
1938
|
return { o: function(o, l) {
|
|
1939
1939
|
r.value = o, i = l;
|
|
1940
1940
|
}, d: Gs(function() {
|
|
@@ -1986,7 +1986,7 @@ Fe.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
1986
1986
|
};
|
|
1987
1987
|
function z(n) {
|
|
1988
1988
|
return Pe(function() {
|
|
1989
|
-
return
|
|
1989
|
+
return _e(n);
|
|
1990
1990
|
}, []);
|
|
1991
1991
|
}
|
|
1992
1992
|
function te(n) {
|
|
@@ -3081,7 +3081,7 @@ const zh = (n) => {
|
|
|
3081
3081
|
{
|
|
3082
3082
|
className: "".concat(e.e("item"), " ").concat(e.em("item", ((y = g.type) == null ? void 0 : y.toLowerCase()) || "default")),
|
|
3083
3083
|
children: [
|
|
3084
|
-
/* @__PURE__ */ p(
|
|
3084
|
+
g.type === "KBGUIDANCE" ? /* @__PURE__ */ p("div", { className: e.e("kbguidance"), children: "[引导]" }) : /* @__PURE__ */ p(
|
|
3085
3085
|
"div",
|
|
3086
3086
|
{
|
|
3087
3087
|
className: e.e("similarity"),
|
|
@@ -3089,6 +3089,13 @@ const zh = (n) => {
|
|
|
3089
3089
|
children: "SCORE ".concat((g.similarity || 0).toFixed(2))
|
|
3090
3090
|
}
|
|
3091
3091
|
),
|
|
3092
|
+
g.original && /* @__PURE__ */ p(
|
|
3093
|
+
"div",
|
|
3094
|
+
{
|
|
3095
|
+
className: e.e("original"),
|
|
3096
|
+
children: "(向量".concat((g.original || 0).toFixed(2), ")")
|
|
3097
|
+
}
|
|
3098
|
+
),
|
|
3092
3099
|
/* @__PURE__ */ p("div", { className: e.em("item", "content"), title: g.content, children: g.content })
|
|
3093
3100
|
]
|
|
3094
3101
|
},
|
|
@@ -3106,6 +3113,13 @@ const zh = (n) => {
|
|
|
3106
3113
|
children: "SCORE ".concat((g.similarity || 0).toFixed(2))
|
|
3107
3114
|
}
|
|
3108
3115
|
),
|
|
3116
|
+
g.original && /* @__PURE__ */ p(
|
|
3117
|
+
"div",
|
|
3118
|
+
{
|
|
3119
|
+
className: e.e("original"),
|
|
3120
|
+
children: "(向量".concat((g.original || 0).toFixed(2), ")")
|
|
3121
|
+
}
|
|
3122
|
+
),
|
|
3109
3123
|
/* @__PURE__ */ p("div", { className: e.em("cluster", "title"), children: "[摘要]" }),
|
|
3110
3124
|
/* @__PURE__ */ p("div", { className: e.em("cluster", "summary"), title: g.content, children: g.content })
|
|
3111
3125
|
] }),
|
|
@@ -3369,12 +3383,12 @@ const Pn = new P("chat-search"), tr = (n) => {
|
|
|
3369
3383
|
}
|
|
3370
3384
|
);
|
|
3371
3385
|
};
|
|
3372
|
-
const
|
|
3386
|
+
const Ur = new P("chat-loading"), aa = (n) => {
|
|
3373
3387
|
const { size: e = 24 } = n;
|
|
3374
|
-
return /* @__PURE__ */ p("div", { className:
|
|
3388
|
+
return /* @__PURE__ */ p("div", { className: Ur.b(), children: /* @__PURE__ */ p(
|
|
3375
3389
|
"div",
|
|
3376
3390
|
{
|
|
3377
|
-
className:
|
|
3391
|
+
className: Ur.e("spinner"),
|
|
3378
3392
|
style: { width: "".concat(e, "px"), height: "".concat(e, "px") },
|
|
3379
3393
|
children: /* @__PURE__ */ p(mh, {})
|
|
3380
3394
|
}
|
|
@@ -3637,7 +3651,7 @@ function da(n, e) {
|
|
|
3637
3651
|
n[t] = e[t];
|
|
3638
3652
|
return n;
|
|
3639
3653
|
}
|
|
3640
|
-
function
|
|
3654
|
+
function qr(n, e) {
|
|
3641
3655
|
for (var t in n)
|
|
3642
3656
|
if (t !== "__source" && !(t in e))
|
|
3643
3657
|
return !0;
|
|
@@ -3650,28 +3664,28 @@ function Kr(n, e) {
|
|
|
3650
3664
|
this.props = n, this.context = e;
|
|
3651
3665
|
}
|
|
3652
3666
|
(Kr.prototype = new Fe()).isPureReactComponent = !0, Kr.prototype.shouldComponentUpdate = function(n, e) {
|
|
3653
|
-
return
|
|
3667
|
+
return qr(this.props, n) || qr(this.state, e);
|
|
3654
3668
|
};
|
|
3655
3669
|
var Jr = D.__b;
|
|
3656
3670
|
D.__b = function(n) {
|
|
3657
3671
|
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Jr && Jr(n);
|
|
3658
3672
|
};
|
|
3659
3673
|
var jh = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
3660
|
-
function
|
|
3674
|
+
function Uh(n) {
|
|
3661
3675
|
function e(t) {
|
|
3662
3676
|
var i = da({}, t);
|
|
3663
3677
|
return delete i.ref, n(i, t.ref || null);
|
|
3664
3678
|
}
|
|
3665
3679
|
return e.$$typeof = jh, e.render = n, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", e;
|
|
3666
3680
|
}
|
|
3667
|
-
var
|
|
3681
|
+
var qh = D.__e;
|
|
3668
3682
|
D.__e = function(n, e, t, i) {
|
|
3669
3683
|
if (n.then) {
|
|
3670
3684
|
for (var s, r = e; r = r.__; )
|
|
3671
3685
|
if ((s = r.__c) && s.__c)
|
|
3672
3686
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
3673
3687
|
}
|
|
3674
|
-
|
|
3688
|
+
qh(n, e, t, i);
|
|
3675
3689
|
};
|
|
3676
3690
|
var Xr = D.unmount;
|
|
3677
3691
|
function ha(n, e, t) {
|
|
@@ -3840,7 +3854,7 @@ D.diffed = function(n) {
|
|
|
3840
3854
|
var e = n.props, t = n.__e;
|
|
3841
3855
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3842
3856
|
};
|
|
3843
|
-
const to = new P("chat-slider"), ou =
|
|
3857
|
+
const to = new P("chat-slider"), ou = Uh(
|
|
3844
3858
|
(n, e) => {
|
|
3845
3859
|
const { min: t, max: i, step: s, onChange: r } = n, o = F(null), l = z(n.value), a = Math.max.apply(
|
|
3846
3860
|
null,
|
|
@@ -3949,7 +3963,7 @@ const ji = new P("chat-slider"), no = (n) => {
|
|
|
3949
3963
|
}
|
|
3950
3964
|
) });
|
|
3951
3965
|
};
|
|
3952
|
-
const
|
|
3966
|
+
const qe = new P("chat-step-item"), lu = (n) => {
|
|
3953
3967
|
const { element: e } = n, [t, i] = K(e.title), [s, r] = K(!1), [o, l] = K(!1), [a, c] = K(0), d = F(null), h = F(null), u = () => {
|
|
3954
3968
|
e.title ? i(e.title) : e.content && (e.content.length > 20 && i("".concat(e.content.substring(0, 19), "...")), i(e.content.substring(0, 19)));
|
|
3955
3969
|
}, f = () => {
|
|
@@ -3979,10 +3993,10 @@ const Ue = new P("chat-step-item"), lu = (n) => {
|
|
|
3979
3993
|
"div",
|
|
3980
3994
|
{
|
|
3981
3995
|
ref: d,
|
|
3982
|
-
className: "".concat(
|
|
3996
|
+
className: "".concat(qe.b()),
|
|
3983
3997
|
style: { "--ibiz-chat-step-item-height": "".concat(a, "px") },
|
|
3984
3998
|
children: [
|
|
3985
|
-
/* @__PURE__ */ p("div", { className: "".concat(
|
|
3999
|
+
/* @__PURE__ */ p("div", { className: "".concat(qe.e("left")), children: /* @__PURE__ */ p("div", { className: "".concat(qe.e("icon")), children: [
|
|
3986
4000
|
e.status === "success" && /* @__PURE__ */ p(Dh, {}),
|
|
3987
4001
|
e.status === "failed" && /* @__PURE__ */ p(Ih, {}),
|
|
3988
4002
|
e.status === "pending" && /* @__PURE__ */ p(Gn, {})
|
|
@@ -3990,22 +4004,22 @@ const Ue = new P("chat-step-item"), lu = (n) => {
|
|
|
3990
4004
|
/* @__PURE__ */ p(
|
|
3991
4005
|
"div",
|
|
3992
4006
|
{
|
|
3993
|
-
className: "".concat(
|
|
4007
|
+
className: "".concat(qe.e("right"), " ").concat(e.status === "pending" ? "is-loadding" : ""),
|
|
3994
4008
|
children: [
|
|
3995
|
-
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
3996
|
-
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
4009
|
+
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(qe.e("title")), title: t, children: t }),
|
|
4010
|
+
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(qe.e("content")), children: [
|
|
3997
4011
|
/* @__PURE__ */ p(
|
|
3998
4012
|
"div",
|
|
3999
4013
|
{
|
|
4000
4014
|
ref: h,
|
|
4001
|
-
className: "".concat(
|
|
4015
|
+
className: "".concat(qe.e("content-text"), " ").concat(o ? "expanded" : ""),
|
|
4002
4016
|
children: e.content || ""
|
|
4003
4017
|
}
|
|
4004
4018
|
),
|
|
4005
4019
|
s && /* @__PURE__ */ p(
|
|
4006
4020
|
"button",
|
|
4007
4021
|
{
|
|
4008
|
-
className: "".concat(
|
|
4022
|
+
className: "".concat(qe.e("toggle-btn")),
|
|
4009
4023
|
onClick: () => {
|
|
4010
4024
|
g();
|
|
4011
4025
|
},
|
|
@@ -4013,7 +4027,7 @@ const Ue = new P("chat-step-item"), lu = (n) => {
|
|
|
4013
4027
|
}
|
|
4014
4028
|
)
|
|
4015
4029
|
] }),
|
|
4016
|
-
e.status === "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
4030
|
+
e.status === "pending" && /* @__PURE__ */ p("div", { className: "".concat(qe.e("loadding-text")), children: "加载中......" })
|
|
4017
4031
|
]
|
|
4018
4032
|
}
|
|
4019
4033
|
)
|
|
@@ -4114,7 +4128,6 @@ const gt = new P("markdown-message"), cu = (n) => {
|
|
|
4114
4128
|
] }),
|
|
4115
4129
|
/* @__PURE__ */ p("div", { className: "".concat(gt.b("content"), " pre-wrap-container"), children: [
|
|
4116
4130
|
e.chatsteps && e.chatsteps.length > 0 && /* @__PURE__ */ p(au, { items: e.chatsteps || [] }),
|
|
4117
|
-
/* @__PURE__ */ p(Rh, { items: [l.value] }),
|
|
4118
4131
|
/* @__PURE__ */ p(
|
|
4119
4132
|
Vh,
|
|
4120
4133
|
{
|
|
@@ -4122,6 +4135,7 @@ const gt = new P("markdown-message"), cu = (n) => {
|
|
|
4122
4135
|
items: e.toolcalls || []
|
|
4123
4136
|
}
|
|
4124
4137
|
),
|
|
4138
|
+
/* @__PURE__ */ p(Rh, { items: [l.value] }),
|
|
4125
4139
|
/* @__PURE__ */ p("div", { id: i })
|
|
4126
4140
|
] }),
|
|
4127
4141
|
/* @__PURE__ */ p("div", { className: gt.b("footer"), children: [
|
|
@@ -4263,7 +4277,7 @@ const Lt = new P("common-material"), hu = (n) => {
|
|
|
4263
4277
|
] })
|
|
4264
4278
|
] });
|
|
4265
4279
|
};
|
|
4266
|
-
const
|
|
4280
|
+
const Ui = new P("chat-input-material-item"), pa = (n) => {
|
|
4267
4281
|
const { material: e } = n;
|
|
4268
4282
|
let t = null;
|
|
4269
4283
|
switch (e.type) {
|
|
@@ -4276,15 +4290,15 @@ const qi = new P("chat-input-material-item"), pa = (n) => {
|
|
|
4276
4290
|
const i = () => {
|
|
4277
4291
|
n.controller.deleteMaterial(e);
|
|
4278
4292
|
};
|
|
4279
|
-
return /* @__PURE__ */ p("div", { className: "".concat(
|
|
4280
|
-
/* @__PURE__ */ p("div", { className:
|
|
4293
|
+
return /* @__PURE__ */ p("div", { className: "".concat(Ui.b(), " ").concat(Ui.is("disabled", n.disabled)), children: [
|
|
4294
|
+
/* @__PURE__ */ p("div", { className: Ui.e("icon"), onClick: i, children: /* @__PURE__ */ p(yh, {}) }),
|
|
4281
4295
|
Be(t, {
|
|
4282
4296
|
material: e,
|
|
4283
4297
|
controller: n.controller
|
|
4284
4298
|
})
|
|
4285
4299
|
] });
|
|
4286
4300
|
};
|
|
4287
|
-
const
|
|
4301
|
+
const Ae = new P("user-message-question"), uu = (n) => {
|
|
4288
4302
|
const e = Xe(), t = z(null), i = z(135), s = z(!0), r = z(!1), o = F(null), l = te(() => n.message.content), a = te(() => Xn.parseMixedContent(l.value));
|
|
4289
4303
|
L(() => {
|
|
4290
4304
|
t.value = new Nl({
|
|
@@ -4321,25 +4335,25 @@ const Ee = new P("user-message-question"), uu = (n) => {
|
|
|
4321
4335
|
const c = (d) => {
|
|
4322
4336
|
!n.message || !n.controller || n.controller.refreshMessage(n.message, !0);
|
|
4323
4337
|
};
|
|
4324
|
-
return /* @__PURE__ */ p("div", { className:
|
|
4325
|
-
/* @__PURE__ */ p("div", { className:
|
|
4338
|
+
return /* @__PURE__ */ p("div", { className: Ae.b(), children: [
|
|
4339
|
+
/* @__PURE__ */ p("div", { className: Ae.e("user-header"), children: [
|
|
4326
4340
|
n.children,
|
|
4327
|
-
/* @__PURE__ */ p("div", { className:
|
|
4341
|
+
/* @__PURE__ */ p("div", { className: Ae.e("user"), children: "我" })
|
|
4328
4342
|
] }),
|
|
4329
|
-
/* @__PURE__ */ p("div", { className:
|
|
4343
|
+
/* @__PURE__ */ p("div", { className: Ae.e("content"), children: [
|
|
4330
4344
|
n.message.state === 40 && /* @__PURE__ */ p(
|
|
4331
4345
|
"div",
|
|
4332
4346
|
{
|
|
4333
|
-
className:
|
|
4347
|
+
className: Ae.em("content", "warning-container"),
|
|
4334
4348
|
onClick: c,
|
|
4335
|
-
children: /* @__PURE__ */ p("div", { className:
|
|
4349
|
+
children: /* @__PURE__ */ p("div", { className: Ae.em("content", "warning"), children: [
|
|
4336
4350
|
/* @__PURE__ */ p("div", { className: "warning-icon", title: "未发送成功,请重试", children: /* @__PURE__ */ p(Ah, {}) }),
|
|
4337
4351
|
/* @__PURE__ */ p("div", { className: "refresh-icon", title: "未发送成功,请重试", children: /* @__PURE__ */ p(xs, {}) })
|
|
4338
4352
|
] })
|
|
4339
4353
|
}
|
|
4340
4354
|
),
|
|
4341
|
-
/* @__PURE__ */ p("div", { className:
|
|
4342
|
-
a.value.hasResources && /* @__PURE__ */ p("div", { className:
|
|
4355
|
+
/* @__PURE__ */ p("div", { className: Ae.em("content", "body"), children: [
|
|
4356
|
+
a.value.hasResources && /* @__PURE__ */ p("div", { className: Ae.em("content", "material"), children: a.value.resources.map((d) => /* @__PURE__ */ p(
|
|
4343
4357
|
pa,
|
|
4344
4358
|
{
|
|
4345
4359
|
material: d,
|
|
@@ -4352,7 +4366,7 @@ const Ee = new P("user-message-question"), uu = (n) => {
|
|
|
4352
4366
|
/* @__PURE__ */ p(
|
|
4353
4367
|
"div",
|
|
4354
4368
|
{
|
|
4355
|
-
className: "".concat(
|
|
4369
|
+
className: "".concat(Ae.e("text-content"), " ").concat(Ae.is("collapse", s.value)),
|
|
4356
4370
|
id: e,
|
|
4357
4371
|
ref: o,
|
|
4358
4372
|
style: {
|
|
@@ -4363,7 +4377,7 @@ const Ee = new P("user-message-question"), uu = (n) => {
|
|
|
4363
4377
|
/* @__PURE__ */ p(
|
|
4364
4378
|
"div",
|
|
4365
4379
|
{
|
|
4366
|
-
className: "".concat(
|
|
4380
|
+
className: "".concat(Ae.e("collapse-btn"), " ").concat(Ae.is("visible", r.value)),
|
|
4367
4381
|
title: s.value ? "展开" : "收起",
|
|
4368
4382
|
onClick: () => {
|
|
4369
4383
|
s.value = !s.value;
|
|
@@ -4536,13 +4550,13 @@ class yt {
|
|
|
4536
4550
|
* @description 计算聊天步骤
|
|
4537
4551
|
*/
|
|
4538
4552
|
computeChatSteps() {
|
|
4539
|
-
this.chatsteps =
|
|
4553
|
+
this.chatsteps = Ul.parse(this.allcontent);
|
|
4540
4554
|
}
|
|
4541
4555
|
/**
|
|
4542
4556
|
* @description 计算聊天界面操作
|
|
4543
4557
|
*/
|
|
4544
4558
|
computeChatUIActions() {
|
|
4545
|
-
this.chatuiactions =
|
|
4559
|
+
this.chatuiactions = Ud.parse(this.allcontent);
|
|
4546
4560
|
}
|
|
4547
4561
|
}
|
|
4548
4562
|
class Bt {
|
|
@@ -4589,7 +4603,7 @@ class Bt {
|
|
|
4589
4603
|
return this.data.captionComputed || !1;
|
|
4590
4604
|
}
|
|
4591
4605
|
}
|
|
4592
|
-
class
|
|
4606
|
+
class qi {
|
|
4593
4607
|
constructor(e) {
|
|
4594
4608
|
this.material = e;
|
|
4595
4609
|
}
|
|
@@ -4607,8 +4621,8 @@ class Ui {
|
|
|
4607
4621
|
}
|
|
4608
4622
|
}
|
|
4609
4623
|
class so {
|
|
4610
|
-
constructor(e) {
|
|
4611
|
-
this.agent = e;
|
|
4624
|
+
constructor(e, t) {
|
|
4625
|
+
this.agent = e, this.defaultConfig = t;
|
|
4612
4626
|
}
|
|
4613
4627
|
get id() {
|
|
4614
4628
|
return this.agent.id;
|
|
@@ -4635,13 +4649,13 @@ class so {
|
|
|
4635
4649
|
return this.agent.allow_any_knowledge_base;
|
|
4636
4650
|
}
|
|
4637
4651
|
get rerank() {
|
|
4638
|
-
return this.agent.rerank ||
|
|
4652
|
+
return this.agent.rerank || this.defaultConfig.chunkrerank;
|
|
4639
4653
|
}
|
|
4640
4654
|
get maxchunks() {
|
|
4641
|
-
return this.agent.maxchunks ||
|
|
4655
|
+
return this.agent.maxchunks || this.defaultConfig.maxchunks;
|
|
4642
4656
|
}
|
|
4643
4657
|
get chunkthreshold() {
|
|
4644
|
-
return this.agent.chunkthreshold ||
|
|
4658
|
+
return this.agent.chunkthreshold || this.defaultConfig.chunkthreshold;
|
|
4645
4659
|
}
|
|
4646
4660
|
}
|
|
4647
4661
|
class ro {
|
|
@@ -5067,7 +5081,7 @@ class ao {
|
|
|
5067
5081
|
* @date 2023-10-16 16:10:29
|
|
5068
5082
|
* @type {Signal<ChatMessage[]>}
|
|
5069
5083
|
*/
|
|
5070
|
-
E(this, "messages",
|
|
5084
|
+
E(this, "messages", _e([]));
|
|
5071
5085
|
/**
|
|
5072
5086
|
* 素材列表
|
|
5073
5087
|
*
|
|
@@ -5075,7 +5089,7 @@ class ao {
|
|
|
5075
5089
|
* @date 2025-02-27 18:02:46
|
|
5076
5090
|
* @type {Signal<IMaterial[]>}
|
|
5077
5091
|
*/
|
|
5078
|
-
E(this, "materials",
|
|
5092
|
+
E(this, "materials", _e([]));
|
|
5079
5093
|
/**
|
|
5080
5094
|
* 聊天框输入值
|
|
5081
5095
|
*
|
|
@@ -5083,7 +5097,7 @@ class ao {
|
|
|
5083
5097
|
* @date 2023-10-16 15:10:43
|
|
5084
5098
|
* @type {Signal<string>}
|
|
5085
5099
|
*/
|
|
5086
|
-
E(this, "input",
|
|
5100
|
+
E(this, "input", _e(""));
|
|
5087
5101
|
/**
|
|
5088
5102
|
* 是否加载中
|
|
5089
5103
|
*
|
|
@@ -5091,7 +5105,23 @@ class ao {
|
|
|
5091
5105
|
* @date 2025-03-10 18:03:42
|
|
5092
5106
|
* @type {Signal<boolean>}
|
|
5093
5107
|
*/
|
|
5094
|
-
E(this, "isLoading",
|
|
5108
|
+
E(this, "isLoading", _e(!1));
|
|
5109
|
+
/**
|
|
5110
|
+
* 是否启用选择知识库
|
|
5111
|
+
*
|
|
5112
|
+
* @author tony001
|
|
5113
|
+
* @date 2026-02-03 16:38:09
|
|
5114
|
+
* @type {Signal<boolean>}
|
|
5115
|
+
*/
|
|
5116
|
+
E(this, "enableKnowledgeBaseSelect", _e(!1));
|
|
5117
|
+
/**
|
|
5118
|
+
* 是否启用设置召回参数
|
|
5119
|
+
*
|
|
5120
|
+
* @author tony001
|
|
5121
|
+
* @date 2026-02-03 16:39:00
|
|
5122
|
+
* @type {Signal<boolean>}
|
|
5123
|
+
*/
|
|
5124
|
+
E(this, "enableRecallConfigSetting", _e(!1));
|
|
5095
5125
|
/**
|
|
5096
5126
|
* 是否允许切换AI代理
|
|
5097
5127
|
*/
|
|
@@ -5107,7 +5137,7 @@ class ao {
|
|
|
5107
5137
|
*
|
|
5108
5138
|
* @type {Signal<AIAgent[]>}
|
|
5109
5139
|
*/
|
|
5110
|
-
E(this, "agentList",
|
|
5140
|
+
E(this, "agentList", _e([]));
|
|
5111
5141
|
/**
|
|
5112
5142
|
* 视图参数
|
|
5113
5143
|
*
|
|
@@ -5173,20 +5203,20 @@ class ao {
|
|
|
5173
5203
|
/**
|
|
5174
5204
|
* 选中知识库
|
|
5175
5205
|
*/
|
|
5176
|
-
E(this, "selectionKnowledgeBases",
|
|
5206
|
+
E(this, "selectionKnowledgeBases", _e([]));
|
|
5177
5207
|
/**
|
|
5178
5208
|
* 当前可选知识库
|
|
5179
5209
|
*/
|
|
5180
|
-
E(this, "knowledgeBases",
|
|
5210
|
+
E(this, "knowledgeBases", _e([]));
|
|
5181
5211
|
/**
|
|
5182
|
-
*
|
|
5212
|
+
* 智能体召回配置
|
|
5183
5213
|
*/
|
|
5184
|
-
E(this, "
|
|
5185
|
-
|
|
5214
|
+
E(this, "reCallConfig", _e({
|
|
5215
|
+
chunkrerank: 2,
|
|
5186
5216
|
maxchunks: 10,
|
|
5187
5217
|
chunkthreshold: 0.4
|
|
5188
5218
|
}));
|
|
5189
|
-
this.opts = e, this.resourceOptions = t, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.aiTopic = e.aiTopic, this.topicId = e.topicId, this.topic = e.topic, this.activeAIAgentID = e.activeAIAgentID, this.enableAIAgentChange = !!e.enableAIAgentChange, this.chatMode = e.srfMode, this.chatSessionid = e.sessionid, this.initAIChat();
|
|
5219
|
+
this.opts = e, this.resourceOptions = t, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.aiTopic = e.aiTopic, this.topicId = e.topicId, this.topic = e.topic, this.activeAIAgentID = e.activeAIAgentID, this.enableAIAgentChange = !!e.enableAIAgentChange, this.chatMode = e.srfMode, this.chatSessionid = e.sessionid, this.enableKnowledgeBaseSelect.value = !!e.enableKnowledgeBaseSelect, this.enableRecallConfigSetting.value = !!e.enableRecallConfigSetting, this.initAIChat();
|
|
5190
5220
|
}
|
|
5191
5221
|
/**
|
|
5192
5222
|
* AI资源模式
|
|
@@ -5238,12 +5268,20 @@ class ao {
|
|
|
5238
5268
|
* 初始化AI代理列表
|
|
5239
5269
|
*/
|
|
5240
5270
|
async initAIChatAgent() {
|
|
5241
|
-
this.opts.aiAgentlist && this.opts.aiAgentlist.length > 0 && this.opts.aiAgentlist.forEach((t) => {
|
|
5242
|
-
this.agentList.value = [
|
|
5243
|
-
|
|
5271
|
+
if (this.opts.aiAgentlist && this.opts.aiAgentlist.length > 0 && this.opts.aiAgentlist.forEach((t) => {
|
|
5272
|
+
this.agentList.value = [
|
|
5273
|
+
...this.agentList.value,
|
|
5274
|
+
new so(t, {
|
|
5275
|
+
chunkrerank: this.opts.reRankDefaultValue,
|
|
5276
|
+
maxchunks: this.opts.maxChunksDefaultValue,
|
|
5277
|
+
chunkthreshold: this.opts.chunkThresholdDefaultValue
|
|
5278
|
+
})
|
|
5279
|
+
];
|
|
5280
|
+
}), !this.enableRecallConfigSetting.value)
|
|
5281
|
+
return;
|
|
5244
5282
|
const e = this.agentList.value.find((t) => t.id === this.activeAIAgentID);
|
|
5245
|
-
e && (this.
|
|
5246
|
-
|
|
5283
|
+
e && (this.reCallConfig.value = {
|
|
5284
|
+
chunkrerank: e.rerank,
|
|
5247
5285
|
maxchunks: e.maxchunks,
|
|
5248
5286
|
chunkthreshold: e.chunkthreshold
|
|
5249
5287
|
});
|
|
@@ -5253,15 +5291,17 @@ class ao {
|
|
|
5253
5291
|
*/
|
|
5254
5292
|
async initAIChatKnowledge() {
|
|
5255
5293
|
var e;
|
|
5256
|
-
(e = this.opts.aiknowledgeBasesList) != null && e.length && (this.knowledgeBasesList = this.opts.aiknowledgeBasesList.map(
|
|
5294
|
+
this.enableKnowledgeBaseSelect.value && ((e = this.opts.aiknowledgeBasesList) != null && e.length && (this.knowledgeBasesList = this.opts.aiknowledgeBasesList.map(
|
|
5257
5295
|
(t) => new ro(t)
|
|
5258
|
-
)), this.
|
|
5296
|
+
)), this.computeSelectedKnowledge());
|
|
5259
5297
|
}
|
|
5260
5298
|
/**
|
|
5261
|
-
*
|
|
5299
|
+
* 计算选中知识库
|
|
5262
5300
|
*/
|
|
5263
|
-
|
|
5301
|
+
computeSelectedKnowledge() {
|
|
5264
5302
|
var t, i;
|
|
5303
|
+
if (!this.enableKnowledgeBaseSelect.value)
|
|
5304
|
+
return;
|
|
5265
5305
|
const e = this.agentList.value.find((s) => s.id === this.activeAIAgentID);
|
|
5266
5306
|
this.knowledgeBases.value = !e || e.allow_any_knowledge_base ? [...this.knowledgeBasesList] : ((t = e.knowledge_bases) == null ? void 0 : t.map(
|
|
5267
5307
|
(s) => new ro({
|
|
@@ -5281,6 +5321,22 @@ class ao {
|
|
|
5281
5321
|
getHistoryStoreKey(e) {
|
|
5282
5322
|
return "".concat(e);
|
|
5283
5323
|
}
|
|
5324
|
+
/**
|
|
5325
|
+
* 获取查询知识库数据ID字符集
|
|
5326
|
+
*
|
|
5327
|
+
* @returns string | undefined
|
|
5328
|
+
*/
|
|
5329
|
+
getQueryKnowledgeBases() {
|
|
5330
|
+
return this.enableKnowledgeBaseSelect.value ? this.selectionKnowledgeBases.value.join(",") : void 0;
|
|
5331
|
+
}
|
|
5332
|
+
/**
|
|
5333
|
+
* 获取召回配置参数
|
|
5334
|
+
*
|
|
5335
|
+
* @returns IAIAgentConfig | undefined
|
|
5336
|
+
*/
|
|
5337
|
+
getQueryRecallConfig() {
|
|
5338
|
+
return this.enableRecallConfigSetting.value ? this.reCallConfig.value : void 0;
|
|
5339
|
+
}
|
|
5284
5340
|
/**
|
|
5285
5341
|
* 获取历史记录
|
|
5286
5342
|
*
|
|
@@ -5380,8 +5436,8 @@ class ao {
|
|
|
5380
5436
|
this.chatSessionid,
|
|
5381
5437
|
this.activeAIAgentID,
|
|
5382
5438
|
this.chatMode,
|
|
5383
|
-
this.
|
|
5384
|
-
this.
|
|
5439
|
+
this.getQueryKnowledgeBases(),
|
|
5440
|
+
this.getQueryRecallConfig()
|
|
5385
5441
|
), this.opts.action && await this.opts.action("question", t.content);
|
|
5386
5442
|
} finally {
|
|
5387
5443
|
this.isLoading.value = !1;
|
|
@@ -5481,7 +5537,7 @@ class ao {
|
|
|
5481
5537
|
""
|
|
5482
5538
|
));
|
|
5483
5539
|
const d = l.indexOf("<chatstep>"), h = l.indexOf("</chatstep>");
|
|
5484
|
-
d !== -1 && h !== -1 && d < h && (i =
|
|
5540
|
+
d !== -1 && h !== -1 && d < h && (i = Ul.parse(e.content), e.content = l.replace(new RegExp("\\<chatstep\\>[^]*?\\<\\/chatstep\\>", "gs"), ""));
|
|
5485
5541
|
}
|
|
5486
5542
|
const s = { ...e }, r = this.messages.value.findIndex(
|
|
5487
5543
|
(l) => l.messageid === e.messageid
|
|
@@ -5577,8 +5633,8 @@ class ao {
|
|
|
5577
5633
|
this.chatSessionid,
|
|
5578
5634
|
this.activeAIAgentID,
|
|
5579
5635
|
this.chatMode,
|
|
5580
|
-
this.
|
|
5581
|
-
this.
|
|
5636
|
+
this.getQueryKnowledgeBases(),
|
|
5637
|
+
this.getQueryRecallConfig()
|
|
5582
5638
|
), await this.updateTopicCaption(), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
5583
5639
|
} finally {
|
|
5584
5640
|
this.isLoading.value = !1;
|
|
@@ -5653,8 +5709,8 @@ class ao {
|
|
|
5653
5709
|
this.chatSessionid,
|
|
5654
5710
|
this.activeAIAgentID,
|
|
5655
5711
|
this.chatMode,
|
|
5656
|
-
this.
|
|
5657
|
-
this.
|
|
5712
|
+
this.getQueryKnowledgeBases(),
|
|
5713
|
+
this.getQueryRecallConfig()
|
|
5658
5714
|
);
|
|
5659
5715
|
} else if (i === this.messages.value.length - 1)
|
|
5660
5716
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(
|
|
@@ -5666,8 +5722,8 @@ class ao {
|
|
|
5666
5722
|
this.chatSessionid,
|
|
5667
5723
|
this.activeAIAgentID,
|
|
5668
5724
|
this.chatMode,
|
|
5669
|
-
this.
|
|
5670
|
-
this.
|
|
5725
|
+
this.getQueryKnowledgeBases(),
|
|
5726
|
+
this.getQueryRecallConfig()
|
|
5671
5727
|
);
|
|
5672
5728
|
else {
|
|
5673
5729
|
const s = this.messages.value[i - 1].content;
|
|
@@ -5735,7 +5791,7 @@ class ao {
|
|
|
5735
5791
|
* @param {IMaterial} data
|
|
5736
5792
|
*/
|
|
5737
5793
|
addMaterial(e) {
|
|
5738
|
-
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new
|
|
5794
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new qi(e)];
|
|
5739
5795
|
}
|
|
5740
5796
|
/**
|
|
5741
5797
|
* 替换素材资源
|
|
@@ -5747,7 +5803,7 @@ class ao {
|
|
|
5747
5803
|
*/
|
|
5748
5804
|
replaceMaterial(e, t) {
|
|
5749
5805
|
const i = this.materials.value.findIndex((s) => s.id === e);
|
|
5750
|
-
i !== -1 ? (this.materials.value[i] = new
|
|
5806
|
+
i !== -1 ? (this.materials.value[i] = new qi(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new qi(t)];
|
|
5751
5807
|
}
|
|
5752
5808
|
/**
|
|
5753
5809
|
* 删除指定素材资源
|
|
@@ -5918,24 +5974,28 @@ class ao {
|
|
|
5918
5974
|
* @param agentID
|
|
5919
5975
|
*/
|
|
5920
5976
|
async setActiveAIAgentID(e) {
|
|
5921
|
-
if (this.activeAIAgentID
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5977
|
+
if (this.activeAIAgentID !== e) {
|
|
5978
|
+
if (this.activeAIAgentID = e, this.topicId && this.aiTopic && this.aiTopic.updateTopicChatByID(this.topicId, {
|
|
5979
|
+
activeAIAgentID: e
|
|
5980
|
+
}), this.enableRecallConfigSetting.value) {
|
|
5981
|
+
const t = this.agentList.value.find(
|
|
5982
|
+
(i) => i.id === this.activeAIAgentID
|
|
5983
|
+
);
|
|
5984
|
+
t && (this.reCallConfig.value = {
|
|
5985
|
+
chunkrerank: t.rerank,
|
|
5986
|
+
maxchunks: t.maxchunks,
|
|
5987
|
+
chunkthreshold: t.chunkthreshold
|
|
5988
|
+
});
|
|
5989
|
+
}
|
|
5990
|
+
this.enableKnowledgeBaseSelect.value && this.computeSelectedKnowledge();
|
|
5991
|
+
}
|
|
5932
5992
|
}
|
|
5933
5993
|
/**
|
|
5934
5994
|
* 设置智能体配置
|
|
5935
5995
|
* @param config
|
|
5936
5996
|
*/
|
|
5937
5997
|
setAIAgentConfig(e) {
|
|
5938
|
-
this.
|
|
5998
|
+
this.reCallConfig.value = { ...this.reCallConfig.value, ...e };
|
|
5939
5999
|
}
|
|
5940
6000
|
/**
|
|
5941
6001
|
* 搜索AI智能体
|
|
@@ -5944,7 +6004,13 @@ class ao {
|
|
|
5944
6004
|
*/
|
|
5945
6005
|
async searchAIAgent(e) {
|
|
5946
6006
|
let t = [];
|
|
5947
|
-
return this.opts.fetchAgentList ? t = (await this.opts.fetchAgentList(e) || []).map(
|
|
6007
|
+
return this.opts.fetchAgentList ? t = (await this.opts.fetchAgentList(e) || []).map(
|
|
6008
|
+
(s) => new so(s, {
|
|
6009
|
+
chunkrerank: this.opts.reRankDefaultValue,
|
|
6010
|
+
maxchunks: this.opts.maxChunksDefaultValue,
|
|
6011
|
+
chunkthreshold: this.opts.chunkThresholdDefaultValue
|
|
6012
|
+
})
|
|
6013
|
+
) : t = this.agentList.value, t;
|
|
5948
6014
|
}
|
|
5949
6015
|
/**
|
|
5950
6016
|
* 设置选中知识库
|
|
@@ -6055,7 +6121,7 @@ class Mu {
|
|
|
6055
6121
|
* @date 2025-02-20 16:02:38
|
|
6056
6122
|
* @type {Signal<ChatTopic[]>}
|
|
6057
6123
|
*/
|
|
6058
|
-
E(this, "topics",
|
|
6124
|
+
E(this, "topics", _e([]));
|
|
6059
6125
|
/**
|
|
6060
6126
|
* 激活话题
|
|
6061
6127
|
*
|
|
@@ -6063,7 +6129,7 @@ class Mu {
|
|
|
6063
6129
|
* @date 2025-02-24 16:02:44
|
|
6064
6130
|
* @type {(Signal<ITopic | undefined>)}
|
|
6065
6131
|
*/
|
|
6066
|
-
E(this, "activedTopic",
|
|
6132
|
+
E(this, "activedTopic", _e(void 0));
|
|
6067
6133
|
/**
|
|
6068
6134
|
* 当前话题配置备份
|
|
6069
6135
|
*
|
|
@@ -6721,7 +6787,7 @@ class Nu {
|
|
|
6721
6787
|
this.container
|
|
6722
6788
|
);
|
|
6723
6789
|
let s;
|
|
6724
|
-
!i.aiAgentlist && i.fetchAgentList && (i.aiAgentlist = await i.fetchAgentList()), !i.aiknowledgeBasesList && i.fetchKnowledgeBaseList &&
|
|
6790
|
+
!i.aiAgentlist && i.fetchAgentList && (i.aiAgentlist = await i.fetchAgentList()), !i.aiknowledgeBasesList && i.fetchKnowledgeBaseList && i.enableKnowledgeBaseSelect ? i.aiknowledgeBasesList = await i.fetchKnowledgeBaseList() : i.aiknowledgeBasesList = [], e.mode && e.mode === "TOPIC" ? (this.aiTopic.injectResourceOptions(e.resourceOptions), await this.aiTopic.fetchHistory(e.topicOptions), s = e.topicOptions, Object.assign(s, {
|
|
6725
6791
|
aiChat: {
|
|
6726
6792
|
caption: i.caption,
|
|
6727
6793
|
context: i.context,
|
|
@@ -8838,7 +8904,7 @@ function Aa(n, e) {
|
|
|
8838
8904
|
let t = /* @__PURE__ */ Object.create(null);
|
|
8839
8905
|
if (e)
|
|
8840
8906
|
for (let i in e)
|
|
8841
|
-
t[i] = new
|
|
8907
|
+
t[i] = new qu(n, i, e[i]);
|
|
8842
8908
|
return t;
|
|
8843
8909
|
}
|
|
8844
8910
|
let po = class Oa {
|
|
@@ -9020,7 +9086,7 @@ let po = class Oa {
|
|
|
9020
9086
|
return i;
|
|
9021
9087
|
}
|
|
9022
9088
|
};
|
|
9023
|
-
function
|
|
9089
|
+
function Uu(n, e, t) {
|
|
9024
9090
|
let i = t.split("|");
|
|
9025
9091
|
return (s) => {
|
|
9026
9092
|
let r = s === null ? "null" : typeof s;
|
|
@@ -9028,9 +9094,9 @@ function qu(n, e, t) {
|
|
|
9028
9094
|
throw new RangeError("Expected value of type ".concat(i, " for attribute ").concat(e, " on type ").concat(n, ", got ").concat(r));
|
|
9029
9095
|
};
|
|
9030
9096
|
}
|
|
9031
|
-
class
|
|
9097
|
+
class qu {
|
|
9032
9098
|
constructor(e, t, i) {
|
|
9033
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(i, "default"), this.default = i.default, this.validate = typeof i.validate == "string" ?
|
|
9099
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(i, "default"), this.default = i.default, this.validate = typeof i.validate == "string" ? Uu(e, t, i.validate) : i.validate;
|
|
9034
9100
|
}
|
|
9035
9101
|
get isRequired() {
|
|
9036
9102
|
return !this.hasDefault;
|
|
@@ -9912,15 +9978,15 @@ class Es {
|
|
|
9912
9978
|
return (this.delInfo & Qn) > 0;
|
|
9913
9979
|
}
|
|
9914
9980
|
}
|
|
9915
|
-
class
|
|
9981
|
+
class Ee {
|
|
9916
9982
|
/**
|
|
9917
9983
|
Create a position map. The modifications to the document are
|
|
9918
9984
|
represented as an array of numbers, in which each group of three
|
|
9919
9985
|
represents a modified chunk as `[start, oldSize, newSize]`.
|
|
9920
9986
|
*/
|
|
9921
9987
|
constructor(e, t = !1) {
|
|
9922
|
-
if (this.ranges = e, this.inverted = t, !e.length &&
|
|
9923
|
-
return
|
|
9988
|
+
if (this.ranges = e, this.inverted = t, !e.length && Ee.empty)
|
|
9989
|
+
return Ee.empty;
|
|
9924
9990
|
}
|
|
9925
9991
|
/**
|
|
9926
9992
|
@internal
|
|
@@ -9991,7 +10057,7 @@ class Ne {
|
|
|
9991
10057
|
map positions in the post-step document to the pre-step document.
|
|
9992
10058
|
*/
|
|
9993
10059
|
invert() {
|
|
9994
|
-
return new
|
|
10060
|
+
return new Ee(this.ranges, !this.inverted);
|
|
9995
10061
|
}
|
|
9996
10062
|
/**
|
|
9997
10063
|
@internal
|
|
@@ -10005,10 +10071,10 @@ class Ne {
|
|
|
10005
10071
|
sub-document to a larger document, or vice-versa.
|
|
10006
10072
|
*/
|
|
10007
10073
|
static offset(e) {
|
|
10008
|
-
return e == 0 ?
|
|
10074
|
+
return e == 0 ? Ee.empty : new Ee(e < 0 ? [0, -e, 0] : [0, 0, e]);
|
|
10009
10075
|
}
|
|
10010
10076
|
}
|
|
10011
|
-
|
|
10077
|
+
Ee.empty = new Ee([]);
|
|
10012
10078
|
class kn {
|
|
10013
10079
|
/**
|
|
10014
10080
|
Create a new mapping with the given position maps.
|
|
@@ -10124,7 +10190,7 @@ class ve {
|
|
|
10124
10190
|
and the new document.
|
|
10125
10191
|
*/
|
|
10126
10192
|
getMap() {
|
|
10127
|
-
return
|
|
10193
|
+
return Ee.empty;
|
|
10128
10194
|
}
|
|
10129
10195
|
/**
|
|
10130
10196
|
Try to merge this step with another one, to be applied directly
|
|
@@ -10374,7 +10440,7 @@ class se extends ve {
|
|
|
10374
10440
|
return this.structure && As(e, this.from, this.to) ? Q.fail("Structure replace would overwrite content") : Q.fromReplace(e, this.from, this.to, this.slice);
|
|
10375
10441
|
}
|
|
10376
10442
|
getMap() {
|
|
10377
|
-
return new
|
|
10443
|
+
return new Ee([this.from, this.to - this.from, this.slice.size]);
|
|
10378
10444
|
}
|
|
10379
10445
|
invert(e) {
|
|
10380
10446
|
return new se(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
@@ -10429,7 +10495,7 @@ class oe extends ve {
|
|
|
10429
10495
|
return i ? Q.fromReplace(e, this.from, this.to, i) : Q.fail("Content does not fit in gap");
|
|
10430
10496
|
}
|
|
10431
10497
|
getMap() {
|
|
10432
|
-
return new
|
|
10498
|
+
return new Ee([
|
|
10433
10499
|
this.from,
|
|
10434
10500
|
this.gapFrom - this.from,
|
|
10435
10501
|
this.insert,
|
|
@@ -10779,9 +10845,9 @@ function _i(n, e, t = e, i = _.empty) {
|
|
|
10779
10845
|
if (e == t && !i.size)
|
|
10780
10846
|
return null;
|
|
10781
10847
|
let s = n.resolve(e), r = n.resolve(t);
|
|
10782
|
-
return
|
|
10848
|
+
return Ua(s, r, i) ? new se(e, t, i) : new yf(s, r, i).fit();
|
|
10783
10849
|
}
|
|
10784
|
-
function
|
|
10850
|
+
function Ua(n, e, t) {
|
|
10785
10851
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
10786
10852
|
}
|
|
10787
10853
|
class yf {
|
|
@@ -10875,7 +10941,7 @@ class yf {
|
|
|
10875
10941
|
let g = l.child(c), y = h.matchType(g.type);
|
|
10876
10942
|
if (!y)
|
|
10877
10943
|
break;
|
|
10878
|
-
c++, (c > 1 || a == 0 || g.content.size) && (h = y, d.push(
|
|
10944
|
+
c++, (c > 1 || a == 0 || g.content.size) && (h = y, d.push(qa(g.mark(u.allowedMarks(g.marks)), c == 1 ? a : 0, c == l.childCount ? f : -1)));
|
|
10879
10945
|
}
|
|
10880
10946
|
let m = c == l.childCount;
|
|
10881
10947
|
m || (f = -1), this.placed = hn(this.placed, t, x.from(d)), this.frontier[t].match = h, m && f < 0 && i && i.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
@@ -10943,11 +11009,11 @@ function Yi(n, e) {
|
|
|
10943
11009
|
n = n.firstChild.content;
|
|
10944
11010
|
return n;
|
|
10945
11011
|
}
|
|
10946
|
-
function
|
|
11012
|
+
function qa(n, e, t) {
|
|
10947
11013
|
if (e <= 0)
|
|
10948
11014
|
return n;
|
|
10949
11015
|
let i = n.content;
|
|
10950
|
-
return e > 1 && (i = i.replaceChild(0,
|
|
11016
|
+
return e > 1 && (i = i.replaceChild(0, qa(i.firstChild, e - 1, i.childCount == 1 ? t - 1 : 0))), e > 0 && (i = n.type.contentMatch.fillBefore(i).append(i), t <= 0 && (i = i.append(n.type.contentMatch.matchFragment(i).fillBefore(x.empty, !0)))), n.copy(i);
|
|
10951
11017
|
}
|
|
10952
11018
|
function Gi(n, e, t, i, s) {
|
|
10953
11019
|
let r = n.node(e), o = s ? n.indexAfter(e) : n.index(e);
|
|
@@ -10969,7 +11035,7 @@ function bf(n, e, t, i) {
|
|
|
10969
11035
|
if (!i.size)
|
|
10970
11036
|
return n.deleteRange(e, t);
|
|
10971
11037
|
let s = n.doc.resolve(e), r = n.doc.resolve(t);
|
|
10972
|
-
if (
|
|
11038
|
+
if (Ua(s, r, i))
|
|
10973
11039
|
return n.step(new se(e, t, i));
|
|
10974
11040
|
let o = Ja(s, r);
|
|
10975
11041
|
o[o.length - 1] == 0 && o.pop();
|
|
@@ -11073,7 +11139,7 @@ class Yt extends ve {
|
|
|
11073
11139
|
return Q.fromReplace(e, this.pos, this.pos + 1, new _(x.from(s), 0, t.isLeaf ? 0 : 1));
|
|
11074
11140
|
}
|
|
11075
11141
|
getMap() {
|
|
11076
|
-
return
|
|
11142
|
+
return Ee.empty;
|
|
11077
11143
|
}
|
|
11078
11144
|
invert(e) {
|
|
11079
11145
|
return new Yt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
@@ -11108,7 +11174,7 @@ class Sn extends ve {
|
|
|
11108
11174
|
return Q.ok(i);
|
|
11109
11175
|
}
|
|
11110
11176
|
getMap() {
|
|
11111
|
-
return
|
|
11177
|
+
return Ee.empty;
|
|
11112
11178
|
}
|
|
11113
11179
|
invert(e) {
|
|
11114
11180
|
return new Sn(this.attr, e.attrs[this.attr]);
|
|
@@ -12451,7 +12517,7 @@ function ic(n) {
|
|
|
12451
12517
|
};
|
|
12452
12518
|
}
|
|
12453
12519
|
const Wf = ic(-1), jf = ic(1);
|
|
12454
|
-
function
|
|
12520
|
+
function Uf(n, e = null) {
|
|
12455
12521
|
return function(t, i) {
|
|
12456
12522
|
let { $from: s, $to: r } = t.selection, o = s.blockRange(r), l = o && Fa(o, n, e);
|
|
12457
12523
|
return l ? (i && i(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
@@ -12488,7 +12554,7 @@ function Ao(n, e = null) {
|
|
|
12488
12554
|
};
|
|
12489
12555
|
}
|
|
12490
12556
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
12491
|
-
function
|
|
12557
|
+
function qf(n, e = null) {
|
|
12492
12558
|
return function(t, i) {
|
|
12493
12559
|
let { $from: s, $to: r } = t.selection, o = s.blockRange(r);
|
|
12494
12560
|
if (!o)
|
|
@@ -12681,9 +12747,9 @@ function rp(n, e, t) {
|
|
|
12681
12747
|
return { node: i.startContainer, offset: Math.min(Ie(i.startContainer), i.startOffset) };
|
|
12682
12748
|
}
|
|
12683
12749
|
}
|
|
12684
|
-
const je = typeof navigator < "u" ? navigator : null, Io = typeof document < "u" ? document : null, pt = je && je.userAgent || "", Is = /Edge\/(\d+)/.exec(pt), sc = /MSIE \d/.exec(pt), Ds = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pt),
|
|
12750
|
+
const je = typeof navigator < "u" ? navigator : null, Io = typeof document < "u" ? document : null, pt = je && je.userAgent || "", Is = /Edge\/(\d+)/.exec(pt), sc = /MSIE \d/.exec(pt), Ds = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pt), Te = !!(sc || Ds || Is), dt = sc ? document.documentMode : Ds ? +Ds[1] : Is ? +Is[1] : 0, Re = !Te && /gecko\/(\d+)/i.test(pt);
|
|
12685
12751
|
Re && +(/Firefox\/(\d+)/.exec(pt) || [0, 0])[1];
|
|
12686
|
-
const Rs = !
|
|
12752
|
+
const Rs = !Te && /Chrome\/(\d+)/.exec(pt), re = !!Rs, rc = Rs ? +Rs[1] : 0, ye = !Te && !!je && /Apple Computer/.test(je.vendor), sn = ye && (/Mobile\/\w+/.test(pt) || !!je && je.maxTouchPoints > 2), Oe = sn || (je ? /Mac/.test(je.platform) : !1), oc = je ? /Win/.test(je.platform) : !1, Ge = /Android \d/.test(pt), Dn = !!Io && "webkitFontSmoothing" in Io.documentElement.style, op = Dn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
12687
12753
|
function lp(n) {
|
|
12688
12754
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
12689
12755
|
return e ? {
|
|
@@ -13020,7 +13086,7 @@ let $o = null, Po = null, zo = !1;
|
|
|
13020
13086
|
function Cp(n, e, t) {
|
|
13021
13087
|
return $o == e && Po == t ? zo : ($o = e, Po = t, zo = t == "up" || t == "down" ? vp(n, e, t) : bp(n, e, t));
|
|
13022
13088
|
}
|
|
13023
|
-
const $e = 0, Lo = 1, Ct = 2,
|
|
13089
|
+
const $e = 0, Lo = 1, Ct = 2, Ue = 3;
|
|
13024
13090
|
class Rn {
|
|
13025
13091
|
constructor(e, t, i, s) {
|
|
13026
13092
|
this.parent = e, this.children = t, this.dom = i, this.contentDOM = s, this.dirty = $e, i.pmViewDesc = this;
|
|
@@ -13335,10 +13401,10 @@ class Rn {
|
|
|
13335
13401
|
if (i == o ? e <= o && t >= i : e < o && t > i) {
|
|
13336
13402
|
let l = i + r.border, a = o - r.border;
|
|
13337
13403
|
if (e >= l && t <= a) {
|
|
13338
|
-
this.dirty = e == i || t == o ? Ct : Lo, e == l && t == a && (r.contentLost || r.dom.parentNode != this.contentDOM) ? r.dirty =
|
|
13404
|
+
this.dirty = e == i || t == o ? Ct : Lo, e == l && t == a && (r.contentLost || r.dom.parentNode != this.contentDOM) ? r.dirty = Ue : r.markDirty(e - l, t - l);
|
|
13339
13405
|
return;
|
|
13340
13406
|
} else
|
|
13341
|
-
r.dirty = r.dom == r.contentDOM && r.dom.parentNode == this.contentDOM && !r.children.length ? Ct :
|
|
13407
|
+
r.dirty = r.dom == r.contentDOM && r.dom.parentNode == this.contentDOM && !r.children.length ? Ct : Ue;
|
|
13342
13408
|
}
|
|
13343
13409
|
i = o;
|
|
13344
13410
|
}
|
|
@@ -13433,10 +13499,10 @@ class Dt extends Rn {
|
|
|
13433
13499
|
return (!o || !o.dom) && (o = $t.renderSpec(document, t.type.spec.toDOM(t, i), null, t.attrs)), new Dt(e, t, o.dom, o.contentDOM || o.dom, o);
|
|
13434
13500
|
}
|
|
13435
13501
|
parseRule() {
|
|
13436
|
-
return this.dirty &
|
|
13502
|
+
return this.dirty & Ue || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
13437
13503
|
}
|
|
13438
13504
|
matchesMark(e) {
|
|
13439
|
-
return this.dirty !=
|
|
13505
|
+
return this.dirty != Ue && this.mark.eq(e);
|
|
13440
13506
|
}
|
|
13441
13507
|
markDirty(e, t) {
|
|
13442
13508
|
if (super.markDirty(e, t), this.dirty != $e) {
|
|
@@ -13564,7 +13630,7 @@ class ht extends Rn {
|
|
|
13564
13630
|
// If this desc must be updated to match the given node decoration,
|
|
13565
13631
|
// do so and return true.
|
|
13566
13632
|
update(e, t, i, s) {
|
|
13567
|
-
return this.dirty ==
|
|
13633
|
+
return this.dirty == Ue || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, i, s), !0);
|
|
13568
13634
|
}
|
|
13569
13635
|
updateInner(e, t, i, s) {
|
|
13570
13636
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(s, this.posAtStart), this.dirty = $e;
|
|
@@ -13603,7 +13669,7 @@ class Ei extends ht {
|
|
|
13603
13669
|
return { skip: e || !0 };
|
|
13604
13670
|
}
|
|
13605
13671
|
update(e, t, i, s) {
|
|
13606
|
-
return this.dirty ==
|
|
13672
|
+
return this.dirty == Ue || this.dirty != $e && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != $e || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, s.trackWrites == this.nodeDOM && (s.trackWrites = null)), this.node = e, this.dirty = $e, !0);
|
|
13607
13673
|
}
|
|
13608
13674
|
inParent() {
|
|
13609
13675
|
let e = this.parent.contentDOM;
|
|
@@ -13626,7 +13692,7 @@ class Ei extends ht {
|
|
|
13626
13692
|
return new Ei(this.parent, s, this.outerDeco, this.innerDeco, r, r, i);
|
|
13627
13693
|
}
|
|
13628
13694
|
markDirty(e, t) {
|
|
13629
|
-
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty =
|
|
13695
|
+
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = Ue);
|
|
13630
13696
|
}
|
|
13631
13697
|
get domAtom() {
|
|
13632
13698
|
return !1;
|
|
@@ -13657,7 +13723,7 @@ class kp extends ht {
|
|
|
13657
13723
|
// through. If it does, and there's a `contentDOM` node, our logic
|
|
13658
13724
|
// updates the children.
|
|
13659
13725
|
update(e, t, i, s) {
|
|
13660
|
-
if (this.dirty ==
|
|
13726
|
+
if (this.dirty == Ue)
|
|
13661
13727
|
return !1;
|
|
13662
13728
|
if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
|
|
13663
13729
|
let r = this.spec.update(e, t, i);
|
|
@@ -13837,7 +13903,7 @@ class Mp {
|
|
|
13837
13903
|
}
|
|
13838
13904
|
updateNodeAt(e, t, i, s, r) {
|
|
13839
13905
|
let o = this.top.children[s];
|
|
13840
|
-
return o.dirty ==
|
|
13906
|
+
return o.dirty == Ue && o.dom == o.contentDOM && (o.dirty = Ct), o.update(e, t, i, r) ? (this.destroyBetween(this.index, s), this.index++, !0) : !1;
|
|
13841
13907
|
}
|
|
13842
13908
|
findIndexWithChild(e) {
|
|
13843
13909
|
for (; ; ) {
|
|
@@ -13865,7 +13931,7 @@ class Mp {
|
|
|
13865
13931
|
let c = this.preMatch.matched.get(a);
|
|
13866
13932
|
if (c != null && c != r)
|
|
13867
13933
|
return !1;
|
|
13868
|
-
let d = a.dom, h, u = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty !=
|
|
13934
|
+
let d = a.dom, h, u = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Ue && ui(t, a.outerDeco));
|
|
13869
13935
|
if (!u && a.update(e, t, i, s))
|
|
13870
13936
|
return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
|
|
13871
13937
|
if (!u && (h = this.recreateWrapper(a, e, t, i, s, o)))
|
|
@@ -14135,7 +14201,7 @@ function Ip(n) {
|
|
|
14135
14201
|
if (!e)
|
|
14136
14202
|
return;
|
|
14137
14203
|
let t = n.cursorWrapper.dom, i = t.nodeName == "IMG";
|
|
14138
|
-
i ? e.collapse(t.parentNode, he(t) + 1) : e.collapse(t, 0), !i && !n.state.selection.visible &&
|
|
14204
|
+
i ? e.collapse(t.parentNode, he(t) + 1) : e.collapse(t, 0), !i && !n.state.selection.visible && Te && dt <= 11 && (t.disabled = !0, t.disabled = !1);
|
|
14139
14205
|
}
|
|
14140
14206
|
function wc(n, e) {
|
|
14141
14207
|
if (e instanceof I) {
|
|
@@ -14150,7 +14216,7 @@ function jo(n) {
|
|
|
14150
14216
|
function cr(n, e, t, i) {
|
|
14151
14217
|
return n.someProp("createSelectionBetween", (s) => s(n, e, t)) || R.between(e, t, i);
|
|
14152
14218
|
}
|
|
14153
|
-
function
|
|
14219
|
+
function Uo(n) {
|
|
14154
14220
|
return n.editable && !n.hasFocus() ? !1 : bc(n);
|
|
14155
14221
|
}
|
|
14156
14222
|
function bc(n) {
|
|
@@ -14174,7 +14240,7 @@ function zs(n, e) {
|
|
|
14174
14240
|
function it(n, e) {
|
|
14175
14241
|
return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
14176
14242
|
}
|
|
14177
|
-
function
|
|
14243
|
+
function qo(n, e, t) {
|
|
14178
14244
|
let i = n.state.selection;
|
|
14179
14245
|
if (i instanceof R)
|
|
14180
14246
|
if (t.indexOf("s") > -1) {
|
|
@@ -14407,10 +14473,10 @@ function Fp(n, e) {
|
|
|
14407
14473
|
return !0;
|
|
14408
14474
|
if (t == 37 || Oe && t == 66 && i == "c") {
|
|
14409
14475
|
let s = t == 37 ? Ko(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
14410
|
-
return
|
|
14476
|
+
return qo(n, s, i) || Vt(n, s);
|
|
14411
14477
|
} else if (t == 39 || Oe && t == 70 && i == "c") {
|
|
14412
14478
|
let s = t == 39 ? Ko(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
14413
|
-
return
|
|
14479
|
+
return qo(n, s, i) || Vt(n, s);
|
|
14414
14480
|
} else {
|
|
14415
14481
|
if (t == 38 || Oe && t == 80 && i == "c")
|
|
14416
14482
|
return Jo(n, -1, i) || Vt(n, -1);
|
|
@@ -14472,7 +14538,7 @@ function xc(n, e, t, i, s) {
|
|
|
14472
14538
|
} else
|
|
14473
14539
|
n.someProp("transformPastedHTML", (h) => {
|
|
14474
14540
|
t = h(t, n);
|
|
14475
|
-
}), o = jp(t), Dn &&
|
|
14541
|
+
}), o = jp(t), Dn && Up(o);
|
|
14476
14542
|
let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
14477
14543
|
if (d && d[3])
|
|
14478
14544
|
for (let h = +d[3]; h > 0; h--) {
|
|
@@ -14490,7 +14556,7 @@ function xc(n, e, t, i, s) {
|
|
|
14490
14556
|
return u.nodeName == "BR" && !u.nextSibling && u.parentNode && !Vp.test(u.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
14491
14557
|
}
|
|
14492
14558
|
})), d)
|
|
14493
|
-
l =
|
|
14559
|
+
l = qp(Go(l, +d[1], +d[2]), d[4]);
|
|
14494
14560
|
else if (l = _.maxOpen(Hp(l.content, s), !0), l.openStart || l.openEnd) {
|
|
14495
14561
|
let h = 0, u = 0;
|
|
14496
14562
|
for (let f = l.content.firstChild; h < l.openStart && !f.type.spec.isolating; h++, f = f.firstChild)
|
|
@@ -14583,14 +14649,14 @@ function jp(n) {
|
|
|
14583
14649
|
t = t.querySelector(s[r]) || t;
|
|
14584
14650
|
return t;
|
|
14585
14651
|
}
|
|
14586
|
-
function
|
|
14652
|
+
function Up(n) {
|
|
14587
14653
|
let e = n.querySelectorAll(re ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
14588
14654
|
for (let t = 0; t < e.length; t++) {
|
|
14589
14655
|
let i = e[t];
|
|
14590
14656
|
i.childNodes.length == 1 && i.textContent == " " && i.parentNode && i.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), i);
|
|
14591
14657
|
}
|
|
14592
14658
|
}
|
|
14593
|
-
function
|
|
14659
|
+
function qp(n, e) {
|
|
14594
14660
|
if (!n.size)
|
|
14595
14661
|
return n;
|
|
14596
14662
|
let t = n.content.firstChild.type.schema, i;
|
|
@@ -14907,7 +14973,7 @@ function hm(n, e) {
|
|
|
14907
14973
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
14908
14974
|
}, 50);
|
|
14909
14975
|
}
|
|
14910
|
-
const Mn =
|
|
14976
|
+
const Mn = Te && dt < 15 || sn && op < 604;
|
|
14911
14977
|
xe.copy = ke.cut = (n, e) => {
|
|
14912
14978
|
let t = e, i = n.state.selection, s = t.type == "cut";
|
|
14913
14979
|
if (i.empty)
|
|
@@ -15192,13 +15258,13 @@ class Ce {
|
|
|
15192
15258
|
return this.type instanceof mi;
|
|
15193
15259
|
}
|
|
15194
15260
|
}
|
|
15195
|
-
const
|
|
15196
|
-
class
|
|
15261
|
+
const Ut = [], _t = {};
|
|
15262
|
+
class q {
|
|
15197
15263
|
/**
|
|
15198
15264
|
@internal
|
|
15199
15265
|
*/
|
|
15200
15266
|
constructor(e, t) {
|
|
15201
|
-
this.local = e.length ? e :
|
|
15267
|
+
this.local = e.length ? e : Ut, this.children = t.length ? t : Ut;
|
|
15202
15268
|
}
|
|
15203
15269
|
/**
|
|
15204
15270
|
Create a set of decorations, using the structure of the given
|
|
@@ -15247,7 +15313,7 @@ class U {
|
|
|
15247
15313
|
let a = this.local[l].map(e, i, s);
|
|
15248
15314
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : r.onRemove && r.onRemove(this.local[l].spec);
|
|
15249
15315
|
}
|
|
15250
|
-
return this.children.length ? gm(this.children, o || [], e, t, i, s, r) : o ? new
|
|
15316
|
+
return this.children.length ? gm(this.children, o || [], e, t, i, s, r) : o ? new q(o.sort(Tt), Ut) : ge;
|
|
15251
15317
|
}
|
|
15252
15318
|
/**
|
|
15253
15319
|
Add the given array of decorations to the ones in the set,
|
|
@@ -15256,7 +15322,7 @@ class U {
|
|
|
15256
15322
|
structure.
|
|
15257
15323
|
*/
|
|
15258
15324
|
add(e, t) {
|
|
15259
|
-
return t.length ? this == ge ?
|
|
15325
|
+
return t.length ? this == ge ? q.create(e, t) : this.addInner(e, t, 0) : this;
|
|
15260
15326
|
}
|
|
15261
15327
|
addInner(e, t, i) {
|
|
15262
15328
|
let s, r = 0;
|
|
@@ -15271,7 +15337,7 @@ class U {
|
|
|
15271
15337
|
let o = $c(r ? zc(t) : t, -i);
|
|
15272
15338
|
for (let l = 0; l < o.length; l++)
|
|
15273
15339
|
o[l].type.valid(e, o[l]) || o.splice(l--, 1);
|
|
15274
|
-
return new
|
|
15340
|
+
return new q(o.length ? this.local.concat(o).sort(Tt) : this.local, s || this.children);
|
|
15275
15341
|
}
|
|
15276
15342
|
/**
|
|
15277
15343
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -15298,13 +15364,13 @@ class U {
|
|
|
15298
15364
|
for (let l = 0; l < s.length; l++)
|
|
15299
15365
|
s[l].eq(o, t) && (s == this.local && (s = this.local.slice()), s.splice(l--, 1));
|
|
15300
15366
|
}
|
|
15301
|
-
return i == this.children && s == this.local ? this : s.length || i.length ? new
|
|
15367
|
+
return i == this.children && s == this.local ? this : s.length || i.length ? new q(s, i) : ge;
|
|
15302
15368
|
}
|
|
15303
15369
|
forChild(e, t) {
|
|
15304
15370
|
if (this == ge)
|
|
15305
15371
|
return this;
|
|
15306
15372
|
if (t.isLeaf)
|
|
15307
|
-
return
|
|
15373
|
+
return q.empty;
|
|
15308
15374
|
let i, s;
|
|
15309
15375
|
for (let l = 0; l < this.children.length; l += 3)
|
|
15310
15376
|
if (this.children[l] >= e) {
|
|
@@ -15320,7 +15386,7 @@ class U {
|
|
|
15320
15386
|
}
|
|
15321
15387
|
}
|
|
15322
15388
|
if (s) {
|
|
15323
|
-
let l = new
|
|
15389
|
+
let l = new q(s.sort(Tt), Ut);
|
|
15324
15390
|
return i ? new rt([l, i]) : l;
|
|
15325
15391
|
}
|
|
15326
15392
|
return i || ge;
|
|
@@ -15331,7 +15397,7 @@ class U {
|
|
|
15331
15397
|
eq(e) {
|
|
15332
15398
|
if (this == e)
|
|
15333
15399
|
return !0;
|
|
15334
|
-
if (!(e instanceof
|
|
15400
|
+
if (!(e instanceof q) || this.local.length != e.local.length || this.children.length != e.children.length)
|
|
15335
15401
|
return !1;
|
|
15336
15402
|
for (let t = 0; t < this.local.length; t++)
|
|
15337
15403
|
if (!this.local[t].eq(e.local[t]))
|
|
@@ -15352,7 +15418,7 @@ class U {
|
|
|
15352
15418
|
*/
|
|
15353
15419
|
localsInner(e) {
|
|
15354
15420
|
if (this == ge)
|
|
15355
|
-
return
|
|
15421
|
+
return Ut;
|
|
15356
15422
|
if (e.inlineContent || !this.local.some(ut.is))
|
|
15357
15423
|
return this.local;
|
|
15358
15424
|
let t = [];
|
|
@@ -15364,9 +15430,9 @@ class U {
|
|
|
15364
15430
|
e(this);
|
|
15365
15431
|
}
|
|
15366
15432
|
}
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
const ge =
|
|
15433
|
+
q.empty = new q([], []);
|
|
15434
|
+
q.removeOverlap = mr;
|
|
15435
|
+
const ge = q.empty;
|
|
15370
15436
|
class rt {
|
|
15371
15437
|
constructor(e) {
|
|
15372
15438
|
this.members = e;
|
|
@@ -15377,7 +15443,7 @@ class rt {
|
|
|
15377
15443
|
}
|
|
15378
15444
|
forChild(e, t) {
|
|
15379
15445
|
if (t.isLeaf)
|
|
15380
|
-
return
|
|
15446
|
+
return q.empty;
|
|
15381
15447
|
let i = [];
|
|
15382
15448
|
for (let s = 0; s < this.members.length; s++) {
|
|
15383
15449
|
let r = this.members[s].forChild(e, t);
|
|
@@ -15406,7 +15472,7 @@ class rt {
|
|
|
15406
15472
|
t.push(r[o]);
|
|
15407
15473
|
}
|
|
15408
15474
|
}
|
|
15409
|
-
return t ? mr(i ? t : t.sort(Tt)) :
|
|
15475
|
+
return t ? mr(i ? t : t.sort(Tt)) : Ut;
|
|
15410
15476
|
}
|
|
15411
15477
|
// Create a group for the given array of decoration sets, or return
|
|
15412
15478
|
// a single set when possible.
|
|
@@ -15417,7 +15483,7 @@ class rt {
|
|
|
15417
15483
|
case 1:
|
|
15418
15484
|
return e[0];
|
|
15419
15485
|
default:
|
|
15420
|
-
return new rt(e.every((t) => t instanceof
|
|
15486
|
+
return new rt(e.every((t) => t instanceof q) ? e : e.reduce((t, i) => t.concat(i instanceof q ? i : i.members), []));
|
|
15421
15487
|
}
|
|
15422
15488
|
}
|
|
15423
15489
|
forEachSet(e) {
|
|
@@ -15472,7 +15538,7 @@ function gm(n, e, t, i, s, r, o) {
|
|
|
15472
15538
|
l.splice(u, 0, d.children[h], d.children[h + 1], d.children[h + 2]);
|
|
15473
15539
|
}
|
|
15474
15540
|
}
|
|
15475
|
-
return new
|
|
15541
|
+
return new q(e.sort(Tt), l);
|
|
15476
15542
|
}
|
|
15477
15543
|
function $c(n, e) {
|
|
15478
15544
|
if (!e || !n.length)
|
|
@@ -15524,7 +15590,7 @@ function gi(n, e, t, i) {
|
|
|
15524
15590
|
let o = $c(r ? zc(n) : n, -t).sort(Tt);
|
|
15525
15591
|
for (let l = 0; l < o.length; l++)
|
|
15526
15592
|
o[l].type.valid(e, o[l]) || (i.onRemove && i.onRemove(o[l].spec), o.splice(l--, 1));
|
|
15527
|
-
return o.length || s.length ? new
|
|
15593
|
+
return o.length || s.length ? new q(o, s) : ge;
|
|
15528
15594
|
}
|
|
15529
15595
|
function Tt(n, e) {
|
|
15530
15596
|
return n.from - e.from || n.to - e.to;
|
|
@@ -15557,7 +15623,7 @@ function ss(n) {
|
|
|
15557
15623
|
return n.someProp("decorations", (t) => {
|
|
15558
15624
|
let i = t(n.state);
|
|
15559
15625
|
i && i != ge && e.push(i);
|
|
15560
|
-
}), n.cursorWrapper && e.push(
|
|
15626
|
+
}), n.cursorWrapper && e.push(q.create(n.state.doc, [n.cursorWrapper.deco])), rt.from(e);
|
|
15561
15627
|
}
|
|
15562
15628
|
const vm = {
|
|
15563
15629
|
childList: !0,
|
|
@@ -15566,7 +15632,7 @@ const vm = {
|
|
|
15566
15632
|
attributes: !0,
|
|
15567
15633
|
attributeOldValue: !0,
|
|
15568
15634
|
subtree: !0
|
|
15569
|
-
}, wm =
|
|
15635
|
+
}, wm = Te && dt <= 11;
|
|
15570
15636
|
class bm {
|
|
15571
15637
|
constructor() {
|
|
15572
15638
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -15586,7 +15652,7 @@ class Cm {
|
|
|
15586
15652
|
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new bm(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((i) => {
|
|
15587
15653
|
for (let s = 0; s < i.length; s++)
|
|
15588
15654
|
this.queue.push(i[s]);
|
|
15589
|
-
|
|
15655
|
+
Te && dt <= 11 && i.some((s) => s.type == "childList" && s.removedNodes.length || s.type == "characterData" && s.oldValue.length > s.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
15590
15656
|
}), wm && (this.onCharData = (i) => {
|
|
15591
15657
|
this.queue.push({ target: i.target, type: "characterData", oldValue: i.prevValue }), this.flushSoon();
|
|
15592
15658
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -15624,10 +15690,10 @@ class Cm {
|
|
|
15624
15690
|
this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
|
|
15625
15691
|
}
|
|
15626
15692
|
onSelectionChange() {
|
|
15627
|
-
if (
|
|
15693
|
+
if (Uo(this.view)) {
|
|
15628
15694
|
if (this.suppressingSelectionUpdates)
|
|
15629
15695
|
return Qe(this.view);
|
|
15630
|
-
if (
|
|
15696
|
+
if (Te && dt <= 11 && !this.view.state.selection.empty) {
|
|
15631
15697
|
let e = this.view.domSelectionRange();
|
|
15632
15698
|
if (e.focusNode && It(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
15633
15699
|
return this.flushSoon();
|
|
@@ -15668,7 +15734,7 @@ class Cm {
|
|
|
15668
15734
|
return;
|
|
15669
15735
|
let t = this.pendingRecords();
|
|
15670
15736
|
t.length && (this.queue = []);
|
|
15671
|
-
let i = e.domSelectionRange(), s = !this.suppressingSelectionUpdates && !this.currentSelection.eq(i) &&
|
|
15737
|
+
let i = e.domSelectionRange(), s = !this.suppressingSelectionUpdates && !this.currentSelection.eq(i) && Uo(e) && !this.ignoreSelectionChange(i), r = -1, o = -1, l = !1, a = [];
|
|
15672
15738
|
if (e.editable)
|
|
15673
15739
|
for (let d = 0; d < t.length; d++) {
|
|
15674
15740
|
let h = this.registerMutation(t[d], a);
|
|
@@ -15711,7 +15777,7 @@ class Cm {
|
|
|
15711
15777
|
if (i.contentDOM && i.contentDOM != i.dom && !i.contentDOM.contains(e.target))
|
|
15712
15778
|
return { from: i.posBefore, to: i.posAfter };
|
|
15713
15779
|
let s = e.previousSibling, r = e.nextSibling;
|
|
15714
|
-
if (
|
|
15780
|
+
if (Te && dt <= 11 && e.addedNodes.length)
|
|
15715
15781
|
for (let d = 0; d < e.addedNodes.length; d++) {
|
|
15716
15782
|
let { previousSibling: h, nextSibling: u } = e.addedNodes[d];
|
|
15717
15783
|
(!h || Array.prototype.indexOf.call(e.addedNodes, h) < 0) && (s = h), (!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (r = u);
|
|
@@ -15840,7 +15906,7 @@ function Nm(n, e, t, i, s) {
|
|
|
15840
15906
|
}
|
|
15841
15907
|
return;
|
|
15842
15908
|
}
|
|
15843
|
-
n.state.selection.from < n.state.selection.to && m.start == m.endB && n.state.selection instanceof R && (m.start > n.state.selection.from && m.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? m.start = n.state.selection.from : m.endA < n.state.selection.to && m.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (m.endB += n.state.selection.to - m.endA, m.endA = n.state.selection.to)),
|
|
15909
|
+
n.state.selection.from < n.state.selection.to && m.start == m.endB && n.state.selection instanceof R && (m.start > n.state.selection.from && m.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? m.start = n.state.selection.from : m.endA < n.state.selection.to && m.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (m.endB += n.state.selection.to - m.endA, m.endA = n.state.selection.to)), Te && dt <= 11 && m.endB == m.start + 1 && m.endA == m.start && m.start > c.from && c.doc.textBetween(m.start - c.from - 1, m.start - c.from + 1) == " " && (m.start--, m.endA--, m.endB--);
|
|
15844
15910
|
let g = c.doc.resolveNoCache(m.start - c.from), y = c.doc.resolveNoCache(m.endB - c.from), v = d.resolve(m.start), w = g.sameParent(y) && g.parent.inlineContent && v.end() >= m.endA;
|
|
15845
15911
|
if ((sn && n.input.lastIOSEnter > Date.now() - 225 && (!w || s.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !w && g.pos < c.doc.content.size && (!g.sameParent(y) || !g.parent.inlineContent) && g.pos < y.pos && !/\S/.test(c.doc.textBetween(g.pos, y.pos, "", ""))) && n.someProp("handleKeyDown", (S) => S(n, bt(13, "Enter")))) {
|
|
15846
15912
|
n.input.lastIOSEnter = 0;
|
|
@@ -15859,13 +15925,13 @@ function Nm(n, e, t, i, s) {
|
|
|
15859
15925
|
let M = S || n.state.tr.replace(b, C, c.doc.slice(m.start - c.from, m.endB - c.from));
|
|
15860
15926
|
if (c.sel) {
|
|
15861
15927
|
let O = il(n, M.doc, c.sel);
|
|
15862
|
-
O && !(re && n.composing && O.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (O.head == b || O.head == M.mapping.map(C) - 1) ||
|
|
15928
|
+
O && !(re && n.composing && O.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (O.head == b || O.head == M.mapping.map(C) - 1) || Te && O.empty && O.head == b) && M.setSelection(O);
|
|
15863
15929
|
}
|
|
15864
15930
|
return r && M.setMeta("composition", r), M.scrollIntoView();
|
|
15865
15931
|
}, T;
|
|
15866
15932
|
if (w)
|
|
15867
15933
|
if (g.pos == y.pos) {
|
|
15868
|
-
|
|
15934
|
+
Te && dt <= 11 && g.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Qe(n), 20));
|
|
15869
15935
|
let S = k(n.state.tr.delete(b, C)), M = d.resolve(m.start).marksAcross(d.resolve(m.endA));
|
|
15870
15936
|
M && S.ensureMarks(M), n.dispatch(S);
|
|
15871
15937
|
} else if (
|
|
@@ -16032,7 +16098,7 @@ class Lc {
|
|
|
16032
16098
|
let u = d == "preserve" && o && this.dom.style.overflowAnchor == null && cp(this);
|
|
16033
16099
|
if (o) {
|
|
16034
16100
|
this.domObserver.stop();
|
|
16035
|
-
let f = h && (
|
|
16101
|
+
let f = h && (Te || re) && !this.composing && !s.selection.empty && !e.selection.empty && Im(s.selection, e.selection);
|
|
16036
16102
|
if (h) {
|
|
16037
16103
|
let m = re ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
16038
16104
|
this.composing && (this.input.compositionNode = cm(this)), (r || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Bo(e.doc, c, a, this.dom, this)), m && !this.trackWrites && (f = !0);
|
|
@@ -16108,7 +16174,7 @@ class Lc {
|
|
|
16108
16174
|
Query whether the view has focus.
|
|
16109
16175
|
*/
|
|
16110
16176
|
hasFocus() {
|
|
16111
|
-
if (
|
|
16177
|
+
if (Te) {
|
|
16112
16178
|
let e = this.root.activeElement;
|
|
16113
16179
|
if (e == this.dom)
|
|
16114
16180
|
return !0;
|
|
@@ -16584,8 +16650,8 @@ var Ii = class {
|
|
|
16584
16650
|
gr(Fc, {
|
|
16585
16651
|
blur: () => Wm,
|
|
16586
16652
|
clearContent: () => jm,
|
|
16587
|
-
clearNodes: () =>
|
|
16588
|
-
command: () =>
|
|
16653
|
+
clearNodes: () => Um,
|
|
16654
|
+
command: () => qm,
|
|
16589
16655
|
createParagraphNear: () => Km,
|
|
16590
16656
|
cut: () => Jm,
|
|
16591
16657
|
deleteCurrentNode: () => Xm,
|
|
@@ -16646,7 +16712,7 @@ gr(Fc, {
|
|
|
16646
16712
|
var Wm = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
16647
16713
|
var t;
|
|
16648
16714
|
n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) == null || t.removeAllRanges());
|
|
16649
|
-
}), !0), jm = (n = !0) => ({ commands: e }) => e.setContent("", { emitUpdate: n }),
|
|
16715
|
+
}), !0), jm = (n = !0) => ({ commands: e }) => e.setContent("", { emitUpdate: n }), Um = () => ({ state: n, tr: e, dispatch: t }) => {
|
|
16650
16716
|
const { selection: i } = e, { ranges: s } = i;
|
|
16651
16717
|
return t && s.forEach(({ $from: r, $to: o }) => {
|
|
16652
16718
|
n.doc.nodesBetween(r.pos, o.pos, (l, a) => {
|
|
@@ -16663,7 +16729,7 @@ var Wm = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
16663
16729
|
(m || m === 0) && e.lift(f, m);
|
|
16664
16730
|
});
|
|
16665
16731
|
}), !0;
|
|
16666
|
-
},
|
|
16732
|
+
}, qm = (n) => (e) => n(e), Km = () => ({ state: n, dispatch: e }) => Bf(n, e), Jm = (n, e) => ({ editor: t, tr: i }) => {
|
|
16667
16733
|
const { state: s } = t, r = s.doc.slice(n.from, n.to);
|
|
16668
16734
|
i.deleteRange(n.from, n.to);
|
|
16669
16735
|
const o = i.mapping.map(e);
|
|
@@ -16805,11 +16871,11 @@ var s0 = (n = null, e = {}) => ({ editor: t, view: i, tr: s, dispatch: r }) => {
|
|
|
16805
16871
|
return o(), !0;
|
|
16806
16872
|
const l = jc(s.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
16807
16873
|
return r && (a || s.setSelection(l), a && s.storedMarks && s.setStoredMarks(s.storedMarks), o()), !0;
|
|
16808
|
-
}, r0 = (n, e) => (t) => n.every((i, s) => e(i, { ...t, index: s })), o0 = (n, e) => ({ tr: t, commands: i }) => i.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e),
|
|
16874
|
+
}, r0 = (n, e) => (t) => n.every((i, s) => e(i, { ...t, index: s })), o0 = (n, e) => ({ tr: t, commands: i }) => i.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Uc = (n) => {
|
|
16809
16875
|
const e = n.childNodes;
|
|
16810
16876
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
16811
16877
|
const i = e[t];
|
|
16812
|
-
i.nodeType === 3 && i.nodeValue && /^(\n\s\s|\n)$/.test(i.nodeValue) ? n.removeChild(i) : i.nodeType === 1 &&
|
|
16878
|
+
i.nodeType === 3 && i.nodeValue && /^(\n\s\s|\n)$/.test(i.nodeValue) ? n.removeChild(i) : i.nodeType === 1 && Uc(i);
|
|
16813
16879
|
}
|
|
16814
16880
|
return n;
|
|
16815
16881
|
};
|
|
@@ -16817,7 +16883,7 @@ function Wn(n) {
|
|
|
16817
16883
|
if (typeof window > "u")
|
|
16818
16884
|
throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
|
|
16819
16885
|
const e = "<body>".concat(n, "</body>"), t = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
16820
|
-
return
|
|
16886
|
+
return Uc(t);
|
|
16821
16887
|
}
|
|
16822
16888
|
function Nn(n, e, t) {
|
|
16823
16889
|
if (n instanceof ct || n instanceof x)
|
|
@@ -16965,7 +17031,7 @@ var a0 = (n) => !("type" in n), c0 = (n, e, t) => ({ tr: i, dispatch: s, editor:
|
|
|
16965
17031
|
return !1;
|
|
16966
17032
|
}
|
|
16967
17033
|
}, g0 = () => ({ state: n, dispatch: e }) => Ef(n, e), y0 = () => ({ state: n, dispatch: e }) => Af(n, e);
|
|
16968
|
-
function
|
|
17034
|
+
function qc() {
|
|
16969
17035
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
16970
17036
|
}
|
|
16971
17037
|
function v0(n) {
|
|
@@ -16984,7 +17050,7 @@ function v0(n) {
|
|
|
16984
17050
|
else if (/^s(hift)?$/i.test(a))
|
|
16985
17051
|
r = !0;
|
|
16986
17052
|
else if (/^mod$/i.test(a))
|
|
16987
|
-
vr() ||
|
|
17053
|
+
vr() || qc() ? o = !0 : s = !0;
|
|
16988
17054
|
else
|
|
16989
17055
|
throw new Error("Unrecognized modifier name: ".concat(a));
|
|
16990
17056
|
}
|
|
@@ -17435,7 +17501,7 @@ function j0(n) {
|
|
|
17435
17501
|
const e = W0(n);
|
|
17436
17502
|
return e.length === 1 ? e : e.filter((t, i) => !e.filter((r, o) => o !== i).some((r) => t.oldRange.from >= r.oldRange.from && t.oldRange.to <= r.oldRange.to && t.newRange.from >= r.newRange.from && t.newRange.to <= r.newRange.to));
|
|
17437
17503
|
}
|
|
17438
|
-
function
|
|
17504
|
+
function U0(n) {
|
|
17439
17505
|
const { mapping: e, steps: t } = n, i = [];
|
|
17440
17506
|
return e.maps.forEach((s, r) => {
|
|
17441
17507
|
const o = [];
|
|
@@ -17475,7 +17541,7 @@ function ei(n, e, t) {
|
|
|
17475
17541
|
})
|
|
17476
17542
|
);
|
|
17477
17543
|
}
|
|
17478
|
-
var
|
|
17544
|
+
var q0 = (n, e = 500) => {
|
|
17479
17545
|
let t = "";
|
|
17480
17546
|
const i = n.parentOffset;
|
|
17481
17547
|
return n.parent.nodesBetween(Math.max(0, i - e), i, (s, r, o, l) => {
|
|
@@ -17901,10 +17967,10 @@ var r1 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
17901
17967
|
}), a;
|
|
17902
17968
|
}, g1 = (n, e = {}) => ({ state: t, dispatch: i }) => {
|
|
17903
17969
|
const s = ae(n, t.schema);
|
|
17904
|
-
return
|
|
17970
|
+
return Uf(s, e)(t, i);
|
|
17905
17971
|
}, y1 = (n, e = {}) => ({ state: t, dispatch: i }) => {
|
|
17906
17972
|
const s = ae(n, t.schema);
|
|
17907
|
-
return
|
|
17973
|
+
return qf(s, e)(t, i);
|
|
17908
17974
|
}, v1 = class {
|
|
17909
17975
|
constructor() {
|
|
17910
17976
|
this.callbacks = {};
|
|
@@ -17955,7 +18021,7 @@ function jn(n) {
|
|
|
17955
18021
|
)
|
|
17956
18022
|
return !1;
|
|
17957
18023
|
let d = !1;
|
|
17958
|
-
const h =
|
|
18024
|
+
const h = q0(c) + r;
|
|
17959
18025
|
return o.forEach((u) => {
|
|
17960
18026
|
if (d)
|
|
17961
18027
|
return;
|
|
@@ -18061,13 +18127,13 @@ function C1(n) {
|
|
|
18061
18127
|
function x1(n) {
|
|
18062
18128
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
18063
18129
|
}
|
|
18064
|
-
function
|
|
18130
|
+
function Un(n) {
|
|
18065
18131
|
return x1(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
18066
18132
|
}
|
|
18067
18133
|
function td(n, e) {
|
|
18068
18134
|
const t = { ...n };
|
|
18069
|
-
return
|
|
18070
|
-
|
|
18135
|
+
return Un(n) && Un(e) && Object.keys(e).forEach((i) => {
|
|
18136
|
+
Un(e[i]) && Un(n[i]) ? t[i] = td(n[i], e[i]) : t[i] = e[i];
|
|
18071
18137
|
}), t;
|
|
18072
18138
|
}
|
|
18073
18139
|
var Sr = class {
|
|
@@ -18185,7 +18251,7 @@ function _1(n) {
|
|
|
18185
18251
|
});
|
|
18186
18252
|
}), h.every((f) => f !== null);
|
|
18187
18253
|
}
|
|
18188
|
-
var
|
|
18254
|
+
var qn = null, T1 = (n) => {
|
|
18189
18255
|
var e;
|
|
18190
18256
|
const t = new ClipboardEvent("paste", {
|
|
18191
18257
|
clipboardData: new DataTransfer()
|
|
@@ -18233,9 +18299,9 @@ function N1(n) {
|
|
|
18233
18299
|
view(h) {
|
|
18234
18300
|
const u = (m) => {
|
|
18235
18301
|
var g;
|
|
18236
|
-
i = (g = h.dom.parentElement) != null && g.contains(m.target) ? h.dom.parentElement : null, i && (
|
|
18302
|
+
i = (g = h.dom.parentElement) != null && g.contains(m.target) ? h.dom.parentElement : null, i && (qn = e);
|
|
18237
18303
|
}, f = () => {
|
|
18238
|
-
|
|
18304
|
+
qn && (qn = null);
|
|
18239
18305
|
};
|
|
18240
18306
|
return window.addEventListener("dragstart", u), window.addEventListener("dragend", f), {
|
|
18241
18307
|
destroy() {
|
|
@@ -18247,7 +18313,7 @@ function N1(n) {
|
|
|
18247
18313
|
handleDOMEvents: {
|
|
18248
18314
|
drop: (h, u) => {
|
|
18249
18315
|
if (r = i === h.dom.parentElement, l = u, !r) {
|
|
18250
|
-
const f =
|
|
18316
|
+
const f = qn;
|
|
18251
18317
|
f != null && f.isEditable && setTimeout(() => {
|
|
18252
18318
|
const m = f.state.selection;
|
|
18253
18319
|
m && f.commands.deleteRange({ from: m.from, to: m.to });
|
|
@@ -18442,7 +18508,7 @@ var $i = class {
|
|
|
18442
18508
|
extension: t,
|
|
18443
18509
|
HTMLAttributes: d,
|
|
18444
18510
|
updateAttributes: (h) => {
|
|
18445
|
-
|
|
18511
|
+
U1(l, n, h);
|
|
18446
18512
|
}
|
|
18447
18513
|
});
|
|
18448
18514
|
};
|
|
@@ -18552,7 +18618,7 @@ var ne = class id extends Sr {
|
|
|
18552
18618
|
if ((c = (a = (l = (o = this.editor.options.coreExtensionOptions) == null ? void 0 : o.delete) == null ? void 0 : l.filterTransaction) == null ? void 0 : a.call(l, n)) != null ? c : n.getMeta("y-sync$"))
|
|
18553
18619
|
return;
|
|
18554
18620
|
const d = D0(n.before, [n, ...e]);
|
|
18555
|
-
|
|
18621
|
+
U0(d).forEach((f) => {
|
|
18556
18622
|
d.mapping.mapResult(f.oldRange.from).deletedAfter && d.mapping.mapResult(f.oldRange.to).deletedBefore && d.before.nodesBetween(f.oldRange.from, f.oldRange.to, (m, g) => {
|
|
18557
18623
|
const y = g + m.nodeSize - 2, v = f.oldRange.from <= g && y <= f.oldRange.to;
|
|
18558
18624
|
this.editor.emit("delete", {
|
|
@@ -18699,7 +18765,7 @@ var ne = class id extends Sr {
|
|
|
18699
18765
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
18700
18766
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
18701
18767
|
};
|
|
18702
|
-
return vr() ||
|
|
18768
|
+
return vr() || qc() ? r : s;
|
|
18703
18769
|
},
|
|
18704
18770
|
addProseMirrorPlugins() {
|
|
18705
18771
|
return [
|
|
@@ -18806,7 +18872,7 @@ var ne = class id extends Sr {
|
|
|
18806
18872
|
})
|
|
18807
18873
|
];
|
|
18808
18874
|
}
|
|
18809
|
-
}), A1 = class
|
|
18875
|
+
}), A1 = class qt {
|
|
18810
18876
|
constructor(e, t, i = !1, s = null) {
|
|
18811
18877
|
this.currentNode = null, this.actualDepth = null, this.isBlock = i, this.resolvedPos = e, this.editor = t, this.currentNode = s;
|
|
18812
18878
|
}
|
|
@@ -18865,15 +18931,15 @@ var ne = class id extends Sr {
|
|
|
18865
18931
|
if (this.depth === 0)
|
|
18866
18932
|
return null;
|
|
18867
18933
|
const e = this.resolvedPos.start(this.resolvedPos.depth - 1), t = this.resolvedPos.doc.resolve(e);
|
|
18868
|
-
return new
|
|
18934
|
+
return new qt(t, this.editor);
|
|
18869
18935
|
}
|
|
18870
18936
|
get before() {
|
|
18871
18937
|
let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
|
|
18872
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new
|
|
18938
|
+
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new qt(e, this.editor);
|
|
18873
18939
|
}
|
|
18874
18940
|
get after() {
|
|
18875
18941
|
let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
|
|
18876
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new
|
|
18942
|
+
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new qt(e, this.editor);
|
|
18877
18943
|
}
|
|
18878
18944
|
get children() {
|
|
18879
18945
|
const e = [];
|
|
@@ -18884,8 +18950,8 @@ var ne = class id extends Sr {
|
|
|
18884
18950
|
const l = this.resolvedPos.doc.resolve(o);
|
|
18885
18951
|
if (!s && l.depth <= this.depth)
|
|
18886
18952
|
return;
|
|
18887
|
-
const a = new
|
|
18888
|
-
s && (a.actualDepth = this.depth + 1), e.push(new
|
|
18953
|
+
const a = new qt(l, this.editor, s, s ? t : null);
|
|
18954
|
+
s && (a.actualDepth = this.depth + 1), e.push(new qt(l, this.editor, s, s ? t : null));
|
|
18889
18955
|
}), e;
|
|
18890
18956
|
}
|
|
18891
18957
|
get firstChild() {
|
|
@@ -19956,7 +20022,7 @@ function j1(n, e, t, i) {
|
|
|
19956
20022
|
}
|
|
19957
20023
|
}), a.join("\n");
|
|
19958
20024
|
}
|
|
19959
|
-
function
|
|
20025
|
+
function U1(n, e, t = {}) {
|
|
19960
20026
|
const { state: i } = e, { doc: s, tr: r } = i, o = n;
|
|
19961
20027
|
s.descendants((l, a) => {
|
|
19962
20028
|
const c = r.mapping.map(a), d = r.mapping.map(a) + l.nodeSize;
|
|
@@ -19998,12 +20064,12 @@ var Pi = class md extends Sr {
|
|
|
19998
20064
|
const t = typeof e == "function" ? e() : e;
|
|
19999
20065
|
return super.extend(t);
|
|
20000
20066
|
}
|
|
20001
|
-
},
|
|
20067
|
+
}, q1 = Pi.create({
|
|
20002
20068
|
name: "doc",
|
|
20003
20069
|
topNode: !0,
|
|
20004
20070
|
content: "block+",
|
|
20005
20071
|
renderMarkdown: (n, e) => n.content ? e.renderChildren(n.content, "\n\n") : ""
|
|
20006
|
-
}), K1 =
|
|
20072
|
+
}), K1 = q1, J1 = Pi.create({
|
|
20007
20073
|
name: "text",
|
|
20008
20074
|
group: "inline",
|
|
20009
20075
|
parseMarkdown: (n) => ({
|
|
@@ -20324,7 +20390,7 @@ function og(n) {
|
|
|
20324
20390
|
if (!(n.selection instanceof X))
|
|
20325
20391
|
return null;
|
|
20326
20392
|
let e = document.createElement("div");
|
|
20327
|
-
return e.className = "ProseMirror-gapcursor",
|
|
20393
|
+
return e.className = "ProseMirror-gapcursor", q.create(n.doc, [Ce.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
20328
20394
|
}
|
|
20329
20395
|
var bi = 200, le = function() {
|
|
20330
20396
|
};
|
|
@@ -20763,7 +20829,7 @@ ne.create({
|
|
|
20763
20829
|
decorations: ({ doc: n, selection: e }) => {
|
|
20764
20830
|
const { isEditable: t, isFocused: i } = this.editor, { anchor: s } = e, r = [];
|
|
20765
20831
|
if (!t || !i)
|
|
20766
|
-
return
|
|
20832
|
+
return q.create(n, []);
|
|
20767
20833
|
let o = 0;
|
|
20768
20834
|
this.options.mode === "deepest" && n.descendants((a, c) => {
|
|
20769
20835
|
if (a.isText)
|
|
@@ -20783,7 +20849,7 @@ ne.create({
|
|
|
20783
20849
|
class: this.options.className
|
|
20784
20850
|
})
|
|
20785
20851
|
);
|
|
20786
|
-
}),
|
|
20852
|
+
}), q.create(n, r);
|
|
20787
20853
|
}
|
|
20788
20854
|
}
|
|
20789
20855
|
})
|
|
@@ -20846,7 +20912,7 @@ ne.create({
|
|
|
20846
20912
|
s.push(h);
|
|
20847
20913
|
}
|
|
20848
20914
|
return this.options.includeChildren;
|
|
20849
|
-
}),
|
|
20915
|
+
}), q.create(n, s);
|
|
20850
20916
|
}
|
|
20851
20917
|
}
|
|
20852
20918
|
})
|
|
@@ -20867,7 +20933,7 @@ ne.create({
|
|
|
20867
20933
|
key: new pe("selection"),
|
|
20868
20934
|
props: {
|
|
20869
20935
|
decorations(t) {
|
|
20870
|
-
return t.selection.empty || n.isFocused || !n.isEditable || J0(t.selection) || n.view.dragging ? null :
|
|
20936
|
+
return t.selection.empty || n.isFocused || !n.isEditable || J0(t.selection) || n.view.dragging ? null : q.create(t.doc, [
|
|
20871
20937
|
Ce.inline(t.selection.from, t.selection.to, {
|
|
20872
20938
|
class: e.className
|
|
20873
20939
|
})
|
|
@@ -21267,8 +21333,8 @@ const be = new P("chat-agent-setting"), Sg = (n) => {
|
|
|
21267
21333
|
ca,
|
|
21268
21334
|
{
|
|
21269
21335
|
options: o,
|
|
21270
|
-
value: e.
|
|
21271
|
-
onChange: (l) => e.setAIAgentConfig({
|
|
21336
|
+
value: e.reCallConfig.value.chunkrerank,
|
|
21337
|
+
onChange: (l) => e.setAIAgentConfig({ chunkrerank: l }),
|
|
21272
21338
|
popperStyle: {
|
|
21273
21339
|
width: "90px",
|
|
21274
21340
|
bottom: "inherit",
|
|
@@ -21286,7 +21352,7 @@ const be = new P("chat-agent-setting"), Sg = (n) => {
|
|
|
21286
21352
|
children: [
|
|
21287
21353
|
/* @__PURE__ */ p("div", { className: be.em("dropdown", "item-label"), children: [
|
|
21288
21354
|
"最大召回数量: ",
|
|
21289
|
-
e.
|
|
21355
|
+
e.reCallConfig.value.maxchunks
|
|
21290
21356
|
] }),
|
|
21291
21357
|
/* @__PURE__ */ p(
|
|
21292
21358
|
no,
|
|
@@ -21294,7 +21360,7 @@ const be = new P("chat-agent-setting"), Sg = (n) => {
|
|
|
21294
21360
|
min: 0,
|
|
21295
21361
|
max: 20,
|
|
21296
21362
|
step: 1,
|
|
21297
|
-
value: e.
|
|
21363
|
+
value: e.reCallConfig.value.maxchunks,
|
|
21298
21364
|
onChange: (l) => e.setAIAgentConfig({ maxchunks: l })
|
|
21299
21365
|
}
|
|
21300
21366
|
)
|
|
@@ -21308,7 +21374,7 @@ const be = new P("chat-agent-setting"), Sg = (n) => {
|
|
|
21308
21374
|
children: [
|
|
21309
21375
|
/* @__PURE__ */ p("div", { className: be.em("dropdown", "item-label"), children: [
|
|
21310
21376
|
"召回相似度阈值: ",
|
|
21311
|
-
e.
|
|
21377
|
+
e.reCallConfig.value.chunkthreshold
|
|
21312
21378
|
] }),
|
|
21313
21379
|
/* @__PURE__ */ p(
|
|
21314
21380
|
no,
|
|
@@ -21316,7 +21382,7 @@ const be = new P("chat-agent-setting"), Sg = (n) => {
|
|
|
21316
21382
|
min: 0,
|
|
21317
21383
|
max: 1,
|
|
21318
21384
|
step: 0.01,
|
|
21319
|
-
value: e.
|
|
21385
|
+
value: e.reCallConfig.value.chunkthreshold,
|
|
21320
21386
|
onChange: (l) => e.setAIAgentConfig({ chunkthreshold: l })
|
|
21321
21387
|
}
|
|
21322
21388
|
)
|
|
@@ -21433,7 +21499,7 @@ const G = new P("chat-input"), xl = window.SpeechRecognition || window.webkitSpe
|
|
|
21433
21499
|
onChange: (b) => g(b)
|
|
21434
21500
|
}
|
|
21435
21501
|
),
|
|
21436
|
-
/* @__PURE__ */ p(
|
|
21502
|
+
n.controller.enableKnowledgeBaseSelect.value && /* @__PURE__ */ p(
|
|
21437
21503
|
Hh,
|
|
21438
21504
|
{
|
|
21439
21505
|
popperStyle: { width: "160px" },
|
|
@@ -21443,7 +21509,7 @@ const G = new P("chat-input"), xl = window.SpeechRecognition || window.webkitSpe
|
|
|
21443
21509
|
onChange: y
|
|
21444
21510
|
}
|
|
21445
21511
|
),
|
|
21446
|
-
n.controller.agentList.value.length > 0 ? /* @__PURE__ */ p(Sg, { controller: n.controller }) : null
|
|
21512
|
+
n.controller.enableRecallConfigSetting.value && n.controller.agentList.value.length > 0 ? /* @__PURE__ */ p(Sg, { controller: n.controller }) : null
|
|
21447
21513
|
] }),
|
|
21448
21514
|
/* @__PURE__ */ p("div", { className: G.b("right-action-wrapper"), children: [
|
|
21449
21515
|
/* @__PURE__ */ p(
|
|
@@ -21542,7 +21608,7 @@ const G = new P("chat-input"), xl = window.SpeechRecognition || window.webkitSpe
|
|
|
21542
21608
|
] })
|
|
21543
21609
|
] });
|
|
21544
21610
|
};
|
|
21545
|
-
const
|
|
21611
|
+
const Ne = new P("chat-topic-item"), Mg = (n) => {
|
|
21546
21612
|
const { controller: e, topic: t, onClick: i, onAction: s } = n, r = F(null), o = te(() => {
|
|
21547
21613
|
var y;
|
|
21548
21614
|
return ((y = e.activedTopic.value) == null ? void 0 : y.id) === t.id;
|
|
@@ -21564,13 +21630,13 @@ const Te = new P("chat-topic-item"), Mg = (n) => {
|
|
|
21564
21630
|
return /* @__PURE__ */ p(
|
|
21565
21631
|
"div",
|
|
21566
21632
|
{
|
|
21567
|
-
className: "".concat(
|
|
21633
|
+
className: "".concat(Ne.b(), " ").concat(Ne.is("active", o.value), " ").concat(Ne.is(
|
|
21568
21634
|
"edit",
|
|
21569
21635
|
c.value
|
|
21570
21636
|
)),
|
|
21571
21637
|
onClick: i.bind(void 0),
|
|
21572
21638
|
children: [
|
|
21573
|
-
/* @__PURE__ */ p("div", { className:
|
|
21639
|
+
/* @__PURE__ */ p("div", { className: Ne.e("caption"), title: t.caption, children: c.value ? /* @__PURE__ */ p(
|
|
21574
21640
|
"input",
|
|
21575
21641
|
{
|
|
21576
21642
|
ref: r,
|
|
@@ -21579,20 +21645,20 @@ const Te = new P("chat-topic-item"), Mg = (n) => {
|
|
|
21579
21645
|
onKeyDown: m,
|
|
21580
21646
|
onClick: (g) => g.stopPropagation(),
|
|
21581
21647
|
onChange: (g) => u(g),
|
|
21582
|
-
className:
|
|
21648
|
+
className: Ne.em("caption", "editor")
|
|
21583
21649
|
}
|
|
21584
|
-
) : /* @__PURE__ */ p("div", { className:
|
|
21585
|
-
/* @__PURE__ */ p("span", { className:
|
|
21586
|
-
t.isTop ? /* @__PURE__ */ p("span", { className:
|
|
21650
|
+
) : /* @__PURE__ */ p("div", { className: Ne.em("caption", "readonly"), children: [
|
|
21651
|
+
/* @__PURE__ */ p("span", { className: Ne.em("caption", "text"), children: t.caption }),
|
|
21652
|
+
t.isTop ? /* @__PURE__ */ p("span", { className: Ne.em("caption", "icon"), children: /* @__PURE__ */ p(jr, {}) }) : null
|
|
21587
21653
|
] }) }),
|
|
21588
|
-
!c.value && /* @__PURE__ */ p("div", { className:
|
|
21654
|
+
!c.value && /* @__PURE__ */ p("div", { className: Ne.e("icon"), children: [
|
|
21589
21655
|
/* @__PURE__ */ p(
|
|
21590
21656
|
"span",
|
|
21591
21657
|
{
|
|
21592
21658
|
title: "跳转主视图",
|
|
21593
|
-
className:
|
|
21659
|
+
className: Ne.em("icon", "item"),
|
|
21594
21660
|
onClick: d.bind(void 0),
|
|
21595
|
-
children: /* @__PURE__ */ p(fh, { className:
|
|
21661
|
+
children: /* @__PURE__ */ p(fh, { className: Ne.b("link-icon") })
|
|
21596
21662
|
}
|
|
21597
21663
|
),
|
|
21598
21664
|
o.value ? null : /* @__PURE__ */ p(
|
|
@@ -21612,7 +21678,7 @@ const Te = new P("chat-topic-item"), Mg = (n) => {
|
|
|
21612
21678
|
isOpen: l,
|
|
21613
21679
|
onToggleOpen: a,
|
|
21614
21680
|
onAction: h.bind(void 0),
|
|
21615
|
-
children: /* @__PURE__ */ p("span", { className:
|
|
21681
|
+
children: /* @__PURE__ */ p("span", { className: Ne.em("icon", "item"), title: "更多", children: /* @__PURE__ */ p(uh, { className: Ne.e("more-icon") }) })
|
|
21616
21682
|
}
|
|
21617
21683
|
)
|
|
21618
21684
|
] })
|