@qwen-code/web-shell 0.27.4-nightly.20261116.eb3a599ef3 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PierreFilePreview-BSPYtMfT.js → PierreFilePreview-D6shMVrF.js} +1 -1
- package/dist/{SpreadsheetPreview-Dt3j8svo.js → SpreadsheetPreview-CI7hXBn_.js} +2 -2
- package/dist/{WorkspaceFileBrowser-BEfKDZo-.js → WorkspaceFileBrowser-D2lUYsk2.js} +2 -2
- package/dist/{agents-route-CoQyuI6v.js → agents-route-Cekk3UIP.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-CDuO1Jdf.js → index-BNap2Fh4.js} +60933 -60055
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +2761 -2707
- package/dist/types/components/BranchPickerPopover.d.ts +11 -1
- package/dist/types/components/ChatEditor.d.ts +4 -0
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +11 -1
- package/dist/types/components/artifacts/ChangeOverviewPanel.d.ts +4 -0
- package/dist/types/components/artifacts/change-overview.d.ts +95 -0
- package/dist/types/components/artifacts/useChangeOverview.d.ts +21 -0
- package/dist/types/components/sidebar/ActivityDateSessions.d.ts +22 -0
- package/dist/types/components/sidebar/SessionGroupSection.d.ts +4 -2
- package/dist/types/components/sidebar/SessionSortMenu.d.ts +7 -1
- package/dist/types/components/sidebar/activity-model.d.ts +1 -1
- package/dist/types/customization.d.ts +1 -1
- package/dist/types/daemon/session/types.d.ts +6 -2
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +4 -1
- package/dist/types/utils/gitModeIntent.d.ts +14 -4
- package/dist/{useDaemonMidTurnInjected-CF_pQHJz.js → useDaemonMidTurnInjected-FRZ0JLKH.js} +567 -458
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var mu = Object.defineProperty;
|
|
2
2
|
var gu = (e, t, o) => t in e ? mu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
-
var
|
|
3
|
+
var Se = (e, t, o) => gu(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
4
|
import { createContext as at, useSyncExternalStore as hn, useContext as It, useMemo as Ue, useRef as Y, useState as bt, useCallback as ue, useEffect as ft, useLayoutEffect as el } from "react";
|
|
5
5
|
import { jsx as Ut } from "react/jsx-runtime";
|
|
6
6
|
import { DaemonClient as ba, DaemonHttpError as yo, parseDaemonBackgroundTurn as $a, getSessionUpdatePayload as nr, isStaleBranchPointError as hu, DaemonStandaloneCreationOutcomeUnknownError as uc, isDaemonTurnError as tl, DaemonTransportClosedError as fu, DaemonPendingPromptLimitError as ku, asKnownDaemonEvent as wu, reduceHookLifecycle as pc, createHookLifecycleState as vu, createToolLifecycleState as bu, createExecutionLifecycleState as yu, extractExecutionLifecycle as Su, extractToolLifecycle as Cu, extractHookLifecycle as Tu, reduceExecutionLifecycle as xu, reduceToolLifecycle as Pu, EXTENSION_ARCHIVE_UPLOAD_TIMEOUT_MS as $u, MID_TURN_MESSAGE_INJECTED_EVENT as Iu, PENDING_PROMPT_ADDED_EVENT as mc, PENDING_PROMPT_STARTED_EVENT as gc, PENDING_PROMPT_COMPLETED_EVENT as hc, isTaskExecutionMode as fc, parseQwenAgentMessageMeta as Au, QWEN_AGENT_MESSAGE_META_KEY as Ru, estimateDaemonTranscriptBlockBytes as sr, createDaemonTranscriptStore as ws, normalizeDaemonEvent as Eu, extractServerTimestamp as Mu, STANDALONE_SESSION_OPTIONS_CAPABILITY as Du, DaemonSessionClient as Qo, isUnrecognizedDiagnosticReason as ol, DaemonCapabilityMissingError as di, matchTurnEvent as _u, isTrimmedToolBlockId as Uu, isTrimmedPermissionBlockId as Lu, UNRECOGNIZED_DIAGNOSTICS_LIMIT as Fu, DAEMON_APPROVAL_MODES as Wu } from "@qwen-code/sdk/daemon";
|
|
@@ -46,18 +46,18 @@ class Bu {
|
|
|
46
46
|
constructor(t, o, n = globalThis.fetch.bind(
|
|
47
47
|
globalThis
|
|
48
48
|
)) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
Se(this, "state", "available");
|
|
50
|
+
Se(this, "listeners", /* @__PURE__ */ new Set());
|
|
51
|
+
Se(this, "timer");
|
|
52
|
+
Se(this, "probe");
|
|
53
|
+
Se(this, "controller");
|
|
54
|
+
Se(this, "attempt", 0);
|
|
55
|
+
Se(this, "generation", 0);
|
|
56
|
+
Se(this, "disposed", !1);
|
|
57
|
+
Se(this, "recoveredCapabilities");
|
|
58
|
+
Se(this, "getSnapshot", () => this.state);
|
|
59
|
+
Se(this, "subscribe", (t) => (this.listeners.add(t), () => this.listeners.delete(t)));
|
|
60
|
+
Se(this, "check", (t = !1) => this.disposed ? Promise.resolve() : this.probe ? this.probe : !t && (this.timer !== void 0 || this.state === "auth-required") ? Promise.resolve() : (clearTimeout(this.timer), this.timer = void 0, this.probe = Promise.resolve().then(() => this.runProbe()), this.probe));
|
|
61
61
|
this.baseUrl = t, this.token = o, this.nativeFetch = n, this.baseUrl = t.replace(/\/+$/, "");
|
|
62
62
|
}
|
|
63
63
|
publish(t) {
|
|
@@ -401,16 +401,16 @@ function zf(e) {
|
|
|
401
401
|
* SPDX-License-Identifier: Apache-2.0
|
|
402
402
|
*/
|
|
403
403
|
function mo(e) {
|
|
404
|
-
if (e instanceof yo ||
|
|
404
|
+
if (e instanceof yo || be(e) && typeof e.status == "number")
|
|
405
405
|
return e.status;
|
|
406
406
|
}
|
|
407
407
|
function Qu(e) {
|
|
408
|
-
return e instanceof yo && e.status === 400 &&
|
|
408
|
+
return e instanceof yo && e.status === 400 && be(e.body) && e.body.code === "invalid_client_id";
|
|
409
409
|
}
|
|
410
410
|
function lr(e) {
|
|
411
|
-
if (!(e instanceof yo) || !
|
|
411
|
+
if (!(e instanceof yo) || !be(e.body))
|
|
412
412
|
return !1;
|
|
413
|
-
const t = e.body, o =
|
|
413
|
+
const t = e.body, o = be(t.data) ? t.data : void 0, n = be(t.capacity) ? t.capacity : void 0, a = be(o?.capacity) ? o.capacity : void 0;
|
|
414
414
|
return [
|
|
415
415
|
t.code,
|
|
416
416
|
o?.errorKind,
|
|
@@ -420,20 +420,20 @@ function lr(e) {
|
|
|
420
420
|
].includes("acp_child_capacity_exhausted");
|
|
421
421
|
}
|
|
422
422
|
function Vu(e) {
|
|
423
|
-
if (!(e instanceof yo) || !
|
|
423
|
+
if (!(e instanceof yo) || !be(e.body))
|
|
424
424
|
return !1;
|
|
425
|
-
const t = e.body, o =
|
|
425
|
+
const t = e.body, o = be(t.data) ? t.data : void 0;
|
|
426
426
|
return [t.code, o?.errorKind, o?.code].includes(
|
|
427
427
|
"session_limit_exceeded"
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function be(e) {
|
|
431
431
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
432
432
|
}
|
|
433
433
|
function Qf(e) {
|
|
434
|
-
if (!lr(e) || !(e instanceof yo) || !
|
|
434
|
+
if (!lr(e) || !(e instanceof yo) || !be(e.body))
|
|
435
435
|
return !1;
|
|
436
|
-
const t = e.body, o =
|
|
436
|
+
const t = e.body, o = be(t.data) ? t.data : t, n = typeof t.code == "string" ? t.code : o.errorKind ?? o.code;
|
|
437
437
|
return n === "acp_child_capacity_exhausted" || n === "standalone_creation_rolled_back" && o.retryable === !0;
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
@@ -487,28 +487,28 @@ function Ts(e, t) {
|
|
|
487
487
|
return { models: n, currentModel: a, currentMode: r, contextWindow: s };
|
|
488
488
|
}
|
|
489
489
|
function cr(e) {
|
|
490
|
-
const t =
|
|
490
|
+
const t = Me(e?.state?.models);
|
|
491
491
|
if (!t) return;
|
|
492
|
-
const o =
|
|
492
|
+
const o = Ce(t, "currentModelId") ?? Ce(t, "currentModel"), n = t.availableModels, a = [];
|
|
493
493
|
let r;
|
|
494
494
|
if (Array.isArray(n))
|
|
495
495
|
for (const s of n) {
|
|
496
|
-
const i =
|
|
496
|
+
const i = Me(s), l = Ce(i, "modelId") ?? Ce(i, "id") ?? Ce(i, "value");
|
|
497
497
|
if (!l) continue;
|
|
498
|
-
const u =
|
|
498
|
+
const u = Me(i?._meta), m = Me(u?.modalities), g = m ? {} : void 0;
|
|
499
499
|
if (m && g)
|
|
500
500
|
for (const $ of ["image", "pdf", "audio", "video"])
|
|
501
501
|
typeof m[$] == "boolean" && (g[$] = m[$]);
|
|
502
|
-
const k =
|
|
502
|
+
const k = Qt(u, "contextLimit") ?? Qt(u, "contextWindow") ?? Qt(i, "contextLimit") ?? Qt(i, "contextWindow");
|
|
503
503
|
r === void 0 && o !== void 0 && l === o && (r = k), a.push({
|
|
504
504
|
id: l,
|
|
505
|
-
baseModelId:
|
|
506
|
-
label:
|
|
507
|
-
...
|
|
505
|
+
baseModelId: Ce(u, "baseModelId") ?? Ce(i, "baseModelId") ?? np(l),
|
|
506
|
+
label: Ce(i, "name") ?? Ce(i, "label") ?? l,
|
|
507
|
+
...Ce(u, "authType") !== void 0 ? { authType: Ce(u, "authType") } : {},
|
|
508
508
|
...k !== void 0 ? { contextWindow: k } : {},
|
|
509
509
|
...g !== void 0 ? { modalities: g } : {},
|
|
510
|
-
...
|
|
511
|
-
...
|
|
510
|
+
...Ce(u, "baseUrl") !== void 0 ? { baseUrl: Ce(u, "baseUrl") } : {},
|
|
511
|
+
...Ce(u, "envKey") !== void 0 ? { envKey: Ce(u, "envKey") } : {},
|
|
512
512
|
...typeof u?.isRuntime == "boolean" ? { isRuntime: u.isRuntime } : {}
|
|
513
513
|
});
|
|
514
514
|
}
|
|
@@ -517,15 +517,15 @@ function cr(e) {
|
|
|
517
517
|
}
|
|
518
518
|
function Ia(e) {
|
|
519
519
|
if (!Array.isArray(e)) return;
|
|
520
|
-
const t = e.map(
|
|
520
|
+
const t = e.map(Me).find((g) => Ce(g, "id") === "reasoning_effort"), o = t?.options;
|
|
521
521
|
if (!t || !Array.isArray(o)) return;
|
|
522
522
|
const n = o.flatMap((g) => {
|
|
523
|
-
const k = al(
|
|
523
|
+
const k = al(Ce(Me(g), "value"));
|
|
524
524
|
return k ? [k] : [];
|
|
525
|
-
}), a =
|
|
525
|
+
}), a = Me(t._meta), r = Me(a?.["qwenCode/reasoning"]), s = r?.thinkingMandatory === !0;
|
|
526
526
|
if (!s && !n.includes("none")) return;
|
|
527
527
|
const i = al(
|
|
528
|
-
|
|
528
|
+
Ce(t, "currentValue")
|
|
529
529
|
);
|
|
530
530
|
if (!i || !n.includes(i) || s && i === "none") return;
|
|
531
531
|
const l = n.filter(
|
|
@@ -541,7 +541,7 @@ function Ia(e) {
|
|
|
541
541
|
} : void 0;
|
|
542
542
|
if (l.length === 0) return;
|
|
543
543
|
const u = l.find(
|
|
544
|
-
(g) => g ===
|
|
544
|
+
(g) => g === Ce(r, "defaultEffort")
|
|
545
545
|
), m = l.find((g) => g === i) ?? u ?? "default";
|
|
546
546
|
return {
|
|
547
547
|
enabled: i !== "none",
|
|
@@ -559,13 +559,13 @@ function Wi(e) {
|
|
|
559
559
|
workflowModeStatus: "unknown"
|
|
560
560
|
};
|
|
561
561
|
if (!Array.isArray(e)) return t;
|
|
562
|
-
const o = e.map(
|
|
562
|
+
const o = e.map(Me).filter((i) => i?.id === "workflow_mode");
|
|
563
563
|
if (o.length === 0)
|
|
564
564
|
return { workflowMode: void 0, workflowModeStatus: "unsupported" };
|
|
565
565
|
if (o.length !== 1) return t;
|
|
566
|
-
const n = o[0], a = n?.currentValue, r = n?.options, s =
|
|
566
|
+
const n = o[0], a = n?.currentValue, r = n?.options, s = Me(Me(n?._meta)?.["qwen.workflowMode"]);
|
|
567
567
|
return n?.type !== "select" || a !== "on" && a !== "off" || !Array.isArray(r) || !["on", "off"].every(
|
|
568
|
-
(i) => r.some((l) =>
|
|
568
|
+
(i) => r.some((l) => Me(l)?.value === i)
|
|
569
569
|
) || typeof s?.available != "boolean" || typeof s.effective != "boolean" || s.effective !== (a === "on" && s.available) || s.reason !== void 0 && typeof s.reason != "string" ? t : {
|
|
570
570
|
workflowModeStatus: "ready",
|
|
571
571
|
workflowMode: {
|
|
@@ -599,7 +599,7 @@ function Oi(e, t) {
|
|
|
599
599
|
return Rs(
|
|
600
600
|
{
|
|
601
601
|
...e,
|
|
602
|
-
...o && (o.models.length > 0 || Array.isArray(
|
|
602
|
+
...o && (o.models.length > 0 || Array.isArray(Me(t.state.models)?.availableModels)) ? { models: o.models } : {},
|
|
603
603
|
currentModel: o?.currentModel ?? e.currentModel,
|
|
604
604
|
currentMode: n ?? e.currentMode,
|
|
605
605
|
planExecutionMode: n !== void 0 ? ur(t) : e.planExecutionMode,
|
|
@@ -676,7 +676,7 @@ function yc(...e) {
|
|
|
676
676
|
}
|
|
677
677
|
function Ju(e, t) {
|
|
678
678
|
if (e.type === "session_update") {
|
|
679
|
-
const o =
|
|
679
|
+
const o = Me(Me(e.data)?.update), n = Me(o?._meta), a = $a(n?.backgroundTurn);
|
|
680
680
|
a && n?.source === "background_notification_turn_started" && t(
|
|
681
681
|
(i) => i.finishedBackgroundTurnId === a.turnId ? i : {
|
|
682
682
|
...i,
|
|
@@ -694,7 +694,7 @@ function Ju(e, t) {
|
|
|
694
694
|
if (s && t((i) => ({
|
|
695
695
|
...i,
|
|
696
696
|
goalState: Sa(i.goalState, s)
|
|
697
|
-
})),
|
|
697
|
+
})), Ce(o, "sessionUpdate") === "available_commands_update") {
|
|
698
698
|
const { commands: i, skills: l } = op(o);
|
|
699
699
|
t((u) => ({
|
|
700
700
|
...u,
|
|
@@ -707,7 +707,7 @@ function Ju(e, t) {
|
|
|
707
707
|
switch (e.type) {
|
|
708
708
|
case "turn_complete":
|
|
709
709
|
case "turn_error": {
|
|
710
|
-
const o =
|
|
710
|
+
const o = Ce(Me(e.data), "promptId") ?? e.promptId;
|
|
711
711
|
t(
|
|
712
712
|
(n) => n.backgroundTurn?.turnId === o ? {
|
|
713
713
|
...n,
|
|
@@ -719,14 +719,14 @@ function Ju(e, t) {
|
|
|
719
719
|
break;
|
|
720
720
|
}
|
|
721
721
|
case "git_branch_changed": {
|
|
722
|
-
const o =
|
|
722
|
+
const o = Me(e.data), n = Ce(o, "workspaceCwd"), a = Ce(o, "branch");
|
|
723
723
|
t(
|
|
724
724
|
(r) => r.sessionContext !== void 0 && r.sessionContext.kind !== "workspace" || n && n !== r.workspaceCwd ? r : { ...r, gitBranch: a }
|
|
725
725
|
);
|
|
726
726
|
break;
|
|
727
727
|
}
|
|
728
728
|
case "git_status_changed": {
|
|
729
|
-
const o =
|
|
729
|
+
const o = Me(e.data), n = Ce(o, "workspaceCwd");
|
|
730
730
|
t(
|
|
731
731
|
(a) => a.sessionContext !== void 0 && a.sessionContext.kind !== "workspace" || n && n !== a.workspaceCwd ? a : {
|
|
732
732
|
...a,
|
|
@@ -736,9 +736,9 @@ function Ju(e, t) {
|
|
|
736
736
|
break;
|
|
737
737
|
}
|
|
738
738
|
case "session_metadata_updated": {
|
|
739
|
-
const o =
|
|
739
|
+
const o = Me(e.data);
|
|
740
740
|
if (Object.prototype.hasOwnProperty.call(o ?? {}, "displayName")) {
|
|
741
|
-
const n =
|
|
741
|
+
const n = Ce(o, "displayName"), a = Ce(o, "titleSource");
|
|
742
742
|
t((r) => ({
|
|
743
743
|
...r,
|
|
744
744
|
displayName: n,
|
|
@@ -755,7 +755,7 @@ function Ju(e, t) {
|
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
case "model_switched": {
|
|
758
|
-
const o =
|
|
758
|
+
const o = Me(e.data)?.modelId;
|
|
759
759
|
typeof o == "string" && t((n) => ({
|
|
760
760
|
...n,
|
|
761
761
|
currentModel: o || void 0,
|
|
@@ -765,20 +765,20 @@ function Ju(e, t) {
|
|
|
765
765
|
break;
|
|
766
766
|
}
|
|
767
767
|
case "session_snapshot": {
|
|
768
|
-
const o =
|
|
768
|
+
const o = Me(e.data), n = Ce(o, "currentApprovalMode");
|
|
769
769
|
n && t((a) => ({
|
|
770
770
|
...a,
|
|
771
771
|
currentMode: n,
|
|
772
|
-
planExecutionMode: n === "plan" ?
|
|
772
|
+
planExecutionMode: n === "plan" ? Ce(o, "planExecutionMode") : void 0
|
|
773
773
|
}));
|
|
774
774
|
break;
|
|
775
775
|
}
|
|
776
776
|
case "approval_mode_changed": {
|
|
777
|
-
const o =
|
|
777
|
+
const o = Me(e.data), n = Ce(o, "next") ?? Ce(o, "mode");
|
|
778
778
|
n && t((a) => ({
|
|
779
779
|
...a,
|
|
780
780
|
currentMode: n,
|
|
781
|
-
planExecutionMode: n === "plan" ?
|
|
781
|
+
planExecutionMode: n === "plan" ? Ce(o, "planExecutionMode") : void 0
|
|
782
782
|
}));
|
|
783
783
|
break;
|
|
784
784
|
}
|
|
@@ -833,13 +833,13 @@ function Zu(e, t, o) {
|
|
|
833
833
|
}
|
|
834
834
|
const Xu = 8, gi = /* @__PURE__ */ new WeakMap(), Sc = /* @__PURE__ */ new WeakMap();
|
|
835
835
|
function ep(e) {
|
|
836
|
-
const t =
|
|
837
|
-
if (
|
|
838
|
-
const o =
|
|
836
|
+
const t = Me(Me(e?._meta)?.goalState);
|
|
837
|
+
if (Qt(t, "v") !== 2) return;
|
|
838
|
+
const o = Ce(t, "activity");
|
|
839
839
|
if (o !== "idle" && o !== "running" && o !== "verifying")
|
|
840
840
|
return;
|
|
841
841
|
if (t?.goal === null) {
|
|
842
|
-
const E =
|
|
842
|
+
const E = Me(t.clearedGoal), Z = Ce(E, "goalId"), oe = Qt(E, "revision"), pe = Qt(E, "updatedAt");
|
|
843
843
|
return t.clearedGoal !== void 0 && (!Z || oe === void 0 || oe <= 0 || pe === void 0) ? void 0 : {
|
|
844
844
|
v: 2,
|
|
845
845
|
goal: null,
|
|
@@ -853,10 +853,10 @@ function ep(e) {
|
|
|
853
853
|
} : {}
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
const n =
|
|
856
|
+
const n = Me(t?.goal), a = Ce(n, "goalId"), r = Qt(n, "revision"), s = Ce(n, "objective"), i = Ce(n, "status"), u = Me(n?.evidenceCursor)?.recordId, m = Qt(n, "turnCount"), g = Qt(n, "activeTimeMs"), k = Qt(n, "tokensUsed"), $ = Qt(n, "tokenBudget"), M = Qt(n, "turnBudget"), P = Qt(n, "activeTimeBudgetMs"), L = Qt(n, "createdAt"), I = Qt(n, "updatedAt");
|
|
857
857
|
if (!a || r === void 0 || !s || i !== "active" && i !== "paused" && i !== "blocked" && i !== "usage_limited" && i !== "complete" || u !== null && typeof u != "string" || m === void 0 || g === void 0 || L === void 0 || I === void 0)
|
|
858
858
|
return;
|
|
859
|
-
const q =
|
|
859
|
+
const q = Ce(n, "lastReason"), V = Ce(n, "limitKind"), O = V === "evidence_catalog" || V === "checkpoint_request" || V === "token_budget" || V === "turn_budget" || V === "time_budget" ? V : void 0;
|
|
860
860
|
return {
|
|
861
861
|
v: 2,
|
|
862
862
|
activity: o,
|
|
@@ -880,17 +880,17 @@ function ep(e) {
|
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
function Xs(e) {
|
|
883
|
-
const t =
|
|
883
|
+
const t = Ce(e, "displayName");
|
|
884
884
|
return t?.trim() ? t : void 0;
|
|
885
885
|
}
|
|
886
886
|
function dr(e) {
|
|
887
|
-
const t =
|
|
888
|
-
return
|
|
887
|
+
const t = Me(e?.state?.modes);
|
|
888
|
+
return Ce(t, "currentModeId") ?? Ce(t, "currentMode");
|
|
889
889
|
}
|
|
890
890
|
function ur(e) {
|
|
891
891
|
if (dr(e) !== "plan") return;
|
|
892
|
-
const t =
|
|
893
|
-
return
|
|
892
|
+
const t = Me(e?.state?.modes);
|
|
893
|
+
return Ce(Me(t?._meta), "planExecutionMode");
|
|
894
894
|
}
|
|
895
895
|
function pr(e) {
|
|
896
896
|
const t = e?.inputTokens ?? e?.totalTokens;
|
|
@@ -913,9 +913,9 @@ function tp(e) {
|
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
function Cc(e) {
|
|
916
|
-
const t =
|
|
916
|
+
const t = Me(e?._meta);
|
|
917
917
|
if (t?.parentToolCallId !== void 0) return;
|
|
918
|
-
const o =
|
|
918
|
+
const o = Me(t?.usage), n = {
|
|
919
919
|
...ds(o, "inputTokens"),
|
|
920
920
|
...ds(o, "outputTokens"),
|
|
921
921
|
...ds(o, "totalTokens"),
|
|
@@ -925,19 +925,19 @@ function Cc(e) {
|
|
|
925
925
|
return pr(n) !== void 0 ? n : void 0;
|
|
926
926
|
}
|
|
927
927
|
function ds(e, t) {
|
|
928
|
-
const o =
|
|
928
|
+
const o = Qt(e, t);
|
|
929
929
|
return o !== void 0 && o >= 0 ? { [t]: o } : {};
|
|
930
930
|
}
|
|
931
931
|
function op(e) {
|
|
932
932
|
if (!e) return { commands: [], skills: [] };
|
|
933
933
|
const o = (Array.isArray(e.availableCommands) ? e.availableCommands : []).flatMap((i) => {
|
|
934
|
-
const l =
|
|
934
|
+
const l = Me(i), u = Ce(l, "name");
|
|
935
935
|
if (!u) return [];
|
|
936
|
-
const m =
|
|
936
|
+
const m = Me(l?.input), g = {
|
|
937
937
|
name: u,
|
|
938
|
-
description:
|
|
939
|
-
input: m ? { hint:
|
|
940
|
-
_meta:
|
|
938
|
+
description: Ce(l, "description") ?? "",
|
|
939
|
+
input: m ? { hint: Ce(m, "hint") ?? "" } : null,
|
|
940
|
+
_meta: Me(l?._meta) ?? null
|
|
941
941
|
};
|
|
942
942
|
return [
|
|
943
943
|
{
|
|
@@ -949,7 +949,7 @@ function op(e) {
|
|
|
949
949
|
raw: g
|
|
950
950
|
}
|
|
951
951
|
];
|
|
952
|
-
}), n =
|
|
952
|
+
}), n = Me(e._meta)?.availableSkills, r = (Array.isArray(e.availableSkills) ? e.availableSkills : Array.isArray(n) ? n : []).filter(
|
|
953
953
|
(i) => typeof i == "string"
|
|
954
954
|
), s = r.map((i) => ({
|
|
955
955
|
name: i,
|
|
@@ -967,7 +967,7 @@ function op(e) {
|
|
|
967
967
|
};
|
|
968
968
|
}
|
|
969
969
|
function Tc(e) {
|
|
970
|
-
const t = e ?? void 0, o =
|
|
970
|
+
const t = e ?? void 0, o = Ce(t, "source"), n = Array.isArray(t?.altNames) ? t.altNames.filter(
|
|
971
971
|
(a) => typeof a == "string"
|
|
972
972
|
) : [];
|
|
973
973
|
return {
|
|
@@ -975,15 +975,15 @@ function Tc(e) {
|
|
|
975
975
|
...n.length > 0 ? { altNames: n } : {}
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Me(e) {
|
|
979
979
|
if (!(!e || typeof e != "object" || Array.isArray(e)))
|
|
980
980
|
return e;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Ce(e, t) {
|
|
983
983
|
const o = e?.[t];
|
|
984
984
|
return typeof o == "string" && o.length > 0 ? o : void 0;
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function Qt(e, t) {
|
|
987
987
|
const o = e?.[t];
|
|
988
988
|
return typeof o == "number" && Number.isFinite(o) ? o : void 0;
|
|
989
989
|
}
|
|
@@ -1522,7 +1522,7 @@ function hp({
|
|
|
1522
1522
|
const d = O(), p = gn(s, c), h = c.client, f = c.clientId, x = c.eventEpoch;
|
|
1523
1523
|
return (y = O()) => t.current === c && c.client === h && c.clientId === f && c.eventEpoch === x && s.get(c) === p && y.sessionId === d.sessionId && Pt(y.sessionContext) === Pt(d.sessionContext);
|
|
1524
1524
|
}
|
|
1525
|
-
async function
|
|
1525
|
+
async function Vt(c, d) {
|
|
1526
1526
|
if (!d()) return;
|
|
1527
1527
|
const p = Fn(s, c);
|
|
1528
1528
|
try {
|
|
@@ -1545,7 +1545,7 @@ function hp({
|
|
|
1545
1545
|
return await D(d, p);
|
|
1546
1546
|
} finally {
|
|
1547
1547
|
h.finish(), f && x() && O().workflowModeStatus !== void 0 && vs(s, c, () => {
|
|
1548
|
-
|
|
1548
|
+
Vt(c, x);
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
@@ -1689,7 +1689,7 @@ function hp({
|
|
|
1689
1689
|
if (B?.status !== "rejected") return !1;
|
|
1690
1690
|
const N = Vo(B.reason);
|
|
1691
1691
|
return N !== "source_limit_reached" && N !== "invalid_source" && N !== "source_attachment_not_found";
|
|
1692
|
-
}), !(t.current !== c || !y.length) &&
|
|
1692
|
+
}), !(t.current !== c || !y.length) && Kt(c)({
|
|
1693
1693
|
severity: "warning",
|
|
1694
1694
|
category: "user_action",
|
|
1695
1695
|
code: "daemon.sources.registration_failed",
|
|
@@ -1704,7 +1704,7 @@ function hp({
|
|
|
1704
1704
|
...c,
|
|
1705
1705
|
id: c.id ?? "stale-session-notice",
|
|
1706
1706
|
createdAt: c.createdAt ?? 0
|
|
1707
|
-
}),
|
|
1707
|
+
}), Kt = (c) => t.current !== c ? rt : (fe !== c && Be.clear(), fe = c, j);
|
|
1708
1708
|
function Mo() {
|
|
1709
1709
|
de(), Be.clear();
|
|
1710
1710
|
for (const [, c] of o.current)
|
|
@@ -1729,7 +1729,7 @@ function hp({
|
|
|
1729
1729
|
status: "disconnected",
|
|
1730
1730
|
sessionId: void 0
|
|
1731
1731
|
})), F(
|
|
1732
|
-
|
|
1732
|
+
ve(
|
|
1733
1733
|
j,
|
|
1734
1734
|
`${vp(d)} session failed`,
|
|
1735
1735
|
new Error(`Session ${d} timed out`),
|
|
@@ -1773,10 +1773,10 @@ function hp({
|
|
|
1773
1773
|
), y && o.current.delete(y), k.current = void 0, pe();
|
|
1774
1774
|
const Q = d === "load" && y === c && Pt(F) === Pt(W), ae = Pt(F) !== Pt(W) && (F?.kind === "standalone" || F?.kind === "live" || W?.kind === "standalone" || W?.kind === "live"), le = b.sessionId !== void 0 && b.sessionId !== c && F?.kind === W?.kind && (W?.kind === "standalone" || W?.kind === "live");
|
|
1775
1775
|
if (x) {
|
|
1776
|
-
const ce = () => x.detach().catch((
|
|
1776
|
+
const ce = () => x.detach().catch((De) => {
|
|
1777
1777
|
console.warn(
|
|
1778
1778
|
"[DaemonSessionActions] detach before session switch failed:",
|
|
1779
|
-
|
|
1779
|
+
De
|
|
1780
1780
|
);
|
|
1781
1781
|
});
|
|
1782
1782
|
Q ? (m.current = x, N.then(ce, () => {
|
|
@@ -1785,14 +1785,14 @@ function hp({
|
|
|
1785
1785
|
})) : ce();
|
|
1786
1786
|
}
|
|
1787
1787
|
return Q || (t.current = void 0), Q || C((ce) => {
|
|
1788
|
-
const
|
|
1788
|
+
const De = ae || le ? Un(ce, y, !1) : ce;
|
|
1789
1789
|
return {
|
|
1790
|
-
...
|
|
1790
|
+
...De,
|
|
1791
1791
|
status: "connecting",
|
|
1792
1792
|
sessionId: c,
|
|
1793
1793
|
sessionContext: W,
|
|
1794
1794
|
workspaceCwd: B,
|
|
1795
|
-
gitBranch: ce.workspaceCwd === B ?
|
|
1795
|
+
gitBranch: ce.workspaceCwd === B ? De.gitBranch : void 0,
|
|
1796
1796
|
standaloneSession: void 0,
|
|
1797
1797
|
clientId: void 0,
|
|
1798
1798
|
displayName: void 0,
|
|
@@ -1808,12 +1808,12 @@ function hp({
|
|
|
1808
1808
|
catchingUp: void 0
|
|
1809
1809
|
};
|
|
1810
1810
|
}), (!Q || !p?.reconcilePromptActivity) && _("idle"), n.current.clear(), gt(g), Q || e.reset(), J(d), H(c), z(W), se((ce) => ce + 1), N.catch((ce) => {
|
|
1811
|
-
throw X?.reconcilePromptActivity && r.current !== X.id || !Sn(ce) && (a.current === void 0 || a.current === X) && (X?.reconcilePromptActivity && O().sessionId === c && !zi(o.current, c) && _("idle"), C((
|
|
1812
|
-
...
|
|
1811
|
+
throw X?.reconcilePromptActivity && r.current !== X.id || !Sn(ce) && (a.current === void 0 || a.current === X) && (X?.reconcilePromptActivity && O().sessionId === c && !zi(o.current, c) && _("idle"), C((De) => ({
|
|
1812
|
+
...De,
|
|
1813
1813
|
error: ce instanceof Error ? ce.message : String(ce),
|
|
1814
1814
|
errorStatus: mo(ce),
|
|
1815
1815
|
standaloneSession: W?.kind === "standalone" ? {
|
|
1816
|
-
...
|
|
1816
|
+
...De.standaloneSession,
|
|
1817
1817
|
errorCode: Vo(ce)
|
|
1818
1818
|
} : void 0,
|
|
1819
1819
|
loadingTranscript: void 0,
|
|
@@ -1864,14 +1864,14 @@ function hp({
|
|
|
1864
1864
|
), _("idle"));
|
|
1865
1865
|
},
|
|
1866
1866
|
async sendPrompt(c, d) {
|
|
1867
|
-
const p =
|
|
1867
|
+
const p = Ee(
|
|
1868
1868
|
j,
|
|
1869
1869
|
t.current,
|
|
1870
1870
|
"Prompt failed",
|
|
1871
1871
|
"send_prompt"
|
|
1872
1872
|
), h = p.sessionId;
|
|
1873
1873
|
if (o.current.has(h))
|
|
1874
|
-
throw
|
|
1874
|
+
throw ve(
|
|
1875
1875
|
j,
|
|
1876
1876
|
"Prompt failed",
|
|
1877
1877
|
"A prompt is already in progress",
|
|
@@ -1939,9 +1939,9 @@ function hp({
|
|
|
1939
1939
|
...typeof d?.submittedPrompt == "string" ? { "qwen.submittedPrompt": d.submittedPrompt } : {},
|
|
1940
1940
|
...X ? { inputAnnotations: X } : {}
|
|
1941
1941
|
}), d?.retry && (ce.retry = !0);
|
|
1942
|
-
let
|
|
1942
|
+
let De;
|
|
1943
1943
|
try {
|
|
1944
|
-
|
|
1944
|
+
De = await p.submitPrompt(
|
|
1945
1945
|
ce,
|
|
1946
1946
|
x.signal,
|
|
1947
1947
|
...d?.beforeDispatch ? [d.beforeDispatch] : []
|
|
@@ -1972,8 +1972,8 @@ function hp({
|
|
|
1972
1972
|
_n(N, le.fileReferences)
|
|
1973
1973
|
), At && (ae = e.getSnapshot().blocks.at(-1)?.id));
|
|
1974
1974
|
const Tt = o.current.get(h);
|
|
1975
|
-
return Tt?.controller === x && (Tt.promptId =
|
|
1976
|
-
promptId:
|
|
1975
|
+
return Tt?.controller === x && (Tt.promptId = De.promptId), At?.(p, {
|
|
1976
|
+
promptId: De.promptId,
|
|
1977
1977
|
label: c,
|
|
1978
1978
|
...ae ? { blockId: ae } : {}
|
|
1979
1979
|
}), o.current.get(h)?.controller === x && Je(h), ge(
|
|
@@ -1981,19 +1981,19 @@ function hp({
|
|
|
1981
1981
|
le.references,
|
|
1982
1982
|
le.fileReferences,
|
|
1983
1983
|
N
|
|
1984
|
-
), d?.onAdmitted?.({ promptId:
|
|
1984
|
+
), d?.onAdmitted?.({ promptId: De.promptId }), await wl(
|
|
1985
1985
|
o.current,
|
|
1986
1986
|
n.current,
|
|
1987
1987
|
h,
|
|
1988
1988
|
x,
|
|
1989
|
-
|
|
1989
|
+
De.promptId
|
|
1990
1990
|
);
|
|
1991
1991
|
} catch (b) {
|
|
1992
1992
|
if (Sn(b)) {
|
|
1993
1993
|
if (t.current?.sessionId === h && e.dispatch({ type: "assistant.done", reason: "cancelled" }), d?.source === "mcp-app" && y) throw b;
|
|
1994
1994
|
return { stopReason: "cancelled" };
|
|
1995
1995
|
}
|
|
1996
|
-
throw tl(b) || (t.current?.sessionId === h && e.dispatch({ type: "assistant.done", reason: "error" }), d?.source === "mcp-app" && y) ? b :
|
|
1996
|
+
throw tl(b) || (t.current?.sessionId === h && e.dispatch({ type: "assistant.done", reason: "error" }), d?.source === "mcp-app" && y) ? b : ve(
|
|
1997
1997
|
j,
|
|
1998
1998
|
"Prompt failed",
|
|
1999
1999
|
b,
|
|
@@ -2008,14 +2008,14 @@ function hp({
|
|
|
2008
2008
|
}
|
|
2009
2009
|
},
|
|
2010
2010
|
async continueSession(c = {}) {
|
|
2011
|
-
const d =
|
|
2011
|
+
const d = Ee(
|
|
2012
2012
|
j,
|
|
2013
2013
|
t.current,
|
|
2014
2014
|
"Continue failed",
|
|
2015
2015
|
"continue_session"
|
|
2016
2016
|
), p = d.sessionId;
|
|
2017
2017
|
if (oe() || o.current.has(p))
|
|
2018
|
-
throw
|
|
2018
|
+
throw ve(
|
|
2019
2019
|
j,
|
|
2020
2020
|
"Continue failed",
|
|
2021
2021
|
"A prompt is already in progress",
|
|
@@ -2023,7 +2023,7 @@ function hp({
|
|
|
2023
2023
|
);
|
|
2024
2024
|
const h = O();
|
|
2025
2025
|
if (h.status !== "connected" || h.sessionId !== p || h.loadingTranscript || h.catchingUp || h.context?.sessionId !== p || h.context?.recovery?.canContinue !== !0)
|
|
2026
|
-
throw
|
|
2026
|
+
throw ve(
|
|
2027
2027
|
j,
|
|
2028
2028
|
"Continue failed",
|
|
2029
2029
|
"Session has no resumable interrupted turn",
|
|
@@ -2066,7 +2066,7 @@ function hp({
|
|
|
2066
2066
|
e.dispatch({ type: "assistant.done", reason: "cancelled" });
|
|
2067
2067
|
return;
|
|
2068
2068
|
}
|
|
2069
|
-
throw tl(U) ? U : (Ft(p, U),
|
|
2069
|
+
throw tl(U) ? U : (Ft(p, U), ve(
|
|
2070
2070
|
j,
|
|
2071
2071
|
"Continue failed",
|
|
2072
2072
|
U,
|
|
@@ -2080,7 +2080,7 @@ function hp({
|
|
|
2080
2080
|
}
|
|
2081
2081
|
},
|
|
2082
2082
|
async submitPrompt(c, d) {
|
|
2083
|
-
const p =
|
|
2083
|
+
const p = Ee(
|
|
2084
2084
|
j,
|
|
2085
2085
|
t.current,
|
|
2086
2086
|
"Prompt failed",
|
|
@@ -2236,7 +2236,7 @@ function hp({
|
|
|
2236
2236
|
}
|
|
2237
2237
|
},
|
|
2238
2238
|
async cancel() {
|
|
2239
|
-
const c =
|
|
2239
|
+
const c = Ee(
|
|
2240
2240
|
j,
|
|
2241
2241
|
t.current,
|
|
2242
2242
|
"Cancel failed",
|
|
@@ -2250,7 +2250,7 @@ function hp({
|
|
|
2250
2250
|
try {
|
|
2251
2251
|
await D(c.cancel(), "Cancel timed out"), p && t.current === c && o.current.get(c.sessionId)?.controller === p && O().context?.recovery && te(c);
|
|
2252
2252
|
} catch (h) {
|
|
2253
|
-
throw
|
|
2253
|
+
throw ve(
|
|
2254
2254
|
j,
|
|
2255
2255
|
"Cancel failed",
|
|
2256
2256
|
h,
|
|
@@ -2351,7 +2351,7 @@ function hp({
|
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
2353
|
async setModel(c) {
|
|
2354
|
-
const d =
|
|
2354
|
+
const d = Ee(
|
|
2355
2355
|
j,
|
|
2356
2356
|
t.current,
|
|
2357
2357
|
"Set model failed",
|
|
@@ -2389,8 +2389,8 @@ function hp({
|
|
|
2389
2389
|
}), h;
|
|
2390
2390
|
} catch (h) {
|
|
2391
2391
|
throw p() && O().workflowModeStatus !== void 0 && vs(s, d, () => {
|
|
2392
|
-
|
|
2393
|
-
}),
|
|
2392
|
+
Vt(d, p);
|
|
2393
|
+
}), ve(
|
|
2394
2394
|
j,
|
|
2395
2395
|
"Set model failed",
|
|
2396
2396
|
h,
|
|
@@ -2399,7 +2399,7 @@ function hp({
|
|
|
2399
2399
|
}
|
|
2400
2400
|
},
|
|
2401
2401
|
async setWorkflowMode(c) {
|
|
2402
|
-
const d =
|
|
2402
|
+
const d = Ee(
|
|
2403
2403
|
j,
|
|
2404
2404
|
t.current,
|
|
2405
2405
|
"Set Workflow mode failed",
|
|
@@ -2431,7 +2431,7 @@ function hp({
|
|
|
2431
2431
|
))?.persisted !== !0)
|
|
2432
2432
|
throw new Error("Workflow mode update was not confirmed");
|
|
2433
2433
|
} catch (y) {
|
|
2434
|
-
throw
|
|
2434
|
+
throw ve(
|
|
2435
2435
|
h() ? j : rt,
|
|
2436
2436
|
"Workflow mode update was not confirmed",
|
|
2437
2437
|
y,
|
|
@@ -2445,12 +2445,12 @@ function hp({
|
|
|
2445
2445
|
workflowModeStatus: "syncing"
|
|
2446
2446
|
} : y
|
|
2447
2447
|
), vs(s, d, () => {
|
|
2448
|
-
|
|
2448
|
+
Vt(d, h);
|
|
2449
2449
|
}));
|
|
2450
2450
|
}
|
|
2451
2451
|
},
|
|
2452
2452
|
async setReasoningEffort(c, d) {
|
|
2453
|
-
const p =
|
|
2453
|
+
const p = Ee(
|
|
2454
2454
|
j,
|
|
2455
2455
|
t.current,
|
|
2456
2456
|
"Set reasoning effort failed",
|
|
@@ -2507,20 +2507,20 @@ function hp({
|
|
|
2507
2507
|
};
|
|
2508
2508
|
}));
|
|
2509
2509
|
} catch (W) {
|
|
2510
|
-
throw
|
|
2511
|
-
|
|
2510
|
+
throw ve(
|
|
2511
|
+
Kt(p),
|
|
2512
2512
|
"Set reasoning effort failed",
|
|
2513
2513
|
W,
|
|
2514
2514
|
"set_reasoning_effort"
|
|
2515
2515
|
);
|
|
2516
2516
|
} finally {
|
|
2517
2517
|
U.finish(), F() && O().workflowModeStatus !== void 0 && vs(s, p, () => {
|
|
2518
|
-
|
|
2518
|
+
Vt(p, F);
|
|
2519
2519
|
}), h?.(), no === f && (no = void 0);
|
|
2520
2520
|
}
|
|
2521
2521
|
},
|
|
2522
2522
|
async setApprovalMode(c, d) {
|
|
2523
|
-
const p =
|
|
2523
|
+
const p = Ee(
|
|
2524
2524
|
j,
|
|
2525
2525
|
t.current,
|
|
2526
2526
|
"Set approval mode failed",
|
|
@@ -2544,7 +2544,7 @@ function hp({
|
|
|
2544
2544
|
} : x
|
|
2545
2545
|
), f;
|
|
2546
2546
|
} catch (f) {
|
|
2547
|
-
throw
|
|
2547
|
+
throw ve(
|
|
2548
2548
|
j,
|
|
2549
2549
|
"Set approval mode failed",
|
|
2550
2550
|
f,
|
|
@@ -2553,7 +2553,7 @@ function hp({
|
|
|
2553
2553
|
}
|
|
2554
2554
|
},
|
|
2555
2555
|
async respondToPermission(c, d) {
|
|
2556
|
-
const p =
|
|
2556
|
+
const p = Ee(
|
|
2557
2557
|
j,
|
|
2558
2558
|
t.current,
|
|
2559
2559
|
"Permission response failed",
|
|
@@ -2565,7 +2565,7 @@ function hp({
|
|
|
2565
2565
|
"Permission response timed out"
|
|
2566
2566
|
);
|
|
2567
2567
|
} catch (h) {
|
|
2568
|
-
throw
|
|
2568
|
+
throw ve(
|
|
2569
2569
|
j,
|
|
2570
2570
|
"Permission response failed",
|
|
2571
2571
|
h,
|
|
@@ -2574,7 +2574,7 @@ function hp({
|
|
|
2574
2574
|
}
|
|
2575
2575
|
},
|
|
2576
2576
|
async submitPermission(c, d, p) {
|
|
2577
|
-
const h =
|
|
2577
|
+
const h = Ee(
|
|
2578
2578
|
j,
|
|
2579
2579
|
t.current,
|
|
2580
2580
|
"Permission response failed",
|
|
@@ -2592,7 +2592,7 @@ function hp({
|
|
|
2592
2592
|
"Permission response timed out"
|
|
2593
2593
|
);
|
|
2594
2594
|
} catch (x) {
|
|
2595
|
-
throw
|
|
2595
|
+
throw ve(
|
|
2596
2596
|
j,
|
|
2597
2597
|
"Permission response failed",
|
|
2598
2598
|
x,
|
|
@@ -2617,7 +2617,7 @@ function hp({
|
|
|
2617
2617
|
"List sessions timed out"
|
|
2618
2618
|
);
|
|
2619
2619
|
} catch (p) {
|
|
2620
|
-
throw
|
|
2620
|
+
throw ve(
|
|
2621
2621
|
j,
|
|
2622
2622
|
"List sessions failed",
|
|
2623
2623
|
p,
|
|
@@ -2629,7 +2629,7 @@ function hp({
|
|
|
2629
2629
|
return w(c, "load", d);
|
|
2630
2630
|
},
|
|
2631
2631
|
async reloadSession(c, d) {
|
|
2632
|
-
const p =
|
|
2632
|
+
const p = Ee(
|
|
2633
2633
|
j,
|
|
2634
2634
|
t.current,
|
|
2635
2635
|
"Reload session failed",
|
|
@@ -2694,14 +2694,14 @@ function hp({
|
|
|
2694
2694
|
}, N = t.current, X = N && O().sessionId === N.sessionId ? N : void 0;
|
|
2695
2695
|
if (X) {
|
|
2696
2696
|
if (d?.kind === "standalone") {
|
|
2697
|
-
const
|
|
2697
|
+
const De = await y(
|
|
2698
2698
|
I({
|
|
2699
2699
|
...c?.modelServiceId !== void 0 ? { modelServiceId: c.modelServiceId } : {},
|
|
2700
2700
|
...c?.approvalMode !== void 0 ? { approvalMode: c.approvalMode } : {}
|
|
2701
2701
|
}),
|
|
2702
2702
|
(Tt) => Tt.detach()
|
|
2703
2703
|
);
|
|
2704
|
-
return bs(
|
|
2704
|
+
return bs(De.clientId, De.sessionId), De.session;
|
|
2705
2705
|
}
|
|
2706
2706
|
const ce = await D(
|
|
2707
2707
|
y(
|
|
@@ -2710,9 +2710,9 @@ function hp({
|
|
|
2710
2710
|
...d?.kind === "workspace" ? { workspaceCwd: d.cwd } : {},
|
|
2711
2711
|
...B
|
|
2712
2712
|
}),
|
|
2713
|
-
(
|
|
2714
|
-
|
|
2715
|
-
|
|
2713
|
+
(De) => X.client.detachSession(
|
|
2714
|
+
De.sessionId,
|
|
2715
|
+
De.clientId
|
|
2716
2716
|
)
|
|
2717
2717
|
),
|
|
2718
2718
|
"Create session timed out",
|
|
@@ -2794,7 +2794,7 @@ function hp({
|
|
|
2794
2794
|
error: b.message,
|
|
2795
2795
|
errorStatus: mo(b.originalError),
|
|
2796
2796
|
missingSession: !1
|
|
2797
|
-
})),
|
|
2797
|
+
})), ve(
|
|
2798
2798
|
j,
|
|
2799
2799
|
`Create session failed${d?.kind === "workspace" ? ` (workspace: ${d.cwd})` : ""}`,
|
|
2800
2800
|
b,
|
|
@@ -2804,7 +2804,7 @@ function hp({
|
|
|
2804
2804
|
}
|
|
2805
2805
|
},
|
|
2806
2806
|
async attachSession() {
|
|
2807
|
-
const c =
|
|
2807
|
+
const c = Ee(
|
|
2808
2808
|
j,
|
|
2809
2809
|
t.current,
|
|
2810
2810
|
"Attach session failed",
|
|
@@ -2839,7 +2839,7 @@ function hp({
|
|
|
2839
2839
|
},
|
|
2840
2840
|
async newSession() {
|
|
2841
2841
|
if (O().sessionContext?.kind === "live")
|
|
2842
|
-
throw
|
|
2842
|
+
throw ve(
|
|
2843
2843
|
j,
|
|
2844
2844
|
"Create session failed",
|
|
2845
2845
|
new Error("Live session context does not support create"),
|
|
@@ -2866,7 +2866,7 @@ function hp({
|
|
|
2866
2866
|
"Release session timed out"
|
|
2867
2867
|
), d && Ze?.(d, "deleted", c);
|
|
2868
2868
|
} catch (d) {
|
|
2869
|
-
throw
|
|
2869
|
+
throw ve(
|
|
2870
2870
|
j,
|
|
2871
2871
|
"Release session failed",
|
|
2872
2872
|
d,
|
|
@@ -2875,7 +2875,7 @@ function hp({
|
|
|
2875
2875
|
}
|
|
2876
2876
|
},
|
|
2877
2877
|
async closeSession() {
|
|
2878
|
-
const c =
|
|
2878
|
+
const c = Ee(
|
|
2879
2879
|
j,
|
|
2880
2880
|
t.current,
|
|
2881
2881
|
"Close session failed",
|
|
@@ -2884,7 +2884,7 @@ function hp({
|
|
|
2884
2884
|
try {
|
|
2885
2885
|
await D(c.close(), "Close session timed out");
|
|
2886
2886
|
} catch (d) {
|
|
2887
|
-
throw
|
|
2887
|
+
throw ve(
|
|
2888
2888
|
j,
|
|
2889
2889
|
"Close session failed",
|
|
2890
2890
|
d,
|
|
@@ -2893,7 +2893,7 @@ function hp({
|
|
|
2893
2893
|
}
|
|
2894
2894
|
},
|
|
2895
2895
|
async refreshCommands() {
|
|
2896
|
-
const c =
|
|
2896
|
+
const c = Ee(
|
|
2897
2897
|
j,
|
|
2898
2898
|
t.current,
|
|
2899
2899
|
"Refresh commands failed",
|
|
@@ -2914,7 +2914,7 @@ function hp({
|
|
|
2914
2914
|
}));
|
|
2915
2915
|
}
|
|
2916
2916
|
} catch (d) {
|
|
2917
|
-
throw
|
|
2917
|
+
throw ve(
|
|
2918
2918
|
j,
|
|
2919
2919
|
"Refresh commands failed",
|
|
2920
2920
|
d,
|
|
@@ -2926,7 +2926,7 @@ function hp({
|
|
|
2926
2926
|
const d = t.current;
|
|
2927
2927
|
if (!d && c?.silent)
|
|
2928
2928
|
throw new Error("Daemon session is not connected");
|
|
2929
|
-
const p =
|
|
2929
|
+
const p = Ee(
|
|
2930
2930
|
j,
|
|
2931
2931
|
d,
|
|
2932
2932
|
"Load context failed",
|
|
@@ -2961,7 +2961,7 @@ function hp({
|
|
|
2961
2961
|
} catch (x) {
|
|
2962
2962
|
throw C(
|
|
2963
2963
|
(y) => f(y) && h() ? { ...y, workflowModeStatus: "unknown" } : y
|
|
2964
|
-
), c?.silent && ul(x) ? x :
|
|
2964
|
+
), c?.silent && ul(x) ? x : ve(
|
|
2965
2965
|
j,
|
|
2966
2966
|
"Load context failed",
|
|
2967
2967
|
x,
|
|
@@ -2988,8 +2988,8 @@ function hp({
|
|
|
2988
2988
|
if (c?.silent && ul(y))
|
|
2989
2989
|
throw y;
|
|
2990
2990
|
const b = t.current === d;
|
|
2991
|
-
throw
|
|
2992
|
-
|
|
2991
|
+
throw ve(
|
|
2992
|
+
Kt(d),
|
|
2993
2993
|
"Load context usage failed",
|
|
2994
2994
|
y,
|
|
2995
2995
|
"load_context_usage",
|
|
@@ -3004,7 +3004,7 @@ function hp({
|
|
|
3004
3004
|
}
|
|
3005
3005
|
},
|
|
3006
3006
|
async renameSession(c) {
|
|
3007
|
-
const d =
|
|
3007
|
+
const d = Ee(
|
|
3008
3008
|
j,
|
|
3009
3009
|
t.current,
|
|
3010
3010
|
"Rename session failed",
|
|
@@ -3016,7 +3016,7 @@ function hp({
|
|
|
3016
3016
|
"Rename session timed out"
|
|
3017
3017
|
);
|
|
3018
3018
|
} catch (p) {
|
|
3019
|
-
throw
|
|
3019
|
+
throw ve(
|
|
3020
3020
|
j,
|
|
3021
3021
|
"Rename session failed",
|
|
3022
3022
|
p,
|
|
@@ -3025,7 +3025,7 @@ function hp({
|
|
|
3025
3025
|
}
|
|
3026
3026
|
},
|
|
3027
3027
|
async bindSessionPr(c) {
|
|
3028
|
-
const d =
|
|
3028
|
+
const d = Ee(
|
|
3029
3029
|
j,
|
|
3030
3030
|
t.current,
|
|
3031
3031
|
"Bind PR failed",
|
|
@@ -3037,7 +3037,7 @@ function hp({
|
|
|
3037
3037
|
"Bind PR timed out"
|
|
3038
3038
|
);
|
|
3039
3039
|
} catch (p) {
|
|
3040
|
-
throw
|
|
3040
|
+
throw ve(
|
|
3041
3041
|
j,
|
|
3042
3042
|
"Bind PR failed",
|
|
3043
3043
|
p,
|
|
@@ -3046,7 +3046,7 @@ function hp({
|
|
|
3046
3046
|
}
|
|
3047
3047
|
},
|
|
3048
3048
|
async recapSession() {
|
|
3049
|
-
const c =
|
|
3049
|
+
const c = Ee(
|
|
3050
3050
|
j,
|
|
3051
3051
|
t.current,
|
|
3052
3052
|
"Recap session failed",
|
|
@@ -3058,7 +3058,7 @@ function hp({
|
|
|
3058
3058
|
"Recap session timed out"
|
|
3059
3059
|
);
|
|
3060
3060
|
} catch (d) {
|
|
3061
|
-
throw
|
|
3061
|
+
throw ve(
|
|
3062
3062
|
j,
|
|
3063
3063
|
"Recap session failed",
|
|
3064
3064
|
d,
|
|
@@ -3067,7 +3067,7 @@ function hp({
|
|
|
3067
3067
|
}
|
|
3068
3068
|
},
|
|
3069
3069
|
async *generateSessionContent(c, d) {
|
|
3070
|
-
yield*
|
|
3070
|
+
yield* Ee(
|
|
3071
3071
|
j,
|
|
3072
3072
|
t.current,
|
|
3073
3073
|
"Generate content failed",
|
|
@@ -3075,7 +3075,7 @@ function hp({
|
|
|
3075
3075
|
).generateContent(c, d);
|
|
3076
3076
|
},
|
|
3077
3077
|
async getRewindSnapshots(c) {
|
|
3078
|
-
const d =
|
|
3078
|
+
const d = Ee(
|
|
3079
3079
|
j,
|
|
3080
3080
|
t.current,
|
|
3081
3081
|
"Load rewind snapshots failed",
|
|
@@ -3087,7 +3087,7 @@ function hp({
|
|
|
3087
3087
|
"Load rewind snapshots timed out"
|
|
3088
3088
|
);
|
|
3089
3089
|
} catch (p) {
|
|
3090
|
-
throw c?.silent ? p :
|
|
3090
|
+
throw c?.silent ? p : ve(
|
|
3091
3091
|
j,
|
|
3092
3092
|
"Load rewind snapshots failed",
|
|
3093
3093
|
p,
|
|
@@ -3096,7 +3096,7 @@ function hp({
|
|
|
3096
3096
|
}
|
|
3097
3097
|
},
|
|
3098
3098
|
async rewindSession(c, d) {
|
|
3099
|
-
const p =
|
|
3099
|
+
const p = Ee(
|
|
3100
3100
|
j,
|
|
3101
3101
|
t.current,
|
|
3102
3102
|
"Rewind session failed",
|
|
@@ -3109,7 +3109,7 @@ function hp({
|
|
|
3109
3109
|
);
|
|
3110
3110
|
return Ze?.(p, "rewound"), h;
|
|
3111
3111
|
} catch (h) {
|
|
3112
|
-
throw d?.silent ? h :
|
|
3112
|
+
throw d?.silent ? h : ve(
|
|
3113
3113
|
j,
|
|
3114
3114
|
"Rewind session failed",
|
|
3115
3115
|
h,
|
|
@@ -3118,7 +3118,7 @@ function hp({
|
|
|
3118
3118
|
}
|
|
3119
3119
|
},
|
|
3120
3120
|
async *btwSessionStream(c, d) {
|
|
3121
|
-
const p =
|
|
3121
|
+
const p = Ee(
|
|
3122
3122
|
j,
|
|
3123
3123
|
t.current,
|
|
3124
3124
|
"Side question failed",
|
|
@@ -3145,7 +3145,7 @@ function hp({
|
|
|
3145
3145
|
}
|
|
3146
3146
|
throw new Error("Side question stream ended before completion");
|
|
3147
3147
|
} catch (f) {
|
|
3148
|
-
throw d?.signal?.aborted || Sn(f) ? f :
|
|
3148
|
+
throw d?.signal?.aborted || Sn(f) ? f : ve(
|
|
3149
3149
|
j,
|
|
3150
3150
|
"Side question failed",
|
|
3151
3151
|
f,
|
|
@@ -3155,7 +3155,7 @@ function hp({
|
|
|
3155
3155
|
}
|
|
3156
3156
|
},
|
|
3157
3157
|
async btwSession(c, d) {
|
|
3158
|
-
const p =
|
|
3158
|
+
const p = Ee(
|
|
3159
3159
|
j,
|
|
3160
3160
|
t.current,
|
|
3161
3161
|
"Side question failed",
|
|
@@ -3167,7 +3167,7 @@ function hp({
|
|
|
3167
3167
|
"Side question timed out"
|
|
3168
3168
|
);
|
|
3169
3169
|
} catch (h) {
|
|
3170
|
-
throw d?.signal?.aborted || Sn(h) ? h :
|
|
3170
|
+
throw d?.signal?.aborted || Sn(h) ? h : ve(
|
|
3171
3171
|
j,
|
|
3172
3172
|
"Side question failed",
|
|
3173
3173
|
h,
|
|
@@ -3176,7 +3176,7 @@ function hp({
|
|
|
3176
3176
|
}
|
|
3177
3177
|
},
|
|
3178
3178
|
async uploadAttachment(c, d) {
|
|
3179
|
-
const p =
|
|
3179
|
+
const p = Ee(
|
|
3180
3180
|
j,
|
|
3181
3181
|
t.current,
|
|
3182
3182
|
"Attachment upload failed",
|
|
@@ -3198,7 +3198,7 @@ function hp({
|
|
|
3198
3198
|
);
|
|
3199
3199
|
},
|
|
3200
3200
|
async readAttachment(c) {
|
|
3201
|
-
return await
|
|
3201
|
+
return await Ee(
|
|
3202
3202
|
j,
|
|
3203
3203
|
t.current,
|
|
3204
3204
|
"Attachment preview failed",
|
|
@@ -3213,7 +3213,7 @@ function hp({
|
|
|
3213
3213
|
async removeAttachment(c, d) {
|
|
3214
3214
|
const p = t.current, h = d?.sessionId ?? p?.sessionId, f = p?.client ?? Jo;
|
|
3215
3215
|
if (!h || !f)
|
|
3216
|
-
throw
|
|
3216
|
+
throw ve(
|
|
3217
3217
|
j,
|
|
3218
3218
|
"Attachment removal failed",
|
|
3219
3219
|
new Error("Daemon session is not connected"),
|
|
@@ -3309,7 +3309,7 @@ function hp({
|
|
|
3309
3309
|
return h.removed && dt?.(p, c), h;
|
|
3310
3310
|
},
|
|
3311
3311
|
async sendShellCommand(c) {
|
|
3312
|
-
const d =
|
|
3312
|
+
const d = Ee(
|
|
3313
3313
|
j,
|
|
3314
3314
|
t.current,
|
|
3315
3315
|
"Shell command failed",
|
|
@@ -3321,7 +3321,7 @@ function hp({
|
|
|
3321
3321
|
try {
|
|
3322
3322
|
return await d.shellCommand(c, h.signal);
|
|
3323
3323
|
} catch (f) {
|
|
3324
|
-
throw Ft(d.sessionId, f),
|
|
3324
|
+
throw Ft(d.sessionId, f), ve(
|
|
3325
3325
|
j,
|
|
3326
3326
|
"Shell command failed",
|
|
3327
3327
|
f,
|
|
@@ -3337,7 +3337,7 @@ function hp({
|
|
|
3337
3337
|
try {
|
|
3338
3338
|
return await D(d.tasks(), "Get tasks timed out");
|
|
3339
3339
|
} catch (p) {
|
|
3340
|
-
throw p instanceof Error && p.message === "Daemon session is not connected" || c?.silent && vl(p) ? p :
|
|
3340
|
+
throw p instanceof Error && p.message === "Daemon session is not connected" || c?.silent && vl(p) ? p : ve(
|
|
3341
3341
|
j,
|
|
3342
3342
|
"Get tasks failed",
|
|
3343
3343
|
p,
|
|
@@ -3366,7 +3366,7 @@ function hp({
|
|
|
3366
3366
|
"Get tasks timed out"
|
|
3367
3367
|
);
|
|
3368
3368
|
} catch (p) {
|
|
3369
|
-
throw p instanceof Error && p.message === "Daemon session is not connected" || c?.silent && vl(p) ? p :
|
|
3369
|
+
throw p instanceof Error && p.message === "Daemon session is not connected" || c?.silent && vl(p) ? p : ve(
|
|
3370
3370
|
j,
|
|
3371
3371
|
"Get tasks failed",
|
|
3372
3372
|
p,
|
|
@@ -3379,7 +3379,7 @@ function hp({
|
|
|
3379
3379
|
}
|
|
3380
3380
|
},
|
|
3381
3381
|
async cancelTask(c, d) {
|
|
3382
|
-
const p =
|
|
3382
|
+
const p = Ee(
|
|
3383
3383
|
j,
|
|
3384
3384
|
t.current,
|
|
3385
3385
|
"Cancel task failed",
|
|
@@ -3391,7 +3391,7 @@ function hp({
|
|
|
3391
3391
|
"Cancel task timed out"
|
|
3392
3392
|
);
|
|
3393
3393
|
} catch (h) {
|
|
3394
|
-
throw
|
|
3394
|
+
throw ve(
|
|
3395
3395
|
j,
|
|
3396
3396
|
"Cancel task failed",
|
|
3397
3397
|
h,
|
|
@@ -3400,7 +3400,7 @@ function hp({
|
|
|
3400
3400
|
}
|
|
3401
3401
|
},
|
|
3402
3402
|
async controlWorkflowTask(c, d) {
|
|
3403
|
-
const p =
|
|
3403
|
+
const p = Ee(
|
|
3404
3404
|
j,
|
|
3405
3405
|
t.current,
|
|
3406
3406
|
"Control workflow failed",
|
|
@@ -3412,8 +3412,8 @@ function hp({
|
|
|
3412
3412
|
"Control workflow timed out"
|
|
3413
3413
|
);
|
|
3414
3414
|
} catch (h) {
|
|
3415
|
-
throw
|
|
3416
|
-
|
|
3415
|
+
throw ve(
|
|
3416
|
+
Kt(p),
|
|
3417
3417
|
"Control workflow failed",
|
|
3418
3418
|
h,
|
|
3419
3419
|
"control_workflow"
|
|
@@ -3421,7 +3421,7 @@ function hp({
|
|
|
3421
3421
|
}
|
|
3422
3422
|
},
|
|
3423
3423
|
async runSavedWorkflow(c) {
|
|
3424
|
-
const d =
|
|
3424
|
+
const d = Ee(
|
|
3425
3425
|
j,
|
|
3426
3426
|
t.current,
|
|
3427
3427
|
"Run saved workflow failed",
|
|
@@ -3439,8 +3439,8 @@ function hp({
|
|
|
3439
3439
|
);
|
|
3440
3440
|
return { started: p, ...h };
|
|
3441
3441
|
} catch (p) {
|
|
3442
|
-
throw
|
|
3443
|
-
|
|
3442
|
+
throw ve(
|
|
3443
|
+
Kt(d),
|
|
3444
3444
|
"Run saved workflow failed",
|
|
3445
3445
|
p,
|
|
3446
3446
|
"run_saved_workflow"
|
|
@@ -3448,7 +3448,7 @@ function hp({
|
|
|
3448
3448
|
}
|
|
3449
3449
|
},
|
|
3450
3450
|
async readSavedWorkflow(c) {
|
|
3451
|
-
const d =
|
|
3451
|
+
const d = Ee(
|
|
3452
3452
|
j,
|
|
3453
3453
|
t.current,
|
|
3454
3454
|
"Read saved workflow failed",
|
|
@@ -3460,8 +3460,8 @@ function hp({
|
|
|
3460
3460
|
"Read saved workflow timed out"
|
|
3461
3461
|
)).workflow;
|
|
3462
3462
|
} catch (p) {
|
|
3463
|
-
throw
|
|
3464
|
-
|
|
3463
|
+
throw ve(
|
|
3464
|
+
Kt(d),
|
|
3465
3465
|
"Read saved workflow failed",
|
|
3466
3466
|
p,
|
|
3467
3467
|
"read_saved_workflow"
|
|
@@ -3469,7 +3469,7 @@ function hp({
|
|
|
3469
3469
|
}
|
|
3470
3470
|
},
|
|
3471
3471
|
async clearGoal() {
|
|
3472
|
-
const c =
|
|
3472
|
+
const c = Ee(
|
|
3473
3473
|
j,
|
|
3474
3474
|
t.current,
|
|
3475
3475
|
"Clear goal failed",
|
|
@@ -3481,7 +3481,7 @@ function hp({
|
|
|
3481
3481
|
"Clear goal timed out"
|
|
3482
3482
|
);
|
|
3483
3483
|
} catch (d) {
|
|
3484
|
-
throw
|
|
3484
|
+
throw ve(
|
|
3485
3485
|
j,
|
|
3486
3486
|
"Clear goal failed",
|
|
3487
3487
|
d,
|
|
@@ -3490,7 +3490,7 @@ function hp({
|
|
|
3490
3490
|
}
|
|
3491
3491
|
},
|
|
3492
3492
|
async getGoal() {
|
|
3493
|
-
const c =
|
|
3493
|
+
const c = Ee(
|
|
3494
3494
|
j,
|
|
3495
3495
|
t.current,
|
|
3496
3496
|
"Load goal failed",
|
|
@@ -3511,7 +3511,7 @@ function hp({
|
|
|
3511
3511
|
return f === h.goalState ? h : { ...h, goalState: f };
|
|
3512
3512
|
}), p;
|
|
3513
3513
|
} catch (p) {
|
|
3514
|
-
throw
|
|
3514
|
+
throw ve(
|
|
3515
3515
|
j,
|
|
3516
3516
|
"Load goal failed",
|
|
3517
3517
|
p,
|
|
@@ -3528,7 +3528,7 @@ function hp({
|
|
|
3528
3528
|
);
|
|
3529
3529
|
},
|
|
3530
3530
|
async controlGoal(c) {
|
|
3531
|
-
const d =
|
|
3531
|
+
const d = Ee(
|
|
3532
3532
|
j,
|
|
3533
3533
|
t.current,
|
|
3534
3534
|
"Control goal failed",
|
|
@@ -3549,7 +3549,7 @@ function hp({
|
|
|
3549
3549
|
} : h
|
|
3550
3550
|
), p;
|
|
3551
3551
|
} catch (p) {
|
|
3552
|
-
throw
|
|
3552
|
+
throw ve(
|
|
3553
3553
|
j,
|
|
3554
3554
|
"Control goal failed",
|
|
3555
3555
|
p,
|
|
@@ -3563,7 +3563,7 @@ function hp({
|
|
|
3563
3563
|
try {
|
|
3564
3564
|
return await D(c.stats(), "Load stats timed out");
|
|
3565
3565
|
} catch (d) {
|
|
3566
|
-
throw up(d) ? d :
|
|
3566
|
+
throw up(d) ? d : ve(
|
|
3567
3567
|
j,
|
|
3568
3568
|
"Load stats failed",
|
|
3569
3569
|
d,
|
|
@@ -3606,7 +3606,7 @@ function hp({
|
|
|
3606
3606
|
);
|
|
3607
3607
|
},
|
|
3608
3608
|
async respondToGlobalPermission(c, d) {
|
|
3609
|
-
const p =
|
|
3609
|
+
const p = Ee(
|
|
3610
3610
|
j,
|
|
3611
3611
|
t.current,
|
|
3612
3612
|
"Global permission response failed",
|
|
@@ -3618,7 +3618,7 @@ function hp({
|
|
|
3618
3618
|
"Global permission response timed out"
|
|
3619
3619
|
);
|
|
3620
3620
|
} catch (h) {
|
|
3621
|
-
throw
|
|
3621
|
+
throw ve(
|
|
3622
3622
|
j,
|
|
3623
3623
|
"Global permission response failed",
|
|
3624
3624
|
h,
|
|
@@ -3632,7 +3632,7 @@ function hp({
|
|
|
3632
3632
|
"A branch request is already in progress",
|
|
3633
3633
|
"InvalidStateError"
|
|
3634
3634
|
);
|
|
3635
|
-
const d =
|
|
3635
|
+
const d = Ee(
|
|
3636
3636
|
j,
|
|
3637
3637
|
t.current,
|
|
3638
3638
|
"Branch session failed",
|
|
@@ -3648,7 +3648,7 @@ function hp({
|
|
|
3648
3648
|
return y ? (b?.clientId && bs(b.clientId, b.sessionId), w(x.sessionId, "load").catch(
|
|
3649
3649
|
(F) => {
|
|
3650
3650
|
b?.clientId && d.client.detachSession(b.sessionId, b.clientId).catch(() => {
|
|
3651
|
-
}), !Sn(F) &&
|
|
3651
|
+
}), !Sn(F) && ve(
|
|
3652
3652
|
j,
|
|
3653
3653
|
"Branch session failed",
|
|
3654
3654
|
F,
|
|
@@ -3663,7 +3663,7 @@ function hp({
|
|
|
3663
3663
|
...x.sourceWarnings?.length ? { sourceWarnings: x.sourceWarnings } : {}
|
|
3664
3664
|
};
|
|
3665
3665
|
} catch (f) {
|
|
3666
|
-
throw hu(f) || f instanceof yo && f.body?.code === "branch_worktree_activation_failed" ? Wc(f) :
|
|
3666
|
+
throw hu(f) || f instanceof yo && f.body?.code === "branch_worktree_activation_failed" ? Wc(f) : ve(
|
|
3667
3667
|
j,
|
|
3668
3668
|
"Branch session failed",
|
|
3669
3669
|
f,
|
|
@@ -3673,8 +3673,54 @@ function hp({
|
|
|
3673
3673
|
So = !1;
|
|
3674
3674
|
}
|
|
3675
3675
|
},
|
|
3676
|
+
async createWorktreeBranch(c) {
|
|
3677
|
+
const d = Ee(
|
|
3678
|
+
j,
|
|
3679
|
+
t.current,
|
|
3680
|
+
"Create worktree branch failed",
|
|
3681
|
+
"create_worktree_branch"
|
|
3682
|
+
);
|
|
3683
|
+
try {
|
|
3684
|
+
return await D(
|
|
3685
|
+
d.client.createWorktreeBranch(d.sessionId, c, {
|
|
3686
|
+
workspaceCwd: d.workspaceCwd
|
|
3687
|
+
}),
|
|
3688
|
+
"Create worktree branch timed out"
|
|
3689
|
+
);
|
|
3690
|
+
} catch (p) {
|
|
3691
|
+
throw ve(
|
|
3692
|
+
j,
|
|
3693
|
+
"Create worktree branch failed",
|
|
3694
|
+
p,
|
|
3695
|
+
"create_worktree_branch"
|
|
3696
|
+
);
|
|
3697
|
+
}
|
|
3698
|
+
},
|
|
3699
|
+
async handoffWorktree(c) {
|
|
3700
|
+
const d = Ee(
|
|
3701
|
+
j,
|
|
3702
|
+
t.current,
|
|
3703
|
+
"Worktree handoff failed",
|
|
3704
|
+
"handoff_worktree"
|
|
3705
|
+
);
|
|
3706
|
+
try {
|
|
3707
|
+
return await D(
|
|
3708
|
+
d.client.handoffWorktreeSession(d.sessionId, c, {
|
|
3709
|
+
workspaceCwd: d.workspaceCwd
|
|
3710
|
+
}),
|
|
3711
|
+
"Worktree handoff timed out"
|
|
3712
|
+
);
|
|
3713
|
+
} catch (p) {
|
|
3714
|
+
throw ve(
|
|
3715
|
+
j,
|
|
3716
|
+
"Worktree handoff failed",
|
|
3717
|
+
p,
|
|
3718
|
+
"handoff_worktree"
|
|
3719
|
+
);
|
|
3720
|
+
}
|
|
3721
|
+
},
|
|
3676
3722
|
async forkSession(c) {
|
|
3677
|
-
const d =
|
|
3723
|
+
const d = Ee(
|
|
3678
3724
|
j,
|
|
3679
3725
|
t.current,
|
|
3680
3726
|
"Fork session failed",
|
|
@@ -3686,7 +3732,7 @@ function hp({
|
|
|
3686
3732
|
"Fork session timed out"
|
|
3687
3733
|
);
|
|
3688
3734
|
} catch (p) {
|
|
3689
|
-
throw
|
|
3735
|
+
throw ve(
|
|
3690
3736
|
j,
|
|
3691
3737
|
"Fork session failed",
|
|
3692
3738
|
p,
|
|
@@ -3754,9 +3800,9 @@ function kp(e) {
|
|
|
3754
3800
|
const t = typeof e.state.models == "object" && e.state.models !== null ? e.state.models : void 0, o = t?.currentModelId ?? t?.currentModel;
|
|
3755
3801
|
return typeof o == "string" ? o : void 0;
|
|
3756
3802
|
}
|
|
3757
|
-
function
|
|
3803
|
+
function Ee(e, t, o, n) {
|
|
3758
3804
|
if (!t)
|
|
3759
|
-
throw
|
|
3805
|
+
throw ve(
|
|
3760
3806
|
e,
|
|
3761
3807
|
o,
|
|
3762
3808
|
"Daemon session is not connected",
|
|
@@ -3764,7 +3810,7 @@ function _e(e, t, o, n) {
|
|
|
3764
3810
|
);
|
|
3765
3811
|
return t;
|
|
3766
3812
|
}
|
|
3767
|
-
function
|
|
3813
|
+
function ve(e, t, o, n, a) {
|
|
3768
3814
|
if (Sn(o)) {
|
|
3769
3815
|
if (o instanceof Error) return o;
|
|
3770
3816
|
const l = o instanceof DOMException ? o.message : "Aborted", u = new Error(l);
|
|
@@ -3833,7 +3879,7 @@ function yp(e, t, o, n) {
|
|
|
3833
3879
|
if (!a) return;
|
|
3834
3880
|
const r = Qi(a.promptId) ?? Tp(t);
|
|
3835
3881
|
if (!r) return;
|
|
3836
|
-
const s =
|
|
3882
|
+
const s = be(a.data) ? a.data.truncatedEvents : void 0;
|
|
3837
3883
|
return {
|
|
3838
3884
|
marker: a,
|
|
3839
3885
|
promptId: r,
|
|
@@ -3858,13 +3904,13 @@ function Sp(e, t) {
|
|
|
3858
3904
|
}
|
|
3859
3905
|
function Tn(e) {
|
|
3860
3906
|
const t = Qi(e.promptId);
|
|
3861
|
-
return t || (
|
|
3907
|
+
return t || (be(e.data) ? Qi(e.data.promptId) : void 0);
|
|
3862
3908
|
}
|
|
3863
3909
|
function Oc(e) {
|
|
3864
|
-
return e.type === "history_truncated" &&
|
|
3910
|
+
return e.type === "history_truncated" && be(e.data) && e.data.scope === "live_journal";
|
|
3865
3911
|
}
|
|
3866
3912
|
function Cp(e) {
|
|
3867
|
-
return wu(e)?.type === "history_truncated" && Oc(e) &&
|
|
3913
|
+
return wu(e)?.type === "history_truncated" && Oc(e) && be(e.data) && e.data.fullTranscriptAvailable === !0;
|
|
3868
3914
|
}
|
|
3869
3915
|
function Tp(e) {
|
|
3870
3916
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -3876,9 +3922,9 @@ function Tp(e) {
|
|
|
3876
3922
|
return t.size === 1 ? [...t][0] : void 0;
|
|
3877
3923
|
}
|
|
3878
3924
|
function xp(e) {
|
|
3879
|
-
if (e.type !== "session_update" || !
|
|
3925
|
+
if (e.type !== "session_update" || !be(e.data)) return !1;
|
|
3880
3926
|
const t = e.data.update;
|
|
3881
|
-
return
|
|
3927
|
+
return be(t) && t.sessionUpdate === "user_message_chunk";
|
|
3882
3928
|
}
|
|
3883
3929
|
function Qi(e) {
|
|
3884
3930
|
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
@@ -4489,7 +4535,7 @@ function jc(e) {
|
|
|
4489
4535
|
const t = typeof e == "number" ? e : Number(e ?? 0);
|
|
4490
4536
|
return Number.isFinite(t) ? t : 0;
|
|
4491
4537
|
}
|
|
4492
|
-
function
|
|
4538
|
+
function Bt(e, t) {
|
|
4493
4539
|
const o = jc(e);
|
|
4494
4540
|
return `${o} ${t}${o === 1 ? "" : "s"}`;
|
|
4495
4541
|
}
|
|
@@ -4608,10 +4654,10 @@ const jp = {
|
|
|
4608
4654
|
const Gp = {
|
|
4609
4655
|
"messageDelete.commandFailed": "Command failed.",
|
|
4610
4656
|
"messageDelete.entry": "Delete messages",
|
|
4611
|
-
"messageDelete.selected": (e) => `${
|
|
4657
|
+
"messageDelete.selected": (e) => `${Bt(e?.count, "group")} selected`,
|
|
4612
4658
|
"messageDelete.delete": "Delete selected",
|
|
4613
4659
|
"messageDelete.confirm": "Delete permanently",
|
|
4614
|
-
"messageDelete.confirmTitle": (e) => `Delete ${
|
|
4660
|
+
"messageDelete.confirmTitle": (e) => `Delete ${Bt(e?.count, "message group")}?`,
|
|
4615
4661
|
"messageDelete.confirmDescription": "This permanently deletes the selected original messages from history. Existing summaries, command effects and project files are preserved. Information already included in a summary may still influence future replies.",
|
|
4616
4662
|
"messageDelete.selectGroup": "Select message group",
|
|
4617
4663
|
"messageDelete.processing": "Processing…",
|
|
@@ -5218,8 +5264,8 @@ const dm = {
|
|
|
5218
5264
|
"trajectory.summary.elapsed": "elapsed",
|
|
5219
5265
|
"trajectory.summary.active": "active",
|
|
5220
5266
|
"trajectory.summary.model": "model",
|
|
5221
|
-
"trajectory.summary.requests": (e) =>
|
|
5222
|
-
"trajectory.summary.tools": (e) =>
|
|
5267
|
+
"trajectory.summary.requests": (e) => Bt(e?.count, "request"),
|
|
5268
|
+
"trajectory.summary.tools": (e) => Bt(e?.count, "tool"),
|
|
5223
5269
|
"trajectory.summary.tokens": "tokens",
|
|
5224
5270
|
"trajectory.summary.failed": (e) => `${e?.count ?? 0} failed`,
|
|
5225
5271
|
"trajectory.summary.failedFilter": "Show only failed records",
|
|
@@ -5235,7 +5281,7 @@ const dm = {
|
|
|
5235
5281
|
"trajectory.jumpLatest.updated": "New executions arrived",
|
|
5236
5282
|
"trajectory.warnings": "Warnings",
|
|
5237
5283
|
"trajectory.about": "About this view",
|
|
5238
|
-
"trajectory.about.scope": (e) => `Totals cover the loaded records: ${
|
|
5284
|
+
"trajectory.about.scope": (e) => `Totals cover the loaded records: ${Bt(e?.pages, "page")}, ${Bt(e?.turns, "turn")}. Selection and zoom don't change them.`,
|
|
5239
5285
|
"trajectory.about.tokens": "Tokens: main-session input → output. Cached input is part of input.",
|
|
5240
5286
|
"trajectory.about.numbering": "Request numbers count from the start of the loaded records.",
|
|
5241
5287
|
"trajectory.boundary.earlier": "Earlier records aren’t loaded",
|
|
@@ -6904,7 +6950,9 @@ const xm = {
|
|
|
6904
6950
|
"settings.label.omni.enabled": "启用 Omni 媒体投递",
|
|
6905
6951
|
"settings.description.omni.enabled": "启用 omni 媒体管线。用 @ 引用的媒体文件(视频、图片、音频)以及 @https:// URL 提供的媒体会被识别(ffprobe)、以内容寻址存储在 .qwen/omni/objects/ 下,经 DashScope 临时上传通道上传,并以 oss:// URL 投递,而不是内联 base64。仅对 DashScope 兼容端点生效。也可通过 QWEN_CODE_ENABLE_OMNI=1 启用。",
|
|
6906
6952
|
"settings.label.agents.arena.preserveArtifacts": "保留 Arena 产物",
|
|
6907
|
-
"settings.description.agents.arena.preserveArtifacts": "启用后,Arena worktree 和会话状态文件会在会话结束或主智能体退出后保留。"
|
|
6953
|
+
"settings.description.agents.arena.preserveArtifacts": "启用后,Arena worktree 和会话状态文件会在会话结束或主智能体退出后保留。",
|
|
6954
|
+
"settings.label.worktree.defaultForNewSessions": "新会话默认使用 Worktree",
|
|
6955
|
+
"settings.description.worktree.defaultForNewSessions": "开启(默认)时,受信任 Git workspace 中的新 Web Shell 会话默认进入隔离 worktree:composer 缺省为 Worktree 模式,首条消息发送时创建 worktree。设为 false 则缺省使用当前分支。仅影响 Web Shell composer 的缺省值;显式模式选择与 daemon API 不变。"
|
|
6908
6956
|
}, $m = {
|
|
6909
6957
|
"settings.label.general.outputLanguage": "Язык: вывод модели",
|
|
6910
6958
|
"settings.description.general.outputLanguage": "Язык, на котором модель отвечает. Оставьте пустым, чтобы следовать языку ввода (auto). Изменения перезаписывают output-language.md сессии и применяются к текущей сессии.",
|
|
@@ -9333,6 +9381,13 @@ ${e.url}` : ""}
|
|
|
9333
9381
|
"sidebar.pinnedSessions": "Закреплённые",
|
|
9334
9382
|
"sidebar.sessionSort": "Сортировка сессий",
|
|
9335
9383
|
"sidebar.sessionDisplay": "Параметры отображения",
|
|
9384
|
+
"sidebar.groupBy": "Группировать по",
|
|
9385
|
+
"sidebar.groupWorkspace": "Рабочая область",
|
|
9386
|
+
"sidebar.groupActivityDate": "Дата активности",
|
|
9387
|
+
"sidebar.groupThisWeek": "На этой неделе",
|
|
9388
|
+
"sidebar.groupLast30Days": "За последние 30 дней",
|
|
9389
|
+
"sidebar.groupOlder": "Ранее",
|
|
9390
|
+
"sidebar.recentConversations": "Недавние разговоры",
|
|
9336
9391
|
"sidebar.sortBy": "Сортировать",
|
|
9337
9392
|
"sidebar.sortActivity": "Недавняя активность",
|
|
9338
9393
|
"sidebar.sortQuestion": "Последний вопрос",
|
|
@@ -12069,8 +12124,13 @@ Common commands: /usage /upgrade /model /status /logout`,
|
|
|
12069
12124
|
"branchPicker.action.checkoutRef": "Checkout Tag or Revision…",
|
|
12070
12125
|
"branchPicker.action.viewChanges": "View Changes",
|
|
12071
12126
|
"branchPicker.action.worktrees": "Worktrees…",
|
|
12127
|
+
"branchPicker.action.createBranchHere": "Create branch here",
|
|
12128
|
+
"branchPicker.action.handoffToLocal": "Hand off to local",
|
|
12129
|
+
"branchPicker.action.moveToWorktree": "Move to worktree",
|
|
12130
|
+
"branchPicker.moveToWorktreeHint": "Your local checkout keeps its uncommitted changes; handing back later requires a clean local checkout.",
|
|
12072
12131
|
"branchPicker.action.history": "History",
|
|
12073
12132
|
"branchPicker.newBranchPlaceholder": "Branch name",
|
|
12133
|
+
"branchPicker.createBranchPlaceholder": "New branch name",
|
|
12074
12134
|
"branchPicker.invalidBranchName": "Invalid branch name — avoid spaces, ~, ^, :, ? * and leading -",
|
|
12075
12135
|
"branchPicker.checkoutRefPlaceholder": "Tag name or commit SHA",
|
|
12076
12136
|
"branchPicker.section.recent": "Recent",
|
|
@@ -12676,7 +12736,7 @@ Common commands: /usage /upgrade /model /status /logout`,
|
|
|
12676
12736
|
"composerAdd.mcp.label": "MCP",
|
|
12677
12737
|
"composerAdd.mcp.description": "Reference an MCP server",
|
|
12678
12738
|
"composerAdd.mcp.empty": "No MCP servers are available",
|
|
12679
|
-
"managed.mcp.catalog": (e) => `Catalog snapshot: ${
|
|
12739
|
+
"managed.mcp.catalog": (e) => `Catalog snapshot: ${Bt(e?.tools, "tool")} (${e?.toolsState}); ${Bt(e?.resources, "resource")} (${e?.resourcesState}); ${Bt(e?.prompts, "prompt")} (${e?.promptsState})`,
|
|
12680
12740
|
"managed.mcp.discovery.complete": "complete",
|
|
12681
12741
|
"managed.mcp.discovery.partial": "partial",
|
|
12682
12742
|
"managed.mcp.discovery.failed": "failed",
|
|
@@ -13485,6 +13545,21 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
13485
13545
|
// the code-review result view (`codeReview.*`) took over the word.
|
|
13486
13546
|
"turnOutputs.review": "Changes",
|
|
13487
13547
|
"turnOutputs.reviewLatest": "View recent file changes",
|
|
13548
|
+
"changeOverview.title": "Change overview",
|
|
13549
|
+
"changeOverview.uncommitted": "Uncommitted",
|
|
13550
|
+
"changeOverview.loading": "Loading changes…",
|
|
13551
|
+
"changeOverview.notGit": "This workspace is not a git repository.",
|
|
13552
|
+
"changeOverview.loadFailed": "Couldn’t load the change overview. Use refresh to retry.",
|
|
13553
|
+
"changeOverview.empty": "No changes in this scope.",
|
|
13554
|
+
"changeOverview.files": (e) => Bt(e?.count, "file"),
|
|
13555
|
+
"changeOverview.prUnavailable": "File list unavailable: couldn’t load it. Use refresh to retry.",
|
|
13556
|
+
"changeOverview.prUnavailableCli": "File list unavailable: the GitHub CLI (gh) is not installed on the daemon host.",
|
|
13557
|
+
"changeOverview.prUnavailableRoute": "File list unavailable: this daemon predates the PR file-list route.",
|
|
13558
|
+
"changeOverview.refresh": "Refresh",
|
|
13559
|
+
"changeOverview.openPr": "Open PR",
|
|
13560
|
+
"changeOverview.description": "Changed files and scale, by delivery unit.",
|
|
13561
|
+
"changeOverview.hiddenFiles": (e) => `…and ${Bt(e?.count, "more file")}`,
|
|
13562
|
+
"changeOverview.hiddenCommits": "…and more commits",
|
|
13488
13563
|
"codeReview.authoritativeVerdict": "Authoritative verdict",
|
|
13489
13564
|
"codeReview.targetEffort": (e) => `Target: ${e?.target ?? ""} · Effort: ${e?.effort ?? ""}`,
|
|
13490
13565
|
"codeReview.openReport": "Open Markdown report",
|
|
@@ -13640,6 +13715,13 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
13640
13715
|
"sidebar.pinnedSessions": "Pinned",
|
|
13641
13716
|
"sidebar.sessionSort": "Sort sessions",
|
|
13642
13717
|
"sidebar.sessionDisplay": "Display options",
|
|
13718
|
+
"sidebar.groupBy": "Group by",
|
|
13719
|
+
"sidebar.groupWorkspace": "Workspace",
|
|
13720
|
+
"sidebar.groupActivityDate": "Activity date",
|
|
13721
|
+
"sidebar.groupThisWeek": "This week",
|
|
13722
|
+
"sidebar.groupLast30Days": "Last 30 days",
|
|
13723
|
+
"sidebar.groupOlder": "Older",
|
|
13724
|
+
"sidebar.recentConversations": "Recent conversations",
|
|
13643
13725
|
"sidebar.sortBy": "Sort by",
|
|
13644
13726
|
"sidebar.sortActivity": "Recent activity",
|
|
13645
13727
|
"sidebar.sortQuestion": "Last question",
|
|
@@ -13818,7 +13900,7 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
13818
13900
|
"sidebar.expand": "Expand",
|
|
13819
13901
|
"sidebar.showAllSessions": "Show all",
|
|
13820
13902
|
"sidebar.showMoreSessions": (e) => `Show ${e?.count ?? 0} more`,
|
|
13821
|
-
"sidebar.subSessions": (e) =>
|
|
13903
|
+
"sidebar.subSessions": (e) => Bt(e?.count, "sub-session"),
|
|
13822
13904
|
"sidebar.collapseProject": "Collapse workspace",
|
|
13823
13905
|
"sidebar.expandProject": "Expand workspace",
|
|
13824
13906
|
"sidebar.search": "Search sessions",
|
|
@@ -14937,12 +15019,12 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
14937
15019
|
"trajectory.partial": "Part of this transcript could not be read, so some records are missing.",
|
|
14938
15020
|
"trajectory.turn": (e) => `Turn ${e?.index ?? 0}`,
|
|
14939
15021
|
"trajectory.turnPartial": (e) => `Turn ${e?.index ?? 0} (continued)`,
|
|
14940
|
-
"trajectory.turnSummary": (e) => `${
|
|
15022
|
+
"trajectory.turnSummary": (e) => `${Bt(e?.requests, "request")} · ${Bt(e?.tools, "tool")} · main model total ${e?.duration ?? ""}`,
|
|
14941
15023
|
"trajectory.request": "Model request",
|
|
14942
15024
|
"trajectory.requestFailed": "Request failed",
|
|
14943
15025
|
"trajectory.toolFailed": "Tool failed",
|
|
14944
15026
|
"trajectory.ttft": (e) => `First token ${e?.duration ?? ""}`,
|
|
14945
|
-
"trajectory.subagentRollup": (e) => `subagent ${
|
|
15027
|
+
"trajectory.subagentRollup": (e) => `subagent ${Bt(e?.requests, "request")} · ${Bt(e?.tools, "tool")} · ${e?.duration ?? ""}`,
|
|
14946
15028
|
"trajectory.badge.user": "you",
|
|
14947
15029
|
"trajectory.badge.message": "say",
|
|
14948
15030
|
"trajectory.badge.thought": "think",
|
|
@@ -14954,7 +15036,7 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
14954
15036
|
"trajectory.badge.cancelled": "stop",
|
|
14955
15037
|
"trajectory.badge.other": "other",
|
|
14956
15038
|
"trajectory.cancelled": "Turn cancelled",
|
|
14957
|
-
"trajectory.overview.label": (e) => `Timeline of ${
|
|
15039
|
+
"trajectory.overview.label": (e) => `Timeline of ${Bt(e?.spans, "timed record")}, ${e?.busy ?? ""} of activity`,
|
|
14958
15040
|
"trajectory.overview.busy": (e) => `${e?.duration ?? ""} active`,
|
|
14959
15041
|
"trajectory.range.status": (e) => `Visible records ${e?.shown ?? 0} / window records ${e?.total ?? 0} (including context)`,
|
|
14960
15042
|
"trajectory.collapsed": (e) => `${e?.count ?? 0} records collapsed`,
|
|
@@ -15529,7 +15611,7 @@ Write the explanation as a self-contained single-file HTML (inline CSS, no exter
|
|
|
15529
15611
|
"channels.workspace.label": "Workspace",
|
|
15530
15612
|
"channels.workspace.primary": "Primary",
|
|
15531
15613
|
"channels.loading": "Loading channels",
|
|
15532
|
-
"channels.configuredCount": (e) =>
|
|
15614
|
+
"channels.configuredCount": (e) => Bt(e?.count, "configured channel"),
|
|
15533
15615
|
"channels.configured": "Configured channels",
|
|
15534
15616
|
"channels.configured.description": "Manage the bots that receive and deliver messages for this workspace.",
|
|
15535
15617
|
"channels.availablePlatforms": "Available platforms",
|
|
@@ -16365,8 +16447,13 @@ ${e.url}` : ""}
|
|
|
16365
16447
|
"branchPicker.action.checkoutRef": "检出标签或修订…",
|
|
16366
16448
|
"branchPicker.action.viewChanges": "查看变更",
|
|
16367
16449
|
"branchPicker.action.worktrees": "管理 Worktree…",
|
|
16450
|
+
"branchPicker.action.createBranchHere": "在此创建分支",
|
|
16451
|
+
"branchPicker.action.handoffToLocal": "移交到本地检出",
|
|
16452
|
+
"branchPicker.action.moveToWorktree": "移入 worktree",
|
|
16453
|
+
"branchPicker.moveToWorktreeHint": "本地检出会保留其未提交改动;之后移交回本地需要本地检出干净。",
|
|
16368
16454
|
"branchPicker.action.history": "提交历史",
|
|
16369
16455
|
"branchPicker.newBranchPlaceholder": "分支名称",
|
|
16456
|
+
"branchPicker.createBranchPlaceholder": "新分支名称",
|
|
16370
16457
|
"branchPicker.invalidBranchName": "无效的分支名称 — 避免空格、~、^、:、? * 以及以 - 开头",
|
|
16371
16458
|
"branchPicker.checkoutRefPlaceholder": "标签名或提交 SHA",
|
|
16372
16459
|
"branchPicker.section.recent": "最近",
|
|
@@ -17859,6 +17946,21 @@ ${e.url}` : ""}
|
|
|
17859
17946
|
// 代码审查结果视图使用 `codeReview.*`,请勿“修正”此不一致。
|
|
17860
17947
|
"turnOutputs.review": "文件更改",
|
|
17861
17948
|
"turnOutputs.reviewLatest": "查看最近文件修改",
|
|
17949
|
+
"changeOverview.title": "变更总览",
|
|
17950
|
+
"changeOverview.uncommitted": "未提交",
|
|
17951
|
+
"changeOverview.loading": "正在加载变更…",
|
|
17952
|
+
"changeOverview.notGit": "当前工作区不是 git 仓库。",
|
|
17953
|
+
"changeOverview.loadFailed": "无法加载变更总览,请点刷新重试。",
|
|
17954
|
+
"changeOverview.empty": "该范围暂无变更。",
|
|
17955
|
+
"changeOverview.files": (e) => `${e?.count ?? 0} 个文件`,
|
|
17956
|
+
"changeOverview.prUnavailable": "文件列表不可用:加载失败,请点刷新重试。",
|
|
17957
|
+
"changeOverview.prUnavailableCli": "文件列表不可用:daemon 主机未安装 GitHub CLI(gh)。",
|
|
17958
|
+
"changeOverview.prUnavailableRoute": "文件列表不可用:该 daemon 版本早于 PR 文件列表路由。",
|
|
17959
|
+
"changeOverview.refresh": "刷新",
|
|
17960
|
+
"changeOverview.openPr": "打开 PR",
|
|
17961
|
+
"changeOverview.description": "按交付单元查看变更文件与规模。",
|
|
17962
|
+
"changeOverview.hiddenFiles": (e) => `…另有 ${e?.count ?? 0} 个文件`,
|
|
17963
|
+
"changeOverview.hiddenCommits": "…还有更多提交",
|
|
17862
17964
|
"codeReview.authoritativeVerdict": "权威裁决",
|
|
17863
17965
|
"codeReview.targetEffort": (e) => `目标:${e?.target ?? ""} · 强度:${e?.effort ?? ""}`,
|
|
17864
17966
|
"codeReview.openReport": "打开 Markdown 报告",
|
|
@@ -18014,6 +18116,13 @@ ${e.url}` : ""}
|
|
|
18014
18116
|
"sidebar.pinnedSessions": "置顶",
|
|
18015
18117
|
"sidebar.sessionSort": "会话排序",
|
|
18016
18118
|
"sidebar.sessionDisplay": "显示选项",
|
|
18119
|
+
"sidebar.groupBy": "分组方式",
|
|
18120
|
+
"sidebar.groupWorkspace": "工作区",
|
|
18121
|
+
"sidebar.groupActivityDate": "活动日期",
|
|
18122
|
+
"sidebar.groupThisWeek": "本周",
|
|
18123
|
+
"sidebar.groupLast30Days": "最近 30 天",
|
|
18124
|
+
"sidebar.groupOlder": "更早",
|
|
18125
|
+
"sidebar.recentConversations": "最近对话",
|
|
18017
18126
|
"sidebar.sortBy": "排序方式",
|
|
18018
18127
|
"sidebar.sortActivity": "最近活动",
|
|
18019
18128
|
"sidebar.sortQuestion": "最后提问时间",
|
|
@@ -20451,33 +20560,33 @@ function na(e) {
|
|
|
20451
20560
|
}
|
|
20452
20561
|
class rg {
|
|
20453
20562
|
constructor(t) {
|
|
20454
|
-
|
|
20563
|
+
Se(this, "entries", /* @__PURE__ */ new Map());
|
|
20455
20564
|
/**
|
|
20456
20565
|
* Prompt-derived titles for sessions whose rename has not landed yet.
|
|
20457
20566
|
* Applied to every published page so periodic and in-flight catalog reads
|
|
20458
20567
|
* cannot surface the session-id fallback first.
|
|
20459
20568
|
*/
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20569
|
+
Se(this, "pendingSessionTitles", /* @__PURE__ */ new Map());
|
|
20570
|
+
Se(this, "queue", []);
|
|
20571
|
+
Se(this, "trailingRefreshTimers", /* @__PURE__ */ new Map());
|
|
20572
|
+
Se(this, "liveStateWorkspaceUsers", /* @__PURE__ */ new Map());
|
|
20573
|
+
Se(this, "liveStateWorkspaceRefreshRequests", /* @__PURE__ */ new Map());
|
|
20574
|
+
Se(this, "liveStateWakeHandlers", /* @__PURE__ */ new Set());
|
|
20575
|
+
Se(this, "liveStateActivitySequence", 0);
|
|
20576
|
+
Se(this, "liveStatePendingActivity", /* @__PURE__ */ new Map());
|
|
20577
|
+
Se(this, "liveStateFailureStreaks", /* @__PURE__ */ new Map());
|
|
20578
|
+
Se(this, "liveSessionRevision", 0);
|
|
20579
|
+
Se(this, "liveSessionRevisions", /* @__PURE__ */ new Map());
|
|
20580
|
+
Se(this, "liveSessionRequestTimes", /* @__PURE__ */ new Map());
|
|
20581
|
+
Se(this, "liveSessionsByWorkspace", /* @__PURE__ */ new Map());
|
|
20582
|
+
Se(this, "liveSessionListeners", /* @__PURE__ */ new Map());
|
|
20583
|
+
Se(this, "liveSessionObservationListeners", /* @__PURE__ */ new Map());
|
|
20584
|
+
Se(this, "activeRequests", 0);
|
|
20585
|
+
Se(this, "activeBackgroundRequests", 0);
|
|
20586
|
+
Se(this, "queueSequence", 0);
|
|
20587
|
+
Se(this, "visibilityListening", !1);
|
|
20588
|
+
Se(this, "paused", !1);
|
|
20589
|
+
Se(this, "onVisibilityChange", () => {
|
|
20481
20590
|
if (this.paused) return;
|
|
20482
20591
|
if (this.isHidden()) {
|
|
20483
20592
|
for (const o of this.entries.values())
|
|
@@ -25048,17 +25157,17 @@ const Kl = Object.freeze({
|
|
|
25048
25157
|
});
|
|
25049
25158
|
class Gh {
|
|
25050
25159
|
constructor(t) {
|
|
25051
|
-
|
|
25052
|
-
|
|
25053
|
-
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
|
|
25057
|
-
|
|
25058
|
-
|
|
25059
|
-
|
|
25060
|
-
|
|
25061
|
-
|
|
25160
|
+
Se(this, "snapshot", Kl);
|
|
25161
|
+
Se(this, "nextPageId", 1);
|
|
25162
|
+
Se(this, "nextRangeId", 1);
|
|
25163
|
+
Se(this, "nextBlockOrdinal", 1);
|
|
25164
|
+
Se(this, "rangeAccess", /* @__PURE__ */ new Map());
|
|
25165
|
+
Se(this, "accessClock", 0);
|
|
25166
|
+
Se(this, "selectedRangeId");
|
|
25167
|
+
Se(this, "selectedPageId");
|
|
25168
|
+
Se(this, "liveRecordIds", /* @__PURE__ */ new Set());
|
|
25169
|
+
Se(this, "viewportPins", /* @__PURE__ */ new Map());
|
|
25170
|
+
Se(this, "cachedBoundaryRequests", /* @__PURE__ */ new Map());
|
|
25062
25171
|
if (this.options = t, !Number.isInteger(t.maxPages) || t.maxPages < 1)
|
|
25063
25172
|
throw new RangeError(
|
|
25064
25173
|
"Historical transcript maxPages must be a positive integer"
|
|
@@ -26034,7 +26143,7 @@ function Qh(e = {}) {
|
|
|
26034
26143
|
});
|
|
26035
26144
|
if (p !== m || h !== g || f !== pe || !se(d))
|
|
26036
26145
|
return;
|
|
26037
|
-
|
|
26146
|
+
Vt(x);
|
|
26038
26147
|
} catch (x) {
|
|
26039
26148
|
if (p !== m || h !== g || f !== pe || !se(d) || (ge(x), _)) return;
|
|
26040
26149
|
}
|
|
@@ -26046,7 +26155,7 @@ function Qh(e = {}) {
|
|
|
26046
26155
|
}
|
|
26047
26156
|
async function Rt(w, c = k) {
|
|
26048
26157
|
if (tc(w), Mo(w)) return;
|
|
26049
|
-
const d =
|
|
26158
|
+
const d = Kt(), p = i;
|
|
26050
26159
|
if (!d || !p || !s || w >= r.totalTurns)
|
|
26051
26160
|
throw new Error("Turn ordinal is unavailable");
|
|
26052
26161
|
const h = m, f = g, x = r.totalTurns, y = Math.floor(w / t) * t;
|
|
@@ -26097,17 +26206,17 @@ function Qh(e = {}) {
|
|
|
26097
26206
|
)
|
|
26098
26207
|
), y = /* @__PURE__ */ new Map(), b = new Map(
|
|
26099
26208
|
[...x].map((Oe) => [Oe.id, Oe])
|
|
26100
|
-
), F = /* @__PURE__ */ new Map(), U = (Oe,
|
|
26209
|
+
), F = /* @__PURE__ */ new Map(), U = (Oe, Yt) => {
|
|
26101
26210
|
if (Oe.kind !== "user" && Oe.kind !== "assistant") return;
|
|
26102
|
-
const lt = Oe.promptId ?? Oe.meta?.promptId ??
|
|
26211
|
+
const lt = Oe.promptId ?? Oe.meta?.promptId ?? Yt;
|
|
26103
26212
|
return typeof lt == "string" ? `${Oe.kind}:${lt}` : void 0;
|
|
26104
26213
|
};
|
|
26105
26214
|
for (const Oe of x) {
|
|
26106
26215
|
for (const lt of Oe.sourceRecordIds ?? [])
|
|
26107
26216
|
y.set(lt, [...y.get(lt) ?? [], Oe]);
|
|
26108
|
-
const
|
|
26109
|
-
!Oe.sourceRecordIds?.length &&
|
|
26110
|
-
...F.get(
|
|
26217
|
+
const Yt = U(Oe);
|
|
26218
|
+
!Oe.sourceRecordIds?.length && Yt && F.set(Yt, [
|
|
26219
|
+
...F.get(Yt) ?? [],
|
|
26111
26220
|
Oe
|
|
26112
26221
|
]);
|
|
26113
26222
|
}
|
|
@@ -26121,10 +26230,10 @@ function Qh(e = {}) {
|
|
|
26121
26230
|
if (!N()) throw new Error("Conversation search cancelled");
|
|
26122
26231
|
};
|
|
26123
26232
|
X();
|
|
26124
|
-
const ie = async (Oe,
|
|
26233
|
+
const ie = async (Oe, Yt) => {
|
|
26125
26234
|
const lt = await h.getTurnIndexPage({
|
|
26126
26235
|
limit: t,
|
|
26127
|
-
...Oe === void 0 ? {} : { snapshot: Oe, start:
|
|
26236
|
+
...Oe === void 0 ? {} : { snapshot: Oe, start: Yt }
|
|
26128
26237
|
});
|
|
26129
26238
|
return X(), Ei(lt, f, Oe, t), lt;
|
|
26130
26239
|
};
|
|
@@ -26136,7 +26245,7 @@ function Qh(e = {}) {
|
|
|
26136
26245
|
let le = 0, ce = Q.turns[le];
|
|
26137
26246
|
if (!ce || ce.ordinal !== 0)
|
|
26138
26247
|
throw new Error("Conversation search index is incomplete");
|
|
26139
|
-
let
|
|
26248
|
+
let De, Tt = await h.getTranscriptPage({
|
|
26140
26249
|
atRecordId: ce.turnId,
|
|
26141
26250
|
snapshot: ae,
|
|
26142
26251
|
limit: Fo
|
|
@@ -26147,21 +26256,21 @@ function Qh(e = {}) {
|
|
|
26147
26256
|
Tt.events,
|
|
26148
26257
|
1,
|
|
26149
26258
|
/* @__PURE__ */ new Set()
|
|
26150
|
-
),
|
|
26259
|
+
), Yt = /* @__PURE__ */ new Map();
|
|
26151
26260
|
for (const lt of Oe.encounteredRecordIds) {
|
|
26152
26261
|
if (X(), ce && lt === ce.turnId) {
|
|
26153
|
-
if (
|
|
26154
|
-
if (Q = await ie(ae,
|
|
26262
|
+
if (De = ce, le += 1, le >= Q.turns.length && De.ordinal + 1 < Q.totalTurns) {
|
|
26263
|
+
if (Q = await ie(ae, De.ordinal + 1), Q.start !== De.ordinal + 1 || !Q.turns.length)
|
|
26155
26264
|
throw new Error("Conversation search index did not advance");
|
|
26156
26265
|
le = 0;
|
|
26157
26266
|
}
|
|
26158
26267
|
ce = Q.turns[le];
|
|
26159
26268
|
}
|
|
26160
|
-
|
|
26269
|
+
De && Yt.set(lt, De);
|
|
26161
26270
|
}
|
|
26162
26271
|
for (const lt of Oe.blocks) {
|
|
26163
26272
|
X();
|
|
26164
|
-
const io = lt.sourceRecordIds ?? [], ho = io.map((Ot) =>
|
|
26273
|
+
const io = lt.sourceRecordIds ?? [], ho = io.map((Ot) => Yt.get(Ot)).find(Boolean);
|
|
26165
26274
|
if (lt.kind !== "user" && lt.kind !== "assistant" || !io.length)
|
|
26166
26275
|
continue;
|
|
26167
26276
|
const Ne = io[0], Xo = Ne === Le, Ge = Xo ? $n + lt.text : lt.text;
|
|
@@ -26497,7 +26606,7 @@ function Qh(e = {}) {
|
|
|
26497
26606
|
snapshot: f.snapshot,
|
|
26498
26607
|
limit: Fo
|
|
26499
26608
|
});
|
|
26500
|
-
let le = !0, ce,
|
|
26609
|
+
let le = !0, ce, De = !1, Tt;
|
|
26501
26610
|
for (; ; ) {
|
|
26502
26611
|
if (!F()) return;
|
|
26503
26612
|
if (hs(U, s), le && !ae && "anchorTurnId" in Q && U.targetRecordId !== f.anchorRecordId)
|
|
@@ -26513,7 +26622,7 @@ function Qh(e = {}) {
|
|
|
26513
26622
|
fromAnchor: le
|
|
26514
26623
|
} : ce ? (U = ce, W = {
|
|
26515
26624
|
excludedRecordIds: [],
|
|
26516
|
-
fromAnchor:
|
|
26625
|
+
fromAnchor: De
|
|
26517
26626
|
}) : W = { excludedRecordIds: Le, fromAnchor: le };
|
|
26518
26627
|
break;
|
|
26519
26628
|
}
|
|
@@ -26522,7 +26631,7 @@ function Qh(e = {}) {
|
|
|
26522
26631
|
throw new Error(
|
|
26523
26632
|
"Gap recovery did not advance to the retained record"
|
|
26524
26633
|
);
|
|
26525
|
-
Tt = so, ce = U,
|
|
26634
|
+
Tt = so, ce = U, De = le, U = await h.getTranscriptPage({
|
|
26526
26635
|
beforeRecordId: so,
|
|
26527
26636
|
snapshot: f.snapshot,
|
|
26528
26637
|
limit: Fo
|
|
@@ -26605,7 +26714,7 @@ function Qh(e = {}) {
|
|
|
26605
26714
|
});
|
|
26606
26715
|
if (!c() || d !== pe)
|
|
26607
26716
|
throw new Error("History view changed");
|
|
26608
|
-
if (
|
|
26717
|
+
if (Vt(p), !c()) throw new Error("History view changed");
|
|
26609
26718
|
return p;
|
|
26610
26719
|
} catch (p) {
|
|
26611
26720
|
throw c() && d === pe && ge(p), p;
|
|
@@ -26667,7 +26776,7 @@ function Qh(e = {}) {
|
|
|
26667
26776
|
}
|
|
26668
26777
|
}
|
|
26669
26778
|
}
|
|
26670
|
-
function
|
|
26779
|
+
function Vt(w) {
|
|
26671
26780
|
if (Ei(w, s, void 0, t), w.start + w.turns.length !== w.totalTurns)
|
|
26672
26781
|
throw new Error("Turn-index head did not contain the newest page");
|
|
26673
26782
|
const c = To(w), d = zn(M), p = new Map(
|
|
@@ -26700,7 +26809,7 @@ function Qh(e = {}) {
|
|
|
26700
26809
|
))
|
|
26701
26810
|
throw new Error("Frozen turn-index page changed");
|
|
26702
26811
|
const y = To(w);
|
|
26703
|
-
M.set(y.start, y), Et(w.turns), go(
|
|
26812
|
+
M.set(y.start, y), Et(w.turns), go(Kt()?.start);
|
|
26704
26813
|
}
|
|
26705
26814
|
function To(w) {
|
|
26706
26815
|
const c = {
|
|
@@ -26779,7 +26888,7 @@ function Qh(e = {}) {
|
|
|
26779
26888
|
error: void 0
|
|
26780
26889
|
});
|
|
26781
26890
|
}
|
|
26782
|
-
function
|
|
26891
|
+
function Kt() {
|
|
26783
26892
|
return [...M.values()].sort((w, c) => c.end - w.end)[0];
|
|
26784
26893
|
}
|
|
26785
26894
|
function Mo(w) {
|
|
@@ -26907,7 +27016,7 @@ function oc(e) {
|
|
|
26907
27016
|
}
|
|
26908
27017
|
const ef = 6e4, nc = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
26909
27018
|
function Wo(e, t) {
|
|
26910
|
-
const o = Mu(e), n =
|
|
27019
|
+
const o = Mu(e), n = be(e.data) ? e.data : void 0, a = e.type === "turn_complete" && t === "end_turn" && be(n?.branchPoint) ? n.branchPoint : void 0, r = typeof a?.assistantRecordUuid == "string" ? a.assistantRecordUuid : void 0, s = typeof a?.checkpointUuid == "string" ? a.checkpointUuid : void 0, i = r !== void 0 && nc.test(r) && s !== void 0 && nc.test(s);
|
|
26911
27020
|
return {
|
|
26912
27021
|
type: "assistant.done",
|
|
26913
27022
|
reason: t,
|
|
@@ -26923,24 +27032,24 @@ function Wo(e, t) {
|
|
|
26923
27032
|
function Di(e) {
|
|
26924
27033
|
if (e.type === "history_truncated")
|
|
26925
27034
|
try {
|
|
26926
|
-
return
|
|
27035
|
+
return be(e.data) ? Yo(e.data, "recordId") : void 0;
|
|
26927
27036
|
} catch {
|
|
26928
27037
|
return;
|
|
26929
27038
|
}
|
|
26930
27039
|
if (e.type === "session_update")
|
|
26931
27040
|
try {
|
|
26932
|
-
if (!
|
|
26933
|
-
const t = e.data.update, o =
|
|
26934
|
-
return
|
|
27041
|
+
if (!be(e.data)) return;
|
|
27042
|
+
const t = e.data.update, o = be(t) ? t._meta : e.data._meta;
|
|
27043
|
+
return be(o) ? Yo(o, "qwen.session.recordId") : void 0;
|
|
26935
27044
|
} catch {
|
|
26936
27045
|
return;
|
|
26937
27046
|
}
|
|
26938
27047
|
}
|
|
26939
27048
|
function wd(e) {
|
|
26940
|
-
return e.type === "history_truncated" &&
|
|
27049
|
+
return e.type === "history_truncated" && be(e.data) && e.data.fullTranscriptAvailable === !0;
|
|
26941
27050
|
}
|
|
26942
27051
|
function tf(e) {
|
|
26943
|
-
return wd(e) &&
|
|
27052
|
+
return wd(e) && be(e.data) && e.data.scope === void 0;
|
|
26944
27053
|
}
|
|
26945
27054
|
function of(e, t, o) {
|
|
26946
27055
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -27078,9 +27187,9 @@ function Ao(e, t) {
|
|
|
27078
27187
|
return e.length <= t ? e : `${e.slice(0, t)}…`;
|
|
27079
27188
|
}
|
|
27080
27189
|
function nf(e) {
|
|
27081
|
-
const t =
|
|
27190
|
+
const t = be(e.rawInput) ? e.rawInput : void 0, o = be(e.rawOutput) ? e.rawOutput : void 0, n = e.toolName?.toLowerCase();
|
|
27082
27191
|
if (!(n === "agent" || n === "task" || typeof t?.subagent_type == "string" || o?.type === "task_execution")) return e;
|
|
27083
|
-
const r =
|
|
27192
|
+
const r = be(o?.executionSummary) ? o.executionSummary : void 0, s = Ao(t?.subagent_type, 120), i = Ao(t?.prompt, 240), l = Ao(t?.description, 240), u = Ao(t?.working_dir, 240), m = Ao(t?.name, 120), g = typeof t?.todo_id == "string" ? t.todo_id : void 0, k = Ao(o?.subagentName, 120), $ = Ao(o?.subagentColor, 80), M = Ao(o?.taskDescription, 240), P = Ao(o?.status, 80), L = P ?? e.status, I = L === "completed" || L === "failed" || L === "cancelled", q = o?.executionMode, V = Ao(o?.terminateReason, 240), O = Array.isArray(o?.skills) ? o.skills.slice(0, 32).flatMap(
|
|
27084
27193
|
(oe) => Ao(oe, 120) ? [Ao(oe, 120)] : []
|
|
27085
27194
|
) : [], E = t ? {
|
|
27086
27195
|
...s ? { subagent_type: s } : {},
|
|
@@ -27249,7 +27358,7 @@ function ew(e) {
|
|
|
27249
27358
|
/* @__PURE__ */ new WeakMap()
|
|
27250
27359
|
), Co = Y(
|
|
27251
27360
|
void 0
|
|
27252
|
-
),
|
|
27361
|
+
), Vt = Y(
|
|
27253
27362
|
/* @__PURE__ */ new WeakMap()
|
|
27254
27363
|
), He = Y({
|
|
27255
27364
|
hasMore: !1,
|
|
@@ -27273,20 +27382,20 @@ function ew(e) {
|
|
|
27273
27382
|
if (R.evictedOldest !== !1)
|
|
27274
27383
|
if (S.persistedReachable = !0, R.oldestRetainedRecordId !== void 0) {
|
|
27275
27384
|
if (S.beforeRecordId = R.oldestRetainedRecordId, S.cursor = void 0, S.rejectedPage) {
|
|
27276
|
-
const ee = ge.getSnapshot(), Re = R.blockCount ?? ee.blocks.length,
|
|
27277
|
-
(wt) => wt.sourceRecordIds?.includes(
|
|
27385
|
+
const ee = ge.getSnapshot(), Re = R.blockCount ?? ee.blocks.length, ye = R.retainedBytes ?? ee.retainedBytes, _e = R.oldestRetainedRecordId, ut = R.replacedReplay === !0 && _e !== void 0 && !ee.blocks.some(
|
|
27386
|
+
(wt) => wt.sourceRecordIds?.includes(_e)
|
|
27278
27387
|
);
|
|
27279
27388
|
S.rejectedPage = ut ? void 0 : {
|
|
27280
27389
|
blocks: S.rejectedPage.blocks + Math.max(0, ee.blocks.length - Re),
|
|
27281
27390
|
bytes: S.rejectedPage.bytes + Math.max(
|
|
27282
27391
|
0,
|
|
27283
|
-
ee.retainedBytes -
|
|
27392
|
+
ee.retainedBytes - ye
|
|
27284
27393
|
)
|
|
27285
27394
|
};
|
|
27286
27395
|
}
|
|
27287
27396
|
if (!S.capacityReached && !S.hasMore) {
|
|
27288
|
-
const ee = At.current?.features, Re = ge.getSnapshot(),
|
|
27289
|
-
Array.isArray(ee) && ee.includes(fs) &&
|
|
27397
|
+
const ee = At.current?.features, Re = ge.getSnapshot(), ye = R.retainedBytes ?? Re.retainedBytes, _e = R.maxRetainedBytes ?? Re.maxRetainedBytes;
|
|
27398
|
+
Array.isArray(ee) && ee.includes(fs) && ye < _e && (S.hasMore = !0, Et({
|
|
27290
27399
|
hasMore: !0,
|
|
27291
27400
|
loading: !1,
|
|
27292
27401
|
capacityReached: !1,
|
|
@@ -27301,10 +27410,10 @@ function ew(e) {
|
|
|
27301
27410
|
paginationError: S.paginationError
|
|
27302
27411
|
}));
|
|
27303
27412
|
if (R.evictedOldest !== !1 && (go.current += 1), S.capacityReached) {
|
|
27304
|
-
const ee = At.current?.features, Re = Array.isArray(ee) && ee.includes(fs),
|
|
27305
|
-
if (!Re || !
|
|
27413
|
+
const ee = At.current?.features, Re = Array.isArray(ee) && ee.includes(fs), ye = S.beforeRecordId !== void 0 || S.cursor !== void 0;
|
|
27414
|
+
if (!Re || !ye)
|
|
27306
27415
|
return;
|
|
27307
|
-
const
|
|
27416
|
+
const _e = ge.getSnapshot(), ut = R.blockCount ?? _e.blocks.length, wt = R.retainedBytes ?? _e.retainedBytes, Qe = R.maxBlocks ?? _e.maxBlocks, Xe = R.maxRetainedBytes ?? _e.maxRetainedBytes, We = S.rejectedPage;
|
|
27308
27417
|
if (!(We ? We.blocks + ut <= Qe && We.bytes + wt <= Xe : ut < Qe))
|
|
27309
27418
|
return;
|
|
27310
27419
|
S.rejectedPage = void 0, S.hasMore = !0, S.capacityReached = !1, Et({
|
|
@@ -27330,7 +27439,7 @@ function ew(e) {
|
|
|
27330
27439
|
}
|
|
27331
27440
|
}),
|
|
27332
27441
|
[]
|
|
27333
|
-
),
|
|
27442
|
+
), Kt = Y(void 0), Mo = Y(void 0), kt = Y(/* @__PURE__ */ new Map()), w = Y(/* @__PURE__ */ new Map()), c = Y(/* @__PURE__ */ new Map()), d = Y(void 0), p = Y(
|
|
27334
27443
|
/* @__PURE__ */ new Set()
|
|
27335
27444
|
), h = Y(/* @__PURE__ */ new Set()), f = ue((R) => (p.current.add(R), () => p.current.delete(R)), []), x = ue(
|
|
27336
27445
|
(R) => {
|
|
@@ -27364,9 +27473,9 @@ function ew(e) {
|
|
|
27364
27473
|
void 0
|
|
27365
27474
|
), ie = Y(!1), Q = Y({
|
|
27366
27475
|
consecutiveFailures: 0
|
|
27367
|
-
}), ae = Y(!1), le = Y(void 0), ce = Y(void 0),
|
|
27476
|
+
}), ae = Y(!1), le = Y(void 0), ce = Y(void 0), De = Y(void 0), Tt = Y(/* @__PURE__ */ new WeakSet()), Le = Y({ suppressOwnUserEcho: M, includeRawEvent: P }), Wt = Y({ reconnectDelayMs: E, maxReconnectDelayMs: Z }), so = Y(void 0), $n = Y(Je), Zo = Y(k), ao = Y($), Oe = Y(ta(s));
|
|
27368
27477
|
Le.current = { suppressOwnUserEcho: M, includeRawEvent: P }, Wt.current = { reconnectDelayMs: E, maxReconnectDelayMs: Z }, $n.current = Je, Zo.current = k, ao.current = $;
|
|
27369
|
-
const
|
|
27478
|
+
const Yt = l?.modelServiceId, lt = l?.sessionScope, io = Y(l);
|
|
27370
27479
|
io.current = l;
|
|
27371
27480
|
const [ho, Ne] = bt("idle"), Xo = Y(ho);
|
|
27372
27481
|
Xo.current = ho;
|
|
@@ -27401,12 +27510,12 @@ function ew(e) {
|
|
|
27401
27510
|
};
|
|
27402
27511
|
},
|
|
27403
27512
|
captureSessionDeletion(ee, Re) {
|
|
27404
|
-
const
|
|
27405
|
-
(
|
|
27406
|
-
).map((
|
|
27407
|
-
return (
|
|
27408
|
-
for (const ut of
|
|
27409
|
-
for (const wt of
|
|
27513
|
+
const ye = [...S].filter(
|
|
27514
|
+
(_e) => Re !== void 0 && _e.workspaceCwd === Re && _e.baseUrl === ee.baseUrl && _e.token === ee.token
|
|
27515
|
+
).map((_e) => _e.id);
|
|
27516
|
+
return (_e) => {
|
|
27517
|
+
for (const ut of ye)
|
|
27518
|
+
for (const wt of _e)
|
|
27410
27519
|
G({ scopeId: ut, sessionId: wt, reason: "deleted" });
|
|
27411
27520
|
};
|
|
27412
27521
|
}
|
|
@@ -27533,15 +27642,15 @@ function ew(e) {
|
|
|
27533
27642
|
maxBlocks: Number.MAX_SAFE_INTEGER,
|
|
27534
27643
|
maxRetainedBytes: Number.MAX_SAFE_INTEGER,
|
|
27535
27644
|
retainSubagentBlocks: ao.current === "full"
|
|
27536
|
-
}),
|
|
27645
|
+
}), ye = {
|
|
27537
27646
|
...Le.current,
|
|
27538
27647
|
suppressOwnUserEcho: !1
|
|
27539
|
-
},
|
|
27648
|
+
}, _e = [], ut = /* @__PURE__ */ new Set(), wt = (Xe) => {
|
|
27540
27649
|
for (const We of Xe.sourceRecordIds ?? [])
|
|
27541
27650
|
ut.add(We);
|
|
27542
27651
|
Xe.sourceRecordIds?.some(
|
|
27543
27652
|
(We) => G.has(We)
|
|
27544
|
-
) ||
|
|
27653
|
+
) || _e.push(Xe);
|
|
27545
27654
|
};
|
|
27546
27655
|
for (const Xe of R)
|
|
27547
27656
|
try {
|
|
@@ -27550,7 +27659,7 @@ function ew(e) {
|
|
|
27550
27659
|
da(
|
|
27551
27660
|
Xe,
|
|
27552
27661
|
ee.clientId,
|
|
27553
|
-
|
|
27662
|
+
ye,
|
|
27554
27663
|
Ie,
|
|
27555
27664
|
{ updateConnection: !1, suppressLog: !0 }
|
|
27556
27665
|
),
|
|
@@ -27569,7 +27678,7 @@ function ew(e) {
|
|
|
27569
27678
|
We
|
|
27570
27679
|
);
|
|
27571
27680
|
}
|
|
27572
|
-
Re.dispatch(
|
|
27681
|
+
Re.dispatch(_e);
|
|
27573
27682
|
const Qe = Re.getSnapshot();
|
|
27574
27683
|
return {
|
|
27575
27684
|
blocks: Qe.blocks,
|
|
@@ -27645,28 +27754,28 @@ function ew(e) {
|
|
|
27645
27754
|
const S = new AbortController();
|
|
27646
27755
|
let G = !1;
|
|
27647
27756
|
const ee = Ot === "load" && Ge !== void 0 && Ge === te.current?.sessionId && te.current === le.current, Re = y.current;
|
|
27648
|
-
let
|
|
27757
|
+
let ye = te.current, _e, ut, wt = [], Qe;
|
|
27649
27758
|
const Xe = (me = !1) => {
|
|
27650
27759
|
if (Qe = void 0, wt.length === 0) return;
|
|
27651
|
-
if (!me &&
|
|
27760
|
+
if (!me && ye !== void 0 && te.current !== ye) {
|
|
27652
27761
|
wt = [];
|
|
27653
27762
|
return;
|
|
27654
27763
|
}
|
|
27655
|
-
const
|
|
27764
|
+
const Te = wt;
|
|
27656
27765
|
wt = [];
|
|
27657
27766
|
try {
|
|
27658
|
-
ge.dispatch(
|
|
27767
|
+
ge.dispatch(Te);
|
|
27659
27768
|
} catch (Nt) {
|
|
27660
27769
|
console.error(
|
|
27661
27770
|
"[DaemonSessionProvider] batched transcript dispatch failed",
|
|
27662
|
-
{ eventCount:
|
|
27771
|
+
{ eventCount: Te.length, error: Nt }
|
|
27663
27772
|
);
|
|
27664
27773
|
}
|
|
27665
27774
|
}, We = () => {
|
|
27666
27775
|
Qe !== void 0 && (clearTimeout(Qe), Qe = void 0);
|
|
27667
27776
|
}, co = (me) => {
|
|
27668
27777
|
if (me.length !== 0) {
|
|
27669
|
-
for (const
|
|
27778
|
+
for (const Te of me) wt.push(Te);
|
|
27670
27779
|
Qe === void 0 && (Qe = setTimeout(
|
|
27671
27780
|
Xe,
|
|
27672
27781
|
lf
|
|
@@ -27685,11 +27794,11 @@ function ew(e) {
|
|
|
27685
27794
|
const me = F.current;
|
|
27686
27795
|
if (!me || me.attempted || !me.terminalSeen || y.current || He.current.loading || te.current?.sessionId !== me.sessionId || on.current())
|
|
27687
27796
|
return;
|
|
27688
|
-
const
|
|
27689
|
-
if (!
|
|
27797
|
+
const Te = U.current;
|
|
27798
|
+
if (!Te) return;
|
|
27690
27799
|
me.attempted = !0;
|
|
27691
27800
|
const Nt = new AbortController();
|
|
27692
|
-
me.controller = Nt,
|
|
27801
|
+
me.controller = Nt, Te(Nt.signal, { replaySource: "memory" }).catch(
|
|
27693
27802
|
(ot) => {
|
|
27694
27803
|
F.current === me && (lo({
|
|
27695
27804
|
id: `daemon.live_journal_repair.failed:${me.target.signature}`,
|
|
@@ -27705,14 +27814,14 @@ function ew(e) {
|
|
|
27705
27814
|
);
|
|
27706
27815
|
};
|
|
27707
27816
|
return B.current = za, (async () => {
|
|
27708
|
-
if (!
|
|
27817
|
+
if (!ye && (await Promise.resolve(), G))
|
|
27709
27818
|
return;
|
|
27710
27819
|
const me = je.current ?? Cs({ baseUrl: J, token: se });
|
|
27711
|
-
let
|
|
27820
|
+
let Te, Nt, ot = Ge, _o = !ae.current && !Ge && Ea > 0, xo = 0, Uo, qs = !1, An = !1, ss = !1, Qa = !1, _r = () => !1;
|
|
27712
27821
|
const Ns = (nn) => {
|
|
27713
27822
|
const Po = X.current;
|
|
27714
27823
|
return Po?.sessionId !== void 0 && nn !== void 0 && Po?.workspaceCwd === nn.workspaceCwd && Po.sessionId === nn.sessionId ? Po.active : void 0;
|
|
27715
|
-
}, jn = (nn =
|
|
27824
|
+
}, jn = (nn = Te ?? te.current ?? Ae.current) => {
|
|
27716
27825
|
const Po = y.current;
|
|
27717
27826
|
return Po?.reconcilePromptActivity && Po.sessionId === nn?.sessionId && (Po.sessionContext?.kind !== "workspace" || Po.sessionContext.cwd === nn?.workspaceCwd) || _r() || Ae.current.backgroundTurn ? !1 : Ns(nn) === !0 ? (console.debug(
|
|
27718
27827
|
"[DaemonSessionProvider] settle skipped: daemon reports the prompt in flight"
|
|
@@ -27732,7 +27841,7 @@ function ew(e) {
|
|
|
27732
27841
|
An = !1;
|
|
27733
27842
|
let as = !1, Bs, sn, Ka, Lr;
|
|
27734
27843
|
const Ya = () => {
|
|
27735
|
-
if (Ka?.(), Ka = void 0, sn &&
|
|
27844
|
+
if (Ka?.(), Ka = void 0, sn && Kt.current === sn) {
|
|
27736
27845
|
const Pe = Lr;
|
|
27737
27846
|
Pe && te.current === Pe && (rl(Ft.current, Pe), Ie(
|
|
27738
27847
|
(Rn) => te.current === Pe ? {
|
|
@@ -27740,18 +27849,18 @@ function ew(e) {
|
|
|
27740
27849
|
workflowModeStatus: "syncing",
|
|
27741
27850
|
workflowModePending: !1
|
|
27742
27851
|
} : Rn
|
|
27743
|
-
)),
|
|
27852
|
+
)), Kt.current = void 0;
|
|
27744
27853
|
}
|
|
27745
27854
|
};
|
|
27746
27855
|
try {
|
|
27747
27856
|
let Pe = !1, Rn = !1, an = !1, Ho = !1, uo, Mt, Ve, Bn;
|
|
27748
|
-
if (!
|
|
27857
|
+
if (!Te) {
|
|
27749
27858
|
const T = te.current, ke = T !== void 0 && T === ce.current && Ge === T.sessionId && Pt(os) === Pt(
|
|
27750
|
-
|
|
27859
|
+
De.current
|
|
27751
27860
|
);
|
|
27752
|
-
T && (!Ge && !ot && !_o || ke) && (
|
|
27861
|
+
T && (!Ge && !ot && !_o || ke) && (Te = T, ot = T.sessionId, Mo.current = T.sessionId, Ho = !0, ke && (ce.current = void 0, De.current = void 0));
|
|
27753
27862
|
}
|
|
27754
|
-
if (!
|
|
27863
|
+
if (!Te) {
|
|
27755
27864
|
ee || Ie(($e) => ({
|
|
27756
27865
|
...$e,
|
|
27757
27866
|
status: "connecting",
|
|
@@ -27786,12 +27895,12 @@ function ew(e) {
|
|
|
27786
27895
|
), $o = Gn && nt ? me.workspaceByCwd(nt) : void 0;
|
|
27787
27896
|
if ((St || ae.current) && !Ge && !ot && !_o) {
|
|
27788
27897
|
if (!Lo) {
|
|
27789
|
-
let
|
|
27898
|
+
let zt;
|
|
27790
27899
|
if (pt?.kind === "standalone" && wo.includes(
|
|
27791
27900
|
Du
|
|
27792
27901
|
))
|
|
27793
27902
|
try {
|
|
27794
|
-
|
|
27903
|
+
zt = await me.getStandaloneSessionOptions();
|
|
27795
27904
|
} catch (zo) {
|
|
27796
27905
|
console.warn(
|
|
27797
27906
|
"[DaemonSessionProvider] standalone session options failed in deferred connect:",
|
|
@@ -27799,7 +27908,7 @@ function ew(e) {
|
|
|
27799
27908
|
);
|
|
27800
27909
|
}
|
|
27801
27910
|
if (G || S.signal.aborted) return;
|
|
27802
|
-
const dn = Ts(
|
|
27911
|
+
const dn = Ts(zt);
|
|
27803
27912
|
Ie(
|
|
27804
27913
|
(zo) => zo.status === "error" || zo.sessionId ? zo : {
|
|
27805
27914
|
...ks(zo),
|
|
@@ -27811,7 +27920,7 @@ function ew(e) {
|
|
|
27811
27920
|
gitStatus: void 0,
|
|
27812
27921
|
commands: void 0,
|
|
27813
27922
|
skills: void 0,
|
|
27814
|
-
models:
|
|
27923
|
+
models: zt ? dn.models : void 0,
|
|
27815
27924
|
currentModel: dn.currentModel,
|
|
27816
27925
|
currentMode: dn.currentMode,
|
|
27817
27926
|
contextWindow: dn.contextWindow,
|
|
@@ -27845,26 +27954,26 @@ function ew(e) {
|
|
|
27845
27954
|
} = mi(
|
|
27846
27955
|
jt.status === "fulfilled" ? jt.value : void 0
|
|
27847
27956
|
), Xr = Ae.current.workspaceCwd === nt && (jt.status === "rejected" || ae.current && Zr.length === 0);
|
|
27848
|
-
Ie((
|
|
27849
|
-
...
|
|
27957
|
+
Ie((zt) => ({
|
|
27958
|
+
...zt,
|
|
27850
27959
|
status: "connected",
|
|
27851
27960
|
sessionContext: pt,
|
|
27852
27961
|
workspaceCwd: nt,
|
|
27853
27962
|
standaloneSession: void 0,
|
|
27854
|
-
gitBranch: !L &&
|
|
27963
|
+
gitBranch: !L && zt.workspaceCwd === nt ? zt.gitBranch : oo.status === "fulfilled" ? oo.value?.branch ?? void 0 : void 0,
|
|
27855
27964
|
models: Zs.models,
|
|
27856
27965
|
currentModel: Zs.currentModel,
|
|
27857
27966
|
currentMode: Zs.currentMode,
|
|
27858
27967
|
contextWindow: Zs.contextWindow,
|
|
27859
27968
|
providers: cn,
|
|
27860
27969
|
capabilities: ke,
|
|
27861
|
-
commands: Xr ?
|
|
27862
|
-
skills: Xr ?
|
|
27970
|
+
commands: Xr ? zt.commands : !I || jt.status === "rejected" ? void 0 : Zr,
|
|
27971
|
+
skills: Xr ? zt.skills : !I || jt.status === "rejected" ? void 0 : pu
|
|
27863
27972
|
})), I && $o ? (async () => {
|
|
27864
27973
|
try {
|
|
27865
|
-
const
|
|
27974
|
+
const zt = await $o.ensureRuntime(), dn = await wg(
|
|
27866
27975
|
$o,
|
|
27867
|
-
|
|
27976
|
+
zt,
|
|
27868
27977
|
() => G || S.signal.aborted || Ae.current.sessionId !== void 0
|
|
27869
27978
|
);
|
|
27870
27979
|
if (!dn) return;
|
|
@@ -27872,16 +27981,16 @@ function ew(e) {
|
|
|
27872
27981
|
Ie(
|
|
27873
27982
|
(Dn) => Dn.sessionId ? Dn : { ...Dn, commands: zo, skills: ci }
|
|
27874
27983
|
);
|
|
27875
|
-
} catch (
|
|
27984
|
+
} catch (zt) {
|
|
27876
27985
|
console.warn(
|
|
27877
27986
|
"[DaemonSessionProvider] workspace Skills runtime preparation failed:",
|
|
27878
|
-
|
|
27987
|
+
zt
|
|
27879
27988
|
);
|
|
27880
27989
|
}
|
|
27881
27990
|
})() : I && yn && !(ln.status === "fulfilled" && ln.value?.channelLive === !0) && !fe.current && (fe.current = !0, (async () => {
|
|
27882
27991
|
try {
|
|
27883
|
-
const
|
|
27884
|
-
if (G || S.signal.aborted || !
|
|
27992
|
+
const zt = await me.workspaceAcpPreheat(5e3);
|
|
27993
|
+
if (G || S.signal.aborted || !zt.ready || Ae.current.sessionId)
|
|
27885
27994
|
return;
|
|
27886
27995
|
const dn = await me.workspaceSkills();
|
|
27887
27996
|
if (G || S.signal.aborted || Ae.current.sessionId)
|
|
@@ -27890,10 +27999,10 @@ function ew(e) {
|
|
|
27890
27999
|
Ie(
|
|
27891
28000
|
(Dn) => Dn.sessionId ? Dn : { ...Dn, commands: zo, skills: ci }
|
|
27892
28001
|
);
|
|
27893
|
-
} catch (
|
|
28002
|
+
} catch (zt) {
|
|
27894
28003
|
console.warn(
|
|
27895
28004
|
"[DaemonSessionProvider] ACP preheat for workspace skills failed:",
|
|
27896
|
-
|
|
28005
|
+
zt
|
|
27897
28006
|
);
|
|
27898
28007
|
} finally {
|
|
27899
28008
|
fe.current = !1;
|
|
@@ -27901,7 +28010,7 @@ function ew(e) {
|
|
|
27901
28010
|
})());
|
|
27902
28011
|
return;
|
|
27903
28012
|
}
|
|
27904
|
-
const we = Ge ?? ot, qe = ts ? Oe.current : ta(void 0, we),
|
|
28013
|
+
const we = Ge ?? ot, qe = ts ? Oe.current : ta(void 0, we), Ht = we !== void 0 && we === Ae.current.sessionId && Ae.current.clientId !== void 0 && qe !== Ae.current.clientId, eo = !!Ge && Ot === "resume" && !Ht;
|
|
27905
28014
|
as = !!Ge, we && !ee && Ie(($e) => ({
|
|
27906
28015
|
...$e,
|
|
27907
28016
|
sessionId: we,
|
|
@@ -27914,7 +28023,7 @@ function ew(e) {
|
|
|
27914
28023
|
const to = y.current, mt = to !== void 0 && to.sessionId === we && wi(
|
|
27915
28024
|
to.sessionContext,
|
|
27916
28025
|
pt
|
|
27917
|
-
) ? to : void 0,
|
|
28026
|
+
) ? to : void 0, Gt = {
|
|
27918
28027
|
timeoutMs: mt?.requestTimeoutMs ?? Uc(Nt).requestTimeoutMs,
|
|
27919
28028
|
// Workspace restores only: the standalone request type omits
|
|
27920
28029
|
// source attribution, and the daemon applies it solely when the
|
|
@@ -27938,18 +28047,18 @@ function ew(e) {
|
|
|
27938
28047
|
pt?.kind === "standalone" ? he = eo ? await Qo.resumeStandalone(
|
|
27939
28048
|
me,
|
|
27940
28049
|
Ge,
|
|
27941
|
-
|
|
28050
|
+
Gt,
|
|
27942
28051
|
qe
|
|
27943
28052
|
) : await Qo.loadStandalone(
|
|
27944
28053
|
me,
|
|
27945
28054
|
Ge,
|
|
27946
|
-
|
|
28055
|
+
Gt,
|
|
27947
28056
|
qe
|
|
27948
28057
|
) : he = eo ? await Qo.resume(
|
|
27949
28058
|
me,
|
|
27950
28059
|
Ge,
|
|
27951
28060
|
{
|
|
27952
|
-
...
|
|
28061
|
+
...Gt,
|
|
27953
28062
|
workspaceCwd: nt
|
|
27954
28063
|
},
|
|
27955
28064
|
qe
|
|
@@ -27957,7 +28066,7 @@ function ew(e) {
|
|
|
27957
28066
|
me,
|
|
27958
28067
|
Ge,
|
|
27959
28068
|
{
|
|
27960
|
-
...
|
|
28069
|
+
...Gt,
|
|
27961
28070
|
workspaceCwd: nt
|
|
27962
28071
|
},
|
|
27963
28072
|
qe
|
|
@@ -27966,20 +28075,20 @@ function ew(e) {
|
|
|
27966
28075
|
he = pt?.kind === "standalone" ? await Qo.loadStandalone(
|
|
27967
28076
|
me,
|
|
27968
28077
|
ot,
|
|
27969
|
-
|
|
28078
|
+
Gt,
|
|
27970
28079
|
qe
|
|
27971
28080
|
) : await Qo.load(
|
|
27972
28081
|
me,
|
|
27973
28082
|
ot,
|
|
27974
28083
|
{
|
|
27975
|
-
...
|
|
28084
|
+
...Gt,
|
|
27976
28085
|
workspaceCwd: nt
|
|
27977
28086
|
},
|
|
27978
28087
|
qe
|
|
27979
28088
|
);
|
|
27980
28089
|
else if (pt?.kind === "standalone")
|
|
27981
28090
|
ss = !0, he = await Qo.createStandalone(me, {
|
|
27982
|
-
...
|
|
28091
|
+
...Yt !== void 0 ? { modelServiceId: Yt } : {},
|
|
27983
28092
|
...io.current?.approvalMode !== void 0 ? {
|
|
27984
28093
|
approvalMode: oc(
|
|
27985
28094
|
io.current.approvalMode
|
|
@@ -27992,7 +28101,7 @@ function ew(e) {
|
|
|
27992
28101
|
he = await Qo.createOrAttach(
|
|
27993
28102
|
me,
|
|
27994
28103
|
{
|
|
27995
|
-
...
|
|
28104
|
+
...Yt !== void 0 ? { modelServiceId: Yt } : {},
|
|
27996
28105
|
..._o ? { sessionScope: "thread" } : lt !== void 0 ? { sessionScope: lt } : {},
|
|
27997
28106
|
workspaceCwd: nt
|
|
27998
28107
|
},
|
|
@@ -28023,7 +28132,7 @@ function ew(e) {
|
|
|
28023
28132
|
}), y.current === mt && (y.current = void 0, mt.timeout !== void 0 && clearTimeout(mt.timeout), mt.reject(
|
|
28024
28133
|
new DOMException("Session load cancelled", "AbortError")
|
|
28025
28134
|
)), le.current === $e && (le.current = void 0), as = !1, $e?.sessionId === he.sessionId) {
|
|
28026
|
-
|
|
28135
|
+
Te = $e, ot = $e.sessionId, xo = 0, An = !0;
|
|
28027
28136
|
continue;
|
|
28028
28137
|
}
|
|
28029
28138
|
return;
|
|
@@ -28048,7 +28157,7 @@ function ew(e) {
|
|
|
28048
28157
|
he.replayDegraded === !0 ? "Fresh replay is degraded" : "Fresh replay does not contain the complete target turn"
|
|
28049
28158
|
)
|
|
28050
28159
|
)), le.current === oo && (le.current = void 0), oo?.sessionId === he.sessionId) {
|
|
28051
|
-
|
|
28160
|
+
Te = oo, ot = oo.sessionId, xo = 0, An = !0;
|
|
28052
28161
|
continue;
|
|
28053
28162
|
}
|
|
28054
28163
|
return;
|
|
@@ -28071,9 +28180,9 @@ function ew(e) {
|
|
|
28071
28180
|
...he.replaySnapshot.compactedReplay,
|
|
28072
28181
|
...he.replaySnapshot.liveJournal
|
|
28073
28182
|
];
|
|
28074
|
-
uo = tp(st), Mt = pr(uo),
|
|
28183
|
+
uo = tp(st), Mt = pr(uo), Te = he, ot = Te.sessionId, _o = !1, Mo.current = Te.sessionId, te.current = Te;
|
|
28075
28184
|
}
|
|
28076
|
-
const A =
|
|
28185
|
+
const A = Te, vt = ha(
|
|
28077
28186
|
A.session
|
|
28078
28187
|
) !== void 0 || Ct.current?.kind === "standalone" ? { kind: "standalone" } : Ct.current?.kind === "live" ? Ct.current : {
|
|
28079
28188
|
kind: "workspace",
|
|
@@ -28092,17 +28201,17 @@ function ew(e) {
|
|
|
28092
28201
|
const T = Ls(A.workspaceCwd);
|
|
28093
28202
|
T && qn.current.set(A, T.id);
|
|
28094
28203
|
}
|
|
28095
|
-
|
|
28204
|
+
_e !== A && (ut?.(), _e = A, ut = A.subscribeGeneratedUiRevocation?.((T) => {
|
|
28096
28205
|
const ke = Ls(
|
|
28097
28206
|
A.workspaceCwd
|
|
28098
28207
|
);
|
|
28099
28208
|
G || S.signal.aborted || !Dt || te.current !== A || !ke || qn.current.get(A) !== ke.id || ($r.current.get(A) ?? 0) >= T || ($r.current.set(A, T), ro(A, "policy", null));
|
|
28100
|
-
})),
|
|
28209
|
+
})), ye !== A && en((T) => ({
|
|
28101
28210
|
...T,
|
|
28102
28211
|
backgroundTurn: T.sessionId === A.sessionId && T.finishedBackgroundTurnId === A.backgroundTurn?.turnId ? void 0 : A.backgroundTurn,
|
|
28103
28212
|
backgroundTurnObservedAt: performance.now(),
|
|
28104
28213
|
finishedBackgroundTurnId: T.sessionId === A.sessionId ? A.backgroundTurn ? T.finishedBackgroundTurnId : T.backgroundTurn?.turnId ?? T.finishedBackgroundTurnId : void 0
|
|
28105
|
-
})),
|
|
28214
|
+
})), ye = A;
|
|
28106
28215
|
const et = Ns(A);
|
|
28107
28216
|
et === !1 && Tt.current.add(A);
|
|
28108
28217
|
const xt = Tt.current.has(A);
|
|
@@ -28177,7 +28286,7 @@ function ew(e) {
|
|
|
28177
28286
|
we.id
|
|
28178
28287
|
) && !(we.id > Ve.snapshotLastEventId && we.id <= Ve.lastObservedEventId);
|
|
28179
28288
|
try {
|
|
28180
|
-
const
|
|
28289
|
+
const Ht = da(
|
|
28181
28290
|
we,
|
|
28182
28291
|
A.clientId,
|
|
28183
28292
|
T,
|
|
@@ -28188,7 +28297,7 @@ function ew(e) {
|
|
|
28188
28297
|
}
|
|
28189
28298
|
), eo = ua(
|
|
28190
28299
|
we,
|
|
28191
|
-
|
|
28300
|
+
Ht,
|
|
28192
28301
|
lo,
|
|
28193
28302
|
tn,
|
|
28194
28303
|
{
|
|
@@ -28197,24 +28306,24 @@ function ew(e) {
|
|
|
28197
28306
|
}
|
|
28198
28307
|
), to = ao.current === "summary" ? ca(eo) : eo, mt = [...to];
|
|
28199
28308
|
if (we.type === "turn_complete") {
|
|
28200
|
-
const
|
|
28309
|
+
const Jt = we.data?.stopReason ?? "end_turn";
|
|
28201
28310
|
mt.push(
|
|
28202
|
-
Wo(we,
|
|
28311
|
+
Wo(we, Jt)
|
|
28203
28312
|
);
|
|
28204
28313
|
} else we.type === "turn_error" && mt.push(
|
|
28205
28314
|
Wo(we, "error")
|
|
28206
28315
|
);
|
|
28207
28316
|
if (pt.push(we), nt.push({
|
|
28208
28317
|
transcript: mt,
|
|
28209
|
-
sideEffects: Ve === void 0 ? to : qe ?
|
|
28318
|
+
sideEffects: Ve === void 0 ? to : qe ? Ht : []
|
|
28210
28319
|
}), qe) {
|
|
28211
|
-
const
|
|
28212
|
-
|
|
28213
|
-
const
|
|
28214
|
-
|
|
28320
|
+
const Jt = El(we);
|
|
28321
|
+
Jt && Rl(Jt);
|
|
28322
|
+
const Gt = _l(we);
|
|
28323
|
+
Gt && Dl(Gt), Ll(we) && Ul(we);
|
|
28215
28324
|
}
|
|
28216
|
-
} catch (
|
|
28217
|
-
const eo =
|
|
28325
|
+
} catch (Ht) {
|
|
28326
|
+
const eo = Ht instanceof Error ? Ht.message : String(Ht);
|
|
28218
28327
|
(Ve === void 0 || qe) && (lo({
|
|
28219
28328
|
severity: "warning",
|
|
28220
28329
|
category: "protocol",
|
|
@@ -28225,7 +28334,7 @@ function ew(e) {
|
|
|
28225
28334
|
recoverable: !0
|
|
28226
28335
|
}), console.warn(
|
|
28227
28336
|
"[DaemonSessionProvider] skipped malformed replay event:",
|
|
28228
|
-
|
|
28337
|
+
Ht
|
|
28229
28338
|
)), nt.push({ transcript: [], sideEffects: [] });
|
|
28230
28339
|
}
|
|
28231
28340
|
}
|
|
@@ -28234,9 +28343,9 @@ function ew(e) {
|
|
|
28234
28343
|
);
|
|
28235
28344
|
let wo = !1, yn = !1, yt;
|
|
28236
28345
|
if (Ve !== void 0 || ct !== void 0 || an || ge.getSnapshot().blocks.length === 0) {
|
|
28237
|
-
const we = Ve && zs ? Ve.checkpoint.maxBlocks : m, qe = (
|
|
28238
|
-
|
|
28239
|
-
},
|
|
28346
|
+
const we = Ve && zs ? Ve.checkpoint.maxBlocks : m, qe = (Jt) => {
|
|
28347
|
+
Jt.kind === "blocks" && Jt.evictedOldest !== !1 && (yn = !0);
|
|
28348
|
+
}, Ht = ws(
|
|
28240
28349
|
Ve && zs ? {
|
|
28241
28350
|
...Ve.checkpoint,
|
|
28242
28351
|
maxBlocks: we,
|
|
@@ -28255,30 +28364,30 @@ function ew(e) {
|
|
|
28255
28364
|
);
|
|
28256
28365
|
let eo;
|
|
28257
28366
|
if (tt < 0 && Ve === void 0)
|
|
28258
|
-
|
|
28367
|
+
Ht.dispatch(Lo);
|
|
28259
28368
|
else
|
|
28260
|
-
for (const [
|
|
28261
|
-
|
|
28262
|
-
const to =
|
|
28369
|
+
for (const [Jt, Gt] of nt.entries())
|
|
28370
|
+
Jt === tt && (eo = Ht.getSnapshot()), Ht.dispatch(Gt.transcript);
|
|
28371
|
+
const to = Ht.getSnapshot();
|
|
28263
28372
|
wo = yn || to.blocks.length >= we, wo && (yt = to.blocks.find(
|
|
28264
|
-
(
|
|
28373
|
+
(Jt) => (Jt.sourceRecordIds?.length ?? 0) > 0
|
|
28265
28374
|
)?.sourceRecordIds?.[0]);
|
|
28266
28375
|
const mt = we;
|
|
28267
28376
|
if (ge.reset({
|
|
28268
28377
|
...to,
|
|
28269
28378
|
maxBlocks: mt
|
|
28270
28379
|
}), ct && eo) {
|
|
28271
|
-
const
|
|
28272
|
-
(he) => he.kind === "status" && he.source === "history_truncated" &&
|
|
28273
|
-
),
|
|
28274
|
-
F.current =
|
|
28380
|
+
const Jt = ge.getSnapshot().blocks.find(
|
|
28381
|
+
(he) => he.kind === "status" && he.source === "history_truncated" && be(he.data) && he.data.scope === "live_journal"
|
|
28382
|
+
), Gt = F.current;
|
|
28383
|
+
F.current = Gt?.target.signature === ct.signature && Gt.attempted ? Gt : {
|
|
28275
28384
|
sessionId: A.sessionId,
|
|
28276
28385
|
target: ct,
|
|
28277
28386
|
checkpoint: {
|
|
28278
28387
|
...eo,
|
|
28279
28388
|
maxBlocks: mt
|
|
28280
28389
|
},
|
|
28281
|
-
...
|
|
28390
|
+
...Jt ? { markerBlockId: Jt.id } : {},
|
|
28282
28391
|
observedSnapshotEventIds: new Set(
|
|
28283
28392
|
Xa.flatMap(
|
|
28284
28393
|
(he) => he.id === void 0 ? [] : [he.id]
|
|
@@ -28375,7 +28484,7 @@ function ew(e) {
|
|
|
28375
28484
|
Ft.current,
|
|
28376
28485
|
A
|
|
28377
28486
|
), Vs = Ae.current.sessionId === A.sessionId ? Ae.current.goalState : void 0, Xd = Po ? Promise.resolve({ branch: Ae.current.gitBranch }) : Dt && L ? A.workspaceCwd ? me.workspaceByCwd(A.workspaceCwd).workspaceGit() : me.workspaceGit() : Promise.resolve(void 0), Or = !ti || !!Ae.current.context?.recovery, qr = Or ? xs(
|
|
28378
|
-
|
|
28487
|
+
Vt.current,
|
|
28379
28488
|
A
|
|
28380
28489
|
) : void 0, eu = Promise.allSettled([
|
|
28381
28490
|
ti || !Dt ? Promise.resolve(void 0) : me.workspaceProviders(),
|
|
@@ -28407,13 +28516,13 @@ function ew(e) {
|
|
|
28407
28516
|
oi?.status === "rejected" ? $n.current?.models : void 0,
|
|
28408
28517
|
ni?.status === "rejected" ? $n.current?.commands : void 0,
|
|
28409
28518
|
si?.status === "rejected" ? $n.current?.context : void 0
|
|
28410
|
-
].filter((T) => !!T), Hn = Ts(Nr), ls = cr(_t), Br = _t?.state.models, Hr =
|
|
28519
|
+
].filter((T) => !!T), Hn = Ts(Nr), ls = cr(_t), Br = _t?.state.models, Hr = be(Br) && Array.isArray(Br.availableModels), ri = ls && (ls.models.length > 0 || Hr) ? ls.models : Hn.models, Ys = ls?.currentModel ?? Hn.currentModel, su = Ys === Hn.currentModel ? Hn.contextWindow : Hn.models.find(
|
|
28411
28520
|
(T) => T.id === Ys
|
|
28412
28521
|
)?.contextWindow, au = ls?.contextWindow ?? ri.find((T) => T.id === Ys)?.contextWindow ?? su, { commands: iu, skills: ru } = Ni(Ks), Gr = dr(_t), rn = Zd();
|
|
28413
28522
|
if (Ie((T) => {
|
|
28414
28523
|
if (S.signal.aborted || te.current !== void 0 && te.current !== A || T.sessionId !== A.sessionId)
|
|
28415
28524
|
return T;
|
|
28416
|
-
const ke = _t?.sessionId === A.sessionId && qr !== void 0 &&
|
|
28525
|
+
const ke = _t?.sessionId === A.sessionId && qr !== void 0 && Vt.current.get(A) === qr, ct = rn && _t ? _t : T.context ?? (_t?.recovery ? {
|
|
28417
28526
|
v: _t.v,
|
|
28418
28527
|
sessionId: _t.sessionId,
|
|
28419
28528
|
workspaceCwd: _t.workspaceCwd,
|
|
@@ -28506,7 +28615,7 @@ function ew(e) {
|
|
|
28506
28615
|
const T = kt.current.get(
|
|
28507
28616
|
A.sessionId
|
|
28508
28617
|
);
|
|
28509
|
-
c.current.has(A.sessionId) && (d.current = A.sessionId), T?.controller.abort(), kt.current.delete(A.sessionId), Mn && Hs(), gt(N), Ne("idle"), ns(), qs = !0, A.setLastEventId(0), ot = A.sessionId, Js = !0, Uo = "state_resync",
|
|
28618
|
+
c.current.has(A.sessionId) && (d.current = A.sessionId), T?.controller.abort(), kt.current.delete(A.sessionId), Mn && Hs(), gt(N), Ne("idle"), ns(), qs = !0, A.setLastEventId(0), ot = A.sessionId, Js = !0, Uo = "state_resync", Te = void 0, te.current = void 0, on.current = () => !1, wn.current = () => !1, Ie((ke) => ({
|
|
28510
28619
|
...ke,
|
|
28511
28620
|
status: "connecting",
|
|
28512
28621
|
error: void 0,
|
|
@@ -28520,11 +28629,11 @@ function ew(e) {
|
|
|
28520
28629
|
sessionId: A.sessionId,
|
|
28521
28630
|
controller: cs,
|
|
28522
28631
|
restartRequested: !1
|
|
28523
|
-
},
|
|
28632
|
+
}, Kt.current = sn, Lr = A;
|
|
28524
28633
|
const cu = gn(
|
|
28525
28634
|
Ft.current,
|
|
28526
28635
|
A
|
|
28527
|
-
), bn = () => !G && !S.signal.aborted && !cs.signal.aborted && te.current === A &&
|
|
28636
|
+
), bn = () => !G && !S.signal.aborted && !cs.signal.aborted && te.current === A && Kt.current === sn && Ft.current.get(A) === cu;
|
|
28528
28637
|
let li = A.lastEventId === void 0, Qr = !1;
|
|
28529
28638
|
const Vr = () => {
|
|
28530
28639
|
bn() && vs(
|
|
@@ -28622,7 +28731,7 @@ function ew(e) {
|
|
|
28622
28731
|
if (pt && (Dl(pt), te.current !== A))
|
|
28623
28732
|
break;
|
|
28624
28733
|
if (Ll(T)) {
|
|
28625
|
-
if (T.type === "pending_prompt_completed" &&
|
|
28734
|
+
if (T.type === "pending_prompt_completed" && be(T.data) && T.data.state === "removed" && typeof T.data.promptId == "string" && rt.recordPromptRemoved(
|
|
28626
28735
|
T.data.promptId
|
|
28627
28736
|
), Ul(T), te.current !== A) break;
|
|
28628
28737
|
T.type === "pending_prompt_started" && (gt(N), Ne("waiting"));
|
|
@@ -28642,7 +28751,7 @@ function ew(e) {
|
|
|
28642
28751
|
lo,
|
|
28643
28752
|
tn
|
|
28644
28753
|
);
|
|
28645
|
-
T.type === "model_switched" &&
|
|
28754
|
+
T.type === "model_switched" && be(T.data) && T.data.subscriptionSignedOut === !0 && Dt && te.current === A && W.current?.(void 0, { reloadProviders: !1 }).catch(
|
|
28646
28755
|
(re) => console.warn(
|
|
28647
28756
|
"Unable to read models after a model switch",
|
|
28648
28757
|
re
|
|
@@ -28650,7 +28759,7 @@ function ew(e) {
|
|
|
28650
28759
|
);
|
|
28651
28760
|
const Gn = (_t?.recovery || Ae.current.context?.recovery) && (T.id === void 0 || T.id > du);
|
|
28652
28761
|
Gn && (T.type === "pending_prompt_started" || pa(yt) || yt.some((re) => re.type === "user.text.delta")) && (xs(
|
|
28653
|
-
|
|
28762
|
+
Vt.current,
|
|
28654
28763
|
A
|
|
28655
28764
|
), Ie(
|
|
28656
28765
|
(re) => te.current === A && re.context?.recovery?.canContinue ? {
|
|
@@ -28670,14 +28779,14 @@ function ew(e) {
|
|
|
28670
28779
|
if ($o || Gn && (T.type === "turn_complete" || T.type === "turn_error" || // A rewind can drop the interrupted turn itself.
|
|
28671
28780
|
T.type === "session_rewound" || yt.some((re) => re.type === "prompt.cancelled"))) {
|
|
28672
28781
|
const re = xs(
|
|
28673
|
-
|
|
28782
|
+
Vt.current,
|
|
28674
28783
|
A
|
|
28675
28784
|
), st = $o ? Fn(
|
|
28676
28785
|
Ft.current,
|
|
28677
28786
|
A
|
|
28678
28787
|
) : void 0, $e = (jt, ln = !1) => {
|
|
28679
28788
|
G || S.signal.aborted || cs.signal.aborted || Ie((oo) => {
|
|
28680
|
-
if (oo.sessionId !== A.sessionId ||
|
|
28789
|
+
if (oo.sessionId !== A.sessionId || Kt.current !== sn || te.current !== A)
|
|
28681
28790
|
return oo;
|
|
28682
28791
|
const cn = st?.() && bn() ? jt?.sessionId === A.sessionId ? Rs(
|
|
28683
28792
|
oo,
|
|
@@ -28686,7 +28795,7 @@ function ew(e) {
|
|
|
28686
28795
|
...oo,
|
|
28687
28796
|
workflowModeStatus: "unknown"
|
|
28688
28797
|
} : oo : oo;
|
|
28689
|
-
return cn.context && jt?.sessionId === A.sessionId && re ===
|
|
28798
|
+
return cn.context && jt?.sessionId === A.sessionId && re === Vt.current.get(A) ? {
|
|
28690
28799
|
...cn,
|
|
28691
28800
|
context: {
|
|
28692
28801
|
...cn.context,
|
|
@@ -28718,7 +28827,7 @@ function ew(e) {
|
|
|
28718
28827
|
(st) => st === "waiting" || st === "idle" && re ? "streaming" : st
|
|
28719
28828
|
);
|
|
28720
28829
|
}
|
|
28721
|
-
const qe = F.current,
|
|
28830
|
+
const qe = F.current, Ht = qe?.sessionId === A.sessionId && (T.type === "turn_complete" || T.type === "turn_error") && Tn(T) === qe.target.promptId;
|
|
28722
28831
|
(T.type === "turn_complete" || T.type === "turn_error") && ht();
|
|
28723
28832
|
const eo = !nt && !wo && _i(
|
|
28724
28833
|
kt.current,
|
|
@@ -28744,10 +28853,10 @@ function ew(e) {
|
|
|
28744
28853
|
(re) => re.type === "debug" && !ol(re.debugReason)
|
|
28745
28854
|
);
|
|
28746
28855
|
!Go() && mt && ht();
|
|
28747
|
-
const
|
|
28856
|
+
const Gt = !Go() && ge.getSnapshot().activeAssistantBlockId != null ? we.filter(
|
|
28748
28857
|
(re) => re.type !== "debug" || ol(re.debugReason)
|
|
28749
28858
|
) : we;
|
|
28750
|
-
co(
|
|
28859
|
+
co(Gt);
|
|
28751
28860
|
for (const re of yt)
|
|
28752
28861
|
if (T.type === "prompt_cancelled" && re.type === "prompt.cancelled" && (Mn || re.originatorClientId !== A.clientId)) {
|
|
28753
28862
|
Bo(
|
|
@@ -28793,9 +28902,9 @@ function ew(e) {
|
|
|
28793
28902
|
A.sessionId,
|
|
28794
28903
|
T
|
|
28795
28904
|
);
|
|
28796
|
-
re && !
|
|
28905
|
+
re && !Ht && x(re);
|
|
28797
28906
|
}
|
|
28798
|
-
if (
|
|
28907
|
+
if (Ht && qe ? (qe.terminalSeen = !0, queueMicrotask(za)) : qe?.terminalSeen && queueMicrotask(za), T.type === "state_resync_required") {
|
|
28799
28908
|
const re = typeof T.data == "object" && T.data !== null ? T.data.reason : void 0;
|
|
28800
28909
|
if (re !== "epoch_reset") {
|
|
28801
28910
|
jn() && (Ne("idle"), gt(
|
|
@@ -28804,7 +28913,7 @@ function ew(e) {
|
|
|
28804
28913
|
"[DaemonSessionProvider] event stream resync (sessionId=%s, reason=%s)",
|
|
28805
28914
|
A.sessionId,
|
|
28806
28915
|
typeof re == "string" ? re : "unknown"
|
|
28807
|
-
), Js = !0, Uo = "state_resync",
|
|
28916
|
+
), Js = !0, Uo = "state_resync", Te = void 0, te.current = void 0, on.current = () => !1, wn.current = () => !1, Ie((st) => ({
|
|
28808
28917
|
...st,
|
|
28809
28918
|
status: "connecting",
|
|
28810
28919
|
error: void 0,
|
|
@@ -28825,7 +28934,7 @@ function ew(e) {
|
|
|
28825
28934
|
A,
|
|
28826
28935
|
js ? "runtime-stopped" : "deleted",
|
|
28827
28936
|
js ? null : st
|
|
28828
|
-
), kt.current.get(st)?.controller.abort(), kt.current.delete(st),
|
|
28937
|
+
), kt.current.get(st)?.controller.abort(), kt.current.delete(st), Te = void 0, te.current = void 0;
|
|
28829
28938
|
break;
|
|
28830
28939
|
}
|
|
28831
28940
|
} catch (tt) {
|
|
@@ -28899,7 +29008,7 @@ function ew(e) {
|
|
|
28899
29008
|
return;
|
|
28900
29009
|
}
|
|
28901
29010
|
if (ae.current) {
|
|
28902
|
-
|
|
29011
|
+
Te = void 0, te.current = void 0, on.current = () => !1, wn.current = () => !1;
|
|
28903
29012
|
return;
|
|
28904
29013
|
}
|
|
28905
29014
|
!G && !S.signal.aborted && !Js && (z.current?.check(), Uo = "stream_end", te.current === A && (console.debug("[DaemonSessionProvider] SSE stream ended"), gt(N), jn() && (Ne("idle"), Bo({
|
|
@@ -28915,9 +29024,9 @@ function ew(e) {
|
|
|
28915
29024
|
)
|
|
28916
29025
|
})));
|
|
28917
29026
|
} catch (Pe) {
|
|
28918
|
-
|
|
29027
|
+
ye && it.invalidate(ye, "stream_error");
|
|
28919
29028
|
const Rn = sn?.restartRequested === !0;
|
|
28920
|
-
if (Ya(),
|
|
29029
|
+
if (Ya(), Te && te.current !== Te) {
|
|
28921
29030
|
ns();
|
|
28922
29031
|
return;
|
|
28923
29032
|
}
|
|
@@ -28989,8 +29098,8 @@ function ew(e) {
|
|
|
28989
29098
|
return;
|
|
28990
29099
|
continue;
|
|
28991
29100
|
}
|
|
28992
|
-
const En =
|
|
28993
|
-
if (En && (vt || Dt) && (c.current.delete(En), d.current === En && (d.current = void 0), kt.current.get(En)?.controller.abort(), kt.current.delete(En)), gt(N), (vt || Dt || jn()) && Ne("idle"), Mt && Ve && (Mt.sessionId === Ge || Mt.sessionId === ot) && (le.current?.sessionId === Mt.sessionId && (le.current = void 0), y.current = void 0, Mt.timeout !== void 0 && clearTimeout(Mt.timeout), Mt.reject(Pe)), an ||
|
|
29101
|
+
const En = Te?.sessionId ?? ot ?? d.current, vt = $f(Pe), Dt = Pf(Pe);
|
|
29102
|
+
if (En && (vt || Dt) && (c.current.delete(En), d.current === En && (d.current = void 0), kt.current.get(En)?.controller.abort(), kt.current.delete(En)), gt(N), (vt || Dt || jn()) && Ne("idle"), Mt && Ve && (Mt.sessionId === Ge || Mt.sessionId === ot) && (le.current?.sessionId === Mt.sessionId && (le.current = void 0), y.current = void 0, Mt.timeout !== void 0 && clearTimeout(Mt.timeout), Mt.reject(Pe)), an || Te === void 0 && Ct.current?.kind === "standalone" && cp(Vo(Pe)) || Qa || Pe instanceof di || Te === void 0 && Ct.current?.kind !== "workspace" && Ct.current !== void 0 && dp(Pe)) {
|
|
28994
29103
|
const et = Ge ?? ot;
|
|
28995
29104
|
Ie((xt) => ({
|
|
28996
29105
|
...xt,
|
|
@@ -29017,15 +29126,15 @@ function ew(e) {
|
|
|
29017
29126
|
return;
|
|
29018
29127
|
}
|
|
29019
29128
|
if (vt || Dt) {
|
|
29020
|
-
if (
|
|
29021
|
-
|
|
29129
|
+
if (Te ? ro(
|
|
29130
|
+
Te,
|
|
29022
29131
|
vt ? "auth-failed" : "deleted",
|
|
29023
|
-
vt ? null :
|
|
29132
|
+
vt ? null : Te.sessionId
|
|
29024
29133
|
) : Bs && ko.invalidate({
|
|
29025
29134
|
scopeId: Bs.scopeId,
|
|
29026
29135
|
...vt ? {} : { sessionId: Bs.sessionId },
|
|
29027
29136
|
reason: vt ? "auth-failed" : "deleted"
|
|
29028
|
-
}),
|
|
29137
|
+
}), Te = void 0, te.current = void 0, vt) {
|
|
29029
29138
|
Ie((xt) => ({
|
|
29030
29139
|
...ks(xt),
|
|
29031
29140
|
status: "error",
|
|
@@ -29086,8 +29195,8 @@ function ew(e) {
|
|
|
29086
29195
|
catchingUp: void 0
|
|
29087
29196
|
}));
|
|
29088
29197
|
return;
|
|
29089
|
-
} else if (ee &&
|
|
29090
|
-
|
|
29198
|
+
} else if (ee && Te === void 0 && Mt?.sessionId === Ge && te.current?.sessionId === Ge) {
|
|
29199
|
+
Te = te.current, ot = Te.sessionId, xo = 0, An = !0;
|
|
29091
29200
|
continue;
|
|
29092
29201
|
} else if (Dd(Pe)) {
|
|
29093
29202
|
Ie((et) => ({
|
|
@@ -29106,10 +29215,10 @@ function ew(e) {
|
|
|
29106
29215
|
} else
|
|
29107
29216
|
console.debug(
|
|
29108
29217
|
"[DaemonSessionProvider] retriable SSE error, preserving session for delta resume (sessionId=%s)",
|
|
29109
|
-
|
|
29218
|
+
Te?.sessionId
|
|
29110
29219
|
), sn && (Uo = "transport_error");
|
|
29111
29220
|
if (!V) {
|
|
29112
|
-
|
|
29221
|
+
Te = void 0, te.current = void 0, Ie((et) => ({
|
|
29113
29222
|
...et,
|
|
29114
29223
|
status: "error",
|
|
29115
29224
|
error: Ho,
|
|
@@ -29160,14 +29269,14 @@ function ew(e) {
|
|
|
29160
29269
|
S.signal.addEventListener("abort", Wr, { once: !0 }), await dl(Qd, Ja.signal), S.signal.removeEventListener("abort", Wr);
|
|
29161
29270
|
}
|
|
29162
29271
|
})(), () => {
|
|
29163
|
-
const me =
|
|
29272
|
+
const me = ye;
|
|
29164
29273
|
me && it.invalidate(me, "stream_closed"), G = !0, ut?.(), S.abort();
|
|
29165
|
-
const
|
|
29166
|
-
|
|
29274
|
+
const Te = me !== void 0 && te.current === me, Nt = me === void 0 && te.current === void 0, ot = Te && (me === le.current || Jo.current !== void 0);
|
|
29275
|
+
Te && Jo.current !== void 0 ? (ce.current = me, De.current = Ct.current) : ce.current === me && (ce.current = void 0, De.current = void 0);
|
|
29167
29276
|
const _o = !Wa.current;
|
|
29168
|
-
|
|
29277
|
+
Te || Nt ? ((!ot || _o || !me) && it.clear(), ht()) : ns(), Te && (!ot || _o) && (on.current = () => !1, wn.current = () => !1, Ne("idle"), gt(N)), Re !== void 0 && y.current === Re && (Te || Nt) && (!ot || _o) && (y.current.timeout !== void 0 && clearTimeout(y.current.timeout), y.current.reject(
|
|
29169
29278
|
new DOMException("Session load interrupted by cleanup", "AbortError")
|
|
29170
|
-
), y.current = void 0),
|
|
29279
|
+
), y.current = void 0), Te && (!ot || _o) && me.clientId && pl({
|
|
29171
29280
|
baseUrl: J,
|
|
29172
29281
|
token: se,
|
|
29173
29282
|
sessionId: me.sessionId,
|
|
@@ -29178,7 +29287,7 @@ function ew(e) {
|
|
|
29178
29287
|
se
|
|
29179
29288
|
)?.getSnapshot();
|
|
29180
29289
|
(Uo === void 0 || Uo === "available") && console.warn("[DaemonSessionProvider] detach failed:", xo);
|
|
29181
|
-
}),
|
|
29290
|
+
}), Te && (!ot || _o) && (te.current = void 0);
|
|
29182
29291
|
};
|
|
29183
29292
|
}, [
|
|
29184
29293
|
q,
|
|
@@ -29193,7 +29302,7 @@ function ew(e) {
|
|
|
29193
29302
|
Ls,
|
|
29194
29303
|
os,
|
|
29195
29304
|
de,
|
|
29196
|
-
|
|
29305
|
+
Yt,
|
|
29197
29306
|
lt,
|
|
29198
29307
|
u,
|
|
29199
29308
|
m,
|
|
@@ -29239,17 +29348,17 @@ function ew(e) {
|
|
|
29239
29348
|
if (R || te.current !== G || Q.current !== ee)
|
|
29240
29349
|
return;
|
|
29241
29350
|
ee.consecutiveFailures += 1;
|
|
29242
|
-
const
|
|
29243
|
-
if (
|
|
29351
|
+
const ye = Re instanceof Error ? Re.message : "Session heartbeat failed", _e = mo(Re);
|
|
29352
|
+
if (_e !== void 0) {
|
|
29244
29353
|
const We = ee.lastHttpError?.status;
|
|
29245
29354
|
ee.lastHttpError = {
|
|
29246
|
-
status: bo(
|
|
29247
|
-
message: $s(We) ? ee.lastHttpError?.message ??
|
|
29355
|
+
status: bo(_e, We) ?? _e,
|
|
29356
|
+
message: $s(We) ? ee.lastHttpError?.message ?? ye : ye
|
|
29248
29357
|
};
|
|
29249
29358
|
}
|
|
29250
29359
|
if (ee.consecutiveFailures < pe)
|
|
29251
29360
|
return;
|
|
29252
|
-
const ut = ee.lastHttpError?.status, wt = ee.lastHttpError?.message ??
|
|
29361
|
+
const ut = ee.lastHttpError?.status, wt = ee.lastHttpError?.message ?? ye, Qe = ut !== void 0 && yr.has(ut), Xe = $s(ut);
|
|
29253
29362
|
if (Qe || Xe) {
|
|
29254
29363
|
ro(
|
|
29255
29364
|
G,
|
|
@@ -29335,7 +29444,7 @@ function ew(e) {
|
|
|
29335
29444
|
pendingSessionLoadRef: y,
|
|
29336
29445
|
pendingSessionLoadIdRef: b,
|
|
29337
29446
|
sessionConfigGeneration: Ft.current,
|
|
29338
|
-
sessionRecoveryGeneration:
|
|
29447
|
+
sessionRecoveryGeneration: Vt.current,
|
|
29339
29448
|
heartbeatSupportedRef: ie,
|
|
29340
29449
|
manualSessionClearRef: ae,
|
|
29341
29450
|
skipNextCleanupDetachSessionRef: le,
|
|
@@ -29349,7 +29458,7 @@ function ew(e) {
|
|
|
29349
29458
|
on.current = () => !1, wn.current = () => !1;
|
|
29350
29459
|
},
|
|
29351
29460
|
restartEventStream: (R) => {
|
|
29352
|
-
const S =
|
|
29461
|
+
const S = Kt.current;
|
|
29353
29462
|
if (S?.sessionId === R) {
|
|
29354
29463
|
if (!O) return;
|
|
29355
29464
|
S.restartRequested = !0, S.controller.abort();
|
|
@@ -29381,9 +29490,9 @@ function ew(e) {
|
|
|
29381
29490
|
ee,
|
|
29382
29491
|
Re
|
|
29383
29492
|
).then(
|
|
29384
|
-
(
|
|
29493
|
+
(ye) => fo.remember(ye, {
|
|
29385
29494
|
kind: "workspace",
|
|
29386
|
-
cwd:
|
|
29495
|
+
cwd: ye.workspaceCwd
|
|
29387
29496
|
})
|
|
29388
29497
|
);
|
|
29389
29498
|
},
|
|
@@ -29489,7 +29598,7 @@ function ew(e) {
|
|
|
29489
29598
|
const ee = go.current;
|
|
29490
29599
|
let Re = !1;
|
|
29491
29600
|
try {
|
|
29492
|
-
const
|
|
29601
|
+
const ye = await G.getTranscriptPage({
|
|
29493
29602
|
...ao.current === "summary" ? { compactedReplayMode: "summary" } : {},
|
|
29494
29603
|
...S.cursor !== void 0 ? { cursor: S.cursor } : S.beforeRecordId !== void 0 ? { beforeRecordId: S.beforeRecordId } : {},
|
|
29495
29604
|
limit: Zo.current ?? 100,
|
|
@@ -29506,22 +29615,22 @@ function ew(e) {
|
|
|
29506
29615
|
});
|
|
29507
29616
|
return;
|
|
29508
29617
|
}
|
|
29509
|
-
if (
|
|
29618
|
+
if (ye.partial || ye.replayError)
|
|
29510
29619
|
throw Re = !0, new Error(
|
|
29511
|
-
|
|
29620
|
+
ye.replayError ?? "Earlier session history was only partially read"
|
|
29512
29621
|
);
|
|
29513
|
-
const
|
|
29622
|
+
const _e = {
|
|
29514
29623
|
...Le.current,
|
|
29515
29624
|
suppressOwnUserEcho: !1
|
|
29516
|
-
}, ut =
|
|
29517
|
-
for (const co of
|
|
29625
|
+
}, ut = ye.events.map(Di).find((co) => co !== void 0), wt = [];
|
|
29626
|
+
for (const co of ye.events)
|
|
29518
29627
|
try {
|
|
29519
29628
|
const ht = ua(
|
|
29520
29629
|
co,
|
|
29521
29630
|
da(
|
|
29522
29631
|
co,
|
|
29523
29632
|
G.clientId,
|
|
29524
|
-
|
|
29633
|
+
_e,
|
|
29525
29634
|
Ie,
|
|
29526
29635
|
{ updateConnection: !1 }
|
|
29527
29636
|
),
|
|
@@ -29579,13 +29688,13 @@ function ew(e) {
|
|
|
29579
29688
|
));
|
|
29580
29689
|
}
|
|
29581
29690
|
const We = ge.getSnapshot().blocks.length < m;
|
|
29582
|
-
S.capacityReached =
|
|
29691
|
+
S.capacityReached = ye.hasMore && !We, S.cursor = ut === void 0 ? ye.nextCursor : void 0, S.beforeRecordId = ut, S.hasMore = ye.hasMore && We, S.persistedReachable = ye.hasMore, S.loading = !1, Et({
|
|
29583
29692
|
hasMore: S.hasMore,
|
|
29584
29693
|
loading: !1,
|
|
29585
29694
|
capacityReached: S.capacityReached,
|
|
29586
29695
|
paginationError: !1
|
|
29587
29696
|
});
|
|
29588
|
-
} catch (
|
|
29697
|
+
} catch (ye) {
|
|
29589
29698
|
if (te.current !== G || He.current !== S)
|
|
29590
29699
|
return;
|
|
29591
29700
|
if (go.current !== ee) {
|
|
@@ -29597,21 +29706,21 @@ function ew(e) {
|
|
|
29597
29706
|
});
|
|
29598
29707
|
return;
|
|
29599
29708
|
}
|
|
29600
|
-
const
|
|
29601
|
-
throw S.hasMore =
|
|
29602
|
-
hasMore:
|
|
29709
|
+
const _e = !Re && (!(ye instanceof yo) || ye.status >= 500 || ye.status === 408 || ye.status === 429);
|
|
29710
|
+
throw S.hasMore = _e, S.loading = !1, S.capacityReached = !1, S.paginationError = !_e, Et({
|
|
29711
|
+
hasMore: _e,
|
|
29603
29712
|
loading: !1,
|
|
29604
29713
|
capacityReached: !1,
|
|
29605
|
-
paginationError: !
|
|
29606
|
-
}),
|
|
29714
|
+
paginationError: !_e
|
|
29715
|
+
}), _e && lo({
|
|
29607
29716
|
severity: "warning",
|
|
29608
29717
|
category: "user_action",
|
|
29609
29718
|
operation: "load_session",
|
|
29610
29719
|
code: "daemon.transcript_history.failed",
|
|
29611
29720
|
message: "Failed to load earlier session history",
|
|
29612
|
-
debugMessage:
|
|
29613
|
-
recoverable:
|
|
29614
|
-
}),
|
|
29721
|
+
debugMessage: ye instanceof Error ? ye.message : String(ye),
|
|
29722
|
+
recoverable: _e
|
|
29723
|
+
}), ye;
|
|
29615
29724
|
} finally {
|
|
29616
29725
|
B.current?.();
|
|
29617
29726
|
}
|
|
@@ -29659,9 +29768,9 @@ function ew(e) {
|
|
|
29659
29768
|
const Ha = Ue(
|
|
29660
29769
|
() => ({
|
|
29661
29770
|
capture: (R) => {
|
|
29662
|
-
const S = te.current, G = R?.includeRecovery === !0, ee = S ?
|
|
29771
|
+
const S = te.current, G = R?.includeRecovery === !0, ee = S ? Vt.current.get(S) : void 0;
|
|
29663
29772
|
return {
|
|
29664
|
-
isCurrent: () => te.current === S && (!G || S !== void 0 &&
|
|
29773
|
+
isCurrent: () => te.current === S && (!G || S !== void 0 && Vt.current.get(S) === ee)
|
|
29665
29774
|
};
|
|
29666
29775
|
}
|
|
29667
29776
|
}),
|
|
@@ -29677,7 +29786,7 @@ function ew(e) {
|
|
|
29677
29786
|
async readPage(G, ee) {
|
|
29678
29787
|
if (te.current !== R)
|
|
29679
29788
|
throw new Error("Hook session changed");
|
|
29680
|
-
const
|
|
29789
|
+
const ye = await (S ? R.client.workspaceByCwd(S) : R.client).getSessionTurnHooksPage(
|
|
29681
29790
|
R.sessionId,
|
|
29682
29791
|
G,
|
|
29683
29792
|
{
|
|
@@ -29687,7 +29796,7 @@ function ew(e) {
|
|
|
29687
29796
|
);
|
|
29688
29797
|
if (te.current !== R)
|
|
29689
29798
|
throw new Error("Hook session changed");
|
|
29690
|
-
return
|
|
29799
|
+
return ye;
|
|
29691
29800
|
}
|
|
29692
29801
|
};
|
|
29693
29802
|
}, [
|
|
@@ -29821,7 +29930,7 @@ function lc(e, t) {
|
|
|
29821
29930
|
if (!o) return;
|
|
29822
29931
|
const n = t.originatorClientId ? { originatorClientId: t.originatorClientId } : {};
|
|
29823
29932
|
if (t.type === "turn_error") {
|
|
29824
|
-
const r =
|
|
29933
|
+
const r = be(t.data) ? t.data : {};
|
|
29825
29934
|
return {
|
|
29826
29935
|
sessionId: e,
|
|
29827
29936
|
promptId: o,
|
|
@@ -29905,13 +30014,13 @@ function gf(e) {
|
|
|
29905
30014
|
}
|
|
29906
30015
|
function hf(e) {
|
|
29907
30016
|
const t = {};
|
|
29908
|
-
if (e.id !== void 0 && (t.eventId = e.id), !
|
|
30017
|
+
if (e.id !== void 0 && (t.eventId = e.id), !be(e.data))
|
|
29909
30018
|
return t.payload = "non-object", t;
|
|
29910
30019
|
const o = ff(e.data.env), n = Is(e.data.changedKeys), a = Is(e.data.sessionsRefreshed), r = Is(e.data.sessionsSkipped), s = e.data.childReloaded, i = Yo(e.data, "childError");
|
|
29911
30020
|
return o && (t.env = o), n && (t.changedKeys = n), typeof s == "boolean" && (t.childReloaded = s), a && (t.sessionsRefreshed = a), r && (t.sessionsSkipped = r), i && (t.childError = i), t;
|
|
29912
30021
|
}
|
|
29913
30022
|
function ff(e) {
|
|
29914
|
-
if (
|
|
30023
|
+
if (be(e))
|
|
29915
30024
|
return {
|
|
29916
30025
|
updatedKeys: Is(e.updatedKeys) ?? [],
|
|
29917
30026
|
removedKeys: Is(e.removedKeys) ?? []
|
|
@@ -29924,7 +30033,7 @@ function Is(e) {
|
|
|
29924
30033
|
function ua(e, t, o, n, a = {}) {
|
|
29925
30034
|
if (a.hideHistoryTruncation && tf(e))
|
|
29926
30035
|
return [];
|
|
29927
|
-
if (!a.suppressSideEffects && e.type === "session_snapshot" &&
|
|
30036
|
+
if (!a.suppressSideEffects && e.type === "session_snapshot" && be(e.data) && e.data.recordingDegraded === !1) {
|
|
29928
30037
|
const s = Yo(e.data, "sessionId");
|
|
29929
30038
|
s && n(`daemon.session_recording_degraded:${s}`);
|
|
29930
30039
|
}
|
|
@@ -29955,7 +30064,7 @@ function kf(e, t) {
|
|
|
29955
30064
|
switch (e.type) {
|
|
29956
30065
|
case "session_recording_degraded":
|
|
29957
30066
|
case "session_snapshot": {
|
|
29958
|
-
const n =
|
|
30067
|
+
const n = be(e.data) ? Yo(e.data, "sessionId") : void 0;
|
|
29959
30068
|
return {
|
|
29960
30069
|
...o,
|
|
29961
30070
|
...n ? { id: `daemon.session_recording_degraded:${n}` } : {},
|
|
@@ -30144,11 +30253,11 @@ function pa(e) {
|
|
|
30144
30253
|
}
|
|
30145
30254
|
function Sf(e) {
|
|
30146
30255
|
if (e.type !== "session_update") return null;
|
|
30147
|
-
const t =
|
|
30256
|
+
const t = be(e.data) ? e.data : void 0, o = be(t?.update) ? t.update : be(e.data) ? e.data : void 0;
|
|
30148
30257
|
if (!o || o.sessionUpdate !== "agent_message_chunk")
|
|
30149
30258
|
return null;
|
|
30150
30259
|
const n = o._meta;
|
|
30151
|
-
if (!
|
|
30260
|
+
if (!be(n)) return null;
|
|
30152
30261
|
const a = xf(n.goalStatus);
|
|
30153
30262
|
return a ? Cf(
|
|
30154
30263
|
e,
|
|
@@ -30166,14 +30275,14 @@ function Cf(e, t) {
|
|
|
30166
30275
|
};
|
|
30167
30276
|
}
|
|
30168
30277
|
function Tf(e, t) {
|
|
30169
|
-
if (e.kind !== "aborted" || !
|
|
30278
|
+
if (e.kind !== "aborted" || !be(t)) return e;
|
|
30170
30279
|
const o = t.goal;
|
|
30171
|
-
if (!
|
|
30280
|
+
if (!be(o)) return e;
|
|
30172
30281
|
const n = o.status;
|
|
30173
30282
|
return n !== "blocked" && n !== "usage_limited" ? e : { ...e, kind: n };
|
|
30174
30283
|
}
|
|
30175
30284
|
function xf(e) {
|
|
30176
|
-
if (!
|
|
30285
|
+
if (!be(e)) return null;
|
|
30177
30286
|
const t = Yo(e, "kind");
|
|
30178
30287
|
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
|
|
30179
30288
|
// actively running: the card never rendered and the active-goal
|
|
@@ -30290,7 +30399,7 @@ function Pf(e) {
|
|
|
30290
30399
|
return t !== void 0 && af.has(t);
|
|
30291
30400
|
}
|
|
30292
30401
|
function Md(e) {
|
|
30293
|
-
return !(e instanceof yo) || e.status !== 409 ? !1 : (
|
|
30402
|
+
return !(e instanceof yo) || e.status !== 409 ? !1 : (be(e.body) ? e.body : void 0)?.code === "session_archived";
|
|
30294
30403
|
}
|
|
30295
30404
|
function $f(e) {
|
|
30296
30405
|
const t = mo(e);
|
|
@@ -30298,17 +30407,17 @@ function $f(e) {
|
|
|
30298
30407
|
}
|
|
30299
30408
|
function If(e, t = !1) {
|
|
30300
30409
|
if (!(e instanceof yo) || e.status !== 404) return !1;
|
|
30301
|
-
const o =
|
|
30410
|
+
const o = be(e.body) ? e.body : void 0;
|
|
30302
30411
|
return o?.code === "session_closing" || t && typeof o?.error == "string" && o.error.endsWith(
|
|
30303
30412
|
"The session is closing; retry after close completes"
|
|
30304
30413
|
);
|
|
30305
30414
|
}
|
|
30306
30415
|
function Dd(e) {
|
|
30307
|
-
return !(e instanceof yo) || e.status !== 409 ? !1 : (
|
|
30416
|
+
return !(e instanceof yo) || e.status !== 409 ? !1 : (be(e.body) ? e.body : void 0)?.code === "restore_in_progress";
|
|
30308
30417
|
}
|
|
30309
30418
|
function Af(e) {
|
|
30310
30419
|
if (!Dd(e)) return;
|
|
30311
|
-
const t =
|
|
30420
|
+
const t = be(e.body) ? e.body : void 0;
|
|
30312
30421
|
if (t?.retryable !== !0 || t.reason === "awaiting_abandoned_cleanup")
|
|
30313
30422
|
return;
|
|
30314
30423
|
const o = t.retryAfterSeconds;
|
|
@@ -31384,7 +31493,7 @@ export {
|
|
|
31384
31493
|
uk as b,
|
|
31385
31494
|
Gk as b0,
|
|
31386
31495
|
Nk as b1,
|
|
31387
|
-
|
|
31496
|
+
be as b2,
|
|
31388
31497
|
Qf as b3,
|
|
31389
31498
|
pg as b4,
|
|
31390
31499
|
Vk as b5,
|