@burdenoff/fe-libs 2026.1028.6 → 2026.1028.8
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.
|
@@ -301,33 +301,34 @@ async function Ee(e, t, n, r = 3e5) {
|
|
|
301
301
|
throw Error("Sandbox startup timed out");
|
|
302
302
|
}
|
|
303
303
|
async function De(e, t, n, r, i = 9e4, a) {
|
|
304
|
-
let s = Date.now(), l = (t) => (E.getState().setSandboxWriteCapabilities(e, X(t)), t);
|
|
305
|
-
if (
|
|
306
|
-
let n = Date.now();
|
|
304
|
+
let s = Date.now(), l = (t) => (E.getState().setSandboxWriteCapabilities(e, X(t)), t), u = S("waitForAssistantReady") === "unsupported";
|
|
305
|
+
if (!u) for (; Date.now() - s < i;) {
|
|
306
|
+
let n = Date.now(), d = i - (n - s);
|
|
307
|
+
if (d < 1e3) break;
|
|
307
308
|
try {
|
|
308
309
|
let u = await c({
|
|
309
310
|
query: ae,
|
|
310
311
|
operationName: "WaitForAssistantReady",
|
|
311
312
|
variables: {
|
|
312
313
|
id: e,
|
|
313
|
-
timeoutSeconds: Math.
|
|
314
|
+
timeoutSeconds: Math.min(25, Math.floor(d / 1e3)),
|
|
314
315
|
context: o(t, r)
|
|
315
316
|
},
|
|
316
317
|
workspaceId: t,
|
|
317
318
|
authContext: r
|
|
318
319
|
});
|
|
319
320
|
w("waitForAssistantReady");
|
|
320
|
-
let
|
|
321
|
-
if ((
|
|
322
|
-
let
|
|
323
|
-
|
|
321
|
+
let f = u.waitForAssistantReady;
|
|
322
|
+
if ((f.waited || !f.ready) && a?.(), f.ready && f.health) return l(f.health);
|
|
323
|
+
let p = Date.now(), m = i - (p - s);
|
|
324
|
+
p - n < 400 && m > 0 && await new Promise((e) => setTimeout(e, Math.min(400, m)));
|
|
324
325
|
} catch (e) {
|
|
325
326
|
if (!C(e, "waitForAssistantReady")) throw e;
|
|
326
|
-
T("waitForAssistantReady");
|
|
327
|
+
T("waitForAssistantReady"), u = !0;
|
|
327
328
|
break;
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
|
-
for (; Date.now() - s < i;) {
|
|
331
|
+
for (; u && Date.now() - s < i;) {
|
|
331
332
|
try {
|
|
332
333
|
return l(await k(e, t, "/health", "GET", void 0, n, r, "transport"));
|
|
333
334
|
} catch (e) {
|
|
@@ -48,14 +48,14 @@ function o(e) {
|
|
|
48
48
|
}
|
|
49
49
|
async function s(n, r) {
|
|
50
50
|
try {
|
|
51
|
-
return o(await e({
|
|
51
|
+
return o((await e({
|
|
52
52
|
gateway: "workspace",
|
|
53
53
|
query: t,
|
|
54
54
|
operationName: "AiCreditStatus",
|
|
55
55
|
variables: { productKey: n },
|
|
56
56
|
workspaceId: r ?? !0,
|
|
57
57
|
suppressGlobalErrorEvent: !0
|
|
58
|
-
}));
|
|
58
|
+
}))?.data);
|
|
59
59
|
} catch {
|
|
60
60
|
return null;
|
|
61
61
|
}
|