teodor-new-chat-ui 4.3.308 → 4.3.309
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.esm.js +102 -104
- package/dist/index.umd.js +7 -7
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -482,7 +482,7 @@ function _m() {
|
|
|
482
482
|
function Ce(k) {
|
|
483
483
|
return typeof k == "object" && k !== null && k.$$typeof === t;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Pe() {
|
|
486
486
|
{
|
|
487
487
|
if (Tt.current) {
|
|
488
488
|
var k = F(Tt.current.type);
|
|
@@ -500,7 +500,7 @@ Check the render method of \`` + k + "`.";
|
|
|
500
500
|
var pe = {};
|
|
501
501
|
function K(k) {
|
|
502
502
|
{
|
|
503
|
-
var U =
|
|
503
|
+
var U = Pe();
|
|
504
504
|
if (!U) {
|
|
505
505
|
var le = typeof k == "string" ? k : k.displayName || k.name;
|
|
506
506
|
le && (U = `
|
|
@@ -587,7 +587,7 @@ Check the top-level render call using <` + le + ">.");
|
|
|
587
587
|
var Ue = "";
|
|
588
588
|
(k === void 0 || typeof k == "object" && k !== null && Object.keys(k).length === 0) && (Ue += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
589
589
|
var jt = L();
|
|
590
|
-
jt ? Ue += jt : Ue +=
|
|
590
|
+
jt ? Ue += jt : Ue += Pe();
|
|
591
591
|
var Ct;
|
|
592
592
|
k === null ? Ct = "null" : rt(k) ? Ct = "array" : k !== void 0 && k.$$typeof === t ? (Ct = "<" + (F(k.type) || "Unknown") + " />", Ue = " Did you accidentally export a JSX literal instead of a component?") : Ct = typeof k, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ct, Ue);
|
|
593
593
|
}
|
|
@@ -874,10 +874,10 @@ const fg = (e) => {
|
|
|
874
874
|
asap: mg,
|
|
875
875
|
isIterable: gg
|
|
876
876
|
};
|
|
877
|
-
function
|
|
877
|
+
function Oe(e, t, n, r, o) {
|
|
878
878
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
879
879
|
}
|
|
880
|
-
j.inherits(
|
|
880
|
+
j.inherits(Oe, Error, {
|
|
881
881
|
toJSON: function() {
|
|
882
882
|
return {
|
|
883
883
|
// Standard
|
|
@@ -898,7 +898,7 @@ j.inherits(Pe, Error, {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
});
|
|
901
|
-
const ru =
|
|
901
|
+
const ru = Oe.prototype, ou = {};
|
|
902
902
|
[
|
|
903
903
|
"ERR_BAD_OPTION_VALUE",
|
|
904
904
|
"ERR_BAD_OPTION",
|
|
@@ -916,15 +916,15 @@ const ru = Pe.prototype, ou = {};
|
|
|
916
916
|
].forEach((e) => {
|
|
917
917
|
ou[e] = { value: e };
|
|
918
918
|
});
|
|
919
|
-
Object.defineProperties(
|
|
919
|
+
Object.defineProperties(Oe, ou);
|
|
920
920
|
Object.defineProperty(ru, "isAxiosError", { value: !0 });
|
|
921
|
-
|
|
921
|
+
Oe.from = (e, t, n, r, o, s) => {
|
|
922
922
|
const i = Object.create(ru);
|
|
923
923
|
j.toFlatObject(e, i, function(d) {
|
|
924
924
|
return d !== Error.prototype;
|
|
925
925
|
}, (c) => c !== "isAxiosError");
|
|
926
926
|
const a = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
|
|
927
|
-
return
|
|
927
|
+
return Oe.call(i, a, l, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
|
|
928
928
|
};
|
|
929
929
|
const xg = null;
|
|
930
930
|
function _i(e) {
|
|
@@ -964,7 +964,7 @@ function bs(e, t, n) {
|
|
|
964
964
|
if (j.isBoolean(x))
|
|
965
965
|
return x.toString();
|
|
966
966
|
if (!l && j.isBlob(x))
|
|
967
|
-
throw new
|
|
967
|
+
throw new Oe("Blob is not supported. Use a Buffer instead.");
|
|
968
968
|
return j.isArrayBuffer(x) || j.isTypedArray(x) ? l && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
|
|
969
969
|
}
|
|
970
970
|
function d(x, m, v) {
|
|
@@ -1215,7 +1215,7 @@ const co = {
|
|
|
1215
1215
|
return JSON.parse(t, this.parseReviver);
|
|
1216
1216
|
} catch (a) {
|
|
1217
1217
|
if (i)
|
|
1218
|
-
throw a.name === "SyntaxError" ?
|
|
1218
|
+
throw a.name === "SyntaxError" ? Oe.from(a, Oe.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
return t;
|
|
@@ -1458,16 +1458,16 @@ function uu(e) {
|
|
|
1458
1458
|
return !!(e && e.__CANCEL__);
|
|
1459
1459
|
}
|
|
1460
1460
|
function Ir(e, t, n) {
|
|
1461
|
-
|
|
1461
|
+
Oe.call(this, e ?? "canceled", Oe.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1462
1462
|
}
|
|
1463
|
-
j.inherits(Ir,
|
|
1463
|
+
j.inherits(Ir, Oe, {
|
|
1464
1464
|
__CANCEL__: !0
|
|
1465
1465
|
});
|
|
1466
1466
|
function du(e, t, n) {
|
|
1467
1467
|
const r = n.config.validateStatus;
|
|
1468
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
1468
|
+
!n.status || !r || r(n.status) ? e(n) : t(new Oe(
|
|
1469
1469
|
"Request failed with status code " + n.status,
|
|
1470
|
-
[
|
|
1470
|
+
[Oe.ERR_BAD_REQUEST, Oe.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1471
1471
|
n.config,
|
|
1472
1472
|
n.request,
|
|
1473
1473
|
n
|
|
@@ -1690,16 +1690,16 @@ const pu = (e) => {
|
|
|
1690
1690
|
"onloadend" in v ? v.onloadend = g : v.onreadystatechange = function() {
|
|
1691
1691
|
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1692
1692
|
}, v.onabort = function() {
|
|
1693
|
-
v && (r(new
|
|
1693
|
+
v && (r(new Oe("Request aborted", Oe.ECONNABORTED, e, v)), v = null);
|
|
1694
1694
|
}, v.onerror = function(T) {
|
|
1695
|
-
const S = T && T.message ? T.message : "Network Error", C = new
|
|
1695
|
+
const S = T && T.message ? T.message : "Network Error", C = new Oe(S, Oe.ERR_NETWORK, e, v);
|
|
1696
1696
|
C.event = T || null, r(C), v = null;
|
|
1697
1697
|
}, v.ontimeout = function() {
|
|
1698
1698
|
let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1699
1699
|
const S = o.transitional || lu;
|
|
1700
|
-
o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new
|
|
1700
|
+
o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new Oe(
|
|
1701
1701
|
T,
|
|
1702
|
-
S.clarifyTimeoutError ?
|
|
1702
|
+
S.clarifyTimeoutError ? Oe.ETIMEDOUT : Oe.ECONNABORTED,
|
|
1703
1703
|
e,
|
|
1704
1704
|
v
|
|
1705
1705
|
)), v = null;
|
|
@@ -1710,7 +1710,7 @@ const pu = (e) => {
|
|
|
1710
1710
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1711
1711
|
const w = Fg(o.url);
|
|
1712
1712
|
if (w && Lt.protocols.indexOf(w) === -1) {
|
|
1713
|
-
r(new
|
|
1713
|
+
r(new Oe("Unsupported protocol " + w + ":", Oe.ERR_BAD_REQUEST, e));
|
|
1714
1714
|
return;
|
|
1715
1715
|
}
|
|
1716
1716
|
v.send(s || null);
|
|
@@ -1723,11 +1723,11 @@ const pu = (e) => {
|
|
|
1723
1723
|
if (!o) {
|
|
1724
1724
|
o = !0, a();
|
|
1725
1725
|
const d = c instanceof Error ? c : this.reason;
|
|
1726
|
-
r.abort(d instanceof
|
|
1726
|
+
r.abort(d instanceof Oe ? d : new Ir(d instanceof Error ? d.message : d));
|
|
1727
1727
|
}
|
|
1728
1728
|
};
|
|
1729
1729
|
let i = t && setTimeout(() => {
|
|
1730
|
-
i = null, s(new
|
|
1730
|
+
i = null, s(new Oe(`timeout ${t} of ms exceeded`, Oe.ETIMEDOUT));
|
|
1731
1731
|
}, t);
|
|
1732
1732
|
const a = () => {
|
|
1733
1733
|
e && (i && clearTimeout(i), i = null, e.forEach((c) => {
|
|
@@ -1832,7 +1832,7 @@ const pu = (e) => {
|
|
|
1832
1832
|
let g = m && m[x];
|
|
1833
1833
|
if (g)
|
|
1834
1834
|
return g.call(m);
|
|
1835
|
-
throw new
|
|
1835
|
+
throw new Oe(`Response type '${x}' is not supported`, Oe.ERR_NOT_SUPPORT, v);
|
|
1836
1836
|
});
|
|
1837
1837
|
});
|
|
1838
1838
|
const p = async (x) => {
|
|
@@ -1932,11 +1932,11 @@ const pu = (e) => {
|
|
|
1932
1932
|
});
|
|
1933
1933
|
} catch (_) {
|
|
1934
1934
|
throw I && I(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
|
|
1935
|
-
new
|
|
1935
|
+
new Oe("Network Error", Oe.ERR_NETWORK, x, F),
|
|
1936
1936
|
{
|
|
1937
1937
|
cause: _.cause || _
|
|
1938
1938
|
}
|
|
1939
|
-
) :
|
|
1939
|
+
) : Oe.from(_, _ && _.code, x, F);
|
|
1940
1940
|
}
|
|
1941
1941
|
};
|
|
1942
1942
|
}, ex = /* @__PURE__ */ new Map(), hu = (e) => {
|
|
@@ -1978,7 +1978,7 @@ const Tl = (e) => `- ${e}`, tx = (e) => j.isFunction(e) || e === null || e === !
|
|
|
1978
1978
|
r = e[i];
|
|
1979
1979
|
let a;
|
|
1980
1980
|
if (o = r, !tx(r) && (o = Pi[(a = String(r)).toLowerCase()], o === void 0))
|
|
1981
|
-
throw new
|
|
1981
|
+
throw new Oe(`Unknown adapter '${a}'`);
|
|
1982
1982
|
if (o && (j.isFunction(o) || (o = o.get(t))))
|
|
1983
1983
|
break;
|
|
1984
1984
|
s[a || "#" + i] = o;
|
|
@@ -1990,7 +1990,7 @@ const Tl = (e) => `- ${e}`, tx = (e) => j.isFunction(e) || e === null || e === !
|
|
|
1990
1990
|
let a = n ? i.length > 1 ? `since :
|
|
1991
1991
|
` + i.map(Tl).join(`
|
|
1992
1992
|
`) : " " + Tl(i[0]) : "as no adapter specified";
|
|
1993
|
-
throw new
|
|
1993
|
+
throw new Oe(
|
|
1994
1994
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1995
1995
|
"ERR_NOT_SUPPORT"
|
|
1996
1996
|
);
|
|
@@ -2034,9 +2034,9 @@ Ss.transitional = function(t, n, r) {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
return (s, i, a) => {
|
|
2036
2036
|
if (t === !1)
|
|
2037
|
-
throw new
|
|
2037
|
+
throw new Oe(
|
|
2038
2038
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
2039
|
-
|
|
2039
|
+
Oe.ERR_DEPRECATED
|
|
2040
2040
|
);
|
|
2041
2041
|
return n && !kl[i] && (kl[i] = !0, console.warn(
|
|
2042
2042
|
o(
|
|
@@ -2051,7 +2051,7 @@ Ss.spelling = function(t) {
|
|
|
2051
2051
|
};
|
|
2052
2052
|
function nx(e, t, n) {
|
|
2053
2053
|
if (typeof e != "object")
|
|
2054
|
-
throw new
|
|
2054
|
+
throw new Oe("options must be an object", Oe.ERR_BAD_OPTION_VALUE);
|
|
2055
2055
|
const r = Object.keys(e);
|
|
2056
2056
|
let o = r.length;
|
|
2057
2057
|
for (; o-- > 0; ) {
|
|
@@ -2059,11 +2059,11 @@ function nx(e, t, n) {
|
|
|
2059
2059
|
if (i) {
|
|
2060
2060
|
const a = e[s], l = a === void 0 || i(a, s, e);
|
|
2061
2061
|
if (l !== !0)
|
|
2062
|
-
throw new
|
|
2062
|
+
throw new Oe("option " + s + " must be " + l, Oe.ERR_BAD_OPTION_VALUE);
|
|
2063
2063
|
continue;
|
|
2064
2064
|
}
|
|
2065
2065
|
if (n !== !0)
|
|
2066
|
-
throw new
|
|
2066
|
+
throw new Oe("Unknown option " + s, Oe.ERR_BAD_OPTION);
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
const Do = {
|
|
@@ -2356,7 +2356,7 @@ It.CancelToken = rx;
|
|
|
2356
2356
|
It.isCancel = uu;
|
|
2357
2357
|
It.VERSION = gu;
|
|
2358
2358
|
It.toFormData = bs;
|
|
2359
|
-
It.AxiosError =
|
|
2359
|
+
It.AxiosError = Oe;
|
|
2360
2360
|
It.Cancel = It.CanceledError;
|
|
2361
2361
|
It.all = function(t) {
|
|
2362
2362
|
return Promise.all(t);
|
|
@@ -3169,9 +3169,9 @@ function Bx(e = {}) {
|
|
|
3169
3169
|
for (; (Ce = ft.indexOf(`
|
|
3170
3170
|
|
|
3171
3171
|
`)) >= 0; ) {
|
|
3172
|
-
const
|
|
3172
|
+
const Pe = ft.slice(0, Ce);
|
|
3173
3173
|
ft = ft.slice(Ce + 2);
|
|
3174
|
-
const L = Ux(
|
|
3174
|
+
const L = Ux(Pe);
|
|
3175
3175
|
if (!L) continue;
|
|
3176
3176
|
let pe;
|
|
3177
3177
|
try {
|
|
@@ -3971,7 +3971,7 @@ function Qx({
|
|
|
3971
3971
|
updatedAt: J.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
|
|
3972
3972
|
messageCount: J.messageCount ?? 1
|
|
3973
3973
|
};
|
|
3974
|
-
p((Se) => Se.some((
|
|
3974
|
+
p((Se) => Se.some((Pe) => Pe.threadId === te.threadId) ? (console.debug("[ChatSessionProvider] thread_info: thread already in list", te.threadId), Se) : (console.debug("[ChatSessionProvider] thread_info: adding thread to list", te.threadId), [te, ...Se]));
|
|
3975
3975
|
}, []), ce = ge(
|
|
3976
3976
|
(J) => {
|
|
3977
3977
|
const te = J.threadId ?? B.current;
|
|
@@ -3980,11 +3980,11 @@ function Qx({
|
|
|
3980
3980
|
const { checkpoints: Se, timeline: Ce } = mr(J);
|
|
3981
3981
|
if (!Se.length)
|
|
3982
3982
|
return;
|
|
3983
|
-
const
|
|
3984
|
-
E((
|
|
3985
|
-
checkpointId: (
|
|
3986
|
-
checkpointNs: (
|
|
3987
|
-
}), G(Ce), O(Se), F(!!(
|
|
3983
|
+
const Pe = Se.find((L) => L.messages && L.messages.length > 0) ?? Se.find((L) => !!L.checkpointId) ?? Se[0];
|
|
3984
|
+
E((Pe == null ? void 0 : Pe.messages) ?? [], {
|
|
3985
|
+
checkpointId: (Pe == null ? void 0 : Pe.checkpointId) ?? null,
|
|
3986
|
+
checkpointNs: (Pe == null ? void 0 : Pe.checkpointNs) ?? null
|
|
3987
|
+
}), G(Ce), O(Se), F(!!(Pe != null && Pe.nextCursor)), q((Pe == null ? void 0 : Pe.nextCursor) ?? null), se.current = `${te}:latest`, D.current = null, V.current = null;
|
|
3988
3988
|
},
|
|
3989
3989
|
[E]
|
|
3990
3990
|
), be = ge((J) => {
|
|
@@ -4011,7 +4011,7 @@ function Qx({
|
|
|
4011
4011
|
), ot = ge(
|
|
4012
4012
|
async (J) => {
|
|
4013
4013
|
const te = f;
|
|
4014
|
-
p((Ce) => Ce.filter((
|
|
4014
|
+
p((Ce) => Ce.filter((Pe) => Pe.threadId !== J));
|
|
4015
4015
|
const Se = new AbortController();
|
|
4016
4016
|
Qe.current.set(J, Se);
|
|
4017
4017
|
try {
|
|
@@ -4038,7 +4038,7 @@ function Qx({
|
|
|
4038
4038
|
const Se = `${J}:${te ?? "latest"}`, Ce = Re.current.get(Se);
|
|
4039
4039
|
if (Ce)
|
|
4040
4040
|
return Ce;
|
|
4041
|
-
const
|
|
4041
|
+
const Pe = (async () => {
|
|
4042
4042
|
const L = J;
|
|
4043
4043
|
T(!0), C(null);
|
|
4044
4044
|
try {
|
|
@@ -4064,13 +4064,13 @@ function Qx({
|
|
|
4064
4064
|
T(!1);
|
|
4065
4065
|
}
|
|
4066
4066
|
})();
|
|
4067
|
-
Re.current.set(Se,
|
|
4067
|
+
Re.current.set(Se, Pe);
|
|
4068
4068
|
try {
|
|
4069
|
-
await
|
|
4069
|
+
await Pe;
|
|
4070
4070
|
} finally {
|
|
4071
4071
|
Re.current.delete(Se);
|
|
4072
4072
|
}
|
|
4073
|
-
return B.current === J && (se.current = Se),
|
|
4073
|
+
return B.current === J && (se.current = Se), Pe;
|
|
4074
4074
|
},
|
|
4075
4075
|
[l, E, s]
|
|
4076
4076
|
), pt = ge(
|
|
@@ -4128,7 +4128,7 @@ function Qx({
|
|
|
4128
4128
|
const Ce = Se;
|
|
4129
4129
|
ae(!0);
|
|
4130
4130
|
try {
|
|
4131
|
-
const
|
|
4131
|
+
const Pe = await l.getStateHistory({
|
|
4132
4132
|
threadId: Ce,
|
|
4133
4133
|
checkpointId: J,
|
|
4134
4134
|
checkpointNs: te ?? void 0
|
|
@@ -4137,7 +4137,7 @@ function Qx({
|
|
|
4137
4137
|
console.log(`[ChatSessionProvider] Thread changed during checkpoint navigation (was ${Ce}, now ${B.current}), discarding stale data`);
|
|
4138
4138
|
return;
|
|
4139
4139
|
}
|
|
4140
|
-
const { checkpoints: L, timeline: pe } = mr(
|
|
4140
|
+
const { checkpoints: L, timeline: pe } = mr(Pe), K = L.find(
|
|
4141
4141
|
(Me) => Me.checkpointId === J && (te ? Me.checkpointNs === te : !0)
|
|
4142
4142
|
);
|
|
4143
4143
|
if (!K) {
|
|
@@ -4148,8 +4148,8 @@ function Qx({
|
|
|
4148
4148
|
checkpointId: K.checkpointId ?? null,
|
|
4149
4149
|
checkpointNs: K.checkpointNs ?? null
|
|
4150
4150
|
});
|
|
4151
|
-
} catch (
|
|
4152
|
-
B.current === Ce && (s == null || s(String(
|
|
4151
|
+
} catch (Pe) {
|
|
4152
|
+
B.current === Ce && (s == null || s(String(Pe)));
|
|
4153
4153
|
} finally {
|
|
4154
4154
|
ae(!1);
|
|
4155
4155
|
}
|
|
@@ -4200,14 +4200,14 @@ function Qx({
|
|
|
4200
4200
|
const Ce = B.current;
|
|
4201
4201
|
if (!Ce)
|
|
4202
4202
|
throw new Error("No active thread to handle interrupt");
|
|
4203
|
-
const
|
|
4203
|
+
const Pe = te ? Se ?? !0 : !1;
|
|
4204
4204
|
try {
|
|
4205
4205
|
const L = {
|
|
4206
4206
|
threadId: Ce,
|
|
4207
4207
|
checkpointId: R.lastCheckpointId ?? void 0,
|
|
4208
4208
|
checkpointNs: R.lastCheckpointNs ?? void 0,
|
|
4209
4209
|
// The command is the key: backend extracts this and routes to LangGraph
|
|
4210
|
-
command: { kind: "resume", value:
|
|
4210
|
+
command: { kind: "resume", value: Pe }
|
|
4211
4211
|
};
|
|
4212
4212
|
Be(L);
|
|
4213
4213
|
} catch (L) {
|
|
@@ -4233,10 +4233,10 @@ function Qx({
|
|
|
4233
4233
|
).join("").slice(0, 16);
|
|
4234
4234
|
Se = `${Me}${me}`, D.current = Se, x(Se);
|
|
4235
4235
|
}
|
|
4236
|
-
const { contentParts:
|
|
4236
|
+
const { contentParts: Pe } = await mx(
|
|
4237
4237
|
l,
|
|
4238
4238
|
(J == null ? void 0 : J.attachments) ?? []
|
|
4239
|
-
), L = [...
|
|
4239
|
+
), L = [...Pe];
|
|
4240
4240
|
Ce != null && Ce.trim() && L.push({ type: "text", text: Ce });
|
|
4241
4241
|
const pe = {
|
|
4242
4242
|
id: `msg-${Date.now()}`,
|
|
@@ -14154,7 +14154,7 @@ const Lc = nm(function({
|
|
|
14154
14154
|
K = "";
|
|
14155
14155
|
}
|
|
14156
14156
|
return `${K}`;
|
|
14157
|
-
}, []),
|
|
14157
|
+
}, []), Pe = We(() => {
|
|
14158
14158
|
if (!A || A.attemptCount <= 1)
|
|
14159
14159
|
return null;
|
|
14160
14160
|
const L = A.isLatestAttempt ? `Latest of ${A.attemptCount}` : `Attempt ${A.attemptIndex + 1} of ${A.attemptCount}`;
|
|
@@ -14184,6 +14184,7 @@ const Lc = nm(function({
|
|
|
14184
14184
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14185
14185
|
ot(),
|
|
14186
14186
|
a && Mt && /* @__PURE__ */ u.jsx("span", { className: ee("font-medium", W ? "text-xs" : "text-sm"), children: Mt }),
|
|
14187
|
+
Pe && /* @__PURE__ */ u.jsx("div", { className: "flex items-center", children: Pe }),
|
|
14187
14188
|
de && /* @__PURE__ */ u.jsxs(
|
|
14188
14189
|
Gf,
|
|
14189
14190
|
{
|
|
@@ -14210,55 +14211,52 @@ const Lc = nm(function({
|
|
|
14210
14211
|
)
|
|
14211
14212
|
] }),
|
|
14212
14213
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14213
|
-
Tt && Se && te >= 0 && /* @__PURE__ */ u.
|
|
14214
|
+
Tt && Se && te >= 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14215
|
+
/* @__PURE__ */ u.jsx(
|
|
14216
|
+
"button",
|
|
14217
|
+
{
|
|
14218
|
+
type: "button",
|
|
14219
|
+
className: ee(
|
|
14220
|
+
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14221
|
+
te > 0 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14222
|
+
),
|
|
14223
|
+
onClick: () => {
|
|
14224
|
+
if (te <= 0) return;
|
|
14225
|
+
const L = He[te - 1];
|
|
14226
|
+
L && J(L);
|
|
14227
|
+
},
|
|
14228
|
+
"aria-label": "Previous checkpoint",
|
|
14229
|
+
disabled: te <= 0,
|
|
14230
|
+
children: /* @__PURE__ */ u.jsx(fm, { className: "h-3 w-3" })
|
|
14231
|
+
}
|
|
14232
|
+
),
|
|
14214
14233
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14215
|
-
/* @__PURE__ */ u.
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
className: ee(
|
|
14220
|
-
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14221
|
-
te > 0 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14222
|
-
),
|
|
14223
|
-
onClick: () => {
|
|
14224
|
-
if (te <= 0) return;
|
|
14225
|
-
const L = He[te - 1];
|
|
14226
|
-
L && J(L);
|
|
14227
|
-
},
|
|
14228
|
-
"aria-label": "Previous checkpoint",
|
|
14229
|
-
disabled: te <= 0,
|
|
14230
|
-
children: /* @__PURE__ */ u.jsx(fm, { className: "h-3 w-3" })
|
|
14231
|
-
}
|
|
14232
|
-
),
|
|
14233
|
-
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14234
|
-
/* @__PURE__ */ u.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
14235
|
-
te + 1,
|
|
14236
|
-
" / ",
|
|
14237
|
-
He.length
|
|
14238
|
-
] }),
|
|
14239
|
-
/* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: Ce(Se) })
|
|
14234
|
+
/* @__PURE__ */ u.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
14235
|
+
te + 1,
|
|
14236
|
+
" / ",
|
|
14237
|
+
He.length
|
|
14240
14238
|
] }),
|
|
14241
|
-
/* @__PURE__ */ u.jsx(
|
|
14242
|
-
"button",
|
|
14243
|
-
{
|
|
14244
|
-
type: "button",
|
|
14245
|
-
className: ee(
|
|
14246
|
-
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14247
|
-
te < He.length - 1 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14248
|
-
),
|
|
14249
|
-
onClick: () => {
|
|
14250
|
-
if (te >= He.length - 1) return;
|
|
14251
|
-
const L = He[te + 1];
|
|
14252
|
-
L && J(L);
|
|
14253
|
-
},
|
|
14254
|
-
"aria-label": "Next checkpoint",
|
|
14255
|
-
disabled: te >= He.length - 1,
|
|
14256
|
-
children: /* @__PURE__ */ u.jsx(Kc, { className: "h-3 w-3" })
|
|
14257
|
-
}
|
|
14258
|
-
)
|
|
14239
|
+
/* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: Ce(Se) })
|
|
14259
14240
|
] }),
|
|
14260
|
-
|
|
14261
|
-
|
|
14241
|
+
/* @__PURE__ */ u.jsx(
|
|
14242
|
+
"button",
|
|
14243
|
+
{
|
|
14244
|
+
type: "button",
|
|
14245
|
+
className: ee(
|
|
14246
|
+
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14247
|
+
te < He.length - 1 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14248
|
+
),
|
|
14249
|
+
onClick: () => {
|
|
14250
|
+
if (te >= He.length - 1) return;
|
|
14251
|
+
const L = He[te + 1];
|
|
14252
|
+
L && J(L);
|
|
14253
|
+
},
|
|
14254
|
+
"aria-label": "Next checkpoint",
|
|
14255
|
+
disabled: te >= He.length - 1,
|
|
14256
|
+
children: /* @__PURE__ */ u.jsx(Kc, { className: "h-3 w-3" })
|
|
14257
|
+
}
|
|
14258
|
+
)
|
|
14259
|
+
] }) }),
|
|
14262
14260
|
i && t.createdAt && /* @__PURE__ */ u.jsx(
|
|
14263
14261
|
"time",
|
|
14264
14262
|
{
|
|
@@ -15006,7 +15004,7 @@ function ki({
|
|
|
15006
15004
|
return typeof xe == "number" ? xe : null;
|
|
15007
15005
|
},
|
|
15008
15006
|
[]
|
|
15009
|
-
),
|
|
15007
|
+
), Pe = ge(
|
|
15010
15008
|
(ne, ie) => {
|
|
15011
15009
|
if (!ne || typeof ne != "object") return null;
|
|
15012
15010
|
const xe = ne[ie];
|
|
@@ -15050,7 +15048,7 @@ function ki({
|
|
|
15050
15048
|
for (const ke of L) {
|
|
15051
15049
|
const ct = ke.checkpointId ?? null;
|
|
15052
15050
|
if (!ct) continue;
|
|
15053
|
-
const mt = Ce(ke.metadata, "step"), Wt =
|
|
15051
|
+
const mt = Ce(ke.metadata, "step"), Wt = Pe(ke.metadata, "source"), En = {
|
|
15054
15052
|
id: ct,
|
|
15055
15053
|
step: mt,
|
|
15056
15054
|
source: Wt,
|
|
@@ -15087,7 +15085,7 @@ function ki({
|
|
|
15087
15085
|
isLatestAttempt: !0
|
|
15088
15086
|
});
|
|
15089
15087
|
return { checkpointMetaById: ne, checkpointIndexByKey: ie, attemptMetaById: xe };
|
|
15090
|
-
}, [L, Ce,
|
|
15088
|
+
}, [L, Ce, Pe]), me = P ?? [], Ye = Ve(null), gn = Ve(null), On = ge(() => {
|
|
15091
15089
|
Ye.current && (Ye.current.value = ""), gn.current && (gn.current.value = ""), Ke((ne) => ne + 1), rt((ne) => ne + 1);
|
|
15092
15090
|
}, []), yo = ge(
|
|
15093
15091
|
(ne) => {
|