@ipul-labs/forge 1.13.0 → 1.13.1

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,5 +1,5 @@
1
1
  import * as S from "react";
2
- import Ar, { useState as b, useSyncExternalStore as Ir, useRef as de, useEffect as Q, createContext as an, useContext as Or, useMemo as dt, useCallback as en } from "react";
2
+ import Ar, { useState as b, useSyncExternalStore as Ir, useRef as de, useEffect as Q, createContext as an, useContext as Lr, useMemo as dt, useCallback as en } from "react";
3
3
  var tn = { exports: {} }, rt = {};
4
4
  /**
5
5
  * @license React
@@ -11,7 +11,7 @@ var tn = { exports: {} }, rt = {};
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
13
  var Vn;
14
- function Lr() {
14
+ function Or() {
15
15
  if (Vn) return rt;
16
16
  Vn = 1;
17
17
  var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
@@ -75,14 +75,14 @@ function Mr() {
75
75
  case C:
76
76
  return (v._context.displayName || "Context") + ".Consumer";
77
77
  case W:
78
- var L = v.render;
79
- return v = v.displayName, v || (v = L.displayName || L.name || "", v = v !== "" ? "ForwardRef(" + v + ")" : "ForwardRef"), v;
78
+ var O = v.render;
79
+ return v = v.displayName, v || (v = O.displayName || O.name || "", v = v !== "" ? "ForwardRef(" + v + ")" : "ForwardRef"), v;
80
80
  case I:
81
- return L = v.displayName || null, L !== null ? L : t(v.type) || "Memo";
81
+ return O = v.displayName || null, O !== null ? O : t(v.type) || "Memo";
82
82
  case V:
83
- L = v._payload, v = v._init;
83
+ O = v._payload, v = v._init;
84
84
  try {
85
- return t(v(L));
85
+ return t(v(O));
86
86
  } catch {
87
87
  }
88
88
  }
@@ -94,15 +94,15 @@ function Mr() {
94
94
  function s(v) {
95
95
  try {
96
96
  n(v);
97
- var L = !1;
97
+ var O = !1;
98
98
  } catch {
99
- L = !0;
99
+ O = !0;
100
100
  }
101
- if (L) {
102
- L = console;
103
- var G = L.error, ne = typeof Symbol == "function" && Symbol.toStringTag && v[Symbol.toStringTag] || v.constructor.name || "Object";
101
+ if (O) {
102
+ O = console;
103
+ var G = O.error, ne = typeof Symbol == "function" && Symbol.toStringTag && v[Symbol.toStringTag] || v.constructor.name || "Object";
104
104
  return G.call(
105
- L,
105
+ O,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
107
  ne
108
108
  ), n(v);
@@ -113,8 +113,8 @@ function Mr() {
113
113
  if (typeof v == "object" && v !== null && v.$$typeof === V)
114
114
  return "<...>";
115
115
  try {
116
- var L = t(v);
117
- return L ? "<" + L + ">" : "<...>";
116
+ var O = t(v);
117
+ return O ? "<" + O + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
@@ -127,17 +127,17 @@ function Mr() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
129
  function i(v) {
130
- if (O.call(v, "key")) {
131
- var L = Object.getOwnPropertyDescriptor(v, "key").get;
132
- if (L && L.isReactWarning) return !1;
130
+ if (L.call(v, "key")) {
131
+ var O = Object.getOwnPropertyDescriptor(v, "key").get;
132
+ if (O && O.isReactWarning) return !1;
133
133
  }
134
134
  return v.key !== void 0;
135
135
  }
136
- function o(v, L) {
136
+ function o(v, O) {
137
137
  function G() {
138
138
  ae || (ae = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
- L
140
+ O
141
141
  ));
142
142
  }
143
143
  G.isReactWarning = !0, Object.defineProperty(v, "key", {
@@ -151,12 +151,12 @@ function Mr() {
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
  )), v = this.props.ref, v !== void 0 ? v : null;
153
153
  }
154
- function u(v, L, G, ne, we, Ce) {
154
+ function u(v, O, G, ne, we, Ce) {
155
155
  var ee = G.ref;
156
156
  return v = {
157
157
  $$typeof: z,
158
158
  type: v,
159
- key: L,
159
+ key: O,
160
160
  props: G,
161
161
  _owner: ne
162
162
  }, (ee !== void 0 ? ee : null) !== null ? Object.defineProperty(v, "ref", {
@@ -184,8 +184,8 @@ function Mr() {
184
184
  value: Ce
185
185
  }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
186
186
  }
187
- function c(v, L, G, ne, we, Ce) {
188
- var ee = L.children;
187
+ function c(v, O, G, ne, we, Ce) {
188
+ var ee = O.children;
189
189
  if (ee !== void 0)
190
190
  if (ne)
191
191
  if (J(ee)) {
@@ -197,9 +197,9 @@ function Mr() {
197
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
198
  );
199
199
  else f(ee);
200
- if (O.call(L, "key")) {
200
+ if (L.call(O, "key")) {
201
201
  ee = t(v);
202
- var be = Object.keys(L).filter(function(K) {
202
+ var be = Object.keys(O).filter(function(K) {
203
203
  return K !== "key";
204
204
  });
205
205
  ne = 0 < be.length ? "{key: someKey, " + be.join(": ..., ") + ": ...}" : "{key: someKey}", xe[ee + ne] || (be = 0 < be.length ? "{" + be.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -215,11 +215,11 @@ React keys must be passed directly to JSX without using spread:
215
215
  ee
216
216
  ), xe[ee + ne] = !0);
217
217
  }
218
- if (ee = null, G !== void 0 && (s(G), ee = "" + G), i(L) && (s(L.key), ee = "" + L.key), "key" in L) {
218
+ if (ee = null, G !== void 0 && (s(G), ee = "" + G), i(O) && (s(O.key), ee = "" + O.key), "key" in O) {
219
219
  G = {};
220
- for (var Ee in L)
221
- Ee !== "key" && (G[Ee] = L[Ee]);
222
- } else G = L;
220
+ for (var Ee in O)
221
+ Ee !== "key" && (G[Ee] = O[Ee]);
222
+ } else G = O;
223
223
  return ee && o(
224
224
  G,
225
225
  typeof v == "function" ? v.displayName || v.name || "Unknown" : v
@@ -238,7 +238,7 @@ React keys must be passed directly to JSX without using spread:
238
238
  function p(v) {
239
239
  return typeof v == "object" && v !== null && v.$$typeof === z;
240
240
  }
241
- var h = Ar, z = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), q = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), H = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), ce = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, J = Array.isArray, T = console.createTask ? console.createTask : function() {
241
+ var h = Ar, z = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), q = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), H = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), ce = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, J = Array.isArray, T = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  h = {
@@ -250,21 +250,21 @@ React keys must be passed directly to JSX without using spread:
250
250
  h,
251
251
  l
252
252
  )(), te = T(r(l)), xe = {};
253
- at.Fragment = g, at.jsx = function(v, L, G) {
253
+ at.Fragment = g, at.jsx = function(v, O, G) {
254
254
  var ne = 1e4 > ce.recentlyCreatedOwnerStacks++;
255
255
  return c(
256
256
  v,
257
- L,
257
+ O,
258
258
  G,
259
259
  !1,
260
260
  ne ? Error("react-stack-top-frame") : ue,
261
261
  ne ? T(r(v)) : te
262
262
  );
263
- }, at.jsxs = function(v, L, G) {
263
+ }, at.jsxs = function(v, O, G) {
264
264
  var ne = 1e4 > ce.recentlyCreatedOwnerStacks++;
265
265
  return c(
266
266
  v,
267
- L,
267
+ O,
268
268
  G,
269
269
  !0,
270
270
  ne ? Error("react-stack-top-frame") : ue,
@@ -273,7 +273,7 @@ React keys must be passed directly to JSX without using spread:
273
273
  };
274
274
  }()), at;
275
275
  }
276
- process.env.NODE_ENV === "production" ? tn.exports = Lr() : tn.exports = Mr();
276
+ process.env.NODE_ENV === "production" ? tn.exports = Or() : tn.exports = Mr();
277
277
  var e = tn.exports;
278
278
  /**
279
279
  * react-router v7.14.1
@@ -289,7 +289,7 @@ function ve(t, n) {
289
289
  if (t === !1 || t === null || typeof t > "u")
290
290
  throw new Error(n);
291
291
  }
292
- function Le(t, n) {
292
+ function Oe(t, n) {
293
293
  if (!t) {
294
294
  typeof console < "u" && console.warn(n);
295
295
  try {
@@ -477,7 +477,7 @@ function Tt(t, n) {
477
477
  };
478
478
  }
479
479
  function Kr(t, n = !1, s = !0) {
480
- Le(
480
+ Oe(
481
481
  t === "*" || !t.endsWith("*") || t.endsWith("/*"),
482
482
  `Route path "${t}" will be treated as if it were "${t.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/, "/*")}".`
483
483
  );
@@ -497,7 +497,7 @@ function Xr(t) {
497
497
  try {
498
498
  return t.split("/").map((n) => decodeURIComponent(n).replace(/\//g, "%2F")).join("/");
499
499
  } catch (n) {
500
- return Le(
500
+ return Oe(
501
501
  !1,
502
502
  `The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`
503
503
  ), t;
@@ -600,7 +600,7 @@ function os(t, n) {
600
600
  let l = new URL(window.location.href), i = s.startsWith("//") ? new URL(l.protocol + s) : new URL(s), o = Fe(i.pathname, n);
601
601
  i.origin === l.origin && o != null ? s = o + i.search + i.hash : a = !0;
602
602
  } catch {
603
- Le(
603
+ Oe(
604
604
  !1,
605
605
  `<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
606
606
  );
@@ -726,7 +726,7 @@ function ma() {
726
726
  i.current = !0;
727
727
  }), S.useCallback(
728
728
  (d, u = {}) => {
729
- if (Le(i.current, fs), !i.current) return;
729
+ if (Oe(i.current, fs), !i.current) return;
730
730
  if (typeof d == "number") {
731
731
  s.go(d);
732
732
  return;
@@ -791,10 +791,10 @@ Please change the parent <Route path="${g}"> to <Route path="${g === "/" ? "*" :
791
791
  h = "/" + p.replace(/^\//, "").split("/").slice(g.length).join("/");
792
792
  }
793
793
  let z = ns(t, { pathname: h });
794
- return Le(
794
+ return Oe(
795
795
  u || z != null,
796
796
  `No routes matched location "${f.pathname}${f.search}${f.hash}" `
797
- ), Le(
797
+ ), Oe(
798
798
  z == null || z[z.length - 1].route.element !== void 0 || z[z.length - 1].route.Component !== void 0 || z[z.length - 1].route.lazy !== void 0,
799
799
  `Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
800
800
  ), Na(
@@ -1057,14 +1057,14 @@ function Ca() {
1057
1057
  s.current = !0;
1058
1058
  }), S.useCallback(
1059
1059
  async (a, l = {}) => {
1060
- Le(s.current, fs), s.current && (typeof a == "number" ? await t.navigate(a) : await t.navigate(a, { fromRouteId: n, ...l }));
1060
+ Oe(s.current, fs), s.current && (typeof a == "number" ? await t.navigate(a) : await t.navigate(a, { fromRouteId: n, ...l }));
1061
1061
  },
1062
1062
  [t, n]
1063
1063
  );
1064
1064
  }
1065
1065
  var Hn = {};
1066
1066
  function ms(t, n, s) {
1067
- !n && !Hn[t] && (Hn[t] = !0, Le(!1, s));
1067
+ !n && !Hn[t] && (Hn[t] = !0, Oe(!1, s));
1068
1068
  }
1069
1069
  S.memo(Ea);
1070
1070
  function Ea({
@@ -1111,18 +1111,18 @@ function Ia() {
1111
1111
  }
1112
1112
  return Nt;
1113
1113
  }
1114
- var Oa = /* @__PURE__ */ new Set([
1114
+ var La = /* @__PURE__ */ new Set([
1115
1115
  "application/x-www-form-urlencoded",
1116
1116
  "multipart/form-data",
1117
1117
  "text/plain"
1118
1118
  ]);
1119
1119
  function Gt(t) {
1120
- return t != null && !Oa.has(t) ? (Le(
1120
+ return t != null && !La.has(t) ? (Oe(
1121
1121
  !1,
1122
1122
  `"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ct}"`
1123
1123
  ), null) : t;
1124
1124
  }
1125
- function La(t, n) {
1125
+ function Oa(t, n) {
1126
1126
  let s, r, a, l, i;
1127
1127
  if (_a(t)) {
1128
1128
  let o = t.getAttribute("action");
@@ -1509,15 +1509,15 @@ var bs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ys = S.forwardRef(
1509
1509
  function ce(T) {
1510
1510
  n && n(T), T.defaultPrevented || se(T);
1511
1511
  }
1512
- let O = !(q.isExternal || l), J = (
1512
+ let L = !(q.isExternal || l), J = (
1513
1513
  // eslint-disable-next-line jsx-a11y/anchor-has-content
1514
1514
  /* @__PURE__ */ S.createElement(
1515
1515
  "a",
1516
1516
  {
1517
1517
  ...z,
1518
1518
  ...Z,
1519
- href: (O ? k : void 0) || q.absoluteURL || W,
1520
- onClick: O ? ce : n,
1519
+ href: (L ? k : void 0) || q.absoluteURL || W,
1520
+ onClick: L ? ce : n,
1521
1521
  ref: Xa(y, V),
1522
1522
  target: u,
1523
1523
  "data-discover": !C && s === "render" ? "true" : void 0
@@ -1680,7 +1680,7 @@ function al() {
1680
1680
  ), { basename: n } = S.useContext(Pe), s = Ra(), r = t.fetch, a = t.navigate;
1681
1681
  return S.useCallback(
1682
1682
  async (l, i = {}) => {
1683
- let { action: o, method: d, encType: u, formData: c, body: f } = La(
1683
+ let { action: o, method: d, encType: u, formData: c, body: f } = Oa(
1684
1684
  l,
1685
1685
  n
1686
1686
  );
@@ -1784,7 +1784,7 @@ function ol({ onConnect: t, error: n }) {
1784
1784
  )
1785
1785
  ] });
1786
1786
  }
1787
- const cl = { BASE_URL: "/", DEV: !1, MODE: "lib", PROD: !0, SSR: !1, VITE_FORGE_TOKEN: "51afb6f3e98afc446b8ab0f7532a066890e41f5da8b29f07b037053353107478" }, dl = (t) => cl[t];
1787
+ const cl = { BASE_URL: "/", DEV: !1, MODE: "lib", PROD: !0, SSR: !1 }, dl = (t) => cl[t] ?? "";
1788
1788
  let gn = "";
1789
1789
  function Se() {
1790
1790
  return gn || dl("VITE_FORGE_TOKEN");
@@ -1867,14 +1867,14 @@ function hl(t) {
1867
1867
  ordinal: typeof s.ordinal == "number" ? s.ordinal : n - r
1868
1868
  }));
1869
1869
  }
1870
- function Ot(t, n) {
1870
+ function Lt(t, n) {
1871
1871
  try {
1872
1872
  const s = localStorage.getItem($t(t, n));
1873
1873
  if (s) {
1874
1874
  const a = JSON.parse(s);
1875
1875
  if (Array.isArray(a)) {
1876
1876
  const l = hl(a);
1877
- return l !== a && Lt(t, n, l), l;
1877
+ return l !== a && Ot(t, n, l), l;
1878
1878
  }
1879
1879
  }
1880
1880
  const r = localStorage.getItem(sn(t, n));
@@ -1890,7 +1890,7 @@ function Ot(t, n) {
1890
1890
  }
1891
1891
  return [];
1892
1892
  }
1893
- function Lt(t, n, s) {
1893
+ function Ot(t, n, s) {
1894
1894
  try {
1895
1895
  localStorage.setItem($t(t, n), JSON.stringify(s));
1896
1896
  } catch {
@@ -1900,7 +1900,7 @@ function ml() {
1900
1900
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
1901
1901
  }
1902
1902
  function gl(t, n, s, r, a, l, i) {
1903
- const o = l == null ? void 0 : l.trim(), d = Ot(t, n), u = d.reduce((p, h) => Math.max(p, h.ordinal ?? 0), 0) + 1, c = {
1903
+ const o = l == null ? void 0 : l.trim(), d = Lt(t, n), u = d.reduce((p, h) => Math.max(p, h.ordinal ?? 0), 0) + 1, c = {
1904
1904
  id: ml(),
1905
1905
  ordinal: u,
1906
1906
  result: s,
@@ -1911,20 +1911,20 @@ function gl(t, n, s, r, a, l, i) {
1911
1911
  ...o && { prompt: o },
1912
1912
  ...i
1913
1913
  }, f = [c, ...d].slice(0, pl);
1914
- return Lt(t, n, f), c;
1914
+ return Ot(t, n, f), c;
1915
1915
  }
1916
- function Oe(t, n, s, r) {
1917
- const a = Ot(t, n), l = a.findIndex((d) => d.ordinal === s);
1916
+ function Le(t, n, s, r) {
1917
+ const a = Lt(t, n), l = a.findIndex((d) => d.ordinal === s);
1918
1918
  if (l < 0) return null;
1919
1919
  const i = { ...a[l], ...r }, o = [...a];
1920
- return o[l] = i, Lt(t, n, o), i;
1920
+ return o[l] = i, Ot(t, n, o), i;
1921
1921
  }
1922
1922
  function Ie(t, n) {
1923
- return Ot(t, n);
1923
+ return Lt(t, n);
1924
1924
  }
1925
1925
  function bl(t, n, s) {
1926
- const r = Ot(t, n).filter((a) => a.id !== s);
1927
- Lt(t, n, r);
1926
+ const r = Lt(t, n).filter((a) => a.id !== s);
1927
+ Ot(t, n, r);
1928
1928
  }
1929
1929
  function yl(t, n) {
1930
1930
  try {
@@ -2087,8 +2087,8 @@ function Kn(t) {
2087
2087
  }
2088
2088
  }
2089
2089
  function El() {
2090
- const [t, n] = b(() => Se() ? typeof window < "u" && /^\/issues\/\d+/.test(window.location.pathname) ? "selected" : "idle" : "connect"), [s, r] = b(null), [a, l] = b([]), [i, o] = b(() => !!Se()), [d, u] = b(null), [c, f] = b(null), [p, h] = b([]), [z, y] = b([]), [g, N] = b(null), [w, C] = b([]), [q, W] = b(null), [H, k] = b(null), [I, V] = b(null), [Z, se] = b(!1), [ce, O] = b([]), [J, T] = b(null), [ae, le] = b(!1), [ue, te] = b(null), [xe, v] = b(null), [L, G] = b(null), [ne, we] = b(!1), [Ce, ee] = b([]), [be, Ee] = b([]), [K, ie] = b(!1), [Ae, Ne] = b([]), [We, Ge] = b(!1), [$s, Nn] = b(null), [Ft, Bt] = b(null), [Ps, wn] = b(!1), [As, ft] = b(null), [Ke, he] = b(!1), [pt, Xe] = b([]), [Is, Te] = b([]), [Os, ht] = b("analyze"), [zn, kn] = b(""), {
2091
- usage: Ls,
2090
+ const [t, n] = b(() => Se() ? typeof window < "u" && /^\/issues\/\d+/.test(window.location.pathname) ? "selected" : "idle" : "connect"), [s, r] = b(null), [a, l] = b([]), [i, o] = b(() => !!Se()), [d, u] = b(null), [c, f] = b(null), [p, h] = b([]), [z, y] = b([]), [g, N] = b(null), [w, C] = b([]), [q, W] = b(null), [H, k] = b(null), [I, V] = b(null), [Z, se] = b(!1), [ce, L] = b([]), [J, T] = b(null), [ae, le] = b(!1), [ue, te] = b(null), [xe, v] = b(null), [O, G] = b(null), [ne, we] = b(!1), [Ce, ee] = b([]), [be, Ee] = b([]), [K, ie] = b(!1), [Ae, Ne] = b([]), [We, Ge] = b(!1), [$s, Nn] = b(null), [Ft, Bt] = b(null), [Ps, wn] = b(!1), [As, ft] = b(null), [Ke, he] = b(!1), [pt, Xe] = b([]), [Is, Te] = b([]), [Ls, ht] = b("analyze"), [zn, kn] = b(""), {
2091
+ usage: Os,
2092
2092
  rateLimit: Ms,
2093
2093
  quotaLoading: Ds,
2094
2094
  quotaError: Fs,
@@ -2262,7 +2262,7 @@ function El() {
2262
2262
  f(R.issue), l((j) => j.map((_) => _.iid === R.issue.iid ? R.issue : _));
2263
2263
  }, dr = (x) => {
2264
2264
  var j, _;
2265
- (j = Y.current) == null || j.close(), Y.current = null, (_ = je.current) == null || _.close(), je.current = null, ze.current.clear(), f(x), G(null), we(!0), ee([]), Ee([]), ie(!0), h([]), y([]), N(null), k(null), te(null), v(null), Bt(null), ft(null), O(Ie(D || "default", x.iid)), ye(_e), Re(null), he(!1), Xe([]), Ue(!1), Te([]), T(null), n("selected");
2265
+ (j = Y.current) == null || j.close(), Y.current = null, (_ = je.current) == null || _.close(), je.current = null, ze.current.clear(), f(x), G(null), we(!0), ee([]), Ee([]), ie(!0), h([]), y([]), N(null), k(null), te(null), v(null), Bt(null), ft(null), L(Ie(D || "default", x.iid)), ye(_e), Re(null), he(!1), Xe([]), Ue(!1), Te([]), T(null), n("selected");
2266
2266
  const m = [D, ...fe].filter(Boolean);
2267
2267
  Promise.all(
2268
2268
  m.map(
@@ -2316,7 +2316,7 @@ function El() {
2316
2316
  const me = [...F, ...P];
2317
2317
  me.length && te({ applications: me });
2318
2318
  });
2319
- }, On = (x, m) => {
2319
+ }, Ln = (x, m) => {
2320
2320
  var P;
2321
2321
  const { submittedPrompt: R, model: j, existingMrIid: _, issueIid: E, repoKey: A } = m;
2322
2322
  let $ = null;
@@ -2347,7 +2347,7 @@ function El() {
2347
2347
  _,
2348
2348
  R
2349
2349
  );
2350
- O(Ie(A, E)), T(re.ordinal), ye(_e), Re(null);
2350
+ L(Ie(A, E)), T(re.ordinal), ye(_e), Re(null);
2351
2351
  }
2352
2352
  n("reviewing");
2353
2353
  } else U.type === "error" ? ((M = Y.current) == null || M.close(), Y.current = null, ge(A, E, "analyze"), k(U.message), n("reviewing")) : U.type === "cancelled" && ((B = Y.current) == null || B.close(), Y.current = null, ge(A, E, "analyze"), h([]), y([]), N(null), k(null), n("selected"));
@@ -2359,7 +2359,7 @@ function El() {
2359
2359
  );
2360
2360
  }, ur = async () => {
2361
2361
  if (!c) return;
2362
- const x = L ? "update" : ce.length > 0 ? "new" : Ce.length > 0 && Ft && !Ft.resolved ? "retry" : "fresh";
2362
+ const x = O ? "update" : ce.length > 0 ? "new" : Ce.length > 0 && Ft && !Ft.resolved ? "retry" : "fresh";
2363
2363
  h([]), y([]), N(null), k(null), C([]), W(null), ht("analyze"), n("analyzing");
2364
2364
  const m = zn.trim();
2365
2365
  kn("");
@@ -2380,7 +2380,7 @@ function El() {
2380
2380
  ), j = D || "default", _ = {
2381
2381
  submittedPrompt: m,
2382
2382
  model: et,
2383
- existingMrIid: L == null ? void 0 : L.iid,
2383
+ existingMrIid: O == null ? void 0 : O.iid,
2384
2384
  issueIid: c.iid,
2385
2385
  repoKey: j
2386
2386
  };
@@ -2389,9 +2389,9 @@ function El() {
2389
2389
  meta: {
2390
2390
  submittedPrompt: m,
2391
2391
  model: et,
2392
- existingMrIid: L == null ? void 0 : L.iid
2392
+ existingMrIid: O == null ? void 0 : O.iid
2393
2393
  }
2394
- }), ze.current.add(R), On(R, _);
2394
+ }), ze.current.add(R), Ln(R, _);
2395
2395
  } catch (R) {
2396
2396
  k(R.message), n("reviewing");
2397
2397
  }
@@ -2404,7 +2404,7 @@ function El() {
2404
2404
  await X(`/jobs/${m.jobId}/cancel`, { method: "POST" });
2405
2405
  } catch {
2406
2406
  }
2407
- }, Ln = () => ({
2407
+ }, On = () => ({
2408
2408
  repo: D,
2409
2409
  secondaryRepos: fe
2410
2410
  }), vt = (x, m) => {
@@ -2541,7 +2541,7 @@ function El() {
2541
2541
  });
2542
2542
  if (!U) return P;
2543
2543
  const M = { ...P, changes: me };
2544
- return De.current = me, c && J != null && Oe(
2544
+ return De.current = me, c && J != null && Le(
2545
2545
  D || "default",
2546
2546
  c.iid,
2547
2547
  J,
@@ -2575,12 +2575,12 @@ function El() {
2575
2575
  }, [g == null ? void 0 : g.changes]), Q(() => {
2576
2576
  if (Ut || !c || J == null) return;
2577
2577
  const x = Sl(Ze) ? Ze : void 0;
2578
- Oe(
2578
+ Le(
2579
2579
  D || "default",
2580
2580
  c.iid,
2581
2581
  J,
2582
2582
  { validation: x }
2583
- ), O(Ie(D || "default", c.iid));
2583
+ ), L(Ie(D || "default", c.iid));
2584
2584
  }, [Ut, Ze, J, c, D]), Q(() => () => {
2585
2585
  var x;
2586
2586
  (x = je.current) == null || x.close(), je.current = null;
@@ -2596,7 +2596,7 @@ function El() {
2596
2596
  if (j) return;
2597
2597
  ze.current.add(R.jobId);
2598
2598
  const E = R.meta ?? {};
2599
- h([]), y([]), N(null), k(null), C([]), W(null), ht("analyze"), _.status === "running" && n("analyzing"), On(R.jobId, {
2599
+ h([]), y([]), N(null), k(null), C([]), W(null), ht("analyze"), _.status === "running" && n("analyzing"), Ln(R.jobId, {
2600
2600
  submittedPrompt: E.submittedPrompt ?? "",
2601
2601
  model: E.model ?? "",
2602
2602
  existingMrIid: E.existingMrIid,
@@ -2629,7 +2629,7 @@ function El() {
2629
2629
  const $ = Ie(x, m).find((P) => P.ordinal === J);
2630
2630
  if (!($ != null && $.refineThread)) return;
2631
2631
  const F = Xt($.refineThread);
2632
- F.some((P, U) => P !== $.refineThread[U]) && (Oe(x, m, $.ordinal, { refineThread: F }), C(F));
2632
+ F.some((P, U) => P !== $.refineThread[U]) && (Le(x, m, $.ordinal, { refineThread: F }), C(F));
2633
2633
  };
2634
2634
  let _ = !1;
2635
2635
  return X(`/jobs/${R.jobId}`).then(
@@ -2689,7 +2689,7 @@ function El() {
2689
2689
  try {
2690
2690
  const x = await X("/apply", {
2691
2691
  method: "POST",
2692
- body: JSON.stringify({ analysis: g, ...Ln() })
2692
+ body: JSON.stringify({ analysis: g, ...On() })
2693
2693
  });
2694
2694
  te(x), n("monitoring");
2695
2695
  } catch (x) {
@@ -2704,7 +2704,7 @@ function El() {
2704
2704
  try {
2705
2705
  const x = await X("/deploy-branch", {
2706
2706
  method: "POST",
2707
- body: JSON.stringify({ analysis: g, ...Ln() })
2707
+ body: JSON.stringify({ analysis: g, ...On() })
2708
2708
  });
2709
2709
  te(x), n("monitoring");
2710
2710
  } catch (x) {
@@ -2777,7 +2777,7 @@ function El() {
2777
2777
  if (!m) return;
2778
2778
  N(m.result), k(null), h([]), y([]);
2779
2779
  const R = D || "default", _ = c && !!He(R, c.iid, "refine") ? m.refineThread ?? [] : Xt(m.refineThread);
2780
- C(_), W(m.claudeSessionId ?? null), c && m.refineThread && _.some((E, A) => E !== m.refineThread[A]) && Oe(
2780
+ C(_), W(m.claudeSessionId ?? null), c && m.refineThread && _.some((E, A) => E !== m.refineThread[A]) && Le(
2781
2781
  R,
2782
2782
  c.iid,
2783
2783
  m.ordinal,
@@ -2788,32 +2788,32 @@ function El() {
2788
2788
  if (!R) return !1;
2789
2789
  const j = D || "default", _ = Ie(j, R), E = _.find((F) => F.ordinal === x);
2790
2790
  if (!E) return !1;
2791
- O(_), N(E.result), k(null), h([]), y([]);
2791
+ L(_), N(E.result), k(null), h([]), y([]);
2792
2792
  const $ = !!He(j, R, "refine") ? E.refineThread ?? [] : Xt(E.refineThread);
2793
- return C($), W(E.claudeSessionId ?? null), E.refineThread && $.some((F, P) => F !== E.refineThread[P]) && Oe(
2793
+ return C($), W(E.claudeSessionId ?? null), E.refineThread && $.some((F, P) => F !== E.refineThread[P]) && Le(
2794
2794
  j,
2795
2795
  R,
2796
2796
  E.ordinal,
2797
2797
  { refineThread: $ }
2798
2798
  ), T(E.ordinal), ye(Gn(E.validation)), Re(null), De.current = E.validation ? E.result.changes : null, n("reviewing"), !0;
2799
2799
  }, yr = (x) => {
2800
- c && (bl(D || "default", c.iid, x), O((m) => m.filter((R) => R.id !== x)));
2800
+ c && (bl(D || "default", c.iid, x), L((m) => m.filter((R) => R.id !== x)));
2801
2801
  }, vr = () => {
2802
- c && (yl(D || "default", c.iid), O([]), T(null), N(null), ye(_e), Re(null), De.current = null);
2802
+ c && (yl(D || "default", c.iid), L([]), T(null), N(null), ye(_e), Re(null), De.current = null);
2803
2803
  }, jr = () => {
2804
2804
  const x = vl();
2805
- return O([]), T(null), N(null), ye(_e), Re(null), De.current = null, x;
2805
+ return L([]), T(null), N(null), ye(_e), Re(null), De.current = null, x;
2806
2806
  }, Nr = (x) => {
2807
2807
  if (!c || Ke) return;
2808
2808
  const m = w[x];
2809
2809
  if (!m || m.kind !== "refine" || !m.prevResult) return;
2810
2810
  const R = w.slice(0, x), j = m.prevResult;
2811
- C(R), N(j), W(null), J != null && (Oe(
2811
+ C(R), N(j), W(null), J != null && (Le(
2812
2812
  D || "default",
2813
2813
  c.iid,
2814
2814
  J,
2815
2815
  { refineThread: R, result: j, claudeSessionId: void 0 }
2816
- ), O(Ie(D || "default", c.iid)));
2816
+ ), L(Ie(D || "default", c.iid)));
2817
2817
  }, wr = (x, m, R) => {
2818
2818
  var _;
2819
2819
  (_ = Y.current) == null || _.close();
@@ -2894,7 +2894,7 @@ function El() {
2894
2894
  } else P.type === "usage" ? Qe(P) : P.type === "done" ? ((U = Y.current) == null || U.close(), Y.current = null, he(!1), Te([]), ge(j, R, "refine"), C((M) => {
2895
2895
  if (J != null) {
2896
2896
  const B = { refineThread: M };
2897
- E && (B.result = E), A && (B.claudeSessionId = A), Oe(j, R, J, B), O(Ie(j, R));
2897
+ E && (B.result = E), A && (B.claudeSessionId = A), Le(j, R, J, B), L(Ie(j, R));
2898
2898
  }
2899
2899
  return M;
2900
2900
  })) : P.type === "error" && ((me = Y.current) == null || me.close(), Y.current = null, ge(j, R, "refine"), k(P.message), he(!1), Te([]));
@@ -2934,12 +2934,12 @@ function El() {
2934
2934
  zt($, F, "refine", {
2935
2935
  jobId: A,
2936
2936
  meta: { ordinal: J }
2937
- }), J != null && (Oe(
2937
+ }), J != null && (Le(
2938
2938
  $,
2939
2939
  F,
2940
2940
  J,
2941
2941
  { refineThread: R }
2942
- ), O(Ie($, F))), ze.current.add(A), wr(
2942
+ ), L(Ie($, F))), ze.current.add(A), wr(
2943
2943
  A,
2944
2944
  (P) => {
2945
2945
  var U, me;
@@ -2979,12 +2979,12 @@ function El() {
2979
2979
  } else P.type === "usage" ? Qe(P) : P.type === "done" ? ((U = Y.current) == null || U.close(), Y.current = null, he(!1), Te([]), ge($, F, "refine"), C((M) => {
2980
2980
  if (c && J != null) {
2981
2981
  const B = { refineThread: M };
2982
- j && (B.result = j), E && (B.claudeSessionId = E), Oe(
2982
+ j && (B.result = j), E && (B.claudeSessionId = E), Le(
2983
2983
  D || "default",
2984
2984
  c.iid,
2985
2985
  J,
2986
2986
  B
2987
- ), O(Ie(D || "default", c.iid));
2987
+ ), L(Ie(D || "default", c.iid));
2988
2988
  }
2989
2989
  return M;
2990
2990
  }), Je.current && (Je.current = !1, !_ && j && setTimeout(() => {
@@ -3110,12 +3110,12 @@ ${m.trim()}` : $;
3110
3110
  }
3111
3111
  }
3112
3112
  }, Er = () => {
3113
- L && (te({
3113
+ O && (te({
3114
3114
  applications: [
3115
3115
  {
3116
3116
  repo: D,
3117
- branchName: L.branchName,
3118
- mr: { iid: L.iid, web_url: L.web_url, title: L.title },
3117
+ branchName: O.branchName,
3118
+ mr: { iid: O.iid, web_url: O.web_url, title: O.title },
3119
3119
  pipelineUrl: null
3120
3120
  }
3121
3121
  ]
@@ -3137,7 +3137,7 @@ ${m.trim()}` : $;
3137
3137
  (x = Y.current) == null || x.close(), Y.current = null, (m = je.current) == null || m.close(), je.current = null, ze.current.clear(), Ue(!1), he(!1), Xe([]), T(null), ye(_e), Re(null), n("selected");
3138
3138
  }, st = () => {
3139
3139
  var x, m;
3140
- (x = gt.current) == null || x.abort(), (m = Y.current) == null || m.close(), Y.current = null, ze.current.clear(), f(null), G(null), we(!1), ee([]), Ee([]), ie(!1), Bt(null), ft(null), N(null), O([]), T(null), te(null), h([]), y([]), k(null), v(null), he(!1), Xe([]), ye(_e), Re(null), n("idle");
3140
+ (x = gt.current) == null || x.abort(), (m = Y.current) == null || m.close(), Y.current = null, ze.current.clear(), f(null), G(null), we(!1), ee([]), Ee([]), ie(!1), Bt(null), ft(null), N(null), L([]), T(null), te(null), h([]), y([]), k(null), v(null), he(!1), Xe([]), ye(_e), Re(null), n("idle");
3141
3141
  };
3142
3142
  return {
3143
3143
  phase: t,
@@ -3155,11 +3155,11 @@ ${m.trim()}` : $;
3155
3155
  applyResult: ue,
3156
3156
  applyError: xe,
3157
3157
  refining: Ke,
3158
- analysisMode: Os,
3158
+ analysisMode: Ls,
3159
3159
  analysisPrompt: zn,
3160
3160
  setAnalysisPrompt: kn,
3161
- usage: Ls,
3162
- existingMr: L,
3161
+ usage: Os,
3162
+ existingMr: O,
3163
3163
  existingMrLoading: ne,
3164
3164
  mergedMrs: Ce,
3165
3165
  issueEnvironments: be,
@@ -3295,13 +3295,13 @@ function Pl({ children: t }) {
3295
3295
  return /* @__PURE__ */ e.jsx(Ns.Provider, { value: s, children: /* @__PURE__ */ e.jsx(ws.Provider, { value: r, children: /* @__PURE__ */ e.jsx(zs.Provider, { value: { activeDetailTab: a, setActiveDetailTab: l, mrMerged: i, setMrMerged: o, taskModalOpen: d, setTaskModalOpen: u }, children: t }) }) });
3296
3296
  }
3297
3297
  function vn(t, n) {
3298
- const s = Or(t);
3298
+ const s = Lr(t);
3299
3299
  if (!s) throw new Error(`${n} must be used inside <ForgeProvider>`);
3300
3300
  return s;
3301
3301
  }
3302
- const oe = () => vn(Ns, "useForgeState"), pe = () => vn(ws, "useForgeActions"), Be = () => vn(zs, "useForgeUI"), Al = /\b(error|failed|failure|exception|panic|traceback|cannot|could not|refused|denied|timed? out|abort|unexpected)\b/i, Il = /\b(warn|warning|skipped|skipping|deprecated|retry|retrying|fallback|truncated|missing)\b/i, Ol = /\b(ok|success|passed|completed|done|ready|merged|applied|resolved)\b/i, Ll = /^(reasoning|scanning|analysis started|ci fix started|identified|loaded)\b/i;
3302
+ const oe = () => vn(Ns, "useForgeState"), pe = () => vn(ws, "useForgeActions"), Be = () => vn(zs, "useForgeUI"), Al = /\b(error|failed|failure|exception|panic|traceback|cannot|could not|refused|denied|timed? out|abort|unexpected)\b/i, Il = /\b(warn|warning|skipped|skipping|deprecated|retry|retrying|fallback|truncated|missing)\b/i, Ll = /\b(ok|success|passed|completed|done|ready|merged|applied|resolved)\b/i, Ol = /^(reasoning|scanning|analysis started|ci fix started|identified|loaded)\b/i;
3303
3303
  function Ml(t) {
3304
- return Al.test(t) ? "error" : Il.test(t) ? "warn" : Ol.test(t) ? "success" : Ll.test(t) ? "debug" : "info";
3304
+ return Al.test(t) ? "error" : Il.test(t) ? "warn" : Ll.test(t) ? "success" : Ol.test(t) ? "debug" : "info";
3305
3305
  }
3306
3306
  function Dl(t) {
3307
3307
  try {
@@ -4280,9 +4280,9 @@ function pi({ d: t }) {
4280
4280
  ] });
4281
4281
  }
4282
4282
  function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4283
- const [l, i] = b(null), [o, d] = b(!0), [u, c] = b(null), [f, p] = b(!1), [h, z] = b(null), [y, g] = b(!1), [N, w] = b(null), [C, q] = b(null), [W, H] = b(null), [k, I] = b(!1), [V, Z] = b(!1), [se, ce] = b(null), [O, J] = b(!1), [T, ae] = b(null), [le, ue] = b(!1), te = de(null), xe = de(!1), v = de(!1), L = s ? `?repo=${encodeURIComponent(s)}` : "", G = en(async () => {
4283
+ const [l, i] = b(null), [o, d] = b(!0), [u, c] = b(null), [f, p] = b(!1), [h, z] = b(null), [y, g] = b(!1), [N, w] = b(null), [C, q] = b(null), [W, H] = b(null), [k, I] = b(!1), [V, Z] = b(!1), [se, ce] = b(null), [L, J] = b(!1), [T, ae] = b(null), [le, ue] = b(!1), te = de(null), xe = de(!1), v = de(!1), O = s ? `?repo=${encodeURIComponent(s)}` : "", G = en(async () => {
4284
4284
  try {
4285
- const K = await window.fetch(`/api/forge/mr/${t}/detail${L}`, {
4285
+ const K = await window.fetch(`/api/forge/mr/${t}/detail${O}`, {
4286
4286
  headers: { Authorization: `Bearer ${n}` }
4287
4287
  });
4288
4288
  if (!K.ok)
@@ -4298,14 +4298,14 @@ function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4298
4298
  if (xe.current) return;
4299
4299
  c(K.message), d(!1);
4300
4300
  }
4301
- }, [t, n, L]);
4301
+ }, [t, n, O]);
4302
4302
  Q(() => (xe.current = !1, G(), () => {
4303
4303
  xe.current = !0, te.current && clearInterval(te.current);
4304
4304
  }), [G]);
4305
4305
  const ne = async () => {
4306
4306
  p(!0), z(null);
4307
4307
  try {
4308
- const K = await window.fetch(`/api/forge/mr/${t}/rebase${L}`, {
4308
+ const K = await window.fetch(`/api/forge/mr/${t}/rebase${O}`, {
4309
4309
  method: "POST",
4310
4310
  headers: { Authorization: `Bearer ${n}` }
4311
4311
  });
@@ -4323,7 +4323,7 @@ function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4323
4323
  g(!0), w(null);
4324
4324
  const K = l == null ? void 0 : l.merge_when_pipeline_succeeds;
4325
4325
  try {
4326
- const ie = K ? `/api/forge/mr/${t}/cancel-auto-merge${L}` : `/api/forge/mr/${t}/auto-merge${L}`, Ae = await window.fetch(ie, {
4326
+ const ie = K ? `/api/forge/mr/${t}/cancel-auto-merge${O}` : `/api/forge/mr/${t}/auto-merge${O}`, Ae = await window.fetch(ie, {
4327
4327
  method: "POST",
4328
4328
  headers: { Authorization: `Bearer ${n}` }
4329
4329
  });
@@ -4340,7 +4340,7 @@ function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4340
4340
  }, Ce = async (K, ie, Ae) => {
4341
4341
  q(K), H(null);
4342
4342
  try {
4343
- const Ne = await window.fetch(`/api/forge/mr/${t}/${ie}${L}`, {
4343
+ const Ne = await window.fetch(`/api/forge/mr/${t}/${ie}${O}`, {
4344
4344
  method: "POST",
4345
4345
  headers: {
4346
4346
  Authorization: `Bearer ${n}`,
@@ -4361,7 +4361,7 @@ function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4361
4361
  }, ee = async () => {
4362
4362
  J(!0), ae(null);
4363
4363
  try {
4364
- const K = await window.fetch(`/api/forge/mr/${t}/diffs${L}`, {
4364
+ const K = await window.fetch(`/api/forge/mr/${t}/diffs${O}`, {
4365
4365
  headers: { Authorization: `Bearer ${n}` }
4366
4366
  });
4367
4367
  if (!K.ok) throw new Error(`Diffs API ${K.status}`);
@@ -4585,7 +4585,7 @@ function Cs({ mrIid: t, token: n, repo: s, pipelineStatus: r, onMerged: a }) {
4585
4585
  }
4586
4586
  ),
4587
4587
  le && /* @__PURE__ */ e.jsxs("div", { className: "mt-3 flex flex-col gap-2", children: [
4588
- O && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-sm text-zinc-500", children: [
4588
+ L && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-sm text-zinc-500", children: [
4589
4589
  /* @__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" }),
4590
4590
  "Loading diff…"
4591
4591
  ] }),
@@ -4643,11 +4643,11 @@ function ut({
4643
4643
  }, [a]);
4644
4644
  const I = async () => {
4645
4645
  var T, ae;
4646
- const O = new AbortController(), J = setTimeout(() => O.abort(), 12e3);
4646
+ const L = new AbortController(), J = setTimeout(() => L.abort(), 12e3);
4647
4647
  try {
4648
4648
  const le = t.includes("?") ? "&" : "?", ue = s ? `${le}repo=${encodeURIComponent(s)}` : "", te = await window.fetch(`/api/forge/${t}${ue}`, {
4649
4649
  headers: { Authorization: `Bearer ${n}` },
4650
- signal: O.signal
4650
+ signal: L.signal
4651
4651
  });
4652
4652
  if (clearTimeout(J), !te.ok) throw new Error(`Pipeline API ${te.status}`);
4653
4653
  const xe = await te.json();
@@ -4680,26 +4680,26 @@ function ut({
4680
4680
  Q(() => (C.current = !1, W.current = !1, H.current = null, c(!0), p(null), g({}), I(), q.current = setInterval(I, 1e4), () => {
4681
4681
  C.current = !0, q.current && clearInterval(q.current);
4682
4682
  }), [t, n]);
4683
- const V = async (O) => {
4684
- if (y[O] !== void 0) {
4683
+ const V = async (L) => {
4684
+ if (y[L] !== void 0) {
4685
4685
  g((J) => {
4686
4686
  const T = { ...J };
4687
- return delete T[O], T;
4687
+ return delete T[L], T;
4688
4688
  });
4689
4689
  return;
4690
4690
  }
4691
- w((J) => ({ ...J, [O]: !0 }));
4691
+ w((J) => ({ ...J, [L]: !0 }));
4692
4692
  try {
4693
- const T = await (await window.fetch(`/api/forge/jobs/${O}/trace`, {
4693
+ const T = await (await window.fetch(`/api/forge/jobs/${L}/trace`, {
4694
4694
  headers: { Authorization: `Bearer ${n}` }
4695
4695
  })).json();
4696
- g((ae) => ({ ...ae, [O]: T.trace ?? "(empty)" }));
4696
+ g((ae) => ({ ...ae, [L]: T.trace ?? "(empty)" }));
4697
4697
  } catch {
4698
- g((J) => ({ ...J, [O]: "(failed to load trace)" }));
4698
+ g((J) => ({ ...J, [L]: "(failed to load trace)" }));
4699
4699
  } finally {
4700
- w((J) => ({ ...J, [O]: !1 }));
4700
+ w((J) => ({ ...J, [L]: !1 }));
4701
4701
  }
4702
- }, Z = o.filter((O) => O.status === "failed");
4702
+ }, Z = o.filter((L) => L.status === "failed");
4703
4703
  if (u)
4704
4704
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 py-4 text-sm text-zinc-500", children: [
4705
4705
  /* @__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" }),
@@ -4776,7 +4776,7 @@ function ut({
4776
4776
  Z.length !== 1 ? "s" : "",
4777
4777
  " ",
4778
4778
  "failed: ",
4779
- Z.map((O) => O.name).join(", ")
4779
+ Z.map((L) => L.name).join(", ")
4780
4780
  ] })
4781
4781
  ] }) }),
4782
4782
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4785,9 +4785,9 @@ function ut({
4785
4785
  {
4786
4786
  type: "text",
4787
4787
  value: h,
4788
- onChange: (O) => z(O.target.value),
4789
- onKeyDown: (O) => {
4790
- O.key === "Enter" && !O.shiftKey && (O.preventDefault(), r(Z.map((J) => J.id), h, s));
4788
+ onChange: (L) => z(L.target.value),
4789
+ onKeyDown: (L) => {
4790
+ L.key === "Enter" && !L.shiftKey && (L.preventDefault(), r(Z.map((J) => J.id), h, s));
4791
4791
  },
4792
4792
  placeholder: "Add context or instructions for the AI fix (optional)",
4793
4793
  className: "flex-1 bg-zinc-900 border border-red-800/50 rounded-lg px-3 py-1.5 text-xs text-zinc-200 placeholder-zinc-600 focus:outline-none focus:border-red-600"
@@ -4796,15 +4796,15 @@ function ut({
4796
4796
  /* @__PURE__ */ e.jsx(
4797
4797
  "button",
4798
4798
  {
4799
- onClick: () => r(Z.map((O) => O.id), h, s),
4799
+ onClick: () => r(Z.map((L) => L.id), h, s),
4800
4800
  className: "shrink-0 bg-violet-600 hover:bg-violet-500 text-white text-xs font-medium px-4 py-2 rounded-lg transition-colors",
4801
4801
  children: "Fix with AI"
4802
4802
  }
4803
4803
  )
4804
4804
  ] })
4805
4805
  ] }),
4806
- Array.from(se.entries()).map(([O, J]) => /* @__PURE__ */ e.jsxs("div", { children: [
4807
- /* @__PURE__ */ e.jsx("p", { className: "text-xs text-zinc-500 uppercase tracking-wide mb-2", children: O }),
4806
+ Array.from(se.entries()).map(([L, J]) => /* @__PURE__ */ e.jsxs("div", { children: [
4807
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-zinc-500 uppercase tracking-wide mb-2", children: L }),
4808
4808
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: J.map((T) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
4809
4809
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 bg-zinc-800 rounded px-3 py-2", children: [
4810
4810
  /* @__PURE__ */ e.jsx(
@@ -4852,7 +4852,7 @@ function ut({
4852
4852
  }
4853
4853
  ) })
4854
4854
  ] }, T.id)) })
4855
- ] }, O))
4855
+ ] }, L))
4856
4856
  ] });
4857
4857
  }
4858
4858
  function bi(t) {
@@ -5309,7 +5309,7 @@ function Si({
5309
5309
  const [g, N] = b(""), [w, C] = b(!1), [q, W] = b(/* @__PURE__ */ new Set()), H = dt(
5310
5310
  () => Ri(n, r, s),
5311
5311
  [n, r, s]
5312
- ), k = h || z, I = H.length > 1, V = H.every((T) => T.existingBranch), Z = H.some((T) => T.existingBranch), se = y !== "passed" && !w, ce = k || se, O = () => {
5312
+ ), k = h || z, I = H.length > 1, V = H.every((T) => T.existingBranch), Z = H.some((T) => T.existingBranch), se = y !== "passed" && !w, ce = k || se, L = () => {
5313
5313
  g.trim() && (d(g.trim()), N(""));
5314
5314
  };
5315
5315
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-5", children: [
@@ -5365,7 +5365,7 @@ function Si({
5365
5365
  }
5366
5366
  ),
5367
5367
  c.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: c.map((T, ae) => {
5368
- const le = T.kind === "answer", ue = T.kind === "canceled", te = T.kind === "refine", xe = ue ? "border-amber-800/60 bg-amber-950/30" : le ? "border-sky-800/60 bg-sky-950/30" : "border-zinc-700 bg-zinc-800", v = q.has(ae), L = 240, G = T.feedback.length > L, ne = () => {
5368
+ const le = T.kind === "answer", ue = T.kind === "canceled", te = T.kind === "refine", xe = ue ? "border-amber-800/60 bg-amber-950/30" : le ? "border-sky-800/60 bg-sky-950/30" : "border-zinc-700 bg-zinc-800", v = q.has(ae), O = 240, G = T.feedback.length > O, ne = () => {
5369
5369
  W((ee) => {
5370
5370
  const be = new Set(ee);
5371
5371
  return be.has(ae) ? be.delete(ae) : be.add(ae), be;
@@ -5379,7 +5379,7 @@ function Si({
5379
5379
  "span",
5380
5380
  {
5381
5381
  className: `italic flex-1 whitespace-pre-wrap break-words [overflow-wrap:anywhere] ${G && !v ? "max-h-12 overflow-hidden line-clamp-2" : "max-h-40 overflow-y-auto"}`,
5382
- children: G && !v ? T.feedback.slice(0, L) + "…" : T.feedback
5382
+ children: G && !v ? T.feedback.slice(0, O) + "…" : T.feedback
5383
5383
  }
5384
5384
  )
5385
5385
  ] }),
@@ -5462,7 +5462,7 @@ function Si({
5462
5462
  /* @__PURE__ */ e.jsx(
5463
5463
  "button",
5464
5464
  {
5465
- onClick: O,
5465
+ onClick: L,
5466
5466
  disabled: h || !g.trim(),
5467
5467
  className: "text-xs px-4 py-1.5 bg-zinc-700 hover:bg-zinc-600 disabled:opacity-40 disabled:cursor-not-allowed text-zinc-200 rounded transition-colors",
5468
5468
  children: z ? "Queue →" : "Refine →"
@@ -5781,8 +5781,8 @@ function Ii() {
5781
5781
  Q(() => {
5782
5782
  i || V(null);
5783
5783
  }, [i]);
5784
- const Z = (ce, O) => {
5785
- V(ce), H(ce, O);
5784
+ const Z = (ce, L) => {
5785
+ V(ce), H(ce, L);
5786
5786
  }, se = d ? "running" : o.stale || !o.result ? "idle" : o.result.allPassed ? "passed" : "failed";
5787
5787
  return /* @__PURE__ */ e.jsxs("div", { className: "max-w-4xl mx-auto w-full flex flex-col gap-5", children: [
5788
5788
  /* @__PURE__ */ e.jsx("h2", { className: "text-sm font-medium text-zinc-400 uppercase tracking-wide", children: "Proposed Changes" }),
@@ -5843,7 +5843,7 @@ function Ii() {
5843
5843
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "text-center py-12 text-zinc-500 text-sm", children: "No changes were proposed." })
5844
5844
  ] });
5845
5845
  }
5846
- function Oi() {
5846
+ function Li() {
5847
5847
  const { applyResult: t } = oe(), { handleRefinePipelineFailure: n, getToken: s } = pe(), r = (t == null ? void 0 : t.applications.filter((a) => !a.mr)) ?? [];
5848
5848
  return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
5849
5849
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -5896,7 +5896,7 @@ function Oi() {
5896
5896
  ))
5897
5897
  ] });
5898
5898
  }
5899
- function Li() {
5899
+ function Oi() {
5900
5900
  const { storedAnalyses: t } = oe(), {
5901
5901
  handleRestoreAnalysis: n,
5902
5902
  handleDiscardStoredAnalysis: s,
@@ -6012,8 +6012,8 @@ function Mi({
6012
6012
  }
6013
6013
  ) : o.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: o.description }),
6014
6014
  !t && /* @__PURE__ */ e.jsx(Ss, {}),
6015
- !t && /* @__PURE__ */ e.jsx(Oi, {}),
6016
6015
  !t && /* @__PURE__ */ e.jsx(Li, {}),
6016
+ !t && /* @__PURE__ */ e.jsx(Oi, {}),
6017
6017
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
6018
6018
  !t && /* @__PURE__ */ e.jsx(
6019
6019
  "textarea",
@@ -6672,14 +6672,14 @@ function Xi({ repos: t, onSave: n }) {
6672
6672
  return /* @__PURE__ */ e.jsxs(
6673
6673
  "div",
6674
6674
  {
6675
- onDragOver: (O) => {
6676
- p !== null && (O.preventDefault(), O.dataTransfer.dropEffect = "move", z !== I && y(I));
6675
+ onDragOver: (L) => {
6676
+ p !== null && (L.preventDefault(), L.dataTransfer.dropEffect = "move", z !== I && y(I));
6677
6677
  },
6678
6678
  onDragLeave: () => {
6679
6679
  z === I && y(null);
6680
6680
  },
6681
- onDrop: (O) => {
6682
- O.preventDefault(), p !== null && W(p, I), h(null), y(null);
6681
+ onDrop: (L) => {
6682
+ L.preventDefault(), p !== null && W(p, I), h(null), y(null);
6683
6683
  },
6684
6684
  className: `flex items-center gap-3 bg-zinc-900 border rounded-lg px-3 py-2 transition-colors ${V ? "opacity-40 border-zinc-800" : "border-zinc-800"} ${se ? "!border-t-violet-500" : ""} ${ce ? "!border-b-violet-500" : ""}`,
6685
6685
  children: [
@@ -6687,8 +6687,8 @@ function Xi({ repos: t, onSave: n }) {
6687
6687
  "span",
6688
6688
  {
6689
6689
  draggable: !0,
6690
- onDragStart: (O) => {
6691
- h(I), O.dataTransfer.effectAllowed = "move", O.dataTransfer.setData("text/plain", k.id);
6690
+ onDragStart: (L) => {
6691
+ h(I), L.dataTransfer.effectAllowed = "move", L.dataTransfer.setData("text/plain", k.id);
6692
6692
  },
6693
6693
  onDragEnd: () => {
6694
6694
  h(null), y(null);
@@ -6704,7 +6704,7 @@ function Xi({ repos: t, onSave: n }) {
6704
6704
  "input",
6705
6705
  {
6706
6706
  value: k.label,
6707
- onChange: (O) => C(k.id, O.target.value),
6707
+ onChange: (L) => C(k.id, L.target.value),
6708
6708
  className: "flex-1 bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 focus:outline-none focus:border-violet-500"
6709
6709
  }
6710
6710
  ),
@@ -6712,10 +6712,10 @@ function Xi({ repos: t, onSave: n }) {
6712
6712
  "select",
6713
6713
  {
6714
6714
  value: k.projectType ?? "auto",
6715
- onChange: (O) => q(k.id, O.target.value),
6715
+ onChange: (L) => q(k.id, L.target.value),
6716
6716
  title: "Validator toolchain — picks npm scripts or go fmt/vet/build/test",
6717
6717
  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",
6718
- children: Gi.map((O) => /* @__PURE__ */ e.jsx("option", { value: O.value, children: O.label }, O.value))
6718
+ children: Gi.map((L) => /* @__PURE__ */ e.jsx("option", { value: L.value, children: L.label }, L.value))
6719
6719
  }
6720
6720
  ),
6721
6721
  /* @__PURE__ */ e.jsx(
@@ -7261,7 +7261,7 @@ function ao() {
7261
7261
  /* @__PURE__ */ e.jsx(so, {}),
7262
7262
  /* @__PURE__ */ e.jsxs("span", { className: "text-[10px] text-zinc-700 text-center mt-2 select-all", children: [
7263
7263
  "v",
7264
- "1.13.0"
7264
+ "1.13.1"
7265
7265
  ] })
7266
7266
  ] });
7267
7267
  }