@qwen-code/web-shell 0.25.3-preview.0 → 0.25.3
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 +40 -0
- package/dist/{PierreFilePreview-DAD1C1oX.js → PierreFilePreview-CDwdShQj.js} +1 -1
- package/dist/{SpreadsheetPreview-DShn9rcb.js → SpreadsheetPreview-DrhBxOLb.js} +2 -2
- package/dist/{WorkspaceFileBrowser-zWgE76sn.js → WorkspaceFileBrowser-Cj-IkaDU.js} +2 -2
- package/dist/{agents-route-CYSCpPDR.js → agents-route-CNZAhyBJ.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-CWxIoEi_.js → index-D0B7Fiw9.js} +50102 -49146
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +3718 -3696
- package/dist/types/App.d.ts +4 -1
- package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +3 -1
- package/dist/types/components/dialogs/ApprovalModeDialog.d.ts +3 -1
- package/dist/types/components/managed/RemoteWorkspaceRegistration.d.ts +9 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +448 -19
- package/dist/types/components/managed/java-managed-agent-client.d.ts +32 -0
- package/dist/types/components/managed/managed-agent-provider.d.ts +37 -0
- package/dist/types/components/managed/managed-input.d.ts +7 -0
- package/dist/types/components/managed/managed-workspace-messages.d.ts +7 -0
- package/dist/types/components/managed/managed-workspace-messages.transcript-stub.d.ts +7 -0
- package/dist/types/components/managed/use-managed-approval-change.d.ts +2 -1
- package/dist/types/components/managed/use-managed-skills.d.ts +12 -0
- package/dist/types/components/managed/use-managed-tasks.d.ts +1 -0
- package/dist/types/customization.d.ts +2 -0
- package/dist/types/hooks/useApprovalModes.d.ts +2 -0
- package/dist/types/hooks/useInputHistory.d.ts +0 -4
- package/dist/types/index.d.ts +2 -1
- package/dist/types/utils/planMode.d.ts +5 -1
- package/dist/types/voice/voice-workspace-target.d.ts +2 -0
- package/dist/{useDaemonMidTurnInjected-Cf5L3VKm.js → useDaemonMidTurnInjected-BDFSY1Yl.js} +773 -705
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var Cc = (e, t, o) => t in e ? Sc(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var eo = (e, t, o) => Cc(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
4
|
import { createContext as kt, useContext as Mt, useSyncExternalStore as an, useMemo as Ze, useRef as Y, useState as lt, useCallback as pe, useEffect as pt } from "react";
|
|
5
5
|
import { jsx as Ht } from "react/jsx-runtime";
|
|
6
|
-
import { DaemonHttpError as fo, parseDaemonBackgroundTurn as zs, getSessionUpdatePayload as Ui, isStaleBranchPointError as Tc, DaemonStandaloneCreationOutcomeUnknownError as
|
|
6
|
+
import { DaemonHttpError as fo, parseDaemonBackgroundTurn as zs, getSessionUpdatePayload as Ui, isStaleBranchPointError as Tc, DaemonStandaloneCreationOutcomeUnknownError as Wi, isDaemonTurnError as Or, DaemonTransportClosedError as Ic, DaemonPendingPromptLimitError as xc, asKnownDaemonEvent as Ac, createToolLifecycleState as Ec, createExecutionLifecycleState as Rc, extractExecutionLifecycle as Pc, extractToolLifecycle as $c, reduceExecutionLifecycle as Mc, reduceToolLifecycle as _c, EXTENSION_ARCHIVE_UPLOAD_TIMEOUT_MS as Dc, DaemonClient as Os, MID_TURN_MESSAGE_INJECTED_EVENT as Oc, PENDING_PROMPT_ADDED_EVENT as Ni, PENDING_PROMPT_STARTED_EVENT as Bi, PENDING_PROMPT_COMPLETED_EVENT as ji, isTaskExecutionMode as qi, parseQwenAgentMessageMeta as Lc, QWEN_AGENT_MESSAGE_META_KEY as Fc, estimateDaemonTranscriptBlockBytes as er, createDaemonTranscriptStore as Vn, normalizeDaemonEvent as Uc, extractServerTimestamp as Wc, STANDALONE_SESSION_OPTIONS_CAPABILITY as Nc, DaemonSessionClient as Po, isUnrecognizedDiagnosticReason as Lr, DaemonCapabilityMissingError as va, matchTurnEvent as Bc, isTrimmedToolBlockId as jc, isTrimmedPermissionBlockId as qc, UNRECOGNIZED_DIAGNOSTICS_LIMIT as Hc, DAEMON_APPROVAL_MODES as Gc } from "@qwen-code/sdk/daemon";
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2025 Qwen Team
|
|
@@ -31,7 +31,7 @@ function tr(e) {
|
|
|
31
31
|
function Ie(e) {
|
|
32
32
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Mm(e) {
|
|
35
35
|
if (!tr(e) || !(e instanceof fo) || !Ie(e.body))
|
|
36
36
|
return !1;
|
|
37
37
|
const t = e.body, o = Ie(t.data) ? t.data : t, s = typeof t.code == "string" ? t.code : o.errorKind ?? o.code;
|
|
@@ -388,7 +388,7 @@ function Xc(e) {
|
|
|
388
388
|
const s = Le(t?.goal), n = xe(s, "goalId"), a = It(s, "revision"), r = xe(s, "objective"), i = xe(s, "status"), p = Le(s?.evidenceCursor)?.recordId, g = It(s, "turnCount"), h = It(s, "activeTimeMs"), b = It(s, "tokensUsed"), A = It(s, "tokenBudget"), $ = It(s, "turnBudget"), x = It(s, "activeTimeBudgetMs"), F = It(s, "createdAt"), P = It(s, "updatedAt");
|
|
389
389
|
if (!n || a === void 0 || !r || i !== "active" && i !== "paused" && i !== "blocked" && i !== "usage_limited" && i !== "complete" || p !== null && typeof p != "string" || g === void 0 || h === void 0 || F === void 0 || P === void 0)
|
|
390
390
|
return;
|
|
391
|
-
const
|
|
391
|
+
const N = xe(s, "lastReason"), H = xe(s, "limitKind"), J = H === "evidence_catalog" || H === "checkpoint_request" || H === "token_budget" || H === "turn_budget" || H === "time_budget" ? H : void 0;
|
|
392
392
|
return {
|
|
393
393
|
v: 2,
|
|
394
394
|
activity: o,
|
|
@@ -406,7 +406,7 @@ function Xc(e) {
|
|
|
406
406
|
...x !== void 0 ? { activeTimeBudgetMs: x } : {},
|
|
407
407
|
createdAt: F,
|
|
408
408
|
updatedAt: P,
|
|
409
|
-
...
|
|
409
|
+
...N ? { lastReason: N } : {},
|
|
410
410
|
...J ? { limitKind: J } : {}
|
|
411
411
|
}
|
|
412
412
|
};
|
|
@@ -448,15 +448,15 @@ function Ki(e) {
|
|
|
448
448
|
const t = Le(e?._meta);
|
|
449
449
|
if (t?.parentToolCallId !== void 0) return;
|
|
450
450
|
const o = Le(t?.usage), s = {
|
|
451
|
-
...
|
|
452
|
-
...
|
|
453
|
-
...
|
|
454
|
-
...
|
|
455
|
-
...
|
|
451
|
+
...Nn(o, "inputTokens"),
|
|
452
|
+
...Nn(o, "outputTokens"),
|
|
453
|
+
...Nn(o, "totalTokens"),
|
|
454
|
+
...Nn(o, "thoughtTokens"),
|
|
455
|
+
...Nn(o, "cachedReadTokens")
|
|
456
456
|
};
|
|
457
457
|
return nr(s) !== void 0 ? s : void 0;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Nn(e, t) {
|
|
460
460
|
const o = It(e, t);
|
|
461
461
|
return o !== void 0 && o >= 0 ? { [t]: o } : {};
|
|
462
462
|
}
|
|
@@ -540,7 +540,7 @@ function Yi(e, t) {
|
|
|
540
540
|
|
|
541
541
|
${o}` : o;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Wr(e) {
|
|
544
544
|
const t = e.data.indexOf(","), o = e.data.startsWith("data:") && t >= 0 ? e.data.slice(t + 1) : e.data, s = atob(o), n = new Uint8Array(s.length);
|
|
545
545
|
for (let a = 0; a < s.length; a += 1) n[a] = s.charCodeAt(a);
|
|
546
546
|
return new Blob([n], {
|
|
@@ -586,7 +586,7 @@ function Ss(e, t = [], o = []) {
|
|
|
586
586
|
* SPDX-License-Identifier: Apache-2.0
|
|
587
587
|
*/
|
|
588
588
|
const od = 3e4;
|
|
589
|
-
function
|
|
589
|
+
function Nr(e, t, o) {
|
|
590
590
|
const s = Number.isFinite(t) && t > 0 ? t : 1e3, n = Number.isFinite(o) && o > 0 ? Math.max(s, o) : s, a = s * 2 ** Math.max(0, e - 1), r = Math.min(a, n), i = 0.8 + Math.random() * 0.4;
|
|
591
591
|
return Math.min(n, Math.max(1, Math.round(r * i)));
|
|
592
592
|
}
|
|
@@ -879,7 +879,7 @@ function wd({
|
|
|
879
879
|
getCreateSessionRequest: x,
|
|
880
880
|
createDetachedSession: F,
|
|
881
881
|
createDetachedStandaloneSession: P,
|
|
882
|
-
getDefaultSessionContext:
|
|
882
|
+
getDefaultSessionContext: N,
|
|
883
883
|
getConnection: H,
|
|
884
884
|
getEventDetailMode: J,
|
|
885
885
|
hasSessionActivePrompt: I,
|
|
@@ -901,7 +901,7 @@ function wd({
|
|
|
901
901
|
onPromptRemoved: Qe
|
|
902
902
|
}) {
|
|
903
903
|
const Pe = /* @__PURE__ */ new Set();
|
|
904
|
-
let zt = t.current, fn = 0,
|
|
904
|
+
let zt = t.current, fn = 0, Wt = 0, Me = 0, Vt, bo = !1, Vo = t.current?.client, _o = t.current?.sessionId, et = t.current?.clientId;
|
|
905
905
|
async function _t(u) {
|
|
906
906
|
const c = Xn(
|
|
907
907
|
i,
|
|
@@ -945,7 +945,7 @@ function wd({
|
|
|
945
945
|
(r.get(u) ?? 0) + 1
|
|
946
946
|
);
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Ne(u, c, m, C) {
|
|
949
949
|
const d = c.trim();
|
|
950
950
|
if (!d.startsWith("/") || d.startsWith("//") || d.startsWith("/*")) return !1;
|
|
951
951
|
const k = d.slice(1).trim().split(/\s+/, 1)[0];
|
|
@@ -985,9 +985,9 @@ function wd({
|
|
|
985
985
|
const f = H().capabilities?.features.includes("session_attachments") === !0 && typeof u.uploadAttachment == "function";
|
|
986
986
|
if (C.length > 0 && !f)
|
|
987
987
|
throw new Error("File attachment upload is not supported");
|
|
988
|
-
const E = f ? m.filter((
|
|
989
|
-
(
|
|
990
|
-
), L = f ? C : [], j = C.filter((
|
|
988
|
+
const E = f ? m.filter((W) => W.mimeType !== "image/*") : [], w = m.filter(
|
|
989
|
+
(W) => !E.includes(W)
|
|
990
|
+
), L = f ? C : [], j = C.filter((W) => !L.includes(W));
|
|
991
991
|
if (E.length === 0 && L.length === 0)
|
|
992
992
|
return {
|
|
993
993
|
content: Ss(c, m, C),
|
|
@@ -996,29 +996,29 @@ function wd({
|
|
|
996
996
|
};
|
|
997
997
|
const R = await Promise.allSettled([
|
|
998
998
|
...E.map(
|
|
999
|
-
async (
|
|
1000
|
-
|
|
1001
|
-
Gr(
|
|
1002
|
-
Ga(
|
|
999
|
+
async (W) => await u.uploadAttachment(
|
|
1000
|
+
Wr(W),
|
|
1001
|
+
Gr(W.mimeType),
|
|
1002
|
+
Ga(W.mimeType),
|
|
1003
1003
|
k
|
|
1004
1004
|
)
|
|
1005
1005
|
),
|
|
1006
1006
|
...L.map(
|
|
1007
|
-
async (
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1007
|
+
async (W) => await u.uploadAttachment(
|
|
1008
|
+
W.data,
|
|
1009
|
+
W.name,
|
|
1010
|
+
W.mimeType,
|
|
1011
1011
|
k
|
|
1012
1012
|
)
|
|
1013
1013
|
)
|
|
1014
1014
|
]), Q = R.flatMap(
|
|
1015
|
-
(
|
|
1015
|
+
(W) => W.status === "fulfilled" ? [W.value] : []
|
|
1016
1016
|
), ee = R.find(
|
|
1017
|
-
(
|
|
1017
|
+
(W) => W.status === "rejected"
|
|
1018
1018
|
);
|
|
1019
1019
|
if (!ee) {
|
|
1020
|
-
const
|
|
1021
|
-
return
|
|
1020
|
+
const W = Ss(c, w, j), q = Q.slice(E.length);
|
|
1021
|
+
return W[0] = {
|
|
1022
1022
|
type: "text",
|
|
1023
1023
|
text: Yi(
|
|
1024
1024
|
c,
|
|
@@ -1028,8 +1028,8 @@ function wd({
|
|
|
1028
1028
|
)
|
|
1029
1029
|
)
|
|
1030
1030
|
)
|
|
1031
|
-
},
|
|
1032
|
-
content:
|
|
1031
|
+
}, W.splice(1, 0, ...Q), {
|
|
1032
|
+
content: W,
|
|
1033
1033
|
references: Q,
|
|
1034
1034
|
fileReferences: q
|
|
1035
1035
|
};
|
|
@@ -1156,7 +1156,7 @@ function wd({
|
|
|
1156
1156
|
const k = t.current, y = k?.sessionId, f = H(), E = f.sessionContext ?? (f.workspaceCwd ? { kind: "workspace", cwd: f.workspaceCwd } : k?.workspaceCwd ? {
|
|
1157
1157
|
kind: "workspace",
|
|
1158
1158
|
cwd: k.workspaceCwd
|
|
1159
|
-
} : void 0), w = f.error ?
|
|
1159
|
+
} : void 0), w = f.error ? N() : E ?? N(), L = qr(
|
|
1160
1160
|
m?.sessionContext,
|
|
1161
1161
|
m?.workspaceCwd,
|
|
1162
1162
|
w
|
|
@@ -1170,7 +1170,7 @@ function wd({
|
|
|
1170
1170
|
(y ? o.current.get(y) : void 0)?.reject?.(
|
|
1171
1171
|
new DOMException("Session switch interrupted prompt wait", "AbortError")
|
|
1172
1172
|
), y && o.current.delete(y), b.current = void 0, X();
|
|
1173
|
-
const
|
|
1173
|
+
const W = c === "load" && y === u && $t(E) === $t(L), q = $t(E) !== $t(L) && (E?.kind === "standalone" || E?.kind === "live" || L?.kind === "standalone" || L?.kind === "live"), ne = f.sessionId !== void 0 && f.sessionId !== u && E?.kind === L?.kind && (L?.kind === "standalone" || L?.kind === "live");
|
|
1174
1174
|
if (k) {
|
|
1175
1175
|
const se = () => k.detach().catch((Ae) => {
|
|
1176
1176
|
console.warn(
|
|
@@ -1178,12 +1178,12 @@ function wd({
|
|
|
1178
1178
|
Ae
|
|
1179
1179
|
);
|
|
1180
1180
|
});
|
|
1181
|
-
|
|
1181
|
+
W ? (g.current = k, R.then(se, () => {
|
|
1182
1182
|
}).finally(() => {
|
|
1183
1183
|
g.current === k && (g.current = void 0);
|
|
1184
1184
|
})) : se();
|
|
1185
1185
|
}
|
|
1186
|
-
return
|
|
1186
|
+
return W || (t.current = void 0), W || ve((se) => {
|
|
1187
1187
|
const Ae = q || ne ? mn(se, y, !1) : se;
|
|
1188
1188
|
return {
|
|
1189
1189
|
...Ae,
|
|
@@ -1206,7 +1206,7 @@ function wd({
|
|
|
1206
1206
|
loadingTranscript: !0,
|
|
1207
1207
|
catchingUp: void 0
|
|
1208
1208
|
};
|
|
1209
|
-
}), V("idle"), s.current.clear(), Xe(h),
|
|
1209
|
+
}), V("idle"), s.current.clear(), Xe(h), W || e.reset(), U(c), v(u), B(L), G((se) => se + 1), R.catch((se) => {
|
|
1210
1210
|
throw !gn(se) && (n.current === void 0 || n.current === Q) && ve((Ae) => ({
|
|
1211
1211
|
...Ae,
|
|
1212
1212
|
error: se instanceof Error ? se.message : String(se),
|
|
@@ -1277,7 +1277,7 @@ function wd({
|
|
|
1277
1277
|
const y = (c?.images ?? []).map((ke) => ({
|
|
1278
1278
|
data: ke.data,
|
|
1279
1279
|
mimeType: ke.mimeType || ke.mediaType || ke.media_type || "image/*"
|
|
1280
|
-
})), f = Hr(c?.files), E =
|
|
1280
|
+
})), f = Hr(c?.files), E = Ne(
|
|
1281
1281
|
m,
|
|
1282
1282
|
u,
|
|
1283
1283
|
y.length > 0 || f.length > 0,
|
|
@@ -1287,13 +1287,13 @@ function wd({
|
|
|
1287
1287
|
throw new Error("Session changed before prompt submission");
|
|
1288
1288
|
d.signal.throwIfAborted();
|
|
1289
1289
|
const L = w ? [] : y, j = w ? [] : f, R = c?.inputAnnotations && c.inputAnnotations.length > 0 ? c.inputAnnotations : void 0, Q = c?.optimisticUserMessage !== !1, ee = Q && L.length === 0 && j.length === 0;
|
|
1290
|
-
let
|
|
1290
|
+
let W;
|
|
1291
1291
|
ee && (e.appendLocalUserMessage(
|
|
1292
1292
|
u,
|
|
1293
1293
|
L,
|
|
1294
1294
|
R ? { inputAnnotations: R } : void 0,
|
|
1295
1295
|
[]
|
|
1296
|
-
), me && (
|
|
1296
|
+
), me && (W = e.getSnapshot().blocks.at(-1)?.id));
|
|
1297
1297
|
let q;
|
|
1298
1298
|
try {
|
|
1299
1299
|
q = await oo(
|
|
@@ -1357,12 +1357,12 @@ function wd({
|
|
|
1357
1357
|
L,
|
|
1358
1358
|
R ? { inputAnnotations: R } : void 0,
|
|
1359
1359
|
pn(j, q.fileReferences)
|
|
1360
|
-
), me && (
|
|
1360
|
+
), me && (W = e.getSnapshot().blocks.at(-1)?.id));
|
|
1361
1361
|
const Ae = o.current.get(C);
|
|
1362
1362
|
return Ae?.controller === d && (Ae.promptId = se.promptId), me?.(m, {
|
|
1363
1363
|
promptId: se.promptId,
|
|
1364
1364
|
label: u,
|
|
1365
|
-
...
|
|
1365
|
+
...W ? { blockId: W } : {}
|
|
1366
1366
|
}), o.current.get(C)?.controller === d && te(C), no(
|
|
1367
1367
|
m,
|
|
1368
1368
|
q.references,
|
|
@@ -1474,7 +1474,7 @@ function wd({
|
|
|
1474
1474
|
const C = (c?.images ?? []).map((q) => ({
|
|
1475
1475
|
data: q.data,
|
|
1476
1476
|
mimeType: q.mimeType || q.mediaType || q.media_type || "image/*"
|
|
1477
|
-
})), d = Hr(c?.files), k =
|
|
1477
|
+
})), d = Hr(c?.files), k = Ne(
|
|
1478
1478
|
m,
|
|
1479
1479
|
u,
|
|
1480
1480
|
C.length > 0 || d.length > 0,
|
|
@@ -1517,10 +1517,10 @@ function wd({
|
|
|
1517
1517
|
...typeof c?.submittedPrompt == "string" ? { "qwen.submittedPrompt": c.submittedPrompt } : {},
|
|
1518
1518
|
...w ? { inputAnnotations: w } : {}
|
|
1519
1519
|
}), c?.retry && (ee.retry = !0), c?.onAdmissionStarted?.();
|
|
1520
|
-
let
|
|
1520
|
+
let W;
|
|
1521
1521
|
try {
|
|
1522
1522
|
const q = ee;
|
|
1523
|
-
|
|
1523
|
+
W = await m.submitPrompt(q);
|
|
1524
1524
|
} catch (q) {
|
|
1525
1525
|
Z(m.sessionId, q);
|
|
1526
1526
|
const ne = yt(q);
|
|
@@ -1541,13 +1541,13 @@ function wd({
|
|
|
1541
1541
|
w ? { inputAnnotations: w } : void 0,
|
|
1542
1542
|
pn(E, Q.fileReferences)
|
|
1543
1543
|
), me && (R = e.getSnapshot().blocks.at(-1)?.id)), me?.(m, {
|
|
1544
|
-
promptId:
|
|
1544
|
+
promptId: W.promptId,
|
|
1545
1545
|
label: u,
|
|
1546
1546
|
...R ? { blockId: R } : {}
|
|
1547
1547
|
}), c?.signal?.aborted)
|
|
1548
1548
|
try {
|
|
1549
|
-
if ((await m.removePendingPrompt(
|
|
1550
|
-
return Qe?.(m,
|
|
1549
|
+
if ((await m.removePendingPrompt(W.promptId)).removed)
|
|
1550
|
+
return Qe?.(m, W.promptId), await mt(m, Q.references), { promptId: W.promptId, removedAfterAbort: !0 };
|
|
1551
1551
|
} catch (q) {
|
|
1552
1552
|
console.warn(
|
|
1553
1553
|
"[submitPrompt] removePendingPrompt failed after abort",
|
|
@@ -1569,7 +1569,7 @@ function wd({
|
|
|
1569
1569
|
E
|
|
1570
1570
|
), c?.signal?.aborted)
|
|
1571
1571
|
throw c.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
1572
|
-
return { promptId:
|
|
1572
|
+
return { promptId: W.promptId };
|
|
1573
1573
|
},
|
|
1574
1574
|
async cancel() {
|
|
1575
1575
|
const u = De(
|
|
@@ -1660,7 +1660,7 @@ function wd({
|
|
|
1660
1660
|
`Daemon did not confirm reasoning effort ${JSON.stringify(u)}`
|
|
1661
1661
|
);
|
|
1662
1662
|
const j = H();
|
|
1663
|
-
t.current === m && f === Me && j.currentModel === y && k >
|
|
1663
|
+
t.current === m && f === Me && j.currentModel === y && k > Wt && (Wt = k, ve((R) => {
|
|
1664
1664
|
if (t.current !== m || f !== Me || R.currentModel !== y)
|
|
1665
1665
|
return R;
|
|
1666
1666
|
const Q = E.configOptions;
|
|
@@ -1847,7 +1847,7 @@ function wd({
|
|
|
1847
1847
|
if (c = qr(
|
|
1848
1848
|
u?.sessionContext,
|
|
1849
1849
|
u?.workspaceCwd,
|
|
1850
|
-
f.error ?
|
|
1850
|
+
f.error ? N() : f.sessionContext ?? N()
|
|
1851
1851
|
), c?.kind === "live")
|
|
1852
1852
|
throw new Error("Live session context does not support create");
|
|
1853
1853
|
if (c?.kind === "standalone" && (u?.sourceType !== void 0 || u?.worktree !== void 0 || u?.branch !== void 0))
|
|
@@ -1902,15 +1902,15 @@ function wd({
|
|
|
1902
1902
|
j
|
|
1903
1903
|
),
|
|
1904
1904
|
(se) => se.detach()
|
|
1905
|
-
),
|
|
1905
|
+
), W = c?.kind === "standalone" ? await ee : await _(
|
|
1906
1906
|
ee,
|
|
1907
1907
|
"Create session timed out",
|
|
1908
1908
|
zr
|
|
1909
|
-
), q = (H().sessionId !== E || w() !== L) && H().sessionId !==
|
|
1909
|
+
), q = (H().sessionId !== E || w() !== L) && H().sessionId !== W.sessionId;
|
|
1910
1910
|
if (p.current || q) {
|
|
1911
1911
|
try {
|
|
1912
1912
|
await _(
|
|
1913
|
-
|
|
1913
|
+
W.detach(),
|
|
1914
1914
|
"Detach cleared session timed out"
|
|
1915
1915
|
);
|
|
1916
1916
|
} catch (se) {
|
|
@@ -1921,10 +1921,10 @@ function wd({
|
|
|
1921
1921
|
}
|
|
1922
1922
|
throw new DOMException("Session creation interrupted", "AbortError");
|
|
1923
1923
|
}
|
|
1924
|
-
Kn(
|
|
1924
|
+
Kn(W.clientId, W.sessionId), t.current = W, g.current = W;
|
|
1925
1925
|
const ne = c?.kind === "standalone" ? c : {
|
|
1926
1926
|
kind: "workspace",
|
|
1927
|
-
cwd:
|
|
1927
|
+
cwd: W.workspaceCwd
|
|
1928
1928
|
};
|
|
1929
1929
|
return ve((se) => ({
|
|
1930
1930
|
...ne.kind === "workspace" ? se : mn(
|
|
@@ -1933,21 +1933,21 @@ function wd({
|
|
|
1933
1933
|
!1
|
|
1934
1934
|
),
|
|
1935
1935
|
status: "connected",
|
|
1936
|
-
sessionId:
|
|
1936
|
+
sessionId: W.sessionId,
|
|
1937
1937
|
sessionContext: ne,
|
|
1938
1938
|
backgroundTurn: void 0,
|
|
1939
1939
|
finishedBackgroundTurnId: void 0,
|
|
1940
1940
|
backgroundTurnObservedAt: void 0,
|
|
1941
1941
|
goalState: void 0,
|
|
1942
|
-
...
|
|
1942
|
+
...W.clientId ? { clientId: W.clientId } : {},
|
|
1943
1943
|
workspaceCwd: ne.kind === "workspace" ? ne.cwd : void 0,
|
|
1944
|
-
standaloneSession: ne.kind === "standalone" ? Fs(
|
|
1944
|
+
standaloneSession: ne.kind === "standalone" ? Fs(W.session) : void 0,
|
|
1945
1945
|
error: void 0,
|
|
1946
1946
|
errorStatus: void 0,
|
|
1947
1947
|
missingSession: !1
|
|
1948
|
-
})),
|
|
1948
|
+
})), W;
|
|
1949
1949
|
} catch (f) {
|
|
1950
|
-
throw m && !C && (d = !0), k && f instanceof
|
|
1950
|
+
throw m && !C && (d = !0), k && f instanceof Wi && ve((E) => ({
|
|
1951
1951
|
...mn(
|
|
1952
1952
|
E,
|
|
1953
1953
|
E.sessionId,
|
|
@@ -2294,7 +2294,7 @@ function wd({
|
|
|
2294
2294
|
C,
|
|
2295
2295
|
c?.signal
|
|
2296
2296
|
) : await m.uploadAttachment(
|
|
2297
|
-
|
|
2297
|
+
Wr(u),
|
|
2298
2298
|
Gr(C),
|
|
2299
2299
|
Ga(C),
|
|
2300
2300
|
c?.signal
|
|
@@ -2978,9 +2978,9 @@ function Ad(e) {
|
|
|
2978
2978
|
function za(e) {
|
|
2979
2979
|
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
2980
2980
|
}
|
|
2981
|
-
const
|
|
2981
|
+
const _m = kt(void 0), Dm = kt(
|
|
2982
2982
|
void 0
|
|
2983
|
-
),
|
|
2983
|
+
), Om = kt(
|
|
2984
2984
|
void 0
|
|
2985
2985
|
), Ed = kt(void 0);
|
|
2986
2986
|
/**
|
|
@@ -3137,7 +3137,7 @@ const $d = {
|
|
|
3137
3137
|
}, al = kt(
|
|
3138
3138
|
null
|
|
3139
3139
|
);
|
|
3140
|
-
function
|
|
3140
|
+
function Lm() {
|
|
3141
3141
|
const e = Mt(al);
|
|
3142
3142
|
return an(
|
|
3143
3143
|
e?.subscribe ?? Md,
|
|
@@ -3321,7 +3321,7 @@ const Fd = {
|
|
|
3321
3321
|
* Copyright 2026 Qwen Team
|
|
3322
3322
|
* SPDX-License-Identifier: Apache-2.0
|
|
3323
3323
|
*/
|
|
3324
|
-
const
|
|
3324
|
+
const Wd = {
|
|
3325
3325
|
"trajectory.window.navigation": "Trajectory history",
|
|
3326
3326
|
"trajectory.window.latest": "Latest read window",
|
|
3327
3327
|
"trajectory.window.history": "Historical window",
|
|
@@ -3338,7 +3338,7 @@ const Nd = {
|
|
|
3338
3338
|
"trajectory.window.protocol": "History could not continue: the page cursor did not advance. Return to latest.",
|
|
3339
3339
|
"trajectory.window.budget": "The history cursor exceeds the navigation budget. Return to latest.",
|
|
3340
3340
|
"trajectory.window.pages": (e) => `${e?.pages ?? 0} ${Number(e?.pages) === 1 ? "page" : "pages"}`
|
|
3341
|
-
},
|
|
3341
|
+
}, Nd = {
|
|
3342
3342
|
"trajectory.window.navigation": "轨迹历史导航",
|
|
3343
3343
|
"trajectory.window.latest": "最新读取的窗口",
|
|
3344
3344
|
"trajectory.window.history": "历史窗口",
|
|
@@ -4329,6 +4329,8 @@ const Qd = {
|
|
|
4329
4329
|
"settings.description.review.approachRounds": "一个 PR 要达到多少轮评审之后,评审才可以追加一段提示性文字,说明看起来成问题的是改动的方向而不是当前补丁本身。它只在 diff 自评审首次测量以来也膨胀了数倍时出现,且从不出现在 Approve 上。它仅是披露:不新增发现、不改变结论、不阻塞任何事——它存在的原因是每条发现都锚定在当前 diff 的某一行上,所以评审能报告某个方向在哪里漏,却永远说不出换个方向能一次性消除所有这些漏洞。保持 0 表示用内置的 5 轮阈值;调大让这段文字更晚出现;设得非常大则彻底关闭。非正整数的值会被忽略。仅在 User、System、SystemDefaults 作用域生效;Workspace 作用域的值会被忽略,仓库无法为其评审者设定评审策略。",
|
|
4330
4330
|
"settings.label.ui.theme": "主题",
|
|
4331
4331
|
"settings.description.ui.theme": "界面的颜色主题。",
|
|
4332
|
+
"settings.label.ui.allowedApprovalModes": "Web Shell 审批模式",
|
|
4333
|
+
"settings.description.ui.allowedApprovalModes": "Web Shell 提供的执行审批模式。未配置时显示 default、auto-edit、auto 和 yolo;空列表不提供任何选项。宿主 allowedApprovalModes 优先于此设置。仅控制展示,不改变当前模式或强制约束后端权限。仅在 User、System、SystemDefaults 作用域生效;Workspace 作用域的值会被忽略并产生警告。请直接编辑 settings.json。",
|
|
4332
4334
|
"settings.label.ui.hideTips": "隐藏提示",
|
|
4333
4335
|
"settings.description.ui.hideTips": "隐藏界面中的帮助提示。",
|
|
4334
4336
|
"settings.label.ui.enableWelcomeBack": "显示欢迎回来对话框",
|
|
@@ -4445,16 +4447,22 @@ const Qd = {
|
|
|
4445
4447
|
* SPDX-License-Identifier: Apache-2.0
|
|
4446
4448
|
*/
|
|
4447
4449
|
const Jd = {
|
|
4448
|
-
"managed.tasks.title": "
|
|
4450
|
+
"managed.tasks.title": "Session tasks",
|
|
4449
4451
|
"managed.tasks.recovery": "Resume task cancellation",
|
|
4450
4452
|
"managed.tasks.description": "Task status and cancellation for this Session.",
|
|
4451
|
-
"managed.tasks.
|
|
4453
|
+
"managed.tasks.kind.child_agent": "Child Agent",
|
|
4454
|
+
"managed.tasks.kind.workflow": "Workflow",
|
|
4455
|
+
"managed.tasks.kind.background_shell": "Background Shell",
|
|
4456
|
+
"managed.tasks.kind.monitor": "Monitor",
|
|
4457
|
+
"managed.tasks.kind.automation_run": "Automation run",
|
|
4458
|
+
"managed.tasks.kind.channel_delivery": "Channel delivery",
|
|
4459
|
+
"managed.tasks.kind.other": "Task",
|
|
4452
4460
|
"managed.tasks.close": "Close tasks",
|
|
4453
4461
|
"managed.tasks.back": "Back to tasks",
|
|
4454
4462
|
"managed.tasks.previous": "Previous page",
|
|
4455
4463
|
"managed.tasks.next": "Next page",
|
|
4456
|
-
"managed.tasks.empty": "No
|
|
4457
|
-
"managed.tasks.emptyPage": "No
|
|
4464
|
+
"managed.tasks.empty": "No tasks found.",
|
|
4465
|
+
"managed.tasks.emptyPage": "No tasks on this page. Continue browsing task pages.",
|
|
4458
4466
|
"managed.tasks.created": "Created",
|
|
4459
4467
|
"managed.tasks.started": "Started",
|
|
4460
4468
|
"managed.tasks.settled": "Ended",
|
|
@@ -4467,7 +4475,7 @@ const Jd = {
|
|
|
4467
4475
|
"managed.tasks.historyGap": "Some earlier events expired. Showing the available history.",
|
|
4468
4476
|
"managed.tasks.noArtifacts": "This task has not provided viewable Artifacts yet.",
|
|
4469
4477
|
"managed.tasks.requestCancel": "Request cancellation",
|
|
4470
|
-
"managed.tasks.confirmDescription": "Cancel this
|
|
4478
|
+
"managed.tasks.confirmDescription": "Cancel this task? Stopping takes time; existing results are retained.",
|
|
4471
4479
|
"managed.tasks.confirmCancel": "Confirm cancellation",
|
|
4472
4480
|
"managed.tasks.keepRunning": "Keep running",
|
|
4473
4481
|
"managed.tasks.continue": "Continue confirming",
|
|
@@ -4497,16 +4505,22 @@ const Jd = {
|
|
|
4497
4505
|
"managed.tasks.runtime.draining": "Draining",
|
|
4498
4506
|
"managed.tasks.runtime.lost": "Connection lost"
|
|
4499
4507
|
}, Xd = {
|
|
4500
|
-
"managed.tasks.title": "
|
|
4508
|
+
"managed.tasks.title": "会话任务",
|
|
4501
4509
|
"managed.tasks.recovery": "恢复任务取消确认",
|
|
4502
4510
|
"managed.tasks.description": "查看此会话的任务状态并请求取消。",
|
|
4503
|
-
"managed.tasks.
|
|
4511
|
+
"managed.tasks.kind.child_agent": "子 Agent",
|
|
4512
|
+
"managed.tasks.kind.workflow": "工作流",
|
|
4513
|
+
"managed.tasks.kind.background_shell": "后台 Shell",
|
|
4514
|
+
"managed.tasks.kind.monitor": "监视",
|
|
4515
|
+
"managed.tasks.kind.automation_run": "自动化运行",
|
|
4516
|
+
"managed.tasks.kind.channel_delivery": "channel 投递",
|
|
4517
|
+
"managed.tasks.kind.other": "任务",
|
|
4504
4518
|
"managed.tasks.close": "关闭任务面板",
|
|
4505
4519
|
"managed.tasks.back": "返回任务列表",
|
|
4506
4520
|
"managed.tasks.previous": "上一页",
|
|
4507
4521
|
"managed.tasks.next": "下一页",
|
|
4508
|
-
"managed.tasks.empty": "
|
|
4509
|
-
"managed.tasks.emptyPage": "
|
|
4522
|
+
"managed.tasks.empty": "未找到任务。",
|
|
4523
|
+
"managed.tasks.emptyPage": "本页没有任务,请继续浏览任务分页。",
|
|
4510
4524
|
"managed.tasks.created": "创建时间",
|
|
4511
4525
|
"managed.tasks.started": "开始时间",
|
|
4512
4526
|
"managed.tasks.settled": "结束时间",
|
|
@@ -4519,7 +4533,7 @@ const Jd = {
|
|
|
4519
4533
|
"managed.tasks.historyGap": "部分较早事件已过期,正在展示可读取的历史。",
|
|
4520
4534
|
"managed.tasks.noArtifacts": "此任务尚未提供可查看的产物。",
|
|
4521
4535
|
"managed.tasks.requestCancel": "请求取消",
|
|
4522
|
-
"managed.tasks.confirmDescription": "
|
|
4536
|
+
"managed.tasks.confirmDescription": "取消此任务?停止需要时间,已经产生的结果会保留。",
|
|
4523
4537
|
"managed.tasks.confirmCancel": "确认取消",
|
|
4524
4538
|
"managed.tasks.keepRunning": "继续执行",
|
|
4525
4539
|
"managed.tasks.continue": "继续确认",
|
|
@@ -4548,7 +4562,49 @@ const Jd = {
|
|
|
4548
4562
|
"managed.tasks.runtime.ready": "就绪",
|
|
4549
4563
|
"managed.tasks.runtime.draining": "排空中",
|
|
4550
4564
|
"managed.tasks.runtime.lost": "连接丢失"
|
|
4551
|
-
}
|
|
4565
|
+
};
|
|
4566
|
+
/**
|
|
4567
|
+
* @license
|
|
4568
|
+
* Copyright 2026 Qwen Team
|
|
4569
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4570
|
+
*/
|
|
4571
|
+
const Zd = {
|
|
4572
|
+
"managed.remoteWorkspaceAdd": "Add Workspace",
|
|
4573
|
+
"managed.remoteWorkspaceDescription": "Choose a machine and an existing directory to add to your Workspace list.",
|
|
4574
|
+
"managed.remoteWorkspaceMachine": "Machine",
|
|
4575
|
+
"managed.remoteWorkspaceChooseMachine": "Choose a machine",
|
|
4576
|
+
"managed.remoteWorkspaceDirectory": "Directory on this machine",
|
|
4577
|
+
"managed.remoteWorkspaceName": "Workspace name",
|
|
4578
|
+
"managed.remoteWorkspaceCheck": "Check directory",
|
|
4579
|
+
"managed.remoteWorkspaceRegister": "Register Workspace",
|
|
4580
|
+
"managed.remoteWorkspaceConfirm": "Continue confirming registration",
|
|
4581
|
+
"managed.remoteWorkspaceStartAnother": "Start another registration",
|
|
4582
|
+
"managed.remoteWorkspaceClose": "Close",
|
|
4583
|
+
"managed.remoteWorkspaceWorking": "Confirming Workspace…",
|
|
4584
|
+
"managed.remoteWorkspacePermission": "Your account does not have permission to use this machine or Workspace.",
|
|
4585
|
+
"managed.remoteWorkspaceInvalidDirectory": "The directory is unavailable. Check the machine and directory, then try again.",
|
|
4586
|
+
"managed.remoteWorkspaceFailed": "Registration failed. Check the machine and directory before trying again.",
|
|
4587
|
+
"managed.remoteWorkspaceBlocked": "The machine has not confirmed this registration yet. It completes, or releases the directory, on its own once the machine answers; if it stays blocked, it needs administrator review. You can clear this browser draft to register another directory.",
|
|
4588
|
+
"managed.remoteWorkspaceUnconfirmed": "Registration is unconfirmed. Continue confirming the saved request."
|
|
4589
|
+
}, eu = {
|
|
4590
|
+
"managed.remoteWorkspaceAdd": "添加工作空间",
|
|
4591
|
+
"managed.remoteWorkspaceDescription": "选择机器和已有目录,将其加入工作空间列表。",
|
|
4592
|
+
"managed.remoteWorkspaceMachine": "机器",
|
|
4593
|
+
"managed.remoteWorkspaceChooseMachine": "选择机器",
|
|
4594
|
+
"managed.remoteWorkspaceDirectory": "机器上的目录",
|
|
4595
|
+
"managed.remoteWorkspaceName": "工作空间名称",
|
|
4596
|
+
"managed.remoteWorkspaceCheck": "检查目录",
|
|
4597
|
+
"managed.remoteWorkspaceRegister": "登记工作空间",
|
|
4598
|
+
"managed.remoteWorkspaceConfirm": "继续确认登记结果",
|
|
4599
|
+
"managed.remoteWorkspaceStartAnother": "开始另一项登记",
|
|
4600
|
+
"managed.remoteWorkspaceClose": "关闭",
|
|
4601
|
+
"managed.remoteWorkspaceWorking": "正在确认工作空间…",
|
|
4602
|
+
"managed.remoteWorkspacePermission": "当前账号无权使用该机器或工作空间。",
|
|
4603
|
+
"managed.remoteWorkspaceInvalidDirectory": "目录不可用。请检查机器和目录后重试。",
|
|
4604
|
+
"managed.remoteWorkspaceFailed": "登记失败。请检查机器和目录后重试。",
|
|
4605
|
+
"managed.remoteWorkspaceBlocked": "机器尚未确认此登记。机器给出结果后,它会自动完成或释放该目录;若一直保持阻塞,则需要管理员检查。可以清除此浏览器草稿并登记其他目录。",
|
|
4606
|
+
"managed.remoteWorkspaceUnconfirmed": "登记结果尚未确认,请继续确认已保存的请求。"
|
|
4607
|
+
}, Fm = ["en", "zh-CN"];
|
|
4552
4608
|
function jo(e, t) {
|
|
4553
4609
|
const o = typeof e == "number" ? e : Number(e ?? 0), s = Number.isFinite(o) ? o : 0;
|
|
4554
4610
|
return `${s} ${t}${s === 1 ? "" : "s"}`;
|
|
@@ -4723,13 +4779,17 @@ const ar = {
|
|
|
4723
4779
|
"managed.approvalOptionsLoading": "Loading approval modes…",
|
|
4724
4780
|
"managed.approvalOptionsLoadFailed": "Could not load approval modes.",
|
|
4725
4781
|
"managed.approvalOptionsInvalid": "The service returned unsupported approval modes.",
|
|
4726
|
-
"managed.approvalFixed": "
|
|
4727
|
-
"managed.newWorkspaceDescription": "
|
|
4782
|
+
"managed.approvalFixed": "This session does not support changing its approval policy.",
|
|
4783
|
+
"managed.newWorkspaceDescription": "Choose an existing project directory, or name a new empty workspace.",
|
|
4784
|
+
"managed.workspaceDirectoryRoot": "Authorized Linux directories",
|
|
4785
|
+
"managed.workspaceDirectoryHint": "Choose an existing project on the Linux execution host within this authorized root.",
|
|
4786
|
+
"managed.workspaceChooseDirectory": "Choose existing directory",
|
|
4787
|
+
"managed.workspaceDirectoryScope": "Choose a directory inside the selected root.",
|
|
4728
4788
|
"managed.newWorkspaceName": "Workspace name",
|
|
4729
4789
|
"managed.newWorkspaceNameInvalid": "Use a name of 1–128 characters without control characters.",
|
|
4730
4790
|
"managed.newWorkspaceCreate": "Create workspace",
|
|
4731
4791
|
"managed.newWorkspaceCreating": "Creating workspace…",
|
|
4732
|
-
"managed.newWorkspaceUncertain": "The creation is not yet confirmed. Retry to check the same workspace.",
|
|
4792
|
+
"managed.newWorkspaceUncertain": "The creation is not yet confirmed. Retry to check the same workspace, or abandon local confirmation to start again. Abandoning does not delete a workspace that may already exist.",
|
|
4733
4793
|
"managed.newWorkspaceResume": "Resume workspace creation",
|
|
4734
4794
|
"managed.newWorkspaceClose": "Close",
|
|
4735
4795
|
"managed.workspaceUnsupported": "This service does not support Workspace binding.",
|
|
@@ -6510,6 +6570,7 @@ const ar = {
|
|
|
6510
6570
|
"shell.result.cancelled": "Cancelled",
|
|
6511
6571
|
"shell.result.waiting": "Waiting for output…",
|
|
6512
6572
|
"shell.result.empty": "No output",
|
|
6573
|
+
"shell.result.unavailable": "Output is unavailable for this tool call.",
|
|
6513
6574
|
"shell.result.exited": (e) => `Exited with code ${e?.code}`,
|
|
6514
6575
|
"turnCalls.open": "View tool calls",
|
|
6515
6576
|
"turnCalls.title": "Tool calls",
|
|
@@ -8196,10 +8257,11 @@ const ar = {
|
|
|
8196
8257
|
...Vd,
|
|
8197
8258
|
...Qd,
|
|
8198
8259
|
...Jd,
|
|
8260
|
+
...Zd,
|
|
8199
8261
|
..._d,
|
|
8200
8262
|
...Fd,
|
|
8201
|
-
...
|
|
8202
|
-
},
|
|
8263
|
+
...Wd
|
|
8264
|
+
}, tu = {
|
|
8203
8265
|
...ar,
|
|
8204
8266
|
"capacityChoice.persistenceUnconfirmed": "无法确认最后一轮被中断内容是否已保存。",
|
|
8205
8267
|
"capacityChoice.title": "选择要停止的工作区",
|
|
@@ -8370,13 +8432,17 @@ const ar = {
|
|
|
8370
8432
|
"managed.approvalOptionsLoading": "正在加载审批策略…",
|
|
8371
8433
|
"managed.approvalOptionsLoadFailed": "加载审批策略失败。",
|
|
8372
8434
|
"managed.approvalOptionsInvalid": "服务返回了不支持的审批策略。",
|
|
8373
|
-
"managed.approvalFixed": "
|
|
8374
|
-
"managed.newWorkspaceDescription": "
|
|
8435
|
+
"managed.approvalFixed": "当前会话不支持更改审批策略。",
|
|
8436
|
+
"managed.newWorkspaceDescription": "选择已有项目目录,或输入名称创建空工作区。",
|
|
8437
|
+
"managed.workspaceDirectoryRoot": "已授权的 Linux 目录",
|
|
8438
|
+
"managed.workspaceDirectoryHint": "选择此授权根目录内、位于 Linux 执行机器上的已有项目。",
|
|
8439
|
+
"managed.workspaceChooseDirectory": "选择已有目录",
|
|
8440
|
+
"managed.workspaceDirectoryScope": "请选择已选根目录中的目录。",
|
|
8375
8441
|
"managed.newWorkspaceName": "工作区名称",
|
|
8376
8442
|
"managed.newWorkspaceNameInvalid": "名称需为 1–128 个字符,不能包含控制字符。",
|
|
8377
8443
|
"managed.newWorkspaceCreate": "创建工作区",
|
|
8378
8444
|
"managed.newWorkspaceCreating": "正在创建工作区…",
|
|
8379
|
-
"managed.newWorkspaceUncertain": "
|
|
8445
|
+
"managed.newWorkspaceUncertain": "创建结果尚未确认。重试将查询同一个工作区,也可放弃本地确认后重新开始。放弃不会删除可能已经创建的工作区。",
|
|
8380
8446
|
"managed.newWorkspaceResume": "继续确认工作区创建",
|
|
8381
8447
|
"managed.newWorkspaceClose": "关闭",
|
|
8382
8448
|
"managed.workspaceUnsupported": "当前服务不支持工作区绑定。",
|
|
@@ -10231,6 +10297,7 @@ const ar = {
|
|
|
10231
10297
|
"shell.result.cancelled": "已取消",
|
|
10232
10298
|
"shell.result.waiting": "等待输出…",
|
|
10233
10299
|
"shell.result.empty": "无输出",
|
|
10300
|
+
"shell.result.unavailable": "无法获取此工具调用的输出。",
|
|
10234
10301
|
"shell.result.exited": (e) => `退出码 ${e?.code}`,
|
|
10235
10302
|
"turnCalls.open": "查看工具调用",
|
|
10236
10303
|
"turnCalls.title": "工具调用",
|
|
@@ -11905,29 +11972,30 @@ const ar = {
|
|
|
11905
11972
|
...Kd,
|
|
11906
11973
|
...Yd,
|
|
11907
11974
|
...Xd,
|
|
11975
|
+
...eu,
|
|
11908
11976
|
...Dd,
|
|
11909
11977
|
...Ud,
|
|
11910
|
-
...
|
|
11911
|
-
},
|
|
11978
|
+
...Nd
|
|
11979
|
+
}, ou = {
|
|
11912
11980
|
en: ar,
|
|
11913
|
-
"zh-CN":
|
|
11914
|
-
},
|
|
11981
|
+
"zh-CN": tu
|
|
11982
|
+
}, nu = {
|
|
11915
11983
|
en: "English [en]",
|
|
11916
11984
|
"zh-CN": "中文 [zh-CN]"
|
|
11917
11985
|
}, rl = kt({
|
|
11918
11986
|
language: "en",
|
|
11919
11987
|
t: (e) => e
|
|
11920
11988
|
});
|
|
11921
|
-
function
|
|
11989
|
+
function su(e) {
|
|
11922
11990
|
const t = e?.trim().toLowerCase();
|
|
11923
11991
|
return t && (t === "zh" || t === "zh-cn" || t === "zh_cn") ? "zh-CN" : "en";
|
|
11924
11992
|
}
|
|
11925
|
-
function
|
|
11993
|
+
function Um(e) {
|
|
11926
11994
|
if (typeof e != "string") return;
|
|
11927
11995
|
const t = e.trim().toLowerCase().replace(/_/g, "-");
|
|
11928
11996
|
if (t) {
|
|
11929
11997
|
if (t === "auto")
|
|
11930
|
-
return
|
|
11998
|
+
return su(
|
|
11931
11999
|
typeof navigator < "u" ? navigator.language : void 0
|
|
11932
12000
|
);
|
|
11933
12001
|
if (t === "zh" || t === "zh-cn" || t === "chinese" || t === "中文")
|
|
@@ -11936,17 +12004,17 @@ function Lm(e) {
|
|
|
11936
12004
|
return "en";
|
|
11937
12005
|
}
|
|
11938
12006
|
}
|
|
11939
|
-
function
|
|
11940
|
-
return
|
|
12007
|
+
function Wm(e) {
|
|
12008
|
+
return nu[e];
|
|
11941
12009
|
}
|
|
11942
12010
|
function il(e) {
|
|
11943
|
-
const t =
|
|
12011
|
+
const t = ou[e];
|
|
11944
12012
|
return (o, s) => {
|
|
11945
12013
|
const n = t[o] ?? ar[o] ?? o;
|
|
11946
12014
|
return typeof n == "function" ? n(s) : n;
|
|
11947
12015
|
};
|
|
11948
12016
|
}
|
|
11949
|
-
function
|
|
12017
|
+
function Nm({
|
|
11950
12018
|
language: e,
|
|
11951
12019
|
children: t
|
|
11952
12020
|
}) {
|
|
@@ -11956,7 +12024,7 @@ function Um({
|
|
|
11956
12024
|
}), [e]);
|
|
11957
12025
|
return /* @__PURE__ */ Ht(rl.Provider, { value: o, children: t });
|
|
11958
12026
|
}
|
|
11959
|
-
function
|
|
12027
|
+
function Bm() {
|
|
11960
12028
|
return Mt(rl);
|
|
11961
12029
|
}
|
|
11962
12030
|
/**
|
|
@@ -11964,15 +12032,15 @@ function Nm() {
|
|
|
11964
12032
|
* Copyright 2025 Qwen Team
|
|
11965
12033
|
* SPDX-License-Identifier: Apache-2.0
|
|
11966
12034
|
*/
|
|
11967
|
-
const
|
|
11968
|
-
function
|
|
12035
|
+
const au = 33e4;
|
|
12036
|
+
function ru(e) {
|
|
11969
12037
|
if (!e || typeof e != "object") return !1;
|
|
11970
12038
|
const t = e.snapshot;
|
|
11971
12039
|
if (!t || typeof t != "object") return !1;
|
|
11972
12040
|
const o = t;
|
|
11973
12041
|
return o.v !== 2 || o.activity !== "idle" && o.activity !== "running" && o.activity !== "verifying" ? !1 : o.goal === null || typeof o.goal == "object";
|
|
11974
12042
|
}
|
|
11975
|
-
function
|
|
12043
|
+
function iu({
|
|
11976
12044
|
getClient: e,
|
|
11977
12045
|
getWorkspaceCwd: t,
|
|
11978
12046
|
baseUrl: o,
|
|
@@ -12474,7 +12542,7 @@ function au({
|
|
|
12474
12542
|
return _(
|
|
12475
12543
|
a.generateWorkspaceAgent(n),
|
|
12476
12544
|
"Generate agent timed out",
|
|
12477
|
-
|
|
12545
|
+
au
|
|
12478
12546
|
);
|
|
12479
12547
|
},
|
|
12480
12548
|
async deleteAgent(n, a) {
|
|
@@ -12661,7 +12729,7 @@ function au({
|
|
|
12661
12729
|
);
|
|
12662
12730
|
if (!a.ok)
|
|
12663
12731
|
throw new Error(await mo(a, "GET /goals"));
|
|
12664
|
-
const r = await a.json(), i = Array.isArray(r.goals) ? r.goals : [], l = i.filter(
|
|
12732
|
+
const r = await a.json(), i = Array.isArray(r.goals) ? r.goals : [], l = i.filter(ru), p = typeof r.droppedCount == "number" && r.droppedCount > 0 ? r.droppedCount : 0;
|
|
12665
12733
|
return {
|
|
12666
12734
|
goals: l,
|
|
12667
12735
|
droppedCount: p + i.length - l.length
|
|
@@ -12958,24 +13026,24 @@ async function mo(e, t) {
|
|
|
12958
13026
|
* Copyright 2026 Qwen Team
|
|
12959
13027
|
* SPDX-License-Identifier: Apache-2.0
|
|
12960
13028
|
*/
|
|
12961
|
-
function
|
|
13029
|
+
function lu(e, t, o, s) {
|
|
12962
13030
|
for (e.delete(t), e.set(t, o); e.size > s; ) {
|
|
12963
13031
|
const n = e.keys().next().value;
|
|
12964
13032
|
if (n === void 0) break;
|
|
12965
13033
|
e.delete(n);
|
|
12966
13034
|
}
|
|
12967
13035
|
}
|
|
12968
|
-
const rr = kt(void 0),
|
|
13036
|
+
const rr = kt(void 0), cu = typeof import.meta.url == "string" && import.meta.url ? import.meta.url : "web-shell/DaemonWorkspaceProvider", Zn = `${cu}#${Math.random().toString(36).slice(2, 8)}`, du = "__qwenWebShellDaemonWorkspaceProviderCopies", uu = 8;
|
|
12969
13037
|
function cl() {
|
|
12970
13038
|
const e = globalThis;
|
|
12971
|
-
return e[
|
|
13039
|
+
return e[du] ??= /* @__PURE__ */ new Map();
|
|
12972
13040
|
}
|
|
12973
13041
|
function ei(e, t) {
|
|
12974
13042
|
const o = cl(), s = t || o.get(e) === "provided" ? "provided" : "rendered";
|
|
12975
|
-
|
|
13043
|
+
lu(o, e, s, uu);
|
|
12976
13044
|
}
|
|
12977
|
-
const Ea = /* @__PURE__ */ new Set(),
|
|
12978
|
-
function
|
|
13045
|
+
const Ea = /* @__PURE__ */ new Set(), pu = 2e3;
|
|
13046
|
+
function jm({
|
|
12979
13047
|
baseUrl: e,
|
|
12980
13048
|
token: t,
|
|
12981
13049
|
workspaceCwd: o,
|
|
@@ -12989,7 +13057,7 @@ function Wm({
|
|
|
12989
13057
|
[s, e, t, n]
|
|
12990
13058
|
), i = Y(r);
|
|
12991
13059
|
i.current = r;
|
|
12992
|
-
const l = Y(void 0), p = Y(void 0), g = Y(0), h = Y(o), [b, A] = lt(void 0), [$, x] = lt(void 0), [F, P] = lt(!1), [
|
|
13060
|
+
const l = Y(void 0), p = Y(void 0), g = Y(0), h = Y(o), [b, A] = lt(void 0), [$, x] = lt(void 0), [F, P] = lt(!1), [N, H] = lt(
|
|
12993
13061
|
s ? "connecting" : "idle"
|
|
12994
13062
|
), [J, I] = lt(void 0), [X, te] = lt(
|
|
12995
13063
|
r
|
|
@@ -13062,7 +13130,7 @@ function Wm({
|
|
|
13062
13130
|
B.current = void 0;
|
|
13063
13131
|
const zt = i.current;
|
|
13064
13132
|
zt !== void 0 && V.current === Qe && U(zt, !0);
|
|
13065
|
-
},
|
|
13133
|
+
}, pu);
|
|
13066
13134
|
}
|
|
13067
13135
|
}).finally(() => {
|
|
13068
13136
|
V.current === Qe && (v.current = !1);
|
|
@@ -13081,7 +13149,7 @@ function Wm({
|
|
|
13081
13149
|
}, [$, F, U]);
|
|
13082
13150
|
h.current = b?.workspaceCwd ?? o;
|
|
13083
13151
|
const oe = Ze(
|
|
13084
|
-
() =>
|
|
13152
|
+
() => iu({
|
|
13085
13153
|
getClient: () => i.current,
|
|
13086
13154
|
getWorkspaceCwd: () => h.current,
|
|
13087
13155
|
baseUrl: e,
|
|
@@ -13095,7 +13163,7 @@ function Wm({
|
|
|
13095
13163
|
token: t,
|
|
13096
13164
|
baseUrl: e,
|
|
13097
13165
|
workspaceCwd: b?.workspaceCwd ?? o,
|
|
13098
|
-
status:
|
|
13166
|
+
status: N,
|
|
13099
13167
|
error: J,
|
|
13100
13168
|
capabilities: b,
|
|
13101
13169
|
brand: $,
|
|
@@ -13110,7 +13178,7 @@ function Wm({
|
|
|
13110
13178
|
t,
|
|
13111
13179
|
e,
|
|
13112
13180
|
o,
|
|
13113
|
-
|
|
13181
|
+
N,
|
|
13114
13182
|
J,
|
|
13115
13183
|
b,
|
|
13116
13184
|
$,
|
|
@@ -13137,7 +13205,7 @@ function as() {
|
|
|
13137
13205
|
function vo() {
|
|
13138
13206
|
return as().actions;
|
|
13139
13207
|
}
|
|
13140
|
-
function
|
|
13208
|
+
function mu() {
|
|
13141
13209
|
return Mt(rr);
|
|
13142
13210
|
}
|
|
13143
13211
|
/**
|
|
@@ -13145,7 +13213,7 @@ function uu() {
|
|
|
13145
13213
|
* Copyright 2026 Qwen Team
|
|
13146
13214
|
* SPDX-License-Identifier: Apache-2.0
|
|
13147
13215
|
*/
|
|
13148
|
-
async function
|
|
13216
|
+
async function gu(e, t, o) {
|
|
13149
13217
|
let s = t;
|
|
13150
13218
|
for (; !o() && s.runtimeLive && s.capabilities?.skills?.state === "starting"; )
|
|
13151
13219
|
s = await e.runtimeStatus(), s.capabilities?.skills?.state === "starting" && await new Promise((r) => setTimeout(r, 1e3));
|
|
@@ -13160,15 +13228,15 @@ async function pu(e, t, o) {
|
|
|
13160
13228
|
* Copyright 2025 Qwen Team
|
|
13161
13229
|
* SPDX-License-Identifier: Apache-2.0
|
|
13162
13230
|
*/
|
|
13163
|
-
function
|
|
13231
|
+
function hu(e) {
|
|
13164
13232
|
return e.filter(
|
|
13165
13233
|
(t) => t.kind === "permission" && t.resolved === void 0
|
|
13166
13234
|
);
|
|
13167
13235
|
}
|
|
13168
|
-
function
|
|
13236
|
+
function fu(e) {
|
|
13169
13237
|
return e.flatMap((t) => {
|
|
13170
13238
|
if (t.kind !== "tool") return [];
|
|
13171
|
-
const o =
|
|
13239
|
+
const o = vu(t);
|
|
13172
13240
|
if (!o) return [];
|
|
13173
13241
|
const s = sn(t.rawOutput), n = sn(s?.plan), a = tn(n, "id"), r = tn(n, "sourceCallId");
|
|
13174
13242
|
return [
|
|
@@ -13185,14 +13253,14 @@ function gu(e) {
|
|
|
13185
13253
|
];
|
|
13186
13254
|
});
|
|
13187
13255
|
}
|
|
13188
|
-
function
|
|
13189
|
-
return
|
|
13256
|
+
function wu(e) {
|
|
13257
|
+
return fu(e).at(-1);
|
|
13190
13258
|
}
|
|
13191
|
-
function
|
|
13192
|
-
const t =
|
|
13193
|
-
return t &&
|
|
13259
|
+
function ku(e) {
|
|
13260
|
+
const t = wu(e);
|
|
13261
|
+
return t && bu(t.items) ? t : void 0;
|
|
13194
13262
|
}
|
|
13195
|
-
function
|
|
13263
|
+
function vu(e) {
|
|
13196
13264
|
const t = (e.toolName ?? "").toLowerCase(), o = (e.toolKind ?? "").toLowerCase(), s = t === "todowrite" || t === "todo_write" || o === "updated_plan" || o === "todo";
|
|
13197
13265
|
if (!s && o !== "other")
|
|
13198
13266
|
return;
|
|
@@ -13215,27 +13283,27 @@ function Ra(e) {
|
|
|
13215
13283
|
return e.flatMap((o, s) => {
|
|
13216
13284
|
const n = sn(o), a = tn(n, "content");
|
|
13217
13285
|
if (!a) return [];
|
|
13218
|
-
const r = sn(n?._meta), i = sn(r?.qwenTodo), l = tn(i, "id") ?? tn(n, "id") ?? `plan-${s}`, p =
|
|
13286
|
+
const r = sn(n?._meta), i = sn(r?.qwenTodo), l = tn(i, "id") ?? tn(n, "id") ?? `plan-${s}`, p = Iu(i, "blockedBy");
|
|
13219
13287
|
return [
|
|
13220
13288
|
{
|
|
13221
13289
|
id: l,
|
|
13222
13290
|
content: a,
|
|
13223
|
-
status:
|
|
13291
|
+
status: Cu(tn(n, "status")),
|
|
13224
13292
|
...p ? { blockedBy: p } : {},
|
|
13225
13293
|
...(() => {
|
|
13226
|
-
const g =
|
|
13294
|
+
const g = Tu(tn(n, "priority"));
|
|
13227
13295
|
return g ? { priority: g } : {};
|
|
13228
13296
|
})()
|
|
13229
13297
|
}
|
|
13230
13298
|
];
|
|
13231
13299
|
});
|
|
13232
13300
|
}
|
|
13233
|
-
function
|
|
13301
|
+
function bu(e) {
|
|
13234
13302
|
return e.some(
|
|
13235
13303
|
(t) => t.status === "pending" || t.status === "in_progress"
|
|
13236
13304
|
);
|
|
13237
13305
|
}
|
|
13238
|
-
function
|
|
13306
|
+
function yu(e) {
|
|
13239
13307
|
if (e.length === 0) return "idle";
|
|
13240
13308
|
const t = e[e.length - 1];
|
|
13241
13309
|
if (t?.kind === "thought" && ti(t))
|
|
@@ -13250,8 +13318,8 @@ function vu(e) {
|
|
|
13250
13318
|
}
|
|
13251
13319
|
return "idle";
|
|
13252
13320
|
}
|
|
13253
|
-
function
|
|
13254
|
-
const o =
|
|
13321
|
+
function Su(e, t) {
|
|
13322
|
+
const o = yu(e);
|
|
13255
13323
|
return t === "idle" ? "idle" : o !== "idle" || t === void 0 ? o : t === "waiting" ? "waiting" : "responding";
|
|
13256
13324
|
}
|
|
13257
13325
|
function ti(e) {
|
|
@@ -13264,10 +13332,10 @@ function ni(e) {
|
|
|
13264
13332
|
const t = e?.todos;
|
|
13265
13333
|
return Array.isArray(t) ? t : void 0;
|
|
13266
13334
|
}
|
|
13267
|
-
function
|
|
13335
|
+
function Cu(e) {
|
|
13268
13336
|
return e === "completed" || e === "in_progress" || e === "pending" ? e : "pending";
|
|
13269
13337
|
}
|
|
13270
|
-
function
|
|
13338
|
+
function Tu(e) {
|
|
13271
13339
|
return e === "high" || e === "medium" || e === "low" ? e : void 0;
|
|
13272
13340
|
}
|
|
13273
13341
|
function sn(e) {
|
|
@@ -13278,7 +13346,7 @@ function tn(e, t) {
|
|
|
13278
13346
|
const o = e?.[t];
|
|
13279
13347
|
return typeof o == "string" && o.length > 0 ? o : void 0;
|
|
13280
13348
|
}
|
|
13281
|
-
function
|
|
13349
|
+
function Iu(e, t) {
|
|
13282
13350
|
const o = e?.[t];
|
|
13283
13351
|
return Array.isArray(o) && o.every((s) => typeof s == "string") ? o : void 0;
|
|
13284
13352
|
}
|
|
@@ -13292,7 +13360,7 @@ let Hs;
|
|
|
13292
13360
|
function si() {
|
|
13293
13361
|
return Hs;
|
|
13294
13362
|
}
|
|
13295
|
-
function
|
|
13363
|
+
function xu(e) {
|
|
13296
13364
|
return Va.add(e), () => {
|
|
13297
13365
|
Va.delete(e);
|
|
13298
13366
|
};
|
|
@@ -13327,7 +13395,7 @@ let nn = ul;
|
|
|
13327
13395
|
function ii() {
|
|
13328
13396
|
return nn;
|
|
13329
13397
|
}
|
|
13330
|
-
function
|
|
13398
|
+
function Au(e) {
|
|
13331
13399
|
return Ka.add(e), () => {
|
|
13332
13400
|
Ka.delete(e);
|
|
13333
13401
|
};
|
|
@@ -13351,7 +13419,7 @@ function li(e) {
|
|
|
13351
13419
|
nn = t;
|
|
13352
13420
|
pl();
|
|
13353
13421
|
}
|
|
13354
|
-
function
|
|
13422
|
+
function Eu(e) {
|
|
13355
13423
|
if (e.length === 0 || nn.length === 0) return;
|
|
13356
13424
|
const t = new Set(e), o = nn.filter((s) => !t.has(s));
|
|
13357
13425
|
o.length !== nn.length && (nn = o.length === 0 ? ul : o, pl());
|
|
@@ -13392,23 +13460,23 @@ function ci(e) {
|
|
|
13392
13460
|
*/
|
|
13393
13461
|
const Qa = /* @__PURE__ */ new Set(), Ya = /* @__PURE__ */ new Set();
|
|
13394
13462
|
let ml = 0, Rn = [];
|
|
13395
|
-
function
|
|
13463
|
+
function qm() {
|
|
13396
13464
|
return ml;
|
|
13397
13465
|
}
|
|
13398
|
-
function
|
|
13466
|
+
function Hm() {
|
|
13399
13467
|
return Rn;
|
|
13400
13468
|
}
|
|
13401
|
-
function
|
|
13469
|
+
function Gm(e) {
|
|
13402
13470
|
return Qa.add(e), () => {
|
|
13403
13471
|
Qa.delete(e);
|
|
13404
13472
|
};
|
|
13405
13473
|
}
|
|
13406
|
-
function
|
|
13474
|
+
function zm(e) {
|
|
13407
13475
|
return Ya.add(e), () => {
|
|
13408
13476
|
Ya.delete(e);
|
|
13409
13477
|
};
|
|
13410
13478
|
}
|
|
13411
|
-
function
|
|
13479
|
+
function Ru() {
|
|
13412
13480
|
ml++;
|
|
13413
13481
|
for (const e of Qa)
|
|
13414
13482
|
try {
|
|
@@ -13425,14 +13493,14 @@ function gl() {
|
|
|
13425
13493
|
console.error("[pendingPromptEvents] listener error", t);
|
|
13426
13494
|
}
|
|
13427
13495
|
}
|
|
13428
|
-
function
|
|
13496
|
+
function Vm(e) {
|
|
13429
13497
|
if (e.length === 0) return;
|
|
13430
13498
|
const t = new Set(e), o = Rn.filter((s) => !t.has(s));
|
|
13431
13499
|
o.length !== Rn.length && (Rn = o, gl());
|
|
13432
13500
|
}
|
|
13433
13501
|
function di(e) {
|
|
13434
13502
|
const t = hl(e);
|
|
13435
|
-
return t ? (Rn = [...Rn, t].slice(-200), gl(), (t.type ===
|
|
13503
|
+
return t ? (Rn = [...Rn, t].slice(-200), gl(), (t.type === Ni || t.type === Bi || t.type === ji) && Ru(), !0) : !1;
|
|
13436
13504
|
}
|
|
13437
13505
|
function ui(e) {
|
|
13438
13506
|
return hl(e) !== void 0;
|
|
@@ -13442,7 +13510,7 @@ function hl(e) {
|
|
|
13442
13510
|
const t = e, o = t.type, s = t.data;
|
|
13443
13511
|
if (!s || typeof s != "object") return;
|
|
13444
13512
|
const n = s;
|
|
13445
|
-
if (typeof n.sessionId == "string" && ((o ===
|
|
13513
|
+
if (typeof n.sessionId == "string" && ((o === Ni || o === Bi || o === ji) && typeof n.promptId == "string" || (o === "turn_complete" || o === "turn_error") && typeof n.promptId == "string"))
|
|
13446
13514
|
return e;
|
|
13447
13515
|
}
|
|
13448
13516
|
/**
|
|
@@ -13450,11 +13518,11 @@ function hl(e) {
|
|
|
13450
13518
|
* Copyright 2025 Qwen Team
|
|
13451
13519
|
* SPDX-License-Identifier: Apache-2.0
|
|
13452
13520
|
*/
|
|
13453
|
-
const fl = [404, 410],
|
|
13521
|
+
const fl = [404, 410], Pu = new Set(
|
|
13454
13522
|
fl
|
|
13455
13523
|
);
|
|
13456
13524
|
function es(e) {
|
|
13457
|
-
return e !== void 0 &&
|
|
13525
|
+
return e !== void 0 && Pu.has(e);
|
|
13458
13526
|
}
|
|
13459
13527
|
function Jt(e, t) {
|
|
13460
13528
|
return es(t) && !es(e) ? t : e;
|
|
@@ -13490,11 +13558,11 @@ function ir(e) {
|
|
|
13490
13558
|
}
|
|
13491
13559
|
return t;
|
|
13492
13560
|
}
|
|
13493
|
-
function
|
|
13561
|
+
function Km(e, t) {
|
|
13494
13562
|
const o = ir(e).join(" "), s = Array.from(o);
|
|
13495
13563
|
return s.length > t ? s.slice(0, t - 1).join("") + "…" : o;
|
|
13496
13564
|
}
|
|
13497
|
-
function
|
|
13565
|
+
function $u(e) {
|
|
13498
13566
|
return e?.source !== "slash_command" || !Array.isArray(e.sessionArtifacts) ? [] : e.sessionArtifacts.flatMap((t) => {
|
|
13499
13567
|
if (!t || typeof t != "object" || Array.isArray(t)) return [];
|
|
13500
13568
|
const o = t, { title: s, workspacePath: n, kind: a, storage: r, mimeType: i, sizeBytes: l } = o;
|
|
@@ -13515,9 +13583,9 @@ function Ru(e) {
|
|
|
13515
13583
|
* Copyright 2025 Qwen Team
|
|
13516
13584
|
* SPDX-License-Identifier: Apache-2.0
|
|
13517
13585
|
*/
|
|
13518
|
-
const
|
|
13519
|
-
function
|
|
13520
|
-
return e ===
|
|
13586
|
+
const Mu = "agent";
|
|
13587
|
+
function Qm(e) {
|
|
13588
|
+
return e === Mu;
|
|
13521
13589
|
}
|
|
13522
13590
|
function kl(e) {
|
|
13523
13591
|
const t = e.toLowerCase();
|
|
@@ -13534,20 +13602,20 @@ function vl(e, t) {
|
|
|
13534
13602
|
function bl(e) {
|
|
13535
13603
|
return e === "pending" || e === "running" || e === "in_progress";
|
|
13536
13604
|
}
|
|
13537
|
-
function
|
|
13605
|
+
function _u(e) {
|
|
13538
13606
|
return e === "completed" || e === "failed" || e === "cancelled" || e === "canceled";
|
|
13539
13607
|
}
|
|
13540
|
-
function
|
|
13608
|
+
function Ym(e) {
|
|
13541
13609
|
return e.some((t) => bl(t.status));
|
|
13542
13610
|
}
|
|
13543
|
-
function
|
|
13611
|
+
function Du(e) {
|
|
13544
13612
|
return Vs(e)?.type === "task_execution";
|
|
13545
13613
|
}
|
|
13546
13614
|
function ns(e) {
|
|
13547
13615
|
const t = e.toolName.toLowerCase();
|
|
13548
|
-
return t === "workflow" ? !1 : t === "agent" || t === "task" || e.subTools || e.subContent ||
|
|
13616
|
+
return t === "workflow" ? !1 : t === "agent" || t === "task" || e.subTools || e.subContent || Du(e.rawOutput) ? !0 : !!e.args?.subagent_type;
|
|
13549
13617
|
}
|
|
13550
|
-
function
|
|
13618
|
+
function Jm(e) {
|
|
13551
13619
|
if (!ns(e)) return !1;
|
|
13552
13620
|
if (e.executionMode) return e.executionMode === "background";
|
|
13553
13621
|
const t = Vs(e.rawOutput), o = e.toolName.toLowerCase(), s = e.args, n = o === "agent" && e.parentToolCallId === void 0, a = n && s !== void 0 && s?.run_in_background === void 0 && s?.working_dir === void 0 && s?.name === void 0 && // Args alone cannot distinguish an interactive detached fork from a
|
|
@@ -13556,8 +13624,8 @@ function Qm(e) {
|
|
|
13556
13624
|
(typeof s?.subagent_type != "string" || s.subagent_type.toLowerCase() !== "fork"), r = s?.run_in_background === !0 && (o !== "agent" || n);
|
|
13557
13625
|
return t?.status === "background" || r || a;
|
|
13558
13626
|
}
|
|
13559
|
-
function
|
|
13560
|
-
if (
|
|
13627
|
+
function Ou(e, t, o, s = !1) {
|
|
13628
|
+
if (!_u(t)) return e;
|
|
13561
13629
|
const n = t === "cancelled" || t === "canceled";
|
|
13562
13630
|
return {
|
|
13563
13631
|
...e,
|
|
@@ -13572,34 +13640,34 @@ function _u(e, t, o, s = !1) {
|
|
|
13572
13640
|
} : {}
|
|
13573
13641
|
};
|
|
13574
13642
|
}
|
|
13575
|
-
const
|
|
13643
|
+
const Lu = /* @__PURE__ */ new Set([
|
|
13576
13644
|
"shell",
|
|
13577
13645
|
"bash",
|
|
13578
13646
|
"run_shell_command",
|
|
13579
13647
|
"exec"
|
|
13580
|
-
]),
|
|
13581
|
-
function
|
|
13582
|
-
if (!(e.status === "failed" || !
|
|
13583
|
-
return typeof e.rawOutput == "string" ?
|
|
13648
|
+
]), Fu = /^(?:Background shell|Promoted to background:)\s+(bg_[\w-]+)/i;
|
|
13649
|
+
function Xm(e) {
|
|
13650
|
+
if (!(e.status === "failed" || !Lu.has(e.toolName.toLowerCase())))
|
|
13651
|
+
return typeof e.rawOutput == "string" ? Fu.exec(e.rawOutput)?.[1] : void 0;
|
|
13584
13652
|
}
|
|
13585
13653
|
function yl(e) {
|
|
13586
13654
|
const t = e.toLowerCase();
|
|
13587
13655
|
return t === "todo_write" || t === "todowrite";
|
|
13588
13656
|
}
|
|
13589
|
-
function
|
|
13657
|
+
function Zm(e) {
|
|
13590
13658
|
return e?.toolKind === "switch_mode" && e?.toolName?.toLowerCase() === "exit_plan_mode";
|
|
13591
13659
|
}
|
|
13592
13660
|
function Yn(e) {
|
|
13593
13661
|
return e.flatMap((o, s) => {
|
|
13594
13662
|
const n = wo(o), a = hn(n, "content");
|
|
13595
13663
|
if (!a) return [];
|
|
13596
|
-
const r = wo(n?._meta), i = wo(r?.qwenTodo), l =
|
|
13664
|
+
const r = wo(n?._meta), i = wo(r?.qwenTodo), l = zu(i, "blockedBy");
|
|
13597
13665
|
return [
|
|
13598
13666
|
{
|
|
13599
13667
|
id: hn(i, "id") ?? hn(n, "id") ?? `plan-${s}`,
|
|
13600
13668
|
content: a,
|
|
13601
|
-
status:
|
|
13602
|
-
priority:
|
|
13669
|
+
status: Hu(hn(n, "status")),
|
|
13670
|
+
priority: Gu(hn(n, "priority")),
|
|
13603
13671
|
...l ? { blockedBy: l } : {}
|
|
13604
13672
|
}
|
|
13605
13673
|
];
|
|
@@ -13634,7 +13702,7 @@ function Gs(e) {
|
|
|
13634
13702
|
(t) => t.status === "pending" || t.status === "in_progress"
|
|
13635
13703
|
);
|
|
13636
13704
|
}
|
|
13637
|
-
function
|
|
13705
|
+
function eg(e) {
|
|
13638
13706
|
switch (e) {
|
|
13639
13707
|
case "completed":
|
|
13640
13708
|
return "●";
|
|
@@ -13650,7 +13718,7 @@ const Ja = {
|
|
|
13650
13718
|
allCompleted: !1,
|
|
13651
13719
|
sourceMessageId: null
|
|
13652
13720
|
};
|
|
13653
|
-
function
|
|
13721
|
+
function Uu(e) {
|
|
13654
13722
|
let t = [], o = null, s = null, n = !1;
|
|
13655
13723
|
for (const r of e) {
|
|
13656
13724
|
if (r.role === "user" || r.role === "user_shell") {
|
|
@@ -13671,10 +13739,10 @@ function Lu(e) {
|
|
|
13671
13739
|
const a = !Gs(t);
|
|
13672
13740
|
return n ? Ja : { todos: t, planId: o, allCompleted: a, sourceMessageId: s };
|
|
13673
13741
|
}
|
|
13674
|
-
function
|
|
13675
|
-
return
|
|
13742
|
+
function tg(e) {
|
|
13743
|
+
return Uu(e);
|
|
13676
13744
|
}
|
|
13677
|
-
function
|
|
13745
|
+
function og(e) {
|
|
13678
13746
|
let t = Ja;
|
|
13679
13747
|
for (const o of e)
|
|
13680
13748
|
if (o.role === "tool_group")
|
|
@@ -13690,7 +13758,7 @@ function eg(e) {
|
|
|
13690
13758
|
}
|
|
13691
13759
|
return t;
|
|
13692
13760
|
}
|
|
13693
|
-
function
|
|
13761
|
+
function ng(e, t) {
|
|
13694
13762
|
if (!t) return [];
|
|
13695
13763
|
for (const o of e)
|
|
13696
13764
|
if (o.role === "tool_group")
|
|
@@ -13701,7 +13769,7 @@ function tg(e, t) {
|
|
|
13701
13769
|
}
|
|
13702
13770
|
return [];
|
|
13703
13771
|
}
|
|
13704
|
-
function
|
|
13772
|
+
function sg(e, t) {
|
|
13705
13773
|
if (t.sourceMessageId === null) return [];
|
|
13706
13774
|
const o = [], s = e.findIndex((a) => t.planId === null ? a.id === t.sourceMessageId : a.role !== "tool_group" ? !1 : a.tools.some(
|
|
13707
13775
|
(r) => Pn(r) !== void 0 && ss(r) === t.planId
|
|
@@ -13749,7 +13817,7 @@ function Ks(e) {
|
|
|
13749
13817
|
s && t.push({
|
|
13750
13818
|
key: o.callId,
|
|
13751
13819
|
todos: s,
|
|
13752
|
-
stats:
|
|
13820
|
+
stats: Wu(o),
|
|
13753
13821
|
timestamp: o.endTime ?? o.startTime ?? e.timestamp
|
|
13754
13822
|
});
|
|
13755
13823
|
}
|
|
@@ -13757,7 +13825,7 @@ function Ks(e) {
|
|
|
13757
13825
|
}
|
|
13758
13826
|
return [];
|
|
13759
13827
|
}
|
|
13760
|
-
function
|
|
13828
|
+
function ag(e) {
|
|
13761
13829
|
const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
13762
13830
|
for (const s of e)
|
|
13763
13831
|
for (const { key: n, todos: a } of Ks(s)) {
|
|
@@ -13774,7 +13842,7 @@ function ng(e) {
|
|
|
13774
13842
|
}
|
|
13775
13843
|
return t;
|
|
13776
13844
|
}
|
|
13777
|
-
function
|
|
13845
|
+
function rg(e) {
|
|
13778
13846
|
const t = [];
|
|
13779
13847
|
for (const o of e)
|
|
13780
13848
|
for (const { key: s, todos: n } of Ks(o))
|
|
@@ -13784,7 +13852,7 @@ function sg(e) {
|
|
|
13784
13852
|
return t.join(`
|
|
13785
13853
|
`);
|
|
13786
13854
|
}
|
|
13787
|
-
function
|
|
13855
|
+
function ig(e) {
|
|
13788
13856
|
const t = [];
|
|
13789
13857
|
for (const o of e) {
|
|
13790
13858
|
if (o.role === "tool_group")
|
|
@@ -13805,7 +13873,7 @@ function ag(e) {
|
|
|
13805
13873
|
return t.join(`
|
|
13806
13874
|
`);
|
|
13807
13875
|
}
|
|
13808
|
-
function
|
|
13876
|
+
function Wu(e) {
|
|
13809
13877
|
const t = wo(wo(e.rawOutput)?.stats);
|
|
13810
13878
|
if (!t) return;
|
|
13811
13879
|
const o = (r) => {
|
|
@@ -13820,7 +13888,7 @@ function Fu(e) {
|
|
|
13820
13888
|
apiTimeMs: o("apiTimeMs") ?? 0
|
|
13821
13889
|
};
|
|
13822
13890
|
}
|
|
13823
|
-
function
|
|
13891
|
+
function Nu(e) {
|
|
13824
13892
|
const t = [];
|
|
13825
13893
|
for (const o of e)
|
|
13826
13894
|
if (o.role === "tool_group")
|
|
@@ -13831,7 +13899,7 @@ function Uu(e) {
|
|
|
13831
13899
|
}
|
|
13832
13900
|
return t.sort((o, s) => o.start - s.start), t;
|
|
13833
13901
|
}
|
|
13834
|
-
function
|
|
13902
|
+
function Bu(e, t, o) {
|
|
13835
13903
|
let s = 0, n = e.length;
|
|
13836
13904
|
for (; s < n; ) {
|
|
13837
13905
|
const r = s + n >>> 1;
|
|
@@ -13842,7 +13910,7 @@ function Nu(e, t, o) {
|
|
|
13842
13910
|
a += e[r].end - e[r].start;
|
|
13843
13911
|
return a;
|
|
13844
13912
|
}
|
|
13845
|
-
function
|
|
13913
|
+
function ju(e, t) {
|
|
13846
13914
|
const o = (s, n) => Math.max(0, n - s);
|
|
13847
13915
|
return {
|
|
13848
13916
|
inputTokens: o(e.promptTokens, t.promptTokens),
|
|
@@ -13851,12 +13919,12 @@ function Wu(e, t) {
|
|
|
13851
13919
|
apiTimeMs: o(e.apiTimeMs, t.apiTimeMs)
|
|
13852
13920
|
};
|
|
13853
13921
|
}
|
|
13854
|
-
function
|
|
13922
|
+
function qu(e, t) {
|
|
13855
13923
|
const o = {};
|
|
13856
13924
|
return e && (e.inputTokens > 0 || e.outputTokens > 0 || e.cachedTokens > 0 || e.apiTimeMs > 0) && (o.inputTokens = e.inputTokens, o.cachedTokens = e.cachedTokens, o.outputTokens = e.outputTokens, e.apiTimeMs > 0 && (o.apiTimeMs = e.apiTimeMs)), t !== void 0 && t > 0 && (o.toolTimeMs = t), Object.keys(o).length > 0 ? o : void 0;
|
|
13857
13925
|
}
|
|
13858
|
-
function
|
|
13859
|
-
const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), a =
|
|
13926
|
+
function lg(e) {
|
|
13927
|
+
const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), a = Nu(e), r = (i) => {
|
|
13860
13928
|
let l = t.get(i);
|
|
13861
13929
|
return l || (l = {}, t.set(i, l)), l;
|
|
13862
13930
|
};
|
|
@@ -13867,10 +13935,10 @@ function rg(e) {
|
|
|
13867
13935
|
if (h.status === "in_progress" && A !== "in_progress")
|
|
13868
13936
|
n.has(b) && (n.delete(b), s.delete(b), t.delete(b)), s.get(b) === void 0 && (s.set(b, p), g !== void 0 && (r(b).startTs = g));
|
|
13869
13937
|
else if (h.status === "completed" && A !== "completed" && A !== void 0) {
|
|
13870
|
-
const $ = s.get(b), x = $ && p ?
|
|
13871
|
-
if (g !== void 0 ||
|
|
13938
|
+
const $ = s.get(b), x = $ && p ? ju($, p) : void 0, F = t.get(b)?.startTs, P = F !== void 0 && g !== void 0 ? Bu(a, F, g) : void 0, N = qu(x, P);
|
|
13939
|
+
if (g !== void 0 || N) {
|
|
13872
13940
|
const H = r(b);
|
|
13873
|
-
g !== void 0 && (H.endTs = g),
|
|
13941
|
+
g !== void 0 && (H.endTs = g), N && (H.resources = N);
|
|
13874
13942
|
}
|
|
13875
13943
|
}
|
|
13876
13944
|
h.status === "completed" && n.add(b), o.set(b, h.status);
|
|
@@ -13881,10 +13949,10 @@ function pi(e) {
|
|
|
13881
13949
|
const t = e?.todos;
|
|
13882
13950
|
return Array.isArray(t) ? t : void 0;
|
|
13883
13951
|
}
|
|
13884
|
-
function
|
|
13952
|
+
function Hu(e) {
|
|
13885
13953
|
return e === "completed" || e === "in_progress" || e === "pending" ? e : "pending";
|
|
13886
13954
|
}
|
|
13887
|
-
function
|
|
13955
|
+
function Gu(e) {
|
|
13888
13956
|
return e === "high" || e === "medium" || e === "low" ? e : void 0;
|
|
13889
13957
|
}
|
|
13890
13958
|
function wo(e) {
|
|
@@ -13895,7 +13963,7 @@ function hn(e, t) {
|
|
|
13895
13963
|
const o = e?.[t];
|
|
13896
13964
|
return typeof o == "string" && o.length > 0 ? o : void 0;
|
|
13897
13965
|
}
|
|
13898
|
-
function
|
|
13966
|
+
function zu(e, t) {
|
|
13899
13967
|
const o = e?.[t];
|
|
13900
13968
|
return Array.isArray(o) && o.every((s) => typeof s == "string") ? o : void 0;
|
|
13901
13969
|
}
|
|
@@ -13917,10 +13985,10 @@ function mi(e) {
|
|
|
13917
13985
|
if (e.phase === "progress") return { phase: "progress" };
|
|
13918
13986
|
if (e.phase === "noop") return { phase: "noop" };
|
|
13919
13987
|
if (e.phase !== "done") return;
|
|
13920
|
-
const t =
|
|
13988
|
+
const t = Vu(e);
|
|
13921
13989
|
return t ? { phase: "done", result: t } : void 0;
|
|
13922
13990
|
}
|
|
13923
|
-
function
|
|
13991
|
+
function Vu(e) {
|
|
13924
13992
|
if (!Cl(e)) return;
|
|
13925
13993
|
const t = Xa(e.originalTokenCount), o = Xa(e.newTokenCount);
|
|
13926
13994
|
if (t === void 0 || o === void 0)
|
|
@@ -13934,7 +14002,7 @@ function Gu(e) {
|
|
|
13934
14002
|
...typeof s == "string" && s.length > 0 ? { warning: s } : {}
|
|
13935
14003
|
};
|
|
13936
14004
|
}
|
|
13937
|
-
function
|
|
14005
|
+
function cg(e, t, o) {
|
|
13938
14006
|
return `${t ? "~" : ""}${e.toLocaleString(o)}`;
|
|
13939
14007
|
}
|
|
13940
14008
|
function Xa(e) {
|
|
@@ -13959,7 +14027,7 @@ function gi(e, t) {
|
|
|
13959
14027
|
author: { agentId: "", name: n }
|
|
13960
14028
|
};
|
|
13961
14029
|
}
|
|
13962
|
-
function
|
|
14030
|
+
function Ku(e) {
|
|
13963
14031
|
const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
13964
14032
|
for (const [r, i] of e.entries()) {
|
|
13965
14033
|
const l = je(i.meta), p = i.kind === "status" ? i.source : l?.source, g = p === "background_task_completed", h = je(
|
|
@@ -13994,26 +14062,26 @@ function zu(e) {
|
|
|
13994
14062
|
automaticTaskIds: a
|
|
13995
14063
|
};
|
|
13996
14064
|
}
|
|
13997
|
-
function
|
|
14065
|
+
function Qu(e) {
|
|
13998
14066
|
return e.startsWith("Model switched: ");
|
|
13999
14067
|
}
|
|
14000
|
-
const
|
|
14068
|
+
const Yu = /^[A-Za-z0-9_.-]+ \(unrecognized daemon event\): /, Ju = [
|
|
14001
14069
|
"usage_update: {",
|
|
14002
14070
|
"a2ui: {"
|
|
14003
14071
|
];
|
|
14004
|
-
function
|
|
14005
|
-
return e.debugReason !== void 0 ? e.debugReason.startsWith("unrecognized_") : e.kind !== "debug" ? !1 :
|
|
14072
|
+
function Xu(e) {
|
|
14073
|
+
return e.debugReason !== void 0 ? e.debugReason.startsWith("unrecognized_") : e.kind !== "debug" ? !1 : Yu.test(e.text) || Ju.some(
|
|
14006
14074
|
(t) => e.text.startsWith(t)
|
|
14007
14075
|
);
|
|
14008
14076
|
}
|
|
14009
|
-
function
|
|
14077
|
+
function Zu(e) {
|
|
14010
14078
|
return e !== "loop_detected";
|
|
14011
14079
|
}
|
|
14012
|
-
function
|
|
14080
|
+
function ep(e, t) {
|
|
14013
14081
|
return e.errorKind === "loop_detected" ? t?.loopDetected ?? e.text : e.errorKind === "model_stream_interrupted" || // Older daemons emit this turn_error before they know about errorKind.
|
|
14014
14082
|
e.source === "turn_error" && e.text.trim().toLowerCase() === "terminated" ? t?.modelStreamInterrupted ?? e.text : e.text;
|
|
14015
14083
|
}
|
|
14016
|
-
function
|
|
14084
|
+
function tp(e, t) {
|
|
14017
14085
|
return e === void 0 ? {} : t ? {
|
|
14018
14086
|
data: {
|
|
14019
14087
|
...je(e) ?? { value: e },
|
|
@@ -14021,12 +14089,12 @@ function Zu(e, t) {
|
|
|
14021
14089
|
}
|
|
14022
14090
|
} : { data: e };
|
|
14023
14091
|
}
|
|
14024
|
-
function
|
|
14092
|
+
function op(e) {
|
|
14025
14093
|
if (!e || typeof e != "object") return null;
|
|
14026
14094
|
const t = e;
|
|
14027
14095
|
return typeof t.displayName == "string" && t.displayName ? t.displayName : typeof t.newSessionId == "string" ? t.newSessionId.slice(0, 8) : null;
|
|
14028
14096
|
}
|
|
14029
|
-
function
|
|
14097
|
+
function np(e) {
|
|
14030
14098
|
if (!e || typeof e != "object") return;
|
|
14031
14099
|
const t = e.items;
|
|
14032
14100
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
@@ -14050,7 +14118,7 @@ function tp(e) {
|
|
|
14050
14118
|
}
|
|
14051
14119
|
return o.length > 0 ? o : void 0;
|
|
14052
14120
|
}
|
|
14053
|
-
function
|
|
14121
|
+
function sp(e) {
|
|
14054
14122
|
if (!e || typeof e != "object") return;
|
|
14055
14123
|
const t = e.items;
|
|
14056
14124
|
if (!Array.isArray(t)) return;
|
|
@@ -14071,7 +14139,7 @@ function op(e) {
|
|
|
14071
14139
|
});
|
|
14072
14140
|
return o.length > 0 ? o : void 0;
|
|
14073
14141
|
}
|
|
14074
|
-
function
|
|
14142
|
+
function ap(e) {
|
|
14075
14143
|
if (!e || typeof e != "object") return;
|
|
14076
14144
|
const t = e.items;
|
|
14077
14145
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
@@ -14114,10 +14182,10 @@ function xl(e) {
|
|
|
14114
14182
|
compressionPayload: n
|
|
14115
14183
|
};
|
|
14116
14184
|
}
|
|
14117
|
-
function
|
|
14185
|
+
function rp(e) {
|
|
14118
14186
|
return e.kind === "assistant" && xl(e) !== void 0;
|
|
14119
14187
|
}
|
|
14120
|
-
function
|
|
14188
|
+
function ip(e) {
|
|
14121
14189
|
return e.text.length === 0;
|
|
14122
14190
|
}
|
|
14123
14191
|
function hi(e, t) {
|
|
@@ -14130,15 +14198,15 @@ function hi(e, t) {
|
|
|
14130
14198
|
...o > 0 ? { cachedTokens: o } : {}
|
|
14131
14199
|
};
|
|
14132
14200
|
}
|
|
14133
|
-
function
|
|
14201
|
+
function dg(e, t = {}) {
|
|
14134
14202
|
const o = [], s = t.includeSourceIdentity === !0, n = t.safeToolProjection === !0, a = t.labels?.promptCancelled ?? "Request cancelled.", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), {
|
|
14135
14203
|
agentUpdates: p,
|
|
14136
14204
|
tasksByExecution: g,
|
|
14137
14205
|
lastConsumedTaskIndex: h,
|
|
14138
14206
|
automaticTaskIds: b
|
|
14139
|
-
} =
|
|
14207
|
+
} = Ku(e);
|
|
14140
14208
|
let A = null, $ = null, x = !1, F;
|
|
14141
|
-
const P = /* @__PURE__ */ new Set(),
|
|
14209
|
+
const P = /* @__PURE__ */ new Set(), N = new Set(
|
|
14142
14210
|
e.flatMap(
|
|
14143
14211
|
(J) => J.kind === "tool" ? [J.toolCallId] : []
|
|
14144
14212
|
)
|
|
@@ -14170,7 +14238,7 @@ function lg(e, t = {}) {
|
|
|
14170
14238
|
), B = wt(v, "taskId");
|
|
14171
14239
|
B && H.add(B);
|
|
14172
14240
|
const U = (h.get(B ?? "") ?? -1) <= J;
|
|
14173
|
-
if (!U || v?.kind === "agent" &&
|
|
14241
|
+
if (!U || v?.kind === "agent" && N.has(wt(v, "toolUseId") ?? ""))
|
|
14174
14242
|
continue;
|
|
14175
14243
|
o.push({
|
|
14176
14244
|
id: I.id,
|
|
@@ -14269,7 +14337,7 @@ function lg(e, t = {}) {
|
|
|
14269
14337
|
});
|
|
14270
14338
|
break;
|
|
14271
14339
|
}
|
|
14272
|
-
const U = je(v.meta), G =
|
|
14340
|
+
const U = je(v.meta), G = $u(U ?? void 0);
|
|
14273
14341
|
if (B?.source === "vision_bridge_notice") {
|
|
14274
14342
|
o.push({
|
|
14275
14343
|
id: I.id,
|
|
@@ -14336,7 +14404,7 @@ function lg(e, t = {}) {
|
|
|
14336
14404
|
}
|
|
14337
14405
|
const ae = G.length > 0 ? null : cr(v.text);
|
|
14338
14406
|
if (ae) {
|
|
14339
|
-
let ue = null, Qe = !1, Pe = 0, zt = 0, fn = 0,
|
|
14407
|
+
let ue = null, Qe = !1, Pe = 0, zt = 0, fn = 0, Wt = null;
|
|
14340
14408
|
for (const Me of ae)
|
|
14341
14409
|
Me.kind === "insight" ? Me.data.type === "insight_progress" ? ue = Me.data : Me.data.type === "insight_ready" ? (Qe = !0, o.push({
|
|
14342
14410
|
id: `${I.id}-ir-${Pe++}`,
|
|
@@ -14356,10 +14424,10 @@ function lg(e, t = {}) {
|
|
|
14356
14424
|
content: Me.text,
|
|
14357
14425
|
timestamp: X,
|
|
14358
14426
|
sourceBlockIds: [I.id]
|
|
14359
|
-
}), A = o.length - 1,
|
|
14360
|
-
if (v.branchRecordId &&
|
|
14361
|
-
const Me = o[
|
|
14362
|
-
Me?.role === "assistant" && (o[
|
|
14427
|
+
}), A = o.length - 1, Wt = A, $ = null);
|
|
14428
|
+
if (v.branchRecordId && Wt !== null) {
|
|
14429
|
+
const Me = o[Wt];
|
|
14430
|
+
Me?.role === "assistant" && (o[Wt] = {
|
|
14363
14431
|
...Me,
|
|
14364
14432
|
branchRecordId: v.branchRecordId
|
|
14365
14433
|
});
|
|
@@ -14376,7 +14444,7 @@ function lg(e, t = {}) {
|
|
|
14376
14444
|
break;
|
|
14377
14445
|
}
|
|
14378
14446
|
const me = A !== null ? o[A] : void 0;
|
|
14379
|
-
if (me && me.role === "assistant" && !x && v.segmentId === void 0 && !
|
|
14447
|
+
if (me && me.role === "assistant" && !x && v.segmentId === void 0 && !ip(v)) {
|
|
14380
14448
|
const ue = hi(me.usage, v.usage);
|
|
14381
14449
|
o[A] = {
|
|
14382
14450
|
...me,
|
|
@@ -14437,12 +14505,12 @@ function lg(e, t = {}) {
|
|
|
14437
14505
|
break;
|
|
14438
14506
|
}
|
|
14439
14507
|
case "tool": {
|
|
14440
|
-
const v = I, B =
|
|
14508
|
+
const v = I, B = hp(
|
|
14441
14509
|
v,
|
|
14442
14510
|
n
|
|
14443
14511
|
), U = p.get(
|
|
14444
14512
|
B.callId
|
|
14445
|
-
), G =
|
|
14513
|
+
), G = Ou(
|
|
14446
14514
|
B,
|
|
14447
14515
|
U?.status,
|
|
14448
14516
|
U?.endTime,
|
|
@@ -14458,7 +14526,7 @@ function lg(e, t = {}) {
|
|
|
14458
14526
|
break;
|
|
14459
14527
|
}
|
|
14460
14528
|
if (le) {
|
|
14461
|
-
|
|
14529
|
+
up(le, G), r.set(G.callId, G);
|
|
14462
14530
|
break;
|
|
14463
14531
|
}
|
|
14464
14532
|
$a(o, I.id, G, X), r.set(G.callId, G), A = null, $ = null, x = !0;
|
|
@@ -14467,7 +14535,7 @@ function lg(e, t = {}) {
|
|
|
14467
14535
|
case "shell": {
|
|
14468
14536
|
const v = I, B = o[o.length - 1];
|
|
14469
14537
|
if (B && B.role === "tool_group") {
|
|
14470
|
-
const U =
|
|
14538
|
+
const U = pp(B.tools), G = B.tools[U];
|
|
14471
14539
|
if (G) {
|
|
14472
14540
|
const le = typeof G.rawOutput == "string" ? G.rawOutput : "", oe = {
|
|
14473
14541
|
...G,
|
|
@@ -14521,12 +14589,12 @@ function lg(e, t = {}) {
|
|
|
14521
14589
|
}
|
|
14522
14590
|
case "permission": {
|
|
14523
14591
|
const v = I;
|
|
14524
|
-
|
|
14592
|
+
kp(
|
|
14525
14593
|
v,
|
|
14526
14594
|
l,
|
|
14527
14595
|
n
|
|
14528
14596
|
);
|
|
14529
|
-
const B =
|
|
14597
|
+
const B = wp(
|
|
14530
14598
|
v,
|
|
14531
14599
|
n
|
|
14532
14600
|
);
|
|
@@ -14541,7 +14609,7 @@ function lg(e, t = {}) {
|
|
|
14541
14609
|
const G = r.get(B.callId);
|
|
14542
14610
|
if (G) {
|
|
14543
14611
|
const le = G.status, oe = G.endTime;
|
|
14544
|
-
B.toolName = G.toolName, v.resolved && (Ma(v.resolved) ? B.status = U ? B.status : "in_progress" : (B.status = n && ki(v.resolved) ? "completed" : "failed", B.endTime = v.updatedAt)), wi(G, B), (
|
|
14612
|
+
B.toolName = G.toolName, v.resolved && (Ma(v.resolved) ? B.status = U ? B.status : "in_progress" : (B.status = n && ki(v.resolved) ? "completed" : "failed", B.endTime = v.updatedAt)), wi(G, B), (mp(le) || v.resolved && U && Ma(v.resolved)) && (G.status = le, G.endTime = oe);
|
|
14545
14613
|
break;
|
|
14546
14614
|
}
|
|
14547
14615
|
if (v.resolved) {
|
|
@@ -14563,17 +14631,17 @@ function lg(e, t = {}) {
|
|
|
14563
14631
|
case "status":
|
|
14564
14632
|
case "debug": {
|
|
14565
14633
|
const v = I;
|
|
14566
|
-
if (
|
|
14634
|
+
if (Xu(v)) break;
|
|
14567
14635
|
if (v.source === "mid_turn_message_injected") {
|
|
14568
|
-
const le =
|
|
14636
|
+
const le = np(
|
|
14569
14637
|
v.data
|
|
14570
|
-
), oe =
|
|
14638
|
+
), oe = sp(
|
|
14571
14639
|
v.data
|
|
14572
14640
|
);
|
|
14573
14641
|
o.push({
|
|
14574
14642
|
id: I.id,
|
|
14575
14643
|
role: "system",
|
|
14576
|
-
content: v.text.length > 0 ? v.text :
|
|
14644
|
+
content: v.text.length > 0 ? v.text : ap(v.data) ?? v.text,
|
|
14577
14645
|
variant: "info",
|
|
14578
14646
|
timestamp: X,
|
|
14579
14647
|
source: v.source,
|
|
@@ -14583,9 +14651,9 @@ function lg(e, t = {}) {
|
|
|
14583
14651
|
}), x = !0;
|
|
14584
14652
|
break;
|
|
14585
14653
|
}
|
|
14586
|
-
const B = v.source === "session_branched" ?
|
|
14587
|
-
if (
|
|
14588
|
-
const G =
|
|
14654
|
+
const B = v.source === "session_branched" ? op(v.data) : null, U = B && t.labels?.branchSuccess ? t.labels.branchSuccess(B) : v.text;
|
|
14655
|
+
if (Qu(U)) break;
|
|
14656
|
+
const G = gp(U);
|
|
14589
14657
|
if (G) {
|
|
14590
14658
|
o.push({
|
|
14591
14659
|
id: I.id,
|
|
@@ -14613,13 +14681,13 @@ function lg(e, t = {}) {
|
|
|
14613
14681
|
o.push({
|
|
14614
14682
|
id: I.id,
|
|
14615
14683
|
role: "system",
|
|
14616
|
-
content:
|
|
14684
|
+
content: ep(v, t.labels),
|
|
14617
14685
|
variant: "error",
|
|
14618
|
-
retryable: v.source === "turn_error" &&
|
|
14686
|
+
retryable: v.source === "turn_error" && Zu(B),
|
|
14619
14687
|
timestamp: X,
|
|
14620
14688
|
sourceBlockIds: [I.id],
|
|
14621
14689
|
...v.source ? { source: v.source } : {},
|
|
14622
|
-
...
|
|
14690
|
+
...tp(v.data, B)
|
|
14623
14691
|
}), x = !0;
|
|
14624
14692
|
break;
|
|
14625
14693
|
}
|
|
@@ -14643,9 +14711,9 @@ function lg(e, t = {}) {
|
|
|
14643
14711
|
J.toolName
|
|
14644
14712
|
)) && bl(J.status) && J.endTime === void 0 && (J.startTime = i.get(J.callId) ?? J.startTime);
|
|
14645
14713
|
}
|
|
14646
|
-
return
|
|
14714
|
+
return cp(o), lp(o, e), s || dp(o), o;
|
|
14647
14715
|
}
|
|
14648
|
-
function
|
|
14716
|
+
function lp(e, t) {
|
|
14649
14717
|
const o = /* @__PURE__ */ new Map();
|
|
14650
14718
|
for (const s of t)
|
|
14651
14719
|
s.promptId && o.set(s.id, s.promptId);
|
|
@@ -14661,7 +14729,7 @@ function rp(e, t) {
|
|
|
14661
14729
|
}
|
|
14662
14730
|
}
|
|
14663
14731
|
}
|
|
14664
|
-
function
|
|
14732
|
+
function cp(e) {
|
|
14665
14733
|
const t = (o) => {
|
|
14666
14734
|
const s = [];
|
|
14667
14735
|
for (const n of o)
|
|
@@ -14674,7 +14742,7 @@ function ip(e) {
|
|
|
14674
14742
|
...t(o.tools)
|
|
14675
14743
|
));
|
|
14676
14744
|
}
|
|
14677
|
-
function
|
|
14745
|
+
function dp(e) {
|
|
14678
14746
|
const t = (o) => {
|
|
14679
14747
|
for (const s of o)
|
|
14680
14748
|
delete s.sourceBlockIds, s.subTools && t(s.subTools);
|
|
@@ -14682,7 +14750,7 @@ function lp(e) {
|
|
|
14682
14750
|
for (const o of e)
|
|
14683
14751
|
delete o.sourceBlockIds, o.role === "tool_group" && t(o.tools);
|
|
14684
14752
|
}
|
|
14685
|
-
function
|
|
14753
|
+
function up(e, t) {
|
|
14686
14754
|
e.subTools ||= [], e.subTools.push(t), e.sourceBlockIds = Go(
|
|
14687
14755
|
e.sourceBlockIds,
|
|
14688
14756
|
...t.sourceBlockIds ?? []
|
|
@@ -14708,7 +14776,7 @@ function $a(e, t, o, s) {
|
|
|
14708
14776
|
sourceBlockIds: [t]
|
|
14709
14777
|
});
|
|
14710
14778
|
}
|
|
14711
|
-
function
|
|
14779
|
+
function pp(e) {
|
|
14712
14780
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
14713
14781
|
const o = e[t];
|
|
14714
14782
|
if (o.kind === "execute" && o.status === "in_progress")
|
|
@@ -14725,10 +14793,10 @@ function wi(e, t, o = {}) {
|
|
|
14725
14793
|
...t.sourceBlockIds ?? []
|
|
14726
14794
|
), e.content = t.content ?? e.content, e.endTime = t.endTime ?? e.endTime, e.wasCancelled = t.wasCancelled ?? e.wasCancelled, o.replaceRawOutput !== !1 && (e.rawOutput = t.rawOutput ?? e.rawOutput), o.replaceArgs !== !1 && (e.args = t.args ?? e.args), e.executionMode = t.executionMode ?? e.executionMode, e.subagentSessionReady = e.subagentSessionReady === !0 ? !0 : t.subagentSessionReady ?? e.subagentSessionReady, e.locations = t.locations ?? e.locations;
|
|
14727
14795
|
}
|
|
14728
|
-
function
|
|
14796
|
+
function mp(e) {
|
|
14729
14797
|
return e === "completed" || e === "failed";
|
|
14730
14798
|
}
|
|
14731
|
-
function
|
|
14799
|
+
function gp(e) {
|
|
14732
14800
|
const t = e.startsWith("plan: ") ? e.slice(6) : void 0;
|
|
14733
14801
|
if (t)
|
|
14734
14802
|
try {
|
|
@@ -14749,8 +14817,8 @@ function wt(e, t) {
|
|
|
14749
14817
|
const o = e?.[t];
|
|
14750
14818
|
return typeof o == "string" && o.length > 0 ? o : void 0;
|
|
14751
14819
|
}
|
|
14752
|
-
function
|
|
14753
|
-
const o =
|
|
14820
|
+
function hp(e, t) {
|
|
14821
|
+
const o = bp(e, t), s = t ? e.background === !0 ? "background" : "foreground" : je(o)?.executionMode, n = vp(e, o), a = t ? void 0 : yp(e), r = {
|
|
14754
14822
|
running: "in_progress",
|
|
14755
14823
|
pending: "pending",
|
|
14756
14824
|
confirming: "pending",
|
|
@@ -14768,7 +14836,7 @@ function mp(e, t) {
|
|
|
14768
14836
|
status: (l ? "pending" : r[e.status]) || e.status || "in_progress",
|
|
14769
14837
|
kind: $l(e.toolName, e.toolKind),
|
|
14770
14838
|
rawOutput: o,
|
|
14771
|
-
args:
|
|
14839
|
+
args: fp(e, t),
|
|
14772
14840
|
executionMode: qi(s) ? s : void 0,
|
|
14773
14841
|
subagentSessionReady: e.subagentSessionReady,
|
|
14774
14842
|
parentToolCallId: e.parentToolCallId,
|
|
@@ -14779,14 +14847,14 @@ function mp(e, t) {
|
|
|
14779
14847
|
sourceBlockIds: [e.id]
|
|
14780
14848
|
};
|
|
14781
14849
|
}
|
|
14782
|
-
function
|
|
14850
|
+
function fp(e, t) {
|
|
14783
14851
|
if (!t) {
|
|
14784
14852
|
const o = je(e.rawInput);
|
|
14785
14853
|
return e.toolName === "tool_call" && vl(e.toolName, o) !== e.toolName ? je(o?.arguments) : o;
|
|
14786
14854
|
}
|
|
14787
14855
|
return lr(e.preview);
|
|
14788
14856
|
}
|
|
14789
|
-
function
|
|
14857
|
+
function wp(e, t) {
|
|
14790
14858
|
const o = je(e.toolCall);
|
|
14791
14859
|
if (!t && !o) return;
|
|
14792
14860
|
const s = t ? lr(e.preview) : o ? Al(o) : void 0;
|
|
@@ -14803,7 +14871,7 @@ function hp(e, t) {
|
|
|
14803
14871
|
sourceBlockIds: [e.id]
|
|
14804
14872
|
};
|
|
14805
14873
|
}
|
|
14806
|
-
function
|
|
14874
|
+
function kp(e, t, o) {
|
|
14807
14875
|
const s = je(e.toolCall), n = o ? e.toolCallId : wt(s, "toolCallId") ?? wt(s, "id");
|
|
14808
14876
|
if (!n) return;
|
|
14809
14877
|
const a = o ? e.title : wt(s, "title") ?? e.title, r = o ? lr(e.preview) : s ? Al(s) : void 0;
|
|
@@ -14825,15 +14893,15 @@ function vi(e) {
|
|
|
14825
14893
|
function Al(e) {
|
|
14826
14894
|
return je(e.rawInput) ?? je(e.input) ?? je(e.args);
|
|
14827
14895
|
}
|
|
14828
|
-
function
|
|
14896
|
+
function vp(e, t) {
|
|
14829
14897
|
const o = e.toolName?.toLowerCase();
|
|
14830
14898
|
return o !== "agent" && o !== "task" ? !1 : e.background === !0 ? !0 : je(t)?.status === "background";
|
|
14831
14899
|
}
|
|
14832
|
-
function
|
|
14900
|
+
function bp(e, t) {
|
|
14833
14901
|
return t ? Rl(e.resultPreview) : El(e);
|
|
14834
14902
|
}
|
|
14835
14903
|
function El(e) {
|
|
14836
|
-
return
|
|
14904
|
+
return Sp(e) && e.status === "failed" ? Cp(e) ?? e.details ?? e.rawOutput : !Pl(e.status) || !e.details ? e.rawOutput : e.rawOutput && typeof e.rawOutput == "object" && !Array.isArray(e.rawOutput) ? {
|
|
14837
14905
|
...e.rawOutput,
|
|
14838
14906
|
status: e.status,
|
|
14839
14907
|
reason: e.details
|
|
@@ -14918,7 +14986,7 @@ function lr(e) {
|
|
|
14918
14986
|
}
|
|
14919
14987
|
}
|
|
14920
14988
|
const bi = /* @__PURE__ */ new WeakMap();
|
|
14921
|
-
function
|
|
14989
|
+
function yp(e) {
|
|
14922
14990
|
const t = e.content;
|
|
14923
14991
|
if (!Array.isArray(t)) return;
|
|
14924
14992
|
const o = bi.get(e);
|
|
@@ -14964,10 +15032,10 @@ function vp(e) {
|
|
|
14964
15032
|
const n = Object.freeze(s);
|
|
14965
15033
|
return bi.set(e, n), n;
|
|
14966
15034
|
}
|
|
14967
|
-
function
|
|
15035
|
+
function Sp(e) {
|
|
14968
15036
|
return !!e.toolName && kl(e.toolName);
|
|
14969
15037
|
}
|
|
14970
|
-
function
|
|
15038
|
+
function Cp(e) {
|
|
14971
15039
|
if (!Array.isArray(e.content)) return;
|
|
14972
15040
|
const t = e.content.map((o) => o?.content?.text).filter((o) => !!o);
|
|
14973
15041
|
if (!(!t || t.length === 0))
|
|
@@ -14977,12 +15045,12 @@ function yp(e) {
|
|
|
14977
15045
|
function Pl(e) {
|
|
14978
15046
|
return e === "cancelled" || e === "canceled";
|
|
14979
15047
|
}
|
|
14980
|
-
const
|
|
15048
|
+
const Tp = [
|
|
14981
15049
|
'"insight_progress":',
|
|
14982
15050
|
'"insight_ready":',
|
|
14983
15051
|
'"insight_error":'
|
|
14984
15052
|
];
|
|
14985
|
-
function
|
|
15053
|
+
function Ip(e) {
|
|
14986
15054
|
try {
|
|
14987
15055
|
const t = JSON.parse(e), o = je(t.insight_progress);
|
|
14988
15056
|
if (o && typeof o.stage == "string" && typeof o.progress == "number")
|
|
@@ -15002,7 +15070,7 @@ function Cp(e) {
|
|
|
15002
15070
|
}
|
|
15003
15071
|
return null;
|
|
15004
15072
|
}
|
|
15005
|
-
function
|
|
15073
|
+
function xp(e, t) {
|
|
15006
15074
|
if (e[t] !== "{") return null;
|
|
15007
15075
|
let o = 0, s = !1, n = !1;
|
|
15008
15076
|
for (let a = t; a < e.length; a++) {
|
|
@@ -15034,16 +15102,16 @@ function cr(e) {
|
|
|
15034
15102
|
const r = e.indexOf("{", s);
|
|
15035
15103
|
if (r === -1) break;
|
|
15036
15104
|
const i = e.slice(r + 1).trimStart();
|
|
15037
|
-
if (!
|
|
15105
|
+
if (!Tp.some((b) => i.startsWith(b))) {
|
|
15038
15106
|
s = r + 1;
|
|
15039
15107
|
continue;
|
|
15040
15108
|
}
|
|
15041
|
-
const p =
|
|
15109
|
+
const p = xp(e, r);
|
|
15042
15110
|
if (!p) {
|
|
15043
15111
|
s = r + 1;
|
|
15044
15112
|
continue;
|
|
15045
15113
|
}
|
|
15046
|
-
const g =
|
|
15114
|
+
const g = Ip(p);
|
|
15047
15115
|
if (!g) {
|
|
15048
15116
|
s = r + 1;
|
|
15049
15117
|
continue;
|
|
@@ -15056,7 +15124,7 @@ function cr(e) {
|
|
|
15056
15124
|
const a = e.slice(o).trim();
|
|
15057
15125
|
return a && t.push({ kind: "text", text: a }), t.length > 0 ? t : null;
|
|
15058
15126
|
}
|
|
15059
|
-
function
|
|
15127
|
+
function ug(e) {
|
|
15060
15128
|
const t = cr(e);
|
|
15061
15129
|
return t ? t.filter(
|
|
15062
15130
|
(o) => o.kind === "text"
|
|
@@ -15073,9 +15141,9 @@ function $l(e, t) {
|
|
|
15073
15141
|
return "search";
|
|
15074
15142
|
if (o === "agent" || o === "task") return "other";
|
|
15075
15143
|
}
|
|
15076
|
-
function
|
|
15144
|
+
function Ap(e) {
|
|
15077
15145
|
for (const t of e) {
|
|
15078
|
-
if (!
|
|
15146
|
+
if (!Rp(t)) continue;
|
|
15079
15147
|
const o = t;
|
|
15080
15148
|
if (o.resolved) continue;
|
|
15081
15149
|
const s = $o(o.toolCall), n = typeof s?.toolCallId == "string" ? s.toolCallId : typeof s?.id == "string" ? s.id : void 0, a = typeof s?.kind == "string" ? s.kind : void 0, r = $o(s?._meta), i = typeof r?.toolName == "string" ? r.toolName : void 0, l = $o(r?.qwenTodoApproval), p = yi(l, "planId"), g = yi(l, "sourceCallId");
|
|
@@ -15088,13 +15156,13 @@ function Ip(e) {
|
|
|
15088
15156
|
toolName: i,
|
|
15089
15157
|
hasDiffPreview: Ml(s),
|
|
15090
15158
|
...p && g ? { todoPlan: { planId: p, sourceCallId: g } } : {},
|
|
15091
|
-
...
|
|
15159
|
+
...Ep(s, o.title),
|
|
15092
15160
|
options: o.options.map((h) => ({
|
|
15093
15161
|
id: h.optionId,
|
|
15094
15162
|
label: h.label,
|
|
15095
|
-
kind:
|
|
15163
|
+
kind: $p(h.raw)
|
|
15096
15164
|
})),
|
|
15097
|
-
rawInput:
|
|
15165
|
+
rawInput: Pp(o.toolCall)
|
|
15098
15166
|
};
|
|
15099
15167
|
}
|
|
15100
15168
|
return null;
|
|
@@ -15114,7 +15182,7 @@ function xs(e) {
|
|
|
15114
15182
|
).join("")
|
|
15115
15183
|
);
|
|
15116
15184
|
}
|
|
15117
|
-
function
|
|
15185
|
+
function Ep(e, t) {
|
|
15118
15186
|
const o = e?.content;
|
|
15119
15187
|
if (Array.isArray(o)) {
|
|
15120
15188
|
const n = o.flatMap((a) => {
|
|
@@ -15144,10 +15212,10 @@ function xp(e, t) {
|
|
|
15144
15212
|
contentIsInput: !0
|
|
15145
15213
|
} : { content: [{ type: "text", text: t || "Tool permission" }] };
|
|
15146
15214
|
}
|
|
15147
|
-
function
|
|
15215
|
+
function Rp(e) {
|
|
15148
15216
|
return e.kind === "permission";
|
|
15149
15217
|
}
|
|
15150
|
-
function
|
|
15218
|
+
function Pp(e) {
|
|
15151
15219
|
const t = $o(e);
|
|
15152
15220
|
if (t)
|
|
15153
15221
|
return _l(t) ?? t;
|
|
@@ -15163,7 +15231,7 @@ function yi(e, t) {
|
|
|
15163
15231
|
const o = e?.[t];
|
|
15164
15232
|
return typeof o == "string" && o.length > 0 ? o : void 0;
|
|
15165
15233
|
}
|
|
15166
|
-
function
|
|
15234
|
+
function $p(e) {
|
|
15167
15235
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
15168
15236
|
return;
|
|
15169
15237
|
const t = e.kind;
|
|
@@ -15174,7 +15242,7 @@ function Rp(e) {
|
|
|
15174
15242
|
* Copyright 2025 Qwen Team
|
|
15175
15243
|
* SPDX-License-Identifier: Apache-2.0
|
|
15176
15244
|
*/
|
|
15177
|
-
function
|
|
15245
|
+
function Mp(e) {
|
|
15178
15246
|
return !e?.rawInput?.questions || !Array.isArray(e.rawInput.questions) ? !1 : e.toolName ? kl(e.toolName) : !0;
|
|
15179
15247
|
}
|
|
15180
15248
|
/**
|
|
@@ -15182,9 +15250,9 @@ function Pp(e) {
|
|
|
15182
15250
|
* Copyright 2026 Qwen Team
|
|
15183
15251
|
* SPDX-License-Identifier: Apache-2.0
|
|
15184
15252
|
*/
|
|
15185
|
-
const
|
|
15186
|
-
function
|
|
15187
|
-
const o = Mt(
|
|
15253
|
+
const pg = kt(void 0), _p = kt(void 0);
|
|
15254
|
+
function Dp(e, t) {
|
|
15255
|
+
const o = Mt(_p), s = Y(o);
|
|
15188
15256
|
s.current = o;
|
|
15189
15257
|
const n = Y(void 0), a = Y(0), r = Ze(() => {
|
|
15190
15258
|
const i = /* @__PURE__ */ new WeakMap(), l = (p) => {
|
|
@@ -15270,14 +15338,14 @@ function Za(e) {
|
|
|
15270
15338
|
}
|
|
15271
15339
|
function Si(e, t, o) {
|
|
15272
15340
|
if (e.type === "permission_request") {
|
|
15273
|
-
const r = e.data?.requestId, i =
|
|
15341
|
+
const r = e.data?.requestId, i = Ap(
|
|
15274
15342
|
t.filter(
|
|
15275
15343
|
(l) => l.kind === "permission" && l.requestId === r
|
|
15276
15344
|
)
|
|
15277
15345
|
);
|
|
15278
15346
|
return i ? {
|
|
15279
15347
|
sessionTitle: o,
|
|
15280
|
-
attention:
|
|
15348
|
+
attention: Mp(i) ? "question" : "approval"
|
|
15281
15349
|
} : void 0;
|
|
15282
15350
|
}
|
|
15283
15351
|
if (e.type !== "turn_complete" && e.type !== "turn_error") return;
|
|
@@ -15293,7 +15361,7 @@ function Si(e, t, o) {
|
|
|
15293
15361
|
// so the answer before it is. The adapter decides which those are: the
|
|
15294
15362
|
// compression notice carries `meta.source: 'slash_command'` and is
|
|
15295
15363
|
// recognised by its payload keys instead (#12141).
|
|
15296
|
-
!
|
|
15364
|
+
!rp(i) && i.text.trim()) {
|
|
15297
15365
|
const l = cr(i.text), p = l ? l.filter((g) => g.kind === "text").map((g) => g.text).join(`
|
|
15298
15366
|
`).trim() : i.text;
|
|
15299
15367
|
p && !/\{\s*"insight_(?:progress|ready|error)"\s*:/.test(p) && (s.responseText = p);
|
|
@@ -15303,7 +15371,7 @@ function Si(e, t, o) {
|
|
|
15303
15371
|
return s;
|
|
15304
15372
|
}
|
|
15305
15373
|
const _a = 1024;
|
|
15306
|
-
function
|
|
15374
|
+
function mg(e) {
|
|
15307
15375
|
const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = (r, i) => JSON.stringify([r, i]), n = (r) => o.has(r) ? !1 : (o.add(r), o.size > _a && o.delete(o.values().next().value), !0), a = (r, i) => (t.get(r)?.pending.delete(i), n(s(r, i)));
|
|
15308
15376
|
return {
|
|
15309
15377
|
retain(r) {
|
|
@@ -15339,13 +15407,13 @@ function ug(e) {
|
|
|
15339
15407
|
const P = A.requestId;
|
|
15340
15408
|
if (p || typeof P != "string" || !P.trim())
|
|
15341
15409
|
return;
|
|
15342
|
-
const
|
|
15343
|
-
if (o.has(
|
|
15410
|
+
const N = JSON.stringify([r, "permission", P]);
|
|
15411
|
+
if (o.has(N)) return;
|
|
15344
15412
|
try {
|
|
15345
15413
|
const H = typeof g == "function" ? g() : g;
|
|
15346
15414
|
if (!H?.attention) return;
|
|
15347
15415
|
const { attention: J, ...I } = H;
|
|
15348
|
-
n(
|
|
15416
|
+
n(N) && e({ ...I, key: N, outcome: J });
|
|
15349
15417
|
} catch {
|
|
15350
15418
|
}
|
|
15351
15419
|
return;
|
|
@@ -15373,11 +15441,11 @@ function ug(e) {
|
|
|
15373
15441
|
const F = h.pending.get($);
|
|
15374
15442
|
if (a(r, $))
|
|
15375
15443
|
try {
|
|
15376
|
-
const P = typeof g == "function" ? g() : g,
|
|
15444
|
+
const P = typeof g == "function" ? g() : g, N = P?.promptText || F, H = P?.sessionTitle || (N ? ir(N)[0] : void 0);
|
|
15377
15445
|
e({
|
|
15378
15446
|
...P,
|
|
15379
15447
|
...H ? { sessionTitle: H } : {},
|
|
15380
|
-
...
|
|
15448
|
+
...N ? { promptText: N } : {},
|
|
15381
15449
|
key: s(r, $),
|
|
15382
15450
|
outcome: l.type === "turn_error" ? "failed" : A.stopReason === "cancelled" ? "cancelled" : A.stopReason === "end_turn" ? "completed" : "ended"
|
|
15383
15451
|
});
|
|
@@ -15391,13 +15459,13 @@ function ug(e) {
|
|
|
15391
15459
|
* Copyright 2025 Qwen Team
|
|
15392
15460
|
* SPDX-License-Identifier: Apache-2.0
|
|
15393
15461
|
*/
|
|
15394
|
-
const
|
|
15462
|
+
const gg = 1e3, hg = 100, fg = 5, wg = "session_organization", kg = "workspace_session_live_state", vg = "session_transcript_pagination", Op = "session_turn_navigation", bg = 4, yg = "session_monitor_tool_correlation", Sg = "session_side_task", Cg = "default", Tg = "side_task", go = 200, Ig = 500, Ci = 200, Lp = 16, Fp = 4 * 1024 * 1024, Up = 5, Wp = 16 * 1024 * 1024, xg = 5e4;
|
|
15395
15463
|
/**
|
|
15396
15464
|
* @license
|
|
15397
15465
|
* Copyright 2025 Qwen Team
|
|
15398
15466
|
* SPDX-License-Identifier: Apache-2.0
|
|
15399
15467
|
*/
|
|
15400
|
-
class
|
|
15468
|
+
class Ws extends Error {
|
|
15401
15469
|
constructor() {
|
|
15402
15470
|
super("Historical transcript page exceeds the cache budget"), this.name = "HistoricalTranscriptPageTooLargeError";
|
|
15403
15471
|
}
|
|
@@ -15407,7 +15475,7 @@ class qo extends Error {
|
|
|
15407
15475
|
super("Historical transcript window is full; move the selection and retry"), this.name = "HistoricalTranscriptWindowFullError";
|
|
15408
15476
|
}
|
|
15409
15477
|
}
|
|
15410
|
-
function
|
|
15478
|
+
function Np(e) {
|
|
15411
15479
|
if (e.kind !== "tool") return e;
|
|
15412
15480
|
const t = e.rawOutput;
|
|
15413
15481
|
return typeof t != "object" || t === null || t.type !== "mcp_app" || t.html === "" || typeof t.html != "string" ? e : {
|
|
@@ -15424,7 +15492,7 @@ const Ti = Object.freeze({
|
|
|
15424
15492
|
ranges: Object.freeze([]),
|
|
15425
15493
|
retainedBytes: 0
|
|
15426
15494
|
});
|
|
15427
|
-
class
|
|
15495
|
+
class Bp {
|
|
15428
15496
|
constructor(t) {
|
|
15429
15497
|
eo(this, "snapshot", Ti);
|
|
15430
15498
|
eo(this, "nextPageId", 1);
|
|
@@ -15531,7 +15599,7 @@ class Np {
|
|
|
15531
15599
|
for (const F of h.ranges)
|
|
15532
15600
|
if (!("anchorTurnId" in F) && F.pageIds.some(
|
|
15533
15601
|
(P) => [...$.get(P)?.recordIds ?? []].some(
|
|
15534
|
-
(
|
|
15602
|
+
(N) => l.recordIds.has(N)
|
|
15535
15603
|
)
|
|
15536
15604
|
)) {
|
|
15537
15605
|
if (F.pageIds.some(
|
|
@@ -15556,11 +15624,11 @@ class Np {
|
|
|
15556
15624
|
}, this.evict(p, l.id), { rangeId: p, pageId: l.id, blockId: r.at(-1).id };
|
|
15557
15625
|
} catch (F) {
|
|
15558
15626
|
this.snapshot = h, this.cachedBoundaryRequests.clear();
|
|
15559
|
-
for (const [P,
|
|
15560
|
-
this.cachedBoundaryRequests.set(P,
|
|
15627
|
+
for (const [P, N] of b)
|
|
15628
|
+
this.cachedBoundaryRequests.set(P, N);
|
|
15561
15629
|
this.rangeAccess.clear();
|
|
15562
|
-
for (const [P,
|
|
15563
|
-
this.rangeAccess.set(P,
|
|
15630
|
+
for (const [P, N] of A)
|
|
15631
|
+
this.rangeAccess.set(P, N);
|
|
15564
15632
|
throw F;
|
|
15565
15633
|
}
|
|
15566
15634
|
}
|
|
@@ -15626,12 +15694,12 @@ class Np {
|
|
|
15626
15694
|
newer: F
|
|
15627
15695
|
});
|
|
15628
15696
|
if (this.measureRetainedBytes(/* @__PURE__ */ new Map([[b.id, b]]), [P]) > this.options.maxRetainedBytes)
|
|
15629
|
-
throw new
|
|
15630
|
-
const
|
|
15697
|
+
throw new Ws();
|
|
15698
|
+
const N = new Map(this.snapshot.pages);
|
|
15631
15699
|
let H = [...this.snapshot.ranges];
|
|
15632
15700
|
for (const I of this.snapshot.ranges)
|
|
15633
15701
|
if ("anchorTurnId" in I && I.pageIds.some(
|
|
15634
|
-
(X) => [...
|
|
15702
|
+
(X) => [...N.get(X)?.recordIds ?? []].some(
|
|
15635
15703
|
(te) => b.recordIds.has(te)
|
|
15636
15704
|
)
|
|
15637
15705
|
)) {
|
|
@@ -15643,19 +15711,19 @@ class Np {
|
|
|
15643
15711
|
H.filter((X) => X.id !== I.id),
|
|
15644
15712
|
I.id
|
|
15645
15713
|
);
|
|
15646
|
-
for (const X of I.pageIds)
|
|
15714
|
+
for (const X of I.pageIds) N.delete(X);
|
|
15647
15715
|
this.rangeAccess.delete(I.id), this.cachedBoundaryRequests.delete(
|
|
15648
15716
|
this.boundaryKey(I.id, "older")
|
|
15649
15717
|
), this.cachedBoundaryRequests.delete(
|
|
15650
15718
|
this.boundaryKey(I.id, "newer")
|
|
15651
15719
|
);
|
|
15652
15720
|
}
|
|
15653
|
-
|
|
15721
|
+
N.set(b.id, b);
|
|
15654
15722
|
const J = Object.freeze([...H, P]);
|
|
15655
15723
|
return this.snapshot = Object.freeze({
|
|
15656
|
-
pages:
|
|
15724
|
+
pages: N,
|
|
15657
15725
|
ranges: J,
|
|
15658
|
-
retainedBytes: this.measureRetainedBytes(
|
|
15726
|
+
retainedBytes: this.measureRetainedBytes(N, J)
|
|
15659
15727
|
}), this.select($, b.id), this.evict($, b.id), { rangeId: $, pageId: b.id, blockId: A };
|
|
15660
15728
|
}
|
|
15661
15729
|
beginBoundaryLoad(t, o) {
|
|
@@ -15792,14 +15860,14 @@ class Np {
|
|
|
15792
15860
|
);
|
|
15793
15861
|
return;
|
|
15794
15862
|
}
|
|
15795
|
-
const
|
|
15796
|
-
H.set(
|
|
15797
|
-
const J = o === "older" ? [
|
|
15863
|
+
const N = this.fitPageWithinBudget(P), H = new Map(this.snapshot.pages);
|
|
15864
|
+
H.set(N.id, N);
|
|
15865
|
+
const J = o === "older" ? [N.id, ...r.pageIds] : [...r.pageIds, N.id], I = h || x ? { kind: "live" } : b ? this.cachedBoundary(
|
|
15798
15866
|
t,
|
|
15799
15867
|
o,
|
|
15800
15868
|
b,
|
|
15801
15869
|
i
|
|
15802
|
-
) : o === "newer" ? xi(F) : this.nextBoundary(o, s,
|
|
15870
|
+
) : o === "newer" ? xi(F) : this.nextBoundary(o, s, N, n), X = Object.freeze({
|
|
15803
15871
|
...r,
|
|
15804
15872
|
pageIds: Object.freeze(J),
|
|
15805
15873
|
[o]: I
|
|
@@ -15821,7 +15889,7 @@ class Np {
|
|
|
15821
15889
|
(O === this.selectedRangeId ? this.selectedPageId : void 0) ?? [...this.viewportPins.values()].find(
|
|
15822
15890
|
(V) => r.pageIds.includes(V)
|
|
15823
15891
|
) ?? ve?.pageIds[0] ?? r.pageIds[0],
|
|
15824
|
-
O === t ? { direction: o, request: i, pageId:
|
|
15892
|
+
O === t ? { direction: o, request: i, pageId: N.id } : void 0
|
|
15825
15893
|
);
|
|
15826
15894
|
}
|
|
15827
15895
|
materializePage(t, o, s) {
|
|
@@ -15880,15 +15948,15 @@ class Np {
|
|
|
15880
15948
|
*/
|
|
15881
15949
|
fitPageWithinBudget(t) {
|
|
15882
15950
|
if (t.retainedBytes <= this.options.maxRetainedBytes) return t;
|
|
15883
|
-
const o = t.blocks.map(
|
|
15951
|
+
const o = t.blocks.map(Np);
|
|
15884
15952
|
if (o.every((n, a) => n === t.blocks[a]))
|
|
15885
|
-
throw new
|
|
15953
|
+
throw new Ws();
|
|
15886
15954
|
const s = this.withNewerRequest(
|
|
15887
15955
|
this.pageFromBlocks(t.id, t.snapshot, o),
|
|
15888
15956
|
t.newerRequest
|
|
15889
15957
|
);
|
|
15890
15958
|
if (s.retainedBytes > this.options.maxRetainedBytes)
|
|
15891
|
-
throw new
|
|
15959
|
+
throw new Ws();
|
|
15892
15960
|
return s;
|
|
15893
15961
|
}
|
|
15894
15962
|
withNewerRequest(t, o) {
|
|
@@ -16133,7 +16201,7 @@ class Jn extends Error {
|
|
|
16133
16201
|
super("Turn-index page exceeds the cache budget"), this.name = "TurnIndexPageTooLargeError";
|
|
16134
16202
|
}
|
|
16135
16203
|
}
|
|
16136
|
-
function
|
|
16204
|
+
function jp(e, t) {
|
|
16137
16205
|
if (!t) return;
|
|
16138
16206
|
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(o, "iu").exec(e);
|
|
16139
16207
|
if (!s) return;
|
|
@@ -16144,33 +16212,33 @@ function Wp(e, t) {
|
|
|
16144
16212
|
matchEnd: a.length + s.index - n + s[0].length
|
|
16145
16213
|
};
|
|
16146
16214
|
}
|
|
16147
|
-
const
|
|
16215
|
+
const Ns = /* @__PURE__ */ new Map(), Ei = Object.freeze({
|
|
16148
16216
|
mode: "legacy",
|
|
16149
16217
|
fallbackReason: "unsupported",
|
|
16150
16218
|
totalTurns: 0,
|
|
16151
16219
|
effectiveTurnCount: 0,
|
|
16152
|
-
indexPages:
|
|
16220
|
+
indexPages: Ns,
|
|
16153
16221
|
provisionalTurns: Object.freeze([]),
|
|
16154
|
-
historicalPages:
|
|
16222
|
+
historicalPages: Ns,
|
|
16155
16223
|
historicalRanges: Object.freeze([]),
|
|
16156
|
-
locations:
|
|
16224
|
+
locations: Ns
|
|
16157
16225
|
});
|
|
16158
|
-
function
|
|
16159
|
-
const t = e.indexPageSize ?? Ci, o = e.maxIndexPages ??
|
|
16226
|
+
function qp(e = {}) {
|
|
16227
|
+
const t = e.indexPageSize ?? Ci, o = e.maxIndexPages ?? Lp, s = e.maxIndexBytes ?? Fp, n = /* @__PURE__ */ new Set();
|
|
16160
16228
|
let a = Ei, r, i, l, p = !1, g = 0, h = 0, b = 0, A = 0, $ = /* @__PURE__ */ new Map(), x = [];
|
|
16161
16229
|
const F = /* @__PURE__ */ new Set();
|
|
16162
|
-
let P = /* @__PURE__ */ new Map(),
|
|
16230
|
+
let P = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Map(), I;
|
|
16163
16231
|
const X = /* @__PURE__ */ new Map();
|
|
16164
16232
|
let te, O = 0, ve = 0, V = !1, v = !1, B = !1, U = le(), G = Object.freeze({
|
|
16165
16233
|
revision: 0,
|
|
16166
16234
|
connected: !1,
|
|
16167
|
-
pages:
|
|
16235
|
+
pages: Ns,
|
|
16168
16236
|
ranges: Object.freeze([])
|
|
16169
16237
|
});
|
|
16170
16238
|
function le() {
|
|
16171
|
-
return new
|
|
16172
|
-
maxPages: e.maxHistoricalPages ??
|
|
16173
|
-
maxRetainedBytes: e.maxHistoricalBytes ??
|
|
16239
|
+
return new Bp({
|
|
16240
|
+
maxPages: e.maxHistoricalPages ?? Up,
|
|
16241
|
+
maxRetainedBytes: e.maxHistoricalBytes ?? Wp,
|
|
16174
16242
|
materialize(d, k, y) {
|
|
16175
16243
|
if (!i)
|
|
16176
16244
|
throw new Error("Session navigation client is unavailable");
|
|
@@ -16199,17 +16267,17 @@ function Bp(e = {}) {
|
|
|
16199
16267
|
(q) => q.id === j?.rangeId && q[R].kind === "error"
|
|
16200
16268
|
), ee = new Set(
|
|
16201
16269
|
[...An($).values()].map((q) => q.turnId)
|
|
16202
|
-
),
|
|
16270
|
+
), W = /* @__PURE__ */ new Map();
|
|
16203
16271
|
for (const [q, ne] of P)
|
|
16204
|
-
ee.has(q) &&
|
|
16205
|
-
for (const [q, ne] of
|
|
16206
|
-
ee.has(q) && !
|
|
16272
|
+
ee.has(q) && W.set(q, ne);
|
|
16273
|
+
for (const [q, ne] of N)
|
|
16274
|
+
ee.has(q) && !W.has(q) && W.set(q, ne);
|
|
16207
16275
|
for (const q of f)
|
|
16208
16276
|
for (const ne of q.pageIds) {
|
|
16209
16277
|
const se = y.pages.get(ne);
|
|
16210
16278
|
if (se)
|
|
16211
16279
|
for (const [Ae, ke] of se.turnBlockById)
|
|
16212
|
-
ee.has(Ae) && !
|
|
16280
|
+
ee.has(Ae) && !W.has(Ae) && W.set(Ae, {
|
|
16213
16281
|
turnId: Ae,
|
|
16214
16282
|
blockId: ke,
|
|
16215
16283
|
view: "historical",
|
|
@@ -16225,14 +16293,14 @@ function Bp(e = {}) {
|
|
|
16225
16293
|
indexPages: new Map(
|
|
16226
16294
|
[...$.entries()].map(([q, ne]) => [
|
|
16227
16295
|
q,
|
|
16228
|
-
|
|
16296
|
+
Hp(ne)
|
|
16229
16297
|
])
|
|
16230
16298
|
),
|
|
16231
16299
|
provisionalTurns: Object.freeze([...x]),
|
|
16232
16300
|
effectiveTurnCount: (d.totalTurns ?? a.totalTurns) + x.length,
|
|
16233
16301
|
historicalPages: L,
|
|
16234
16302
|
historicalRanges: Object.freeze(f),
|
|
16235
|
-
locations:
|
|
16303
|
+
locations: W
|
|
16236
16304
|
}), G = Object.freeze({
|
|
16237
16305
|
sessionId: r,
|
|
16238
16306
|
revision: ve + h,
|
|
@@ -16243,13 +16311,13 @@ function Bp(e = {}) {
|
|
|
16243
16311
|
for (const q of n) q();
|
|
16244
16312
|
}
|
|
16245
16313
|
function me(d) {
|
|
16246
|
-
r = d, g += 1, h += 1, b += 1, i = void 0, l = void 0, p = !1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(), P = /* @__PURE__ */ new Map(),
|
|
16314
|
+
r = d, g += 1, h += 1, b += 1, i = void 0, l = void 0, p = !1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(), P = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Set(), I = void 0, te = void 0, V = !1, v = !1, B = !1, U = le(), a = Object.freeze({
|
|
16247
16315
|
...Ei,
|
|
16248
16316
|
sessionId: d
|
|
16249
16317
|
});
|
|
16250
16318
|
}
|
|
16251
16319
|
function ue() {
|
|
16252
|
-
h += 1, b += 1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(),
|
|
16320
|
+
h += 1, b += 1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(), N = /* @__PURE__ */ new Map(), v = !1, U.reset(), Ot(), a = Object.freeze({
|
|
16253
16321
|
...a,
|
|
16254
16322
|
totalTurns: 0,
|
|
16255
16323
|
effectiveTurnCount: 0,
|
|
@@ -16264,7 +16332,7 @@ function Bp(e = {}) {
|
|
|
16264
16332
|
function Qe(d) {
|
|
16265
16333
|
const k = d.sessionId !== r;
|
|
16266
16334
|
if (k && me(d.sessionId), !d.sessionId || !d.supported) {
|
|
16267
|
-
!k && (i !== void 0 || a.mode !== "legacy" || a.fallbackReason !== "unsupported") && (g += 1, h += 1, b += 1, te = void 0, V = !1), i = void 0, l = void 0, p = !1, x = [], F.clear(),
|
|
16335
|
+
!k && (i !== void 0 || a.mode !== "legacy" || a.fallbackReason !== "unsupported") && (g += 1, h += 1, b += 1, te = void 0, V = !1), i = void 0, l = void 0, p = !1, x = [], F.clear(), N = /* @__PURE__ */ new Map(), (a.mode !== "legacy" || a.fallbackReason !== "unsupported" || k) && ($ = /* @__PURE__ */ new Map(), U.reset(), U.setLiveRecordIds(H), ae({
|
|
16268
16336
|
mode: "legacy",
|
|
16269
16337
|
fallbackReason: "unsupported",
|
|
16270
16338
|
totalTurns: 0,
|
|
@@ -16318,7 +16386,7 @@ function Bp(e = {}) {
|
|
|
16318
16386
|
}
|
|
16319
16387
|
H = E, J = f;
|
|
16320
16388
|
const w = new Map(
|
|
16321
|
-
[...
|
|
16389
|
+
[...N].filter(
|
|
16322
16390
|
([R, Q]) => !k.has(R) && y.has(Q.blockId)
|
|
16323
16391
|
)
|
|
16324
16392
|
);
|
|
@@ -16333,7 +16401,7 @@ function Bp(e = {}) {
|
|
|
16333
16401
|
const L = x.map((R) => {
|
|
16334
16402
|
const Q = f.get(R.promptId), ee = y.has(R.blockId ?? "") ? R.blockId : Q;
|
|
16335
16403
|
if (ee === R.blockId) return R;
|
|
16336
|
-
const { blockId:
|
|
16404
|
+
const { blockId: W, ...q } = R;
|
|
16337
16405
|
return Object.freeze({
|
|
16338
16406
|
...q,
|
|
16339
16407
|
...ee ? { blockId: ee } : {}
|
|
@@ -16341,11 +16409,11 @@ function Bp(e = {}) {
|
|
|
16341
16409
|
});
|
|
16342
16410
|
if (!L.some(
|
|
16343
16411
|
(R, Q) => R !== x[Q]
|
|
16344
|
-
) && Ri(P, k) && Ri(
|
|
16412
|
+
) && Ri(P, k) && Ri(N, w)) {
|
|
16345
16413
|
Ot();
|
|
16346
16414
|
return;
|
|
16347
16415
|
}
|
|
16348
|
-
P = k,
|
|
16416
|
+
P = k, N = w, x = L, Ke(), Ot(), ae();
|
|
16349
16417
|
}
|
|
16350
16418
|
function zt(d) {
|
|
16351
16419
|
if (F.has(d.promptId)) return;
|
|
@@ -16353,7 +16421,7 @@ function Bp(e = {}) {
|
|
|
16353
16421
|
(E) => E.promptId === d.promptId
|
|
16354
16422
|
);
|
|
16355
16423
|
if (f) {
|
|
16356
|
-
k && !P.has(f.turnId) &&
|
|
16424
|
+
k && !P.has(f.turnId) && N.get(f.turnId)?.blockId !== k && (N.set(f.turnId, {
|
|
16357
16425
|
turnId: f.turnId,
|
|
16358
16426
|
blockId: k,
|
|
16359
16427
|
view: "live"
|
|
@@ -16372,7 +16440,7 @@ function Bp(e = {}) {
|
|
|
16372
16440
|
Object.freeze({
|
|
16373
16441
|
provisionalId: `live:${d.promptId}`,
|
|
16374
16442
|
promptId: d.promptId,
|
|
16375
|
-
label:
|
|
16443
|
+
label: zp(d.label),
|
|
16376
16444
|
...k ? { blockId: k } : {}
|
|
16377
16445
|
})
|
|
16378
16446
|
], ae();
|
|
@@ -16385,9 +16453,9 @@ function Bp(e = {}) {
|
|
|
16385
16453
|
const k = x.filter((y) => y.promptId !== d);
|
|
16386
16454
|
k.length !== x.length && (x = k, ae());
|
|
16387
16455
|
}
|
|
16388
|
-
function
|
|
16456
|
+
function Wt(d) {
|
|
16389
16457
|
if (d === "session_rewound" || d === "session.rewound") {
|
|
16390
|
-
if (P = /* @__PURE__ */ new Map(),
|
|
16458
|
+
if (P = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Map(), I = void 0, ue(), B) {
|
|
16391
16459
|
ae({ mode: "legacy", fallbackReason: "too_large" });
|
|
16392
16460
|
return;
|
|
16393
16461
|
}
|
|
@@ -16489,7 +16557,7 @@ function Bp(e = {}) {
|
|
|
16489
16557
|
ce
|
|
16490
16558
|
]);
|
|
16491
16559
|
}
|
|
16492
|
-
const
|
|
16560
|
+
const W = Math.max(
|
|
16493
16561
|
60,
|
|
16494
16562
|
d.length,
|
|
16495
16563
|
...[...L].map(
|
|
@@ -16514,7 +16582,7 @@ function Bp(e = {}) {
|
|
|
16514
16582
|
let Lt = 0, xt = ke.turns[Lt];
|
|
16515
16583
|
if (!xt || xt.ordinal !== 0)
|
|
16516
16584
|
throw new Error("Conversation search index is incomplete");
|
|
16517
|
-
let
|
|
16585
|
+
let Nt, St = await E.getTranscriptPage({
|
|
16518
16586
|
atRecordId: xt.turnId,
|
|
16519
16587
|
snapshot: ct,
|
|
16520
16588
|
limit: go
|
|
@@ -16528,14 +16596,14 @@ function Bp(e = {}) {
|
|
|
16528
16596
|
), $e = /* @__PURE__ */ new Map();
|
|
16529
16597
|
for (const tt of ce.encounteredRecordIds) {
|
|
16530
16598
|
if (se(), xt && tt === xt.turnId) {
|
|
16531
|
-
if (
|
|
16532
|
-
if (ke = await Ae(ct,
|
|
16599
|
+
if (Nt = xt, Lt += 1, Lt >= ke.turns.length && Nt.ordinal + 1 < ke.totalTurns) {
|
|
16600
|
+
if (ke = await Ae(ct, Nt.ordinal + 1), ke.start !== Nt.ordinal + 1 || !ke.turns.length)
|
|
16533
16601
|
throw new Error("Conversation search index did not advance");
|
|
16534
16602
|
Lt = 0;
|
|
16535
16603
|
}
|
|
16536
16604
|
xt = ke.turns[Lt];
|
|
16537
16605
|
}
|
|
16538
|
-
|
|
16606
|
+
Nt && $e.set(tt, Nt);
|
|
16539
16607
|
}
|
|
16540
16608
|
for (const tt of ce.blocks) {
|
|
16541
16609
|
se();
|
|
@@ -16543,14 +16611,14 @@ function Bp(e = {}) {
|
|
|
16543
16611
|
if (tt.kind !== "user" && tt.kind !== "assistant" || !yo.length)
|
|
16544
16612
|
continue;
|
|
16545
16613
|
const ro = yo[0], Ko = ro === rt, vn = Ko ? wn + tt.text : tt.text;
|
|
16546
|
-
ao = (Ko ? ao : 0) + tt.text.length, wn = vn.slice(-
|
|
16614
|
+
ao = (Ko ? ao : 0) + tt.text.length, wn = vn.slice(-W), Ko || (At = void 0);
|
|
16547
16615
|
let bn = !1;
|
|
16548
16616
|
for (const Et of yo)
|
|
16549
16617
|
for (const To of j.get(Et) ?? [])
|
|
16550
16618
|
bn = L.delete(To) || bn;
|
|
16551
16619
|
let Co;
|
|
16552
16620
|
if (!Ko && !bn && tt.kind === "user" && So) {
|
|
16553
|
-
const Et =
|
|
16621
|
+
const Et = N.get(So.turnId)?.blockId ?? x.find((Je) => Je.promptId === So.promptId)?.blockId, To = Et ? R.get(Et) : void 0;
|
|
16554
16622
|
To?.kind === "user" && L.has(To) && (Co = To);
|
|
16555
16623
|
}
|
|
16556
16624
|
if (!bn && !Co && !At) {
|
|
@@ -16565,7 +16633,7 @@ function Bp(e = {}) {
|
|
|
16565
16633
|
Ko && Et?.recordId === ro && (Et.liveBlockId = Co.id);
|
|
16566
16634
|
}
|
|
16567
16635
|
Ko || (f.messageCount += 1), rt = yo.at(-1);
|
|
16568
|
-
const is = y ? yo.includes(y) ? { snippet: "", matchStart: 0, matchEnd: 0 } : void 0 :
|
|
16636
|
+
const is = y ? yo.includes(y) ? { snippet: "", matchStart: 0, matchEnd: 0 } : void 0 : jp(vn, d);
|
|
16569
16637
|
if (is && So && ro !== so && (so = ro, f.matchCount += 1, f.hits.length < 200 ? f.hits.push({
|
|
16570
16638
|
sessionId: w,
|
|
16571
16639
|
snapshot: ct,
|
|
@@ -16620,10 +16688,10 @@ function Bp(e = {}) {
|
|
|
16620
16688
|
"Anchored transcript response did not contain its target"
|
|
16621
16689
|
);
|
|
16622
16690
|
const Q = I?.find(
|
|
16623
|
-
(
|
|
16691
|
+
(W) => W.sourceRecordIds?.includes(d.recordId)
|
|
16624
16692
|
);
|
|
16625
16693
|
if (Q) {
|
|
16626
|
-
const
|
|
16694
|
+
const W = {
|
|
16627
16695
|
turnId: d.turnId,
|
|
16628
16696
|
blockId: Q.id,
|
|
16629
16697
|
view: "live"
|
|
@@ -16633,20 +16701,20 @@ function Bp(e = {}) {
|
|
|
16633
16701
|
ordinal: d.turnOrdinal,
|
|
16634
16702
|
turnId: d.turnId,
|
|
16635
16703
|
status: "ready",
|
|
16636
|
-
location:
|
|
16704
|
+
location: W
|
|
16637
16705
|
},
|
|
16638
16706
|
...a.error?.operation === "locate" ? { error: void 0 } : {}
|
|
16639
|
-
}),
|
|
16707
|
+
}), W;
|
|
16640
16708
|
}
|
|
16641
16709
|
if (f.materializeTranscriptEvents(
|
|
16642
16710
|
j.events,
|
|
16643
16711
|
1,
|
|
16644
16712
|
/* @__PURE__ */ new Set()
|
|
16645
16713
|
).blocks.some(
|
|
16646
|
-
(
|
|
16714
|
+
(W) => W.sourceRecordIds?.includes(d.recordId)
|
|
16647
16715
|
)) {
|
|
16648
16716
|
if (y(), !L()) throw new Error("Conversation search result expired");
|
|
16649
|
-
const
|
|
16717
|
+
const W = U.admitAnchor(
|
|
16650
16718
|
d.turnOrdinal,
|
|
16651
16719
|
d.turnId,
|
|
16652
16720
|
w.page.snapshot,
|
|
@@ -16656,10 +16724,10 @@ function Bp(e = {}) {
|
|
|
16656
16724
|
hasOlder: !!R || j.hasOlder
|
|
16657
16725
|
},
|
|
16658
16726
|
d.recordId
|
|
16659
|
-
), q = U.getSnapshot().pages.get(
|
|
16727
|
+
), q = U.getSnapshot().pages.get(W.pageId).blocks.find(
|
|
16660
16728
|
(se) => se.sourceRecordIds?.includes(d.recordId)
|
|
16661
16729
|
).id, ne = {
|
|
16662
|
-
...
|
|
16730
|
+
...W,
|
|
16663
16731
|
blockId: q,
|
|
16664
16732
|
turnId: d.turnId,
|
|
16665
16733
|
view: "historical"
|
|
@@ -16729,34 +16797,34 @@ function Bp(e = {}) {
|
|
|
16729
16797
|
};
|
|
16730
16798
|
}
|
|
16731
16799
|
if (j.view === "live") {
|
|
16732
|
-
const ne =
|
|
16800
|
+
const ne = N.get(d.turnId);
|
|
16733
16801
|
if (d.role === "user" && d.recordId === d.turnId && ne)
|
|
16734
16802
|
return w(ne);
|
|
16735
16803
|
break;
|
|
16736
16804
|
}
|
|
16737
16805
|
if (!R) break;
|
|
16738
|
-
const
|
|
16739
|
-
if (!
|
|
16806
|
+
const W = ee.ranges.find((ne) => ne.id === R);
|
|
16807
|
+
if (!W || W.newer.kind !== "loadable" && W.newer.kind !== "cached" && W.newer.kind !== "live" && W.newer.kind !== "loading" && !(W.newer.kind === "error" && W.newer.retryable))
|
|
16740
16808
|
break;
|
|
16741
|
-
if (
|
|
16742
|
-
R =
|
|
16809
|
+
if (W.newer.kind === "cached") {
|
|
16810
|
+
R = W.newer.rangeId;
|
|
16743
16811
|
continue;
|
|
16744
16812
|
}
|
|
16745
|
-
if (
|
|
16813
|
+
if (W.newer.kind === "loading") {
|
|
16746
16814
|
const ne = X.get(
|
|
16747
|
-
`${g}:${h}:${
|
|
16815
|
+
`${g}:${h}:${W.id}:newer`
|
|
16748
16816
|
);
|
|
16749
16817
|
if (!ne) break;
|
|
16750
16818
|
await ne;
|
|
16751
16819
|
continue;
|
|
16752
16820
|
}
|
|
16753
|
-
const q =
|
|
16754
|
-
if (q && U.select(
|
|
16755
|
-
|
|
16821
|
+
const q = W.pageIds.at(-1);
|
|
16822
|
+
if (q && U.select(W.id, q), await Ne(
|
|
16823
|
+
W.id,
|
|
16756
16824
|
"newer",
|
|
16757
16825
|
{ isCurrent: L },
|
|
16758
16826
|
y
|
|
16759
|
-
), U.getSnapshot().ranges.find((ne) => ne.id ===
|
|
16827
|
+
), U.getSnapshot().ranges.find((ne) => ne.id === W.id)?.pageIds.at(-1) === q)
|
|
16760
16828
|
break;
|
|
16761
16829
|
}
|
|
16762
16830
|
throw new Error("Conversation search message is unavailable");
|
|
@@ -16798,17 +16866,17 @@ function Bp(e = {}) {
|
|
|
16798
16866
|
throw new Error(
|
|
16799
16867
|
ee.replayError ?? "Historical transcript page was partial"
|
|
16800
16868
|
);
|
|
16801
|
-
const
|
|
16802
|
-
if (
|
|
16869
|
+
const W = C(w.entry.turnId);
|
|
16870
|
+
if (W && !f)
|
|
16803
16871
|
return ae({
|
|
16804
16872
|
selected: {
|
|
16805
16873
|
ordinal: d,
|
|
16806
16874
|
turnId: w.entry.turnId,
|
|
16807
16875
|
status: "ready",
|
|
16808
|
-
location:
|
|
16876
|
+
location: W
|
|
16809
16877
|
},
|
|
16810
16878
|
...a.error?.operation === "locate" ? { error: void 0 } : {}
|
|
16811
|
-
}),
|
|
16879
|
+
}), W;
|
|
16812
16880
|
y?.();
|
|
16813
16881
|
const q = U.admitAnchor(
|
|
16814
16882
|
d,
|
|
@@ -16861,11 +16929,11 @@ function Bp(e = {}) {
|
|
|
16861
16929
|
const L = () => a.error?.operation === k && a.error.rangeId === d ? { error: void 0 } : {};
|
|
16862
16930
|
ae(L());
|
|
16863
16931
|
const j = g, R = h, Q = () => {
|
|
16864
|
-
const ee = U.getSnapshot().ranges.find((
|
|
16932
|
+
const ee = U.getSnapshot().ranges.find((W) => W.id === d)?.[k];
|
|
16865
16933
|
return j === g && R === h && oe(E) && ee?.kind === "loading" && ee.request === w && (y?.isCurrent() ?? !0);
|
|
16866
16934
|
};
|
|
16867
16935
|
try {
|
|
16868
|
-
let ee,
|
|
16936
|
+
let ee, W;
|
|
16869
16937
|
if (w.kind === "gap") {
|
|
16870
16938
|
const ke = U.getSnapshot().ranges.find((rt) => rt.id === d);
|
|
16871
16939
|
if (!ke) return;
|
|
@@ -16875,7 +16943,7 @@ function Bp(e = {}) {
|
|
|
16875
16943
|
snapshot: w.snapshot,
|
|
16876
16944
|
limit: go
|
|
16877
16945
|
});
|
|
16878
|
-
let Lt = !0, xt,
|
|
16946
|
+
let Lt = !0, xt, Nt = !1, St;
|
|
16879
16947
|
for (; ; ) {
|
|
16880
16948
|
if (!Q()) return;
|
|
16881
16949
|
if (Hn(ee, r), Lt && !ct && "anchorTurnId" in ke && ee.targetRecordId !== w.anchorRecordId)
|
|
@@ -16886,13 +16954,13 @@ function Bp(e = {}) {
|
|
|
16886
16954
|
/* @__PURE__ */ new Set()
|
|
16887
16955
|
).encounteredRecordIds, so = rt.indexOf(w.afterRecordId);
|
|
16888
16956
|
if (so >= 0) {
|
|
16889
|
-
so < rt.length - 1 ?
|
|
16957
|
+
so < rt.length - 1 ? W = {
|
|
16890
16958
|
excludedRecordIds: rt.slice(0, so + 1),
|
|
16891
16959
|
fromAnchor: Lt
|
|
16892
|
-
} : xt ? (ee = xt,
|
|
16960
|
+
} : xt ? (ee = xt, W = {
|
|
16893
16961
|
excludedRecordIds: [],
|
|
16894
|
-
fromAnchor:
|
|
16895
|
-
}) :
|
|
16962
|
+
fromAnchor: Nt
|
|
16963
|
+
}) : W = { excludedRecordIds: rt, fromAnchor: Lt };
|
|
16896
16964
|
break;
|
|
16897
16965
|
}
|
|
16898
16966
|
const At = rt[0];
|
|
@@ -16900,7 +16968,7 @@ function Bp(e = {}) {
|
|
|
16900
16968
|
throw new Error(
|
|
16901
16969
|
"Gap recovery did not advance to the retained record"
|
|
16902
16970
|
);
|
|
16903
|
-
St = At, xt = ee,
|
|
16971
|
+
St = At, xt = ee, Nt = Lt, ee = await E.getTranscriptPage({
|
|
16904
16972
|
beforeRecordId: At,
|
|
16905
16973
|
snapshot: w.snapshot,
|
|
16906
16974
|
limit: go
|
|
@@ -16925,12 +16993,12 @@ function Bp(e = {}) {
|
|
|
16925
16993
|
k,
|
|
16926
16994
|
w.kind !== "cursor" ? w.snapshot : Ae,
|
|
16927
16995
|
ee,
|
|
16928
|
-
|
|
16996
|
+
W
|
|
16929
16997
|
), ae(L());
|
|
16930
16998
|
} catch (ee) {
|
|
16931
16999
|
if (!Q()) return;
|
|
16932
|
-
const
|
|
16933
|
-
if (!
|
|
17000
|
+
const W = U.getSnapshot().ranges.find((q) => q.id === d);
|
|
17001
|
+
if (!W || W[k].kind !== "loading") return;
|
|
16934
17002
|
if (y && ee instanceof qo)
|
|
16935
17003
|
throw U.cancelBoundaryLoad(d, k, w), ae(L()), ee;
|
|
16936
17004
|
if (Rs(ee))
|
|
@@ -16989,7 +17057,7 @@ function Bp(e = {}) {
|
|
|
16989
17057
|
throw k() && y === O && Ye(f), f;
|
|
16990
17058
|
}
|
|
16991
17059
|
}
|
|
16992
|
-
async function
|
|
17060
|
+
async function Ne(d, k, y, f) {
|
|
16993
17061
|
const E = U.getSnapshot().ranges.find((ee) => ee.id === d);
|
|
16994
17062
|
if (!E || !y.isCurrent()) return;
|
|
16995
17063
|
if (k !== "newer" || E.newer.kind !== "live")
|
|
@@ -17088,7 +17156,7 @@ function Bp(e = {}) {
|
|
|
17088
17156
|
turns: Object.freeze(
|
|
17089
17157
|
d.turns.map((y) => Object.freeze({ ...y }))
|
|
17090
17158
|
),
|
|
17091
|
-
retainedBytes:
|
|
17159
|
+
retainedBytes: Gp(d),
|
|
17092
17160
|
accessedAt: ++A
|
|
17093
17161
|
};
|
|
17094
17162
|
if (o < 1 || k.retainedBytes > s)
|
|
@@ -17099,7 +17167,7 @@ function Bp(e = {}) {
|
|
|
17099
17167
|
const k = [...An($).values(), ...d];
|
|
17100
17168
|
for (const y of k) {
|
|
17101
17169
|
const f = J.get(y.promptId ?? "");
|
|
17102
|
-
f && !P.has(y.turnId) &&
|
|
17170
|
+
f && !P.has(y.turnId) && N.set(y.turnId, {
|
|
17103
17171
|
turnId: y.turnId,
|
|
17104
17172
|
blockId: f,
|
|
17105
17173
|
view: "live"
|
|
@@ -17109,7 +17177,7 @@ function Bp(e = {}) {
|
|
|
17109
17177
|
const f = k.find(
|
|
17110
17178
|
(E) => E.promptId === y.promptId
|
|
17111
17179
|
);
|
|
17112
|
-
return f ? (y.blockId &&
|
|
17180
|
+
return f ? (y.blockId && N.set(f.turnId, {
|
|
17113
17181
|
turnId: f.turnId,
|
|
17114
17182
|
blockId: y.blockId,
|
|
17115
17183
|
view: "live"
|
|
@@ -17120,7 +17188,7 @@ function Bp(e = {}) {
|
|
|
17120
17188
|
}), Ot();
|
|
17121
17189
|
}
|
|
17122
17190
|
function Ot() {
|
|
17123
|
-
U.setLiveRecordIds([...H, ...
|
|
17191
|
+
U.setLiveRecordIds([...H, ...N.keys()]);
|
|
17124
17192
|
}
|
|
17125
17193
|
function Oo(d) {
|
|
17126
17194
|
const k = a.selected?.ordinal, y = () => [...$.values()].reduce(
|
|
@@ -17149,7 +17217,7 @@ function Bp(e = {}) {
|
|
|
17149
17217
|
});
|
|
17150
17218
|
}
|
|
17151
17219
|
function u() {
|
|
17152
|
-
B = !0, v = !1, h += 1, b += 1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(),
|
|
17220
|
+
B = !0, v = !1, h += 1, b += 1, $ = /* @__PURE__ */ new Map(), x = [], F.clear(), N = /* @__PURE__ */ new Map(), U.reset(), ae({
|
|
17153
17221
|
mode: "legacy",
|
|
17154
17222
|
fallbackReason: "too_large",
|
|
17155
17223
|
totalTurns: 0,
|
|
@@ -17168,7 +17236,7 @@ function Bp(e = {}) {
|
|
|
17168
17236
|
}
|
|
17169
17237
|
}
|
|
17170
17238
|
function C(d) {
|
|
17171
|
-
return P.get(d) ??
|
|
17239
|
+
return P.get(d) ?? N.get(d);
|
|
17172
17240
|
}
|
|
17173
17241
|
return {
|
|
17174
17242
|
getSnapshot: () => a,
|
|
@@ -17182,7 +17250,7 @@ function Bp(e = {}) {
|
|
|
17182
17250
|
setViewportAnchor: (d, k) => {
|
|
17183
17251
|
U.setViewportAnchor(d, k), k && U.clearSelection();
|
|
17184
17252
|
},
|
|
17185
|
-
loadViewportBoundary:
|
|
17253
|
+
loadViewportBoundary: Ne,
|
|
17186
17254
|
subscribe(d) {
|
|
17187
17255
|
return n.add(d), () => n.delete(d);
|
|
17188
17256
|
},
|
|
@@ -17190,7 +17258,7 @@ function Bp(e = {}) {
|
|
|
17190
17258
|
observeLiveBlocks: Pe,
|
|
17191
17259
|
recordPromptAdmitted: zt,
|
|
17192
17260
|
recordPromptRemoved: fn,
|
|
17193
|
-
handleSessionEvent:
|
|
17261
|
+
handleSessionEvent: Wt,
|
|
17194
17262
|
loadOrdinal: Vt,
|
|
17195
17263
|
locateOrdinal: et,
|
|
17196
17264
|
locateViewportOrdinal: et,
|
|
@@ -17203,7 +17271,7 @@ function Bp(e = {}) {
|
|
|
17203
17271
|
retry: mt
|
|
17204
17272
|
};
|
|
17205
17273
|
}
|
|
17206
|
-
function
|
|
17274
|
+
function Hp(e) {
|
|
17207
17275
|
const { accessedAt: t, ...o } = e;
|
|
17208
17276
|
return Object.freeze(o);
|
|
17209
17277
|
}
|
|
@@ -17223,7 +17291,7 @@ function Dl(e, t) {
|
|
|
17223
17291
|
if (!t || e.sessionId !== t || e.hasMore && !e.nextCursor)
|
|
17224
17292
|
throw new Error("Invalid transcript page response");
|
|
17225
17293
|
}
|
|
17226
|
-
function
|
|
17294
|
+
function Gp(e) {
|
|
17227
17295
|
let t = 128 + e.snapshot.length * 2;
|
|
17228
17296
|
for (const o of e.turns)
|
|
17229
17297
|
t += 96 + o.turnId.length * 2 + o.label.length * 2 + (o.promptId?.length ?? 0) * 2 + (o.timestamp?.length ?? 0) * 2 + (o.detail?.length ?? 0) * 2;
|
|
@@ -17241,7 +17309,7 @@ function Pi(e) {
|
|
|
17241
17309
|
if (!Number.isInteger(e) || e < 0)
|
|
17242
17310
|
throw new Error("Turn ordinal must be a non-negative integer");
|
|
17243
17311
|
}
|
|
17244
|
-
function
|
|
17312
|
+
function zp(e) {
|
|
17245
17313
|
const t = e.replace(/\s+/gu, " ").trim(), o = Array.from(t);
|
|
17246
17314
|
return o.length <= 160 ? t : `${o.slice(0, 159).join("")}…`;
|
|
17247
17315
|
}
|
|
@@ -17255,7 +17323,7 @@ function Es(e, t, o = Bs(t), s, n) {
|
|
|
17255
17323
|
});
|
|
17256
17324
|
}
|
|
17257
17325
|
function Bs(e) {
|
|
17258
|
-
if (e instanceof
|
|
17326
|
+
if (e instanceof Ws || e instanceof Jn)
|
|
17259
17327
|
return !1;
|
|
17260
17328
|
const t = Gt(e);
|
|
17261
17329
|
return t === void 0 || t === 408 || t === 409 || t === 429 || t >= 500;
|
|
@@ -17275,7 +17343,7 @@ function Ol(e) {
|
|
|
17275
17343
|
if (!(typeof t != "object" || t === null || !("code" in t)))
|
|
17276
17344
|
return typeof t.code == "string" ? t.code : void 0;
|
|
17277
17345
|
}
|
|
17278
|
-
const Gn = "session_transcript_pagination", La = "client_identity",
|
|
17346
|
+
const Gn = "session_transcript_pagination", La = "client_identity", Vp = "workspace_acp_preheat", Kp = "workspace_acp_status", Qp = "workspace_skills_config_runtime";
|
|
17279
17347
|
function $i(e) {
|
|
17280
17348
|
if (e !== void 0) {
|
|
17281
17349
|
if (Gc.includes(e))
|
|
@@ -17283,9 +17351,9 @@ function $i(e) {
|
|
|
17283
17351
|
throw new Error(`Unsupported standalone approval mode: ${e}`);
|
|
17284
17352
|
}
|
|
17285
17353
|
}
|
|
17286
|
-
const
|
|
17354
|
+
const Yp = 6e4, Mi = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
17287
17355
|
function ho(e, t) {
|
|
17288
|
-
const o =
|
|
17356
|
+
const o = Wc(e), s = Ie(e.data) ? e.data : void 0, n = e.type === "turn_complete" && t === "end_turn" && Ie(s?.branchPoint) ? s.branchPoint : void 0, a = typeof n?.assistantRecordUuid == "string" ? n.assistantRecordUuid : void 0, r = typeof n?.checkpointUuid == "string" ? n.checkpointUuid : void 0, i = a !== void 0 && Mi.test(a) && r !== void 0 && Mi.test(r);
|
|
17289
17357
|
return {
|
|
17290
17358
|
type: "assistant.done",
|
|
17291
17359
|
reason: t,
|
|
@@ -17317,10 +17385,10 @@ function Fa(e) {
|
|
|
17317
17385
|
function Ll(e) {
|
|
17318
17386
|
return e.type === "history_truncated" && Ie(e.data) && e.data.fullTranscriptAvailable === !0;
|
|
17319
17387
|
}
|
|
17320
|
-
function
|
|
17388
|
+
function Jp(e) {
|
|
17321
17389
|
return Ll(e) && Ie(e.data) && e.data.scope === void 0;
|
|
17322
17390
|
}
|
|
17323
|
-
function
|
|
17391
|
+
function Xp(e, t, o) {
|
|
17324
17392
|
const s = /* @__PURE__ */ new Set();
|
|
17325
17393
|
for (const x of e.blocks)
|
|
17326
17394
|
for (const F of x.sourceRecordIds ?? [])
|
|
@@ -17330,8 +17398,8 @@ function Yp(e, t, o) {
|
|
|
17330
17398
|
s.add(F);
|
|
17331
17399
|
const n = (x) => {
|
|
17332
17400
|
if (x?.kind !== "user") return;
|
|
17333
|
-
const F = x.text ?? "", P = x.images?.length ?? 0,
|
|
17334
|
-
return `${F}\0img:${P}\0file:${
|
|
17401
|
+
const F = x.text ?? "", P = x.images?.length ?? 0, N = x.files?.length ?? 0;
|
|
17402
|
+
return `${F}\0img:${P}\0file:${N}`;
|
|
17335
17403
|
}, a = e.blocks[0], r = (a?.sourceRecordIds?.length ?? 0) === 0 ? n(a) : void 0, i = s.size === 0 ? t : t.filter(
|
|
17336
17404
|
(x) => !x.sourceRecordIds?.some(
|
|
17337
17405
|
(F) => s.has(F)
|
|
@@ -17455,10 +17523,10 @@ function to(e, t) {
|
|
|
17455
17523
|
if (!(typeof e != "string" || e.length === 0))
|
|
17456
17524
|
return e.length <= t ? e : `${e.slice(0, t)}…`;
|
|
17457
17525
|
}
|
|
17458
|
-
function
|
|
17526
|
+
function Zp(e) {
|
|
17459
17527
|
const t = Ie(e.rawInput) ? e.rawInput : void 0, o = Ie(e.rawOutput) ? e.rawOutput : void 0, s = e.toolName?.toLowerCase();
|
|
17460
17528
|
if (!(s === "agent" || s === "task" || typeof t?.subagent_type == "string" || o?.type === "task_execution")) return e;
|
|
17461
|
-
const a = Ie(o?.executionSummary) ? o.executionSummary : void 0, r = to(t?.subagent_type, 120), i = to(t?.prompt, 240), l = to(t?.description, 240), p = to(t?.working_dir, 240), g = to(t?.name, 120), h = typeof t?.todo_id == "string" ? t.todo_id : void 0, b = to(o?.subagentName, 120), A = to(o?.subagentColor, 80), $ = to(o?.taskDescription, 240), x = to(o?.status, 80), F = x ?? e.status, P = F === "completed" || F === "failed" || F === "cancelled",
|
|
17529
|
+
const a = Ie(o?.executionSummary) ? o.executionSummary : void 0, r = to(t?.subagent_type, 120), i = to(t?.prompt, 240), l = to(t?.description, 240), p = to(t?.working_dir, 240), g = to(t?.name, 120), h = typeof t?.todo_id == "string" ? t.todo_id : void 0, b = to(o?.subagentName, 120), A = to(o?.subagentColor, 80), $ = to(o?.taskDescription, 240), x = to(o?.status, 80), F = x ?? e.status, P = F === "completed" || F === "failed" || F === "cancelled", N = o?.executionMode, H = to(o?.terminateReason, 240), J = Array.isArray(o?.skills) ? o.skills.slice(0, 32).flatMap(
|
|
17462
17530
|
(te) => to(te, 120) ? [to(te, 120)] : []
|
|
17463
17531
|
) : [], I = t ? {
|
|
17464
17532
|
...r ? { subagent_type: r } : {},
|
|
@@ -17474,7 +17542,7 @@ function Jp(e) {
|
|
|
17474
17542
|
...A ? { subagentColor: A } : {},
|
|
17475
17543
|
...$ ? { taskDescription: $ } : {},
|
|
17476
17544
|
...x ? { status: x } : {},
|
|
17477
|
-
...qi(
|
|
17545
|
+
...qi(N) ? { executionMode: N } : {},
|
|
17478
17546
|
...typeof o.subagentSessionReady == "boolean" ? { subagentSessionReady: o.subagentSessionReady } : {},
|
|
17479
17547
|
...H ? { terminateReason: H } : {},
|
|
17480
17548
|
...J.length > 0 ? { skills: J } : {},
|
|
@@ -17509,20 +17577,20 @@ function Ps(e) {
|
|
|
17509
17577
|
const t = [];
|
|
17510
17578
|
for (const o of e)
|
|
17511
17579
|
"parentToolCallId" in o && o.parentToolCallId || t.push(
|
|
17512
|
-
o.type === "tool.update" ?
|
|
17580
|
+
o.type === "tool.update" ? Zp(o) : o
|
|
17513
17581
|
);
|
|
17514
17582
|
return t;
|
|
17515
17583
|
}
|
|
17516
17584
|
const Ul = kt(
|
|
17517
17585
|
void 0
|
|
17518
|
-
),
|
|
17586
|
+
), Wl = kt(void 0), dr = kt(
|
|
17519
17587
|
void 0
|
|
17520
|
-
),
|
|
17588
|
+
), Nl = kt(void 0), Bl = kt(void 0), jl = kt(
|
|
17521
17589
|
void 0
|
|
17522
|
-
), ql = kt(void 0), Hl = kt(void 0), Gl = kt(void 0), zl = kt(void 0), ur = /* @__PURE__ */ new Set([401, 403]),
|
|
17590
|
+
), ql = kt(void 0), Hl = kt(void 0), Gl = kt(void 0), zl = kt(void 0), ur = /* @__PURE__ */ new Set([401, 403]), em = /* @__PURE__ */ new Set([
|
|
17523
17591
|
...ur,
|
|
17524
17592
|
...fl
|
|
17525
|
-
]),
|
|
17593
|
+
]), tm = 5e4, om = 16, nm = {
|
|
17526
17594
|
memoryVersion: 0,
|
|
17527
17595
|
agentsVersion: 0,
|
|
17528
17596
|
toolsVersion: 0,
|
|
@@ -17534,15 +17602,15 @@ const Ul = kt(
|
|
|
17534
17602
|
sourcesVersion: 0,
|
|
17535
17603
|
initVersion: 0,
|
|
17536
17604
|
authVersion: 0
|
|
17537
|
-
},
|
|
17605
|
+
}, sm = Symbol("unhandled session");
|
|
17538
17606
|
function zn(e) {
|
|
17539
17607
|
return e.sessionContext !== void 0 && e.sessionContext.kind !== "workspace" ? mn(e, e.sessionId) : e;
|
|
17540
17608
|
}
|
|
17541
|
-
function
|
|
17609
|
+
function am(e) {
|
|
17542
17610
|
const t = $t(e), o = Y({ identity: t, context: e });
|
|
17543
17611
|
return o.current.identity !== t && (o.current = { identity: t, context: e }), o.current.context;
|
|
17544
17612
|
}
|
|
17545
|
-
function
|
|
17613
|
+
function rm(e, t, o) {
|
|
17546
17614
|
const s = e.get(t) ?? /* @__PURE__ */ new Set();
|
|
17547
17615
|
s.add(o), e.set(t, s);
|
|
17548
17616
|
}
|
|
@@ -17550,7 +17618,7 @@ function Di(e, t, o) {
|
|
|
17550
17618
|
const s = e.get(t);
|
|
17551
17619
|
s?.delete(o), s?.size === 0 && e.delete(t);
|
|
17552
17620
|
}
|
|
17553
|
-
function
|
|
17621
|
+
function Ag(e) {
|
|
17554
17622
|
const {
|
|
17555
17623
|
baseUrl: t,
|
|
17556
17624
|
token: o,
|
|
@@ -17561,7 +17629,7 @@ function Ig(e) {
|
|
|
17561
17629
|
sessionSourceType: i,
|
|
17562
17630
|
createSessionRequest: l,
|
|
17563
17631
|
maxQueued: p = 1024,
|
|
17564
|
-
maxBlocks: g =
|
|
17632
|
+
maxBlocks: g = tm,
|
|
17565
17633
|
maxRetainedBytes: h,
|
|
17566
17634
|
historyPageSize: b,
|
|
17567
17635
|
subagentTranscriptMode: A = "full",
|
|
@@ -17569,7 +17637,7 @@ function Ig(e) {
|
|
|
17569
17637
|
includeRawEvent: x = !1,
|
|
17570
17638
|
prefetchGitBranch: F = !0,
|
|
17571
17639
|
prefetchSkills: P = !0,
|
|
17572
|
-
autoConnect:
|
|
17640
|
+
autoConnect: N = !0,
|
|
17573
17641
|
autoReconnect: H = !0,
|
|
17574
17642
|
restartEventStreamOnPrompt: J = !1,
|
|
17575
17643
|
reconnectDelayMs: I = 1e3,
|
|
@@ -17578,7 +17646,7 @@ function Ig(e) {
|
|
|
17578
17646
|
heartbeatFailureThreshold: O = 3,
|
|
17579
17647
|
loadWarnings: ve,
|
|
17580
17648
|
children: V
|
|
17581
|
-
} = e, v =
|
|
17649
|
+
} = e, v = mu(), B = t ?? v?.baseUrl, U = o ?? v?.token, G = Ze(() => {
|
|
17582
17650
|
try {
|
|
17583
17651
|
return {
|
|
17584
17652
|
value: Ji(
|
|
@@ -17592,7 +17660,7 @@ function Ig(e) {
|
|
|
17592
17660
|
error: D instanceof Error ? D.message : String(D)
|
|
17593
17661
|
};
|
|
17594
17662
|
}
|
|
17595
|
-
}, [n, v?.workspaceCwd, s]), le =
|
|
17663
|
+
}, [n, v?.workspaceCwd, s]), le = am(
|
|
17596
17664
|
G.value
|
|
17597
17665
|
), oe = G.error, ae = le?.kind === "workspace" ? le.cwd : void 0, me = Y(
|
|
17598
17666
|
v?.capabilities
|
|
@@ -17602,7 +17670,7 @@ function Ig(e) {
|
|
|
17602
17670
|
Qe.current = v?.capabilities;
|
|
17603
17671
|
const Pe = Y(v?.getCapabilities);
|
|
17604
17672
|
Pe.current = v?.getCapabilities;
|
|
17605
|
-
const zt = Y(!1),
|
|
17673
|
+
const zt = Y(!1), Wt = Y(a).current, Me = Wt === void 0, Vt = Y(ae);
|
|
17606
17674
|
Vt.current = ae;
|
|
17607
17675
|
const bo = Y(i);
|
|
17608
17676
|
bo.current = i;
|
|
@@ -17618,7 +17686,7 @@ function Ig(e) {
|
|
|
17618
17686
|
/* @__PURE__ */ new WeakMap()
|
|
17619
17687
|
), Dt = Y(
|
|
17620
17688
|
/* @__PURE__ */ new WeakMap()
|
|
17621
|
-
),
|
|
17689
|
+
), Ne = Y({
|
|
17622
17690
|
hasMore: !1,
|
|
17623
17691
|
loading: !1,
|
|
17624
17692
|
capacityReached: !1,
|
|
@@ -17635,7 +17703,7 @@ function Ig(e) {
|
|
|
17635
17703
|
retainSubagentBlocks: A === "full",
|
|
17636
17704
|
onTruncation: (D) => {
|
|
17637
17705
|
if (D.kind !== "blocks") return;
|
|
17638
|
-
const T =
|
|
17706
|
+
const T = Ne.current, K = Z.current;
|
|
17639
17707
|
if (!(!K || T.sessionId !== K.sessionId)) {
|
|
17640
17708
|
if (D.evictedOldest !== !1)
|
|
17641
17709
|
if (T.persistedReachable = !0, D.oldestRetainedRecordId !== void 0) {
|
|
@@ -17681,13 +17749,13 @@ function Ig(e) {
|
|
|
17681
17749
|
}),
|
|
17682
17750
|
[g, h, A]
|
|
17683
17751
|
), Ke = Ze(
|
|
17684
|
-
() =>
|
|
17752
|
+
() => qp({
|
|
17685
17753
|
captureLiveBoundary: () => {
|
|
17686
|
-
const D =
|
|
17754
|
+
const D = Ne.current, T = Z.current, K = no.current, re = D.beforeRecordId, Oe = w.current;
|
|
17687
17755
|
return {
|
|
17688
17756
|
beforeRecordId: re,
|
|
17689
17757
|
reachable: !!T && T.sessionId === D.sessionId && !!re && !Oe && !D.loading && (D.persistedReachable ?? D.hasMore),
|
|
17690
|
-
isCurrent: () => Z.current === T &&
|
|
17758
|
+
isCurrent: () => Z.current === T && Ne.current === D && D.beforeRecordId === re && !D.loading && no.current === K && w.current === Oe
|
|
17691
17759
|
};
|
|
17692
17760
|
}
|
|
17693
17761
|
}),
|
|
@@ -17724,22 +17792,22 @@ function Ig(e) {
|
|
|
17724
17792
|
void 0
|
|
17725
17793
|
), L = Y(void 0), j = Y(void 0), R = Y(void 0), Q = Y(
|
|
17726
17794
|
void 0
|
|
17727
|
-
), ee = Y(!1),
|
|
17795
|
+
), ee = Y(!1), W = Y({
|
|
17728
17796
|
consecutiveFailures: 0
|
|
17729
|
-
}), q = Y(!1), ne = Y(void 0), se = Y(void 0), Ae = Y(void 0), ke = Y(/* @__PURE__ */ new WeakSet()), ct = Y({ suppressOwnUserEcho: $, includeRawEvent: x }), Lt = Y({ reconnectDelayMs: I, maxReconnectDelayMs: X }), xt = Y(void 0),
|
|
17730
|
-
ct.current = { suppressOwnUserEcho: $, includeRawEvent: x }, Lt.current = { reconnectDelayMs: I, maxReconnectDelayMs: X },
|
|
17797
|
+
}), q = Y(!1), ne = Y(void 0), se = Y(void 0), Ae = Y(void 0), ke = Y(/* @__PURE__ */ new WeakSet()), ct = Y({ suppressOwnUserEcho: $, includeRawEvent: x }), Lt = Y({ reconnectDelayMs: I, maxReconnectDelayMs: X }), xt = Y(void 0), Nt = Y(ve), St = Y(b), rt = Y(A), so = Y(Cs(r));
|
|
17798
|
+
ct.current = { suppressOwnUserEcho: $, includeRawEvent: x }, Lt.current = { reconnectDelayMs: I, maxReconnectDelayMs: X }, Nt.current = ve, St.current = b, rt.current = A;
|
|
17731
17799
|
const At = l?.modelServiceId, wn = l?.sessionScope, ao = Y(l);
|
|
17732
17800
|
ao.current = l;
|
|
17733
17801
|
const [kn, ce] = lt("idle"), [$e, tt] = lt(
|
|
17734
|
-
|
|
17802
|
+
Wt
|
|
17735
17803
|
), [yo, So] = lt(le), [ro, Ko] = lt("load"), [vn, bn] = lt(0), [Co, is] = lt(0), [Et, To] = lt(0), [Je, ye] = lt({
|
|
17736
17804
|
capabilities: v?.capabilities,
|
|
17737
|
-
status: oe ? "error" :
|
|
17738
|
-
...
|
|
17805
|
+
status: oe ? "error" : N ? "connecting" : "idle",
|
|
17806
|
+
...Wt ? { sessionId: Wt } : {},
|
|
17739
17807
|
...le ? { sessionContext: le } : {},
|
|
17740
17808
|
...ae ? { workspaceCwd: ae } : {},
|
|
17741
17809
|
...oe ? { error: oe } : {}
|
|
17742
|
-
}), Kt =
|
|
17810
|
+
}), Kt = Dp(
|
|
17743
17811
|
B,
|
|
17744
17812
|
Je
|
|
17745
17813
|
), Ee = Y(Je);
|
|
@@ -17778,7 +17846,7 @@ function Ig(e) {
|
|
|
17778
17846
|
clearNotices: ls
|
|
17779
17847
|
}),
|
|
17780
17848
|
[ls, Lo, pr]
|
|
17781
|
-
), [ec, mr] = lt(
|
|
17849
|
+
), [ec, mr] = lt(nm);
|
|
17782
17850
|
pt(() => {
|
|
17783
17851
|
let D = ge.getBlockChangeSummary?.();
|
|
17784
17852
|
const T = () => {
|
|
@@ -17846,7 +17914,7 @@ function Ig(e) {
|
|
|
17846
17914
|
};
|
|
17847
17915
|
},
|
|
17848
17916
|
[Bt, Lo]
|
|
17849
|
-
), hr = $n?.features.includes(
|
|
17917
|
+
), hr = $n?.features.includes(Op) ?? !1;
|
|
17850
17918
|
pt(() => {
|
|
17851
17919
|
const D = Z.current, T = Je.status === "connected" && D?.sessionId === Je.sessionId ? D : void 0;
|
|
17852
17920
|
Ke.configure({
|
|
@@ -17880,7 +17948,7 @@ function Ig(e) {
|
|
|
17880
17948
|
}), []);
|
|
17881
17949
|
const Js = Y(void 0), _n = yo ?? le;
|
|
17882
17950
|
pt(() => {
|
|
17883
|
-
if (!
|
|
17951
|
+
if (!N) return;
|
|
17884
17952
|
const D = JSON.stringify([
|
|
17885
17953
|
B,
|
|
17886
17954
|
$t(_n),
|
|
@@ -17937,7 +18005,7 @@ function Ig(e) {
|
|
|
17937
18005
|
for (const Ce of de) Ue.push(Ce);
|
|
17938
18006
|
ot === void 0 && (ot = setTimeout(
|
|
17939
18007
|
jt,
|
|
17940
|
-
|
|
18008
|
+
om
|
|
17941
18009
|
));
|
|
17942
18010
|
}
|
|
17943
18011
|
}, be = () => {
|
|
@@ -17951,7 +18019,7 @@ function Ig(e) {
|
|
|
17951
18019
|
}, On = () => {
|
|
17952
18020
|
if (K || T.signal.aborted) return;
|
|
17953
18021
|
const de = w.current;
|
|
17954
|
-
if (!de || de.attempted || !de.terminalSeen || f.current ||
|
|
18022
|
+
if (!de || de.attempted || !de.terminalSeen || f.current || Ne.current.loading || Z.current?.sessionId !== de.sessionId || Fo.current())
|
|
17955
18023
|
return;
|
|
17956
18024
|
const Ce = L.current;
|
|
17957
18025
|
if (!Ce) return;
|
|
@@ -17994,7 +18062,7 @@ function Ig(e) {
|
|
|
17994
18062
|
aa?.(), aa = void 0, Ot.current === Xo && (Ot.current = void 0);
|
|
17995
18063
|
};
|
|
17996
18064
|
try {
|
|
17997
|
-
let _e = !1, cs = !1, Uo = !1, xo = !1, qt, ft,
|
|
18065
|
+
let _e = !1, cs = !1, Uo = !1, xo = !1, qt, ft, We, Cn;
|
|
17998
18066
|
if (!Ce) {
|
|
17999
18067
|
const S = Z.current, fe = S !== void 0 && S === se.current && $e === S.sessionId && $t(_n) === $t(
|
|
18000
18068
|
Ae.current
|
|
@@ -18031,14 +18099,14 @@ function Ig(e) {
|
|
|
18031
18099
|
}
|
|
18032
18100
|
const Zt = ut?.kind === "workspace" || ut === void 0;
|
|
18033
18101
|
et.current = ut, _t.current = Ge;
|
|
18034
|
-
const Eo = Array.isArray(fe.features) ? fe.features : [], ht = Zt && Ge === fe.workspaceCwd && Eo.includes(
|
|
18035
|
-
|
|
18036
|
-
), lo =
|
|
18102
|
+
const Eo = Array.isArray(fe.features) ? fe.features : [], ht = Zt && Ge === fe.workspaceCwd && Eo.includes(Vp), Wo = ht && Eo.includes(Kp), No = Zt && Ge !== void 0 && Eo.includes(
|
|
18103
|
+
Qp
|
|
18104
|
+
), lo = No && Ge ? de.workspaceByCwd(Ge) : void 0;
|
|
18037
18105
|
if ((Me || q.current) && !$e && !He && !io) {
|
|
18038
18106
|
if (!Zt) {
|
|
18039
18107
|
let Tt;
|
|
18040
18108
|
if (ut?.kind === "standalone" && Eo.includes(
|
|
18041
|
-
|
|
18109
|
+
Nc
|
|
18042
18110
|
))
|
|
18043
18111
|
try {
|
|
18044
18112
|
Tt = await de.getStandaloneSessionOptions();
|
|
@@ -18076,7 +18144,7 @@ function Ig(e) {
|
|
|
18076
18144
|
const [Ve, co, dn, en] = await Promise.allSettled([
|
|
18077
18145
|
de.workspaceProviders(),
|
|
18078
18146
|
P ? lo ? lo.workspaceConfigSkills() : de.workspaceSkills() : Promise.resolve(void 0),
|
|
18079
|
-
P && !
|
|
18147
|
+
P && !No && Wo ? de.workspaceAcpStatus() : Promise.resolve(void 0),
|
|
18080
18148
|
F ? Ge ? de.workspaceByCwd(Ge).workspaceGit() : de.workspaceGit() : Promise.resolve(void 0)
|
|
18081
18149
|
]);
|
|
18082
18150
|
Ve.status === "rejected" && console.warn(
|
|
@@ -18085,7 +18153,7 @@ function Ig(e) {
|
|
|
18085
18153
|
), co.status === "rejected" && console.warn(
|
|
18086
18154
|
"[DaemonSessionProvider] workspaceSkills failed in deferred connect:",
|
|
18087
18155
|
co.reason
|
|
18088
|
-
),
|
|
18156
|
+
), Wo && dn.status === "rejected" && console.warn(
|
|
18089
18157
|
"[DaemonSessionProvider] workspaceAcpStatus failed in deferred connect:",
|
|
18090
18158
|
dn.reason
|
|
18091
18159
|
);
|
|
@@ -18112,7 +18180,7 @@ function Ig(e) {
|
|
|
18112
18180
|
skills: Dr ? Tt.skills : !P || co.status === "rejected" ? void 0 : yc
|
|
18113
18181
|
})), P && lo ? (async () => {
|
|
18114
18182
|
try {
|
|
18115
|
-
const Tt = await lo.ensureRuntime(), Bo = await
|
|
18183
|
+
const Tt = await lo.ensureRuntime(), Bo = await gu(
|
|
18116
18184
|
lo,
|
|
18117
18185
|
Tt,
|
|
18118
18186
|
() => K || T.signal.aborted || Ee.current.sessionId !== void 0
|
|
@@ -18295,7 +18363,7 @@ function Ig(e) {
|
|
|
18295
18363
|
}
|
|
18296
18364
|
return;
|
|
18297
18365
|
}
|
|
18298
|
-
|
|
18366
|
+
We = Ve, Cn = dn;
|
|
18299
18367
|
}
|
|
18300
18368
|
const In = Oo.current;
|
|
18301
18369
|
In !== he.sessionId && ls(), In !== void 0 && he.sessionId !== In ? (ce("idle"), Xe(R), Uo = !0) : In !== void 0 && (he.replaySnapshot.compactedReplay.length + he.replaySnapshot.liveJournal.length > 0 ? (Sn(he) && ce("idle"), Xe(R), Uo = !0) : (ge.dispatch({
|
|
@@ -18364,14 +18432,14 @@ function Ig(e) {
|
|
|
18364
18432
|
events: da ? [...Zo, ...da] : Zo,
|
|
18365
18433
|
incomplete: rc === !0 || St.current !== void 0 && da === void 0 || M.replayDegraded === !0 || M.replayPartial === !0 || M.historyHasMore === !0 || !M.replaySnapshotComplete
|
|
18366
18434
|
});
|
|
18367
|
-
const ps =
|
|
18368
|
-
(S) => S.id ===
|
|
18435
|
+
const ps = We?.markerBlockId !== void 0 && ge.getSnapshot().blocks.some(
|
|
18436
|
+
(S) => S.id === We?.markerBlockId
|
|
18369
18437
|
), Fn = Zo.filter((S) => S.type === "session_update").map(Fa).find((S) => S !== void 0) ?? Zo.filter((S) => S.type === "history_truncated").map(Fa).find((S) => S !== void 0) ?? M.historyAnchorRecordId, ic = Zo.some(
|
|
18370
18438
|
Ll
|
|
18371
|
-
), ms =
|
|
18439
|
+
), ms = We ? Ne.current.hasMore : Array.isArray(vt?.features) && vt.features.includes(
|
|
18372
18440
|
Gn
|
|
18373
18441
|
) && (M.historyHasMore || ic) && Fn !== void 0, Un = cs && Zo.length > 0;
|
|
18374
|
-
if (!
|
|
18442
|
+
if (!We && (Un || Ne.current.sessionId !== M.sessionId) ? (Ne.current = {
|
|
18375
18443
|
sessionId: M.sessionId,
|
|
18376
18444
|
...Fn !== void 0 ? { beforeRecordId: Fn } : {},
|
|
18377
18445
|
hasMore: ms,
|
|
@@ -18384,20 +18452,20 @@ function Ig(e) {
|
|
|
18384
18452
|
loading: !1,
|
|
18385
18453
|
capacityReached: !1,
|
|
18386
18454
|
paginationError: !1
|
|
18387
|
-
})) :
|
|
18455
|
+
})) : We && !ps && Fn !== void 0 && (Ne.current.beforeRecordId = Fn, Ne.current.cursor = void 0), Uo && !Un && ge.reset(), Un) {
|
|
18388
18456
|
const S = {
|
|
18389
18457
|
...ct.current,
|
|
18390
18458
|
suppressOwnUserEcho: !1
|
|
18391
|
-
}, fe =
|
|
18459
|
+
}, fe = We && Cn && ps ? Cn.events : Zo, nt = Cd(
|
|
18392
18460
|
M.sessionId,
|
|
18393
18461
|
ca,
|
|
18394
18462
|
M.lastEventId,
|
|
18395
18463
|
M.replayDegraded
|
|
18396
18464
|
), st = nt ? fe.indexOf(nt.marker) : -1, ut = [], Ge = [];
|
|
18397
18465
|
for (const we of fe) {
|
|
18398
|
-
const Fe =
|
|
18466
|
+
const Fe = We !== void 0 && we.id !== void 0 && !We.observedSnapshotEventIds.has(
|
|
18399
18467
|
we.id
|
|
18400
|
-
) && !(we.id >
|
|
18468
|
+
) && !(we.id > We.snapshotLastEventId && we.id <= We.lastObservedEventId);
|
|
18401
18469
|
try {
|
|
18402
18470
|
const Pt = $s(
|
|
18403
18471
|
we,
|
|
@@ -18405,8 +18473,8 @@ function Ig(e) {
|
|
|
18405
18473
|
S,
|
|
18406
18474
|
ye,
|
|
18407
18475
|
{
|
|
18408
|
-
updateConnection:
|
|
18409
|
-
suppressLog:
|
|
18476
|
+
updateConnection: We !== void 0 && Fe,
|
|
18477
|
+
suppressLog: We !== void 0 && !Fe
|
|
18410
18478
|
}
|
|
18411
18479
|
), Qt = Ms(
|
|
18412
18480
|
we,
|
|
@@ -18415,7 +18483,7 @@ function Ig(e) {
|
|
|
18415
18483
|
Lo,
|
|
18416
18484
|
{
|
|
18417
18485
|
hideHistoryTruncation: ms,
|
|
18418
|
-
suppressSideEffects:
|
|
18486
|
+
suppressSideEffects: We !== void 0 && !Fe
|
|
18419
18487
|
}
|
|
18420
18488
|
), Yt = rt.current === "summary" ? Ps(Qt) : Qt, ze = [...Yt];
|
|
18421
18489
|
if (we.type === "turn_complete") {
|
|
@@ -18428,7 +18496,7 @@ function Ig(e) {
|
|
|
18428
18496
|
);
|
|
18429
18497
|
if (ut.push(we), Ge.push({
|
|
18430
18498
|
transcript: ze,
|
|
18431
|
-
sideEffects:
|
|
18499
|
+
sideEffects: We === void 0 ? Yt : Fe ? Pt : []
|
|
18432
18500
|
}), Fe) {
|
|
18433
18501
|
const ie = ri(we);
|
|
18434
18502
|
ie && ai(ie);
|
|
@@ -18437,7 +18505,7 @@ function Ig(e) {
|
|
|
18437
18505
|
}
|
|
18438
18506
|
} catch (Pt) {
|
|
18439
18507
|
const Qt = Pt instanceof Error ? Pt.message : String(Pt);
|
|
18440
|
-
(
|
|
18508
|
+
(We === void 0 || Fe) && (Bt({
|
|
18441
18509
|
severity: "warning",
|
|
18442
18510
|
category: "protocol",
|
|
18443
18511
|
operation: "normalize_event",
|
|
@@ -18454,13 +18522,13 @@ function Ig(e) {
|
|
|
18454
18522
|
const Zt = Ge.flatMap(
|
|
18455
18523
|
(we) => we.transcript
|
|
18456
18524
|
);
|
|
18457
|
-
let Eo = !1, ht = !1,
|
|
18458
|
-
if (
|
|
18459
|
-
const we =
|
|
18525
|
+
let Eo = !1, ht = !1, Wo;
|
|
18526
|
+
if (We !== void 0 || nt !== void 0 || Uo || ge.getSnapshot().blocks.length === 0) {
|
|
18527
|
+
const we = We && ps ? We.checkpoint.maxBlocks : g, Fe = (ie) => {
|
|
18460
18528
|
ie.kind === "blocks" && ie.evictedOldest !== !1 && (ht = !0);
|
|
18461
18529
|
}, Pt = Vn(
|
|
18462
|
-
|
|
18463
|
-
...
|
|
18530
|
+
We && ps ? {
|
|
18531
|
+
...We.checkpoint,
|
|
18464
18532
|
maxBlocks: we,
|
|
18465
18533
|
onTruncation: Fe
|
|
18466
18534
|
} : {
|
|
@@ -18476,13 +18544,13 @@ function Ig(e) {
|
|
|
18476
18544
|
}
|
|
18477
18545
|
);
|
|
18478
18546
|
let Qt;
|
|
18479
|
-
if (st < 0 &&
|
|
18547
|
+
if (st < 0 && We === void 0)
|
|
18480
18548
|
Pt.dispatch(Zt);
|
|
18481
18549
|
else
|
|
18482
18550
|
for (const [ie, Re] of Ge.entries())
|
|
18483
18551
|
ie === st && (Qt = Pt.getSnapshot()), Pt.dispatch(Re.transcript);
|
|
18484
18552
|
const Yt = Pt.getSnapshot();
|
|
18485
|
-
Eo = ht || Yt.blocks.length >= we, Eo && (
|
|
18553
|
+
Eo = ht || Yt.blocks.length >= we, Eo && (Wo = Yt.blocks.find(
|
|
18486
18554
|
(ie) => (ie.sourceRecordIds?.length ?? 0) > 0
|
|
18487
18555
|
)?.sourceRecordIds?.[0]);
|
|
18488
18556
|
const ze = we;
|
|
@@ -18511,7 +18579,7 @@ function Ig(e) {
|
|
|
18511
18579
|
terminalSeen: !1,
|
|
18512
18580
|
attempted: !1
|
|
18513
18581
|
};
|
|
18514
|
-
} else
|
|
18582
|
+
} else We && (w.current = void 0);
|
|
18515
18583
|
} else Zt.length > 0 && ge.dispatch(Zt);
|
|
18516
18584
|
const lo = Ge.flatMap(
|
|
18517
18585
|
(we) => we.sideEffects
|
|
@@ -18522,11 +18590,11 @@ function Ig(e) {
|
|
|
18522
18590
|
Ft ? M.workspaceCwd : void 0,
|
|
18523
18591
|
!1
|
|
18524
18592
|
), Eo) {
|
|
18525
|
-
|
|
18593
|
+
Ne.current.persistedReachable = !0, ht && (Wo !== void 0 ? Ne.current.beforeRecordId = Wo : Ne.current.beforeRecordId = void 0, Ne.current.cursor = void 0);
|
|
18526
18594
|
const we = ge.getSnapshot(), Fe = Array.isArray(vt?.features) && vt.features.includes(
|
|
18527
18595
|
Gn
|
|
18528
|
-
) &&
|
|
18529
|
-
|
|
18596
|
+
) && Ne.current.beforeRecordId !== void 0 && we.retainedBytes < we.maxRetainedBytes;
|
|
18597
|
+
Ne.current.hasMore = Fe, Ne.current.capacityReached = !0, mt({
|
|
18530
18598
|
hasMore: Fe,
|
|
18531
18599
|
loading: !1,
|
|
18532
18600
|
capacityReached: !0,
|
|
@@ -18613,12 +18681,12 @@ function Ig(e) {
|
|
|
18613
18681
|
if (K || T.signal.aborted || Z.current !== M)
|
|
18614
18682
|
return;
|
|
18615
18683
|
const Ar = pa?.status === "fulfilled" ? pa.value : void 0, hs = ma?.status === "fulfilled" ? ma.value : void 0, Rt = ga?.status === "fulfilled" ? ga.value : void 0, uc = ha?.status === "fulfilled" ? ha.value?.branch ?? void 0 : void 0, pc = fa === void 0 && gs === void 0 ? { v: 2, goal: null, activity: "idle" } : void 0, Er = [
|
|
18616
|
-
pa?.status === "rejected" ?
|
|
18617
|
-
ma?.status === "rejected" ?
|
|
18618
|
-
ga?.status === "rejected" ?
|
|
18619
|
-
].filter((S) => !!S), Tn = Ls(Ar),
|
|
18684
|
+
pa?.status === "rejected" ? Nt.current?.models : void 0,
|
|
18685
|
+
ma?.status === "rejected" ? Nt.current?.commands : void 0,
|
|
18686
|
+
ga?.status === "rejected" ? Nt.current?.context : void 0
|
|
18687
|
+
].filter((S) => !!S), Tn = Ls(Ar), Wn = Kc(Rt), wa = Wn && Wn.models.length > 0 ? Wn.models : Tn.models, fs = Wn?.currentModel ?? Tn.currentModel, mc = fs === Tn.currentModel ? Tn.contextWindow : Tn.models.find(
|
|
18620
18688
|
(S) => S.id === fs
|
|
18621
|
-
)?.contextWindow, gc =
|
|
18689
|
+
)?.contextWindow, gc = Wn?.contextWindow ?? wa.find((S) => S.id === fs)?.contextWindow ?? mc, { commands: hc, skills: fc } = ja(hs), Rr = zi(Rt);
|
|
18622
18690
|
if (ye((S) => {
|
|
18623
18691
|
if (T.signal.aborted || Z.current !== void 0 && Z.current !== M || S.sessionId !== M.sessionId)
|
|
18624
18692
|
return S;
|
|
@@ -18684,7 +18752,7 @@ function Ig(e) {
|
|
|
18684
18752
|
)
|
|
18685
18753
|
};
|
|
18686
18754
|
}), Er.length > 0) {
|
|
18687
|
-
const S =
|
|
18755
|
+
const S = We ? new Set(
|
|
18688
18756
|
ge.getSnapshot().blocks.flatMap(
|
|
18689
18757
|
(st) => st.kind === "status" ? [st.text] : []
|
|
18690
18758
|
)
|
|
@@ -18821,7 +18889,7 @@ function Ig(e) {
|
|
|
18821
18889
|
}
|
|
18822
18890
|
);
|
|
18823
18891
|
}
|
|
18824
|
-
const
|
|
18892
|
+
const Wo = rt.current === "summary" ? Ps(ht) : ht;
|
|
18825
18893
|
if (S.type === "state_resync_required" && (typeof S.data == "object" && S.data !== null ? S.data.reason : void 0) === "epoch_reset") {
|
|
18826
18894
|
wc();
|
|
18827
18895
|
break;
|
|
@@ -18836,7 +18904,7 @@ function Ig(e) {
|
|
|
18836
18904
|
(Re) => Re === "waiting" || Re === "idle" && ie ? "streaming" : Re
|
|
18837
18905
|
);
|
|
18838
18906
|
}
|
|
18839
|
-
const
|
|
18907
|
+
const No = w.current, lo = No?.sessionId === M.sessionId && (S.type === "turn_complete" || S.type === "turn_error") && on(S) === No.target.promptId;
|
|
18840
18908
|
(S.type === "turn_complete" || S.type === "turn_error") && be();
|
|
18841
18909
|
const we = !ut && !Zt && Ua(
|
|
18842
18910
|
Ye.current,
|
|
@@ -18862,9 +18930,9 @@ function Ig(e) {
|
|
|
18862
18930
|
(ie) => ie.type === "debug" && !Lr(ie.debugReason)
|
|
18863
18931
|
);
|
|
18864
18932
|
!Ao() && Pt && be();
|
|
18865
|
-
const Yt = !Ao() && ge.getSnapshot().activeAssistantBlockId != null ?
|
|
18933
|
+
const Yt = !Ao() && ge.getSnapshot().activeAssistantBlockId != null ? Wo.filter(
|
|
18866
18934
|
(ie) => ie.type !== "debug" || Lr(ie.debugReason)
|
|
18867
|
-
) :
|
|
18935
|
+
) : Wo;
|
|
18868
18936
|
qe(Yt);
|
|
18869
18937
|
for (const ie of ht)
|
|
18870
18938
|
if (S.type === "prompt_cancelled" && ie.type === "prompt.cancelled" && (cn || ie.originatorClientId !== M.clientId)) {
|
|
@@ -18913,7 +18981,7 @@ function Ig(e) {
|
|
|
18913
18981
|
);
|
|
18914
18982
|
ie && !lo && y(ie);
|
|
18915
18983
|
}
|
|
18916
|
-
if (lo &&
|
|
18984
|
+
if (lo && No ? (No.terminalSeen = !0, queueMicrotask(On)) : No?.terminalSeen && queueMicrotask(On), S.type === "state_resync_required" && (typeof S.data == "object" && S.data !== null ? S.data.reason : void 0) !== "epoch_reset") {
|
|
18917
18985
|
Sn() && (ce("idle"), Xe(
|
|
18918
18986
|
R
|
|
18919
18987
|
)), Ct(), ge.reset(), console.warn(
|
|
@@ -19042,7 +19110,7 @@ function Ig(e) {
|
|
|
19042
19110
|
}
|
|
19043
19111
|
})), Ln) {
|
|
19044
19112
|
Ln = !1, q.current = !0;
|
|
19045
|
-
const Be = _e instanceof
|
|
19113
|
+
const Be = _e instanceof Wi;
|
|
19046
19114
|
ye((gt) => ({
|
|
19047
19115
|
...mn(
|
|
19048
19116
|
gt,
|
|
@@ -19070,18 +19138,18 @@ function Ig(e) {
|
|
|
19070
19138
|
}));
|
|
19071
19139
|
return;
|
|
19072
19140
|
}
|
|
19073
|
-
const ft = f.current,
|
|
19141
|
+
const ft = f.current, We = ft === void 0 || Ta(
|
|
19074
19142
|
ft.sessionContext,
|
|
19075
19143
|
et.current
|
|
19076
|
-
), Cn =
|
|
19077
|
-
if (!Uo && H && Io && (Cn !== void 0 && M || ft?.sessionId === $e &&
|
|
19144
|
+
), Cn = Cm(_e), M = We && (ft === void 0 || ft.sessionId === $e);
|
|
19145
|
+
if (!Uo && H && Io && (Cn !== void 0 && M || ft?.sessionId === $e && We && Sm(
|
|
19078
19146
|
_e,
|
|
19079
19147
|
!vt?.features.includes(La)
|
|
19080
19148
|
))) {
|
|
19081
19149
|
Xt += 1;
|
|
19082
19150
|
const Be = Lt.current;
|
|
19083
19151
|
if (await Br(
|
|
19084
|
-
Cn ??
|
|
19152
|
+
Cn ?? Nr(
|
|
19085
19153
|
Xt,
|
|
19086
19154
|
Be.reconnectDelayMs,
|
|
19087
19155
|
Be.maxReconnectDelayMs
|
|
@@ -19091,8 +19159,8 @@ function Ig(e) {
|
|
|
19091
19159
|
return;
|
|
19092
19160
|
continue;
|
|
19093
19161
|
}
|
|
19094
|
-
const ln = Ce?.sessionId ?? He ?? m.current, bt =
|
|
19095
|
-
if (ln && (bt || Ft) && (c.current.delete(ln), m.current === ln && (m.current = void 0), Ye.current.get(ln)?.controller.abort(), Ye.current.delete(ln)), Xe(R), (bt || Ft || Sn()) && ce("idle"), ft &&
|
|
19162
|
+
const ln = Ce?.sessionId ?? He ?? m.current, bt = ym(_e), Ft = bm(_e);
|
|
19163
|
+
if (ln && (bt || Ft) && (c.current.delete(ln), m.current === ln && (m.current = void 0), Ye.current.get(ln)?.controller.abort(), Ye.current.delete(ln)), Xe(R), (bt || Ft || Sn()) && ce("idle"), ft && We && (ft.sessionId === $e || ft.sessionId === He) && (ne.current?.sessionId === ft.sessionId && (ne.current = void 0), f.current = void 0, ft.timeout !== void 0 && clearTimeout(ft.timeout), ft.reject(_e)), Uo || Ce === void 0 && et.current?.kind === "standalone" && cd(Ho(_e)) || oa || _e instanceof va || Ce === void 0 && et.current?.kind !== "workspace" && et.current !== void 0 && dd(_e)) {
|
|
19096
19164
|
const Be = $e ?? He;
|
|
19097
19165
|
ye((gt) => ({
|
|
19098
19166
|
...gt,
|
|
@@ -19230,7 +19298,7 @@ function Ig(e) {
|
|
|
19230
19298
|
return;
|
|
19231
19299
|
}
|
|
19232
19300
|
Xt += 1;
|
|
19233
|
-
const Sr = Lt.current, sc =
|
|
19301
|
+
const Sr = Lt.current, sc = Nr(
|
|
19234
19302
|
Xt,
|
|
19235
19303
|
Sr.reconnectDelayMs,
|
|
19236
19304
|
Sr.maxReconnectDelayMs
|
|
@@ -19263,7 +19331,7 @@ function Ig(e) {
|
|
|
19263
19331
|
), Ce && (!He || io) && (Z.current = void 0);
|
|
19264
19332
|
};
|
|
19265
19333
|
}, [
|
|
19266
|
-
|
|
19334
|
+
N,
|
|
19267
19335
|
H,
|
|
19268
19336
|
F,
|
|
19269
19337
|
P,
|
|
@@ -19300,13 +19368,13 @@ function Ig(e) {
|
|
|
19300
19368
|
const T = setInterval(() => {
|
|
19301
19369
|
const K = Z.current;
|
|
19302
19370
|
if (!K) return;
|
|
19303
|
-
|
|
19371
|
+
W.current.session !== K && (W.current = {
|
|
19304
19372
|
session: K,
|
|
19305
19373
|
consecutiveFailures: 0
|
|
19306
19374
|
});
|
|
19307
|
-
const re =
|
|
19375
|
+
const re = W.current;
|
|
19308
19376
|
K.heartbeat().then(() => {
|
|
19309
|
-
D || Z.current !== K ||
|
|
19377
|
+
D || Z.current !== K || W.current !== re || (re.consecutiveFailures >= O && ye(
|
|
19310
19378
|
(Oe) => Oe.sessionId === K.sessionId ? {
|
|
19311
19379
|
...Oe,
|
|
19312
19380
|
status: "connected",
|
|
@@ -19315,7 +19383,7 @@ function Ig(e) {
|
|
|
19315
19383
|
} : Oe
|
|
19316
19384
|
), re.consecutiveFailures = 0, re.lastHttpError = void 0);
|
|
19317
19385
|
}).catch((Oe) => {
|
|
19318
|
-
if (D || Z.current !== K ||
|
|
19386
|
+
if (D || Z.current !== K || W.current !== re)
|
|
19319
19387
|
return;
|
|
19320
19388
|
re.consecutiveFailures += 1;
|
|
19321
19389
|
const Se = Oe instanceof Error ? Oe.message : "Session heartbeat failed", Ue = Gt(Oe);
|
|
@@ -19489,7 +19557,7 @@ function Ig(e) {
|
|
|
19489
19557
|
w.current?.controller?.abort(), w.current = void 0;
|
|
19490
19558
|
},
|
|
19491
19559
|
onPromptAdmitted: (D, T) => {
|
|
19492
|
-
|
|
19560
|
+
rm(
|
|
19493
19561
|
c.current,
|
|
19494
19562
|
D.sessionId,
|
|
19495
19563
|
T.promptId
|
|
@@ -19523,7 +19591,7 @@ function Ig(e) {
|
|
|
19523
19591
|
}, [kn]);
|
|
19524
19592
|
const wr = pe(
|
|
19525
19593
|
async (D) => {
|
|
19526
|
-
const T =
|
|
19594
|
+
const T = Ne.current, K = Z.current;
|
|
19527
19595
|
if (T.loading || !K || K.sessionId !== T.sessionId)
|
|
19528
19596
|
return;
|
|
19529
19597
|
if (T.paginationError) {
|
|
@@ -19547,7 +19615,7 @@ function Ig(e) {
|
|
|
19547
19615
|
limit: St.current ?? 100,
|
|
19548
19616
|
clientId: K.clientId
|
|
19549
19617
|
});
|
|
19550
|
-
if (Z.current !== K ||
|
|
19618
|
+
if (Z.current !== K || Ne.current !== T)
|
|
19551
19619
|
return;
|
|
19552
19620
|
if (no.current !== re) {
|
|
19553
19621
|
T.loading = !1, mt({
|
|
@@ -19598,7 +19666,7 @@ function Ig(e) {
|
|
|
19598
19666
|
Ct
|
|
19599
19667
|
);
|
|
19600
19668
|
}
|
|
19601
|
-
const it = jt.length > 0 ?
|
|
19669
|
+
const it = jt.length > 0 ? Xp(
|
|
19602
19670
|
ge.getSnapshot(),
|
|
19603
19671
|
jt,
|
|
19604
19672
|
g
|
|
@@ -19638,7 +19706,7 @@ function Ig(e) {
|
|
|
19638
19706
|
paginationError: !1
|
|
19639
19707
|
});
|
|
19640
19708
|
} catch (Se) {
|
|
19641
|
-
if (Z.current !== K ||
|
|
19709
|
+
if (Z.current !== K || Ne.current !== T)
|
|
19642
19710
|
return;
|
|
19643
19711
|
if (no.current !== re) {
|
|
19644
19712
|
T.loading = !1, mt({
|
|
@@ -19670,7 +19738,7 @@ function Ig(e) {
|
|
|
19670
19738
|
},
|
|
19671
19739
|
[Bt, Lo, g, ge]
|
|
19672
19740
|
), tc = Ze(() => {
|
|
19673
|
-
const D = Je.sessionId ===
|
|
19741
|
+
const D = Je.sessionId === Ne.current.sessionId && Z.current?.sessionId === Ne.current.sessionId;
|
|
19674
19742
|
return {
|
|
19675
19743
|
hasMore: D && oo.hasMore,
|
|
19676
19744
|
loading: D && oo.loading,
|
|
@@ -19678,7 +19746,7 @@ function Ig(e) {
|
|
|
19678
19746
|
paginationError: D && oo.paginationError,
|
|
19679
19747
|
loadMore: wr
|
|
19680
19748
|
};
|
|
19681
|
-
}, [Je.sessionId, wr, oo]), Zs = Y(
|
|
19749
|
+
}, [Je.sessionId, wr, oo]), Zs = Y(sm), ea = Y(void 0), ta = Y(void 0);
|
|
19682
19750
|
pt(() => {
|
|
19683
19751
|
if (oe) return;
|
|
19684
19752
|
const D = le ?? // A failed controlled load leaves the target's workspace on the
|
|
@@ -19736,7 +19804,7 @@ function Ig(e) {
|
|
|
19736
19804
|
}
|
|
19737
19805
|
};
|
|
19738
19806
|
}, [kr, Je.sessionId]);
|
|
19739
|
-
return /* @__PURE__ */ Ht(al.Provider, { value: yt, children: /* @__PURE__ */ Ht(Ed.Provider, { value: nc, children: /* @__PURE__ */ Ht(Ul.Provider, { value: ge, children: /* @__PURE__ */ Ht(Bl.Provider, { value: Ke, children: /* @__PURE__ */ Ht(
|
|
19807
|
+
return /* @__PURE__ */ Ht(al.Provider, { value: yt, children: /* @__PURE__ */ Ht(Ed.Provider, { value: nc, children: /* @__PURE__ */ Ht(Ul.Provider, { value: ge, children: /* @__PURE__ */ Ht(Bl.Provider, { value: Ke, children: /* @__PURE__ */ Ht(Wl.Provider, { value: Je, children: /* @__PURE__ */ Ht(jl.Provider, { value: kn, children: /* @__PURE__ */ Ht(Hl.Provider, { value: Zl, children: /* @__PURE__ */ Ht(
|
|
19740
19808
|
Gl.Provider,
|
|
19741
19809
|
{
|
|
19742
19810
|
value: ec,
|
|
@@ -19745,7 +19813,7 @@ function Ig(e) {
|
|
|
19745
19813
|
{
|
|
19746
19814
|
value: oc,
|
|
19747
19815
|
children: /* @__PURE__ */ Ht(
|
|
19748
|
-
|
|
19816
|
+
Nl.Provider,
|
|
19749
19817
|
{
|
|
19750
19818
|
value: tc,
|
|
19751
19819
|
children: /* @__PURE__ */ Ht(
|
|
@@ -19827,17 +19895,17 @@ function Ua(e, t, o, s, n, a, r, i = {}) {
|
|
|
19827
19895
|
}
|
|
19828
19896
|
return !0;
|
|
19829
19897
|
}
|
|
19830
|
-
function
|
|
19898
|
+
function im(e) {
|
|
19831
19899
|
return e.type === "turn_complete";
|
|
19832
19900
|
}
|
|
19833
19901
|
function $s(e, t, o, s, n = {}) {
|
|
19834
|
-
n.suppressLog ||
|
|
19902
|
+
n.suppressLog || lm(e), n.updateConnection !== !1 && Qc(e, s);
|
|
19835
19903
|
const a = Uc(e, {
|
|
19836
19904
|
clientId: t,
|
|
19837
19905
|
suppressOwnUserEcho: o.suppressOwnUserEcho,
|
|
19838
19906
|
includeRawEvent: o.includeRawEvent
|
|
19839
|
-
}), r =
|
|
19840
|
-
if (
|
|
19907
|
+
}), r = fm(e);
|
|
19908
|
+
if (im(e)) {
|
|
19841
19909
|
const i = a.filter(
|
|
19842
19910
|
(l) => l.type === "prompt.cancelled"
|
|
19843
19911
|
);
|
|
@@ -19845,20 +19913,20 @@ function $s(e, t, o, s, n = {}) {
|
|
|
19845
19913
|
}
|
|
19846
19914
|
return r ? [...a, r] : a;
|
|
19847
19915
|
}
|
|
19848
|
-
function
|
|
19916
|
+
function lm(e) {
|
|
19849
19917
|
e.type === "settings_reloaded" && console.debug(
|
|
19850
19918
|
"[DaemonSessionProvider] settings reloaded:",
|
|
19851
|
-
|
|
19919
|
+
cm(e)
|
|
19852
19920
|
);
|
|
19853
19921
|
}
|
|
19854
|
-
function
|
|
19922
|
+
function cm(e) {
|
|
19855
19923
|
const t = {};
|
|
19856
19924
|
if (e.id !== void 0 && (t.eventId = e.id), !Ie(e.data))
|
|
19857
19925
|
return t.payload = "non-object", t;
|
|
19858
|
-
const o =
|
|
19926
|
+
const o = dm(e.data.env), s = ts(e.data.changedKeys), n = ts(e.data.sessionsRefreshed), a = ts(e.data.sessionsSkipped), r = e.data.childReloaded, i = Mo(e.data, "childError");
|
|
19859
19927
|
return o && (t.env = o), s && (t.changedKeys = s), typeof r == "boolean" && (t.childReloaded = r), n && (t.sessionsRefreshed = n), a && (t.sessionsSkipped = a), i && (t.childError = i), t;
|
|
19860
19928
|
}
|
|
19861
|
-
function
|
|
19929
|
+
function dm(e) {
|
|
19862
19930
|
if (Ie(e))
|
|
19863
19931
|
return {
|
|
19864
19932
|
updatedKeys: ts(e.updatedKeys) ?? [],
|
|
@@ -19870,7 +19938,7 @@ function ts(e) {
|
|
|
19870
19938
|
return e.filter((t) => typeof t == "string");
|
|
19871
19939
|
}
|
|
19872
19940
|
function Ms(e, t, o, s, n = {}) {
|
|
19873
|
-
if (n.hideHistoryTruncation &&
|
|
19941
|
+
if (n.hideHistoryTruncation && Jp(e))
|
|
19874
19942
|
return [];
|
|
19875
19943
|
if (!n.suppressSideEffects && e.type === "session_snapshot" && Ie(e.data) && e.data.recordingDegraded === !1) {
|
|
19876
19944
|
const r = Mo(e.data, "sessionId");
|
|
@@ -19888,13 +19956,13 @@ function Ms(e, t, o, s, n = {}) {
|
|
|
19888
19956
|
}
|
|
19889
19957
|
if (n.suppressSideEffects) continue;
|
|
19890
19958
|
const i = o(
|
|
19891
|
-
|
|
19959
|
+
um(e, r)
|
|
19892
19960
|
);
|
|
19893
19961
|
(i.category === "protocol" || i.category === "connection") && console.warn("[DaemonSessionProvider] daemon notice:", i);
|
|
19894
19962
|
}
|
|
19895
19963
|
return a;
|
|
19896
19964
|
}
|
|
19897
|
-
function
|
|
19965
|
+
function um(e, t) {
|
|
19898
19966
|
const o = {
|
|
19899
19967
|
message: t.text,
|
|
19900
19968
|
debugMessage: t.text,
|
|
@@ -19955,12 +20023,12 @@ function cm(e, t) {
|
|
|
19955
20023
|
};
|
|
19956
20024
|
}
|
|
19957
20025
|
}
|
|
19958
|
-
function
|
|
20026
|
+
function Eg() {
|
|
19959
20027
|
return {
|
|
19960
20028
|
store: rs(),
|
|
19961
20029
|
connection: Ql(),
|
|
19962
20030
|
promptStatus: Kl(),
|
|
19963
|
-
actions:
|
|
20031
|
+
actions: gm()
|
|
19964
20032
|
};
|
|
19965
20033
|
}
|
|
19966
20034
|
function rs() {
|
|
@@ -19971,18 +20039,18 @@ function rs() {
|
|
|
19971
20039
|
);
|
|
19972
20040
|
return e;
|
|
19973
20041
|
}
|
|
19974
|
-
function
|
|
19975
|
-
const e = Mt(
|
|
20042
|
+
function Rg() {
|
|
20043
|
+
const e = Mt(Nl);
|
|
19976
20044
|
if (!e)
|
|
19977
20045
|
throw new Error(
|
|
19978
20046
|
"useDaemonTranscriptHistory must be used within DaemonSessionProvider"
|
|
19979
20047
|
);
|
|
19980
20048
|
return e;
|
|
19981
20049
|
}
|
|
19982
|
-
function
|
|
19983
|
-
return
|
|
20050
|
+
function pm() {
|
|
20051
|
+
return mm();
|
|
19984
20052
|
}
|
|
19985
|
-
function
|
|
20053
|
+
function mm() {
|
|
19986
20054
|
const e = Mt(Bl);
|
|
19987
20055
|
if (!e)
|
|
19988
20056
|
throw new Error(
|
|
@@ -19990,15 +20058,15 @@ function um() {
|
|
|
19990
20058
|
);
|
|
19991
20059
|
return e;
|
|
19992
20060
|
}
|
|
19993
|
-
function
|
|
19994
|
-
const e =
|
|
20061
|
+
function Pg() {
|
|
20062
|
+
const e = pm();
|
|
19995
20063
|
return an(
|
|
19996
20064
|
e.subscribe,
|
|
19997
20065
|
e.getSnapshot,
|
|
19998
20066
|
e.getSnapshot
|
|
19999
20067
|
);
|
|
20000
20068
|
}
|
|
20001
|
-
function
|
|
20069
|
+
function $g() {
|
|
20002
20070
|
const e = rs();
|
|
20003
20071
|
return an(
|
|
20004
20072
|
e.subscribe,
|
|
@@ -20010,17 +20078,17 @@ function Vl() {
|
|
|
20010
20078
|
const e = rs(), t = pe(() => e.getSnapshot().blocks, [e]);
|
|
20011
20079
|
return an(e.subscribe, t, t);
|
|
20012
20080
|
}
|
|
20013
|
-
function
|
|
20081
|
+
function Mg() {
|
|
20014
20082
|
const e = Vl();
|
|
20015
|
-
return Ze(() =>
|
|
20083
|
+
return Ze(() => hu(e), [e]);
|
|
20016
20084
|
}
|
|
20017
|
-
function
|
|
20085
|
+
function _g() {
|
|
20018
20086
|
const e = Vl();
|
|
20019
|
-
return Ze(() =>
|
|
20087
|
+
return Ze(() => ku(e), [e]);
|
|
20020
20088
|
}
|
|
20021
|
-
function
|
|
20089
|
+
function Dg() {
|
|
20022
20090
|
const e = rs(), t = Kl(), o = pe(
|
|
20023
|
-
() =>
|
|
20091
|
+
() => Su(e.getSnapshot().blocks, t),
|
|
20024
20092
|
[t, e]
|
|
20025
20093
|
);
|
|
20026
20094
|
return an(
|
|
@@ -20029,7 +20097,7 @@ function Mg() {
|
|
|
20029
20097
|
o
|
|
20030
20098
|
);
|
|
20031
20099
|
}
|
|
20032
|
-
function
|
|
20100
|
+
function gm() {
|
|
20033
20101
|
const e = Mt(dr);
|
|
20034
20102
|
if (!e)
|
|
20035
20103
|
throw new Error(
|
|
@@ -20037,10 +20105,10 @@ function pm() {
|
|
|
20037
20105
|
);
|
|
20038
20106
|
return e;
|
|
20039
20107
|
}
|
|
20040
|
-
function
|
|
20108
|
+
function hm() {
|
|
20041
20109
|
return Mt(dr);
|
|
20042
20110
|
}
|
|
20043
|
-
function
|
|
20111
|
+
function Og() {
|
|
20044
20112
|
const e = Mt(zl);
|
|
20045
20113
|
if (!e)
|
|
20046
20114
|
throw new Error(
|
|
@@ -20059,7 +20127,7 @@ function Kl() {
|
|
|
20059
20127
|
);
|
|
20060
20128
|
return e;
|
|
20061
20129
|
}
|
|
20062
|
-
function
|
|
20130
|
+
function Lg(e) {
|
|
20063
20131
|
const t = Mt(ql), o = Y(e);
|
|
20064
20132
|
if (o.current = e, pt(
|
|
20065
20133
|
() => t?.((s) => o.current?.(s)),
|
|
@@ -20070,14 +20138,14 @@ function Dg(e) {
|
|
|
20070
20138
|
);
|
|
20071
20139
|
}
|
|
20072
20140
|
function Ql() {
|
|
20073
|
-
const e = Mt(
|
|
20141
|
+
const e = Mt(Wl);
|
|
20074
20142
|
if (!e)
|
|
20075
20143
|
throw new Error(
|
|
20076
20144
|
"useDaemonConnection must be used within DaemonSessionProvider"
|
|
20077
20145
|
);
|
|
20078
20146
|
return e;
|
|
20079
20147
|
}
|
|
20080
|
-
function
|
|
20148
|
+
function Fg() {
|
|
20081
20149
|
const e = Mt(Hl);
|
|
20082
20150
|
if (!e)
|
|
20083
20151
|
throw new Error(
|
|
@@ -20090,20 +20158,20 @@ function _s(e) {
|
|
|
20090
20158
|
(t) => t.type === "assistant.text.delta" || t.type === "thought.text.delta" || t.type === "tool.update" && !t.toolCallId.startsWith("mcp-app-")
|
|
20091
20159
|
);
|
|
20092
20160
|
}
|
|
20093
|
-
function
|
|
20161
|
+
function fm(e) {
|
|
20094
20162
|
if (e.type !== "session_update") return null;
|
|
20095
20163
|
const t = Ie(e.data) ? e.data : void 0, o = Ie(t?.update) ? t.update : Ie(e.data) ? e.data : void 0;
|
|
20096
20164
|
if (!o || o.sessionUpdate !== "agent_message_chunk")
|
|
20097
20165
|
return null;
|
|
20098
20166
|
const s = o._meta;
|
|
20099
20167
|
if (!Ie(s)) return null;
|
|
20100
|
-
const n =
|
|
20101
|
-
return n ?
|
|
20168
|
+
const n = vm(s.goalStatus);
|
|
20169
|
+
return n ? wm(
|
|
20102
20170
|
e,
|
|
20103
|
-
|
|
20171
|
+
km(n, s.goalState)
|
|
20104
20172
|
) : null;
|
|
20105
20173
|
}
|
|
20106
|
-
function
|
|
20174
|
+
function wm(e, t) {
|
|
20107
20175
|
return {
|
|
20108
20176
|
type: "status",
|
|
20109
20177
|
...e.id !== void 0 ? { eventId: e.id } : {},
|
|
@@ -20113,14 +20181,14 @@ function hm(e, t) {
|
|
|
20113
20181
|
data: t
|
|
20114
20182
|
};
|
|
20115
20183
|
}
|
|
20116
|
-
function
|
|
20184
|
+
function km(e, t) {
|
|
20117
20185
|
if (e.kind !== "aborted" || !Ie(t)) return e;
|
|
20118
20186
|
const o = t.goal;
|
|
20119
20187
|
if (!Ie(o)) return e;
|
|
20120
20188
|
const s = o.status;
|
|
20121
20189
|
return s !== "blocked" && s !== "usage_limited" ? e : { ...e, kind: s };
|
|
20122
20190
|
}
|
|
20123
|
-
function
|
|
20191
|
+
function vm(e) {
|
|
20124
20192
|
if (!Ie(e)) return null;
|
|
20125
20193
|
const t = Mo(e, "kind");
|
|
20126
20194
|
if (t !== "set" && t !== "cleared" && t !== "achieved" && t !== "failed" && t !== "aborted" && t !== "usage_limited" && // Rejecting 'paused' made every surface keep showing a paused goal as
|
|
@@ -20130,7 +20198,7 @@ function wm(e) {
|
|
|
20130
20198
|
return null;
|
|
20131
20199
|
const o = Mo(e, "condition");
|
|
20132
20200
|
if (!o) return null;
|
|
20133
|
-
const s =
|
|
20201
|
+
const s = Wa(e, "iterations"), n = Wa(e, "durationMs"), a = Wa(e, "setAt"), r = Mo(e, "lastReason");
|
|
20134
20202
|
return {
|
|
20135
20203
|
kind: t,
|
|
20136
20204
|
condition: o,
|
|
@@ -20144,7 +20212,7 @@ function Mo(e, t) {
|
|
|
20144
20212
|
const o = e[t];
|
|
20145
20213
|
return typeof o == "string" ? o : void 0;
|
|
20146
20214
|
}
|
|
20147
|
-
function
|
|
20215
|
+
function Wa(e, t) {
|
|
20148
20216
|
const o = e[t];
|
|
20149
20217
|
return typeof o == "number" && Number.isFinite(o) ? o : void 0;
|
|
20150
20218
|
}
|
|
@@ -20206,7 +20274,7 @@ function Li(e, t, o, s = !0) {
|
|
|
20206
20274
|
}
|
|
20207
20275
|
}
|
|
20208
20276
|
n + a + r + i + g + h + b + A + x + F === 0 && l.length === 0 || t((P) => {
|
|
20209
|
-
const
|
|
20277
|
+
const N = o ? P.skillMutationsByCwd?.[o] ?? [] : [], H = new Set(N.map((I) => I.id)), J = l.filter(
|
|
20210
20278
|
(I) => !H.has(I.id)
|
|
20211
20279
|
);
|
|
20212
20280
|
return n + a + r + i + g + h + b + A + x + F === 0 && J.length === 0 ? P : {
|
|
@@ -20223,7 +20291,7 @@ function Li(e, t, o, s = !0) {
|
|
|
20223
20291
|
...J.length > 0 && o ? {
|
|
20224
20292
|
skillMutationsByCwd: {
|
|
20225
20293
|
...P.skillMutationsByCwd,
|
|
20226
|
-
[o]: [...
|
|
20294
|
+
[o]: [...N, ...J]
|
|
20227
20295
|
}
|
|
20228
20296
|
} : P.skillMutationsByCwd ? { skillMutationsByCwd: P.skillMutationsByCwd } : {},
|
|
20229
20297
|
...$ ? { lastExtensionChange: $ } : {},
|
|
@@ -20232,15 +20300,15 @@ function Li(e, t, o, s = !0) {
|
|
|
20232
20300
|
};
|
|
20233
20301
|
});
|
|
20234
20302
|
}
|
|
20235
|
-
function
|
|
20303
|
+
function bm(e) {
|
|
20236
20304
|
const t = Gt(e);
|
|
20237
|
-
return t !== void 0 &&
|
|
20305
|
+
return t !== void 0 && em.has(t);
|
|
20238
20306
|
}
|
|
20239
|
-
function
|
|
20307
|
+
function ym(e) {
|
|
20240
20308
|
const t = Gt(e);
|
|
20241
20309
|
return t !== void 0 && ur.has(t);
|
|
20242
20310
|
}
|
|
20243
|
-
function
|
|
20311
|
+
function Sm(e, t = !1) {
|
|
20244
20312
|
if (!(e instanceof fo) || e.status !== 404) return !1;
|
|
20245
20313
|
const o = Ie(e.body) ? e.body : void 0;
|
|
20246
20314
|
return o?.code === "session_closing" || t && typeof o?.error == "string" && o.error.endsWith(
|
|
@@ -20250,7 +20318,7 @@ function bm(e, t = !1) {
|
|
|
20250
20318
|
function Yl(e) {
|
|
20251
20319
|
return !(e instanceof fo) || e.status !== 409 ? !1 : (Ie(e.body) ? e.body : void 0)?.code === "restore_in_progress";
|
|
20252
20320
|
}
|
|
20253
|
-
function
|
|
20321
|
+
function Cm(e) {
|
|
20254
20322
|
if (!Yl(e)) return;
|
|
20255
20323
|
const t = Ie(e.body) ? e.body : void 0;
|
|
20256
20324
|
if (t?.retryable !== !0 || t.reason === "awaiting_abandoned_cleanup")
|
|
@@ -20258,7 +20326,7 @@ function ym(e) {
|
|
|
20258
20326
|
const o = t.retryAfterSeconds;
|
|
20259
20327
|
return typeof o == "number" && Number.isFinite(o) && o > 0 ? Math.min(
|
|
20260
20328
|
Math.ceil(o * 1e3),
|
|
20261
|
-
|
|
20329
|
+
Yp
|
|
20262
20330
|
) : 5e3;
|
|
20263
20331
|
}
|
|
20264
20332
|
/**
|
|
@@ -20323,7 +20391,7 @@ function ko(e, t, o, s = !1) {
|
|
|
20323
20391
|
* Copyright 2025 Qwen Team
|
|
20324
20392
|
* SPDX-License-Identifier: Apache-2.0
|
|
20325
20393
|
*/
|
|
20326
|
-
function
|
|
20394
|
+
function Ug(e = {}) {
|
|
20327
20395
|
const t = vo(), o = pe(
|
|
20328
20396
|
() => t.listAgents(),
|
|
20329
20397
|
[t]
|
|
@@ -20349,7 +20417,7 @@ function Lg(e = {}) {
|
|
|
20349
20417
|
* Copyright 2025 Qwen Team
|
|
20350
20418
|
* SPDX-License-Identifier: Apache-2.0
|
|
20351
20419
|
*/
|
|
20352
|
-
function
|
|
20420
|
+
function Wg(e = {}) {
|
|
20353
20421
|
const t = vo(), o = pe(
|
|
20354
20422
|
() => t.getAuthStatus(),
|
|
20355
20423
|
[t]
|
|
@@ -20373,7 +20441,7 @@ function Fg(e = {}) {
|
|
|
20373
20441
|
* Copyright 2026 Qwen Team
|
|
20374
20442
|
* SPDX-License-Identifier: Apache-2.0
|
|
20375
20443
|
*/
|
|
20376
|
-
function
|
|
20444
|
+
function Ng(e = {}) {
|
|
20377
20445
|
const {
|
|
20378
20446
|
actions: t,
|
|
20379
20447
|
client: o,
|
|
@@ -20406,7 +20474,7 @@ function Ug(e = {}) {
|
|
|
20406
20474
|
return await F.current(), v;
|
|
20407
20475
|
},
|
|
20408
20476
|
[]
|
|
20409
|
-
),
|
|
20477
|
+
), N = pe(
|
|
20410
20478
|
(V, v) => P(
|
|
20411
20479
|
() => l ? l.upsertWorkspaceChannel(V, v) : t.upsertChannel(V, v)
|
|
20412
20480
|
),
|
|
@@ -20456,7 +20524,7 @@ function Ug(e = {}) {
|
|
|
20456
20524
|
catalog: O?.catalog ?? [],
|
|
20457
20525
|
snapshot: O?.snapshot,
|
|
20458
20526
|
channels: O?.snapshot.instances ?? {},
|
|
20459
|
-
createOrUpdate:
|
|
20527
|
+
createOrUpdate: N,
|
|
20460
20528
|
remove: H,
|
|
20461
20529
|
setStartup: J,
|
|
20462
20530
|
start: I,
|
|
@@ -20470,7 +20538,7 @@ function Ug(e = {}) {
|
|
|
20470
20538
|
* Copyright 2025 Qwen Team
|
|
20471
20539
|
* SPDX-License-Identifier: Apache-2.0
|
|
20472
20540
|
*/
|
|
20473
|
-
function
|
|
20541
|
+
function Bg(e = {}) {
|
|
20474
20542
|
const t = vo(), o = pe(
|
|
20475
20543
|
() => t.loadEnv(),
|
|
20476
20544
|
[t]
|
|
@@ -20493,7 +20561,7 @@ function Ng(e = {}) {
|
|
|
20493
20561
|
* Copyright 2025 Qwen Team
|
|
20494
20562
|
* SPDX-License-Identifier: Apache-2.0
|
|
20495
20563
|
*/
|
|
20496
|
-
function
|
|
20564
|
+
function jg() {
|
|
20497
20565
|
const e = vo();
|
|
20498
20566
|
return {
|
|
20499
20567
|
glob: e.globWorkspace,
|
|
@@ -20510,7 +20578,7 @@ function Wg() {
|
|
|
20510
20578
|
* Copyright 2025 Qwen Team
|
|
20511
20579
|
* SPDX-License-Identifier: Apache-2.0
|
|
20512
20580
|
*/
|
|
20513
|
-
function
|
|
20581
|
+
function qg() {
|
|
20514
20582
|
return {
|
|
20515
20583
|
globWorkspace: vo().globWorkspace
|
|
20516
20584
|
};
|
|
@@ -20520,7 +20588,7 @@ function Bg() {
|
|
|
20520
20588
|
* Copyright 2025 Qwen Team
|
|
20521
20589
|
* SPDX-License-Identifier: Apache-2.0
|
|
20522
20590
|
*/
|
|
20523
|
-
function
|
|
20591
|
+
function Hg(e = {}) {
|
|
20524
20592
|
const { actions: t, client: o, workspaceCwd: s } = as(), { workspaceCwd: n, ...a } = e, r = Ze(
|
|
20525
20593
|
() => n ? o.workspaceByCwd(n) : void 0,
|
|
20526
20594
|
[o, n]
|
|
@@ -20589,7 +20657,7 @@ function jg(e = {}) {
|
|
|
20589
20657
|
* Copyright 2025 Qwen Team
|
|
20590
20658
|
* SPDX-License-Identifier: Apache-2.0
|
|
20591
20659
|
*/
|
|
20592
|
-
function
|
|
20660
|
+
function Gg(e = {}) {
|
|
20593
20661
|
const t = vo(), o = pe(
|
|
20594
20662
|
() => t.loadMemoryStatus(),
|
|
20595
20663
|
[t]
|
|
@@ -20620,7 +20688,7 @@ function qg(e = {}) {
|
|
|
20620
20688
|
* Copyright 2025 Qwen Team
|
|
20621
20689
|
* SPDX-License-Identifier: Apache-2.0
|
|
20622
20690
|
*/
|
|
20623
|
-
function
|
|
20691
|
+
function zg(e = {}) {
|
|
20624
20692
|
const {
|
|
20625
20693
|
pageSize: t,
|
|
20626
20694
|
cursor: o,
|
|
@@ -20629,7 +20697,7 @@ function Hg(e = {}) {
|
|
|
20629
20697
|
group: a,
|
|
20630
20698
|
sourceType: r,
|
|
20631
20699
|
...i
|
|
20632
|
-
} = e, l = as(), p =
|
|
20700
|
+
} = e, l = as(), p = hm(), g = pe(() => {
|
|
20633
20701
|
const X = {
|
|
20634
20702
|
...t !== void 0 ? { pageSize: t } : {},
|
|
20635
20703
|
...o !== void 0 ? { cursor: o } : {},
|
|
@@ -20656,7 +20724,7 @@ function Hg(e = {}) {
|
|
|
20656
20724
|
return te && $(), te;
|
|
20657
20725
|
},
|
|
20658
20726
|
[l.actions, $]
|
|
20659
|
-
),
|
|
20727
|
+
), N = pe(
|
|
20660
20728
|
async (X) => {
|
|
20661
20729
|
const te = await l.actions.deleteSessions(X);
|
|
20662
20730
|
return (te.removed.length > 0 || te.notFound.length > 0) && $(), te;
|
|
@@ -20691,7 +20759,7 @@ function Hg(e = {}) {
|
|
|
20691
20759
|
newSession: p?.newSession,
|
|
20692
20760
|
releaseSession: p?.releaseSession,
|
|
20693
20761
|
deleteSession: P,
|
|
20694
|
-
deleteSessions:
|
|
20762
|
+
deleteSessions: N,
|
|
20695
20763
|
exportSession: H,
|
|
20696
20764
|
archiveSession: J,
|
|
20697
20765
|
unarchiveSession: I
|
|
@@ -20709,7 +20777,7 @@ function Ds(e) {
|
|
|
20709
20777
|
"Legacy Skills management supports only the primary workspace."
|
|
20710
20778
|
);
|
|
20711
20779
|
}
|
|
20712
|
-
function
|
|
20780
|
+
function Vg(e = {}) {
|
|
20713
20781
|
const { actions: t, capabilities: o, client: s, workspaceCwd: n } = as(), { workspaceCwd: a, ...r } = e, i = a ?? n, l = Ze(
|
|
20714
20782
|
() => i ? s.workspaceByCwd(i) : void 0,
|
|
20715
20783
|
[s, i]
|
|
@@ -20726,11 +20794,11 @@ function Gg(e = {}) {
|
|
|
20726
20794
|
]), F = pe(() => {
|
|
20727
20795
|
if (!l) throw new Error("Workspace is unavailable.");
|
|
20728
20796
|
return l.workspaceRuntimeSkills();
|
|
20729
|
-
}, [l]), P = Ut(x, r),
|
|
20797
|
+
}, [l]), P = Ut(x, r), N = Ut(F, {
|
|
20730
20798
|
...r,
|
|
20731
20799
|
autoLoad: !1,
|
|
20732
20800
|
enabled: r.enabled !== !1 && A
|
|
20733
|
-
}), H = P.reload, J =
|
|
20801
|
+
}), H = P.reload, J = N.reload, [I, X] = lt(), te = pe(async () => {
|
|
20734
20802
|
if (!(!A || !l)) {
|
|
20735
20803
|
g(!0), b(void 0);
|
|
20736
20804
|
try {
|
|
@@ -20757,7 +20825,7 @@ function Gg(e = {}) {
|
|
|
20757
20825
|
const oe = await l.runtimeStatus();
|
|
20758
20826
|
if (U) return;
|
|
20759
20827
|
const ae = I.capabilities?.skills, me = oe.capabilities?.skills;
|
|
20760
|
-
if (oe.runtimeLive === I.runtimeLive && oe.runtimeEpoch === I.runtimeEpoch && me?.state === ae?.state && me?.revision === ae?.revision && me?.runtimeEpoch === ae?.runtimeEpoch && (me?.state !== "ready" ||
|
|
20828
|
+
if (oe.runtimeLive === I.runtimeLive && oe.runtimeEpoch === I.runtimeEpoch && me?.state === ae?.state && me?.revision === ae?.revision && me?.runtimeEpoch === ae?.runtimeEpoch && (me?.state !== "ready" || N.data?.initialized === !0 && N.data.runtimeEpoch === oe.runtimeEpoch && N.error === void 0))
|
|
20761
20829
|
return;
|
|
20762
20830
|
const ue = () => {
|
|
20763
20831
|
X(oe), b(
|
|
@@ -20787,17 +20855,17 @@ function Gg(e = {}) {
|
|
|
20787
20855
|
te,
|
|
20788
20856
|
H,
|
|
20789
20857
|
J,
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20858
|
+
N.data?.initialized,
|
|
20859
|
+
N.data?.runtimeEpoch,
|
|
20860
|
+
N.error,
|
|
20793
20861
|
A,
|
|
20794
20862
|
l
|
|
20795
20863
|
]);
|
|
20796
|
-
const O = A && I?.capabilities?.skills?.state === "ready" && I.capabilities.skills.runtimeEpoch === I.runtimeEpoch &&
|
|
20864
|
+
const O = A && I?.capabilities?.skills?.state === "ready" && I.capabilities.skills.runtimeEpoch === I.runtimeEpoch && N.data?.initialized === !0 && N.data.runtimeEpoch === I.runtimeEpoch, ve = Ze(() => {
|
|
20797
20865
|
const U = P.data?.skills ?? [];
|
|
20798
20866
|
if (!O) return U;
|
|
20799
20867
|
const G = new Map(
|
|
20800
|
-
(
|
|
20868
|
+
(N.data?.skills ?? []).map((oe) => [
|
|
20801
20869
|
oe.name.toLowerCase(),
|
|
20802
20870
|
oe
|
|
20803
20871
|
])
|
|
@@ -20810,7 +20878,7 @@ function Gg(e = {}) {
|
|
|
20810
20878
|
installedPath: oe.installedPath ?? ae.installedPath
|
|
20811
20879
|
}) : oe;
|
|
20812
20880
|
}), ...G.values()];
|
|
20813
|
-
}, [P.data?.skills,
|
|
20881
|
+
}, [P.data?.skills, N.data?.skills, O]), V = pe(async () => {
|
|
20814
20882
|
if (!A) return await H();
|
|
20815
20883
|
const [U, G] = await Promise.all([
|
|
20816
20884
|
H(),
|
|
@@ -20818,15 +20886,15 @@ function Gg(e = {}) {
|
|
|
20818
20886
|
]);
|
|
20819
20887
|
return G ?? U;
|
|
20820
20888
|
}, [te, H, A]), v = zo(), B = v ? v.settingsVersion + v.extensionsVersion + v.skillsVersion : void 0;
|
|
20821
|
-
return ko(B, H, P.data !== void 0), ko(B, J,
|
|
20822
|
-
data: P.data ??
|
|
20823
|
-
status: P.data ??
|
|
20889
|
+
return ko(B, H, P.data !== void 0), ko(B, J, N.data !== void 0), {
|
|
20890
|
+
data: P.data ?? N.data,
|
|
20891
|
+
status: P.data ?? N.data,
|
|
20824
20892
|
configStatus: P.data,
|
|
20825
|
-
runtimeStatus:
|
|
20893
|
+
runtimeStatus: N.data,
|
|
20826
20894
|
skills: ve,
|
|
20827
20895
|
loading: P.loading || p && P.data === void 0,
|
|
20828
20896
|
preparing: p,
|
|
20829
|
-
error: P.error ?? (A ? h ??
|
|
20897
|
+
error: P.error ?? (A ? h ?? N.error : void 0),
|
|
20830
20898
|
reload: V,
|
|
20831
20899
|
reloadConfig: H,
|
|
20832
20900
|
reloadRuntime: J,
|
|
@@ -20882,7 +20950,7 @@ function Gg(e = {}) {
|
|
|
20882
20950
|
* Copyright 2025 Qwen Team
|
|
20883
20951
|
* SPDX-License-Identifier: Apache-2.0
|
|
20884
20952
|
*/
|
|
20885
|
-
function
|
|
20953
|
+
function Kg(e = {}) {
|
|
20886
20954
|
const { detail: t = "summary", ...o } = e, s = vo(), n = pe(
|
|
20887
20955
|
() => s.loadDaemonStatus(t),
|
|
20888
20956
|
[s, t]
|
|
@@ -20897,7 +20965,7 @@ function zg(e = {}) {
|
|
|
20897
20965
|
* Copyright 2025 Qwen Team
|
|
20898
20966
|
* SPDX-License-Identifier: Apache-2.0
|
|
20899
20967
|
*/
|
|
20900
|
-
function
|
|
20968
|
+
function Qg(e = {}) {
|
|
20901
20969
|
const { range: t, heatmapDays: o, ...s } = e, n = vo(), a = pe(
|
|
20902
20970
|
() => n.loadUsageDashboard({ range: t, heatmapDays: o }),
|
|
20903
20971
|
[n, t, o]
|
|
@@ -20912,7 +20980,7 @@ function Vg(e = {}) {
|
|
|
20912
20980
|
* Copyright 2025 Qwen Team
|
|
20913
20981
|
* SPDX-License-Identifier: Apache-2.0
|
|
20914
20982
|
*/
|
|
20915
|
-
function
|
|
20983
|
+
function Yg(e = {}) {
|
|
20916
20984
|
const t = vo(), o = pe(
|
|
20917
20985
|
() => t.loadToolsStatus(),
|
|
20918
20986
|
[t]
|
|
@@ -20934,7 +21002,7 @@ function Kg(e = {}) {
|
|
|
20934
21002
|
* Copyright 2025 Qwen Team
|
|
20935
21003
|
* SPDX-License-Identifier: Apache-2.0
|
|
20936
21004
|
*/
|
|
20937
|
-
function
|
|
21005
|
+
function Jg(e = {}) {
|
|
20938
21006
|
const t = vo(), o = pe(
|
|
20939
21007
|
() => t.loadSettingsStatus(),
|
|
20940
21008
|
[t]
|
|
@@ -20955,7 +21023,7 @@ function Qg(e = {}) {
|
|
|
20955
21023
|
* Copyright 2025 Qwen Team
|
|
20956
21024
|
* SPDX-License-Identifier: Apache-2.0
|
|
20957
21025
|
*/
|
|
20958
|
-
function
|
|
21026
|
+
function Xg(e = {}) {
|
|
20959
21027
|
const t = vo(), o = pe(
|
|
20960
21028
|
() => t.loadProviders(),
|
|
20961
21029
|
[t]
|
|
@@ -20977,15 +21045,15 @@ function Yg(e = {}) {
|
|
|
20977
21045
|
* Copyright 2025 Qwen Team
|
|
20978
21046
|
* SPDX-License-Identifier: Apache-2.0
|
|
20979
21047
|
*/
|
|
20980
|
-
const
|
|
21048
|
+
const Tm = 300, Im = 100, En = Object.freeze({
|
|
20981
21049
|
suggestion: null,
|
|
20982
21050
|
isVisible: !1,
|
|
20983
21051
|
shownAt: 0
|
|
20984
21052
|
});
|
|
20985
|
-
function
|
|
21053
|
+
function Na(e) {
|
|
20986
21054
|
e.clearFollowupSuggestion?.();
|
|
20987
21055
|
}
|
|
20988
|
-
function
|
|
21056
|
+
function xm(e) {
|
|
20989
21057
|
const { enabled: t = !0, onStateChange: o, getOnAccept: s, getOnOutcome: n } = e;
|
|
20990
21058
|
let a = En, r = null, i = !1, l = null;
|
|
20991
21059
|
function p(F) {
|
|
@@ -21001,12 +21069,12 @@ function Tm(e) {
|
|
|
21001
21069
|
}
|
|
21002
21070
|
t && (r = setTimeout(() => {
|
|
21003
21071
|
p({ suggestion: F, isVisible: !0, shownAt: Date.now() });
|
|
21004
|
-
},
|
|
21072
|
+
}, Tm));
|
|
21005
21073
|
}, accept: (F, P) => {
|
|
21006
21074
|
if (i) return;
|
|
21007
21075
|
r && (clearTimeout(r), r = null), i = !0;
|
|
21008
|
-
const
|
|
21009
|
-
if (!
|
|
21076
|
+
const N = a.suggestion, { shownAt: H } = a;
|
|
21077
|
+
if (!N) {
|
|
21010
21078
|
i = !1;
|
|
21011
21079
|
return;
|
|
21012
21080
|
}
|
|
@@ -21015,20 +21083,20 @@ function Tm(e) {
|
|
|
21015
21083
|
outcome: "accepted",
|
|
21016
21084
|
accept_method: F,
|
|
21017
21085
|
time_ms: H > 0 ? Date.now() - H : 0,
|
|
21018
|
-
suggestion_length:
|
|
21086
|
+
suggestion_length: N.length
|
|
21019
21087
|
});
|
|
21020
21088
|
} catch (J) {
|
|
21021
21089
|
console.error("[followup] onOutcome callback threw:", J);
|
|
21022
21090
|
}
|
|
21023
21091
|
p(En), queueMicrotask(() => {
|
|
21024
21092
|
try {
|
|
21025
|
-
P?.skipOnAccept || s()?.(
|
|
21093
|
+
P?.skipOnAccept || s()?.(N);
|
|
21026
21094
|
} catch (J) {
|
|
21027
21095
|
console.error("[followup] onAccept callback threw:", J);
|
|
21028
21096
|
} finally {
|
|
21029
21097
|
l && clearTimeout(l), l = setTimeout(() => {
|
|
21030
21098
|
i = !1;
|
|
21031
|
-
},
|
|
21099
|
+
}, Im);
|
|
21032
21100
|
}
|
|
21033
21101
|
});
|
|
21034
21102
|
}, dismiss: () => {
|
|
@@ -21051,7 +21119,7 @@ function Tm(e) {
|
|
|
21051
21119
|
g(), i = !1;
|
|
21052
21120
|
} };
|
|
21053
21121
|
}
|
|
21054
|
-
function
|
|
21122
|
+
function Zg(e = {}) {
|
|
21055
21123
|
const { enabled: t = !0, onAccept: o, onOutcome: s } = e, n = rs(), a = Ql().sessionId, [r, i] = lt(En), l = Y(o);
|
|
21056
21124
|
l.current = o;
|
|
21057
21125
|
const p = Y(s);
|
|
@@ -21061,11 +21129,11 @@ function Jg(e = {}) {
|
|
|
21061
21129
|
() => n.getSnapshot().lastFollowupSuggestion,
|
|
21062
21130
|
() => n.getSnapshot().lastFollowupSuggestion
|
|
21063
21131
|
), h = an(
|
|
21064
|
-
|
|
21132
|
+
xu,
|
|
21065
21133
|
si,
|
|
21066
21134
|
si
|
|
21067
21135
|
), b = h?.sessionId === a ? h : g, A = Ze(
|
|
21068
|
-
() =>
|
|
21136
|
+
() => xm({
|
|
21069
21137
|
enabled: t,
|
|
21070
21138
|
onStateChange: i,
|
|
21071
21139
|
getOnAccept: () => l.current,
|
|
@@ -21083,23 +21151,23 @@ function Jg(e = {}) {
|
|
|
21083
21151
|
J !== x.current && (x.current = J, $(b?.suggestion ?? null));
|
|
21084
21152
|
}, [b, $]);
|
|
21085
21153
|
const P = pe(() => {
|
|
21086
|
-
A.clear(),
|
|
21087
|
-
}, [A, n]),
|
|
21154
|
+
A.clear(), Na(n), Is(), x.current = void 0;
|
|
21155
|
+
}, [A, n]), N = pe(
|
|
21088
21156
|
(J, I) => {
|
|
21089
|
-
A.accept(J, I),
|
|
21157
|
+
A.accept(J, I), Na(n), Is(), x.current = void 0;
|
|
21090
21158
|
},
|
|
21091
21159
|
[A, n]
|
|
21092
21160
|
), H = pe(() => {
|
|
21093
|
-
A.dismiss(),
|
|
21161
|
+
A.dismiss(), Na(n), Is(), x.current = void 0;
|
|
21094
21162
|
}, [A, n]);
|
|
21095
21163
|
return Ze(
|
|
21096
21164
|
() => ({
|
|
21097
21165
|
followupState: r,
|
|
21098
|
-
onAcceptFollowup:
|
|
21166
|
+
onAcceptFollowup: N,
|
|
21099
21167
|
onDismissFollowup: H,
|
|
21100
21168
|
clear: P
|
|
21101
21169
|
}),
|
|
21102
|
-
[r,
|
|
21170
|
+
[r, N, H, P]
|
|
21103
21171
|
);
|
|
21104
21172
|
}
|
|
21105
21173
|
/**
|
|
@@ -21107,142 +21175,142 @@ function Jg(e = {}) {
|
|
|
21107
21175
|
* Copyright 2025 Qwen Team
|
|
21108
21176
|
* SPDX-License-Identifier: Apache-2.0
|
|
21109
21177
|
*/
|
|
21110
|
-
function
|
|
21178
|
+
function eh() {
|
|
21111
21179
|
const e = an(
|
|
21112
|
-
|
|
21180
|
+
Au,
|
|
21113
21181
|
ii,
|
|
21114
21182
|
ii
|
|
21115
21183
|
), t = pe(
|
|
21116
|
-
(o) =>
|
|
21184
|
+
(o) => Eu(o),
|
|
21117
21185
|
[]
|
|
21118
21186
|
);
|
|
21119
21187
|
return { batches: e, consume: t };
|
|
21120
21188
|
}
|
|
21121
21189
|
export {
|
|
21122
|
-
|
|
21123
|
-
|
|
21124
|
-
|
|
21190
|
+
pg as $,
|
|
21191
|
+
Mu as A,
|
|
21192
|
+
Xg as B,
|
|
21125
21193
|
Ut as C,
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21194
|
+
tm as D,
|
|
21195
|
+
Eg as E,
|
|
21196
|
+
Fg as F,
|
|
21197
|
+
zg as G,
|
|
21198
|
+
Jg as H,
|
|
21199
|
+
Vg as I,
|
|
21200
|
+
Kg as J,
|
|
21201
|
+
Dg as K,
|
|
21202
|
+
Yg as L,
|
|
21135
21203
|
Vl as M,
|
|
21136
|
-
|
|
21137
|
-
|
|
21204
|
+
Rg as N,
|
|
21205
|
+
$g as O,
|
|
21138
21206
|
rs as P,
|
|
21139
|
-
|
|
21140
|
-
|
|
21141
|
-
|
|
21207
|
+
Pg as Q,
|
|
21208
|
+
pm as R,
|
|
21209
|
+
Qg as S,
|
|
21142
21210
|
as as T,
|
|
21143
21211
|
vo as U,
|
|
21144
21212
|
zo as V,
|
|
21145
|
-
|
|
21146
|
-
|
|
21147
|
-
|
|
21148
|
-
|
|
21149
|
-
|
|
21150
|
-
|
|
21151
|
-
|
|
21152
|
-
|
|
21213
|
+
Bm as W,
|
|
21214
|
+
mm as X,
|
|
21215
|
+
dg as Y,
|
|
21216
|
+
jp as Z,
|
|
21217
|
+
mg as _,
|
|
21218
|
+
Ag as a,
|
|
21219
|
+
ag as a$,
|
|
21220
|
+
_p as a0,
|
|
21153
21221
|
il as a1,
|
|
21154
|
-
|
|
21222
|
+
Km as a2,
|
|
21155
21223
|
ns as a3,
|
|
21156
|
-
|
|
21224
|
+
Jm as a4,
|
|
21157
21225
|
kl as a5,
|
|
21158
21226
|
sd as a6,
|
|
21159
21227
|
mi as a7,
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21228
|
+
cg as a8,
|
|
21229
|
+
Ym as a9,
|
|
21230
|
+
$u as aA,
|
|
21231
|
+
lu as aB,
|
|
21232
|
+
yg as aC,
|
|
21233
|
+
vg as aD,
|
|
21234
|
+
Ap as aE,
|
|
21235
|
+
Mp as aF,
|
|
21236
|
+
ng as aG,
|
|
21237
|
+
Lg as aH,
|
|
21238
|
+
rp as aI,
|
|
21239
|
+
ug as aJ,
|
|
21240
|
+
xg as aK,
|
|
21173
21241
|
go as aL,
|
|
21174
21242
|
vl as aM,
|
|
21175
|
-
|
|
21243
|
+
hp as aN,
|
|
21176
21244
|
ad as aO,
|
|
21177
|
-
|
|
21245
|
+
Lm as aP,
|
|
21178
21246
|
tr as aQ,
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
|
|
21247
|
+
Fm as aR,
|
|
21248
|
+
Wm as aS,
|
|
21249
|
+
Um as aT,
|
|
21182
21250
|
cd as aU,
|
|
21183
21251
|
Ho as aV,
|
|
21184
|
-
|
|
21185
|
-
|
|
21252
|
+
su as aW,
|
|
21253
|
+
Sg as aX,
|
|
21186
21254
|
$t as aY,
|
|
21187
|
-
|
|
21188
|
-
|
|
21255
|
+
tg as aZ,
|
|
21256
|
+
rg as a_,
|
|
21189
21257
|
bl as aa,
|
|
21190
21258
|
Sl as ab,
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21259
|
+
eg as ac,
|
|
21260
|
+
_m as ad,
|
|
21261
|
+
Dm as ae,
|
|
21194
21262
|
Ed as af,
|
|
21195
|
-
|
|
21263
|
+
Om as ag,
|
|
21196
21264
|
yl as ah,
|
|
21197
21265
|
Pn as ai,
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21266
|
+
bg as aj,
|
|
21267
|
+
Ig as ak,
|
|
21268
|
+
Ou as al,
|
|
21269
|
+
_u as am,
|
|
21270
|
+
Xm as an,
|
|
21203
21271
|
Ci as ao,
|
|
21204
21272
|
ko as ap,
|
|
21205
|
-
|
|
21206
|
-
|
|
21207
|
-
|
|
21208
|
-
|
|
21273
|
+
fg as aq,
|
|
21274
|
+
gg as ar,
|
|
21275
|
+
Cg as as,
|
|
21276
|
+
Zm as at,
|
|
21209
21277
|
xs as au,
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21278
|
+
wg as av,
|
|
21279
|
+
kg as aw,
|
|
21280
|
+
hg as ax,
|
|
21213
21281
|
Ie as ay,
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21282
|
+
Mm as az,
|
|
21283
|
+
jm as b,
|
|
21284
|
+
ig as b0,
|
|
21285
|
+
lg as b1,
|
|
21286
|
+
og as b2,
|
|
21287
|
+
sg as b3,
|
|
21288
|
+
Zu as b4,
|
|
21289
|
+
Nm as b5,
|
|
21290
|
+
Tg as b6,
|
|
21291
|
+
gu as b7,
|
|
21292
|
+
Vm as c,
|
|
21293
|
+
qm as d,
|
|
21226
21294
|
es as e,
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
|
|
21233
|
-
|
|
21295
|
+
Gm as f,
|
|
21296
|
+
Hm as g,
|
|
21297
|
+
_g as h,
|
|
21298
|
+
Qm as i,
|
|
21299
|
+
Ug as j,
|
|
21300
|
+
Wg as k,
|
|
21301
|
+
Ng as l,
|
|
21234
21302
|
Ql as m,
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21303
|
+
Zg as n,
|
|
21304
|
+
eh as o,
|
|
21305
|
+
Og as p,
|
|
21306
|
+
Bg as q,
|
|
21307
|
+
jg as r,
|
|
21308
|
+
zm as s,
|
|
21309
|
+
qg as t,
|
|
21310
|
+
gm as u,
|
|
21311
|
+
Hg as v,
|
|
21312
|
+
Gg as w,
|
|
21313
|
+
mu as x,
|
|
21314
|
+
Mg as y,
|
|
21247
21315
|
Kl as z
|
|
21248
21316
|
};
|