reasonix 0.40.0 → 0.41.0
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/README.md +21 -13
- package/README.zh-CN.md +19 -13
- package/dashboard/app.css +8 -4
- package/dashboard/dist/app.js +279 -224
- package/dashboard/dist/app.js.map +1 -1
- package/dist/cli/acp-64VQZLDJ.js +708 -0
- package/dist/cli/acp-64VQZLDJ.js.map +1 -0
- package/dist/cli/chat-ZAGX52RV.js +46 -0
- package/dist/cli/{chunk-UCMTWZKU.js → chunk-2CXPDAWX.js} +2 -2
- package/dist/cli/{chunk-CLAN6PVH.js → chunk-4H3ZRJ2U.js} +19 -7
- package/dist/cli/chunk-4H3ZRJ2U.js.map +1 -0
- package/dist/cli/{chunk-A5LSGEEK.js → chunk-4W2CICFQ.js} +21 -10
- package/dist/cli/{chunk-A5LSGEEK.js.map → chunk-4W2CICFQ.js.map} +1 -1
- package/dist/cli/{chunk-CZSJILQP.js → chunk-65Q5HQ26.js} +39 -1
- package/dist/cli/chunk-65Q5HQ26.js.map +1 -0
- package/dist/cli/{chunk-XHQIK7B6.js → chunk-7SPOFTMT.js} +2 -2
- package/dist/cli/{chunk-5GKJLNP2.js → chunk-7VFNPMKG.js} +2 -2
- package/dist/cli/{chunk-UVRXTSK3.js → chunk-A3LL4XDV.js} +8 -2
- package/dist/cli/chunk-A3LL4XDV.js.map +1 -0
- package/dist/cli/{chunk-VLNRQMCI.js → chunk-A7VHMMDE.js} +2 -2
- package/dist/cli/{chunk-R4YTW7PR.js → chunk-ARF3N2SY.js} +56 -12
- package/dist/cli/chunk-ARF3N2SY.js.map +1 -0
- package/dist/cli/{chunk-AVB3WZWU.js → chunk-AT6GGIBV.js} +10 -10
- package/dist/cli/{chunk-RFX7TYVV.js → chunk-BOFL3T45.js} +14 -1
- package/dist/cli/chunk-BOFL3T45.js.map +1 -0
- package/dist/cli/{chunk-SZH34P45.js → chunk-BYZGO3BX.js} +43 -17
- package/dist/cli/chunk-BYZGO3BX.js.map +1 -0
- package/dist/cli/{chunk-7DLHHBGN.js → chunk-CD4SCQL4.js} +6 -4
- package/dist/cli/chunk-CD4SCQL4.js.map +1 -0
- package/dist/cli/{chunk-HCC42PEI.js → chunk-CFY2XLY6.js} +6 -2
- package/dist/cli/chunk-CFY2XLY6.js.map +1 -0
- package/dist/cli/{chunk-26UDIXLD.js → chunk-F2AV2QDK.js} +493 -460
- package/dist/cli/chunk-F2AV2QDK.js.map +1 -0
- package/dist/cli/{chunk-KMWKGPFZ.js → chunk-H4OLWRSX.js} +10 -1
- package/dist/cli/chunk-H4OLWRSX.js.map +1 -0
- package/dist/cli/{chunk-4YV2GBYG.js → chunk-IEA6JOIP.js} +291 -98
- package/dist/cli/chunk-IEA6JOIP.js.map +1 -0
- package/dist/cli/{chunk-WKOMCPXP.js → chunk-KZYLMMU5.js} +21 -13
- package/dist/cli/chunk-KZYLMMU5.js.map +1 -0
- package/dist/cli/{chunk-JWCTX5S4.js → chunk-L7W3HJZQ.js} +2 -2
- package/dist/cli/{chunk-MRLXEMZ7.js → chunk-LN27AKV3.js} +1 -1
- package/dist/cli/chunk-LN27AKV3.js.map +1 -0
- package/dist/cli/{chunk-IYF36OCJ.js → chunk-LTXADNCO.js} +2 -2
- package/dist/cli/{chunk-H7PHYVPM.js → chunk-MHGPBJ2T.js} +44 -8
- package/dist/cli/chunk-MHGPBJ2T.js.map +1 -0
- package/dist/cli/{chunk-ULBW7DYL.js → chunk-RAUPWSYA.js} +2 -2
- package/dist/cli/chunk-SXLJBFIV.js +245 -0
- package/dist/cli/chunk-SXLJBFIV.js.map +1 -0
- package/dist/cli/{chunk-4X3NY5ZM.js → chunk-UV7XJUJH.js} +2 -2
- package/dist/cli/{chunk-XJLZ4HKU.js → chunk-VFG4GIT3.js} +2 -2
- package/dist/cli/{chunk-FFNOMR32.js → chunk-WE3YZULK.js} +2 -2
- package/dist/cli/chunk-Y5XNV3NX.js +25 -0
- package/dist/cli/chunk-Y5XNV3NX.js.map +1 -0
- package/dist/cli/{chunk-XST7BSZJ.js → chunk-YJFKFTAL.js} +7 -1
- package/dist/cli/chunk-YJFKFTAL.js.map +1 -0
- package/dist/cli/{code-YQGVLIT2.js → code-X3M6ENTQ.js} +38 -35
- package/dist/cli/{code-YQGVLIT2.js.map → code-X3M6ENTQ.js.map} +1 -1
- package/dist/cli/{commands-FQZOBLLZ.js → commands-QY7MSQG7.js} +4 -4
- package/dist/cli/{commit-ZS24SHPG.js → commit-BRCQ3OQO.js} +3 -3
- package/dist/cli/{desktop-6OLENOOO.js → desktop-ZTMHQR2Y.js} +247 -28
- package/dist/cli/desktop-ZTMHQR2Y.js.map +1 -0
- package/dist/cli/{diff-2VUKNGEI.js → diff-YASCB7PU.js} +7 -7
- package/dist/cli/{doctor-JO2WNN6C.js → doctor-XCN5ETVP.js} +9 -9
- package/dist/cli/{events-APSVNROZ.js → events-2AJTXR7I.js} +3 -3
- package/dist/cli/index.js +69 -35
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-DCKOE5RF.js → mcp-YMWBLRR7.js} +2 -2
- package/dist/cli/{mcp-browse-D6GBP5RQ.js → mcp-browse-XLDUE6SB.js} +7 -3
- package/dist/cli/mcp-browse-XLDUE6SB.js.map +1 -0
- package/dist/cli/{mcp-inspect-KFGFPJ3E.js → mcp-inspect-H4D2HSJP.js} +5 -7
- package/dist/cli/{mcp-inspect-KFGFPJ3E.js.map → mcp-inspect-H4D2HSJP.js.map} +1 -1
- package/dist/cli/{prompt-PKCCLLAD.js → prompt-RSIHN62V.js} +4 -3
- package/dist/cli/{prune-sessions-LV33R47N.js → prune-sessions-4N3BVST2.js} +2 -2
- package/dist/cli/{replay-WFCYX7XF.js → replay-3GTWM75X.js} +8 -8
- package/dist/cli/{run-IUJYEPMT.js → run-BLZPTRDX.js} +19 -21
- package/dist/cli/{run-IUJYEPMT.js.map → run-BLZPTRDX.js.map} +1 -1
- package/dist/cli/{server-CN4QPPVJ.js → server-DRFPXXSH.js} +16 -12
- package/dist/cli/{server-CN4QPPVJ.js.map → server-DRFPXXSH.js.map} +1 -1
- package/dist/cli/{sessions-F5GPGTJN.js → sessions-BOWFPTXT.js} +13 -13
- package/dist/cli/{setup-WWMDBPSB.js → setup-FQL2JJC2.js} +5 -5
- package/dist/cli/version-XQXYSJ5L.js +30 -0
- package/dist/index.d.ts +148 -103
- package/dist/index.js +468 -134
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/cli/chat-G7CUW4ZI.js +0 -45
- package/dist/cli/chunk-26UDIXLD.js.map +0 -1
- package/dist/cli/chunk-4YV2GBYG.js.map +0 -1
- package/dist/cli/chunk-7DLHHBGN.js.map +0 -1
- package/dist/cli/chunk-CLAN6PVH.js.map +0 -1
- package/dist/cli/chunk-CPTZ5OHX.js +0 -18
- package/dist/cli/chunk-CPTZ5OHX.js.map +0 -1
- package/dist/cli/chunk-CZSJILQP.js.map +0 -1
- package/dist/cli/chunk-H7PHYVPM.js.map +0 -1
- package/dist/cli/chunk-HCC42PEI.js.map +0 -1
- package/dist/cli/chunk-KMWKGPFZ.js.map +0 -1
- package/dist/cli/chunk-MRLXEMZ7.js.map +0 -1
- package/dist/cli/chunk-R4YTW7PR.js.map +0 -1
- package/dist/cli/chunk-RFX7TYVV.js.map +0 -1
- package/dist/cli/chunk-SZH34P45.js.map +0 -1
- package/dist/cli/chunk-UVRXTSK3.js.map +0 -1
- package/dist/cli/chunk-WKOMCPXP.js.map +0 -1
- package/dist/cli/chunk-XST7BSZJ.js.map +0 -1
- package/dist/cli/desktop-6OLENOOO.js.map +0 -1
- package/dist/cli/mcp-browse-D6GBP5RQ.js.map +0 -1
- package/dist/cli/version-KQUPV6T5.js +0 -30
- /package/dist/cli/{chat-G7CUW4ZI.js.map → chat-ZAGX52RV.js.map} +0 -0
- /package/dist/cli/{chunk-UCMTWZKU.js.map → chunk-2CXPDAWX.js.map} +0 -0
- /package/dist/cli/{chunk-XHQIK7B6.js.map → chunk-7SPOFTMT.js.map} +0 -0
- /package/dist/cli/{chunk-5GKJLNP2.js.map → chunk-7VFNPMKG.js.map} +0 -0
- /package/dist/cli/{chunk-VLNRQMCI.js.map → chunk-A7VHMMDE.js.map} +0 -0
- /package/dist/cli/{chunk-AVB3WZWU.js.map → chunk-AT6GGIBV.js.map} +0 -0
- /package/dist/cli/{chunk-JWCTX5S4.js.map → chunk-L7W3HJZQ.js.map} +0 -0
- /package/dist/cli/{chunk-IYF36OCJ.js.map → chunk-LTXADNCO.js.map} +0 -0
- /package/dist/cli/{chunk-ULBW7DYL.js.map → chunk-RAUPWSYA.js.map} +0 -0
- /package/dist/cli/{chunk-4X3NY5ZM.js.map → chunk-UV7XJUJH.js.map} +0 -0
- /package/dist/cli/{chunk-XJLZ4HKU.js.map → chunk-VFG4GIT3.js.map} +0 -0
- /package/dist/cli/{chunk-FFNOMR32.js.map → chunk-WE3YZULK.js.map} +0 -0
- /package/dist/cli/{commands-FQZOBLLZ.js.map → commands-QY7MSQG7.js.map} +0 -0
- /package/dist/cli/{commit-ZS24SHPG.js.map → commit-BRCQ3OQO.js.map} +0 -0
- /package/dist/cli/{diff-2VUKNGEI.js.map → diff-YASCB7PU.js.map} +0 -0
- /package/dist/cli/{doctor-JO2WNN6C.js.map → doctor-XCN5ETVP.js.map} +0 -0
- /package/dist/cli/{events-APSVNROZ.js.map → events-2AJTXR7I.js.map} +0 -0
- /package/dist/cli/{mcp-DCKOE5RF.js.map → mcp-YMWBLRR7.js.map} +0 -0
- /package/dist/cli/{prompt-PKCCLLAD.js.map → prompt-RSIHN62V.js.map} +0 -0
- /package/dist/cli/{prune-sessions-LV33R47N.js.map → prune-sessions-4N3BVST2.js.map} +0 -0
- /package/dist/cli/{replay-WFCYX7XF.js.map → replay-3GTWM75X.js.map} +0 -0
- /package/dist/cli/{sessions-F5GPGTJN.js.map → sessions-BOWFPTXT.js.map} +0 -0
- /package/dist/cli/{setup-WWMDBPSB.js.map → setup-FQL2JJC2.js.map} +0 -0
- /package/dist/cli/{version-KQUPV6T5.js.map → version-XQXYSJ5L.js.map} +0 -0
package/dashboard/dist/app.js
CHANGED
|
@@ -20441,6 +20441,187 @@ var zhCN = {
|
|
|
20441
20441
|
// dashboard/src/i18n/index.ts
|
|
20442
20442
|
var t4 = createT({ en, "zh-CN": zhCN });
|
|
20443
20443
|
|
|
20444
|
+
// node_modules/preact/compat/dist/compat.module.js
|
|
20445
|
+
function g3(n3, t5) {
|
|
20446
|
+
for (var e3 in t5) n3[e3] = t5[e3];
|
|
20447
|
+
return n3;
|
|
20448
|
+
}
|
|
20449
|
+
function E2(n3, t5) {
|
|
20450
|
+
for (var e3 in n3) if ("__source" !== e3 && !(e3 in t5)) return true;
|
|
20451
|
+
for (var r3 in t5) if ("__source" !== r3 && n3[r3] !== t5[r3]) return true;
|
|
20452
|
+
return false;
|
|
20453
|
+
}
|
|
20454
|
+
function M2(n3, t5) {
|
|
20455
|
+
this.props = n3, this.context = t5;
|
|
20456
|
+
}
|
|
20457
|
+
function N2(n3, e3) {
|
|
20458
|
+
function r3(n4) {
|
|
20459
|
+
var t5 = this.props.ref;
|
|
20460
|
+
return t5 != n4.ref && t5 && ("function" == typeof t5 ? t5(null) : t5.current = null), e3 ? !e3(this.props, n4) || t5 != n4.ref : E2(this.props, n4);
|
|
20461
|
+
}
|
|
20462
|
+
function u3(e4) {
|
|
20463
|
+
return this.shouldComponentUpdate = r3, k(n3, e4);
|
|
20464
|
+
}
|
|
20465
|
+
return u3.displayName = "Memo(" + (n3.displayName || n3.name) + ")", u3.__f = u3.prototype.isReactComponent = true, u3.type = n3, u3;
|
|
20466
|
+
}
|
|
20467
|
+
(M2.prototype = new C()).isPureReactComponent = true, M2.prototype.shouldComponentUpdate = function(n3, t5) {
|
|
20468
|
+
return E2(this.props, n3) || E2(this.state, t5);
|
|
20469
|
+
};
|
|
20470
|
+
var T3 = l.__b;
|
|
20471
|
+
l.__b = function(n3) {
|
|
20472
|
+
n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
|
|
20473
|
+
};
|
|
20474
|
+
var A3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
20475
|
+
var O2 = l.__e;
|
|
20476
|
+
l.__e = function(n3, t5, e3, r3) {
|
|
20477
|
+
if (n3.then) {
|
|
20478
|
+
for (var u3, o3 = t5; o3 = o3.__; ) if ((u3 = o3.__c) && u3.__c) return null == t5.__e && (t5.__e = e3.__e, t5.__k = e3.__k), u3.__c(n3, t5);
|
|
20479
|
+
}
|
|
20480
|
+
O2(n3, t5, e3, r3);
|
|
20481
|
+
};
|
|
20482
|
+
var U2 = l.unmount;
|
|
20483
|
+
function V2(n3, t5, e3) {
|
|
20484
|
+
return n3 && (n3.__c && n3.__c.__H && (n3.__c.__H.__.forEach(function(n4) {
|
|
20485
|
+
"function" == typeof n4.__c && n4.__c();
|
|
20486
|
+
}), n3.__c.__H = null), null != (n3 = g3({}, n3)).__c && (n3.__c.__P === e3 && (n3.__c.__P = t5), n3.__c.__e = true, n3.__c = null), n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
20487
|
+
return V2(n4, t5, e3);
|
|
20488
|
+
})), n3;
|
|
20489
|
+
}
|
|
20490
|
+
function W2(n3, t5, e3) {
|
|
20491
|
+
return n3 && e3 && (n3.__v = null, n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
20492
|
+
return W2(n4, t5, e3);
|
|
20493
|
+
}), n3.__c && n3.__c.__P === t5 && (n3.__e && e3.appendChild(n3.__e), n3.__c.__e = true, n3.__c.__P = e3)), n3;
|
|
20494
|
+
}
|
|
20495
|
+
function P3() {
|
|
20496
|
+
this.__u = 0, this.o = null, this.__b = null;
|
|
20497
|
+
}
|
|
20498
|
+
function j3(n3) {
|
|
20499
|
+
var t5 = n3.__ && n3.__.__c;
|
|
20500
|
+
return t5 && t5.__a && t5.__a(n3);
|
|
20501
|
+
}
|
|
20502
|
+
function B3() {
|
|
20503
|
+
this.i = null, this.l = null;
|
|
20504
|
+
}
|
|
20505
|
+
l.unmount = function(n3) {
|
|
20506
|
+
var t5 = n3.__c;
|
|
20507
|
+
t5 && (t5.__z = true), t5 && t5.__R && t5.__R(), t5 && 32 & n3.__u && (n3.type = null), U2 && U2(n3);
|
|
20508
|
+
}, (P3.prototype = new C()).__c = function(n3, t5) {
|
|
20509
|
+
var e3 = t5.__c, r3 = this;
|
|
20510
|
+
null == r3.o && (r3.o = []), r3.o.push(e3);
|
|
20511
|
+
var u3 = j3(r3.__v), o3 = false, i3 = function() {
|
|
20512
|
+
o3 || r3.__z || (o3 = true, e3.__R = null, u3 ? u3(c3) : c3());
|
|
20513
|
+
};
|
|
20514
|
+
e3.__R = i3;
|
|
20515
|
+
var l3 = e3.__P;
|
|
20516
|
+
e3.__P = null;
|
|
20517
|
+
var c3 = function() {
|
|
20518
|
+
if (!--r3.__u) {
|
|
20519
|
+
if (r3.state.__a) {
|
|
20520
|
+
var n4 = r3.state.__a;
|
|
20521
|
+
r3.__v.__k[0] = W2(n4, n4.__c.__P, n4.__c.__O);
|
|
20522
|
+
}
|
|
20523
|
+
var t6;
|
|
20524
|
+
for (r3.setState({ __a: r3.__b = null }); t6 = r3.o.pop(); ) t6.__P = l3, t6.forceUpdate();
|
|
20525
|
+
}
|
|
20526
|
+
};
|
|
20527
|
+
r3.__u++ || 32 & t5.__u || r3.setState({ __a: r3.__b = r3.__v.__k[0] }), n3.then(i3, i3);
|
|
20528
|
+
}, P3.prototype.componentWillUnmount = function() {
|
|
20529
|
+
this.o = [];
|
|
20530
|
+
}, P3.prototype.render = function(n3, e3) {
|
|
20531
|
+
if (this.__b) {
|
|
20532
|
+
if (this.__v.__k) {
|
|
20533
|
+
var r3 = document.createElement("div"), o3 = this.__v.__k[0].__c;
|
|
20534
|
+
this.__v.__k[0] = V2(this.__b, r3, o3.__O = o3.__P);
|
|
20535
|
+
}
|
|
20536
|
+
this.__b = null;
|
|
20537
|
+
}
|
|
20538
|
+
var i3 = e3.__a && k(S, null, n3.fallback);
|
|
20539
|
+
return i3 && (i3.__u &= -33), [k(S, null, e3.__a ? null : n3.children), i3];
|
|
20540
|
+
};
|
|
20541
|
+
var H2 = function(n3, t5, e3) {
|
|
20542
|
+
if (++e3[1] === e3[0] && n3.l.delete(t5), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size)) for (e3 = n3.i; e3; ) {
|
|
20543
|
+
for (; e3.length > 3; ) e3.pop()();
|
|
20544
|
+
if (e3[1] < e3[0]) break;
|
|
20545
|
+
n3.i = e3 = e3[2];
|
|
20546
|
+
}
|
|
20547
|
+
};
|
|
20548
|
+
(B3.prototype = new C()).__a = function(n3) {
|
|
20549
|
+
var t5 = this, e3 = j3(t5.__v), r3 = t5.l.get(n3);
|
|
20550
|
+
return r3[0]++, function(u3) {
|
|
20551
|
+
var o3 = function() {
|
|
20552
|
+
t5.props.revealOrder ? (r3.push(u3), H2(t5, n3, r3)) : u3();
|
|
20553
|
+
};
|
|
20554
|
+
e3 ? e3(o3) : o3();
|
|
20555
|
+
};
|
|
20556
|
+
}, B3.prototype.render = function(n3) {
|
|
20557
|
+
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
20558
|
+
var t5 = F(n3.children);
|
|
20559
|
+
n3.revealOrder && "b" === n3.revealOrder[0] && t5.reverse();
|
|
20560
|
+
for (var e3 = t5.length; e3--; ) this.l.set(t5[e3], this.i = [1, 0, this.i]);
|
|
20561
|
+
return n3.children;
|
|
20562
|
+
}, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
|
|
20563
|
+
var n3 = this;
|
|
20564
|
+
this.l.forEach(function(t5, e3) {
|
|
20565
|
+
H2(n3, e3, t5);
|
|
20566
|
+
});
|
|
20567
|
+
};
|
|
20568
|
+
var q3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103;
|
|
20569
|
+
var G2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
|
|
20570
|
+
var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
|
|
20571
|
+
var K2 = /[A-Z0-9]/g;
|
|
20572
|
+
var Q2 = "undefined" != typeof document;
|
|
20573
|
+
var X2 = function(n3) {
|
|
20574
|
+
return ("undefined" != typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
|
|
20575
|
+
};
|
|
20576
|
+
C.prototype.isReactComponent = true, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t5) {
|
|
20577
|
+
Object.defineProperty(C.prototype, t5, { configurable: true, get: function() {
|
|
20578
|
+
return this["UNSAFE_" + t5];
|
|
20579
|
+
}, set: function(n3) {
|
|
20580
|
+
Object.defineProperty(this, t5, { configurable: true, writable: true, value: n3 });
|
|
20581
|
+
} });
|
|
20582
|
+
});
|
|
20583
|
+
var en2 = l.event;
|
|
20584
|
+
l.event = function(n3) {
|
|
20585
|
+
return en2 && (n3 = en2(n3)), n3.persist = function() {
|
|
20586
|
+
}, n3.isPropagationStopped = function() {
|
|
20587
|
+
return this.cancelBubble;
|
|
20588
|
+
}, n3.isDefaultPrevented = function() {
|
|
20589
|
+
return this.defaultPrevented;
|
|
20590
|
+
}, n3.nativeEvent = n3;
|
|
20591
|
+
};
|
|
20592
|
+
var rn;
|
|
20593
|
+
var un = { configurable: true, get: function() {
|
|
20594
|
+
return this.class;
|
|
20595
|
+
} };
|
|
20596
|
+
var on = l.vnode;
|
|
20597
|
+
l.vnode = function(n3) {
|
|
20598
|
+
"string" == typeof n3.type && (function(n4) {
|
|
20599
|
+
var t5 = n4.props, e3 = n4.type, u3 = {}, o3 = -1 == e3.indexOf("-");
|
|
20600
|
+
for (var i3 in t5) {
|
|
20601
|
+
var l3 = t5[i3];
|
|
20602
|
+
if (!("value" === i3 && "defaultValue" in t5 && null == l3 || Q2 && "children" === i3 && "noscript" === e3 || "class" === i3 || "className" === i3)) {
|
|
20603
|
+
var c3 = i3.toLowerCase();
|
|
20604
|
+
"defaultValue" === i3 && "value" in t5 && null == t5.value ? i3 = "value" : "download" === i3 && true === l3 ? l3 = "" : "translate" === c3 && "no" === l3 ? l3 = false : "o" === c3[0] && "n" === c3[1] ? "ondoubleclick" === c3 ? i3 = "ondblclick" : "onchange" !== c3 || "input" !== e3 && "textarea" !== e3 || X2(t5.type) ? "onfocus" === c3 ? i3 = "onfocusin" : "onblur" === c3 ? i3 = "onfocusout" : J2.test(i3) && (i3 = c3) : c3 = i3 = "oninput" : o3 && G2.test(i3) ? i3 = i3.replace(K2, "-$&").toLowerCase() : null === l3 && (l3 = void 0), "oninput" === c3 && u3[i3 = c3] && (i3 = "oninputCapture"), u3[i3] = l3;
|
|
20605
|
+
}
|
|
20606
|
+
}
|
|
20607
|
+
"select" == e3 && (u3.multiple && Array.isArray(u3.value) && (u3.value = F(t5.children).forEach(function(n5) {
|
|
20608
|
+
n5.props.selected = -1 != u3.value.indexOf(n5.props.value);
|
|
20609
|
+
})), null != u3.defaultValue && (u3.value = F(t5.children).forEach(function(n5) {
|
|
20610
|
+
n5.props.selected = u3.multiple ? -1 != u3.defaultValue.indexOf(n5.props.value) : u3.defaultValue == n5.props.value;
|
|
20611
|
+
}))), t5.class && !t5.className ? (u3.class = t5.class, Object.defineProperty(u3, "className", un)) : t5.className && (u3.class = u3.className = t5.className), n4.props = u3;
|
|
20612
|
+
})(n3), n3.$$typeof = q3, on && on(n3);
|
|
20613
|
+
};
|
|
20614
|
+
var ln = l.__r;
|
|
20615
|
+
l.__r = function(n3) {
|
|
20616
|
+
ln && ln(n3), rn = n3.__c;
|
|
20617
|
+
};
|
|
20618
|
+
var cn = l.diffed;
|
|
20619
|
+
l.diffed = function(n3) {
|
|
20620
|
+
cn && cn(n3);
|
|
20621
|
+
var t5 = n3.props, e3 = n3.__e;
|
|
20622
|
+
null != e3 && "textarea" === n3.type && "value" in t5 && t5.value !== e3.value && (e3.value = null == t5.value ? "" : t5.value), rn = null;
|
|
20623
|
+
};
|
|
20624
|
+
|
|
20444
20625
|
// node_modules/marked/lib/marked.esm.js
|
|
20445
20626
|
function _getDefaults() {
|
|
20446
20627
|
return {
|
|
@@ -22577,187 +22758,6 @@ var parseInline = marked.parseInline;
|
|
|
22577
22758
|
var parser = _Parser.parse;
|
|
22578
22759
|
var lexer = _Lexer.lex;
|
|
22579
22760
|
|
|
22580
|
-
// node_modules/preact/compat/dist/compat.module.js
|
|
22581
|
-
function g3(n3, t5) {
|
|
22582
|
-
for (var e3 in t5) n3[e3] = t5[e3];
|
|
22583
|
-
return n3;
|
|
22584
|
-
}
|
|
22585
|
-
function E2(n3, t5) {
|
|
22586
|
-
for (var e3 in n3) if ("__source" !== e3 && !(e3 in t5)) return true;
|
|
22587
|
-
for (var r3 in t5) if ("__source" !== r3 && n3[r3] !== t5[r3]) return true;
|
|
22588
|
-
return false;
|
|
22589
|
-
}
|
|
22590
|
-
function M2(n3, t5) {
|
|
22591
|
-
this.props = n3, this.context = t5;
|
|
22592
|
-
}
|
|
22593
|
-
function N2(n3, e3) {
|
|
22594
|
-
function r3(n4) {
|
|
22595
|
-
var t5 = this.props.ref;
|
|
22596
|
-
return t5 != n4.ref && t5 && ("function" == typeof t5 ? t5(null) : t5.current = null), e3 ? !e3(this.props, n4) || t5 != n4.ref : E2(this.props, n4);
|
|
22597
|
-
}
|
|
22598
|
-
function u3(e4) {
|
|
22599
|
-
return this.shouldComponentUpdate = r3, k(n3, e4);
|
|
22600
|
-
}
|
|
22601
|
-
return u3.displayName = "Memo(" + (n3.displayName || n3.name) + ")", u3.__f = u3.prototype.isReactComponent = true, u3.type = n3, u3;
|
|
22602
|
-
}
|
|
22603
|
-
(M2.prototype = new C()).isPureReactComponent = true, M2.prototype.shouldComponentUpdate = function(n3, t5) {
|
|
22604
|
-
return E2(this.props, n3) || E2(this.state, t5);
|
|
22605
|
-
};
|
|
22606
|
-
var T3 = l.__b;
|
|
22607
|
-
l.__b = function(n3) {
|
|
22608
|
-
n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
|
|
22609
|
-
};
|
|
22610
|
-
var A3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
22611
|
-
var O2 = l.__e;
|
|
22612
|
-
l.__e = function(n3, t5, e3, r3) {
|
|
22613
|
-
if (n3.then) {
|
|
22614
|
-
for (var u3, o3 = t5; o3 = o3.__; ) if ((u3 = o3.__c) && u3.__c) return null == t5.__e && (t5.__e = e3.__e, t5.__k = e3.__k), u3.__c(n3, t5);
|
|
22615
|
-
}
|
|
22616
|
-
O2(n3, t5, e3, r3);
|
|
22617
|
-
};
|
|
22618
|
-
var U2 = l.unmount;
|
|
22619
|
-
function V2(n3, t5, e3) {
|
|
22620
|
-
return n3 && (n3.__c && n3.__c.__H && (n3.__c.__H.__.forEach(function(n4) {
|
|
22621
|
-
"function" == typeof n4.__c && n4.__c();
|
|
22622
|
-
}), n3.__c.__H = null), null != (n3 = g3({}, n3)).__c && (n3.__c.__P === e3 && (n3.__c.__P = t5), n3.__c.__e = true, n3.__c = null), n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
22623
|
-
return V2(n4, t5, e3);
|
|
22624
|
-
})), n3;
|
|
22625
|
-
}
|
|
22626
|
-
function W2(n3, t5, e3) {
|
|
22627
|
-
return n3 && e3 && (n3.__v = null, n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
22628
|
-
return W2(n4, t5, e3);
|
|
22629
|
-
}), n3.__c && n3.__c.__P === t5 && (n3.__e && e3.appendChild(n3.__e), n3.__c.__e = true, n3.__c.__P = e3)), n3;
|
|
22630
|
-
}
|
|
22631
|
-
function P3() {
|
|
22632
|
-
this.__u = 0, this.o = null, this.__b = null;
|
|
22633
|
-
}
|
|
22634
|
-
function j3(n3) {
|
|
22635
|
-
var t5 = n3.__ && n3.__.__c;
|
|
22636
|
-
return t5 && t5.__a && t5.__a(n3);
|
|
22637
|
-
}
|
|
22638
|
-
function B3() {
|
|
22639
|
-
this.i = null, this.l = null;
|
|
22640
|
-
}
|
|
22641
|
-
l.unmount = function(n3) {
|
|
22642
|
-
var t5 = n3.__c;
|
|
22643
|
-
t5 && (t5.__z = true), t5 && t5.__R && t5.__R(), t5 && 32 & n3.__u && (n3.type = null), U2 && U2(n3);
|
|
22644
|
-
}, (P3.prototype = new C()).__c = function(n3, t5) {
|
|
22645
|
-
var e3 = t5.__c, r3 = this;
|
|
22646
|
-
null == r3.o && (r3.o = []), r3.o.push(e3);
|
|
22647
|
-
var u3 = j3(r3.__v), o3 = false, i3 = function() {
|
|
22648
|
-
o3 || r3.__z || (o3 = true, e3.__R = null, u3 ? u3(c3) : c3());
|
|
22649
|
-
};
|
|
22650
|
-
e3.__R = i3;
|
|
22651
|
-
var l3 = e3.__P;
|
|
22652
|
-
e3.__P = null;
|
|
22653
|
-
var c3 = function() {
|
|
22654
|
-
if (!--r3.__u) {
|
|
22655
|
-
if (r3.state.__a) {
|
|
22656
|
-
var n4 = r3.state.__a;
|
|
22657
|
-
r3.__v.__k[0] = W2(n4, n4.__c.__P, n4.__c.__O);
|
|
22658
|
-
}
|
|
22659
|
-
var t6;
|
|
22660
|
-
for (r3.setState({ __a: r3.__b = null }); t6 = r3.o.pop(); ) t6.__P = l3, t6.forceUpdate();
|
|
22661
|
-
}
|
|
22662
|
-
};
|
|
22663
|
-
r3.__u++ || 32 & t5.__u || r3.setState({ __a: r3.__b = r3.__v.__k[0] }), n3.then(i3, i3);
|
|
22664
|
-
}, P3.prototype.componentWillUnmount = function() {
|
|
22665
|
-
this.o = [];
|
|
22666
|
-
}, P3.prototype.render = function(n3, e3) {
|
|
22667
|
-
if (this.__b) {
|
|
22668
|
-
if (this.__v.__k) {
|
|
22669
|
-
var r3 = document.createElement("div"), o3 = this.__v.__k[0].__c;
|
|
22670
|
-
this.__v.__k[0] = V2(this.__b, r3, o3.__O = o3.__P);
|
|
22671
|
-
}
|
|
22672
|
-
this.__b = null;
|
|
22673
|
-
}
|
|
22674
|
-
var i3 = e3.__a && k(S, null, n3.fallback);
|
|
22675
|
-
return i3 && (i3.__u &= -33), [k(S, null, e3.__a ? null : n3.children), i3];
|
|
22676
|
-
};
|
|
22677
|
-
var H2 = function(n3, t5, e3) {
|
|
22678
|
-
if (++e3[1] === e3[0] && n3.l.delete(t5), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size)) for (e3 = n3.i; e3; ) {
|
|
22679
|
-
for (; e3.length > 3; ) e3.pop()();
|
|
22680
|
-
if (e3[1] < e3[0]) break;
|
|
22681
|
-
n3.i = e3 = e3[2];
|
|
22682
|
-
}
|
|
22683
|
-
};
|
|
22684
|
-
(B3.prototype = new C()).__a = function(n3) {
|
|
22685
|
-
var t5 = this, e3 = j3(t5.__v), r3 = t5.l.get(n3);
|
|
22686
|
-
return r3[0]++, function(u3) {
|
|
22687
|
-
var o3 = function() {
|
|
22688
|
-
t5.props.revealOrder ? (r3.push(u3), H2(t5, n3, r3)) : u3();
|
|
22689
|
-
};
|
|
22690
|
-
e3 ? e3(o3) : o3();
|
|
22691
|
-
};
|
|
22692
|
-
}, B3.prototype.render = function(n3) {
|
|
22693
|
-
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
22694
|
-
var t5 = F(n3.children);
|
|
22695
|
-
n3.revealOrder && "b" === n3.revealOrder[0] && t5.reverse();
|
|
22696
|
-
for (var e3 = t5.length; e3--; ) this.l.set(t5[e3], this.i = [1, 0, this.i]);
|
|
22697
|
-
return n3.children;
|
|
22698
|
-
}, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
|
|
22699
|
-
var n3 = this;
|
|
22700
|
-
this.l.forEach(function(t5, e3) {
|
|
22701
|
-
H2(n3, e3, t5);
|
|
22702
|
-
});
|
|
22703
|
-
};
|
|
22704
|
-
var q3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103;
|
|
22705
|
-
var G2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
|
|
22706
|
-
var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
|
|
22707
|
-
var K2 = /[A-Z0-9]/g;
|
|
22708
|
-
var Q2 = "undefined" != typeof document;
|
|
22709
|
-
var X2 = function(n3) {
|
|
22710
|
-
return ("undefined" != typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
|
|
22711
|
-
};
|
|
22712
|
-
C.prototype.isReactComponent = true, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t5) {
|
|
22713
|
-
Object.defineProperty(C.prototype, t5, { configurable: true, get: function() {
|
|
22714
|
-
return this["UNSAFE_" + t5];
|
|
22715
|
-
}, set: function(n3) {
|
|
22716
|
-
Object.defineProperty(this, t5, { configurable: true, writable: true, value: n3 });
|
|
22717
|
-
} });
|
|
22718
|
-
});
|
|
22719
|
-
var en2 = l.event;
|
|
22720
|
-
l.event = function(n3) {
|
|
22721
|
-
return en2 && (n3 = en2(n3)), n3.persist = function() {
|
|
22722
|
-
}, n3.isPropagationStopped = function() {
|
|
22723
|
-
return this.cancelBubble;
|
|
22724
|
-
}, n3.isDefaultPrevented = function() {
|
|
22725
|
-
return this.defaultPrevented;
|
|
22726
|
-
}, n3.nativeEvent = n3;
|
|
22727
|
-
};
|
|
22728
|
-
var rn;
|
|
22729
|
-
var un = { configurable: true, get: function() {
|
|
22730
|
-
return this.class;
|
|
22731
|
-
} };
|
|
22732
|
-
var on = l.vnode;
|
|
22733
|
-
l.vnode = function(n3) {
|
|
22734
|
-
"string" == typeof n3.type && (function(n4) {
|
|
22735
|
-
var t5 = n4.props, e3 = n4.type, u3 = {}, o3 = -1 == e3.indexOf("-");
|
|
22736
|
-
for (var i3 in t5) {
|
|
22737
|
-
var l3 = t5[i3];
|
|
22738
|
-
if (!("value" === i3 && "defaultValue" in t5 && null == l3 || Q2 && "children" === i3 && "noscript" === e3 || "class" === i3 || "className" === i3)) {
|
|
22739
|
-
var c3 = i3.toLowerCase();
|
|
22740
|
-
"defaultValue" === i3 && "value" in t5 && null == t5.value ? i3 = "value" : "download" === i3 && true === l3 ? l3 = "" : "translate" === c3 && "no" === l3 ? l3 = false : "o" === c3[0] && "n" === c3[1] ? "ondoubleclick" === c3 ? i3 = "ondblclick" : "onchange" !== c3 || "input" !== e3 && "textarea" !== e3 || X2(t5.type) ? "onfocus" === c3 ? i3 = "onfocusin" : "onblur" === c3 ? i3 = "onfocusout" : J2.test(i3) && (i3 = c3) : c3 = i3 = "oninput" : o3 && G2.test(i3) ? i3 = i3.replace(K2, "-$&").toLowerCase() : null === l3 && (l3 = void 0), "oninput" === c3 && u3[i3 = c3] && (i3 = "oninputCapture"), u3[i3] = l3;
|
|
22741
|
-
}
|
|
22742
|
-
}
|
|
22743
|
-
"select" == e3 && (u3.multiple && Array.isArray(u3.value) && (u3.value = F(t5.children).forEach(function(n5) {
|
|
22744
|
-
n5.props.selected = -1 != u3.value.indexOf(n5.props.value);
|
|
22745
|
-
})), null != u3.defaultValue && (u3.value = F(t5.children).forEach(function(n5) {
|
|
22746
|
-
n5.props.selected = u3.multiple ? -1 != u3.defaultValue.indexOf(n5.props.value) : u3.defaultValue == n5.props.value;
|
|
22747
|
-
}))), t5.class && !t5.className ? (u3.class = t5.class, Object.defineProperty(u3, "className", un)) : t5.className && (u3.class = u3.className = t5.className), n4.props = u3;
|
|
22748
|
-
})(n3), n3.$$typeof = q3, on && on(n3);
|
|
22749
|
-
};
|
|
22750
|
-
var ln = l.__r;
|
|
22751
|
-
l.__r = function(n3) {
|
|
22752
|
-
ln && ln(n3), rn = n3.__c;
|
|
22753
|
-
};
|
|
22754
|
-
var cn = l.diffed;
|
|
22755
|
-
l.diffed = function(n3) {
|
|
22756
|
-
cn && cn(n3);
|
|
22757
|
-
var t5 = n3.props, e3 = n3.__e;
|
|
22758
|
-
null != e3 && "textarea" === n3.type && "value" in t5 && t5.value !== e3.value && (e3.value = null == t5.value ? "" : t5.value), rn = null;
|
|
22759
|
-
};
|
|
22760
|
-
|
|
22761
22761
|
// dashboard/src/lib/html.ts
|
|
22762
22762
|
var html4 = htm_module_default.bind(k);
|
|
22763
22763
|
|
|
@@ -23954,15 +23954,6 @@ function ChatPanel() {
|
|
|
23954
23954
|
autoScrollInFlight.current = false;
|
|
23955
23955
|
}, 0);
|
|
23956
23956
|
}, [messages, streaming]);
|
|
23957
|
-
const allMessages = streaming ? [
|
|
23958
|
-
...messages,
|
|
23959
|
-
{
|
|
23960
|
-
id: streaming.id,
|
|
23961
|
-
role: "assistant",
|
|
23962
|
-
text: streaming.text,
|
|
23963
|
-
reasoning: streaming.reasoning
|
|
23964
|
-
}
|
|
23965
|
-
] : messages;
|
|
23966
23957
|
const resolveModal = q2(async (kind, choice, text) => {
|
|
23967
23958
|
try {
|
|
23968
23959
|
await api("/modal/resolve", {
|
|
@@ -24107,19 +24098,7 @@ function ChatPanel() {
|
|
|
24107
24098
|
|
|
24108
24099
|
<div class="chat-body">
|
|
24109
24100
|
<div class="chat-main">
|
|
24110
|
-
|
|
24111
|
-
${allMessages.length === 0 ? html4`<div class="chat-empty">
|
|
24112
|
-
${t4("chat.noConversation")}
|
|
24113
|
-
</div>` : allMessages.map(
|
|
24114
|
-
(m3) => html4`
|
|
24115
|
-
<${ChatMessage}
|
|
24116
|
-
key=${m3.id}
|
|
24117
|
-
msg=${m3}
|
|
24118
|
-
streaming=${Boolean(streaming && streaming.id === m3.id)}
|
|
24119
|
-
/>
|
|
24120
|
-
`
|
|
24121
|
-
)}
|
|
24122
|
-
</div>
|
|
24101
|
+
<${ChatFeed} messages=${messages} streaming=${streaming} innerRef=${feedRef} />
|
|
24123
24102
|
|
|
24124
24103
|
<div class="chat-input-area" style="position:relative">
|
|
24125
24104
|
${popoverKind && popoverItems.length > 0 ? html4`
|
|
@@ -24181,7 +24160,32 @@ function ChatPanel() {
|
|
|
24181
24160
|
</div>
|
|
24182
24161
|
`;
|
|
24183
24162
|
}
|
|
24184
|
-
function
|
|
24163
|
+
var ChatFeed = N2(function ChatFeed2({ messages, streaming, innerRef }) {
|
|
24164
|
+
useLang();
|
|
24165
|
+
const allMessages = streaming ? [
|
|
24166
|
+
...messages,
|
|
24167
|
+
{
|
|
24168
|
+
id: streaming.id,
|
|
24169
|
+
role: "assistant",
|
|
24170
|
+
text: streaming.text,
|
|
24171
|
+
reasoning: streaming.reasoning
|
|
24172
|
+
}
|
|
24173
|
+
] : messages;
|
|
24174
|
+
return html4`
|
|
24175
|
+
<div class="chat-feed" ref=${innerRef}>
|
|
24176
|
+
${allMessages.length === 0 ? html4`<div class="chat-empty">${t4("chat.noConversation")}</div>` : allMessages.map(
|
|
24177
|
+
(m3) => html4`
|
|
24178
|
+
<${ChatMessage}
|
|
24179
|
+
key=${m3.id}
|
|
24180
|
+
msg=${m3}
|
|
24181
|
+
streaming=${Boolean(streaming && streaming.id === m3.id)}
|
|
24182
|
+
/>
|
|
24183
|
+
`
|
|
24184
|
+
)}
|
|
24185
|
+
</div>
|
|
24186
|
+
`;
|
|
24187
|
+
});
|
|
24188
|
+
var SideRail = N2(function SideRail2({ stats, budgetUsd, activePlan }) {
|
|
24185
24189
|
useLang();
|
|
24186
24190
|
if (!stats && !activePlan) return html4`<aside class="chat-rail"></aside>`;
|
|
24187
24191
|
const cachePct = stats ? stats.cacheHitRatio * 100 : 0;
|
|
@@ -24218,7 +24222,7 @@ function SideRail({ stats, budgetUsd, activePlan }) {
|
|
|
24218
24222
|
` : null}
|
|
24219
24223
|
</aside>
|
|
24220
24224
|
`;
|
|
24221
|
-
}
|
|
24225
|
+
});
|
|
24222
24226
|
function ActivePlanCard({ plan }) {
|
|
24223
24227
|
useLang();
|
|
24224
24228
|
const dots = [];
|
|
@@ -24304,7 +24308,7 @@ function InFlightRow({
|
|
|
24304
24308
|
</div>
|
|
24305
24309
|
`;
|
|
24306
24310
|
}
|
|
24307
|
-
|
|
24311
|
+
var ChatStatusBar = N2(function ChatStatusBar2({ stats, model }) {
|
|
24308
24312
|
useLang();
|
|
24309
24313
|
if (!stats) {
|
|
24310
24314
|
return html4`
|
|
@@ -24353,7 +24357,7 @@ function ChatStatusBar({ stats, model }) {
|
|
|
24353
24357
|
` : null}
|
|
24354
24358
|
</div>
|
|
24355
24359
|
`;
|
|
24356
|
-
}
|
|
24360
|
+
});
|
|
24357
24361
|
|
|
24358
24362
|
// dashboard/src/panels/hooks.ts
|
|
24359
24363
|
function buildMatrix(data) {
|
|
@@ -28482,7 +28486,10 @@ function ChangesPanel() {
|
|
|
28482
28486
|
onToggleReview=${toggleReviewMode}
|
|
28483
28487
|
files=${openFiles}
|
|
28484
28488
|
activePath=${activeFilePath}
|
|
28485
|
-
onSelect=${
|
|
28489
|
+
onSelect=${(path) => {
|
|
28490
|
+
setActiveFilePath(path);
|
|
28491
|
+
setReviewMode(false);
|
|
28492
|
+
}}
|
|
28486
28493
|
onClose=${closeFile}
|
|
28487
28494
|
/>
|
|
28488
28495
|
<div class="review-controls" style=${{ display: "flex", alignItems: "center", gap: "8px", padding: "6px 12px", borderBottom: "1px solid var(--bd)", fontSize: "12px" }}>
|
|
@@ -28659,7 +28666,7 @@ function fmtCost2(usd, currency) {
|
|
|
28659
28666
|
}
|
|
28660
28667
|
return `$${usd.toFixed(4)}`;
|
|
28661
28668
|
}
|
|
28662
|
-
function
|
|
28669
|
+
function ChatStatusBar3({ stats, model }) {
|
|
28663
28670
|
useLang();
|
|
28664
28671
|
if (!stats) {
|
|
28665
28672
|
return html6`
|
|
@@ -29197,6 +29204,9 @@ function ChatPane(props) {
|
|
|
29197
29204
|
const [model, setModel] = d2(null);
|
|
29198
29205
|
const shouldAutoScroll = A2(true);
|
|
29199
29206
|
const feedRef = A2(null);
|
|
29207
|
+
const streamBufRef = A2(null);
|
|
29208
|
+
const streamRafRef = A2(null);
|
|
29209
|
+
const autoScrollInFlight = A2(false);
|
|
29200
29210
|
const [slashCommands, setSlashCommands] = d2([]);
|
|
29201
29211
|
const [popoverKind, setPopoverKind] = d2(null);
|
|
29202
29212
|
const [popoverItems, setPopoverItems] = d2([]);
|
|
@@ -29233,22 +29243,54 @@ function ChatPane(props) {
|
|
|
29233
29243
|
}, []);
|
|
29234
29244
|
y2(() => {
|
|
29235
29245
|
let cancelled = false;
|
|
29236
|
-
|
|
29246
|
+
const tick = async () => {
|
|
29237
29247
|
try {
|
|
29238
29248
|
const data = await api("/overview");
|
|
29239
|
-
if (
|
|
29240
|
-
|
|
29241
|
-
|
|
29242
|
-
}
|
|
29249
|
+
if (cancelled) return;
|
|
29250
|
+
setStats(data.stats ?? null);
|
|
29251
|
+
setModel(data.model ?? null);
|
|
29243
29252
|
} catch {
|
|
29244
29253
|
}
|
|
29245
|
-
}
|
|
29254
|
+
};
|
|
29255
|
+
tick();
|
|
29256
|
+
const t5 = setInterval(tick, 2500);
|
|
29246
29257
|
return () => {
|
|
29247
29258
|
cancelled = true;
|
|
29259
|
+
clearInterval(t5);
|
|
29248
29260
|
};
|
|
29249
29261
|
}, []);
|
|
29262
|
+
const flushStreaming = q2(() => {
|
|
29263
|
+
streamRafRef.current = null;
|
|
29264
|
+
if (streamBufRef.current) setStreaming(streamBufRef.current);
|
|
29265
|
+
}, []);
|
|
29266
|
+
const cancelStreamingRaf = q2(() => {
|
|
29267
|
+
if (streamRafRef.current !== null) {
|
|
29268
|
+
cancelAnimationFrame(streamRafRef.current);
|
|
29269
|
+
streamRafRef.current = null;
|
|
29270
|
+
}
|
|
29271
|
+
streamBufRef.current = null;
|
|
29272
|
+
}, []);
|
|
29273
|
+
const refetchCanonicalState = q2(async () => {
|
|
29274
|
+
try {
|
|
29275
|
+
const data = await api("/messages");
|
|
29276
|
+
setMessages(data.messages ?? []);
|
|
29277
|
+
setBusy(Boolean(data.busy));
|
|
29278
|
+
cancelStreamingRaf();
|
|
29279
|
+
setStreaming(null);
|
|
29280
|
+
setActiveTool(null);
|
|
29281
|
+
} catch {
|
|
29282
|
+
}
|
|
29283
|
+
}, [cancelStreamingRaf]);
|
|
29250
29284
|
y2(() => {
|
|
29251
29285
|
const es = new EventSource(`/api/events?token=${TOKEN}`);
|
|
29286
|
+
let firstOpen = true;
|
|
29287
|
+
es.onopen = () => {
|
|
29288
|
+
if (firstOpen) {
|
|
29289
|
+
firstOpen = false;
|
|
29290
|
+
return;
|
|
29291
|
+
}
|
|
29292
|
+
void refetchCanonicalState();
|
|
29293
|
+
};
|
|
29252
29294
|
es.onmessage = (ev) => {
|
|
29253
29295
|
let dash;
|
|
29254
29296
|
try {
|
|
@@ -29266,14 +29308,20 @@ function ChatPane(props) {
|
|
|
29266
29308
|
return;
|
|
29267
29309
|
}
|
|
29268
29310
|
if (dash.kind === "assistant_delta") {
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
|
|
29272
|
-
|
|
29273
|
-
|
|
29311
|
+
const cur = streamBufRef.current;
|
|
29312
|
+
const baseId = cur?.id === dash.id ? cur : null;
|
|
29313
|
+
streamBufRef.current = {
|
|
29314
|
+
id: dash.id,
|
|
29315
|
+
text: (baseId?.text ?? "") + (dash.contentDelta ?? ""),
|
|
29316
|
+
reasoning: (baseId?.reasoning ?? "") + (dash.reasoningDelta ?? "")
|
|
29317
|
+
};
|
|
29318
|
+
if (streamRafRef.current === null) {
|
|
29319
|
+
streamRafRef.current = requestAnimationFrame(flushStreaming);
|
|
29320
|
+
}
|
|
29274
29321
|
return;
|
|
29275
29322
|
}
|
|
29276
29323
|
if (dash.kind === "assistant_final") {
|
|
29324
|
+
cancelStreamingRaf();
|
|
29277
29325
|
setStreaming(null);
|
|
29278
29326
|
setMessages((prev) => [
|
|
29279
29327
|
...prev,
|
|
@@ -29308,18 +29356,26 @@ function ChatPane(props) {
|
|
|
29308
29356
|
setError(t4("chat.eventStreamError"));
|
|
29309
29357
|
setTimeout(() => setError(null), 3e3);
|
|
29310
29358
|
};
|
|
29311
|
-
return () =>
|
|
29312
|
-
|
|
29359
|
+
return () => {
|
|
29360
|
+
es.close();
|
|
29361
|
+
cancelStreamingRaf();
|
|
29362
|
+
};
|
|
29363
|
+
}, [refetchCanonicalState, cancelStreamingRaf]);
|
|
29313
29364
|
y2(() => {
|
|
29314
29365
|
if (!shouldAutoScroll.current) return;
|
|
29315
29366
|
const el = feedRef.current;
|
|
29316
29367
|
if (!el) return;
|
|
29368
|
+
autoScrollInFlight.current = true;
|
|
29317
29369
|
el.scrollTop = el.scrollHeight;
|
|
29370
|
+
setTimeout(() => {
|
|
29371
|
+
autoScrollInFlight.current = false;
|
|
29372
|
+
}, 0);
|
|
29318
29373
|
}, [messages, streaming]);
|
|
29319
29374
|
y2(() => {
|
|
29320
29375
|
const el = feedRef.current;
|
|
29321
29376
|
if (!el) return;
|
|
29322
29377
|
const onScroll = () => {
|
|
29378
|
+
if (autoScrollInFlight.current) return;
|
|
29323
29379
|
const distFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
29324
29380
|
shouldAutoScroll.current = distFromBottom < 80;
|
|
29325
29381
|
};
|
|
@@ -29508,7 +29564,6 @@ ${commentRefs}` : commentRefs;
|
|
|
29508
29564
|
</div>
|
|
29509
29565
|
` : null}
|
|
29510
29566
|
<div style=${{ display: "flex", gap: "8px", alignItems: "flex-end", position: "relative" }}>
|
|
29511
|
-
<button style=${{ background: "transparent", border: "none", color: "var(--fg-3)", padding: "8px", cursor: "pointer", fontSize: "18px", flexShrink: 0 }}>+</button>
|
|
29512
29567
|
<div style=${{ flex: 1, position: "relative" }}>
|
|
29513
29568
|
${popoverKind && popoverItems.length > 0 ? html6`
|
|
29514
29569
|
<div class="popover" style="position:absolute;bottom:calc(100% + 6px);left:0;width:380px;max-height:280px;overflow-y:auto;z-index:10">
|
|
@@ -29551,7 +29606,7 @@ ${commentRefs}` : commentRefs;
|
|
|
29551
29606
|
</div>
|
|
29552
29607
|
</div>
|
|
29553
29608
|
</div>
|
|
29554
|
-
<${
|
|
29609
|
+
<${ChatStatusBar3} stats=${stats} model=${model} />
|
|
29555
29610
|
</div>
|
|
29556
29611
|
`;
|
|
29557
29612
|
}
|