@ipul-labs/forge 1.13.2 → 1.14.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-lib/ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
var Pt = { exports: {} },
|
|
1
|
+
import Pn, { useState as h, useSyncExternalStore as In, useRef as oe, useEffect as G, createContext as bt, useContext as bs, useCallback as ht, useMemo as Oe } from "react";
|
|
2
|
+
import { useNavigate as On, useLocation as Mn } from "react-router-dom";
|
|
3
|
+
var Pt = { exports: {} }, Xe = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,10 +10,10 @@ var Pt = { exports: {} }, Ke = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
13
|
+
var cs;
|
|
14
|
+
function Ln() {
|
|
15
|
+
if (cs) return Xe;
|
|
16
|
+
cs = 1;
|
|
17
17
|
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
18
18
|
function n(r, a, i) {
|
|
19
19
|
var l = null;
|
|
@@ -30,9 +30,9 @@ function On() {
|
|
|
30
30
|
props: i
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return Xe.Fragment = s, Xe.jsx = n, Xe.jsxs = n, Xe;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var He = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,9 +42,9 @@ var Xe = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var ds;
|
|
46
|
+
function Dn() {
|
|
47
|
+
return ds || (ds = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
48
|
function t(g) {
|
|
49
49
|
if (g == null) return null;
|
|
50
50
|
if (typeof g == "function")
|
|
@@ -145,13 +145,13 @@ function Mn() {
|
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function x() {
|
|
149
149
|
var g = t(this.type);
|
|
150
150
|
return ae[g] || (ae[g] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), g = this.props.ref, g !== void 0 ? g : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function p(g, P, q, ee, ve, ke) {
|
|
155
155
|
var H = q.ref;
|
|
156
156
|
return g = {
|
|
157
157
|
$$typeof: S,
|
|
@@ -161,7 +161,7 @@ function Mn() {
|
|
|
161
161
|
_owner: ee
|
|
162
162
|
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(g, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: x
|
|
165
165
|
}) : Object.defineProperty(g, "ref", { enumerable: !1, value: null }), g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -223,7 +223,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
223
223
|
return H && c(
|
|
224
224
|
q,
|
|
225
225
|
typeof g == "function" ? g.displayName || g.name || "Unknown" : g
|
|
226
|
-
),
|
|
226
|
+
), p(
|
|
227
227
|
g,
|
|
228
228
|
H,
|
|
229
229
|
q,
|
|
@@ -238,7 +238,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
238
238
|
function f(g) {
|
|
239
239
|
return typeof g == "object" && g !== null && g.$$typeof === S;
|
|
240
240
|
}
|
|
241
|
-
var m =
|
|
241
|
+
var m = Pn, S = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), K = Symbol.for("react.context"), Z = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), de = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, J = Array.isArray, _ = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
244
|
m = {
|
|
@@ -250,7 +250,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
m,
|
|
251
251
|
i
|
|
252
252
|
)(), Q = _(r(i)), xe = {};
|
|
253
|
-
|
|
253
|
+
He.Fragment = N, He.jsx = function(g, P, q) {
|
|
254
254
|
var ee = 1e4 > de.recentlyCreatedOwnerStacks++;
|
|
255
255
|
return d(
|
|
256
256
|
g,
|
|
@@ -260,7 +260,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
260
260
|
ee ? Error("react-stack-top-frame") : ce,
|
|
261
261
|
ee ? _(r(g)) : Q
|
|
262
262
|
);
|
|
263
|
-
},
|
|
263
|
+
}, He.jsxs = function(g, P, q) {
|
|
264
264
|
var ee = 1e4 > de.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return d(
|
|
266
266
|
g,
|
|
@@ -271,11 +271,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
271
271
|
ee ? _(r(g)) : Q
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
}()),
|
|
274
|
+
}()), He;
|
|
275
275
|
}
|
|
276
|
-
process.env.NODE_ENV === "production" ? Pt.exports =
|
|
276
|
+
process.env.NODE_ENV === "production" ? Pt.exports = Ln() : Pt.exports = Dn();
|
|
277
277
|
var e = Pt.exports;
|
|
278
|
-
function
|
|
278
|
+
function Fn({ onConnect: t, error: s }) {
|
|
279
279
|
const [n, r] = h(""), [a, i] = h(!1), l = async (c) => {
|
|
280
280
|
c.preventDefault(), n.trim() && (i(!0), await t(n.trim()), i(!1));
|
|
281
281
|
};
|
|
@@ -316,16 +316,16 @@ function Ln({ onConnect: t, error: s }) {
|
|
|
316
316
|
)
|
|
317
317
|
] });
|
|
318
318
|
}
|
|
319
|
-
const
|
|
320
|
-
let
|
|
319
|
+
const Bn = { BASE_URL: "/", DEV: !1, MODE: "lib", PROD: !0, SSR: !1 }, Un = (t) => Bn[t] ?? "";
|
|
320
|
+
let Mt = "";
|
|
321
321
|
function ze() {
|
|
322
|
-
return
|
|
322
|
+
return Mt || Un("VITE_FORGE_TOKEN");
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
324
|
+
function Vn(t) {
|
|
325
|
+
Mt = t;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
327
|
+
function _t() {
|
|
328
|
+
Mt = "";
|
|
329
329
|
}
|
|
330
330
|
async function Y(t, s) {
|
|
331
331
|
const n = await fetch(`/api/forge${t}`, {
|
|
@@ -350,7 +350,7 @@ async function Y(t, s) {
|
|
|
350
350
|
throw new Error(`Empty response from ${t}`);
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
const
|
|
353
|
+
const Jn = {
|
|
354
354
|
sessionCost: 0,
|
|
355
355
|
serviceTier: "",
|
|
356
356
|
inputTokens: 0,
|
|
@@ -358,19 +358,19 @@ const Un = {
|
|
|
358
358
|
cacheCreationTokens: 0,
|
|
359
359
|
cacheReadTokens: 0
|
|
360
360
|
};
|
|
361
|
-
function
|
|
362
|
-
const [t, s] = h(
|
|
361
|
+
function qn() {
|
|
362
|
+
const [t, s] = h(Jn), [n, r] = h(null), [a, i] = h(!1), [l, c] = h(null), [x, p] = h(null);
|
|
363
363
|
return {
|
|
364
364
|
usage: t,
|
|
365
365
|
rateLimit: n,
|
|
366
366
|
quotaLoading: a,
|
|
367
367
|
quotaError: l,
|
|
368
|
-
quotaCheckedAt:
|
|
368
|
+
quotaCheckedAt: x,
|
|
369
369
|
refreshQuota: async () => {
|
|
370
370
|
i(!0), c(null);
|
|
371
371
|
try {
|
|
372
372
|
const { rateLimit: f, checkedAt: m } = await Y("/quota");
|
|
373
|
-
f && r(f), m &&
|
|
373
|
+
f && r(f), m && p(m), f || c("No rate-limit headers returned.");
|
|
374
374
|
} catch (f) {
|
|
375
375
|
c(f.message);
|
|
376
376
|
} finally {
|
|
@@ -390,8 +390,8 @@ function Vn() {
|
|
|
390
390
|
setRateLimit: r
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
function
|
|
393
|
+
const Wn = 5, gt = (t, s) => `forge:analyses:${t}:${s}`, It = (t, s) => `forge:analysis:${t}:${s}`;
|
|
394
|
+
function Yn(t) {
|
|
395
395
|
if (t.every((n) => typeof n.ordinal == "number")) return t;
|
|
396
396
|
const s = t.length;
|
|
397
397
|
return t.map((n, r) => ({
|
|
@@ -399,14 +399,14 @@ function qn(t) {
|
|
|
399
399
|
ordinal: typeof n.ordinal == "number" ? n.ordinal : s - r
|
|
400
400
|
}));
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function jt(t, s) {
|
|
403
403
|
try {
|
|
404
404
|
const n = localStorage.getItem(gt(t, s));
|
|
405
405
|
if (n) {
|
|
406
406
|
const a = JSON.parse(n);
|
|
407
407
|
if (Array.isArray(a)) {
|
|
408
|
-
const i =
|
|
409
|
-
return i !== a &&
|
|
408
|
+
const i = Yn(a);
|
|
409
|
+
return i !== a && yt(t, s, i), i;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
const r = localStorage.getItem(It(t, s));
|
|
@@ -422,19 +422,19 @@ function bt(t, s) {
|
|
|
422
422
|
}
|
|
423
423
|
return [];
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function yt(t, s, n) {
|
|
426
426
|
try {
|
|
427
427
|
localStorage.setItem(gt(t, s), JSON.stringify(n));
|
|
428
428
|
} catch {
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Gn() {
|
|
432
432
|
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
const c = i == null ? void 0 : i.trim(),
|
|
436
|
-
id:
|
|
437
|
-
ordinal:
|
|
434
|
+
function Kn(t, s, n, r, a, i, l) {
|
|
435
|
+
const c = i == null ? void 0 : i.trim(), x = jt(t, s), p = x.reduce((f, m) => Math.max(f, m.ordinal ?? 0), 0) + 1, d = {
|
|
436
|
+
id: Gn(),
|
|
437
|
+
ordinal: p,
|
|
438
438
|
result: n,
|
|
439
439
|
analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
440
440
|
repo: t,
|
|
@@ -442,29 +442,29 @@ function Yn(t, s, n, r, a, i, l) {
|
|
|
442
442
|
...a !== void 0 && { mrIid: a },
|
|
443
443
|
...c && { prompt: c },
|
|
444
444
|
...l
|
|
445
|
-
}, j = [d, ...
|
|
446
|
-
return
|
|
445
|
+
}, j = [d, ...x].slice(0, Wn);
|
|
446
|
+
return yt(t, s, j), d;
|
|
447
447
|
}
|
|
448
448
|
function Ee(t, s, n, r) {
|
|
449
|
-
const a =
|
|
449
|
+
const a = jt(t, s), i = a.findIndex((x) => x.ordinal === n);
|
|
450
450
|
if (i < 0) return null;
|
|
451
451
|
const l = { ...a[i], ...r }, c = [...a];
|
|
452
|
-
return c[i] = l,
|
|
452
|
+
return c[i] = l, yt(t, s, c), l;
|
|
453
453
|
}
|
|
454
454
|
function _e(t, s) {
|
|
455
|
-
return
|
|
455
|
+
return jt(t, s);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
const r =
|
|
459
|
-
|
|
457
|
+
function Xn(t, s, n) {
|
|
458
|
+
const r = jt(t, s).filter((a) => a.id !== n);
|
|
459
|
+
yt(t, s, r);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Hn(t, s) {
|
|
462
462
|
try {
|
|
463
463
|
localStorage.removeItem(gt(t, s)), localStorage.removeItem(It(t, s));
|
|
464
464
|
} catch {
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Qn() {
|
|
468
468
|
let t = 0;
|
|
469
469
|
try {
|
|
470
470
|
const s = [];
|
|
@@ -478,34 +478,34 @@ function Xn() {
|
|
|
478
478
|
}
|
|
479
479
|
return t;
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Zn(t) {
|
|
482
482
|
const s = new Date(t), r = (/* @__PURE__ */ new Date()).getTime() - s.getTime(), a = Math.floor(r / 6e4), i = Math.floor(a / 60), l = Math.floor(i / 24);
|
|
483
483
|
return a < 1 ? "just now" : a < 60 ? `${a}m ago` : i < 24 ? `${i}h ago` : l < 7 ? `${l}d ago` : s.toLocaleDateString(void 0, { month: "short", day: "numeric" }) + " at " + s.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Qe(t, s, n) {
|
|
486
486
|
const r = new EventSource(t);
|
|
487
487
|
return r.onmessage = (a) => s(JSON.parse(a.data)), r.onerror = n, r;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function xt(t, s, n) {
|
|
490
490
|
return [...t.filter((r) => r.step !== s), { step: s, message: n }];
|
|
491
491
|
}
|
|
492
|
-
const
|
|
493
|
-
function
|
|
494
|
-
return `${
|
|
492
|
+
const vt = "forge:activeJob";
|
|
493
|
+
function Lt(t, s, n) {
|
|
494
|
+
return `${vt}:${t}:${s}:${n}`;
|
|
495
495
|
}
|
|
496
496
|
const Ot = /* @__PURE__ */ new Set();
|
|
497
|
-
let
|
|
498
|
-
function
|
|
499
|
-
|
|
497
|
+
let mt = null;
|
|
498
|
+
function Dt() {
|
|
499
|
+
mt = null;
|
|
500
500
|
for (const t of Ot) t();
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
if (
|
|
502
|
+
function er() {
|
|
503
|
+
if (mt) return mt;
|
|
504
504
|
const t = {};
|
|
505
505
|
try {
|
|
506
506
|
for (let s = 0; s < sessionStorage.length; s++) {
|
|
507
507
|
const n = sessionStorage.key(s);
|
|
508
|
-
if (!n || !n.startsWith(
|
|
508
|
+
if (!n || !n.startsWith(vt + ":")) continue;
|
|
509
509
|
const r = sessionStorage.getItem(n);
|
|
510
510
|
if (r)
|
|
511
511
|
try {
|
|
@@ -516,21 +516,21 @@ function Qn() {
|
|
|
516
516
|
}
|
|
517
517
|
} catch {
|
|
518
518
|
}
|
|
519
|
-
return
|
|
519
|
+
return mt = t, t;
|
|
520
520
|
}
|
|
521
521
|
typeof window < "u" && window.addEventListener("storage", (t) => {
|
|
522
|
-
(!t.key || t.key.startsWith(
|
|
522
|
+
(!t.key || t.key.startsWith(vt + ":")) && Dt();
|
|
523
523
|
});
|
|
524
|
-
function
|
|
524
|
+
function ut(t, s, n, r) {
|
|
525
525
|
try {
|
|
526
|
-
sessionStorage.setItem(
|
|
526
|
+
sessionStorage.setItem(Lt(t, s, n), JSON.stringify(r));
|
|
527
527
|
} catch {
|
|
528
528
|
}
|
|
529
|
-
|
|
529
|
+
Dt();
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Fe(t, s, n) {
|
|
532
532
|
try {
|
|
533
|
-
const r = sessionStorage.getItem(
|
|
533
|
+
const r = sessionStorage.getItem(Lt(t, s, n));
|
|
534
534
|
if (!r) return null;
|
|
535
535
|
const a = JSON.parse(r);
|
|
536
536
|
return a && typeof a.jobId == "string" ? a : null;
|
|
@@ -540,40 +540,40 @@ function Le(t, s, n) {
|
|
|
540
540
|
}
|
|
541
541
|
function he(t, s, n) {
|
|
542
542
|
try {
|
|
543
|
-
sessionStorage.removeItem(
|
|
543
|
+
sessionStorage.removeItem(Lt(t, s, n));
|
|
544
544
|
} catch {
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
Dt();
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
548
|
+
function tr() {
|
|
549
|
+
return In(
|
|
550
550
|
(t) => (Ot.add(t), () => {
|
|
551
551
|
Ot.delete(t);
|
|
552
552
|
}),
|
|
553
|
-
|
|
553
|
+
er,
|
|
554
554
|
// SSR fallback — same empty object every call so React doesn't loop.
|
|
555
|
-
() =>
|
|
555
|
+
() => sr
|
|
556
556
|
);
|
|
557
557
|
}
|
|
558
|
-
const
|
|
559
|
-
function
|
|
560
|
-
const s =
|
|
558
|
+
const sr = {};
|
|
559
|
+
function nr(t) {
|
|
560
|
+
const s = vt + ":";
|
|
561
561
|
if (!t.startsWith(s)) return null;
|
|
562
562
|
const r = t.slice(s.length).split(":");
|
|
563
563
|
if (r.length < 3) return null;
|
|
564
564
|
const a = r[r.length - 1], i = Number(r[r.length - 2]);
|
|
565
565
|
return Number.isFinite(i) ? { repo: r.slice(0, -2).join(":"), iid: i, type: a } : null;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function rr(t, s, n) {
|
|
568
568
|
const r = [];
|
|
569
569
|
for (const a of Object.keys(t)) {
|
|
570
|
-
const i =
|
|
570
|
+
const i = nr(a);
|
|
571
571
|
i && i.repo === s && i.iid === n && r.push(i.type);
|
|
572
572
|
}
|
|
573
573
|
return r;
|
|
574
574
|
}
|
|
575
575
|
const Ce = { result: null, byRepo: {}, repoOrder: [], aggregateLogs: [], stale: !1 };
|
|
576
|
-
function
|
|
576
|
+
function xs(t) {
|
|
577
577
|
var r;
|
|
578
578
|
if (!t) return Ce;
|
|
579
579
|
if (t.byRepo && t.repoOrder)
|
|
@@ -593,16 +593,16 @@ function us(t) {
|
|
|
593
593
|
stale: t.stale ?? !1
|
|
594
594
|
} : { ...Ce, stale: t.stale ?? !1 };
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function ar(t) {
|
|
597
597
|
return !!t.result || t.repoOrder.length > 0 || t.stale;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Et(t) {
|
|
600
600
|
return !t || t.length === 0 ? [] : t.map(
|
|
601
601
|
(s) => s.explanation === void 0 && s.kind !== "canceled" ? { ...s, kind: "canceled", explanation: "Refinement canceled — the page was reloaded before it finished." } : s
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
|
-
const js = "forge_secondary_repos",
|
|
605
|
-
function
|
|
604
|
+
const js = "forge_secondary_repos", Ze = "forge_selected_repo";
|
|
605
|
+
function ir() {
|
|
606
606
|
try {
|
|
607
607
|
const t = localStorage.getItem(js);
|
|
608
608
|
if (!t) return [];
|
|
@@ -612,143 +612,143 @@ function rr() {
|
|
|
612
612
|
return [];
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function us(t) {
|
|
616
616
|
try {
|
|
617
617
|
localStorage.setItem(js, JSON.stringify(t));
|
|
618
618
|
} catch {
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
const [t, s] = h(() => ze() ? typeof window < "u" && /^\/issues\/\d+/.test(window.location.pathname) ? "selected" : "idle" : "connect"), [n, r] = h(null), [a, i] = h([]), [l, c] = h(() => !!ze()), [
|
|
623
|
-
usage:
|
|
624
|
-
rateLimit:
|
|
625
|
-
quotaLoading:
|
|
626
|
-
quotaError:
|
|
627
|
-
quotaCheckedAt:
|
|
628
|
-
refreshQuota:
|
|
629
|
-
updateUsageFromEvent:
|
|
630
|
-
setRateLimit:
|
|
631
|
-
} =
|
|
621
|
+
function lr() {
|
|
622
|
+
const [t, s] = h(() => ze() ? typeof window < "u" && /^\/issues\/\d+/.test(window.location.pathname) ? "selected" : "idle" : "connect"), [n, r] = h(null), [a, i] = h([]), [l, c] = h(() => !!ze()), [x, p] = h(null), [d, j] = h(null), [f, m] = h([]), [S, w] = h([]), [N, k] = h(null), [z, $] = h([]), [K, Z] = h(null), [X, v] = h(null), [L, V] = h(null), [te, ne] = h(!1), [de, I] = h([]), [J, _] = h(null), [re, ae] = h(!1), [ce, Q] = h(null), [xe, g] = h(null), [P, q] = h(null), [ee, ve] = h(!1), [ke, H] = h([]), [ge, Re] = h([]), [W, ie] = h(!1), [Te, ye] = h([]), [Me, Be] = h(!1), [Es, Ut] = h(null), [wt, zt] = h(null), [As, Vt] = h(!1), [$s, st] = h(null), [Ue, fe] = h(!1), [nt, Ve] = h([]), [Ps, Se] = h([]), [Is, rt] = h("analyze"), [Jt, qt] = h(""), {
|
|
623
|
+
usage: Os,
|
|
624
|
+
rateLimit: Ms,
|
|
625
|
+
quotaLoading: Ls,
|
|
626
|
+
quotaError: Ds,
|
|
627
|
+
quotaCheckedAt: Fs,
|
|
628
|
+
refreshQuota: Bs,
|
|
629
|
+
updateUsageFromEvent: Je,
|
|
630
|
+
setRateLimit: Us
|
|
631
|
+
} = qn(), [kt, Ie] = h(!1), [Vs, we] = h(null), [qe, be] = h(Ce), je = oe(null), Le = oe(!1), [at, Js] = h(
|
|
632
632
|
() => localStorage.getItem("forge_auto_push_on_green") === "1"
|
|
633
|
-
),
|
|
633
|
+
), Wt = oe(at);
|
|
634
634
|
G(() => {
|
|
635
|
-
|
|
636
|
-
}, [
|
|
637
|
-
const
|
|
638
|
-
|
|
635
|
+
Wt.current = at;
|
|
636
|
+
}, [at]);
|
|
637
|
+
const qs = (o) => {
|
|
638
|
+
Js(o);
|
|
639
639
|
try {
|
|
640
640
|
localStorage.setItem("forge_auto_push_on_green", o ? "1" : "0");
|
|
641
641
|
} catch {
|
|
642
642
|
}
|
|
643
|
-
}, [
|
|
644
|
-
() => localStorage.getItem(
|
|
645
|
-
),
|
|
646
|
-
|
|
643
|
+
}, [Ws, Ys] = h([]), [M, Yt] = h(
|
|
644
|
+
() => localStorage.getItem(Ze) ?? ""
|
|
645
|
+
), Gs = (o) => {
|
|
646
|
+
Yt(o);
|
|
647
647
|
try {
|
|
648
|
-
o ? localStorage.setItem(
|
|
648
|
+
o ? localStorage.setItem(Ze, o) : localStorage.removeItem(Ze);
|
|
649
649
|
} catch {
|
|
650
650
|
}
|
|
651
|
-
}, [
|
|
652
|
-
|
|
653
|
-
}, [
|
|
654
|
-
|
|
655
|
-
},
|
|
656
|
-
|
|
657
|
-
},
|
|
651
|
+
}, [Ks, Xs] = h(null), [ue, Gt] = h(ir), Kt = (o) => {
|
|
652
|
+
Gt(o), us(o);
|
|
653
|
+
}, [Hs, Qs] = h([]), [We, Xt] = h(() => localStorage.getItem("forge_model") ?? ""), [Zs, en] = h([]), [De, Ht] = h(() => localStorage.getItem("forge_agent") ?? "claude"), tn = (o) => {
|
|
654
|
+
Xt(o), localStorage.setItem("forge_model", o);
|
|
655
|
+
}, sn = (o) => {
|
|
656
|
+
Ht(o), localStorage.setItem("forge_agent", o);
|
|
657
|
+
}, it = oe(null), U = oe(null);
|
|
658
658
|
G(() => () => {
|
|
659
|
-
var o,
|
|
660
|
-
(o =
|
|
659
|
+
var o, u;
|
|
660
|
+
(o = it.current) == null || o.abort(), (u = U.current) == null || u.close(), U.current = null;
|
|
661
661
|
}, []);
|
|
662
|
-
const
|
|
663
|
-
var
|
|
664
|
-
|
|
662
|
+
const Ye = (o = "?") => M ? `${o}repo=${encodeURIComponent(M)}` : "", lt = (o) => {
|
|
663
|
+
var u, y;
|
|
664
|
+
Qs(o.models), Xt((b) => b || o.defaultModel), Xs(o.testDeployUrlTemplate ?? null), (u = o.repos) != null && u.length && (Ys(o.repos), Yt((b) => {
|
|
665
665
|
const C = new Set(o.repos.map((A) => A.id));
|
|
666
666
|
if (b && C.has(b)) return b;
|
|
667
667
|
const R = o.defaultRepo || o.repos[0].id;
|
|
668
668
|
try {
|
|
669
|
-
R ? localStorage.setItem(
|
|
669
|
+
R ? localStorage.setItem(Ze, R) : localStorage.removeItem(Ze);
|
|
670
670
|
} catch {
|
|
671
671
|
}
|
|
672
672
|
return R;
|
|
673
|
-
}),
|
|
673
|
+
}), Gt((b) => {
|
|
674
674
|
const C = new Set(o.repos.map((A) => A.id)), R = b.filter((A) => C.has(A));
|
|
675
|
-
return R.length !== b.length &&
|
|
676
|
-
})), (y = o.agents) != null && y.length && (
|
|
675
|
+
return R.length !== b.length && us(R), R;
|
|
676
|
+
})), (y = o.agents) != null && y.length && (en(o.agents), Ht((b) => b || o.defaultAgent || "claude")), o.rateLimit && Us(o.rateLimit), localStorage.getItem("forge_model") || localStorage.setItem("forge_model", o.defaultModel), localStorage.getItem("forge_agent") || localStorage.setItem("forge_agent", o.defaultAgent ?? "claude");
|
|
677
677
|
};
|
|
678
678
|
G(() => {
|
|
679
679
|
if (M && ue.includes(M)) {
|
|
680
|
-
const o = ue.filter((
|
|
681
|
-
|
|
680
|
+
const o = ue.filter((u) => u !== M);
|
|
681
|
+
Kt(o);
|
|
682
682
|
}
|
|
683
683
|
}, [M]);
|
|
684
|
-
const
|
|
684
|
+
const Qt = oe("");
|
|
685
685
|
G(() => {
|
|
686
|
-
var
|
|
687
|
-
const o =
|
|
688
|
-
|
|
686
|
+
var u;
|
|
687
|
+
const o = Qt.current;
|
|
688
|
+
Qt.current = M, !(!o || !M || o === M) && ze() && ((u = je.current) == null || u.close(), je.current = null, Ke(), Ge(), ot());
|
|
689
689
|
}, [M]), G(() => {
|
|
690
690
|
t === "connect" && ze() && Y(
|
|
691
691
|
"/status"
|
|
692
692
|
).then((o) => {
|
|
693
|
-
|
|
694
|
-
}).catch(() =>
|
|
693
|
+
lt(o), s("idle");
|
|
694
|
+
}).catch(() => _t());
|
|
695
695
|
}, [t]);
|
|
696
|
-
const
|
|
696
|
+
const Zt = oe(!1), es = () => {
|
|
697
697
|
ne(!0), Y("/status").then((o) => {
|
|
698
|
-
|
|
698
|
+
lt(o), V(null), Ge(), ot();
|
|
699
699
|
}).catch((o) => {
|
|
700
700
|
V((o == null ? void 0 : o.message) ?? "Forge backend is unreachable.");
|
|
701
701
|
}).finally(() => ne(!1));
|
|
702
702
|
};
|
|
703
703
|
G(() => {
|
|
704
|
-
|
|
704
|
+
Zt.current || !ze() || t === "connect" || (Zt.current = !0, es());
|
|
705
705
|
}, [t]);
|
|
706
|
-
const
|
|
706
|
+
const nn = async () => {
|
|
707
707
|
const o = await Y("/status");
|
|
708
|
-
|
|
709
|
-
},
|
|
710
|
-
V(null),
|
|
711
|
-
},
|
|
708
|
+
lt(o);
|
|
709
|
+
}, rn = () => {
|
|
710
|
+
V(null), es();
|
|
711
|
+
}, ts = oe(null);
|
|
712
712
|
G(() => {
|
|
713
|
-
const o =
|
|
714
|
-
|
|
713
|
+
const o = ts.current;
|
|
714
|
+
ts.current = t, ze() && o != null && o !== "idle" && t === "idle" && (Ge(), ot());
|
|
715
715
|
}, [t]);
|
|
716
|
-
const
|
|
717
|
-
r(null),
|
|
716
|
+
const an = async (o) => {
|
|
717
|
+
r(null), Vn(o);
|
|
718
718
|
try {
|
|
719
|
-
const
|
|
720
|
-
|
|
719
|
+
const u = await Y("/status");
|
|
720
|
+
lt(u), c(!0), s("idle"), Ge();
|
|
721
721
|
} catch {
|
|
722
|
-
|
|
722
|
+
_t(), r("Invalid token or Forge is not configured.");
|
|
723
723
|
}
|
|
724
|
-
},
|
|
725
|
-
var
|
|
726
|
-
(
|
|
724
|
+
}, Ge = async () => {
|
|
725
|
+
var u;
|
|
726
|
+
(u = it.current) == null || u.abort();
|
|
727
727
|
const o = new AbortController();
|
|
728
|
-
|
|
728
|
+
it.current = o, c(!0), p(null);
|
|
729
729
|
try {
|
|
730
|
-
const y = await Y(`/issues${
|
|
730
|
+
const y = await Y(`/issues${Ye()}`, {
|
|
731
731
|
signal: o.signal
|
|
732
732
|
});
|
|
733
733
|
i(y.issues);
|
|
734
734
|
} catch (y) {
|
|
735
|
-
y.name !== "AbortError" &&
|
|
735
|
+
y.name !== "AbortError" && p(y.message);
|
|
736
736
|
} finally {
|
|
737
737
|
c(!1);
|
|
738
738
|
}
|
|
739
|
-
},
|
|
740
|
-
|
|
739
|
+
}, ot = async (o = "open") => {
|
|
740
|
+
Be(!0), Ut(null);
|
|
741
741
|
try {
|
|
742
|
-
const
|
|
743
|
-
ye(
|
|
744
|
-
} catch (
|
|
745
|
-
|
|
742
|
+
const u = await Y(`/mrs?state=${o}${Ye("&")}`);
|
|
743
|
+
ye(u.mrs);
|
|
744
|
+
} catch (u) {
|
|
745
|
+
u.name !== "AbortError" && Ut(u.message);
|
|
746
746
|
} finally {
|
|
747
|
-
|
|
747
|
+
Be(!1);
|
|
748
748
|
}
|
|
749
|
-
},
|
|
749
|
+
}, ln = (o) => {
|
|
750
750
|
var b;
|
|
751
|
-
const
|
|
751
|
+
const u = {
|
|
752
752
|
repo: M,
|
|
753
753
|
branchName: o.source_branch,
|
|
754
754
|
mr: { iid: o.iid, web_url: o.web_url, title: o.title },
|
|
@@ -759,16 +759,16 @@ function ar() {
|
|
|
759
759
|
web_url: o.web_url,
|
|
760
760
|
title: o.title,
|
|
761
761
|
branchName: o.source_branch
|
|
762
|
-
}), Q({ applications: [
|
|
762
|
+
}), Q({ applications: [u] }), H([]), j(null), k(null), v(null), s("monitoring");
|
|
763
763
|
const y = o.source_branch.match(/^forge\/issue-(\d+)-/);
|
|
764
764
|
if (y) {
|
|
765
765
|
const C = Number(y[1]);
|
|
766
766
|
Promise.all([
|
|
767
|
-
Y(`/issues/${C}${
|
|
767
|
+
Y(`/issues/${C}${Ye()}`).then(
|
|
768
768
|
(R) => R.issue,
|
|
769
769
|
() => null
|
|
770
770
|
),
|
|
771
|
-
Y(`/issues/${C}/merged-mrs${
|
|
771
|
+
Y(`/issues/${C}/merged-mrs${Ye()}`).then(
|
|
772
772
|
(R) => R.mrs,
|
|
773
773
|
() => []
|
|
774
774
|
)
|
|
@@ -776,28 +776,28 @@ function ar() {
|
|
|
776
776
|
R && j(R), A.length && H(A);
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
|
-
},
|
|
779
|
+
}, on = async (o, u) => {
|
|
780
780
|
const y = await Y("/issues", {
|
|
781
781
|
method: "POST",
|
|
782
|
-
body: JSON.stringify({ title: o, description:
|
|
782
|
+
body: JSON.stringify({ title: o, description: u, repo: M })
|
|
783
783
|
});
|
|
784
784
|
return i((b) => [y.issue, ...b]), y.issue;
|
|
785
|
-
},
|
|
785
|
+
}, cn = async (o, u) => {
|
|
786
786
|
if (!d) return;
|
|
787
787
|
const y = await Y(
|
|
788
788
|
`/issues/${d.iid}`,
|
|
789
789
|
{
|
|
790
790
|
method: "PUT",
|
|
791
|
-
body: JSON.stringify({ title: o, description:
|
|
791
|
+
body: JSON.stringify({ title: o, description: u, repo: M })
|
|
792
792
|
}
|
|
793
793
|
);
|
|
794
794
|
j(y.issue), i((b) => b.map((C) => C.iid === y.issue.iid ? y.issue : C));
|
|
795
|
-
},
|
|
795
|
+
}, dn = (o) => {
|
|
796
796
|
var b, C;
|
|
797
|
-
(b = U.current) == null || b.close(), U.current = null, (C = je.current) == null || C.close(), je.current = null, Ne.current.clear(), j(o), q(null), ve(!0), H([]), Re([]), ie(!0), m([]), w([]), k(null), v(null), Q(null), g(null),
|
|
798
|
-
const
|
|
797
|
+
(b = U.current) == null || b.close(), U.current = null, (C = je.current) == null || C.close(), je.current = null, Ne.current.clear(), j(o), q(null), ve(!0), H([]), Re([]), ie(!0), m([]), w([]), k(null), v(null), Q(null), g(null), zt(null), st(null), I(_e(M || "default", o.iid)), be(Ce), we(null), fe(!1), Ve([]), Ie(!1), Se([]), _(null), s("selected");
|
|
798
|
+
const u = [M, ...ue].filter(Boolean);
|
|
799
799
|
Promise.all(
|
|
800
|
-
|
|
800
|
+
u.map(
|
|
801
801
|
(R) => Y(
|
|
802
802
|
`/issues/${o.iid}/environments?repo=${encodeURIComponent(R)}`
|
|
803
803
|
).then((A) => A.environments).catch(() => [])
|
|
@@ -812,7 +812,7 @@ function ar() {
|
|
|
812
812
|
(R) => Y(`/issues/${o.iid}/mr?repo=${encodeURIComponent(R)}`).then((A) => A.mr ? { ...A.mr, repo: R } : null).catch(() => null)
|
|
813
813
|
)
|
|
814
814
|
),
|
|
815
|
-
Y(`/issues/${o.iid}/merged-mrs${
|
|
815
|
+
Y(`/issues/${o.iid}/merged-mrs${Ye()}`).then(
|
|
816
816
|
(R) => R.mrs,
|
|
817
817
|
() => []
|
|
818
818
|
),
|
|
@@ -830,12 +830,12 @@ function ar() {
|
|
|
830
830
|
pipelineUrl: null
|
|
831
831
|
})), E = T.flatMap(
|
|
832
832
|
({ repo: O, branches: F }) => F.map((se) => {
|
|
833
|
-
var
|
|
833
|
+
var dt;
|
|
834
834
|
return {
|
|
835
835
|
repo: O,
|
|
836
836
|
branchName: se.branchName,
|
|
837
837
|
mr: null,
|
|
838
|
-
pipelineUrl: ((
|
|
838
|
+
pipelineUrl: ((dt = se.pipeline) == null ? void 0 : dt.web_url) ?? null
|
|
839
839
|
};
|
|
840
840
|
})
|
|
841
841
|
), B = R[0];
|
|
@@ -848,19 +848,19 @@ function ar() {
|
|
|
848
848
|
const me = [...D, ...E];
|
|
849
849
|
me.length && Q({ applications: me });
|
|
850
850
|
});
|
|
851
|
-
},
|
|
851
|
+
}, ss = (o, u) => {
|
|
852
852
|
var E;
|
|
853
|
-
const { submittedPrompt: y, model: b, existingMrIid: C, issueIid: R, repoKey: A } =
|
|
853
|
+
const { submittedPrompt: y, model: b, existingMrIid: C, issueIid: R, repoKey: A } = u;
|
|
854
854
|
let T = null;
|
|
855
855
|
(E = U.current) == null || E.close();
|
|
856
856
|
const D = new URLSearchParams({ token: ze() });
|
|
857
|
-
M && D.set("repo", M), ue.length && D.set("secondaryRepos", ue.join(",")), U.current =
|
|
857
|
+
M && D.set("repo", M), ue.length && D.set("secondaryRepos", ue.join(",")), U.current = Qe(
|
|
858
858
|
`/api/forge/jobs/${o}/stream?${D.toString()}`,
|
|
859
859
|
(B) => {
|
|
860
860
|
var me, O, F;
|
|
861
861
|
if (B.type === "progress")
|
|
862
862
|
m(
|
|
863
|
-
(se) =>
|
|
863
|
+
(se) => xt(se, B.step, B.message)
|
|
864
864
|
);
|
|
865
865
|
else if (B.type === "log")
|
|
866
866
|
w((se) => [...se, { ts: (/* @__PURE__ */ new Date()).toISOString(), message: B.message }]);
|
|
@@ -868,10 +868,10 @@ function ar() {
|
|
|
868
868
|
const se = B.data;
|
|
869
869
|
T = se, k(se);
|
|
870
870
|
} else if (B.type === "usage")
|
|
871
|
-
|
|
871
|
+
Je(B);
|
|
872
872
|
else if (B.type === "done") {
|
|
873
873
|
if ((me = U.current) == null || me.close(), U.current = null, he(A, R, "analyze"), T) {
|
|
874
|
-
const se =
|
|
874
|
+
const se = Kn(
|
|
875
875
|
A,
|
|
876
876
|
R,
|
|
877
877
|
T,
|
|
@@ -889,90 +889,90 @@ function ar() {
|
|
|
889
889
|
(B = U.current) == null || B.close(), U.current = null, v("Connection lost during analysis."), s("reviewing");
|
|
890
890
|
}
|
|
891
891
|
);
|
|
892
|
-
},
|
|
892
|
+
}, xn = async () => {
|
|
893
893
|
if (!d) return;
|
|
894
|
-
const o = P ? "update" : de.length > 0 ? "new" : ke.length > 0 &&
|
|
895
|
-
m([]), w([]), k(null), v(null), $([]), Z(null),
|
|
896
|
-
const
|
|
897
|
-
|
|
894
|
+
const o = P ? "update" : de.length > 0 ? "new" : ke.length > 0 && wt && !wt.resolved ? "retry" : "fresh";
|
|
895
|
+
m([]), w([]), k(null), v(null), $([]), Z(null), rt("analyze"), s("analyzing");
|
|
896
|
+
const u = Jt.trim();
|
|
897
|
+
qt("");
|
|
898
898
|
try {
|
|
899
899
|
const { jobId: y } = await Y(
|
|
900
900
|
`/issues/${d.iid}/analyze`,
|
|
901
901
|
{
|
|
902
902
|
method: "POST",
|
|
903
903
|
body: JSON.stringify({
|
|
904
|
-
model:
|
|
904
|
+
model: We,
|
|
905
905
|
repo: M,
|
|
906
906
|
secondaryRepos: ue,
|
|
907
|
-
agent:
|
|
908
|
-
prompt:
|
|
907
|
+
agent: De,
|
|
908
|
+
prompt: u,
|
|
909
909
|
kind: o
|
|
910
910
|
})
|
|
911
911
|
}
|
|
912
912
|
), b = M || "default", C = {
|
|
913
|
-
submittedPrompt:
|
|
914
|
-
model:
|
|
913
|
+
submittedPrompt: u,
|
|
914
|
+
model: We,
|
|
915
915
|
existingMrIid: P == null ? void 0 : P.iid,
|
|
916
916
|
issueIid: d.iid,
|
|
917
917
|
repoKey: b
|
|
918
918
|
};
|
|
919
|
-
|
|
919
|
+
ut(b, d.iid, "analyze", {
|
|
920
920
|
jobId: y,
|
|
921
921
|
meta: {
|
|
922
|
-
submittedPrompt:
|
|
923
|
-
model:
|
|
922
|
+
submittedPrompt: u,
|
|
923
|
+
model: We,
|
|
924
924
|
existingMrIid: P == null ? void 0 : P.iid
|
|
925
925
|
}
|
|
926
|
-
}), Ne.current.add(y),
|
|
926
|
+
}), Ne.current.add(y), ss(y, C);
|
|
927
927
|
} catch (y) {
|
|
928
928
|
v(y.message), s("reviewing");
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, un = async () => {
|
|
931
931
|
var y;
|
|
932
932
|
if (!d) return;
|
|
933
|
-
const o = M || "default",
|
|
934
|
-
if ((y = U.current) == null || y.close(), U.current = null, Ne.current.clear(), he(o, d.iid, "analyze"), m([]), w([]), k(null), v(null),
|
|
933
|
+
const o = M || "default", u = Fe(o, d.iid, "analyze");
|
|
934
|
+
if ((y = U.current) == null || y.close(), U.current = null, Ne.current.clear(), he(o, d.iid, "analyze"), m([]), w([]), k(null), v(null), Ke(), u != null && u.jobId)
|
|
935
935
|
try {
|
|
936
|
-
await Y(`/jobs/${
|
|
936
|
+
await Y(`/jobs/${u.jobId}/cancel`, { method: "POST" });
|
|
937
937
|
} catch {
|
|
938
938
|
}
|
|
939
|
-
},
|
|
939
|
+
}, ns = () => ({
|
|
940
940
|
repo: M,
|
|
941
941
|
secondaryRepos: ue
|
|
942
|
-
}),
|
|
942
|
+
}), ct = (o, u) => {
|
|
943
943
|
const y = o.byRepo ?? {}, b = o.repoOrder ?? [];
|
|
944
|
-
return y[
|
|
944
|
+
return y[u] ? { ...o, byRepo: y, repoOrder: b } : {
|
|
945
945
|
...o,
|
|
946
|
-
byRepo: { ...y, [
|
|
947
|
-
repoOrder: [...b,
|
|
946
|
+
byRepo: { ...y, [u]: { repo: u, steps: {} } },
|
|
947
|
+
repoOrder: [...b, u]
|
|
948
948
|
};
|
|
949
|
-
},
|
|
949
|
+
}, rs = (o, u, y) => {
|
|
950
950
|
be((b) => {
|
|
951
|
-
const C =
|
|
951
|
+
const C = ct(b, o), R = C.byRepo[o], A = R.steps[u] ?? { status: "idle", logs: [] };
|
|
952
952
|
return {
|
|
953
953
|
...C,
|
|
954
954
|
byRepo: {
|
|
955
955
|
...C.byRepo,
|
|
956
956
|
[o]: {
|
|
957
957
|
...R,
|
|
958
|
-
steps: { ...R.steps, [
|
|
958
|
+
steps: { ...R.steps, [u]: y(A) }
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
};
|
|
962
962
|
});
|
|
963
|
-
},
|
|
964
|
-
|
|
965
|
-
},
|
|
966
|
-
|
|
963
|
+
}, as = (o, u, y) => {
|
|
964
|
+
rs(o, u, (b) => ({ ...b, ...y }));
|
|
965
|
+
}, pn = (o, u, y) => {
|
|
966
|
+
rs(o, u, (b) => ({
|
|
967
967
|
...b,
|
|
968
968
|
logs: [...b.logs, { ts: (/* @__PURE__ */ new Date()).toISOString(), message: y }]
|
|
969
969
|
}));
|
|
970
|
-
},
|
|
970
|
+
}, is = async () => {
|
|
971
971
|
var o;
|
|
972
972
|
if (N) {
|
|
973
|
-
Ae.current = N.changes,
|
|
973
|
+
Ae.current = N.changes, Ie(!0), we(null), be(Ce);
|
|
974
974
|
try {
|
|
975
|
-
const { jobId:
|
|
975
|
+
const { jobId: u } = await Y("/validate", {
|
|
976
976
|
method: "POST",
|
|
977
977
|
body: JSON.stringify({
|
|
978
978
|
analysis: N,
|
|
@@ -985,16 +985,16 @@ function ar() {
|
|
|
985
985
|
});
|
|
986
986
|
(o = je.current) == null || o.close();
|
|
987
987
|
const y = new URLSearchParams({ token: ze() });
|
|
988
|
-
M && y.set("repo", M), je.current =
|
|
989
|
-
`/api/forge/jobs/${
|
|
988
|
+
M && y.set("repo", M), je.current = Qe(
|
|
989
|
+
`/api/forge/jobs/${u}/stream?${y.toString()}`,
|
|
990
990
|
(b) => {
|
|
991
991
|
var R, A;
|
|
992
992
|
const C = b.repo ?? M ?? "default";
|
|
993
993
|
if (b.type === "progress")
|
|
994
|
-
|
|
994
|
+
as(C, b.step, { status: "running" });
|
|
995
995
|
else if (b.type === "log") {
|
|
996
996
|
const T = b.message;
|
|
997
|
-
b.step ?
|
|
997
|
+
b.step ? pn(C, b.step, T) : be((D) => ({
|
|
998
998
|
...D,
|
|
999
999
|
aggregateLogs: [
|
|
1000
1000
|
...D.aggregateLogs ?? [],
|
|
@@ -1003,7 +1003,7 @@ function ar() {
|
|
|
1003
1003
|
}));
|
|
1004
1004
|
} else if (b.type === "step_result") {
|
|
1005
1005
|
const T = b.step, D = !!b.passed, E = !!b.skipped;
|
|
1006
|
-
|
|
1006
|
+
as(C, T, {
|
|
1007
1007
|
status: E ? "skipped" : D ? "passed" : "failed",
|
|
1008
1008
|
passed: D,
|
|
1009
1009
|
skipped: E,
|
|
@@ -1013,7 +1013,7 @@ function ar() {
|
|
|
1013
1013
|
});
|
|
1014
1014
|
} else if (b.type === "repo_skipped")
|
|
1015
1015
|
be((T) => {
|
|
1016
|
-
const D =
|
|
1016
|
+
const D = ct(T, C);
|
|
1017
1017
|
return {
|
|
1018
1018
|
...D,
|
|
1019
1019
|
byRepo: {
|
|
@@ -1028,7 +1028,7 @@ function ar() {
|
|
|
1028
1028
|
});
|
|
1029
1029
|
else if (b.type === "repo_started")
|
|
1030
1030
|
be((T) => {
|
|
1031
|
-
const D =
|
|
1031
|
+
const D = ct(T, C);
|
|
1032
1032
|
return {
|
|
1033
1033
|
...D,
|
|
1034
1034
|
byRepo: {
|
|
@@ -1044,7 +1044,7 @@ function ar() {
|
|
|
1044
1044
|
});
|
|
1045
1045
|
else if (b.type === "repo_result")
|
|
1046
1046
|
be((T) => {
|
|
1047
|
-
const D =
|
|
1047
|
+
const D = ct(T, C);
|
|
1048
1048
|
return {
|
|
1049
1049
|
...D,
|
|
1050
1050
|
byRepo: {
|
|
@@ -1083,44 +1083,44 @@ function ar() {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
} else if (b.type === "result") {
|
|
1085
1085
|
const T = b.data;
|
|
1086
|
-
be((D) => ({ ...D, result: T })), T.allPassed &&
|
|
1087
|
-
|
|
1086
|
+
be((D) => ({ ...D, result: T })), T.allPassed && Wt.current && setTimeout(() => {
|
|
1087
|
+
hn();
|
|
1088
1088
|
}, 0);
|
|
1089
|
-
} else b.type === "done" ? ((R = je.current) == null || R.close(), je.current = null,
|
|
1089
|
+
} else b.type === "done" ? ((R = je.current) == null || R.close(), je.current = null, Ie(!1)) : b.type === "error" && ((A = je.current) == null || A.close(), je.current = null, we(b.message), Ie(!1));
|
|
1090
1090
|
},
|
|
1091
1091
|
() => {
|
|
1092
1092
|
var b;
|
|
1093
|
-
(b = je.current) == null || b.close(), je.current = null, we("Connection lost during validation."),
|
|
1093
|
+
(b = je.current) == null || b.close(), je.current = null, we("Connection lost during validation."), Ie(!1);
|
|
1094
1094
|
}
|
|
1095
1095
|
);
|
|
1096
|
-
} catch (
|
|
1097
|
-
we(
|
|
1096
|
+
} catch (u) {
|
|
1097
|
+
we(u.message), Ie(!1);
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}, Ae = oe(null);
|
|
1101
1101
|
G(() => {
|
|
1102
1102
|
const o = (N == null ? void 0 : N.changes) ?? null;
|
|
1103
|
-
o && be((
|
|
1103
|
+
o && be((u) => {
|
|
1104
1104
|
var y;
|
|
1105
|
-
return !Ae.current || Ae.current === o || !
|
|
1105
|
+
return !Ae.current || Ae.current === o || !u.result && (((y = u.repoOrder) == null ? void 0 : y.length) ?? 0) === 0 ? u : { ...u, stale: !0 };
|
|
1106
1106
|
});
|
|
1107
1107
|
}, [N == null ? void 0 : N.changes]), G(() => {
|
|
1108
|
-
if (
|
|
1109
|
-
const o =
|
|
1108
|
+
if (kt || !d || J == null) return;
|
|
1109
|
+
const o = ar(qe) ? qe : void 0;
|
|
1110
1110
|
Ee(
|
|
1111
1111
|
M || "default",
|
|
1112
1112
|
d.iid,
|
|
1113
1113
|
J,
|
|
1114
1114
|
{ validation: o }
|
|
1115
1115
|
), I(_e(M || "default", d.iid));
|
|
1116
|
-
}, [
|
|
1116
|
+
}, [kt, qe, J, d, M]), G(() => () => {
|
|
1117
1117
|
var o;
|
|
1118
1118
|
(o = je.current) == null || o.close(), je.current = null;
|
|
1119
1119
|
}, []);
|
|
1120
1120
|
const Ne = oe(/* @__PURE__ */ new Set());
|
|
1121
1121
|
G(() => {
|
|
1122
1122
|
if (!d) return;
|
|
1123
|
-
const o = M || "default",
|
|
1123
|
+
const o = M || "default", u = d.iid, y = Fe(o, u, "analyze");
|
|
1124
1124
|
if (!y || Ne.current.has(y.jobId)) return;
|
|
1125
1125
|
let b = !1;
|
|
1126
1126
|
return Y(`/jobs/${y.jobId}`).then(
|
|
@@ -1128,16 +1128,16 @@ function ar() {
|
|
|
1128
1128
|
if (b) return;
|
|
1129
1129
|
Ne.current.add(y.jobId);
|
|
1130
1130
|
const R = y.meta ?? {};
|
|
1131
|
-
m([]), w([]), k(null), v(null), $([]), Z(null),
|
|
1131
|
+
m([]), w([]), k(null), v(null), $([]), Z(null), rt("analyze"), C.status === "running" && s("analyzing"), ss(y.jobId, {
|
|
1132
1132
|
submittedPrompt: R.submittedPrompt ?? "",
|
|
1133
1133
|
model: R.model ?? "",
|
|
1134
1134
|
existingMrIid: R.existingMrIid,
|
|
1135
|
-
issueIid:
|
|
1135
|
+
issueIid: u,
|
|
1136
1136
|
repoKey: o
|
|
1137
1137
|
});
|
|
1138
1138
|
},
|
|
1139
1139
|
() => {
|
|
1140
|
-
b || he(o,
|
|
1140
|
+
b || he(o, u, "analyze");
|
|
1141
1141
|
}
|
|
1142
1142
|
), () => {
|
|
1143
1143
|
b = !0;
|
|
@@ -1145,29 +1145,29 @@ function ar() {
|
|
|
1145
1145
|
}, [d == null ? void 0 : d.iid, M]), G(() => {
|
|
1146
1146
|
var R;
|
|
1147
1147
|
if (!d) return;
|
|
1148
|
-
const o = M || "default",
|
|
1148
|
+
const o = M || "default", u = d.iid, y = Fe(o, u, "refine");
|
|
1149
1149
|
if (!y || Ne.current.has(y.jobId)) return;
|
|
1150
1150
|
if (!N) {
|
|
1151
1151
|
const A = (R = y.meta) == null ? void 0 : R.ordinal;
|
|
1152
1152
|
if (A == null) {
|
|
1153
|
-
he(o,
|
|
1153
|
+
he(o, u, "refine");
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1156
|
+
Rt(A, u) || he(o, u, "refine");
|
|
1157
1157
|
return;
|
|
1158
1158
|
}
|
|
1159
1159
|
const b = () => {
|
|
1160
|
-
he(o,
|
|
1161
|
-
const T = _e(o,
|
|
1160
|
+
he(o, u, "refine");
|
|
1161
|
+
const T = _e(o, u).find((E) => E.ordinal === J);
|
|
1162
1162
|
if (!(T != null && T.refineThread)) return;
|
|
1163
|
-
const D =
|
|
1164
|
-
D.some((E, B) => E !== T.refineThread[B]) && (Ee(o,
|
|
1163
|
+
const D = Et(T.refineThread);
|
|
1164
|
+
D.some((E, B) => E !== T.refineThread[B]) && (Ee(o, u, T.ordinal, { refineThread: D }), $(D));
|
|
1165
1165
|
};
|
|
1166
1166
|
let C = !1;
|
|
1167
1167
|
return Y(`/jobs/${y.jobId}`).then(
|
|
1168
1168
|
(A) => {
|
|
1169
|
-
C || (Ne.current.add(y.jobId), A.status === "running" || A.status === "done" ? (s("reviewing"),
|
|
1170
|
-
issueIid:
|
|
1169
|
+
C || (Ne.current.add(y.jobId), A.status === "running" || A.status === "done" ? (s("reviewing"), kn(y.jobId, {
|
|
1170
|
+
issueIid: u,
|
|
1171
1171
|
repoKey: o,
|
|
1172
1172
|
startingResult: N
|
|
1173
1173
|
})) : b());
|
|
@@ -1179,22 +1179,22 @@ function ar() {
|
|
|
1179
1179
|
C = !0;
|
|
1180
1180
|
};
|
|
1181
1181
|
}, [d == null ? void 0 : d.iid, M, J, N]), G(() => {
|
|
1182
|
-
if (
|
|
1183
|
-
const o =
|
|
1184
|
-
|
|
1185
|
-
}, [
|
|
1182
|
+
if (Ue || nt.length === 0) return;
|
|
1183
|
+
const o = nt[0];
|
|
1184
|
+
Ve((u) => u.slice(1)), St(o);
|
|
1185
|
+
}, [Ue, nt]), G(() => {
|
|
1186
1186
|
var R, A;
|
|
1187
1187
|
if (!d) return;
|
|
1188
|
-
const o = M || "default",
|
|
1188
|
+
const o = M || "default", u = d.iid, y = Fe(o, u, "ci-fix");
|
|
1189
1189
|
if (!y || Ne.current.has(y.jobId)) return;
|
|
1190
1190
|
const b = !!((R = y.meta) != null && R.isRefine);
|
|
1191
1191
|
if (b && !N) {
|
|
1192
1192
|
const T = (A = y.meta) == null ? void 0 : A.ordinal;
|
|
1193
1193
|
if (T == null) {
|
|
1194
|
-
he(o,
|
|
1194
|
+
he(o, u, "ci-fix");
|
|
1195
1195
|
return;
|
|
1196
1196
|
}
|
|
1197
|
-
|
|
1197
|
+
Rt(T, u) || he(o, u, "ci-fix");
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
1200
1200
|
let C = !1;
|
|
@@ -1202,26 +1202,26 @@ function ar() {
|
|
|
1202
1202
|
(T) => {
|
|
1203
1203
|
if (!C) {
|
|
1204
1204
|
if (T.status !== "running" && T.status !== "done") {
|
|
1205
|
-
he(o,
|
|
1205
|
+
he(o, u, "ci-fix");
|
|
1206
1206
|
return;
|
|
1207
1207
|
}
|
|
1208
|
-
Ne.current.add(y.jobId), m([]), w([]), v(null),
|
|
1208
|
+
Ne.current.add(y.jobId), m([]), w([]), v(null), rt("ci-fix"), b ? (fe(!0), s("reviewing")) : (k(null), s("analyzing")), Ct(y.jobId, { repoKey: o, issueIid: u, isRefine: b });
|
|
1209
1209
|
}
|
|
1210
1210
|
},
|
|
1211
1211
|
() => {
|
|
1212
|
-
C || he(o,
|
|
1212
|
+
C || he(o, u, "ci-fix");
|
|
1213
1213
|
}
|
|
1214
1214
|
), () => {
|
|
1215
1215
|
C = !0;
|
|
1216
1216
|
};
|
|
1217
1217
|
}, [d == null ? void 0 : d.iid, M, N]);
|
|
1218
|
-
const
|
|
1218
|
+
const ls = async () => {
|
|
1219
1219
|
if (N) {
|
|
1220
1220
|
ae(!0), g(null);
|
|
1221
1221
|
try {
|
|
1222
1222
|
const o = await Y("/apply", {
|
|
1223
1223
|
method: "POST",
|
|
1224
|
-
body: JSON.stringify({ analysis: N, ...
|
|
1224
|
+
body: JSON.stringify({ analysis: N, ...ns() })
|
|
1225
1225
|
});
|
|
1226
1226
|
Q(o), s("monitoring");
|
|
1227
1227
|
} catch (o) {
|
|
@@ -1230,13 +1230,13 @@ function ar() {
|
|
|
1230
1230
|
ae(!1);
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
},
|
|
1233
|
+
}, fn = async () => {
|
|
1234
1234
|
if (N) {
|
|
1235
1235
|
ae(!0), g(null);
|
|
1236
1236
|
try {
|
|
1237
1237
|
const o = await Y("/deploy-branch", {
|
|
1238
1238
|
method: "POST",
|
|
1239
|
-
body: JSON.stringify({ analysis: N, ...
|
|
1239
|
+
body: JSON.stringify({ analysis: N, ...ns() })
|
|
1240
1240
|
});
|
|
1241
1241
|
Q(o), s("monitoring");
|
|
1242
1242
|
} catch (o) {
|
|
@@ -1245,11 +1245,11 @@ function ar() {
|
|
|
1245
1245
|
ae(!1);
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
|
-
},
|
|
1248
|
+
}, mn = async (o) => {
|
|
1249
1249
|
if (d) {
|
|
1250
1250
|
ae(!0), g(null);
|
|
1251
1251
|
try {
|
|
1252
|
-
const
|
|
1252
|
+
const u = await Y("/promote-branch", {
|
|
1253
1253
|
method: "POST",
|
|
1254
1254
|
body: JSON.stringify({
|
|
1255
1255
|
branchName: o.branchName,
|
|
@@ -1258,21 +1258,21 @@ function ar() {
|
|
|
1258
1258
|
})
|
|
1259
1259
|
});
|
|
1260
1260
|
Q((y) => y ? { applications: y.applications.map(
|
|
1261
|
-
(C) => C.repo ===
|
|
1262
|
-
) } : { applications: [
|
|
1263
|
-
} catch (
|
|
1264
|
-
g(
|
|
1261
|
+
(C) => C.repo === u.repo && C.branchName === u.branchName ? u : C
|
|
1262
|
+
) } : { applications: [u] });
|
|
1263
|
+
} catch (u) {
|
|
1264
|
+
g(u.message);
|
|
1265
1265
|
} finally {
|
|
1266
1266
|
ae(!1);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
|
-
},
|
|
1269
|
+
}, os = async () => {
|
|
1270
1270
|
if (!N) return;
|
|
1271
1271
|
const o = (ce == null ? void 0 : ce.applications) ?? [];
|
|
1272
1272
|
if (o.length) {
|
|
1273
1273
|
ae(!0), g(null);
|
|
1274
1274
|
try {
|
|
1275
|
-
const
|
|
1275
|
+
const u = new Set(N.changes.map((b) => b.repo || M)), y = o.filter((b) => u.has(b.repo));
|
|
1276
1276
|
if (!y.length)
|
|
1277
1277
|
throw new Error("No existing branches match the refined changes.");
|
|
1278
1278
|
await Promise.all(
|
|
@@ -1293,66 +1293,66 @@ function ar() {
|
|
|
1293
1293
|
})
|
|
1294
1294
|
)
|
|
1295
1295
|
), s("monitoring");
|
|
1296
|
-
} catch (
|
|
1297
|
-
g(
|
|
1296
|
+
} catch (u) {
|
|
1297
|
+
g(u.message);
|
|
1298
1298
|
} finally {
|
|
1299
1299
|
ae(!1);
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
}, mn = () => {
|
|
1303
|
-
if (re || !N) return;
|
|
1304
|
-
((ce == null ? void 0 : ce.applications) ?? []).length > 0 ? cs() : os();
|
|
1305
1302
|
}, hn = () => {
|
|
1303
|
+
if (re || !N) return;
|
|
1304
|
+
((ce == null ? void 0 : ce.applications) ?? []).length > 0 ? os() : ls();
|
|
1305
|
+
}, gn = () => {
|
|
1306
1306
|
k(null), _(null), be(Ce), we(null), s("selected");
|
|
1307
|
-
},
|
|
1308
|
-
const
|
|
1309
|
-
if (!
|
|
1310
|
-
k(
|
|
1311
|
-
const y = M || "default", C = d && !!
|
|
1312
|
-
$(C), Z(
|
|
1307
|
+
}, bn = (o) => {
|
|
1308
|
+
const u = de.find((R) => R.id === o);
|
|
1309
|
+
if (!u) return;
|
|
1310
|
+
k(u.result), v(null), m([]), w([]);
|
|
1311
|
+
const y = M || "default", C = d && !!Fe(y, d.iid, "refine") ? u.refineThread ?? [] : Et(u.refineThread);
|
|
1312
|
+
$(C), Z(u.claudeSessionId ?? null), d && u.refineThread && C.some((R, A) => R !== u.refineThread[A]) && Ee(
|
|
1313
1313
|
y,
|
|
1314
1314
|
d.iid,
|
|
1315
|
-
|
|
1315
|
+
u.ordinal,
|
|
1316
1316
|
{ refineThread: C }
|
|
1317
|
-
), _(
|
|
1318
|
-
},
|
|
1319
|
-
const y =
|
|
1317
|
+
), _(u.ordinal), be(xs(u.validation)), we(null), Ae.current = u.validation ? u.result.changes : null, s("reviewing");
|
|
1318
|
+
}, Rt = (o, u) => {
|
|
1319
|
+
const y = u ?? (d == null ? void 0 : d.iid);
|
|
1320
1320
|
if (!y) return !1;
|
|
1321
1321
|
const b = M || "default", C = _e(b, y), R = C.find((D) => D.ordinal === o);
|
|
1322
1322
|
if (!R) return !1;
|
|
1323
1323
|
I(C), k(R.result), v(null), m([]), w([]);
|
|
1324
|
-
const T = !!
|
|
1324
|
+
const T = !!Fe(b, y, "refine") ? R.refineThread ?? [] : Et(R.refineThread);
|
|
1325
1325
|
return $(T), Z(R.claudeSessionId ?? null), R.refineThread && T.some((D, E) => D !== R.refineThread[E]) && Ee(
|
|
1326
1326
|
b,
|
|
1327
1327
|
y,
|
|
1328
1328
|
R.ordinal,
|
|
1329
1329
|
{ refineThread: T }
|
|
1330
|
-
), _(R.ordinal), be(
|
|
1331
|
-
},
|
|
1332
|
-
d && (
|
|
1333
|
-
}, jn = () => {
|
|
1334
|
-
d && (Kn(M || "default", d.iid), I([]), _(null), k(null), be(Ce), we(null), Ae.current = null);
|
|
1330
|
+
), _(R.ordinal), be(xs(R.validation)), we(null), Ae.current = R.validation ? R.result.changes : null, s("reviewing"), !0;
|
|
1331
|
+
}, jn = (o) => {
|
|
1332
|
+
d && (Xn(M || "default", d.iid, o), I((u) => u.filter((y) => y.id !== o)));
|
|
1335
1333
|
}, yn = () => {
|
|
1336
|
-
|
|
1334
|
+
d && (Hn(M || "default", d.iid), I([]), _(null), k(null), be(Ce), we(null), Ae.current = null);
|
|
1335
|
+
}, vn = () => {
|
|
1336
|
+
const o = Qn();
|
|
1337
1337
|
return I([]), _(null), k(null), be(Ce), we(null), Ae.current = null, o;
|
|
1338
|
-
},
|
|
1339
|
-
if (!d ||
|
|
1340
|
-
const
|
|
1341
|
-
if (!
|
|
1342
|
-
const y = z.slice(0, o), b =
|
|
1338
|
+
}, Nn = (o) => {
|
|
1339
|
+
if (!d || Ue) return;
|
|
1340
|
+
const u = z[o];
|
|
1341
|
+
if (!u || u.kind !== "refine" || !u.prevResult) return;
|
|
1342
|
+
const y = z.slice(0, o), b = u.prevResult;
|
|
1343
1343
|
$(y), k(b), Z(null), J != null && (Ee(
|
|
1344
1344
|
M || "default",
|
|
1345
1345
|
d.iid,
|
|
1346
1346
|
J,
|
|
1347
1347
|
{ refineThread: y, result: b, claudeSessionId: void 0 }
|
|
1348
1348
|
), I(_e(M || "default", d.iid)));
|
|
1349
|
-
},
|
|
1349
|
+
}, wn = (o, u, y) => {
|
|
1350
1350
|
var C;
|
|
1351
1351
|
(C = U.current) == null || C.close();
|
|
1352
1352
|
const b = new URLSearchParams({ token: ze() });
|
|
1353
|
-
M && b.set("repo", M), ue.length && b.set("secondaryRepos", ue.join(",")), U.current =
|
|
1354
|
-
},
|
|
1355
|
-
const { result: o, byRepo:
|
|
1353
|
+
M && b.set("repo", M), ue.length && b.set("secondaryRepos", ue.join(",")), U.current = Qe(`/api/forge/jobs/${o}/stream?${b.toString()}`, u, y);
|
|
1354
|
+
}, zn = () => {
|
|
1355
|
+
const { result: o, byRepo: u, repoOrder: y } = qe, b = y.map((A) => u[A]).filter(Boolean);
|
|
1356
1356
|
if (!(o || b.some(
|
|
1357
1357
|
(A) => Object.values(A.steps).some((T) => T && T.status !== "idle")
|
|
1358
1358
|
))) return null;
|
|
@@ -1381,19 +1381,19 @@ function ar() {
|
|
|
1381
1381
|
repo: (o == null ? void 0 : o.repo) ?? null,
|
|
1382
1382
|
repos: R
|
|
1383
1383
|
};
|
|
1384
|
-
},
|
|
1384
|
+
}, kn = (o, u) => {
|
|
1385
1385
|
var D;
|
|
1386
|
-
const { issueIid: y, repoKey: b, startingResult: C } =
|
|
1386
|
+
const { issueIid: y, repoKey: b, startingResult: C } = u;
|
|
1387
1387
|
let R = null, A = null;
|
|
1388
1388
|
fe(!0), v(null), m([]), Se([]), (D = U.current) == null || D.close();
|
|
1389
1389
|
const T = new URLSearchParams({ token: ze() });
|
|
1390
|
-
M && T.set("repo", M), ue.length && T.set("secondaryRepos", ue.join(",")), U.current =
|
|
1390
|
+
M && T.set("repo", M), ue.length && T.set("secondaryRepos", ue.join(",")), U.current = Qe(
|
|
1391
1391
|
`/api/forge/jobs/${o}/stream?${T.toString()}`,
|
|
1392
1392
|
(E) => {
|
|
1393
1393
|
var B, me;
|
|
1394
1394
|
if (E.type === "progress")
|
|
1395
1395
|
m(
|
|
1396
|
-
(O) =>
|
|
1396
|
+
(O) => xt(O, E.step, E.message)
|
|
1397
1397
|
);
|
|
1398
1398
|
else if (E.type === "log") {
|
|
1399
1399
|
const O = E.message;
|
|
@@ -1423,7 +1423,7 @@ function ar() {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
];
|
|
1425
1425
|
});
|
|
1426
|
-
} else E.type === "usage" ?
|
|
1426
|
+
} else E.type === "usage" ? Je(E) : E.type === "done" ? ((B = U.current) == null || B.close(), U.current = null, fe(!1), Se([]), he(b, y, "refine"), $((O) => {
|
|
1427
1427
|
if (J != null) {
|
|
1428
1428
|
const F = { refineThread: O };
|
|
1429
1429
|
R && (F.result = R), A && (F.claudeSessionId = A), Ee(b, y, J, F), I(_e(b, y));
|
|
@@ -1436,13 +1436,13 @@ function ar() {
|
|
|
1436
1436
|
(E = U.current) == null || E.close(), U.current = null, v("Connection lost during refinement."), fe(!1), Se([]);
|
|
1437
1437
|
}
|
|
1438
1438
|
);
|
|
1439
|
-
},
|
|
1439
|
+
}, St = async (o) => {
|
|
1440
1440
|
if (!N || !d) return;
|
|
1441
|
-
if (
|
|
1442
|
-
|
|
1441
|
+
if (Ue) {
|
|
1442
|
+
Ve((A) => [...A, o]);
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
|
-
const
|
|
1445
|
+
const u = N;
|
|
1446
1446
|
fe(!0), v(null), m([]), Se([]);
|
|
1447
1447
|
const y = [...z, { feedback: o }];
|
|
1448
1448
|
$(y);
|
|
@@ -1455,15 +1455,15 @@ function ar() {
|
|
|
1455
1455
|
body: JSON.stringify({
|
|
1456
1456
|
feedback: o,
|
|
1457
1457
|
previousChanges: N.changes,
|
|
1458
|
-
validationState:
|
|
1458
|
+
validationState: zn(),
|
|
1459
1459
|
repo: M,
|
|
1460
1460
|
secondaryRepos: ue,
|
|
1461
|
-
agent:
|
|
1461
|
+
agent: De,
|
|
1462
1462
|
...K ? { claudeSessionId: K } : {}
|
|
1463
1463
|
})
|
|
1464
1464
|
}
|
|
1465
1465
|
), T = M || "default", D = d.iid;
|
|
1466
|
-
|
|
1466
|
+
ut(T, D, "refine", {
|
|
1467
1467
|
jobId: A,
|
|
1468
1468
|
meta: { ordinal: J }
|
|
1469
1469
|
}), J != null && (Ee(
|
|
@@ -1471,13 +1471,13 @@ function ar() {
|
|
|
1471
1471
|
D,
|
|
1472
1472
|
J,
|
|
1473
1473
|
{ refineThread: y }
|
|
1474
|
-
), I(_e(T, D))), Ne.current.add(A),
|
|
1474
|
+
), I(_e(T, D))), Ne.current.add(A), wn(
|
|
1475
1475
|
A,
|
|
1476
1476
|
(E) => {
|
|
1477
1477
|
var B, me;
|
|
1478
1478
|
if (E.type === "progress")
|
|
1479
1479
|
m(
|
|
1480
|
-
(O) =>
|
|
1480
|
+
(O) => xt(O, E.step, E.message)
|
|
1481
1481
|
);
|
|
1482
1482
|
else if (E.type === "log") {
|
|
1483
1483
|
const O = E.message;
|
|
@@ -1504,11 +1504,11 @@ function ar() {
|
|
|
1504
1504
|
...se,
|
|
1505
1505
|
explanation: O.explanation,
|
|
1506
1506
|
kind: "refine",
|
|
1507
|
-
prevResult:
|
|
1507
|
+
prevResult: u
|
|
1508
1508
|
}
|
|
1509
1509
|
];
|
|
1510
1510
|
});
|
|
1511
|
-
} else E.type === "usage" ?
|
|
1511
|
+
} else E.type === "usage" ? Je(E) : E.type === "done" ? ((B = U.current) == null || B.close(), U.current = null, fe(!1), Se([]), he(T, D, "refine"), $((O) => {
|
|
1512
1512
|
if (d && J != null) {
|
|
1513
1513
|
const F = { refineThread: O };
|
|
1514
1514
|
b && (F.result = b), R && (F.claudeSessionId = R), Ee(
|
|
@@ -1519,42 +1519,42 @@ function ar() {
|
|
|
1519
1519
|
), I(_e(M || "default", d.iid));
|
|
1520
1520
|
}
|
|
1521
1521
|
return O;
|
|
1522
|
-
}),
|
|
1523
|
-
|
|
1524
|
-
}, 0))) : E.type === "error" && ((me = U.current) == null || me.close(), U.current = null, he(T, D, "refine"), v(E.message), fe(!1), Se([]),
|
|
1522
|
+
}), Le.current && (Le.current = !1, !C && b && setTimeout(() => {
|
|
1523
|
+
is();
|
|
1524
|
+
}, 0))) : E.type === "error" && ((me = U.current) == null || me.close(), U.current = null, he(T, D, "refine"), v(E.message), fe(!1), Se([]), Le.current = !1);
|
|
1525
1525
|
},
|
|
1526
1526
|
() => {
|
|
1527
1527
|
var E;
|
|
1528
|
-
(E = U.current) == null || E.close(), U.current = null, v("Connection lost during refinement."), fe(!1), Se([]),
|
|
1528
|
+
(E = U.current) == null || E.close(), U.current = null, v("Connection lost during refinement."), fe(!1), Se([]), Le.current = !1;
|
|
1529
1529
|
}
|
|
1530
1530
|
);
|
|
1531
1531
|
} catch (A) {
|
|
1532
|
-
v(A.message), fe(!1), Se([]),
|
|
1532
|
+
v(A.message), fe(!1), Se([]), Le.current = !1;
|
|
1533
1533
|
}
|
|
1534
|
-
},
|
|
1535
|
-
const y = o === "lint" ? "lint" : o === "typecheck" ? "typecheck" : o === "test" ? "test suite" : o, b = (
|
|
1534
|
+
}, Rn = (o, u) => {
|
|
1535
|
+
const y = o === "lint" ? "lint" : o === "typecheck" ? "typecheck" : o === "test" ? "test suite" : o, b = (u == null ? void 0 : u.trim()) || `(no output captured for ${o})`, C = `The pre-flight ${y} check failed when validating the proposed changes against the real repo. Fix the errors below without altering unrelated behaviour, and keep the change surgical:
|
|
1536
1536
|
|
|
1537
1537
|
${b}`;
|
|
1538
|
-
|
|
1539
|
-
},
|
|
1538
|
+
Le.current = !0, St(C);
|
|
1539
|
+
}, Ct = (o, u) => {
|
|
1540
1540
|
var A;
|
|
1541
|
-
const { repoKey: y, issueIid: b, isRefine: C } =
|
|
1541
|
+
const { repoKey: y, issueIid: b, isRefine: C } = u;
|
|
1542
1542
|
(A = U.current) == null || A.close();
|
|
1543
1543
|
const R = new URLSearchParams({ token: ze() });
|
|
1544
|
-
M && R.set("repo", M), ue.length && R.set("secondaryRepos", ue.join(",")), U.current =
|
|
1544
|
+
M && R.set("repo", M), ue.length && R.set("secondaryRepos", ue.join(",")), U.current = Qe(
|
|
1545
1545
|
`/api/forge/jobs/${o}/stream?${R.toString()}`,
|
|
1546
1546
|
(T) => {
|
|
1547
1547
|
var D, E;
|
|
1548
1548
|
T.type === "progress" ? m(
|
|
1549
|
-
(B) =>
|
|
1550
|
-
) : T.type === "log" ? w((B) => [...B, { ts: (/* @__PURE__ */ new Date()).toISOString(), message: T.message }]) : T.type === "result" ? k(T.data) : T.type === "usage" ?
|
|
1549
|
+
(B) => xt(B, T.step, T.message)
|
|
1550
|
+
) : T.type === "log" ? w((B) => [...B, { ts: (/* @__PURE__ */ new Date()).toISOString(), message: T.message }]) : T.type === "result" ? k(T.data) : T.type === "usage" ? Je(T) : T.type === "done" ? ((D = U.current) == null || D.close(), U.current = null, he(y, b, "ci-fix"), C && fe(!1), s("reviewing")) : T.type === "error" && ((E = U.current) == null || E.close(), U.current = null, he(y, b, "ci-fix"), v(T.message), C && fe(!1), s("reviewing"));
|
|
1551
1551
|
},
|
|
1552
1552
|
() => {
|
|
1553
1553
|
var T;
|
|
1554
1554
|
(T = U.current) == null || T.close(), U.current = null, v(C ? "Connection lost during CI fix." : "Connection lost during CI fix analysis."), C && fe(!1), s("reviewing");
|
|
1555
1555
|
}
|
|
1556
1556
|
);
|
|
1557
|
-
},
|
|
1557
|
+
}, Sn = async (o, u, y) => {
|
|
1558
1558
|
if (!d) return;
|
|
1559
1559
|
const b = y || M, C = `?repo=${encodeURIComponent(b)}`, R = await Promise.all(
|
|
1560
1560
|
o.map(
|
|
@@ -1565,17 +1565,17 @@ ${b}`;
|
|
|
1565
1565
|
)
|
|
1566
1566
|
), A = 150, T = R.map((O, F) => {
|
|
1567
1567
|
const se = O.split(`
|
|
1568
|
-
`),
|
|
1568
|
+
`), dt = se.length > A ? se.slice(-A).join(`
|
|
1569
1569
|
`) : O;
|
|
1570
1570
|
return `--- Job ${o[F]} (${b}) ---
|
|
1571
|
-
${
|
|
1571
|
+
${dt}`;
|
|
1572
1572
|
}).join(`
|
|
1573
1573
|
|
|
1574
|
-
`), D =
|
|
1574
|
+
`), D = u != null && u.trim() ? `${T}
|
|
1575
1575
|
|
|
1576
1576
|
--- User instructions ---
|
|
1577
|
-
${
|
|
1578
|
-
|
|
1577
|
+
${u.trim()}` : T;
|
|
1578
|
+
rt("ci-fix");
|
|
1579
1579
|
const E = M || "default", B = d.iid;
|
|
1580
1580
|
if (N) {
|
|
1581
1581
|
fe(!0), v(null), m([]);
|
|
@@ -1589,14 +1589,14 @@ ${x.trim()}` : T;
|
|
|
1589
1589
|
previousChanges: N.changes,
|
|
1590
1590
|
repo: M,
|
|
1591
1591
|
secondaryRepos: ue,
|
|
1592
|
-
agent:
|
|
1592
|
+
agent: De
|
|
1593
1593
|
})
|
|
1594
1594
|
}
|
|
1595
1595
|
);
|
|
1596
|
-
|
|
1596
|
+
ut(E, B, "ci-fix", {
|
|
1597
1597
|
jobId: O,
|
|
1598
1598
|
meta: { isRefine: !0, ordinal: J }
|
|
1599
|
-
}), Ne.current.add(O),
|
|
1599
|
+
}), Ne.current.add(O), Ct(O, { repoKey: E, issueIid: B, isRefine: !0 });
|
|
1600
1600
|
} catch (O) {
|
|
1601
1601
|
v(O.message), fe(!1);
|
|
1602
1602
|
}
|
|
@@ -1608,20 +1608,20 @@ ${x.trim()}` : T;
|
|
|
1608
1608
|
method: "POST",
|
|
1609
1609
|
body: JSON.stringify({
|
|
1610
1610
|
ciContext: D,
|
|
1611
|
-
model:
|
|
1611
|
+
model: We,
|
|
1612
1612
|
repo: M,
|
|
1613
1613
|
secondaryRepos: ue,
|
|
1614
|
-
agent:
|
|
1614
|
+
agent: De
|
|
1615
1615
|
})
|
|
1616
1616
|
}
|
|
1617
1617
|
);
|
|
1618
|
-
m([]), w([]), k(null), v(null), s("analyzing"),
|
|
1618
|
+
m([]), w([]), k(null), v(null), s("analyzing"), ut(E, B, "ci-fix", {
|
|
1619
1619
|
jobId: me,
|
|
1620
1620
|
meta: { isRefine: !1 }
|
|
1621
|
-
}), Ne.current.add(me),
|
|
1622
|
-
},
|
|
1621
|
+
}), Ne.current.add(me), Ct(me, { repoKey: E, issueIid: B, isRefine: !1 });
|
|
1622
|
+
}, Cn = async () => {
|
|
1623
1623
|
if (d) {
|
|
1624
|
-
|
|
1624
|
+
Vt(!0), st(null);
|
|
1625
1625
|
try {
|
|
1626
1626
|
const o = await Y(
|
|
1627
1627
|
`/issues/${d.iid}/resolution-check`,
|
|
@@ -1630,18 +1630,18 @@ ${x.trim()}` : T;
|
|
|
1630
1630
|
body: JSON.stringify({
|
|
1631
1631
|
repo: M,
|
|
1632
1632
|
secondaryRepos: ue,
|
|
1633
|
-
agent:
|
|
1633
|
+
agent: De
|
|
1634
1634
|
})
|
|
1635
1635
|
}
|
|
1636
1636
|
);
|
|
1637
|
-
|
|
1637
|
+
zt(o), (o.cost != null || o.inputTokens != null) && Je(o);
|
|
1638
1638
|
} catch (o) {
|
|
1639
|
-
|
|
1639
|
+
st(o.message);
|
|
1640
1640
|
} finally {
|
|
1641
|
-
|
|
1641
|
+
Vt(!1);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
},
|
|
1644
|
+
}, Tn = () => {
|
|
1645
1645
|
P && (Q({
|
|
1646
1646
|
applications: [
|
|
1647
1647
|
{
|
|
@@ -1652,24 +1652,24 @@ ${x.trim()}` : T;
|
|
|
1652
1652
|
}
|
|
1653
1653
|
]
|
|
1654
1654
|
}), s("monitoring"));
|
|
1655
|
-
}, [
|
|
1655
|
+
}, [_n, Tt] = h(null), En = async () => {
|
|
1656
1656
|
if (d) {
|
|
1657
|
-
|
|
1657
|
+
Tt(null);
|
|
1658
1658
|
try {
|
|
1659
1659
|
await Y(`/issues/${d.iid}/close`, {
|
|
1660
1660
|
method: "POST",
|
|
1661
1661
|
body: JSON.stringify({ repo: M })
|
|
1662
|
-
}), i((o) => o.filter((
|
|
1662
|
+
}), i((o) => o.filter((u) => u.iid !== d.iid)), Ke();
|
|
1663
1663
|
} catch (o) {
|
|
1664
|
-
|
|
1664
|
+
Tt(o.message);
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
|
-
},
|
|
1668
|
-
var o,
|
|
1669
|
-
(o = U.current) == null || o.close(), U.current = null, (
|
|
1670
|
-
},
|
|
1671
|
-
var o,
|
|
1672
|
-
(o =
|
|
1667
|
+
}, An = () => Tt(null), $n = () => {
|
|
1668
|
+
var o, u;
|
|
1669
|
+
(o = U.current) == null || o.close(), U.current = null, (u = je.current) == null || u.close(), je.current = null, Ne.current.clear(), Ie(!1), fe(!1), Ve([]), _(null), be(Ce), we(null), s("selected");
|
|
1670
|
+
}, Ke = () => {
|
|
1671
|
+
var o, u;
|
|
1672
|
+
(o = it.current) == null || o.abort(), (u = U.current) == null || u.close(), U.current = null, Ne.current.clear(), j(null), q(null), ve(!1), H([]), Re([]), ie(!1), zt(null), st(null), k(null), I([]), _(null), Q(null), m([]), w([]), v(null), g(null), fe(!1), Ve([]), be(Ce), we(null), s("idle");
|
|
1673
1673
|
};
|
|
1674
1674
|
return {
|
|
1675
1675
|
phase: t,
|
|
@@ -1677,7 +1677,7 @@ ${x.trim()}` : T;
|
|
|
1677
1677
|
connectError: n,
|
|
1678
1678
|
issues: a,
|
|
1679
1679
|
issuesLoading: l,
|
|
1680
|
-
issuesError:
|
|
1680
|
+
issuesError: x,
|
|
1681
1681
|
selectedIssue: d,
|
|
1682
1682
|
progressSteps: f,
|
|
1683
1683
|
analysisLogs: S,
|
|
@@ -1686,92 +1686,92 @@ ${x.trim()}` : T;
|
|
|
1686
1686
|
applying: re,
|
|
1687
1687
|
applyResult: ce,
|
|
1688
1688
|
applyError: xe,
|
|
1689
|
-
refining:
|
|
1690
|
-
analysisMode:
|
|
1691
|
-
analysisPrompt:
|
|
1692
|
-
setAnalysisPrompt:
|
|
1693
|
-
usage:
|
|
1689
|
+
refining: Ue,
|
|
1690
|
+
analysisMode: Is,
|
|
1691
|
+
analysisPrompt: Jt,
|
|
1692
|
+
setAnalysisPrompt: qt,
|
|
1693
|
+
usage: Os,
|
|
1694
1694
|
existingMr: P,
|
|
1695
1695
|
existingMrLoading: ee,
|
|
1696
1696
|
mergedMrs: ke,
|
|
1697
1697
|
issueEnvironments: ge,
|
|
1698
1698
|
issueEnvironmentsLoading: W,
|
|
1699
1699
|
openMRs: Te,
|
|
1700
|
-
openMRsLoading:
|
|
1701
|
-
openMRsError:
|
|
1700
|
+
openMRsLoading: Me,
|
|
1701
|
+
openMRsError: Es,
|
|
1702
1702
|
storedAnalyses: de,
|
|
1703
1703
|
currentOrdinal: J,
|
|
1704
|
-
handleRestoreAnalysis:
|
|
1705
|
-
restoreAnalysisByOrdinal:
|
|
1706
|
-
handleDiscardStoredAnalysis:
|
|
1707
|
-
handleClearIssueCache:
|
|
1708
|
-
handleDestroyAllAnalyses:
|
|
1709
|
-
handleUndoRefine:
|
|
1710
|
-
formatAnalysisDate:
|
|
1711
|
-
handleConnect:
|
|
1712
|
-
reloadStatus:
|
|
1713
|
-
loadIssues:
|
|
1714
|
-
loadOpenMRs:
|
|
1715
|
-
handleSelectMR:
|
|
1716
|
-
handleCreateIssue:
|
|
1717
|
-
handleUpdateIssue:
|
|
1718
|
-
handleSelectIssue:
|
|
1719
|
-
handleBeginAnalysis:
|
|
1720
|
-
handleCancelAnalysis:
|
|
1721
|
-
handleApprove:
|
|
1722
|
-
handleDeployBranch:
|
|
1723
|
-
handlePromoteBranch:
|
|
1724
|
-
handleCommitToBranch:
|
|
1725
|
-
handleReject:
|
|
1726
|
-
handleRefine:
|
|
1727
|
-
handleRefinePipelineFailure:
|
|
1728
|
-
handleCheckResolution:
|
|
1729
|
-
resolutionCheck:
|
|
1730
|
-
resolutionChecking:
|
|
1731
|
-
resolutionError:
|
|
1732
|
-
handleViewExistingMr:
|
|
1733
|
-
handleCloseIssue:
|
|
1734
|
-
closeError:
|
|
1735
|
-
clearCloseError:
|
|
1736
|
-
handleBackToIssue:
|
|
1737
|
-
handleReset:
|
|
1704
|
+
handleRestoreAnalysis: bn,
|
|
1705
|
+
restoreAnalysisByOrdinal: Rt,
|
|
1706
|
+
handleDiscardStoredAnalysis: jn,
|
|
1707
|
+
handleClearIssueCache: yn,
|
|
1708
|
+
handleDestroyAllAnalyses: vn,
|
|
1709
|
+
handleUndoRefine: Nn,
|
|
1710
|
+
formatAnalysisDate: Zn,
|
|
1711
|
+
handleConnect: an,
|
|
1712
|
+
reloadStatus: nn,
|
|
1713
|
+
loadIssues: Ge,
|
|
1714
|
+
loadOpenMRs: ot,
|
|
1715
|
+
handleSelectMR: ln,
|
|
1716
|
+
handleCreateIssue: on,
|
|
1717
|
+
handleUpdateIssue: cn,
|
|
1718
|
+
handleSelectIssue: dn,
|
|
1719
|
+
handleBeginAnalysis: xn,
|
|
1720
|
+
handleCancelAnalysis: un,
|
|
1721
|
+
handleApprove: ls,
|
|
1722
|
+
handleDeployBranch: fn,
|
|
1723
|
+
handlePromoteBranch: mn,
|
|
1724
|
+
handleCommitToBranch: os,
|
|
1725
|
+
handleReject: gn,
|
|
1726
|
+
handleRefine: St,
|
|
1727
|
+
handleRefinePipelineFailure: Sn,
|
|
1728
|
+
handleCheckResolution: Cn,
|
|
1729
|
+
resolutionCheck: wt,
|
|
1730
|
+
resolutionChecking: As,
|
|
1731
|
+
resolutionError: $s,
|
|
1732
|
+
handleViewExistingMr: Tn,
|
|
1733
|
+
handleCloseIssue: En,
|
|
1734
|
+
closeError: _n,
|
|
1735
|
+
clearCloseError: An,
|
|
1736
|
+
handleBackToIssue: $n,
|
|
1737
|
+
handleReset: Ke,
|
|
1738
1738
|
handleDisconnect: () => {
|
|
1739
|
-
|
|
1739
|
+
_t(), Ke(), s("connect");
|
|
1740
1740
|
},
|
|
1741
|
-
availableRepos:
|
|
1741
|
+
availableRepos: Ws,
|
|
1742
1742
|
selectedRepo: M,
|
|
1743
|
-
setSelectedRepo:
|
|
1743
|
+
setSelectedRepo: Gs,
|
|
1744
1744
|
selectedSecondaryRepos: ue,
|
|
1745
|
-
setSelectedSecondaryRepos:
|
|
1746
|
-
testDeployUrlTemplate:
|
|
1747
|
-
availableModels:
|
|
1748
|
-
selectedModel:
|
|
1749
|
-
setSelectedModel:
|
|
1750
|
-
availableAgents:
|
|
1751
|
-
selectedAgent:
|
|
1752
|
-
setSelectedAgent:
|
|
1753
|
-
rateLimit:
|
|
1754
|
-
quotaLoading:
|
|
1755
|
-
quotaError:
|
|
1756
|
-
quotaCheckedAt:
|
|
1757
|
-
refreshQuota:
|
|
1758
|
-
validating:
|
|
1759
|
-
validationError:
|
|
1760
|
-
validation:
|
|
1761
|
-
handleValidate:
|
|
1762
|
-
handleFixValidation:
|
|
1763
|
-
autoPushOnValidatePass:
|
|
1764
|
-
setAutoPushOnValidatePass:
|
|
1745
|
+
setSelectedSecondaryRepos: Kt,
|
|
1746
|
+
testDeployUrlTemplate: Ks,
|
|
1747
|
+
availableModels: Hs,
|
|
1748
|
+
selectedModel: We,
|
|
1749
|
+
setSelectedModel: tn,
|
|
1750
|
+
availableAgents: Zs,
|
|
1751
|
+
selectedAgent: De,
|
|
1752
|
+
setSelectedAgent: sn,
|
|
1753
|
+
rateLimit: Ms,
|
|
1754
|
+
quotaLoading: Ls,
|
|
1755
|
+
quotaError: Ds,
|
|
1756
|
+
quotaCheckedAt: Fs,
|
|
1757
|
+
refreshQuota: Bs,
|
|
1758
|
+
validating: kt,
|
|
1759
|
+
validationError: Vs,
|
|
1760
|
+
validation: qe,
|
|
1761
|
+
handleValidate: is,
|
|
1762
|
+
handleFixValidation: Rn,
|
|
1763
|
+
autoPushOnValidatePass: at,
|
|
1764
|
+
setAutoPushOnValidatePass: qs,
|
|
1765
1765
|
refineThread: z,
|
|
1766
|
-
refineQueue:
|
|
1767
|
-
thinkingLogs:
|
|
1766
|
+
refineQueue: nt,
|
|
1767
|
+
thinkingLogs: Ps,
|
|
1768
1768
|
getToken: ze,
|
|
1769
1769
|
backendError: L,
|
|
1770
1770
|
backendRetrying: te,
|
|
1771
|
-
retryBackend:
|
|
1771
|
+
retryBackend: rn
|
|
1772
1772
|
};
|
|
1773
1773
|
}
|
|
1774
|
-
const
|
|
1774
|
+
const or = [
|
|
1775
1775
|
"setPhase",
|
|
1776
1776
|
"setAnalysisPrompt",
|
|
1777
1777
|
"setAutoPushOnValidatePass",
|
|
@@ -1815,27 +1815,51 @@ const ir = [
|
|
|
1815
1815
|
"formatAnalysisDate",
|
|
1816
1816
|
"getToken",
|
|
1817
1817
|
"retryBackend"
|
|
1818
|
-
], ys =
|
|
1819
|
-
function
|
|
1818
|
+
], ys = bt(null), vs = bt(null), Ns = bt(null), cr = new Set(or);
|
|
1819
|
+
function dr(t) {
|
|
1820
1820
|
const s = {}, n = {};
|
|
1821
1821
|
for (const [r, a] of Object.entries(t))
|
|
1822
|
-
|
|
1822
|
+
cr.has(r) ? n[r] = a : s[r] = a;
|
|
1823
1823
|
return { state: s, actions: n };
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const s =
|
|
1827
|
-
return /* @__PURE__ */ e.jsx(ys.Provider, { value: n, children: /* @__PURE__ */ e.jsx(vs.Provider, { value: r, children: /* @__PURE__ */ e.jsx(Ns.Provider, { value: { activeDetailTab: a, setActiveDetailTab: i, mrMerged: l, setMrMerged: c, taskModalOpen:
|
|
1825
|
+
function xr({ children: t }) {
|
|
1826
|
+
const s = lr(), { state: n, actions: r } = dr(s), [a, i] = h("issue"), [l, c] = h(!1), [x, p] = h(!1);
|
|
1827
|
+
return /* @__PURE__ */ e.jsx(ys.Provider, { value: n, children: /* @__PURE__ */ e.jsx(vs.Provider, { value: r, children: /* @__PURE__ */ e.jsx(Ns.Provider, { value: { activeDetailTab: a, setActiveDetailTab: i, mrMerged: l, setMrMerged: c, taskModalOpen: x, setTaskModalOpen: p }, children: t }) }) });
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const n =
|
|
1829
|
+
function Ft(t, s) {
|
|
1830
|
+
const n = bs(t);
|
|
1831
1831
|
if (!n) throw new Error(`${s} must be used inside <ForgeProvider>`);
|
|
1832
1832
|
return n;
|
|
1833
1833
|
}
|
|
1834
|
-
const le = () =>
|
|
1835
|
-
function
|
|
1836
|
-
|
|
1834
|
+
const le = () => Ft(ys, "useForgeState"), pe = () => Ft(vs, "useForgeActions"), $e = () => Ft(Ns, "useForgeUI"), ws = bt(null);
|
|
1835
|
+
function ur({
|
|
1836
|
+
basePath: t = "",
|
|
1837
|
+
children: s
|
|
1838
|
+
}) {
|
|
1839
|
+
const n = On(), r = Mn(), a = t.replace(/\/+$/, ""), i = ht(
|
|
1840
|
+
(x, p) => {
|
|
1841
|
+
n(`${a}${x}`, p);
|
|
1842
|
+
},
|
|
1843
|
+
[n, a]
|
|
1844
|
+
), l = Oe(() => {
|
|
1845
|
+
const x = r.pathname;
|
|
1846
|
+
return a && x.startsWith(a) ? x.slice(a.length) || "/" : x;
|
|
1847
|
+
}, [r.pathname, a]), c = Oe(
|
|
1848
|
+
() => ({ navigate: i, pathname: l, basePath: a }),
|
|
1849
|
+
[i, l, a]
|
|
1850
|
+
);
|
|
1851
|
+
return /* @__PURE__ */ e.jsx(ws.Provider, { value: c, children: s });
|
|
1852
|
+
}
|
|
1853
|
+
function Pe() {
|
|
1854
|
+
const t = bs(ws);
|
|
1855
|
+
if (!t) throw new Error("useForgeRouter must be used inside <ForgeRouterProvider>");
|
|
1856
|
+
return t;
|
|
1857
|
+
}
|
|
1858
|
+
const pr = /\b(error|failed|failure|exception|panic|traceback|cannot|could not|refused|denied|timed? out|abort|unexpected)\b/i, fr = /\b(warn|warning|skipped|skipping|deprecated|retry|retrying|fallback|truncated|missing)\b/i, mr = /\b(ok|success|passed|completed|done|ready|merged|applied|resolved)\b/i, hr = /^(reasoning|scanning|analysis started|ci fix started|identified|loaded)\b/i;
|
|
1859
|
+
function gr(t) {
|
|
1860
|
+
return pr.test(t) ? "error" : fr.test(t) ? "warn" : mr.test(t) ? "success" : hr.test(t) ? "debug" : "info";
|
|
1837
1861
|
}
|
|
1838
|
-
function
|
|
1862
|
+
function br(t) {
|
|
1839
1863
|
try {
|
|
1840
1864
|
const s = new Date(t), n = String(s.getHours()).padStart(2, "0"), r = String(s.getMinutes()).padStart(2, "0"), a = String(s.getSeconds()).padStart(2, "0"), i = String(s.getMilliseconds()).padStart(3, "0");
|
|
1841
1865
|
return `${n}:${r}:${a}.${i}`;
|
|
@@ -1843,14 +1867,14 @@ function mr(t) {
|
|
|
1843
1867
|
return "--:--:--.---";
|
|
1844
1868
|
}
|
|
1845
1869
|
}
|
|
1846
|
-
const
|
|
1870
|
+
const jr = {
|
|
1847
1871
|
info: { icon: "ℹ", text: "text-zinc-300", iconColor: "text-sky-400" },
|
|
1848
1872
|
warn: { icon: "⚠", text: "text-amber-300", iconColor: "text-amber-400" },
|
|
1849
1873
|
error: { icon: "✖", text: "text-red-300", iconColor: "text-red-400" },
|
|
1850
1874
|
debug: { icon: "›", text: "text-zinc-500", iconColor: "text-zinc-600" },
|
|
1851
1875
|
success: { icon: "✓", text: "text-emerald-300", iconColor: "text-emerald-400" }
|
|
1852
1876
|
};
|
|
1853
|
-
function
|
|
1877
|
+
function Nt({
|
|
1854
1878
|
entries: t,
|
|
1855
1879
|
autoScroll: s = !0,
|
|
1856
1880
|
variant: n = "panel",
|
|
@@ -1860,12 +1884,12 @@ function vt({
|
|
|
1860
1884
|
headerAccessory: l,
|
|
1861
1885
|
empty: c = "No output yet."
|
|
1862
1886
|
}) {
|
|
1863
|
-
const
|
|
1887
|
+
const x = oe(null);
|
|
1864
1888
|
G(() => {
|
|
1865
|
-
s &&
|
|
1889
|
+
s && x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
1866
1890
|
}, [t.length, s]);
|
|
1867
|
-
const
|
|
1868
|
-
const m = j.level ??
|
|
1891
|
+
const p = t.map((j) => typeof j == "string" ? { ts: (/* @__PURE__ */ new Date()).toISOString(), message: j } : j), d = /* @__PURE__ */ e.jsx("div", { ref: x, className: `font-mono text-[11px] leading-5 ${r} overflow-y-auto bg-black/60`, children: p.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-4 py-3 text-zinc-600 italic", children: c }) : /* @__PURE__ */ e.jsx("div", { children: p.map((j, f) => {
|
|
1892
|
+
const m = j.level ?? gr(j.message), S = jr[m];
|
|
1869
1893
|
return /* @__PURE__ */ e.jsxs(
|
|
1870
1894
|
"div",
|
|
1871
1895
|
{
|
|
@@ -1874,7 +1898,7 @@ function vt({
|
|
|
1874
1898
|
borderLeftColor: m === "error" ? "rgba(248, 113, 113, 0.5)" : m === "warn" ? "rgba(251, 191, 36, 0.4)" : m === "success" ? "rgba(52, 211, 153, 0.4)" : "transparent"
|
|
1875
1899
|
},
|
|
1876
1900
|
children: [
|
|
1877
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-zinc-600 select-none shrink-0 tabular-nums", children:
|
|
1901
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-zinc-600 select-none shrink-0 tabular-nums", children: br(j.ts) }),
|
|
1878
1902
|
/* @__PURE__ */ e.jsx("span", { className: `${S.iconColor} shrink-0 select-none`, children: S.icon }),
|
|
1879
1903
|
/* @__PURE__ */ e.jsx("span", { className: `${S.text} whitespace-pre-wrap break-words`, children: j.message })
|
|
1880
1904
|
]
|
|
@@ -1898,27 +1922,27 @@ function vt({
|
|
|
1898
1922
|
d
|
|
1899
1923
|
] });
|
|
1900
1924
|
}
|
|
1901
|
-
function
|
|
1925
|
+
function yr(t, s = Date.now()) {
|
|
1902
1926
|
return t.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").split(`
|
|
1903
1927
|
`).map((a, i) => ({
|
|
1904
1928
|
ts: new Date(s + i).toISOString(),
|
|
1905
1929
|
message: a.length ? a : " "
|
|
1906
1930
|
}));
|
|
1907
1931
|
}
|
|
1908
|
-
const
|
|
1932
|
+
const vr = [
|
|
1909
1933
|
"fetch_issue",
|
|
1910
1934
|
"scan_repo",
|
|
1911
1935
|
"identify_files",
|
|
1912
1936
|
"fetch_files",
|
|
1913
1937
|
"generate_fix"
|
|
1914
|
-
],
|
|
1938
|
+
], Nr = {
|
|
1915
1939
|
fetch_issue: "fetch_issue",
|
|
1916
1940
|
scan_repo: "scan_repos",
|
|
1917
1941
|
identify_files: "identify_files",
|
|
1918
1942
|
fetch_files: "fetch_files",
|
|
1919
1943
|
generate_fix: "generate_fix"
|
|
1920
1944
|
};
|
|
1921
|
-
function
|
|
1945
|
+
function zs({ steps: t, logs: s, issueTitle: n, mode: r = "analyze" }) {
|
|
1922
1946
|
const a = new Set(t.map((c) => c.step)), i = t[t.length - 1], l = r === "ci-fix" ? "ci-fix" : "analyze";
|
|
1923
1947
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1924
1948
|
/* @__PURE__ */ e.jsxs("div", { className: "border border-zinc-800 rounded-lg overflow-hidden bg-zinc-950", children: [
|
|
@@ -1934,12 +1958,12 @@ function ws({ steps: t, logs: s, issueTitle: n, mode: r = "analyze" }) {
|
|
|
1934
1958
|
] }),
|
|
1935
1959
|
r === "ci-fix" && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] font-mono uppercase tracking-wide px-2 py-0.5 rounded bg-amber-950/60 text-amber-300 border border-amber-900", children: "CI FAILURE" })
|
|
1936
1960
|
] }),
|
|
1937
|
-
/* @__PURE__ */ e.jsx("div", { className: "px-4 py-4", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children:
|
|
1961
|
+
/* @__PURE__ */ e.jsx("div", { className: "px-4 py-4", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: vr.map((c, x) => {
|
|
1938
1962
|
var w;
|
|
1939
|
-
const
|
|
1963
|
+
const p = a.has(c), d = (i == null ? void 0 : i.step) === c, j = ((w = t.find((N) => N.step === c)) == null ? void 0 : w.message) ?? "", f = Nr[c] ?? c;
|
|
1940
1964
|
let m, S = "text-zinc-600";
|
|
1941
|
-
return
|
|
1942
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-zinc-700 tabular-nums select-none w-6 text-right", children: String(
|
|
1965
|
+
return p && !d ? (m = /* @__PURE__ */ e.jsx("span", { className: "text-emerald-400 text-sm", children: "✓" }), S = "text-zinc-400") : d ? (m = /* @__PURE__ */ e.jsx("span", { className: "w-3.5 h-3.5 rounded-full border-2 border-violet-400 border-t-transparent animate-spin inline-block" }), S = "text-white") : m = /* @__PURE__ */ e.jsx("span", { className: "text-zinc-700 text-sm", children: "○" }), /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 font-mono text-xs", children: [
|
|
1966
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-zinc-700 tabular-nums select-none w-6 text-right", children: String(x + 1).padStart(2, "0") }),
|
|
1943
1967
|
/* @__PURE__ */ e.jsx("span", { className: "w-5 flex items-center justify-center shrink-0", children: m }),
|
|
1944
1968
|
/* @__PURE__ */ e.jsx("span", { className: `${S} w-36 shrink-0`, children: f }),
|
|
1945
1969
|
/* @__PURE__ */ e.jsx("span", { className: "text-zinc-500 truncate", children: j || "—" })
|
|
@@ -1947,7 +1971,7 @@ function ws({ steps: t, logs: s, issueTitle: n, mode: r = "analyze" }) {
|
|
|
1947
1971
|
}) }) })
|
|
1948
1972
|
] }),
|
|
1949
1973
|
s.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1950
|
-
|
|
1974
|
+
Nt,
|
|
1951
1975
|
{
|
|
1952
1976
|
entries: s,
|
|
1953
1977
|
label: `forge ${l}`,
|
|
@@ -1957,11 +1981,11 @@ function ws({ steps: t, logs: s, issueTitle: n, mode: r = "analyze" }) {
|
|
|
1957
1981
|
)
|
|
1958
1982
|
] });
|
|
1959
1983
|
}
|
|
1960
|
-
function
|
|
1984
|
+
function wr() {
|
|
1961
1985
|
const { selectedIssue: t, progressSteps: s, analysisLogs: n, analysisResult: r, analysisMode: a } = le(), { handleCancelAnalysis: i } = pe();
|
|
1962
1986
|
return t ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1963
1987
|
/* @__PURE__ */ e.jsx(
|
|
1964
|
-
|
|
1988
|
+
zs,
|
|
1965
1989
|
{
|
|
1966
1990
|
steps: s,
|
|
1967
1991
|
logs: n,
|
|
@@ -2009,28 +2033,28 @@ function yr() {
|
|
|
2009
2033
|
] })
|
|
2010
2034
|
] }) : null;
|
|
2011
2035
|
}
|
|
2012
|
-
const
|
|
2036
|
+
const zr = {
|
|
2013
2037
|
analyze: "analyzing",
|
|
2014
2038
|
refine: "refining",
|
|
2015
2039
|
"ci-fix": "fixing CI",
|
|
2016
2040
|
validate: "validating"
|
|
2017
2041
|
};
|
|
2018
|
-
function
|
|
2042
|
+
function kr({ types: t }) {
|
|
2019
2043
|
if (!t.length) return null;
|
|
2020
2044
|
const s = t.find((n) => n === "analyze") ?? t.find((n) => n === "ci-fix") ?? t.find((n) => n === "refine") ?? t[0];
|
|
2021
2045
|
return /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-1.5 text-[11px] text-violet-300 bg-violet-950/50 border border-violet-800/60 px-2 py-0.5 rounded-full shrink-0", children: [
|
|
2022
2046
|
/* @__PURE__ */ e.jsx("span", { className: "w-2 h-2 rounded-full border border-violet-300 border-t-transparent animate-spin inline-block shrink-0" }),
|
|
2023
|
-
|
|
2047
|
+
zr[s],
|
|
2024
2048
|
t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "text-violet-400/70", children: [
|
|
2025
2049
|
"+",
|
|
2026
2050
|
t.length - 1
|
|
2027
2051
|
] })
|
|
2028
2052
|
] });
|
|
2029
2053
|
}
|
|
2030
|
-
const
|
|
2031
|
-
function
|
|
2054
|
+
const Rr = /* @__PURE__ */ new Set(["running", "pending", "created", "preparing", "waiting_for_resource", "scheduled"]);
|
|
2055
|
+
function Sr({ pipeline: t }) {
|
|
2032
2056
|
if (!t) return null;
|
|
2033
|
-
const s =
|
|
2057
|
+
const s = Rr.has(t.status), n = t.status === "failed";
|
|
2034
2058
|
if (!s && !n) return null;
|
|
2035
2059
|
const r = s ? "text-amber-300 bg-amber-950/40 border-amber-800/60 hover:bg-amber-900/50" : "text-red-300 bg-red-950/40 border-red-800/60 hover:bg-red-900/50", a = s ? "pipeline running" : "pipeline failed";
|
|
2036
2060
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -2049,16 +2073,16 @@ function zr({ pipeline: t }) {
|
|
|
2049
2073
|
}
|
|
2050
2074
|
);
|
|
2051
2075
|
}
|
|
2052
|
-
function
|
|
2053
|
-
const [s, n] = h(!1), [r, a] = h(""), [i, l] = h(""), [c,
|
|
2076
|
+
function Cr({ onCreate: t }) {
|
|
2077
|
+
const [s, n] = h(!1), [r, a] = h(""), [i, l] = h(""), [c, x] = h(!1), [p, d] = h(null), j = async (f) => {
|
|
2054
2078
|
if (f.preventDefault(), !!r.trim()) {
|
|
2055
|
-
|
|
2079
|
+
x(!0), d(null);
|
|
2056
2080
|
try {
|
|
2057
2081
|
await t(r.trim(), i.trim()), a(""), l(""), n(!1);
|
|
2058
2082
|
} catch (m) {
|
|
2059
2083
|
d(m.message);
|
|
2060
2084
|
} finally {
|
|
2061
|
-
|
|
2085
|
+
x(!1);
|
|
2062
2086
|
}
|
|
2063
2087
|
}
|
|
2064
2088
|
};
|
|
@@ -2088,7 +2112,7 @@ function kr({ onCreate: t }) {
|
|
|
2088
2112
|
className: "w-full bg-zinc-800 border border-zinc-700 rounded px-3 py-2 text-sm text-white placeholder:text-zinc-500 focus:outline-none focus:border-violet-500 resize-none"
|
|
2089
2113
|
}
|
|
2090
2114
|
),
|
|
2091
|
-
|
|
2115
|
+
p && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-400", children: p }),
|
|
2092
2116
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
2093
2117
|
/* @__PURE__ */ e.jsx(
|
|
2094
2118
|
"button",
|
|
@@ -2120,8 +2144,8 @@ function kr({ onCreate: t }) {
|
|
|
2120
2144
|
}
|
|
2121
2145
|
);
|
|
2122
2146
|
}
|
|
2123
|
-
function
|
|
2124
|
-
return s ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: Array.from({ length: 5 }).map((c,
|
|
2147
|
+
function Tr({ issues: t, loading: s, onSelect: n, onCreate: r, activeJobsByIid: a, pipelinesByIid: i, openMrByIid: l }) {
|
|
2148
|
+
return s ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: Array.from({ length: 5 }).map((c, x) => /* @__PURE__ */ e.jsx("div", { className: "h-16 bg-zinc-800 rounded-lg animate-pulse" }, x)) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2125
2149
|
t.map((c) => /* @__PURE__ */ e.jsx(
|
|
2126
2150
|
"button",
|
|
2127
2151
|
{
|
|
@@ -2134,23 +2158,23 @@ function Rr({ issues: t, loading: s, onSelect: n, onCreate: r, activeJobsByIid:
|
|
|
2134
2158
|
"#",
|
|
2135
2159
|
c.iid
|
|
2136
2160
|
] }),
|
|
2137
|
-
c.labels.map((
|
|
2161
|
+
c.labels.map((x) => /* @__PURE__ */ e.jsx(
|
|
2138
2162
|
"span",
|
|
2139
2163
|
{
|
|
2140
2164
|
className: "text-xs bg-zinc-700 text-zinc-300 px-1.5 py-0.5 rounded",
|
|
2141
|
-
children:
|
|
2165
|
+
children: x
|
|
2142
2166
|
},
|
|
2143
|
-
|
|
2167
|
+
x
|
|
2144
2168
|
)),
|
|
2145
|
-
/* @__PURE__ */ e.jsx(
|
|
2146
|
-
/* @__PURE__ */ e.jsx(
|
|
2169
|
+
/* @__PURE__ */ e.jsx(kr, { types: (a == null ? void 0 : a[c.iid]) ?? [] }),
|
|
2170
|
+
/* @__PURE__ */ e.jsx(Sr, { pipeline: i == null ? void 0 : i[c.iid] }),
|
|
2147
2171
|
!c.likelyFixedByMr && (l == null ? void 0 : l[c.iid]) && /* @__PURE__ */ e.jsxs(
|
|
2148
2172
|
"a",
|
|
2149
2173
|
{
|
|
2150
2174
|
href: l[c.iid].web_url,
|
|
2151
2175
|
target: "_blank",
|
|
2152
2176
|
rel: "noreferrer",
|
|
2153
|
-
onClick: (
|
|
2177
|
+
onClick: (x) => x.stopPropagation(),
|
|
2154
2178
|
className: "text-[11px] text-sky-300 bg-sky-950/50 border border-sky-800/60 px-2 py-0.5 rounded-full shrink-0 hover:bg-sky-900/60 transition-colors",
|
|
2155
2179
|
title: `MR !${l[c.iid].iid} is open — not yet merged.`,
|
|
2156
2180
|
children: [
|
|
@@ -2165,7 +2189,7 @@ function Rr({ issues: t, loading: s, onSelect: n, onCreate: r, activeJobsByIid:
|
|
|
2165
2189
|
href: c.likelyFixedByMr.webUrl,
|
|
2166
2190
|
target: "_blank",
|
|
2167
2191
|
rel: "noreferrer",
|
|
2168
|
-
onClick: (
|
|
2192
|
+
onClick: (x) => x.stopPropagation(),
|
|
2169
2193
|
className: "text-[11px] text-emerald-300 bg-emerald-950/50 border border-emerald-800/60 px-2 py-0.5 rounded-full shrink-0 hover:bg-emerald-900/60 transition-colors",
|
|
2170
2194
|
title: `Merged via !${c.likelyFixedByMr.iid}. Verify the fix and close the issue on GitLab if resolved.`,
|
|
2171
2195
|
children: [
|
|
@@ -2202,10 +2226,10 @@ function Rr({ issues: t, loading: s, onSelect: n, onCreate: r, activeJobsByIid:
|
|
|
2202
2226
|
},
|
|
2203
2227
|
c.iid
|
|
2204
2228
|
)),
|
|
2205
|
-
/* @__PURE__ */ e.jsx(
|
|
2229
|
+
/* @__PURE__ */ e.jsx(Cr, { onCreate: r })
|
|
2206
2230
|
] });
|
|
2207
2231
|
}
|
|
2208
|
-
const
|
|
2232
|
+
const _r = {
|
|
2209
2233
|
success: "bg-green-400",
|
|
2210
2234
|
failed: "bg-red-400",
|
|
2211
2235
|
running: "bg-yellow-400 animate-pulse",
|
|
@@ -2213,18 +2237,18 @@ const Sr = {
|
|
|
2213
2237
|
canceled: "bg-zinc-500",
|
|
2214
2238
|
skipped: "bg-zinc-600",
|
|
2215
2239
|
created: "bg-zinc-500"
|
|
2216
|
-
},
|
|
2240
|
+
}, Er = {
|
|
2217
2241
|
success: "passed",
|
|
2218
2242
|
failed: "failed",
|
|
2219
2243
|
running: "running",
|
|
2220
2244
|
pending: "pending",
|
|
2221
2245
|
canceled: "canceled"
|
|
2222
|
-
},
|
|
2246
|
+
}, Ar = {
|
|
2223
2247
|
open: "No open Forge merge requests.",
|
|
2224
2248
|
merged: "No merged Forge merge requests.",
|
|
2225
2249
|
closed: "No closed Forge merge requests."
|
|
2226
2250
|
};
|
|
2227
|
-
function
|
|
2251
|
+
function $r({ mrs: t, loading: s, error: n, state: r = "open", onSelect: a, onRefresh: i }) {
|
|
2228
2252
|
return s ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: Array.from({ length: 3 }).map((l, c) => /* @__PURE__ */ e.jsx("div", { className: "h-16 bg-zinc-800 rounded-lg animate-pulse" }, c)) }) : n ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between bg-red-950/40 border border-red-800 rounded-lg px-4 py-3", children: [
|
|
2229
2253
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-red-300", children: n }),
|
|
2230
2254
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2235,8 +2259,8 @@ function _r({ mrs: t, loading: s, error: n, state: r = "open", onSelect: a, onRe
|
|
|
2235
2259
|
children: "Retry"
|
|
2236
2260
|
}
|
|
2237
2261
|
)
|
|
2238
|
-
] }) : t.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children:
|
|
2239
|
-
const c = l.pipeline ?
|
|
2262
|
+
] }) : t.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children: Ar[r] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: t.map((l) => {
|
|
2263
|
+
const c = l.pipeline ? _r[l.pipeline.status] ?? "bg-zinc-500" : "bg-zinc-700", x = l.pipeline ? Er[l.pipeline.status] ?? l.pipeline.status : "no pipeline", p = l.source_branch.match(/^forge\/issue-(\d+)-/), d = p ? p[1] : null;
|
|
2240
2264
|
return /* @__PURE__ */ e.jsx(
|
|
2241
2265
|
"button",
|
|
2242
2266
|
{
|
|
@@ -2247,7 +2271,7 @@ function _r({ mrs: t, loading: s, error: n, state: r = "open", onSelect: a, onRe
|
|
|
2247
2271
|
"span",
|
|
2248
2272
|
{
|
|
2249
2273
|
className: `w-2 h-2 rounded-full ${c}`,
|
|
2250
|
-
title:
|
|
2274
|
+
title: x
|
|
2251
2275
|
}
|
|
2252
2276
|
) }),
|
|
2253
2277
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -2265,7 +2289,7 @@ function _r({ mrs: t, loading: s, error: n, state: r = "open", onSelect: a, onRe
|
|
|
2265
2289
|
"span",
|
|
2266
2290
|
{
|
|
2267
2291
|
className: `text-xs ${l.pipeline.status === "failed" ? "text-red-400" : l.pipeline.status === "success" ? "text-green-400" : l.pipeline.status === "running" ? "text-yellow-400" : "text-zinc-500"}`,
|
|
2268
|
-
children:
|
|
2292
|
+
children: x
|
|
2269
2293
|
}
|
|
2270
2294
|
)
|
|
2271
2295
|
] }),
|
|
@@ -2282,7 +2306,7 @@ function _r({ mrs: t, loading: s, error: n, state: r = "open", onSelect: a, onRe
|
|
|
2282
2306
|
);
|
|
2283
2307
|
}) });
|
|
2284
2308
|
}
|
|
2285
|
-
const
|
|
2309
|
+
const Pr = {
|
|
2286
2310
|
success: "text-green-400",
|
|
2287
2311
|
failed: "text-red-400",
|
|
2288
2312
|
running: "text-yellow-400",
|
|
@@ -2291,7 +2315,7 @@ const Er = {
|
|
|
2291
2315
|
skipped: "text-zinc-600",
|
|
2292
2316
|
created: "text-zinc-400",
|
|
2293
2317
|
manual: "text-blue-400"
|
|
2294
|
-
},
|
|
2318
|
+
}, Ir = {
|
|
2295
2319
|
success: "✓",
|
|
2296
2320
|
failed: "✗",
|
|
2297
2321
|
running: "◎",
|
|
@@ -2301,7 +2325,7 @@ const Er = {
|
|
|
2301
2325
|
created: "○",
|
|
2302
2326
|
manual: "⊡"
|
|
2303
2327
|
};
|
|
2304
|
-
function
|
|
2328
|
+
function Or({ mrs: t, loading: s, error: n, onRefresh: r }) {
|
|
2305
2329
|
if (s)
|
|
2306
2330
|
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: Array.from({ length: 3 }).map((l, c) => /* @__PURE__ */ e.jsx("div", { className: "h-16 bg-zinc-800 rounded-lg animate-pulse" }, c)) });
|
|
2307
2331
|
if (n)
|
|
@@ -2319,15 +2343,15 @@ function $r({ mrs: t, loading: s, error: n, onRefresh: r }) {
|
|
|
2319
2343
|
const a = t.filter((l) => l.pipeline), i = t.filter((l) => !l.pipeline);
|
|
2320
2344
|
return t.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children: "No open Forge merge requests." }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2321
2345
|
a.map((l) => {
|
|
2322
|
-
const c = l.pipeline,
|
|
2346
|
+
const c = l.pipeline, x = Pr[c.status] ?? "text-zinc-400", p = Ir[c.status] ?? "?";
|
|
2323
2347
|
return /* @__PURE__ */ e.jsxs("div", { className: "bg-zinc-800/50 border border-zinc-700/50 rounded-lg px-4 py-3 flex items-center gap-4", children: [
|
|
2324
|
-
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-lg leading-none w-5 text-center ${
|
|
2348
|
+
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-lg leading-none w-5 text-center ${x}`, children: p }),
|
|
2325
2349
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2326
2350
|
/* @__PURE__ */ e.jsx("div", { className: "text-sm text-zinc-200 truncate", children: l.title }),
|
|
2327
2351
|
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-zinc-500 mt-0.5 font-mono", children: l.source_branch })
|
|
2328
2352
|
] }),
|
|
2329
2353
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 shrink-0", children: [
|
|
2330
|
-
/* @__PURE__ */ e.jsx("span", { className: `text-xs font-medium ${
|
|
2354
|
+
/* @__PURE__ */ e.jsx("span", { className: `text-xs font-medium ${x}`, children: c.status }),
|
|
2331
2355
|
/* @__PURE__ */ e.jsx(
|
|
2332
2356
|
"a",
|
|
2333
2357
|
{
|
|
@@ -2373,18 +2397,18 @@ function $r({ mrs: t, loading: s, error: n, onRefresh: r }) {
|
|
|
2373
2397
|
] })
|
|
2374
2398
|
] });
|
|
2375
2399
|
}
|
|
2376
|
-
const
|
|
2377
|
-
function
|
|
2400
|
+
const Mr = /* @__PURE__ */ new Set(["running", "pending", "created", "preparing", "waiting_for_resource", "scheduled"]), Lr = 15e3;
|
|
2401
|
+
function ps(t) {
|
|
2378
2402
|
if (!t) return null;
|
|
2379
2403
|
const s = t.match(/^forge\/issue-(\d+)(?:-|$)/);
|
|
2380
2404
|
return s ? Number(s[1]) : null;
|
|
2381
2405
|
}
|
|
2382
|
-
function
|
|
2406
|
+
function Dr(t) {
|
|
2383
2407
|
return t === "/mrs" || t.startsWith("/mrs/") ? "mrs" : t === "/pipelines" || t.startsWith("/pipelines/") ? "pipelines" : "issues";
|
|
2384
2408
|
}
|
|
2385
|
-
const
|
|
2386
|
-
function
|
|
2387
|
-
const t =
|
|
2409
|
+
const Fr = ["open", "merged", "closed"];
|
|
2410
|
+
function Br() {
|
|
2411
|
+
const { pathname: t } = Pe(), {
|
|
2388
2412
|
issues: s,
|
|
2389
2413
|
issuesLoading: n,
|
|
2390
2414
|
issuesError: r,
|
|
@@ -2392,25 +2416,25 @@ function Lr() {
|
|
|
2392
2416
|
openMRsLoading: i,
|
|
2393
2417
|
openMRsError: l,
|
|
2394
2418
|
selectedRepo: c
|
|
2395
|
-
} = le(),
|
|
2419
|
+
} = le(), x = tr(), p = Oe(() => {
|
|
2396
2420
|
const v = c || "default", L = {};
|
|
2397
2421
|
for (const V of s) {
|
|
2398
|
-
const te =
|
|
2422
|
+
const te = rr(x, v, V.iid);
|
|
2399
2423
|
te.length && (L[V.iid] = te);
|
|
2400
2424
|
}
|
|
2401
2425
|
return L;
|
|
2402
|
-
}, [
|
|
2426
|
+
}, [x, s, c]), d = Oe(() => {
|
|
2403
2427
|
const v = {};
|
|
2404
2428
|
for (const L of a) {
|
|
2405
2429
|
if (!L.pipeline) continue;
|
|
2406
|
-
const V =
|
|
2430
|
+
const V = ps(L.source_branch);
|
|
2407
2431
|
V != null && (v[V] = { status: L.pipeline.status, web_url: L.pipeline.web_url });
|
|
2408
2432
|
}
|
|
2409
2433
|
return v;
|
|
2410
|
-
}, [a]), j =
|
|
2434
|
+
}, [a]), j = Oe(() => {
|
|
2411
2435
|
const v = {};
|
|
2412
2436
|
for (const L of a) {
|
|
2413
|
-
const V =
|
|
2437
|
+
const V = ps(L.source_branch);
|
|
2414
2438
|
V != null && (v[V] = { iid: L.iid, web_url: L.web_url });
|
|
2415
2439
|
}
|
|
2416
2440
|
return v;
|
|
@@ -2420,13 +2444,13 @@ function Lr() {
|
|
|
2420
2444
|
handleSelectMR: S,
|
|
2421
2445
|
loadIssues: w,
|
|
2422
2446
|
loadOpenMRs: N
|
|
2423
|
-
} = pe(), k =
|
|
2424
|
-
() => Object.values(d).some((v) =>
|
|
2447
|
+
} = pe(), k = Dr(t), z = Oe(
|
|
2448
|
+
() => Object.values(d).some((v) => Mr.has(v.status)),
|
|
2425
2449
|
[d]
|
|
2426
2450
|
);
|
|
2427
2451
|
G(() => {
|
|
2428
2452
|
if (k !== "issues" || !z) return;
|
|
2429
|
-
const v = setInterval(() => N(),
|
|
2453
|
+
const v = setInterval(() => N(), Lr);
|
|
2430
2454
|
return () => clearInterval(v);
|
|
2431
2455
|
}, [k, z, N]);
|
|
2432
2456
|
const [$, K] = h("open");
|
|
@@ -2440,7 +2464,7 @@ function Lr() {
|
|
|
2440
2464
|
};
|
|
2441
2465
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-4xl mx-auto w-full flex flex-col gap-4", children: [
|
|
2442
2466
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2443
|
-
k === "mrs" ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 bg-zinc-900 border border-zinc-800 rounded-lg p-1", children:
|
|
2467
|
+
k === "mrs" ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 bg-zinc-900 border border-zinc-800 rounded-lg p-1", children: Fr.map((v) => /* @__PURE__ */ e.jsx(
|
|
2444
2468
|
"button",
|
|
2445
2469
|
{
|
|
2446
2470
|
onClick: () => Z(v),
|
|
@@ -2461,20 +2485,20 @@ function Lr() {
|
|
|
2461
2485
|
k === "issues" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2462
2486
|
r && /* @__PURE__ */ e.jsx("div", { className: "bg-red-950/40 border border-red-800 rounded-lg px-4 py-3 text-sm text-red-300 whitespace-pre-wrap break-words [overflow-wrap:anywhere] max-h-48 overflow-y-auto leading-snug", children: r }),
|
|
2463
2487
|
/* @__PURE__ */ e.jsx(
|
|
2464
|
-
|
|
2488
|
+
Tr,
|
|
2465
2489
|
{
|
|
2466
2490
|
issues: s,
|
|
2467
2491
|
loading: n,
|
|
2468
2492
|
onSelect: f,
|
|
2469
2493
|
onCreate: m,
|
|
2470
|
-
activeJobsByIid:
|
|
2494
|
+
activeJobsByIid: p,
|
|
2471
2495
|
pipelinesByIid: d,
|
|
2472
2496
|
openMrByIid: j
|
|
2473
2497
|
}
|
|
2474
2498
|
)
|
|
2475
2499
|
] }),
|
|
2476
2500
|
k === "mrs" && /* @__PURE__ */ e.jsx(
|
|
2477
|
-
|
|
2501
|
+
$r,
|
|
2478
2502
|
{
|
|
2479
2503
|
mrs: a,
|
|
2480
2504
|
loading: i,
|
|
@@ -2485,7 +2509,7 @@ function Lr() {
|
|
|
2485
2509
|
}
|
|
2486
2510
|
),
|
|
2487
2511
|
k === "pipelines" && /* @__PURE__ */ e.jsx(
|
|
2488
|
-
|
|
2512
|
+
Or,
|
|
2489
2513
|
{
|
|
2490
2514
|
mrs: a,
|
|
2491
2515
|
loading: i,
|
|
@@ -2495,7 +2519,7 @@ function Lr() {
|
|
|
2495
2519
|
)
|
|
2496
2520
|
] });
|
|
2497
2521
|
}
|
|
2498
|
-
function
|
|
2522
|
+
function ks() {
|
|
2499
2523
|
const [t, s] = h(!1), { closeError: n } = le(), { handleCloseIssue: r, clearCloseError: a } = pe();
|
|
2500
2524
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2501
2525
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: t ? /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 bg-red-950/40 border border-red-800/70 rounded-lg px-3 py-1.5", children: [
|
|
@@ -2545,7 +2569,7 @@ function zs() {
|
|
|
2545
2569
|
] })
|
|
2546
2570
|
] });
|
|
2547
2571
|
}
|
|
2548
|
-
function
|
|
2572
|
+
function Rs() {
|
|
2549
2573
|
const { issueEnvironments: t, issueEnvironmentsLoading: s } = le();
|
|
2550
2574
|
return s && t.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
2551
2575
|
/* @__PURE__ */ e.jsx("h3", { className: "text-xs font-medium text-zinc-400 uppercase tracking-wide", children: "Environments" }),
|
|
@@ -2610,7 +2634,7 @@ function ks() {
|
|
|
2610
2634
|
}) })
|
|
2611
2635
|
] });
|
|
2612
2636
|
}
|
|
2613
|
-
const
|
|
2637
|
+
const Ur = {
|
|
2614
2638
|
success: "bg-green-400",
|
|
2615
2639
|
failed: "bg-red-400",
|
|
2616
2640
|
running: "bg-yellow-400 animate-pulse",
|
|
@@ -2618,7 +2642,7 @@ const Dr = {
|
|
|
2618
2642
|
canceled: "bg-zinc-500",
|
|
2619
2643
|
skipped: "bg-zinc-600",
|
|
2620
2644
|
created: "bg-zinc-500"
|
|
2621
|
-
},
|
|
2645
|
+
}, Vr = {
|
|
2622
2646
|
success: "passed",
|
|
2623
2647
|
failed: "failed",
|
|
2624
2648
|
running: "running",
|
|
@@ -2626,7 +2650,7 @@ const Dr = {
|
|
|
2626
2650
|
canceled: "canceled",
|
|
2627
2651
|
skipped: "skipped",
|
|
2628
2652
|
created: "created"
|
|
2629
|
-
},
|
|
2653
|
+
}, Jr = {
|
|
2630
2654
|
success: "text-green-400",
|
|
2631
2655
|
failed: "text-red-400",
|
|
2632
2656
|
running: "text-yellow-400",
|
|
@@ -2635,12 +2659,12 @@ const Dr = {
|
|
|
2635
2659
|
skipped: "text-zinc-600",
|
|
2636
2660
|
created: "text-zinc-500"
|
|
2637
2661
|
};
|
|
2638
|
-
function
|
|
2662
|
+
function Bt({ mrs: t }) {
|
|
2639
2663
|
return t.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2640
2664
|
/* @__PURE__ */ e.jsx("h3", { className: "text-xs font-medium text-zinc-500 uppercase tracking-wide", children: "Merged MRs" }),
|
|
2641
2665
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: t.map((s) => {
|
|
2642
2666
|
var l;
|
|
2643
|
-
const n = (l = s.pipeline) == null ? void 0 : l.status, r = n ?
|
|
2667
|
+
const n = (l = s.pipeline) == null ? void 0 : l.status, r = n ? Ur[n] ?? "bg-zinc-500" : "bg-zinc-700", a = n ? Vr[n] ?? n : "no pipeline", i = n ? Jr[n] ?? "text-zinc-500" : "text-zinc-600";
|
|
2644
2668
|
return /* @__PURE__ */ e.jsxs(
|
|
2645
2669
|
"div",
|
|
2646
2670
|
{
|
|
@@ -2694,7 +2718,7 @@ function Ut({ mrs: t }) {
|
|
|
2694
2718
|
}) })
|
|
2695
2719
|
] });
|
|
2696
2720
|
}
|
|
2697
|
-
function
|
|
2721
|
+
function qr() {
|
|
2698
2722
|
const { selectedIssue: t, analysisPrompt: s, refining: n, mergedMrs: r } = le(), { setAnalysisPrompt: a, handleBeginAnalysis: i } = pe();
|
|
2699
2723
|
return t ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6 w-full", children: [
|
|
2700
2724
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -2724,7 +2748,7 @@ function Ur() {
|
|
|
2724
2748
|
] })
|
|
2725
2749
|
] }),
|
|
2726
2750
|
t.description && /* @__PURE__ */ e.jsx("div", { className: "bg-zinc-800 border border-zinc-700 rounded-lg px-4 py-4 text-sm text-zinc-300 whitespace-pre-wrap leading-relaxed w-full max-h-[50vh] overflow-y-auto", children: t.description }),
|
|
2727
|
-
/* @__PURE__ */ e.jsx(
|
|
2751
|
+
/* @__PURE__ */ e.jsx(Rs, {}),
|
|
2728
2752
|
!n && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
2729
2753
|
/* @__PURE__ */ e.jsx(
|
|
2730
2754
|
"textarea",
|
|
@@ -2745,13 +2769,13 @@ function Ur() {
|
|
|
2745
2769
|
children: "Analyze & Update MR"
|
|
2746
2770
|
}
|
|
2747
2771
|
) }),
|
|
2748
|
-
/* @__PURE__ */ e.jsx(
|
|
2772
|
+
/* @__PURE__ */ e.jsx(ks, {})
|
|
2749
2773
|
] })
|
|
2750
2774
|
] }),
|
|
2751
|
-
/* @__PURE__ */ e.jsx(
|
|
2775
|
+
/* @__PURE__ */ e.jsx(Bt, { mrs: r })
|
|
2752
2776
|
] }) : null;
|
|
2753
2777
|
}
|
|
2754
|
-
function
|
|
2778
|
+
function et({
|
|
2755
2779
|
state: t,
|
|
2756
2780
|
label: s,
|
|
2757
2781
|
detail: n
|
|
@@ -2766,7 +2790,7 @@ function Ze({
|
|
|
2766
2790
|
] })
|
|
2767
2791
|
] });
|
|
2768
2792
|
}
|
|
2769
|
-
function
|
|
2793
|
+
function Wr(t) {
|
|
2770
2794
|
const s = [];
|
|
2771
2795
|
let n = null;
|
|
2772
2796
|
for (const r of t.split(`
|
|
@@ -2774,8 +2798,8 @@ function Vr(t) {
|
|
|
2774
2798
|
r.startsWith("@@") ? (n = { header: r, lines: [] }, s.push(n)) : n && (r.startsWith("+") ? n.lines.push({ type: "add", content: r.slice(1) }) : r.startsWith("-") ? n.lines.push({ type: "remove", content: r.slice(1) }) : r.startsWith("\\") || n.lines.push({ type: "context", content: r.slice(1) }));
|
|
2775
2799
|
return s;
|
|
2776
2800
|
}
|
|
2777
|
-
function
|
|
2778
|
-
const [s, n] = h(!0), r =
|
|
2801
|
+
function Yr({ d: t }) {
|
|
2802
|
+
const [s, n] = h(!0), r = Wr(t.diff), a = t.new_file ? "A" : t.deleted_file ? "D" : t.renamed_file ? "R" : "M", i = a === "A" ? "text-green-400" : a === "D" ? "text-red-400" : a === "R" ? "text-blue-400" : "text-zinc-400";
|
|
2779
2803
|
return /* @__PURE__ */ e.jsxs("div", { className: "border border-zinc-700 rounded-lg overflow-hidden", children: [
|
|
2780
2804
|
/* @__PURE__ */ e.jsxs(
|
|
2781
2805
|
"button",
|
|
@@ -2791,28 +2815,28 @@ function Jr({ d: t }) {
|
|
|
2791
2815
|
),
|
|
2792
2816
|
s && /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto", children: r.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "text-xs text-zinc-500 px-3 py-2", children: "Binary or empty diff" }) : r.map((l, c) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2793
2817
|
/* @__PURE__ */ e.jsx("div", { className: "bg-zinc-900 px-3 py-0.5 text-xs font-mono text-zinc-500", children: l.header }),
|
|
2794
|
-
l.lines.map((
|
|
2818
|
+
l.lines.map((x, p) => /* @__PURE__ */ e.jsxs(
|
|
2795
2819
|
"div",
|
|
2796
2820
|
{
|
|
2797
|
-
className: `flex font-mono text-xs leading-5 ${
|
|
2821
|
+
className: `flex font-mono text-xs leading-5 ${x.type === "add" ? "bg-green-950/40 text-green-300" : x.type === "remove" ? "bg-red-950/40 text-red-300" : "text-zinc-400"}`,
|
|
2798
2822
|
children: [
|
|
2799
2823
|
/* @__PURE__ */ e.jsx(
|
|
2800
2824
|
"span",
|
|
2801
2825
|
{
|
|
2802
|
-
className: `select-none w-4 shrink-0 text-center ${
|
|
2803
|
-
children:
|
|
2826
|
+
className: `select-none w-4 shrink-0 text-center ${x.type === "add" ? "text-green-500" : x.type === "remove" ? "text-red-500" : "text-zinc-600"}`,
|
|
2827
|
+
children: x.type === "add" ? "+" : x.type === "remove" ? "−" : " "
|
|
2804
2828
|
}
|
|
2805
2829
|
),
|
|
2806
|
-
/* @__PURE__ */ e.jsx("span", { className: "pl-2 whitespace-pre", children:
|
|
2830
|
+
/* @__PURE__ */ e.jsx("span", { className: "pl-2 whitespace-pre", children: x.content })
|
|
2807
2831
|
]
|
|
2808
2832
|
},
|
|
2809
|
-
|
|
2833
|
+
p
|
|
2810
2834
|
))
|
|
2811
2835
|
] }, c)) })
|
|
2812
2836
|
] });
|
|
2813
2837
|
}
|
|
2814
|
-
function
|
|
2815
|
-
const [i, l] = h(null), [c,
|
|
2838
|
+
function Ss({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
2839
|
+
const [i, l] = h(null), [c, x] = h(!0), [p, d] = h(null), [j, f] = h(!1), [m, S] = h(null), [w, N] = h(!1), [k, z] = h(null), [$, K] = h(null), [Z, X] = h(null), [v, L] = h(!1), [V, te] = h(!1), [ne, de] = h(null), [I, J] = h(!1), [_, re] = h(null), [ae, ce] = h(!1), Q = oe(null), xe = oe(!1), g = oe(!1), P = n ? `?repo=${encodeURIComponent(n)}` : "", q = ht(async () => {
|
|
2816
2840
|
try {
|
|
2817
2841
|
const W = await window.fetch(`/api/forge/mr/${t}/detail${P}`, {
|
|
2818
2842
|
headers: { Authorization: `Bearer ${s}` }
|
|
@@ -2821,14 +2845,14 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2821
2845
|
throw W.status === 404 ? (xe.current = !0, Q.current && (clearInterval(Q.current), Q.current = null), new Error("MR not found — it may have been deleted or belongs to a different project")) : new Error(`MR API ${W.status}`);
|
|
2822
2846
|
const ie = await W.json();
|
|
2823
2847
|
if (xe.current) return;
|
|
2824
|
-
if (l(ie), d(null),
|
|
2848
|
+
if (l(ie), d(null), x(!1), ie.state === "merged" && !g.current) {
|
|
2825
2849
|
g.current = !0, Q.current && clearInterval(Q.current), Q.current = null, a == null || a();
|
|
2826
2850
|
return;
|
|
2827
2851
|
}
|
|
2828
2852
|
!ie.rebase_in_progress && Q.current && (clearInterval(Q.current), Q.current = null);
|
|
2829
2853
|
} catch (W) {
|
|
2830
2854
|
if (xe.current) return;
|
|
2831
|
-
d(W.message),
|
|
2855
|
+
d(W.message), x(!1);
|
|
2832
2856
|
}
|
|
2833
2857
|
}, [t, s, P]);
|
|
2834
2858
|
G(() => (xe.current = !1, q(), () => {
|
|
@@ -2881,8 +2905,8 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2881
2905
|
body: Te ? JSON.stringify(Te) : void 0
|
|
2882
2906
|
});
|
|
2883
2907
|
if (!ye.ok) {
|
|
2884
|
-
const
|
|
2885
|
-
throw new Error(
|
|
2908
|
+
const Me = await ye.text().catch(() => "");
|
|
2909
|
+
throw new Error(Me || `${ie} API ${ye.status}`);
|
|
2886
2910
|
}
|
|
2887
2911
|
await q();
|
|
2888
2912
|
} catch (ye) {
|
|
@@ -2912,10 +2936,10 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2912
2936
|
/* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-zinc-500 border-t-transparent animate-spin inline-block shrink-0" }),
|
|
2913
2937
|
"Loading MR status…"
|
|
2914
2938
|
] });
|
|
2915
|
-
if (
|
|
2939
|
+
if (p || !i)
|
|
2916
2940
|
return /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-zinc-500 py-1", children: [
|
|
2917
2941
|
"Could not load MR status",
|
|
2918
|
-
|
|
2942
|
+
p ? ` — ${p}` : "",
|
|
2919
2943
|
"."
|
|
2920
2944
|
] });
|
|
2921
2945
|
const Re = i.has_conflicts || i.detailed_merge_status === "need_rebase" || i.merge_status === "cannot_be_merged";
|
|
@@ -2953,7 +2977,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2953
2977
|
] })
|
|
2954
2978
|
] }),
|
|
2955
2979
|
i.state === "opened" && !i.rebase_in_progress && (() => {
|
|
2956
|
-
const W = r === "failed" || r === "canceled", ye = r === "success" ? "ok" : W ? "fail" : r === "running" || r === "pending" || r === "created" ? "pending" : "neutral",
|
|
2980
|
+
const W = r === "failed" || r === "canceled", ye = r === "success" ? "ok" : W ? "fail" : r === "running" || r === "pending" || r === "created" ? "pending" : "neutral", Me = i.draft ? "Marked as draft" : i.has_conflicts ? "Has merge conflicts" : Re ? "Needs rebase" : W ? "CI pipeline failed" : null, Be = !Me;
|
|
2957
2981
|
return /* @__PURE__ */ e.jsxs("div", { className: "bg-zinc-800/50 border border-zinc-700 rounded-lg overflow-hidden", children: [
|
|
2958
2982
|
/* @__PURE__ */ e.jsxs("div", { className: "px-4 py-2.5 border-b border-zinc-700 flex items-center justify-between", children: [
|
|
2959
2983
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: i.draft ? /* @__PURE__ */ e.jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs font-medium bg-zinc-700 text-zinc-300 px-2 py-0.5 rounded", children: [
|
|
@@ -2967,7 +2991,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2967
2991
|
"button",
|
|
2968
2992
|
{
|
|
2969
2993
|
onClick: ve,
|
|
2970
|
-
disabled: w || !
|
|
2994
|
+
disabled: w || !Be,
|
|
2971
2995
|
className: i.merge_when_pipeline_succeeds ? "text-xs text-zinc-500 hover:text-zinc-300 disabled:opacity-40 transition-colors" : "text-xs text-violet-400 hover:text-violet-200 disabled:opacity-40 transition-colors",
|
|
2972
2996
|
title: i.merge_when_pipeline_succeeds ? "Cancel the pending auto-merge" : "Queue this MR to merge automatically when the pipeline passes",
|
|
2973
2997
|
children: w ? "…" : i.merge_when_pipeline_succeeds ? "Cancel auto-merge" : "Set auto-merge"
|
|
@@ -2976,7 +3000,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2976
3000
|
] }),
|
|
2977
3001
|
/* @__PURE__ */ e.jsxs("div", { className: "px-4 py-3 border-b border-zinc-700 flex flex-col gap-1", children: [
|
|
2978
3002
|
/* @__PURE__ */ e.jsx(
|
|
2979
|
-
|
|
3003
|
+
et,
|
|
2980
3004
|
{
|
|
2981
3005
|
state: ye,
|
|
2982
3006
|
label: "CI pipeline",
|
|
@@ -2984,21 +3008,21 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
2984
3008
|
}
|
|
2985
3009
|
),
|
|
2986
3010
|
/* @__PURE__ */ e.jsx(
|
|
2987
|
-
|
|
3011
|
+
et,
|
|
2988
3012
|
{
|
|
2989
3013
|
state: i.has_conflicts ? "fail" : "ok",
|
|
2990
3014
|
label: i.has_conflicts ? "Merge conflicts" : "No merge conflicts"
|
|
2991
3015
|
}
|
|
2992
3016
|
),
|
|
2993
3017
|
/* @__PURE__ */ e.jsx(
|
|
2994
|
-
|
|
3018
|
+
et,
|
|
2995
3019
|
{
|
|
2996
3020
|
state: Re ? "fail" : "ok",
|
|
2997
3021
|
label: Re ? "Rebase required" : "Branch up to date"
|
|
2998
3022
|
}
|
|
2999
3023
|
),
|
|
3000
3024
|
i.draft && /* @__PURE__ */ e.jsx(
|
|
3001
|
-
|
|
3025
|
+
et,
|
|
3002
3026
|
{
|
|
3003
3027
|
state: "fail",
|
|
3004
3028
|
label: "Marked as draft",
|
|
@@ -3006,7 +3030,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
3006
3030
|
}
|
|
3007
3031
|
),
|
|
3008
3032
|
i.merge_when_pipeline_succeeds && /* @__PURE__ */ e.jsx(
|
|
3009
|
-
|
|
3033
|
+
et,
|
|
3010
3034
|
{
|
|
3011
3035
|
state: "pending",
|
|
3012
3036
|
label: "Auto-merge queued",
|
|
@@ -3061,7 +3085,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
3061
3085
|
}
|
|
3062
3086
|
)
|
|
3063
3087
|
] }),
|
|
3064
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children:
|
|
3088
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: Be ? v ? /* @__PURE__ */ e.jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
3065
3089
|
/* @__PURE__ */ e.jsx(
|
|
3066
3090
|
"button",
|
|
3067
3091
|
{
|
|
@@ -3093,7 +3117,7 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
3093
3117
|
}
|
|
3094
3118
|
) : /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-zinc-500", children: [
|
|
3095
3119
|
"Can't merge — ",
|
|
3096
|
-
|
|
3120
|
+
Me
|
|
3097
3121
|
] }) })
|
|
3098
3122
|
] })
|
|
3099
3123
|
] });
|
|
@@ -3123,12 +3147,12 @@ function Rs({ mrIid: t, token: s, repo: n, pipelineStatus: r, onMerged: a }) {
|
|
|
3123
3147
|
] }),
|
|
3124
3148
|
_ && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-400", children: _ }),
|
|
3125
3149
|
ne && ne.length === 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-zinc-500", children: "No changes in this MR." }),
|
|
3126
|
-
ne && ne.map((W, ie) => /* @__PURE__ */ e.jsx(
|
|
3150
|
+
ne && ne.map((W, ie) => /* @__PURE__ */ e.jsx(Yr, { d: W }, ie))
|
|
3127
3151
|
] })
|
|
3128
3152
|
] })
|
|
3129
3153
|
] });
|
|
3130
3154
|
}
|
|
3131
|
-
const
|
|
3155
|
+
const Gr = {
|
|
3132
3156
|
success: "text-green-400",
|
|
3133
3157
|
failed: "text-red-400",
|
|
3134
3158
|
running: "text-yellow-400",
|
|
@@ -3140,7 +3164,7 @@ const qr = {
|
|
|
3140
3164
|
preparing: "text-zinc-400",
|
|
3141
3165
|
scheduled: "text-zinc-400",
|
|
3142
3166
|
manual: "text-blue-400"
|
|
3143
|
-
},
|
|
3167
|
+
}, Kr = {
|
|
3144
3168
|
success: "✓",
|
|
3145
3169
|
failed: "✗",
|
|
3146
3170
|
running: "◎",
|
|
@@ -3149,14 +3173,14 @@ const qr = {
|
|
|
3149
3173
|
skipped: "→",
|
|
3150
3174
|
created: "○",
|
|
3151
3175
|
manual: "⊡"
|
|
3152
|
-
},
|
|
3153
|
-
function
|
|
3154
|
-
return
|
|
3176
|
+
}, fs = /* @__PURE__ */ new Set(["success", "failed", "canceled"]);
|
|
3177
|
+
function At(t) {
|
|
3178
|
+
return Gr[t] ?? "text-zinc-400";
|
|
3155
3179
|
}
|
|
3156
|
-
function
|
|
3157
|
-
return
|
|
3180
|
+
function ms(t) {
|
|
3181
|
+
return Kr[t] ?? "○";
|
|
3158
3182
|
}
|
|
3159
|
-
function
|
|
3183
|
+
function Xr(t) {
|
|
3160
3184
|
const s = /* @__PURE__ */ new Map();
|
|
3161
3185
|
return t.forEach((n) => {
|
|
3162
3186
|
s.has(n.stage) || s.set(n.stage, []), s.get(n.stage).push(n);
|
|
@@ -3169,7 +3193,7 @@ function tt({
|
|
|
3169
3193
|
onRefinePipelineFailure: r,
|
|
3170
3194
|
onStatusChange: a
|
|
3171
3195
|
}) {
|
|
3172
|
-
const [i, l] = h(null), [c,
|
|
3196
|
+
const [i, l] = h(null), [c, x] = h([]), [p, d] = h(!0), [j, f] = h(null), [m, S] = h(""), [w, N] = h({}), [k, z] = h({}), $ = oe(!1), K = oe(null), Z = oe(!1), X = oe(null), v = oe(a);
|
|
3173
3197
|
G(() => {
|
|
3174
3198
|
v.current = a;
|
|
3175
3199
|
}, [a]);
|
|
@@ -3184,9 +3208,9 @@ function tt({
|
|
|
3184
3208
|
if (clearTimeout(J), !Q.ok) throw new Error(`Pipeline API ${Q.status}`);
|
|
3185
3209
|
const xe = await Q.json();
|
|
3186
3210
|
if ($.current) return;
|
|
3187
|
-
l(xe.pipeline ?? null),
|
|
3211
|
+
l(xe.pipeline ?? null), x(xe.jobs ?? []), f(null), d(!1);
|
|
3188
3212
|
const g = ((_ = xe.pipeline) == null ? void 0 : _.status) ?? null;
|
|
3189
|
-
g !== X.current && (X.current = g, (re = v.current) == null || re.call(v, g)), xe.pipeline &&
|
|
3213
|
+
g !== X.current && (X.current = g, (re = v.current) == null || re.call(v, g)), xe.pipeline && fs.has(xe.pipeline.status) && ($.current = !0, K.current && clearInterval(K.current), xe.pipeline.status === "failed" && !Z.current && (Z.current = !0, (xe.jobs ?? []).filter(
|
|
3190
3214
|
(q) => q.status === "failed"
|
|
3191
3215
|
).forEach((q) => {
|
|
3192
3216
|
window.fetch(`/api/forge/jobs/${q.id}/trace`, {
|
|
@@ -3232,7 +3256,7 @@ function tt({
|
|
|
3232
3256
|
z((J) => ({ ...J, [I]: !1 }));
|
|
3233
3257
|
}
|
|
3234
3258
|
}, te = c.filter((I) => I.status === "failed");
|
|
3235
|
-
if (
|
|
3259
|
+
if (p)
|
|
3236
3260
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 py-4 text-sm text-zinc-500", children: [
|
|
3237
3261
|
/* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-zinc-500 border-t-transparent animate-spin inline-block shrink-0" }),
|
|
3238
3262
|
"Waiting for pipeline..."
|
|
@@ -3259,15 +3283,15 @@ function tt({
|
|
|
3259
3283
|
/* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-zinc-600 border-t-transparent animate-spin inline-block shrink-0" }),
|
|
3260
3284
|
"Waiting for pipeline to start..."
|
|
3261
3285
|
] });
|
|
3262
|
-
const ne =
|
|
3286
|
+
const ne = Xr(c), de = i.status === "failed";
|
|
3263
3287
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
3264
3288
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3265
3289
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3266
|
-
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-sm ${
|
|
3290
|
+
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-sm ${At(i.status)}`, children: i.status === "running" ? /* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-yellow-400 border-t-transparent animate-spin inline-block" }) : ms(i.status) }),
|
|
3267
3291
|
/* @__PURE__ */ e.jsx(
|
|
3268
3292
|
"span",
|
|
3269
3293
|
{
|
|
3270
|
-
className: `text-sm font-medium capitalize ${
|
|
3294
|
+
className: `text-sm font-medium capitalize ${At(i.status)}`,
|
|
3271
3295
|
children: i.status
|
|
3272
3296
|
}
|
|
3273
3297
|
),
|
|
@@ -3342,8 +3366,8 @@ function tt({
|
|
|
3342
3366
|
/* @__PURE__ */ e.jsx(
|
|
3343
3367
|
"span",
|
|
3344
3368
|
{
|
|
3345
|
-
className: `font-mono text-sm w-4 ${
|
|
3346
|
-
children: _.status === "running" ? /* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-yellow-400 border-t-transparent animate-spin inline-block" }) :
|
|
3369
|
+
className: `font-mono text-sm w-4 ${At(_.status)}`,
|
|
3370
|
+
children: _.status === "running" ? /* @__PURE__ */ e.jsx("span", { className: "w-3 h-3 rounded-full border-2 border-yellow-400 border-t-transparent animate-spin inline-block" }) : ms(_.status)
|
|
3347
3371
|
}
|
|
3348
3372
|
),
|
|
3349
3373
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3360,7 +3384,7 @@ function tt({
|
|
|
3360
3384
|
Math.round(_.duration),
|
|
3361
3385
|
"s"
|
|
3362
3386
|
] }),
|
|
3363
|
-
|
|
3387
|
+
fs.has(_.status) && /* @__PURE__ */ e.jsx(
|
|
3364
3388
|
"button",
|
|
3365
3389
|
{
|
|
3366
3390
|
onClick: () => V(_.id),
|
|
@@ -3370,12 +3394,12 @@ function tt({
|
|
|
3370
3394
|
)
|
|
3371
3395
|
] }),
|
|
3372
3396
|
w[_.id] !== void 0 && /* @__PURE__ */ e.jsx("div", { className: "border border-zinc-800 border-t-0 rounded-b overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
3373
|
-
|
|
3397
|
+
Nt,
|
|
3374
3398
|
{
|
|
3375
3399
|
variant: "embedded",
|
|
3376
3400
|
autoScroll: !1,
|
|
3377
3401
|
heightClass: "max-h-64",
|
|
3378
|
-
entries:
|
|
3402
|
+
entries: yr(
|
|
3379
3403
|
w[_.id].split(`
|
|
3380
3404
|
`).slice(-200).join(`
|
|
3381
3405
|
`)
|
|
@@ -3387,10 +3411,10 @@ function tt({
|
|
|
3387
3411
|
] }, I))
|
|
3388
3412
|
] });
|
|
3389
3413
|
}
|
|
3390
|
-
function
|
|
3414
|
+
function Hr(t) {
|
|
3391
3415
|
return t.replicas.ready === 0 ? "down" : t.replicas.ready < t.replicas.desired ? "degraded" : t.replicas.updated < t.replicas.desired ? "updating" : "healthy";
|
|
3392
3416
|
}
|
|
3393
|
-
const
|
|
3417
|
+
const Qr = {
|
|
3394
3418
|
healthy: { dot: "bg-green-400", label: "Healthy", text: "text-green-400" },
|
|
3395
3419
|
updating: {
|
|
3396
3420
|
dot: "bg-yellow-400 animate-pulse",
|
|
@@ -3404,10 +3428,10 @@ const Kr = {
|
|
|
3404
3428
|
},
|
|
3405
3429
|
down: { dot: "bg-red-400", label: "Down", text: "text-red-400" }
|
|
3406
3430
|
};
|
|
3407
|
-
function
|
|
3408
|
-
const [s, n] = h([]), [r, a] = h(!0), [i, l] = h(null), [c,
|
|
3431
|
+
function Zr({ token: t }) {
|
|
3432
|
+
const [s, n] = h([]), [r, a] = h(!0), [i, l] = h(null), [c, x] = h(null);
|
|
3409
3433
|
return G(() => {
|
|
3410
|
-
let
|
|
3434
|
+
let p = !1;
|
|
3411
3435
|
const d = async () => {
|
|
3412
3436
|
try {
|
|
3413
3437
|
const f = await window.fetch("/api/forge/rollout", {
|
|
@@ -3415,20 +3439,20 @@ function Xr({ token: t }) {
|
|
|
3415
3439
|
});
|
|
3416
3440
|
if (!f.ok) throw new Error(`${f.status}`);
|
|
3417
3441
|
const m = await f.json();
|
|
3418
|
-
if (
|
|
3419
|
-
n(m.deployments ?? []),
|
|
3442
|
+
if (p) return;
|
|
3443
|
+
n(m.deployments ?? []), x(/* @__PURE__ */ new Date()), l(null);
|
|
3420
3444
|
} catch (f) {
|
|
3421
|
-
|
|
3445
|
+
p || l(f.message);
|
|
3422
3446
|
} finally {
|
|
3423
|
-
|
|
3447
|
+
p || a(!1);
|
|
3424
3448
|
}
|
|
3425
3449
|
};
|
|
3426
3450
|
d();
|
|
3427
3451
|
const j = setInterval(d, 1e4);
|
|
3428
3452
|
return () => {
|
|
3429
|
-
|
|
3453
|
+
p = !0, clearInterval(j);
|
|
3430
3454
|
};
|
|
3431
|
-
}, [t]), r ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: Array.from({ length: 3 }).map((
|
|
3455
|
+
}, [t]), r ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: Array.from({ length: 3 }).map((p, d) => /* @__PURE__ */ e.jsx("div", { className: "h-14 bg-zinc-800 rounded-lg animate-pulse" }, d)) }) : i ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-zinc-500 text-center py-4", children: [
|
|
3432
3456
|
"K8s rollout unavailable — ",
|
|
3433
3457
|
i
|
|
3434
3458
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
@@ -3439,9 +3463,9 @@ function Xr({ token: t }) {
|
|
|
3439
3463
|
c.toLocaleTimeString()
|
|
3440
3464
|
] })
|
|
3441
3465
|
] }),
|
|
3442
|
-
s.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-zinc-500 text-center py-4", children: "No deployments found in test namespace." }) : s.map((
|
|
3466
|
+
s.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-zinc-500 text-center py-4", children: "No deployments found in test namespace." }) : s.map((p) => {
|
|
3443
3467
|
var m;
|
|
3444
|
-
const d =
|
|
3468
|
+
const d = Hr(p), j = Qr[d], f = ((m = p.image) == null ? void 0 : m.split(":")[1]) ?? p.image;
|
|
3445
3469
|
return /* @__PURE__ */ e.jsxs(
|
|
3446
3470
|
"div",
|
|
3447
3471
|
{
|
|
@@ -3449,26 +3473,26 @@ function Xr({ token: t }) {
|
|
|
3449
3473
|
children: [
|
|
3450
3474
|
/* @__PURE__ */ e.jsx("span", { className: `w-2 h-2 rounded-full shrink-0 ${j.dot}` }),
|
|
3451
3475
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3452
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-white font-medium", children:
|
|
3476
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-white font-medium", children: p.name }),
|
|
3453
3477
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-zinc-500 font-mono truncate mt-0.5", children: f })
|
|
3454
3478
|
] }),
|
|
3455
3479
|
/* @__PURE__ */ e.jsxs("div", { className: "text-right shrink-0", children: [
|
|
3456
3480
|
/* @__PURE__ */ e.jsx("p", { className: `text-sm font-medium ${j.text}`, children: j.label }),
|
|
3457
3481
|
/* @__PURE__ */ e.jsxs("p", { className: "text-xs text-zinc-500", children: [
|
|
3458
|
-
|
|
3482
|
+
p.replicas.ready,
|
|
3459
3483
|
"/",
|
|
3460
|
-
|
|
3484
|
+
p.replicas.desired,
|
|
3461
3485
|
" ready"
|
|
3462
3486
|
] })
|
|
3463
3487
|
] })
|
|
3464
3488
|
]
|
|
3465
3489
|
},
|
|
3466
|
-
|
|
3490
|
+
p.name
|
|
3467
3491
|
);
|
|
3468
3492
|
})
|
|
3469
3493
|
] });
|
|
3470
3494
|
}
|
|
3471
|
-
function
|
|
3495
|
+
function Cs({ showTryAgain: t = !1 }) {
|
|
3472
3496
|
const { resolutionCheck: s, resolutionChecking: n, resolutionError: r } = le(), { handleCheckResolution: a, handleBeginAnalysis: i } = pe();
|
|
3473
3497
|
return s ? /* @__PURE__ */ e.jsxs(
|
|
3474
3498
|
"div",
|
|
@@ -3530,7 +3554,7 @@ function Ss({ showTryAgain: t = !1 }) {
|
|
|
3530
3554
|
r && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-red-400", children: r })
|
|
3531
3555
|
] });
|
|
3532
3556
|
}
|
|
3533
|
-
function
|
|
3557
|
+
function ea() {
|
|
3534
3558
|
const {
|
|
3535
3559
|
applyResult: t,
|
|
3536
3560
|
selectedIssue: s,
|
|
@@ -3540,8 +3564,8 @@ function Hr() {
|
|
|
3540
3564
|
applyError: i,
|
|
3541
3565
|
mergedMrs: l,
|
|
3542
3566
|
availableRepos: c,
|
|
3543
|
-
selectedRepo:
|
|
3544
|
-
} = le(), { handleRefinePipelineFailure:
|
|
3567
|
+
selectedRepo: x
|
|
3568
|
+
} = le(), { handleRefinePipelineFailure: p, handlePromoteBranch: d, getToken: j } = pe(), { mrMerged: f, setMrMerged: m } = $e(), [S, w] = h({});
|
|
3545
3569
|
if (!t) return null;
|
|
3546
3570
|
const N = new Set(t.applications.map((z) => z.repo)), k = N.size > 1;
|
|
3547
3571
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-8", children: [
|
|
@@ -3601,7 +3625,7 @@ function Hr() {
|
|
|
3601
3625
|
z.mr && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3602
3626
|
/* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "MR Status" }),
|
|
3603
3627
|
/* @__PURE__ */ e.jsx(
|
|
3604
|
-
|
|
3628
|
+
Ss,
|
|
3605
3629
|
{
|
|
3606
3630
|
mrIid: z.mr.iid,
|
|
3607
3631
|
token: j(),
|
|
@@ -3620,7 +3644,7 @@ function Hr() {
|
|
|
3620
3644
|
endpoint: z.mr ? `mr/${z.mr.iid}/pipeline` : `branch-pipeline?branch=${encodeURIComponent(z.branchName)}`,
|
|
3621
3645
|
token: j(),
|
|
3622
3646
|
repo: z.repo,
|
|
3623
|
-
onRefinePipelineFailure:
|
|
3647
|
+
onRefinePipelineFailure: p,
|
|
3624
3648
|
onStatusChange: z.mr ? void 0 : (X) => w((v) => ({
|
|
3625
3649
|
...v,
|
|
3626
3650
|
[`${z.repo}:${z.branchName}`]: X ?? ""
|
|
@@ -3633,7 +3657,7 @@ function Hr() {
|
|
|
3633
3657
|
r && s && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3634
3658
|
/* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "CI Fix in Progress" }),
|
|
3635
3659
|
/* @__PURE__ */ e.jsx(
|
|
3636
|
-
|
|
3660
|
+
zs,
|
|
3637
3661
|
{
|
|
3638
3662
|
steps: n,
|
|
3639
3663
|
logs: [],
|
|
@@ -3652,23 +3676,23 @@ function Hr() {
|
|
|
3652
3676
|
{
|
|
3653
3677
|
endpoint: `issues/${s.iid}/post-merge-pipeline`,
|
|
3654
3678
|
token: j(),
|
|
3655
|
-
repo:
|
|
3656
|
-
onRefinePipelineFailure:
|
|
3679
|
+
repo: x || void 0,
|
|
3680
|
+
onRefinePipelineFailure: p
|
|
3657
3681
|
}
|
|
3658
3682
|
)
|
|
3659
3683
|
] }),
|
|
3660
3684
|
s && f && !r && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3661
3685
|
/* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "Resolution" }),
|
|
3662
|
-
/* @__PURE__ */ e.jsx(
|
|
3686
|
+
/* @__PURE__ */ e.jsx(Cs, { showTryAgain: !0 })
|
|
3663
3687
|
] }),
|
|
3664
3688
|
!r && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3665
3689
|
/* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "Test Rollout" }),
|
|
3666
|
-
/* @__PURE__ */ e.jsx(
|
|
3690
|
+
/* @__PURE__ */ e.jsx(Zr, { token: j() })
|
|
3667
3691
|
] }),
|
|
3668
|
-
/* @__PURE__ */ e.jsx(
|
|
3692
|
+
/* @__PURE__ */ e.jsx(Bt, { mrs: l })
|
|
3669
3693
|
] });
|
|
3670
3694
|
}
|
|
3671
|
-
function
|
|
3695
|
+
function Ts({ tabs: t, active: s, onSelect: n }) {
|
|
3672
3696
|
return /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 bg-zinc-800/60 rounded-lg p-1 self-start", children: t.map((r) => {
|
|
3673
3697
|
const a = s === r.id;
|
|
3674
3698
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -3685,8 +3709,8 @@ function Cs({ tabs: t, active: s, onSelect: n }) {
|
|
|
3685
3709
|
);
|
|
3686
3710
|
}) });
|
|
3687
3711
|
}
|
|
3688
|
-
function
|
|
3689
|
-
const { applyResult: t, selectedIssue: s } = le(), { activeDetailTab: n, setActiveDetailTab: r } = $e(), a =
|
|
3712
|
+
function ta() {
|
|
3713
|
+
const { applyResult: t, selectedIssue: s } = le(), { activeDetailTab: n, setActiveDetailTab: r } = $e(), { navigate: a } = Pe();
|
|
3690
3714
|
if (!t) return null;
|
|
3691
3715
|
const i = (d) => {
|
|
3692
3716
|
if (!s) return;
|
|
@@ -3700,17 +3724,17 @@ function Qr() {
|
|
|
3700
3724
|
className: `text-xs px-1.5 py-0.5 rounded-full ${n === "mr" ? "bg-zinc-600 text-zinc-300" : "bg-violet-600/40 text-violet-300"}`,
|
|
3701
3725
|
children: l.length > 1 ? `${l.length} MRs` : l[0].mr ? `!${l[0].mr.iid}` : "branch"
|
|
3702
3726
|
}
|
|
3703
|
-
),
|
|
3727
|
+
), x = [
|
|
3704
3728
|
{ id: "issue", label: "Issue" },
|
|
3705
3729
|
{ id: "mr", label: "Pipeline", badge: c || void 0 }
|
|
3706
|
-
],
|
|
3730
|
+
], p = n === "mr" || !s;
|
|
3707
3731
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-4xl mx-auto w-full flex flex-col gap-6", children: [
|
|
3708
|
-
s && /* @__PURE__ */ e.jsx(
|
|
3709
|
-
n === "issue" && s && /* @__PURE__ */ e.jsx(
|
|
3710
|
-
|
|
3732
|
+
s && /* @__PURE__ */ e.jsx(Ts, { tabs: x, active: n, onSelect: i }),
|
|
3733
|
+
n === "issue" && s && /* @__PURE__ */ e.jsx(qr, {}),
|
|
3734
|
+
p && /* @__PURE__ */ e.jsx(ea, {})
|
|
3711
3735
|
] });
|
|
3712
3736
|
}
|
|
3713
|
-
function
|
|
3737
|
+
function _s(t, s) {
|
|
3714
3738
|
const n = t.split(`
|
|
3715
3739
|
`), r = s.split(`
|
|
3716
3740
|
`), a = n.length, i = r.length, l = Array.from({ length: a + 1 }, () => new Array(i + 1).fill(0));
|
|
@@ -3718,12 +3742,12 @@ function Ts(t, s) {
|
|
|
3718
3742
|
for (let j = 1; j <= i; j++)
|
|
3719
3743
|
l[d][j] = n[d - 1] === r[j - 1] ? l[d - 1][j - 1] + 1 : Math.max(l[d - 1][j], l[d][j - 1]);
|
|
3720
3744
|
const c = [];
|
|
3721
|
-
let
|
|
3722
|
-
for (;
|
|
3723
|
-
|
|
3724
|
-
return
|
|
3745
|
+
let x = a, p = i;
|
|
3746
|
+
for (; x > 0 || p > 0; )
|
|
3747
|
+
x > 0 && p > 0 && n[x - 1] === r[p - 1] ? (c.unshift({ type: "context", text: n[x - 1] }), x--, p--) : p > 0 && (x === 0 || l[x][p - 1] >= l[x - 1][p]) ? (c.unshift({ type: "add", text: r[p - 1] }), p--) : (c.unshift({ type: "remove", text: n[x - 1] }), x--);
|
|
3748
|
+
return sa(c);
|
|
3725
3749
|
}
|
|
3726
|
-
function
|
|
3750
|
+
function sa(t) {
|
|
3727
3751
|
const n = /* @__PURE__ */ new Set();
|
|
3728
3752
|
t.forEach((l, c) => {
|
|
3729
3753
|
l.type !== "context" && n.add(c);
|
|
@@ -3739,8 +3763,8 @@ function Zr(t) {
|
|
|
3739
3763
|
r.has(c) ? (i || a.push({ type: "context", text: "..." }), a.push(l), i = !0) : i = !1;
|
|
3740
3764
|
}), a;
|
|
3741
3765
|
}
|
|
3742
|
-
function
|
|
3743
|
-
const [s, n] = h(!0), r = t.action === "modify" && t.original ?
|
|
3766
|
+
function na({ change: t }) {
|
|
3767
|
+
const [s, n] = h(!0), r = t.action === "modify" && t.original ? _s(t.original, t.proposed) : t.action === "create" ? t.proposed.split(`
|
|
3744
3768
|
`).map((c) => ({ type: "add", text: c })) : t.original ? t.original.split(`
|
|
3745
3769
|
`).map((c) => ({ type: "remove", text: c })) : [], a = t.action === "create" ? "text-green-400" : t.action === "delete" ? "text-red-400" : "text-yellow-400", i = r.filter((c) => c.type === "add").length, l = r.filter((c) => c.type === "remove").length;
|
|
3746
3770
|
return /* @__PURE__ */ e.jsxs("div", { className: "border border-zinc-700 rounded-lg overflow-hidden", children: [
|
|
@@ -3765,7 +3789,7 @@ function ea({ change: t }) {
|
|
|
3765
3789
|
}
|
|
3766
3790
|
),
|
|
3767
3791
|
/* @__PURE__ */ e.jsx("div", { className: "px-4 py-1.5 bg-zinc-900 border-t border-zinc-700 text-xs text-zinc-400", children: t.summary }),
|
|
3768
|
-
s && /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ e.jsx("table", { className: "w-full text-xs font-mono border-collapse", children: /* @__PURE__ */ e.jsx("tbody", { children: r.map((c,
|
|
3792
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ e.jsx("table", { className: "w-full text-xs font-mono border-collapse", children: /* @__PURE__ */ e.jsx("tbody", { children: r.map((c, x) => /* @__PURE__ */ e.jsxs(
|
|
3769
3793
|
"tr",
|
|
3770
3794
|
{
|
|
3771
3795
|
className: c.type === "add" ? "bg-green-950/40" : c.type === "remove" ? "bg-red-950/40" : "",
|
|
@@ -3780,15 +3804,15 @@ function ea({ change: t }) {
|
|
|
3780
3804
|
)
|
|
3781
3805
|
]
|
|
3782
3806
|
},
|
|
3783
|
-
|
|
3807
|
+
x
|
|
3784
3808
|
)) }) }) })
|
|
3785
3809
|
] });
|
|
3786
3810
|
}
|
|
3787
|
-
function
|
|
3811
|
+
function ra(t, s) {
|
|
3788
3812
|
const n = s == null ? void 0 : s.find((r) => r.id === t);
|
|
3789
3813
|
return (n == null ? void 0 : n.label) ?? t.split("/").pop() ?? t;
|
|
3790
3814
|
}
|
|
3791
|
-
function
|
|
3815
|
+
function aa(t, s, n) {
|
|
3792
3816
|
const r = /* @__PURE__ */ new Map();
|
|
3793
3817
|
for (const a of t) {
|
|
3794
3818
|
const i = a.repo || "(unknown)", l = r.get(i) ?? [];
|
|
@@ -3796,30 +3820,30 @@ function sa(t, s, n) {
|
|
|
3796
3820
|
}
|
|
3797
3821
|
return Array.from(r.entries()).map(([a, i]) => {
|
|
3798
3822
|
let l = 0, c = 0;
|
|
3799
|
-
for (const
|
|
3800
|
-
if (
|
|
3801
|
-
l +=
|
|
3823
|
+
for (const p of i)
|
|
3824
|
+
if (p.action === "create" && p.proposed)
|
|
3825
|
+
l += p.proposed.split(`
|
|
3802
3826
|
`).length;
|
|
3803
|
-
else if (
|
|
3804
|
-
c +=
|
|
3827
|
+
else if (p.action === "delete" && p.original)
|
|
3828
|
+
c += p.original.split(`
|
|
3805
3829
|
`).length;
|
|
3806
|
-
else if (
|
|
3807
|
-
const d =
|
|
3830
|
+
else if (p.action === "modify" && p.original) {
|
|
3831
|
+
const d = _s(p.original, p.proposed);
|
|
3808
3832
|
for (const j of d)
|
|
3809
3833
|
j.type === "add" ? l++ : j.type === "remove" && c++;
|
|
3810
3834
|
}
|
|
3811
|
-
const
|
|
3835
|
+
const x = n == null ? void 0 : n.find((p) => p.repo === a);
|
|
3812
3836
|
return {
|
|
3813
3837
|
repo: a,
|
|
3814
|
-
label:
|
|
3838
|
+
label: ra(a, s),
|
|
3815
3839
|
changes: i,
|
|
3816
3840
|
adds: l,
|
|
3817
3841
|
removes: c,
|
|
3818
|
-
existingBranch:
|
|
3842
|
+
existingBranch: x == null ? void 0 : x.branchName
|
|
3819
3843
|
};
|
|
3820
3844
|
});
|
|
3821
3845
|
}
|
|
3822
|
-
function
|
|
3846
|
+
function ia({
|
|
3823
3847
|
explanation: t,
|
|
3824
3848
|
changes: s,
|
|
3825
3849
|
existingApplications: n,
|
|
@@ -3828,8 +3852,8 @@ function na({
|
|
|
3828
3852
|
onDeployBranch: i,
|
|
3829
3853
|
onCommitToBranch: l,
|
|
3830
3854
|
onReject: c,
|
|
3831
|
-
onRefine:
|
|
3832
|
-
onUndoRefine:
|
|
3855
|
+
onRefine: x,
|
|
3856
|
+
onUndoRefine: p,
|
|
3833
3857
|
refineThread: d = [],
|
|
3834
3858
|
refineQueue: j = [],
|
|
3835
3859
|
thinkingLogs: f = [],
|
|
@@ -3838,11 +3862,11 @@ function na({
|
|
|
3838
3862
|
validationStatus: w = "idle"
|
|
3839
3863
|
}) {
|
|
3840
3864
|
var J;
|
|
3841
|
-
const [N, k] = h(""), [z, $] = h(!1), [K, Z] = h(/* @__PURE__ */ new Set()), X =
|
|
3842
|
-
() =>
|
|
3865
|
+
const [N, k] = h(""), [z, $] = h(!1), [K, Z] = h(/* @__PURE__ */ new Set()), X = Oe(
|
|
3866
|
+
() => aa(s, r, n),
|
|
3843
3867
|
[s, r, n]
|
|
3844
3868
|
), v = m || S, L = X.length > 1, V = X.every((_) => _.existingBranch), te = X.some((_) => _.existingBranch), ne = w !== "passed" && !z, de = v || ne, I = () => {
|
|
3845
|
-
N.trim() && (
|
|
3869
|
+
N.trim() && (x(N.trim()), k(""));
|
|
3846
3870
|
};
|
|
3847
3871
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
3848
3872
|
/* @__PURE__ */ e.jsx("div", { className: "bg-zinc-800 border border-zinc-700 rounded-lg px-4 py-3 text-sm text-zinc-300 leading-relaxed", children: t }),
|
|
@@ -3885,7 +3909,7 @@ function na({
|
|
|
3885
3909
|
_.existingBranch && /* @__PURE__ */ e.jsx("span", { className: "ml-2 text-[10px] uppercase tracking-wide bg-violet-900/40 text-violet-300 px-1.5 py-0.5 rounded font-mono", children: "branch open" })
|
|
3886
3910
|
] })
|
|
3887
3911
|
] }),
|
|
3888
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: _.changes.map((re) => /* @__PURE__ */ e.jsx(
|
|
3912
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: _.changes.map((re) => /* @__PURE__ */ e.jsx(na, { change: re }, `${_.repo}:${re.file}`)) })
|
|
3889
3913
|
] }, _.repo)) }),
|
|
3890
3914
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 border border-zinc-700 rounded-lg px-4 py-3 bg-zinc-900", children: [
|
|
3891
3915
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3902,7 +3926,7 @@ function na({
|
|
|
3902
3926
|
const ge = new Set(H);
|
|
3903
3927
|
return ge.has(re) ? ge.delete(re) : ge.add(re), ge;
|
|
3904
3928
|
});
|
|
3905
|
-
}, ve = Q && !!_.prevResult && !!
|
|
3929
|
+
}, ve = Q && !!_.prevResult && !!p && !v, ke = ce && !v;
|
|
3906
3930
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
3907
3931
|
/* @__PURE__ */ e.jsxs("div", { className: "text-xs text-zinc-500", children: [
|
|
3908
3932
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-1.5", children: [
|
|
@@ -3936,7 +3960,7 @@ function na({
|
|
|
3936
3960
|
ve && /* @__PURE__ */ e.jsx(
|
|
3937
3961
|
"button",
|
|
3938
3962
|
{
|
|
3939
|
-
onClick: () =>
|
|
3963
|
+
onClick: () => p == null ? void 0 : p(re),
|
|
3940
3964
|
className: "text-[10px] uppercase tracking-wide text-zinc-400 hover:text-zinc-200 border border-zinc-700 hover:border-zinc-500 rounded px-2 py-0.5 transition-colors",
|
|
3941
3965
|
title: "Revert the code back to the state before this refinement",
|
|
3942
3966
|
children: "Undo"
|
|
@@ -3945,7 +3969,7 @@ function na({
|
|
|
3945
3969
|
ke && /* @__PURE__ */ e.jsx(
|
|
3946
3970
|
"button",
|
|
3947
3971
|
{
|
|
3948
|
-
onClick: () =>
|
|
3972
|
+
onClick: () => x(_.feedback),
|
|
3949
3973
|
className: "text-[10px] uppercase tracking-wide text-amber-300 hover:text-amber-200 border border-amber-800/60 hover:border-amber-600 rounded px-2 py-0.5 transition-colors",
|
|
3950
3974
|
title: "Re-run refinement with the same feedback",
|
|
3951
3975
|
children: "Retry"
|
|
@@ -4073,7 +4097,7 @@ function na({
|
|
|
4073
4097
|
] })
|
|
4074
4098
|
] });
|
|
4075
4099
|
}
|
|
4076
|
-
const
|
|
4100
|
+
const la = [
|
|
4077
4101
|
"clone",
|
|
4078
4102
|
"install",
|
|
4079
4103
|
"overlay",
|
|
@@ -4081,8 +4105,8 @@ const ra = [
|
|
|
4081
4105
|
"lint",
|
|
4082
4106
|
"typecheck",
|
|
4083
4107
|
"test"
|
|
4084
|
-
],
|
|
4085
|
-
function
|
|
4108
|
+
], oa = ["lint", "typecheck", "test"];
|
|
4109
|
+
function ca(t) {
|
|
4086
4110
|
switch (t) {
|
|
4087
4111
|
case "running":
|
|
4088
4112
|
return /* @__PURE__ */ e.jsx("span", { className: "w-3.5 h-3.5 rounded-full border-2 border-violet-400 border-t-transparent animate-spin inline-block" });
|
|
@@ -4097,7 +4121,7 @@ function ia(t) {
|
|
|
4097
4121
|
return /* @__PURE__ */ e.jsx("span", { className: "text-zinc-700 text-sm", children: "○" });
|
|
4098
4122
|
}
|
|
4099
4123
|
}
|
|
4100
|
-
function
|
|
4124
|
+
function da(t) {
|
|
4101
4125
|
switch (t.status) {
|
|
4102
4126
|
case "running":
|
|
4103
4127
|
return "running…";
|
|
@@ -4113,7 +4137,7 @@ function la(t) {
|
|
|
4113
4137
|
return "";
|
|
4114
4138
|
}
|
|
4115
4139
|
}
|
|
4116
|
-
function
|
|
4140
|
+
function xa({
|
|
4117
4141
|
step: t,
|
|
4118
4142
|
state: s,
|
|
4119
4143
|
stale: n,
|
|
@@ -4121,24 +4145,24 @@ function oa({
|
|
|
4121
4145
|
fixing: a,
|
|
4122
4146
|
fixable: i
|
|
4123
4147
|
}) {
|
|
4124
|
-
const [l, c] = h(!1),
|
|
4148
|
+
const [l, c] = h(!1), x = s.logs.length > 0 || !!s.tail, p = r && i && s.status === "failed", d = n ? "border-amber-800/40" : s.status === "failed" ? "border-red-800/60" : s.status === "passed" ? "border-emerald-800/40" : s.status === "running" ? "border-violet-700/50" : "border-zinc-800";
|
|
4125
4149
|
return /* @__PURE__ */ e.jsxs("div", { className: `border ${d} rounded-md overflow-hidden bg-zinc-900/40 ${n ? "opacity-70" : ""}`, children: [
|
|
4126
4150
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-stretch", children: [
|
|
4127
4151
|
/* @__PURE__ */ e.jsxs(
|
|
4128
4152
|
"button",
|
|
4129
4153
|
{
|
|
4130
|
-
disabled: !
|
|
4154
|
+
disabled: !x,
|
|
4131
4155
|
onClick: () => c((j) => !j),
|
|
4132
|
-
className: `flex-1 flex items-center gap-3 px-3 py-2 text-left ${
|
|
4156
|
+
className: `flex-1 flex items-center gap-3 px-3 py-2 text-left ${x ? "hover:bg-zinc-800/60 cursor-pointer" : "cursor-default"}`,
|
|
4133
4157
|
children: [
|
|
4134
|
-
/* @__PURE__ */ e.jsx("span", { className: "w-4 flex items-center justify-center shrink-0", children:
|
|
4158
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-4 flex items-center justify-center shrink-0", children: ca(s.status) }),
|
|
4135
4159
|
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs text-zinc-300 w-20 shrink-0", children: t }),
|
|
4136
|
-
/* @__PURE__ */ e.jsx("span", { className: `text-xs ${s.status === "failed" ? "text-red-300" : s.status === "passed" ? "text-zinc-400" : s.status === "running" ? "text-violet-300" : "text-zinc-500"} flex-1 truncate`, children:
|
|
4137
|
-
|
|
4160
|
+
/* @__PURE__ */ e.jsx("span", { className: `text-xs ${s.status === "failed" ? "text-red-300" : s.status === "passed" ? "text-zinc-400" : s.status === "running" ? "text-violet-300" : "text-zinc-500"} flex-1 truncate`, children: da(s) }),
|
|
4161
|
+
x && /* @__PURE__ */ e.jsx("span", { className: "text-zinc-600 text-xs shrink-0", children: l ? "▲" : "▼" })
|
|
4138
4162
|
]
|
|
4139
4163
|
}
|
|
4140
4164
|
),
|
|
4141
|
-
|
|
4165
|
+
p && /* @__PURE__ */ e.jsx(
|
|
4142
4166
|
"button",
|
|
4143
4167
|
{
|
|
4144
4168
|
onClick: (j) => {
|
|
@@ -4151,8 +4175,8 @@ function oa({
|
|
|
4151
4175
|
}
|
|
4152
4176
|
)
|
|
4153
4177
|
] }),
|
|
4154
|
-
l &&
|
|
4155
|
-
|
|
4178
|
+
l && x && /* @__PURE__ */ e.jsx(
|
|
4179
|
+
Nt,
|
|
4156
4180
|
{
|
|
4157
4181
|
entries: s.logs,
|
|
4158
4182
|
variant: "embedded",
|
|
@@ -4162,14 +4186,14 @@ function oa({
|
|
|
4162
4186
|
)
|
|
4163
4187
|
] });
|
|
4164
4188
|
}
|
|
4165
|
-
function
|
|
4189
|
+
function ua({
|
|
4166
4190
|
repo: t,
|
|
4167
4191
|
stale: s,
|
|
4168
4192
|
onFixStep: n,
|
|
4169
4193
|
fixingStep: r
|
|
4170
4194
|
}) {
|
|
4171
|
-
var
|
|
4172
|
-
const a = t.stepOrder ??
|
|
4195
|
+
var p;
|
|
4196
|
+
const a = t.stepOrder ?? la, i = /* @__PURE__ */ new Set(), l = [];
|
|
4173
4197
|
for (const d of a)
|
|
4174
4198
|
t.steps[d] && (l.push(d), i.add(d));
|
|
4175
4199
|
for (const d of Object.keys(t.steps))
|
|
@@ -4183,7 +4207,7 @@ function ca({
|
|
|
4183
4207
|
] }),
|
|
4184
4208
|
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-amber-300/80 bg-amber-950/20 border border-amber-900/40 rounded-md px-3 py-2", children: t.skipReason === "misattributed" ? "No proposed file exists in this repo — the change was likely misrouted here. Refine and tell the model the correct repo, or leave it for the other block to validate." : `Skipped (${t.skipReason ?? "unknown"})` })
|
|
4185
4209
|
] });
|
|
4186
|
-
const c = new Set(t.fixableSteps ??
|
|
4210
|
+
const c = new Set(t.fixableSteps ?? oa), x = (p = t.result) != null && p.allPassed ? "text-emerald-300" : l.some((d) => {
|
|
4187
4211
|
var j;
|
|
4188
4212
|
return ((j = t.steps[d]) == null ? void 0 : j.status) === "failed";
|
|
4189
4213
|
}) ? "text-red-300" : l.some((d) => {
|
|
@@ -4192,13 +4216,13 @@ function ca({
|
|
|
4192
4216
|
}) ? "text-violet-300" : "text-zinc-400";
|
|
4193
4217
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4194
4218
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
4195
|
-
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-xs ${
|
|
4219
|
+
/* @__PURE__ */ e.jsx("span", { className: `font-mono text-xs ${x} truncate`, children: t.repo }),
|
|
4196
4220
|
t.projectType && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] uppercase tracking-wide text-zinc-500 font-mono shrink-0", children: t.projectType })
|
|
4197
4221
|
] }),
|
|
4198
4222
|
l.map((d) => {
|
|
4199
4223
|
const j = t.steps[d];
|
|
4200
4224
|
return /* @__PURE__ */ e.jsx(
|
|
4201
|
-
|
|
4225
|
+
xa,
|
|
4202
4226
|
{
|
|
4203
4227
|
step: d,
|
|
4204
4228
|
state: j,
|
|
@@ -4212,7 +4236,7 @@ function ca({
|
|
|
4212
4236
|
})
|
|
4213
4237
|
] });
|
|
4214
4238
|
}
|
|
4215
|
-
function
|
|
4239
|
+
function pa({
|
|
4216
4240
|
state: t,
|
|
4217
4241
|
validating: s,
|
|
4218
4242
|
error: n,
|
|
@@ -4221,11 +4245,11 @@ function da({
|
|
|
4221
4245
|
fixingStep: i = null,
|
|
4222
4246
|
autoPushOnPass: l = !1,
|
|
4223
4247
|
onToggleAutoPush: c,
|
|
4224
|
-
children:
|
|
4248
|
+
children: x
|
|
4225
4249
|
}) {
|
|
4226
|
-
const { result:
|
|
4250
|
+
const { result: p, byRepo: d = {}, repoOrder: j = [], aggregateLogs: f = [], stale: m } = t, S = j.map((z) => d[z]).filter(Boolean), w = S.some(
|
|
4227
4251
|
(z) => Object.values(z.steps).some(($) => $ && $.status !== "idle")
|
|
4228
|
-
) || f.length > 0, N = w ? s ? "text-violet-300" : m ? "text-amber-300" :
|
|
4252
|
+
) || f.length > 0, N = w ? s ? "text-violet-300" : m ? "text-amber-300" : p != null && p.allPassed ? "text-emerald-300" : "text-red-300" : "text-zinc-400", k = w ? s ? "Running pre-flight checks…" : m ? "Results outdated — proposal changed since last run" : p != null && p.allPassed ? `All checks passed${p.repo ? ` for ${p.repo}` : ""}` : "Some checks failed" : "Pre-flight checks not run yet";
|
|
4229
4253
|
return (
|
|
4230
4254
|
// overflow-anchor:none keeps the browser from scrolling when the panel
|
|
4231
4255
|
// grows or shrinks (e.g. rows expand on stream / collapse on fix).
|
|
@@ -4269,7 +4293,7 @@ function da({
|
|
|
4269
4293
|
n && /* @__PURE__ */ e.jsx("div", { className: "text-xs text-red-400 bg-red-950/40 border border-red-900 rounded px-3 py-2 whitespace-pre-wrap break-words [overflow-wrap:anywhere] max-h-32 overflow-y-auto font-mono", children: n }),
|
|
4270
4294
|
f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "text-[11px] text-zinc-400 font-mono bg-zinc-950/80 border border-zinc-800 rounded px-3 py-2 max-h-40 overflow-y-auto leading-relaxed [overflow-wrap:anywhere]", children: f.slice(-30).map((z, $) => /* @__PURE__ */ e.jsx("div", { children: z.message }, $)) }),
|
|
4271
4295
|
w && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-4", children: S.map((z) => /* @__PURE__ */ e.jsx(
|
|
4272
|
-
|
|
4296
|
+
ua,
|
|
4273
4297
|
{
|
|
4274
4298
|
repo: z,
|
|
4275
4299
|
stale: m,
|
|
@@ -4278,11 +4302,11 @@ function da({
|
|
|
4278
4302
|
},
|
|
4279
4303
|
z.repo
|
|
4280
4304
|
)) }),
|
|
4281
|
-
|
|
4305
|
+
x
|
|
4282
4306
|
] })
|
|
4283
4307
|
);
|
|
4284
4308
|
}
|
|
4285
|
-
function
|
|
4309
|
+
function fa() {
|
|
4286
4310
|
const {
|
|
4287
4311
|
analysisLogs: t,
|
|
4288
4312
|
analysisResult: s,
|
|
@@ -4292,8 +4316,8 @@ function xa() {
|
|
|
4292
4316
|
applying: i,
|
|
4293
4317
|
refining: l,
|
|
4294
4318
|
validation: c,
|
|
4295
|
-
validating:
|
|
4296
|
-
validationError:
|
|
4319
|
+
validating: x,
|
|
4320
|
+
validationError: p,
|
|
4297
4321
|
autoPushOnValidatePass: d,
|
|
4298
4322
|
availableRepos: j,
|
|
4299
4323
|
refineThread: f,
|
|
@@ -4315,7 +4339,7 @@ function xa() {
|
|
|
4315
4339
|
}, [l]);
|
|
4316
4340
|
const te = (de, I) => {
|
|
4317
4341
|
V(de), X(de, I);
|
|
4318
|
-
}, ne =
|
|
4342
|
+
}, ne = x ? "running" : c.stale || !c.result ? "idle" : c.result.allPassed ? "passed" : "failed";
|
|
4319
4343
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-4xl mx-auto w-full flex flex-col gap-5", children: [
|
|
4320
4344
|
/* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "Proposed Changes" }),
|
|
4321
4345
|
n && /* @__PURE__ */ e.jsx("div", { className: "bg-red-950/40 border border-red-800 rounded-lg px-4 py-3 text-sm text-red-300 whitespace-pre-wrap break-words [overflow-wrap:anywhere] max-h-48 overflow-y-auto font-mono leading-snug", children: n }),
|
|
@@ -4328,7 +4352,7 @@ function xa() {
|
|
|
4328
4352
|
")"
|
|
4329
4353
|
] }),
|
|
4330
4354
|
/* @__PURE__ */ e.jsx("div", { className: "mt-2", children: /* @__PURE__ */ e.jsx(
|
|
4331
|
-
|
|
4355
|
+
Nt,
|
|
4332
4356
|
{
|
|
4333
4357
|
entries: t,
|
|
4334
4358
|
label: "forge analysis",
|
|
@@ -4339,11 +4363,11 @@ function xa() {
|
|
|
4339
4363
|
] }),
|
|
4340
4364
|
s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4341
4365
|
/* @__PURE__ */ e.jsx(
|
|
4342
|
-
|
|
4366
|
+
pa,
|
|
4343
4367
|
{
|
|
4344
4368
|
state: c,
|
|
4345
|
-
validating:
|
|
4346
|
-
error:
|
|
4369
|
+
validating: x,
|
|
4370
|
+
error: p,
|
|
4347
4371
|
onValidate: Z,
|
|
4348
4372
|
onFixStep: te,
|
|
4349
4373
|
fixingStep: L,
|
|
@@ -4352,7 +4376,7 @@ function xa() {
|
|
|
4352
4376
|
}
|
|
4353
4377
|
),
|
|
4354
4378
|
/* @__PURE__ */ e.jsx(
|
|
4355
|
-
|
|
4379
|
+
ia,
|
|
4356
4380
|
{
|
|
4357
4381
|
explanation: s.explanation,
|
|
4358
4382
|
changes: s.changes,
|
|
@@ -4375,7 +4399,7 @@ function xa() {
|
|
|
4375
4399
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children: "No changes were proposed." })
|
|
4376
4400
|
] });
|
|
4377
4401
|
}
|
|
4378
|
-
function
|
|
4402
|
+
function ma() {
|
|
4379
4403
|
const { applyResult: t } = le(), { handleRefinePipelineFailure: s, getToken: n } = pe(), r = (t == null ? void 0 : t.applications.filter((a) => !a.mr)) ?? [];
|
|
4380
4404
|
return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
4381
4405
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -4428,7 +4452,7 @@ function ua() {
|
|
|
4428
4452
|
))
|
|
4429
4453
|
] });
|
|
4430
4454
|
}
|
|
4431
|
-
function
|
|
4455
|
+
function ha() {
|
|
4432
4456
|
const { storedAnalyses: t } = le(), {
|
|
4433
4457
|
handleRestoreAnalysis: s,
|
|
4434
4458
|
handleDiscardStoredAnalysis: n,
|
|
@@ -4513,7 +4537,7 @@ function pa() {
|
|
|
4513
4537
|
)) })
|
|
4514
4538
|
] });
|
|
4515
4539
|
}
|
|
4516
|
-
function
|
|
4540
|
+
function ga({
|
|
4517
4541
|
editing: t,
|
|
4518
4542
|
editDescription: s,
|
|
4519
4543
|
setEditDescription: n,
|
|
@@ -4524,15 +4548,15 @@ function fa({
|
|
|
4524
4548
|
}) {
|
|
4525
4549
|
const {
|
|
4526
4550
|
selectedIssue: c,
|
|
4527
|
-
analysisPrompt:
|
|
4528
|
-
existingMr:
|
|
4551
|
+
analysisPrompt: x,
|
|
4552
|
+
existingMr: p,
|
|
4529
4553
|
existingMrLoading: d,
|
|
4530
4554
|
storedAnalyses: j,
|
|
4531
4555
|
mergedMrs: f,
|
|
4532
4556
|
resolutionCheck: m
|
|
4533
4557
|
} = le(), { setAnalysisPrompt: S, handleBeginAnalysis: w, handleReset: N } = pe();
|
|
4534
4558
|
if (!c) return null;
|
|
4535
|
-
const k = f.length > 0 && !
|
|
4559
|
+
const k = f.length > 0 && !p && !d, z = d ? "Checking MR…" : p ? "Analyze & Update MR" : j.length > 0 ? "New Analysis" : f.length > 0 && m && !m.resolved ? "Try Again" : "Begin Analysis";
|
|
4536
4560
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4537
4561
|
t ? /* @__PURE__ */ e.jsx(
|
|
4538
4562
|
"textarea",
|
|
@@ -4543,14 +4567,14 @@ function fa({
|
|
|
4543
4567
|
className: "bg-zinc-800 border border-zinc-600 focus:border-violet-500 rounded-lg px-4 py-3 text-sm text-zinc-300 outline-none w-full resize-y leading-relaxed"
|
|
4544
4568
|
}
|
|
4545
4569
|
) : c.description && /* @__PURE__ */ e.jsx("div", { className: "bg-zinc-800 border border-zinc-700 rounded-lg px-4 py-4 text-sm text-zinc-300 whitespace-pre-wrap leading-relaxed w-full max-h-[50vh] overflow-y-auto", children: c.description }),
|
|
4546
|
-
!t && /* @__PURE__ */ e.jsx(
|
|
4547
|
-
!t && /* @__PURE__ */ e.jsx(
|
|
4548
|
-
!t && /* @__PURE__ */ e.jsx(
|
|
4570
|
+
!t && /* @__PURE__ */ e.jsx(Rs, {}),
|
|
4571
|
+
!t && /* @__PURE__ */ e.jsx(ma, {}),
|
|
4572
|
+
!t && /* @__PURE__ */ e.jsx(ha, {}),
|
|
4549
4573
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
4550
4574
|
!t && /* @__PURE__ */ e.jsx(
|
|
4551
4575
|
"textarea",
|
|
4552
4576
|
{
|
|
4553
|
-
value:
|
|
4577
|
+
value: x,
|
|
4554
4578
|
onChange: ($) => S($.target.value),
|
|
4555
4579
|
placeholder: "Optional instructions for the analysis…",
|
|
4556
4580
|
rows: 2,
|
|
@@ -4595,20 +4619,20 @@ function fa({
|
|
|
4595
4619
|
}
|
|
4596
4620
|
)
|
|
4597
4621
|
] }),
|
|
4598
|
-
/* @__PURE__ */ e.jsx(
|
|
4622
|
+
/* @__PURE__ */ e.jsx(ks, {})
|
|
4599
4623
|
] })
|
|
4600
4624
|
] }),
|
|
4601
|
-
k && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
4602
|
-
/* @__PURE__ */ e.jsx(
|
|
4625
|
+
k && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(Cs, {}) }),
|
|
4626
|
+
/* @__PURE__ */ e.jsx(Bt, { mrs: f })
|
|
4603
4627
|
] });
|
|
4604
4628
|
}
|
|
4605
|
-
function
|
|
4629
|
+
function ba(t, s) {
|
|
4606
4630
|
if (!t) return null;
|
|
4607
4631
|
const n = s.replace(/^forge\//, "").replace(/[/_]+/g, "-").toLowerCase();
|
|
4608
4632
|
return t.replace("{branch}", s).replace("{slug}", n);
|
|
4609
4633
|
}
|
|
4610
|
-
function
|
|
4611
|
-
const { existingMr: t, existingMrLoading: s, applyResult: n, selectedRepo: r, applying: a, applyError: i, testDeployUrlTemplate: l } = le(), { handleRefinePipelineFailure: c, handlePromoteBranch:
|
|
4634
|
+
function ja() {
|
|
4635
|
+
const { existingMr: t, existingMrLoading: s, applyResult: n, selectedRepo: r, applying: a, applyError: i, testDeployUrlTemplate: l } = le(), { handleRefinePipelineFailure: c, handlePromoteBranch: x, getToken: p } = pe(), { setMrMerged: d } = $e(), [j, f] = h({}), [m, S] = h(null);
|
|
4612
4636
|
if (s)
|
|
4613
4637
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 animate-pulse", children: [
|
|
4614
4638
|
/* @__PURE__ */ e.jsx("div", { className: "h-20 bg-zinc-800 border border-zinc-700 rounded-lg" }),
|
|
@@ -4636,10 +4660,10 @@ function ha() {
|
|
|
4636
4660
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs font-mono text-zinc-500", children: t.branchName })
|
|
4637
4661
|
] }) }),
|
|
4638
4662
|
/* @__PURE__ */ e.jsx(
|
|
4639
|
-
|
|
4663
|
+
Ss,
|
|
4640
4664
|
{
|
|
4641
4665
|
mrIid: t.iid,
|
|
4642
|
-
token:
|
|
4666
|
+
token: p(),
|
|
4643
4667
|
repo: r || void 0,
|
|
4644
4668
|
pipelineStatus: m,
|
|
4645
4669
|
onMerged: () => d(!0)
|
|
@@ -4651,7 +4675,7 @@ function ha() {
|
|
|
4651
4675
|
tt,
|
|
4652
4676
|
{
|
|
4653
4677
|
endpoint: `mr/${t.iid}/pipeline`,
|
|
4654
|
-
token:
|
|
4678
|
+
token: p(),
|
|
4655
4679
|
repo: r || void 0,
|
|
4656
4680
|
onRefinePipelineFailure: c,
|
|
4657
4681
|
onStatusChange: S
|
|
@@ -4661,7 +4685,7 @@ function ha() {
|
|
|
4661
4685
|
] });
|
|
4662
4686
|
const w = (n == null ? void 0 : n.applications.filter((N) => !N.mr)) ?? [];
|
|
4663
4687
|
return w.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-6", children: w.map((N) => {
|
|
4664
|
-
const k = `${N.repo}:${N.branchName}`, z = j[k] === "success", $ = z ?
|
|
4688
|
+
const k = `${N.repo}:${N.branchName}`, z = j[k] === "success", $ = z ? ba(l, N.branchName) : null;
|
|
4665
4689
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
4666
4690
|
/* @__PURE__ */ e.jsxs("div", { className: "bg-zinc-800 border border-zinc-700 rounded-lg px-4 py-4 flex items-center justify-between", children: [
|
|
4667
4691
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
@@ -4689,7 +4713,7 @@ function ha() {
|
|
|
4689
4713
|
z && /* @__PURE__ */ e.jsx(
|
|
4690
4714
|
"button",
|
|
4691
4715
|
{
|
|
4692
|
-
onClick: () =>
|
|
4716
|
+
onClick: () => x(N),
|
|
4693
4717
|
disabled: a,
|
|
4694
4718
|
className: "shrink-0 ml-4 bg-violet-600 hover:bg-violet-500 disabled:opacity-40 disabled:cursor-not-allowed text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",
|
|
4695
4719
|
title: "Pipeline is green — promote this branch to a merge request",
|
|
@@ -4704,7 +4728,7 @@ function ha() {
|
|
|
4704
4728
|
tt,
|
|
4705
4729
|
{
|
|
4706
4730
|
endpoint: `branch-pipeline?branch=${encodeURIComponent(N.branchName)}`,
|
|
4707
|
-
token:
|
|
4731
|
+
token: p(),
|
|
4708
4732
|
repo: N.repo,
|
|
4709
4733
|
onRefinePipelineFailure: c,
|
|
4710
4734
|
onStatusChange: (K) => f((Z) => ({ ...Z, [k]: K ?? "" }))
|
|
@@ -4714,7 +4738,7 @@ function ha() {
|
|
|
4714
4738
|
] }, k);
|
|
4715
4739
|
}) }) : /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children: "No open MR found for this issue." });
|
|
4716
4740
|
}
|
|
4717
|
-
function
|
|
4741
|
+
function ya({ editing: t, editTitle: s, setEditTitle: n, onStartEdit: r }) {
|
|
4718
4742
|
const { selectedIssue: a } = le();
|
|
4719
4743
|
return a ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
4720
4744
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-xs text-zinc-500", children: [
|
|
@@ -4760,15 +4784,15 @@ function ga({ editing: t, editTitle: s, setEditTitle: n, onStartEdit: r }) {
|
|
|
4760
4784
|
] })
|
|
4761
4785
|
] }) : null;
|
|
4762
4786
|
}
|
|
4763
|
-
function
|
|
4764
|
-
const { selectedIssue: t, existingMr: s, existingMrLoading: n, applyResult: r } = le(), { handleUpdateIssue: a } = pe(), { activeDetailTab: i, setActiveDetailTab: l } = $e(), [c,
|
|
4787
|
+
function va() {
|
|
4788
|
+
const { selectedIssue: t, existingMr: s, existingMrLoading: n, applyResult: r } = le(), { handleUpdateIssue: a } = pe(), { activeDetailTab: i, setActiveDetailTab: l } = $e(), [c, x] = h(!1), [p, d] = h(""), [j, f] = h(""), [m, S] = h(!1), { navigate: w } = Pe();
|
|
4765
4789
|
if (!t) return null;
|
|
4766
4790
|
const N = () => {
|
|
4767
|
-
d(t.title ?? ""), f(t.description ?? ""),
|
|
4768
|
-
}, k = () =>
|
|
4791
|
+
d(t.title ?? ""), f(t.description ?? ""), x(!0);
|
|
4792
|
+
}, k = () => x(!1), z = async () => {
|
|
4769
4793
|
S(!0);
|
|
4770
4794
|
try {
|
|
4771
|
-
await a(
|
|
4795
|
+
await a(p, j), x(!1);
|
|
4772
4796
|
} finally {
|
|
4773
4797
|
S(!1);
|
|
4774
4798
|
}
|
|
@@ -4804,17 +4828,17 @@ function ba() {
|
|
|
4804
4828
|
];
|
|
4805
4829
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6 w-full", children: [
|
|
4806
4830
|
/* @__PURE__ */ e.jsx(
|
|
4807
|
-
|
|
4831
|
+
ya,
|
|
4808
4832
|
{
|
|
4809
4833
|
editing: c,
|
|
4810
|
-
editTitle:
|
|
4834
|
+
editTitle: p,
|
|
4811
4835
|
setEditTitle: d,
|
|
4812
4836
|
onStartEdit: N
|
|
4813
4837
|
}
|
|
4814
4838
|
),
|
|
4815
|
-
/* @__PURE__ */ e.jsx(
|
|
4839
|
+
/* @__PURE__ */ e.jsx(Ts, { tabs: v, active: i, onSelect: $ }),
|
|
4816
4840
|
i === "issue" && /* @__PURE__ */ e.jsx(
|
|
4817
|
-
|
|
4841
|
+
ga,
|
|
4818
4842
|
{
|
|
4819
4843
|
editing: c,
|
|
4820
4844
|
editDescription: j,
|
|
@@ -4822,43 +4846,43 @@ function ba() {
|
|
|
4822
4846
|
saving: m,
|
|
4823
4847
|
onSave: z,
|
|
4824
4848
|
onCancelEdit: k,
|
|
4825
|
-
editTitle:
|
|
4849
|
+
editTitle: p
|
|
4826
4850
|
}
|
|
4827
4851
|
),
|
|
4828
|
-
i === "mr" && /* @__PURE__ */ e.jsx(
|
|
4852
|
+
i === "mr" && /* @__PURE__ */ e.jsx(ja, {})
|
|
4829
4853
|
] });
|
|
4830
4854
|
}
|
|
4831
|
-
function
|
|
4832
|
-
const [t, s] = h(null), [n, r] = h(!1), [a, i] = h(null), l =
|
|
4855
|
+
function Na() {
|
|
4856
|
+
const [t, s] = h(null), [n, r] = h(!1), [a, i] = h(null), l = ht(async () => {
|
|
4833
4857
|
r(!0), i(null);
|
|
4834
4858
|
try {
|
|
4835
|
-
const
|
|
4836
|
-
s(
|
|
4837
|
-
} catch (
|
|
4838
|
-
i(
|
|
4859
|
+
const x = await Y("/config");
|
|
4860
|
+
s(x);
|
|
4861
|
+
} catch (x) {
|
|
4862
|
+
i(x instanceof Error ? x.message : String(x));
|
|
4839
4863
|
} finally {
|
|
4840
4864
|
r(!1);
|
|
4841
4865
|
}
|
|
4842
|
-
}, []), c =
|
|
4843
|
-
const
|
|
4866
|
+
}, []), c = ht(async (x) => {
|
|
4867
|
+
const p = await Y("/config", {
|
|
4844
4868
|
method: "PUT",
|
|
4845
|
-
body: JSON.stringify(
|
|
4869
|
+
body: JSON.stringify(x)
|
|
4846
4870
|
});
|
|
4847
|
-
return s(
|
|
4871
|
+
return s(p), p;
|
|
4848
4872
|
}, []);
|
|
4849
4873
|
return G(() => {
|
|
4850
4874
|
l();
|
|
4851
4875
|
}, [l]), { config: t, loading: n, error: a, reload: l, patch: c };
|
|
4852
4876
|
}
|
|
4853
|
-
const
|
|
4877
|
+
const wa = {
|
|
4854
4878
|
gitlab: "GitLab",
|
|
4855
4879
|
github: "GitHub",
|
|
4856
4880
|
azuredevops: "Azure DevOps"
|
|
4857
4881
|
};
|
|
4858
|
-
function
|
|
4882
|
+
function za(t) {
|
|
4859
4883
|
return t === "config" ? /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-violet-400 uppercase tracking-wide", children: "config" }) : t === "env" ? /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-zinc-500 uppercase tracking-wide", children: "env" }) : /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-red-400/80 uppercase tracking-wide", children: "missing" });
|
|
4860
4884
|
}
|
|
4861
|
-
function
|
|
4885
|
+
function $t({
|
|
4862
4886
|
provider: t,
|
|
4863
4887
|
connection: s,
|
|
4864
4888
|
newToken: n,
|
|
@@ -4868,11 +4892,11 @@ function At({
|
|
|
4868
4892
|
baseUrl: l,
|
|
4869
4893
|
setBaseUrl: c
|
|
4870
4894
|
}) {
|
|
4871
|
-
const [
|
|
4895
|
+
const [x, p] = h(!1);
|
|
4872
4896
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 bg-zinc-900 border border-zinc-800 rounded-lg px-4 py-3", children: [
|
|
4873
4897
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
4874
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-white", children:
|
|
4875
|
-
|
|
4898
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-white", children: wa[t] }),
|
|
4899
|
+
za(s.tokenSource)
|
|
4876
4900
|
] }),
|
|
4877
4901
|
c && /* @__PURE__ */ e.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
4878
4902
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-zinc-500", children: "API base URL" }),
|
|
@@ -4895,7 +4919,7 @@ function At({
|
|
|
4895
4919
|
/* @__PURE__ */ e.jsx(
|
|
4896
4920
|
"input",
|
|
4897
4921
|
{
|
|
4898
|
-
type:
|
|
4922
|
+
type: x ? "text" : "password",
|
|
4899
4923
|
value: n,
|
|
4900
4924
|
onChange: (d) => r(d.target.value),
|
|
4901
4925
|
placeholder: s.hasToken ? "Leave blank to keep current" : "Paste token",
|
|
@@ -4906,10 +4930,10 @@ function At({
|
|
|
4906
4930
|
/* @__PURE__ */ e.jsx(
|
|
4907
4931
|
"button",
|
|
4908
4932
|
{
|
|
4909
|
-
onClick: () =>
|
|
4933
|
+
onClick: () => p((d) => !d),
|
|
4910
4934
|
disabled: !n,
|
|
4911
4935
|
className: "text-xs text-zinc-500 hover:text-zinc-300 disabled:opacity-30",
|
|
4912
|
-
children:
|
|
4936
|
+
children: x ? "Hide" : "Show"
|
|
4913
4937
|
}
|
|
4914
4938
|
)
|
|
4915
4939
|
] }),
|
|
@@ -4928,17 +4952,17 @@ function At({
|
|
|
4928
4952
|
] })
|
|
4929
4953
|
] });
|
|
4930
4954
|
}
|
|
4931
|
-
const
|
|
4955
|
+
const hs = {
|
|
4932
4956
|
gitlab: "",
|
|
4933
4957
|
github: "",
|
|
4934
4958
|
azuredevops: ""
|
|
4935
|
-
},
|
|
4959
|
+
}, gs = {
|
|
4936
4960
|
gitlab: !1,
|
|
4937
4961
|
github: !1,
|
|
4938
4962
|
azuredevops: !1
|
|
4939
4963
|
};
|
|
4940
|
-
function
|
|
4941
|
-
const [n, r] = h(t.gitlab.baseUrl), [a, i] = h(
|
|
4964
|
+
function ka({ connections: t, onSave: s }) {
|
|
4965
|
+
const [n, r] = h(t.gitlab.baseUrl), [a, i] = h(hs), [l, c] = h(gs), [x, p] = h(!1), [d, j] = h(null);
|
|
4942
4966
|
G(() => {
|
|
4943
4967
|
r(t.gitlab.baseUrl);
|
|
4944
4968
|
}, [t.gitlab.baseUrl]);
|
|
@@ -4946,13 +4970,13 @@ function Na({ connections: t, onSave: s }) {
|
|
|
4946
4970
|
const k = {}, z = {};
|
|
4947
4971
|
return f && (z.baseUrl = n), l.gitlab ? z.token = "" : a.gitlab && (z.token = a.gitlab), Object.keys(z).length > 0 && (k.gitlab = z), l.github ? k.github = { token: "" } : a.github && (k.github = { token: a.github }), l.azuredevops ? k.azuredevops = { token: "" } : a.azuredevops && (k.azuredevops = { token: a.azuredevops }), k;
|
|
4948
4972
|
}, N = async () => {
|
|
4949
|
-
|
|
4973
|
+
p(!0), j(null);
|
|
4950
4974
|
try {
|
|
4951
|
-
await s(w()), i(
|
|
4975
|
+
await s(w()), i(hs), c(gs);
|
|
4952
4976
|
} catch (k) {
|
|
4953
4977
|
j(k instanceof Error ? k.message : String(k));
|
|
4954
4978
|
} finally {
|
|
4955
|
-
|
|
4979
|
+
p(!1);
|
|
4956
4980
|
}
|
|
4957
4981
|
};
|
|
4958
4982
|
return /* @__PURE__ */ e.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
@@ -4965,15 +4989,15 @@ function Na({ connections: t, onSave: s }) {
|
|
|
4965
4989
|
"button",
|
|
4966
4990
|
{
|
|
4967
4991
|
onClick: N,
|
|
4968
|
-
disabled:
|
|
4992
|
+
disabled: x,
|
|
4969
4993
|
className: "bg-violet-600 hover:bg-violet-500 disabled:opacity-50 text-white text-sm font-medium px-4 py-1.5 rounded-lg transition-colors",
|
|
4970
|
-
children:
|
|
4994
|
+
children: x ? "Saving…" : "Save"
|
|
4971
4995
|
}
|
|
4972
4996
|
)
|
|
4973
4997
|
] }),
|
|
4974
4998
|
d && /* @__PURE__ */ e.jsx("div", { className: "bg-red-950/40 border border-red-800 rounded-lg px-3 py-2 text-sm text-red-300", children: d }),
|
|
4975
4999
|
/* @__PURE__ */ e.jsx(
|
|
4976
|
-
|
|
5000
|
+
$t,
|
|
4977
5001
|
{
|
|
4978
5002
|
provider: "gitlab",
|
|
4979
5003
|
connection: t.gitlab,
|
|
@@ -4986,7 +5010,7 @@ function Na({ connections: t, onSave: s }) {
|
|
|
4986
5010
|
}
|
|
4987
5011
|
),
|
|
4988
5012
|
/* @__PURE__ */ e.jsx(
|
|
4989
|
-
|
|
5013
|
+
$t,
|
|
4990
5014
|
{
|
|
4991
5015
|
provider: "github",
|
|
4992
5016
|
connection: t.github,
|
|
@@ -4997,7 +5021,7 @@ function Na({ connections: t, onSave: s }) {
|
|
|
4997
5021
|
}
|
|
4998
5022
|
),
|
|
4999
5023
|
/* @__PURE__ */ e.jsx(
|
|
5000
|
-
|
|
5024
|
+
$t,
|
|
5001
5025
|
{
|
|
5002
5026
|
provider: "azuredevops",
|
|
5003
5027
|
connection: t.azuredevops,
|
|
@@ -5009,17 +5033,17 @@ function Na({ connections: t, onSave: s }) {
|
|
|
5009
5033
|
)
|
|
5010
5034
|
] });
|
|
5011
5035
|
}
|
|
5012
|
-
function
|
|
5013
|
-
const { availableModels: n, availableAgents: r } = le(), [a, i] = h(t), [l, c] = h(!1), [
|
|
5036
|
+
function Ra({ defaults: t, onSave: s }) {
|
|
5037
|
+
const { availableModels: n, availableAgents: r } = le(), [a, i] = h(t), [l, c] = h(!1), [x, p] = h(null);
|
|
5014
5038
|
G(() => {
|
|
5015
5039
|
i(t);
|
|
5016
5040
|
}, [t]);
|
|
5017
5041
|
const d = JSON.stringify(a) !== JSON.stringify(t), j = async () => {
|
|
5018
|
-
c(!0),
|
|
5042
|
+
c(!0), p(null);
|
|
5019
5043
|
try {
|
|
5020
5044
|
await s(a);
|
|
5021
5045
|
} catch (f) {
|
|
5022
|
-
|
|
5046
|
+
p(f instanceof Error ? f.message : String(f));
|
|
5023
5047
|
} finally {
|
|
5024
5048
|
c(!1);
|
|
5025
5049
|
}
|
|
@@ -5040,7 +5064,7 @@ function wa({ defaults: t, onSave: s }) {
|
|
|
5040
5064
|
}
|
|
5041
5065
|
)
|
|
5042
5066
|
] }),
|
|
5043
|
-
|
|
5067
|
+
x && /* @__PURE__ */ e.jsx("div", { className: "bg-red-950/40 border border-red-800 rounded-lg px-3 py-2 text-sm text-red-300", children: x }),
|
|
5044
5068
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
5045
5069
|
/* @__PURE__ */ e.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
5046
5070
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-zinc-500", children: "Default model" }),
|
|
@@ -5132,17 +5156,17 @@ function wa({ defaults: t, onSave: s }) {
|
|
|
5132
5156
|
] })
|
|
5133
5157
|
] });
|
|
5134
5158
|
}
|
|
5135
|
-
const
|
|
5159
|
+
const Sa = ["gitlab", "github", "azuredevops"], Ca = [
|
|
5136
5160
|
{ value: "auto", label: "auto-detect" },
|
|
5137
5161
|
{ value: "node", label: "Node (npm)" },
|
|
5138
5162
|
{ value: "go", label: "Go" }
|
|
5139
5163
|
];
|
|
5140
|
-
function
|
|
5164
|
+
function Ta(t) {
|
|
5141
5165
|
const s = t.replace(/^(gitlab|github|azuredevops):/, "");
|
|
5142
5166
|
return s.split("/").pop() ?? s;
|
|
5143
5167
|
}
|
|
5144
|
-
function
|
|
5145
|
-
const [n, r] = h(t), [a, i] = h("gitlab"), [l, c] = h(""), [
|
|
5168
|
+
function _a({ repos: t, onSave: s }) {
|
|
5169
|
+
const [n, r] = h(t), [a, i] = h("gitlab"), [l, c] = h(""), [x, p] = h(!1), [d, j] = h(null), [f, m] = h(null), [S, w] = h(null);
|
|
5146
5170
|
G(() => {
|
|
5147
5171
|
r(t);
|
|
5148
5172
|
}, [t]);
|
|
@@ -5154,7 +5178,7 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5154
5178
|
j(`Already in list: ${L}`);
|
|
5155
5179
|
return;
|
|
5156
5180
|
}
|
|
5157
|
-
j(null), r([...n, { id: L, label:
|
|
5181
|
+
j(null), r([...n, { id: L, label: Ta(L), projectType: "auto" }]), c("");
|
|
5158
5182
|
}, z = (v) => {
|
|
5159
5183
|
r(n.filter((L) => L.id !== v));
|
|
5160
5184
|
}, $ = (v, L) => {
|
|
@@ -5167,13 +5191,13 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5167
5191
|
return te.splice(L, 0, ne), te;
|
|
5168
5192
|
});
|
|
5169
5193
|
}, X = async () => {
|
|
5170
|
-
|
|
5194
|
+
p(!0), j(null);
|
|
5171
5195
|
try {
|
|
5172
5196
|
await s(n);
|
|
5173
5197
|
} catch (v) {
|
|
5174
5198
|
j(v instanceof Error ? v.message : String(v));
|
|
5175
5199
|
} finally {
|
|
5176
|
-
|
|
5200
|
+
p(!1);
|
|
5177
5201
|
}
|
|
5178
5202
|
};
|
|
5179
5203
|
return /* @__PURE__ */ e.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
@@ -5190,9 +5214,9 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5190
5214
|
"button",
|
|
5191
5215
|
{
|
|
5192
5216
|
onClick: X,
|
|
5193
|
-
disabled:
|
|
5217
|
+
disabled: x,
|
|
5194
5218
|
className: "bg-violet-600 hover:bg-violet-500 disabled:opacity-50 text-white text-sm font-medium px-4 py-1.5 rounded-lg transition-colors",
|
|
5195
|
-
children:
|
|
5219
|
+
children: x ? "Saving…" : "Save"
|
|
5196
5220
|
}
|
|
5197
5221
|
)
|
|
5198
5222
|
] }),
|
|
@@ -5247,7 +5271,7 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5247
5271
|
onChange: (I) => K(v.id, I.target.value),
|
|
5248
5272
|
title: "Validator toolchain — picks npm scripts or go fmt/vet/build/test",
|
|
5249
5273
|
className: "bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 focus:outline-none focus:border-violet-500",
|
|
5250
|
-
children:
|
|
5274
|
+
children: Ca.map((I) => /* @__PURE__ */ e.jsx("option", { value: I.value, children: I.label }, I.value))
|
|
5251
5275
|
}
|
|
5252
5276
|
),
|
|
5253
5277
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5272,7 +5296,7 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5272
5296
|
value: a,
|
|
5273
5297
|
onChange: (v) => i(v.target.value),
|
|
5274
5298
|
className: "bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 focus:outline-none focus:border-violet-500",
|
|
5275
|
-
children:
|
|
5299
|
+
children: Sa.map((v) => /* @__PURE__ */ e.jsx("option", { value: v, children: v }, v))
|
|
5276
5300
|
}
|
|
5277
5301
|
),
|
|
5278
5302
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5298,9 +5322,9 @@ function Sa({ repos: t, onSave: s }) {
|
|
|
5298
5322
|
] })
|
|
5299
5323
|
] });
|
|
5300
5324
|
}
|
|
5301
|
-
function
|
|
5325
|
+
function Ea() {
|
|
5302
5326
|
var S;
|
|
5303
|
-
const { config: t, loading: s, error: n, patch: r } =
|
|
5327
|
+
const { config: t, loading: s, error: n, patch: r } = Na(), { selectedRepo: a, availableRepos: i, selectedSecondaryRepos: l } = le(), { handleDestroyAllAnalyses: c, reloadStatus: x } = pe(), [p, d] = h(null), j = () => {
|
|
5304
5328
|
if (!window.confirm(
|
|
5305
5329
|
"Destroy every cached analysis across every issue and repo? This cannot be undone."
|
|
5306
5330
|
)) return;
|
|
@@ -5339,7 +5363,7 @@ function Ca() {
|
|
|
5339
5363
|
] })
|
|
5340
5364
|
] }),
|
|
5341
5365
|
/* @__PURE__ */ e.jsx(
|
|
5342
|
-
|
|
5366
|
+
ka,
|
|
5343
5367
|
{
|
|
5344
5368
|
connections: t.connections,
|
|
5345
5369
|
onSave: (w) => r({ connections: w }).then(() => {
|
|
@@ -5347,17 +5371,17 @@ function Ca() {
|
|
|
5347
5371
|
}
|
|
5348
5372
|
),
|
|
5349
5373
|
/* @__PURE__ */ e.jsx(
|
|
5350
|
-
|
|
5374
|
+
_a,
|
|
5351
5375
|
{
|
|
5352
5376
|
repos: t.repos,
|
|
5353
|
-
onSave: (w) => r({ repos: w }).then(() =>
|
|
5377
|
+
onSave: (w) => r({ repos: w }).then(() => x())
|
|
5354
5378
|
}
|
|
5355
5379
|
),
|
|
5356
5380
|
/* @__PURE__ */ e.jsx(
|
|
5357
|
-
|
|
5381
|
+
Ra,
|
|
5358
5382
|
{
|
|
5359
5383
|
defaults: t.defaults,
|
|
5360
|
-
onSave: (w) => r({ defaults: w }).then(() =>
|
|
5384
|
+
onSave: (w) => r({ defaults: w }).then(() => x())
|
|
5361
5385
|
}
|
|
5362
5386
|
),
|
|
5363
5387
|
/* @__PURE__ */ e.jsxs("section", { className: "flex flex-col gap-3", children: [
|
|
@@ -5376,12 +5400,12 @@ function Ca() {
|
|
|
5376
5400
|
children: "Destroy all cached analyses"
|
|
5377
5401
|
}
|
|
5378
5402
|
),
|
|
5379
|
-
|
|
5403
|
+
p && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-zinc-400", children: p })
|
|
5380
5404
|
] })
|
|
5381
5405
|
] })
|
|
5382
5406
|
] }) : null;
|
|
5383
5407
|
}
|
|
5384
|
-
function
|
|
5408
|
+
function Aa() {
|
|
5385
5409
|
const {
|
|
5386
5410
|
phase: t,
|
|
5387
5411
|
selectedIssue: s,
|
|
@@ -5392,30 +5416,30 @@ function Ta() {
|
|
|
5392
5416
|
setPhase: i,
|
|
5393
5417
|
handleReset: l,
|
|
5394
5418
|
handleSelectIssue: c,
|
|
5395
|
-
restoreAnalysisByOrdinal:
|
|
5396
|
-
getToken:
|
|
5397
|
-
} = pe(), { setActiveDetailTab: d } = $e(),
|
|
5419
|
+
restoreAnalysisByOrdinal: x,
|
|
5420
|
+
getToken: p
|
|
5421
|
+
} = pe(), { setActiveDetailTab: d } = $e(), { navigate: j, pathname: f } = Pe();
|
|
5398
5422
|
G(() => {
|
|
5399
|
-
d(f.
|
|
5400
|
-
}, [f
|
|
5423
|
+
d(f.endsWith("/mr") ? "mr" : "issue");
|
|
5424
|
+
}, [f, d]), G(() => {
|
|
5401
5425
|
if (!s || t === "idle" || t === "connect" || t === "applying") return;
|
|
5402
5426
|
const S = `/issues/${s.iid}`;
|
|
5403
5427
|
if (t === "reviewing") {
|
|
5404
5428
|
const N = `${S}/analysis/${n ?? 1}`;
|
|
5405
|
-
f
|
|
5429
|
+
f !== N && j(N);
|
|
5406
5430
|
} else if (t === "monitoring") {
|
|
5407
5431
|
const w = `${S}/mr`;
|
|
5408
|
-
f
|
|
5409
|
-
} else f.
|
|
5432
|
+
f !== w && j(w);
|
|
5433
|
+
} else f.startsWith(S) || j(S);
|
|
5410
5434
|
}, [t, s == null ? void 0 : s.iid, n]), G(() => {
|
|
5411
5435
|
if (!s || t === "idle" || t === "connect") return;
|
|
5412
5436
|
const S = `/issues/${s.iid}`;
|
|
5413
|
-
if (!f.
|
|
5437
|
+
if (!f.startsWith(S)) {
|
|
5414
5438
|
l();
|
|
5415
5439
|
return;
|
|
5416
5440
|
}
|
|
5417
|
-
const w = f.
|
|
5418
|
-
if (f
|
|
5441
|
+
const w = f.match(new RegExp(`^${S}/analysis/(\\d+)$`));
|
|
5442
|
+
if (f === `${S}/review`) {
|
|
5419
5443
|
const N = r[0];
|
|
5420
5444
|
N ? j(`${S}/analysis/${N.ordinal}`, { replace: !0 }) : j(S, { replace: !0 });
|
|
5421
5445
|
return;
|
|
@@ -5423,34 +5447,34 @@ function Ta() {
|
|
|
5423
5447
|
if (w) {
|
|
5424
5448
|
const N = Number(w[1]);
|
|
5425
5449
|
if (t === "reviewing" && n === N) return;
|
|
5426
|
-
|
|
5450
|
+
x(N) || j(S, { replace: !0 });
|
|
5427
5451
|
} else t === "reviewing" && i("selected");
|
|
5428
|
-
}, [f
|
|
5452
|
+
}, [f]);
|
|
5429
5453
|
const m = oe(!1);
|
|
5430
5454
|
return G(() => {
|
|
5431
|
-
if (m.current || !
|
|
5432
|
-
const S = f.
|
|
5455
|
+
if (m.current || !p() || !a || t !== "idle" && t !== "selected") return;
|
|
5456
|
+
const S = f.match(/^\/issues\/(\d+)/);
|
|
5433
5457
|
if (!S) return;
|
|
5434
5458
|
m.current = !0;
|
|
5435
|
-
const w = f.
|
|
5459
|
+
const w = f.match(/^\/issues\/\d+\/analysis\/(\d+)$/), N = f.endsWith("/review");
|
|
5436
5460
|
Y(
|
|
5437
5461
|
`/issues/${S[1]}?repo=${encodeURIComponent(a)}`
|
|
5438
5462
|
).then(({ issue: k }) => {
|
|
5439
5463
|
if (c(k), !(!w && !N))
|
|
5440
5464
|
if (w) {
|
|
5441
5465
|
const z = Number(w[1]);
|
|
5442
|
-
|
|
5466
|
+
x(z, k.iid) || j(`/issues/${k.iid}`, { replace: !0 });
|
|
5443
5467
|
} else {
|
|
5444
5468
|
const $ = _e(a, k.iid)[0];
|
|
5445
|
-
$ &&
|
|
5469
|
+
$ && x($.ordinal, k.iid) ? j(`/issues/${k.iid}/analysis/${$.ordinal}`, { replace: !0 }) : j(`/issues/${k.iid}`, { replace: !0 });
|
|
5446
5470
|
}
|
|
5447
5471
|
}).catch(() => j("/issues", { replace: !0 }));
|
|
5448
5472
|
}, [t, a]), null;
|
|
5449
5473
|
}
|
|
5450
|
-
function
|
|
5451
|
-
const { taskModalOpen: t, setTaskModalOpen: s } = $e(), { handleCreateIssue: n, handleSelectIssue: r } = pe(), a =
|
|
5474
|
+
function $a() {
|
|
5475
|
+
const { taskModalOpen: t, setTaskModalOpen: s } = $e(), { handleCreateIssue: n, handleSelectIssue: r } = pe(), { navigate: a } = Pe(), [i, l] = h(""), [c, x] = h(""), [p, d] = h(!1), [j, f] = h(null);
|
|
5452
5476
|
if (G(() => {
|
|
5453
|
-
t || (l(""),
|
|
5477
|
+
t || (l(""), x(""), f(null), d(!1));
|
|
5454
5478
|
}, [t]), G(() => {
|
|
5455
5479
|
if (!t) return;
|
|
5456
5480
|
const S = (w) => {
|
|
@@ -5510,7 +5534,7 @@ function _a() {
|
|
|
5510
5534
|
{
|
|
5511
5535
|
placeholder: "Describe what you want done. The more detail, the better the analysis.",
|
|
5512
5536
|
value: c,
|
|
5513
|
-
onChange: (S) =>
|
|
5537
|
+
onChange: (S) => x(S.target.value),
|
|
5514
5538
|
rows: 6,
|
|
5515
5539
|
className: "w-full bg-zinc-800 border border-zinc-700 rounded px-3 py-2 text-sm text-white placeholder:text-zinc-500 focus:outline-none focus:border-violet-500 resize-y"
|
|
5516
5540
|
}
|
|
@@ -5531,9 +5555,9 @@ function _a() {
|
|
|
5531
5555
|
"button",
|
|
5532
5556
|
{
|
|
5533
5557
|
type: "submit",
|
|
5534
|
-
disabled:
|
|
5558
|
+
disabled: p || !i.trim(),
|
|
5535
5559
|
className: "bg-violet-600 hover:bg-violet-500 disabled:opacity-40 disabled:cursor-not-allowed text-white text-xs font-medium px-4 py-1.5 rounded transition-colors",
|
|
5536
|
-
children:
|
|
5560
|
+
children: p ? "Creating..." : "Create task"
|
|
5537
5561
|
}
|
|
5538
5562
|
)
|
|
5539
5563
|
] })
|
|
@@ -5543,10 +5567,10 @@ function _a() {
|
|
|
5543
5567
|
}
|
|
5544
5568
|
);
|
|
5545
5569
|
}
|
|
5546
|
-
function
|
|
5570
|
+
function pt(t) {
|
|
5547
5571
|
return t >= 1e6 ? `${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${(t / 1e3).toFixed(0)}k` : String(t);
|
|
5548
5572
|
}
|
|
5549
|
-
function
|
|
5573
|
+
function Pa({ usage: t, selectedModel: s, agent: n }) {
|
|
5550
5574
|
const { inputTokens: r, outputTokens: a, cacheCreationTokens: i, cacheReadTokens: l } = t, c = r + a;
|
|
5551
5575
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 text-xs text-zinc-400", children: [
|
|
5552
5576
|
n && /* @__PURE__ */ e.jsx(
|
|
@@ -5559,19 +5583,19 @@ function Ea({ usage: t, selectedModel: s, agent: n }) {
|
|
|
5559
5583
|
s && /* @__PURE__ */ e.jsx("span", { className: "text-zinc-600 text-[11px]", children: s.label }),
|
|
5560
5584
|
c > 0 && /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-1.5 font-mono text-[11px] tabular-nums", children: [
|
|
5561
5585
|
/* @__PURE__ */ e.jsxs("span", { className: "text-blue-400", title: "Input tokens", children: [
|
|
5562
|
-
|
|
5586
|
+
pt(r),
|
|
5563
5587
|
"↓"
|
|
5564
5588
|
] }),
|
|
5565
5589
|
/* @__PURE__ */ e.jsxs("span", { className: "text-emerald-400", title: "Output tokens", children: [
|
|
5566
|
-
|
|
5590
|
+
pt(a),
|
|
5567
5591
|
"↑"
|
|
5568
5592
|
] }),
|
|
5569
5593
|
i > 0 && /* @__PURE__ */ e.jsxs("span", { className: "text-amber-400/70", title: "Cache write", children: [
|
|
5570
|
-
|
|
5594
|
+
pt(i),
|
|
5571
5595
|
"c↑"
|
|
5572
5596
|
] }),
|
|
5573
5597
|
l > 0 && /* @__PURE__ */ e.jsxs("span", { className: "text-teal-400/70", title: "Cache read", children: [
|
|
5574
|
-
|
|
5598
|
+
pt(l),
|
|
5575
5599
|
"c↓"
|
|
5576
5600
|
] })
|
|
5577
5601
|
] }),
|
|
@@ -5588,7 +5612,7 @@ function Ea({ usage: t, selectedModel: s, agent: n }) {
|
|
|
5588
5612
|
)
|
|
5589
5613
|
] });
|
|
5590
5614
|
}
|
|
5591
|
-
function
|
|
5615
|
+
function Ia() {
|
|
5592
5616
|
const {
|
|
5593
5617
|
availableRepos: t,
|
|
5594
5618
|
selectedRepo: s,
|
|
@@ -5599,12 +5623,12 @@ function Aa() {
|
|
|
5599
5623
|
selectedModel: l,
|
|
5600
5624
|
usage: c
|
|
5601
5625
|
} = le(), {
|
|
5602
|
-
setSelectedRepo:
|
|
5603
|
-
setSelectedSecondaryRepos:
|
|
5626
|
+
setSelectedRepo: x,
|
|
5627
|
+
setSelectedSecondaryRepos: p,
|
|
5604
5628
|
setSelectedAgent: d,
|
|
5605
5629
|
setSelectedModel: j
|
|
5606
5630
|
} = pe(), f = (m) => {
|
|
5607
|
-
|
|
5631
|
+
p(
|
|
5608
5632
|
n.includes(m) ? n.filter((S) => S !== m) : [...n, m]
|
|
5609
5633
|
);
|
|
5610
5634
|
};
|
|
@@ -5615,7 +5639,7 @@ function Aa() {
|
|
|
5615
5639
|
"select",
|
|
5616
5640
|
{
|
|
5617
5641
|
value: s,
|
|
5618
|
-
onChange: (m) =>
|
|
5642
|
+
onChange: (m) => x(m.target.value),
|
|
5619
5643
|
className: "bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 focus:outline-none focus:border-violet-500",
|
|
5620
5644
|
children: t.map((m) => /* @__PURE__ */ e.jsx("option", { value: m.id, children: m.label }, m.id))
|
|
5621
5645
|
}
|
|
@@ -5669,7 +5693,7 @@ function Aa() {
|
|
|
5669
5693
|
] }),
|
|
5670
5694
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
5671
5695
|
/* @__PURE__ */ e.jsx(
|
|
5672
|
-
|
|
5696
|
+
Pa,
|
|
5673
5697
|
{
|
|
5674
5698
|
usage: c,
|
|
5675
5699
|
selectedModel: i.find((m) => m.id === l),
|
|
@@ -5678,7 +5702,7 @@ function Aa() {
|
|
|
5678
5702
|
)
|
|
5679
5703
|
] });
|
|
5680
5704
|
}
|
|
5681
|
-
function
|
|
5705
|
+
function Oa() {
|
|
5682
5706
|
const [t, s] = h(!1), { handleDisconnect: n } = pe(), r = oe(null);
|
|
5683
5707
|
return G(() => {
|
|
5684
5708
|
if (!t) return;
|
|
@@ -5712,7 +5736,7 @@ function $a() {
|
|
|
5712
5736
|
)
|
|
5713
5737
|
] });
|
|
5714
5738
|
}
|
|
5715
|
-
function
|
|
5739
|
+
function ft({ label: t, icon: s, active: n, onClick: r, badgeCount: a }) {
|
|
5716
5740
|
const i = a !== void 0 && a > 0;
|
|
5717
5741
|
return /* @__PURE__ */ e.jsxs(
|
|
5718
5742
|
"button",
|
|
@@ -5735,9 +5759,9 @@ function mt({ label: t, icon: s, active: n, onClick: r, badgeCount: a }) {
|
|
|
5735
5759
|
}
|
|
5736
5760
|
);
|
|
5737
5761
|
}
|
|
5738
|
-
function
|
|
5739
|
-
const { issues: t, openMRs: s, openMRsLoading: n } = le(), { loadOpenMRs: r } = pe(), { setTaskModalOpen: a } = $e(),
|
|
5740
|
-
i(
|
|
5762
|
+
function Ma() {
|
|
5763
|
+
const { issues: t, openMRs: s, openMRsLoading: n } = le(), { loadOpenMRs: r } = pe(), { setTaskModalOpen: a } = $e(), { navigate: i, pathname: l } = Pe(), c = (p) => l === p || l.startsWith(`${p}/`), x = (p, d = !1) => {
|
|
5764
|
+
i(p, { replace: !0 }), d && s.length === 0 && !n && r();
|
|
5741
5765
|
};
|
|
5742
5766
|
return /* @__PURE__ */ e.jsxs("nav", { className: "flex flex-col gap-1", children: [
|
|
5743
5767
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5749,35 +5773,35 @@ function Pa() {
|
|
|
5749
5773
|
}
|
|
5750
5774
|
),
|
|
5751
5775
|
/* @__PURE__ */ e.jsx(
|
|
5752
|
-
|
|
5776
|
+
ft,
|
|
5753
5777
|
{
|
|
5754
5778
|
label: "Issues",
|
|
5755
5779
|
active: c("/issues"),
|
|
5756
|
-
onClick: () =>
|
|
5780
|
+
onClick: () => x("/issues"),
|
|
5757
5781
|
badgeCount: t.length
|
|
5758
5782
|
}
|
|
5759
5783
|
),
|
|
5760
5784
|
/* @__PURE__ */ e.jsx(
|
|
5761
|
-
|
|
5785
|
+
ft,
|
|
5762
5786
|
{
|
|
5763
5787
|
label: "Merge Requests",
|
|
5764
5788
|
active: c("/mrs"),
|
|
5765
|
-
onClick: () =>
|
|
5789
|
+
onClick: () => x("/mrs", !0),
|
|
5766
5790
|
badgeCount: s.length
|
|
5767
5791
|
}
|
|
5768
5792
|
),
|
|
5769
5793
|
/* @__PURE__ */ e.jsx(
|
|
5770
|
-
|
|
5794
|
+
ft,
|
|
5771
5795
|
{
|
|
5772
5796
|
label: "Pipelines",
|
|
5773
5797
|
active: c("/pipelines"),
|
|
5774
|
-
onClick: () =>
|
|
5775
|
-
badgeCount: s.filter((
|
|
5798
|
+
onClick: () => x("/pipelines", !0),
|
|
5799
|
+
badgeCount: s.filter((p) => p.pipeline).length
|
|
5776
5800
|
}
|
|
5777
5801
|
),
|
|
5778
5802
|
/* @__PURE__ */ e.jsx("div", { className: "h-2" }),
|
|
5779
5803
|
/* @__PURE__ */ e.jsx(
|
|
5780
|
-
|
|
5804
|
+
ft,
|
|
5781
5805
|
{
|
|
5782
5806
|
label: "Settings",
|
|
5783
5807
|
active: c("/settings"),
|
|
@@ -5786,28 +5810,28 @@ function Pa() {
|
|
|
5786
5810
|
)
|
|
5787
5811
|
] });
|
|
5788
5812
|
}
|
|
5789
|
-
function
|
|
5813
|
+
function La() {
|
|
5790
5814
|
return /* @__PURE__ */ e.jsxs("aside", { className: "w-56 shrink-0 border-r border-zinc-800 flex flex-col p-3 bg-zinc-950/40", children: [
|
|
5791
|
-
/* @__PURE__ */ e.jsx(
|
|
5815
|
+
/* @__PURE__ */ e.jsx(Ma, {}),
|
|
5792
5816
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
5793
|
-
/* @__PURE__ */ e.jsx(
|
|
5817
|
+
/* @__PURE__ */ e.jsx(Oa, {}),
|
|
5794
5818
|
/* @__PURE__ */ e.jsxs("span", { className: "text-[10px] text-zinc-700 text-center mt-2 select-all", children: [
|
|
5795
5819
|
"v",
|
|
5796
|
-
"1.
|
|
5820
|
+
"1.14.0"
|
|
5797
5821
|
] })
|
|
5798
5822
|
] });
|
|
5799
5823
|
}
|
|
5800
|
-
const
|
|
5801
|
-
function
|
|
5802
|
-
return
|
|
5824
|
+
const Da = ["/issues", "/mrs", "/pipelines"];
|
|
5825
|
+
function Fa(t) {
|
|
5826
|
+
return Da.includes(t);
|
|
5803
5827
|
}
|
|
5804
|
-
function
|
|
5805
|
-
const { phase: s, selectedIssue: n, applyResult: r } = le(), { handleReset: a, handleBackToIssue: i } = pe(), { setMrMerged: l } = $e(),
|
|
5828
|
+
function Ba({ popoutUrl: t }) {
|
|
5829
|
+
const { phase: s, selectedIssue: n, applyResult: r } = le(), { handleReset: a, handleBackToIssue: i } = pe(), { setMrMerged: l } = $e(), { navigate: c, pathname: x } = Pe(), p = oe("/issues");
|
|
5806
5830
|
G(() => {
|
|
5807
|
-
s === "idle" &&
|
|
5808
|
-
}, [
|
|
5831
|
+
s === "idle" && Fa(x) && (p.current = x);
|
|
5832
|
+
}, [x, s]);
|
|
5809
5833
|
const d = s !== "idle", j = r == null ? void 0 : r.applications[0], f = j == null ? void 0 : j.mr, m = () => {
|
|
5810
|
-
l(!1), a(), c(
|
|
5834
|
+
l(!1), a(), c(p.current, { replace: !0 });
|
|
5811
5835
|
};
|
|
5812
5836
|
return /* @__PURE__ */ e.jsxs("div", { className: "border-b border-zinc-800 px-6 py-3 flex items-center justify-between shrink-0", children: [
|
|
5813
5837
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
@@ -5862,28 +5886,28 @@ function La({ popoutUrl: t }) {
|
|
|
5862
5886
|
] })
|
|
5863
5887
|
] });
|
|
5864
5888
|
}
|
|
5865
|
-
function
|
|
5889
|
+
function Ua({ popoutUrl: t, children: s }) {
|
|
5866
5890
|
return /* @__PURE__ */ e.jsxs("div", { className: "text-white flex flex-col h-screen", children: [
|
|
5867
|
-
/* @__PURE__ */ e.jsx(
|
|
5891
|
+
/* @__PURE__ */ e.jsx(Ba, { popoutUrl: t }),
|
|
5868
5892
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 min-h-0", children: [
|
|
5869
|
-
/* @__PURE__ */ e.jsx(
|
|
5893
|
+
/* @__PURE__ */ e.jsx(La, {}),
|
|
5870
5894
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 min-w-0 min-h-0", children: [
|
|
5871
|
-
/* @__PURE__ */ e.jsx(
|
|
5895
|
+
/* @__PURE__ */ e.jsx(Ia, {}),
|
|
5872
5896
|
/* @__PURE__ */ e.jsx("main", { className: "flex-1 min-h-0 w-full px-6 py-8 overflow-y-auto", children: s })
|
|
5873
5897
|
] })
|
|
5874
5898
|
] }),
|
|
5875
|
-
/* @__PURE__ */ e.jsx(
|
|
5899
|
+
/* @__PURE__ */ e.jsx($a, {})
|
|
5876
5900
|
] });
|
|
5877
5901
|
}
|
|
5878
|
-
function
|
|
5879
|
-
return /* @__PURE__ */ e.jsxs(
|
|
5880
|
-
/* @__PURE__ */ e.jsx(
|
|
5881
|
-
/* @__PURE__ */ e.jsx(
|
|
5882
|
-
] });
|
|
5902
|
+
function Ga({ popoutUrl: t, basePath: s } = {}) {
|
|
5903
|
+
return /* @__PURE__ */ e.jsx(ur, { basePath: s, children: /* @__PURE__ */ e.jsxs(xr, { children: [
|
|
5904
|
+
/* @__PURE__ */ e.jsx(Aa, {}),
|
|
5905
|
+
/* @__PURE__ */ e.jsx(Va, { popoutUrl: t })
|
|
5906
|
+
] }) });
|
|
5883
5907
|
}
|
|
5884
|
-
function
|
|
5908
|
+
function Va({ popoutUrl: t }) {
|
|
5885
5909
|
const { phase: s, connectError: n, backendError: r, backendRetrying: a } = le(), { handleConnect: i, retryBackend: l } = pe();
|
|
5886
|
-
return s === "connect" ? /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsx(
|
|
5910
|
+
return s === "connect" ? /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsx(Fn, { onConnect: i, error: n }) }) : r ? /* @__PURE__ */ e.jsx("div", { className: "min-h-screen flex items-center justify-center bg-zinc-950 px-4", children: /* @__PURE__ */ e.jsxs("div", { className: "max-w-md w-full bg-red-950/40 border border-red-800 rounded-lg p-6 text-center", children: [
|
|
5887
5911
|
/* @__PURE__ */ e.jsx("h2", { className: "text-lg font-medium text-red-200 mb-2", children: "Forge backend unreachable" }),
|
|
5888
5912
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-red-300/80 mb-4 break-words", children: r }),
|
|
5889
5913
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5895,28 +5919,28 @@ function Fa({ popoutUrl: t }) {
|
|
|
5895
5919
|
children: a ? "Retrying…" : "Retry"
|
|
5896
5920
|
}
|
|
5897
5921
|
)
|
|
5898
|
-
] }) }) : /* @__PURE__ */ e.jsx(
|
|
5922
|
+
] }) }) : /* @__PURE__ */ e.jsx(Ua, { popoutUrl: t, children: /* @__PURE__ */ e.jsx(Ja, {}) });
|
|
5899
5923
|
}
|
|
5900
|
-
function
|
|
5901
|
-
const { phase: t } = le(), s =
|
|
5902
|
-
if (t === "idle" && s.
|
|
5903
|
-
return /* @__PURE__ */ e.jsx(
|
|
5924
|
+
function Ja() {
|
|
5925
|
+
const { phase: t } = le(), { pathname: s } = Pe();
|
|
5926
|
+
if (t === "idle" && s.startsWith("/settings"))
|
|
5927
|
+
return /* @__PURE__ */ e.jsx(Ea, {});
|
|
5904
5928
|
switch (t) {
|
|
5905
5929
|
case "idle":
|
|
5906
|
-
return /* @__PURE__ */ e.jsx(
|
|
5930
|
+
return /* @__PURE__ */ e.jsx(Br, {});
|
|
5907
5931
|
case "selected":
|
|
5908
|
-
return /* @__PURE__ */ e.jsx(
|
|
5932
|
+
return /* @__PURE__ */ e.jsx(va, {});
|
|
5909
5933
|
case "analyzing":
|
|
5910
|
-
return /* @__PURE__ */ e.jsx(
|
|
5934
|
+
return /* @__PURE__ */ e.jsx(wr, {});
|
|
5911
5935
|
case "reviewing":
|
|
5912
5936
|
case "applying":
|
|
5913
|
-
return /* @__PURE__ */ e.jsx(
|
|
5937
|
+
return /* @__PURE__ */ e.jsx(fa, {});
|
|
5914
5938
|
case "monitoring":
|
|
5915
|
-
return /* @__PURE__ */ e.jsx(
|
|
5939
|
+
return /* @__PURE__ */ e.jsx(ta, {});
|
|
5916
5940
|
default:
|
|
5917
5941
|
return null;
|
|
5918
5942
|
}
|
|
5919
5943
|
}
|
|
5920
5944
|
export {
|
|
5921
|
-
|
|
5945
|
+
Ga as ForgeDashboard
|
|
5922
5946
|
};
|