@omg-dev/app 0.1.362 → 0.1.363

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.
@@ -4446,7 +4446,7 @@ function _0(e, t = {}) {
4446
4446
  function l2() {
4447
4447
  return P0;
4448
4448
  }
4449
- function Le(e, t) {
4449
+ function De(e, t) {
4450
4450
  return Yr.request(e, t);
4451
4451
  }
4452
4452
  function cn(e, t) {
@@ -12174,7 +12174,7 @@ function d_(e, t, n = {}) {
12174
12174
  return Be.length === Ce.length ? pe : { ...pe, [A]: Be };
12175
12175
  });
12176
12176
  }, []), Z = ke(async (A, G, pe = {}) => {
12177
- const Ce = await Le(`/api/sessions/${encodeURIComponent(A)}/messages?limit=80`), Be = sa(Jc(Array.isArray(Ce.messages) ? Ce.messages : [])), _e = M.current[A] || (M.current[A] = /* @__PURE__ */ new Set());
12177
+ const Ce = await De(`/api/sessions/${encodeURIComponent(A)}/messages?limit=80`), Be = sa(Jc(Array.isArray(Ce.messages) ? Ce.messages : [])), _e = M.current[A] || (M.current[A] = /* @__PURE__ */ new Set());
12178
12178
  for (const We of Be) {
12179
12179
  const He = wr(We);
12180
12180
  He && We.kind !== "thinking" && _e.add(He);
@@ -12197,7 +12197,7 @@ function d_(e, t, n = {}) {
12197
12197
  fe(A, G);
12198
12198
  return;
12199
12199
  }
12200
- const We = await Le(`/api/sessions/${encodeURIComponent(A)}/queue`), He = Array.isArray(We.queue) ? We.queue : [], rt = (Ce ? He.find((xe) => xe.id === Ce) : null) ?? He.find((xe) => Ks(xe.text, G));
12200
+ const We = await De(`/api/sessions/${encodeURIComponent(A)}/queue`), He = Array.isArray(We.queue) ? We.queue : [], rt = (Ce ? He.find((xe) => xe.id === Ce) : null) ?? He.find((xe) => Ks(xe.text, G));
12201
12201
  if (!rt) {
12202
12202
  await Z(A, G, { dropOptimistic: !0 }).catch(() => null), fe(A, G);
12203
12203
  return;
@@ -12215,7 +12215,7 @@ function d_(e, t, n = {}) {
12215
12215
  if (!(A in j.current)) return !0;
12216
12216
  const G = j.current[A];
12217
12217
  if (G == null) return !1;
12218
- const pe = await Le(
12218
+ const pe = await De(
12219
12219
  `/api/sessions/${encodeURIComponent(A)}/messages?page=backward&before=${G}&limit=80`
12220
12220
  ), Ce = sa(Jc(Array.isArray(pe.messages) ? pe.messages : []));
12221
12221
  if (w((_e) => ({ ..._e, [A]: pe.nextBefore ?? null })), !Ce.length) return (pe.nextBefore ?? null) !== null;
@@ -12799,7 +12799,7 @@ function _b(e) {
12799
12799
  }
12800
12800
  }
12801
12801
  function Ql() {
12802
- return Oi || (Oi = Le(
12802
+ return Oi || (Oi = De(
12803
12803
  `/api/shipped?limit=${A_}`,
12804
12804
  { cache: "no-store" }
12805
12805
  ).then((e) => {
@@ -13685,7 +13685,7 @@ function wO({
13685
13685
  n === "live" && i && yr.success("Reconnected", { id: xd, duration: 2e3 });
13686
13686
  }, [n, r, o, t]), null;
13687
13687
  }
13688
- const De = new Proxy(yr, {
13688
+ const Le = new Proxy(yr, {
13689
13689
  get(e, t, n) {
13690
13690
  const r = Reflect.get(e, t, n);
13691
13691
  return t === "success" && typeof r == "function" ? (...o) => (ar.success(), r(...o)) : t === "error" && typeof r == "function" ? (...o) => (ar.error(), r(...o)) : typeof r == "function" ? r.bind(e) : r;
@@ -20652,7 +20652,7 @@ const vL = gi(function({
20652
20652
  ] }) : null;
20653
20653
  }), xL = ks(
20654
20654
  "session-files-panel",
20655
- () => import("./SessionFilesPanel-DfDc9N5f.js")
20655
+ () => import("./SessionFilesPanel-D1WuT3Ww.js")
20656
20656
  );
20657
20657
  function Bp({ className: e, ...t }) {
20658
20658
  return /* @__PURE__ */ a(
@@ -26383,7 +26383,7 @@ async function e8() {
26383
26383
  }
26384
26384
  }
26385
26385
  const $3 = Fl(
26386
- () => import("./streamdown-response-WrSWWMXK.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
26386
+ () => import("./streamdown-response-Dp3InyJM.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
26387
26387
  );
26388
26388
  function zi({ className: e, from: t, ...n }) {
26389
26389
  return /* @__PURE__ */ a(
@@ -26789,9 +26789,9 @@ function eS(e, t) {
26789
26789
  if (!o) {
26790
26790
  s(!0);
26791
26791
  try {
26792
- await t() && De.success("omg installed");
26792
+ await t() && Le.success("omg installed");
26793
26793
  } catch {
26794
- De.error("Could not open the install prompt");
26794
+ Le.error("Could not open the install prompt");
26795
26795
  } finally {
26796
26796
  s(!1);
26797
26797
  }
@@ -27468,7 +27468,7 @@ function fz(e, t) {
27468
27468
  return `/api/usage/${encodeURIComponent(e)}${t ? "?force=1" : ""}`;
27469
27469
  }
27470
27470
  async function iS(e, t = !1) {
27471
- return (await Le(fz(e, t))).provider;
27471
+ return (await De(fz(e, t))).provider;
27472
27472
  }
27473
27473
  const mz = 2e4;
27474
27474
  let Qi = null, Fi = null;
@@ -27478,7 +27478,7 @@ async function aS(e = !1) {
27478
27478
  return Qi.refs;
27479
27479
  if (Fi) return Fi;
27480
27480
  }
27481
- const t = Le("/api/usage/providers").then((n) => {
27481
+ const t = De("/api/usage/providers").then((n) => {
27482
27482
  const r = n.providers ?? [];
27483
27483
  return Qi = { at: Date.now(), refs: r }, r;
27484
27484
  }).finally(() => {
@@ -28923,26 +28923,26 @@ function rF({ className: e, isStreaming: t, children: n, ...r }) {
28923
28923
  function oF({ className: e, children: t, ...n }) {
28924
28924
  return /* @__PURE__ */ a(eF, { className: ee("mt-2 text-sm", e), ...n, children: /* @__PURE__ */ a(Iu, { className: "ai-live-text max-w-full opacity-90", children: t }) });
28925
28925
  }
28926
- const sF = Fl(() => import("./chat-engine-DQvoqFQJ.js"));
28926
+ const sF = Fl(() => import("./chat-engine-DRPbvMlT.js"));
28927
28927
  function iF() {
28928
- const e = () => void import("./chat-engine-DQvoqFQJ.js"), t = globalThis.requestIdleCallback;
28928
+ const e = () => void import("./chat-engine-DRPbvMlT.js"), t = globalThis.requestIdleCallback;
28929
28929
  typeof t == "function" ? t(e, { timeout: 3e3 }) : setTimeout(e, 1500);
28930
28930
  }
28931
28931
  const vS = ks(
28932
28932
  "TermView",
28933
- () => import("./TermView-dCaK7r9p.js").then((e) => ({ default: e.TermView }))
28934
- ), mv = ks("ShippedPage", () => import("./shipped-page-Cg_59v8s.js")), aF = ks(
28933
+ () => import("./TermView-DXW6RGKb.js").then((e) => ({ default: e.TermView }))
28934
+ ), mv = ks("ShippedPage", () => import("./shipped-page-DvXSWVq5.js")), aF = ks(
28935
28935
  "SessionTokenUsageDialog",
28936
- () => import("./session-token-usage-DezMPCxr.js")
28936
+ () => import("./session-token-usage-l1tPRIG0.js")
28937
28937
  ), cF = ks(
28938
28938
  "CodingAgentsPage",
28939
- () => import("./coding-agents-page-Cw6L8IfD.js")
28939
+ () => import("./coding-agents-page-CynJSkGL.js")
28940
28940
  ), pv = ks(
28941
28941
  "ResumeSessionSheet",
28942
- () => import("./resume-session-sheet-CC6_0h3J.js")
28942
+ () => import("./resume-session-sheet-CD8F_dC9.js")
28943
28943
  ), lF = ks(
28944
28944
  "ChangelogPage",
28945
- () => import("./ChangelogPage--HmaL_eq.js")
28945
+ () => import("./ChangelogPage-CJqvC4TQ.js")
28946
28946
  ), _u = dr("configured"), uF = {
28947
28947
  claude: "Claude",
28948
28948
  codex: "Codex",
@@ -29117,7 +29117,7 @@ function RF() {
29117
29117
  }
29118
29118
  const CS = (e) => `agent-limit:${e}`;
29119
29119
  function ES(e, t, n) {
29120
- return sf(e) ? (De.error(e instanceof Error ? e.message : String(e), {
29120
+ return sf(e) ? (Le.error(e instanceof Error ? e.message : String(e), {
29121
29121
  id: CS(t),
29122
29122
  duration: 1 / 0,
29123
29123
  closeButton: !0,
@@ -29321,21 +29321,21 @@ function PF(e, t, n, r) {
29321
29321
  );
29322
29322
  }
29323
29323
  function $h(e, t) {
29324
- return Le(`/api/sessions/${encodeURIComponent(e)}/close`, {
29324
+ return De(`/api/sessions/${encodeURIComponent(e)}/close`, {
29325
29325
  method: "POST",
29326
29326
  headers: { "Content-Type": "application/json" },
29327
29327
  body: JSON.stringify({ source: t })
29328
29328
  });
29329
29329
  }
29330
29330
  function _F(e, t) {
29331
- return Le(`/api/sessions/${encodeURIComponent(e)}/title`, {
29331
+ return De(`/api/sessions/${encodeURIComponent(e)}/title`, {
29332
29332
  method: "PUT",
29333
29333
  headers: { "Content-Type": "application/json" },
29334
29334
  body: JSON.stringify({ title: t })
29335
29335
  });
29336
29336
  }
29337
29337
  function OF(e, t) {
29338
- return Le("/api/sessions/close-all", {
29338
+ return De("/api/sessions/close-all", {
29339
29339
  method: "POST",
29340
29340
  headers: { "Content-Type": "application/json" },
29341
29341
  body: JSON.stringify({ source: t, scope: "idle", sessionIds: e })
@@ -29345,7 +29345,7 @@ let Ui = null, hv = 0, Hd = [];
29345
29345
  const AF = 3e4;
29346
29346
  function DF() {
29347
29347
  const e = Date.now();
29348
- return Hd.length && e - hv < AF ? Promise.resolve(Hd) : (Ui || (Ui = Le("/api/skills").then((t) => {
29348
+ return Hd.length && e - hv < AF ? Promise.resolve(Hd) : (Ui || (Ui = De("/api/skills").then((t) => {
29349
29349
  const n = Array.isArray(t.skills) ? t.skills : [];
29350
29350
  return Hd = n, hv = Date.now(), n;
29351
29351
  }).catch((t) => {
@@ -29670,10 +29670,10 @@ function Bh({
29670
29670
  if (!T.length) return;
29671
29671
  const L = Math.max(0, t - w.current.length);
29672
29672
  if (!L) {
29673
- De.error("Remove an attachment before adding another.");
29673
+ Le.error("Remove an attachment before adding another.");
29674
29674
  return;
29675
29675
  }
29676
- T.length > L && De.error(`Added ${L} of ${T.length} files.`);
29676
+ T.length > L && Le.error(`Added ${L} of ${T.length} files.`);
29677
29677
  const D = T.slice(0, L).map((U) => {
29678
29678
  const J = U.type.startsWith("image/") ? URL.createObjectURL(U) : void 0;
29679
29679
  return J && d.current.push(J), {
@@ -30148,14 +30148,14 @@ function OS(e) {
30148
30148
  (oe = N.current) == null || oe.call(N, E.current);
30149
30149
  } catch {
30150
30150
  }
30151
- ae && De(ae);
30151
+ ae && Le(ae);
30152
30152
  };
30153
30153
  let te = b.current;
30154
30154
  try {
30155
30155
  if (!te || !te.getAudioTracks().some((ae) => ae.readyState === "live")) {
30156
30156
  te == null || te.getTracks().forEach((me) => me.stop()), b.current = null;
30157
30157
  const ae = navigator.mediaDevices.getUserMedia(ZF), K = window.setTimeout(() => {
30158
- d.current && !m.current && De("Waiting for the microphone… check for a permission prompt");
30158
+ d.current && !m.current && Le("Waiting for the microphone… check for a permission prompt");
30159
30159
  }, QF);
30160
30160
  let oe;
30161
30161
  try {
@@ -30963,7 +30963,7 @@ function mB(e, t) {
30963
30963
  return B.length === M.length ? z : { ...z, [I]: B };
30964
30964
  });
30965
30965
  }, []), N = ke(async (I, O, z = {}) => {
30966
- const M = await Le(
30966
+ const M = await De(
30967
30967
  `/api/sessions/${encodeURIComponent(I)}/messages?limit=80`
30968
30968
  ), B = ua(Array.isArray(M.messages) ? M.messages : []), j = g.current[I] || (g.current[I] = /* @__PURE__ */ new Set());
30969
30969
  for (const W of B)
@@ -30989,7 +30989,7 @@ function mB(e, t) {
30989
30989
  C(I, O);
30990
30990
  return;
30991
30991
  }
30992
- const W = await Le(
30992
+ const W = await De(
30993
30993
  `/api/sessions/${encodeURIComponent(I)}/queue`
30994
30994
  ), V = Array.isArray(W.queue) ? W.queue : [], F = (M ? V.find(($) => $.id === M) : null) ?? V.find(($) => qs($.text, O));
30995
30995
  if (!F) {
@@ -31011,7 +31011,7 @@ function mB(e, t) {
31011
31011
  if (!(I in w.current)) return !0;
31012
31012
  const O = w.current[I];
31013
31013
  if (O == null) return !1;
31014
- const z = await Le(
31014
+ const z = await De(
31015
31015
  `/api/sessions/${encodeURIComponent(I)}/messages?page=backward&before=${O}&limit=80`
31016
31016
  ), M = ua(Array.isArray(z.messages) ? z.messages : []);
31017
31017
  if (b((j) => ({ ...j, [I]: z.nextBefore ?? null })), !M.length) return (z.nextBefore ?? null) !== null;
@@ -31051,21 +31051,21 @@ function pB({ user: e }) {
31051
31051
  o(!0);
31052
31052
  try {
31053
31053
  if (t)
31054
- await L3(), n(!1), De("Notifications off");
31054
+ await L3(), n(!1), Le("Notifications off");
31055
31055
  else {
31056
31056
  if (E3() === "denied") {
31057
- De.error("Notifications are blocked in your browser settings");
31057
+ Le.error("Notifications are blocked in your browser settings");
31058
31058
  return;
31059
31059
  }
31060
31060
  if (!e) {
31061
- De.error("Pick your user in the top filter first, so notifications only show yours");
31061
+ Le.error("Pick your user in the top filter first, so notifications only show yours");
31062
31062
  return;
31063
31063
  }
31064
31064
  const c = await D3(e);
31065
- n(c), De(c ? "Notifications on" : "Notifications permission dismissed");
31065
+ n(c), Le(c ? "Notifications on" : "Notifications permission dismissed");
31066
31066
  }
31067
31067
  } catch (c) {
31068
- De.error(c instanceof Error ? c.message : "Could not change notifications");
31068
+ Le.error(c instanceof Error ? c.message : "Could not change notifications");
31069
31069
  } finally {
31070
31070
  o(!1);
31071
31071
  }
@@ -31090,14 +31090,14 @@ function bB() {
31090
31090
  var d, m, p, h;
31091
31091
  let s;
31092
31092
  try {
31093
- s = (await Le("/api/server/stats")).stats;
31093
+ s = (await De("/api/server/stats")).stats;
31094
31094
  } catch {
31095
31095
  return;
31096
31096
  }
31097
31097
  if (n || !s) return;
31098
31098
  const i = Date.now(), c = (b, g, y, w) => {
31099
31099
  const k = e.current[b] ?? 0;
31100
- e.current[b] = g, !(g === 0 || g <= k) && (i - (t.current[b] ?? 0) < gB || (t.current[b] = i, (g >= 2 ? De.error : De.warning)(y, { description: w })));
31100
+ e.current[b] = g, !(g === 0 || g <= k) && (i - (t.current[b] ?? 0) < gB || (t.current[b] = i, (g >= 2 ? Le.error : Le.warning)(y, { description: w })));
31101
31101
  }, l = ((m = (d = s.pressure) == null ? void 0 : d.memory) == null ? void 0 : m.some10) ?? 0;
31102
31102
  c(
31103
31103
  "psiMem",
@@ -31261,7 +31261,7 @@ function yB() {
31261
31261
  }, [Te]), ue(() => {
31262
31262
  if (pe) return;
31263
31263
  const _ = globalThis.requestIdleCallback, re = () => {
31264
- ia(Sa) || Ql(), ia(Pb) || Le(
31264
+ ia(Sa) || Ql(), ia(Pb) || De(
31265
31265
  `/api/artifacts?limit=${lP}&kind=html`,
31266
31266
  { cache: "no-store" }
31267
31267
  ).then((Me) => {
@@ -31392,8 +31392,8 @@ function yB() {
31392
31392
  [mr, Ot]
31393
31393
  ), pn = ke(async () => {
31394
31394
  const [_, re] = await Promise.all([
31395
- Le("/api/auto/agents"),
31396
- Le("/api/auto/findings?status=open")
31395
+ De("/api/auto/agents"),
31396
+ De("/api/auto/findings?status=open")
31397
31397
  ]), de = re.findings ?? [];
31398
31398
  if (Wn(_.agents ?? []), _.tz && mn(_.tz), le(de), !pr.current) {
31399
31399
  de.forEach((Ve) => jt.current.add(Ve.id)), pr.current = !0;
@@ -31404,13 +31404,13 @@ function yB() {
31404
31404
  if (jt.current.has(Ve.id)) continue;
31405
31405
  jt.current.add(Ve.id), Kt(Ve.id);
31406
31406
  const Je = Me.get(Ve.agentId) ?? Ve.agentId;
31407
- De.custom(
31407
+ Le.custom(
31408
31408
  (ct) => /* @__PURE__ */ x(
31409
31409
  "button",
31410
31410
  {
31411
31411
  type: "button",
31412
31412
  onClick: () => {
31413
- je("live"), nn(Ve), Zt(Ve.id), De.dismiss(ct);
31413
+ je("live"), nn(Ve), Zt(Ve.id), Le.dismiss(ct);
31414
31414
  },
31415
31415
  className: "pointer-events-auto flex w-full min-w-0 items-center gap-2.5 text-left",
31416
31416
  children: [
@@ -31439,7 +31439,7 @@ function yB() {
31439
31439
  de != null && de.sessionId && (re.set(de.sessionId, { session: de, at: Date.now() }), ne(
31440
31440
  (Rt) => Rt.some((Tt) => Tt.sessionId === de.sessionId) ? Rt : [...Rt, de]
31441
31441
  ));
31442
- const Me = ++Ie.current, Ve = await Le("/api/sessions");
31442
+ const Me = ++Ie.current, Ve = await De("/api/sessions");
31443
31443
  if (Me < Ee.current) return;
31444
31444
  Ee.current = Me;
31445
31445
  const Je = he.current, ct = (Ve.sessions ?? []).map((Rt) => {
@@ -31505,7 +31505,7 @@ function yB() {
31505
31505
  let _ = !1, re = null;
31506
31506
  const de = requestAnimationFrame(() => {
31507
31507
  re = window.setTimeout(() => {
31508
- Le("/api/setup/checks").then((Me) => {
31508
+ De("/api/setup/checks").then((Me) => {
31509
31509
  _ || me(Me.checks ?? []);
31510
31510
  }).catch(() => {
31511
31511
  _ || me([]);
@@ -31537,7 +31537,7 @@ function yB() {
31537
31537
  };
31538
31538
  }, [Vt, pn]), ue(() => {
31539
31539
  const _ = () => {
31540
- Le("/api/users").then((re) => fe(re.users ?? [])).catch(() => {
31540
+ De("/api/users").then((re) => fe(re.users ?? [])).catch(() => {
31541
31541
  });
31542
31542
  };
31543
31543
  return window.addEventListener("focus", _), () => window.removeEventListener("focus", _);
@@ -31750,13 +31750,13 @@ function yB() {
31750
31750
  async function ig(_) {
31751
31751
  le((re) => re.filter((de) => de.id !== _.id)), nn(null);
31752
31752
  try {
31753
- await Le(`/api/auto/findings/${_.id}`, {
31753
+ await De(`/api/auto/findings/${_.id}`, {
31754
31754
  method: "POST",
31755
31755
  headers: { "Content-Type": "application/json" },
31756
31756
  body: JSON.stringify({ status: "dismissed" })
31757
31757
  });
31758
31758
  } catch (re) {
31759
- De.error(re instanceof Error ? re.message : String(re));
31759
+ Le.error(re instanceof Error ? re.message : String(re));
31760
31760
  }
31761
31761
  }
31762
31762
  async function gN(_, re, de = {}) {
@@ -31778,7 +31778,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31778
31778
  nn(null);
31779
31779
  const rn = async (jr) => {
31780
31780
  try {
31781
- const gr = await Le("/api/sessions/new", {
31781
+ const gr = await De("/api/sessions/new", {
31782
31782
  method: "POST",
31783
31783
  headers: { "Content-Type": "application/json" },
31784
31784
  body: JSON.stringify({
@@ -31799,22 +31799,22 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31799
31799
  claudeAccountId: ct === "aisdk" ? de.claudeAccountId : void 0
31800
31800
  })
31801
31801
  }), br = gr == null ? void 0 : gr.sessionId;
31802
- br && (ea(br), $S(br)), await Le(`/api/auto/findings/${_.id}`, {
31802
+ br && (ea(br), $S(br)), await De(`/api/auto/findings/${_.id}`, {
31803
31803
  method: "POST",
31804
31804
  headers: { "Content-Type": "application/json" },
31805
31805
  body: JSON.stringify({ status: "session" })
31806
31806
  }), le((ki) => ki.filter((Os) => Os.id !== _.id)), je("live"), await Promise.all([Vt(), pn()]);
31807
31807
  } catch (gr) {
31808
31808
  if (!jr && ES(gr, "finding", () => void rn(!0))) return;
31809
- De.error(gr instanceof Error ? gr.message : String(gr));
31809
+ Le.error(gr instanceof Error ? gr.message : String(gr));
31810
31810
  }
31811
31811
  };
31812
31812
  await rn(!1);
31813
31813
  }
31814
31814
  function bN(_, re) {
31815
31815
  const de = ju(_.agentId);
31816
- nn(null), De.promise(
31817
- Le(`/api/auto/agents/${_.agentId}/refine`, {
31816
+ nn(null), Le.promise(
31817
+ De(`/api/auto/agents/${_.agentId}/refine`, {
31818
31818
  method: "POST",
31819
31819
  headers: { "Content-Type": "application/json" },
31820
31820
  body: JSON.stringify({ feedback: re, findingId: _.id })
@@ -31828,18 +31828,18 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31828
31828
  }
31829
31829
  async function yN(_) {
31830
31830
  try {
31831
- await Le("/api/auto/agents", {
31831
+ await De("/api/auto/agents", {
31832
31832
  method: "POST",
31833
31833
  headers: { "Content-Type": "application/json" },
31834
31834
  body: JSON.stringify(_)
31835
31835
  }), Mn(null), await pn();
31836
31836
  } catch (re) {
31837
- De.error(re instanceof Error ? re.message : String(re));
31837
+ Le.error(re instanceof Error ? re.message : String(re));
31838
31838
  }
31839
31839
  }
31840
31840
  function vN(_, re, de = {}) {
31841
- De.promise(
31842
- Le(
31841
+ Le.promise(
31842
+ De(
31843
31843
  "/api/auto/compose",
31844
31844
  {
31845
31845
  method: "POST",
@@ -31847,7 +31847,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31847
31847
  body: JSON.stringify({ prompt: _, cwd: re })
31848
31848
  }
31849
31849
  ).then(
31850
- (Me) => Le("/api/auto/agents", {
31850
+ (Me) => De("/api/auto/agents", {
31851
31851
  method: "POST",
31852
31852
  headers: { "Content-Type": "application/json" },
31853
31853
  body: JSON.stringify({
@@ -31872,9 +31872,9 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31872
31872
  }
31873
31873
  async function xN(_) {
31874
31874
  try {
31875
- await Le(`/api/auto/agents/${_}`, { method: "DELETE" }), Mn(null), await pn();
31875
+ await De(`/api/auto/agents/${_}`, { method: "DELETE" }), Mn(null), await pn();
31876
31876
  } catch (re) {
31877
- De.error(re instanceof Error ? re.message : String(re));
31877
+ Le.error(re instanceof Error ? re.message : String(re));
31878
31878
  }
31879
31879
  }
31880
31880
  async function ag(_) {
@@ -31882,11 +31882,11 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31882
31882
  (re) => re.map((de) => de.id === _ ? { ...de, running: !0 } : de)
31883
31883
  );
31884
31884
  try {
31885
- await Le(`/api/auto/agents/${_}/run`, { method: "POST" });
31885
+ await De(`/api/auto/agents/${_}/run`, { method: "POST" });
31886
31886
  } catch (re) {
31887
31887
  Wn(
31888
31888
  (de) => de.map((Me) => Me.id === _ ? { ...Me, running: !1 } : Me)
31889
- ), De.error(re instanceof Error ? re.message : String(re));
31889
+ ), Le.error(re instanceof Error ? re.message : String(re));
31890
31890
  }
31891
31891
  }
31892
31892
  async function cg(_) {
@@ -31908,7 +31908,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31908
31908
  Q
31909
31909
  );
31910
31910
  try {
31911
- const ct = await Le("/api/sessions/new", {
31911
+ const ct = await De("/api/sessions/new", {
31912
31912
  method: "POST",
31913
31913
  headers: { "Content-Type": "application/json" },
31914
31914
  body: JSON.stringify({
@@ -31921,11 +31921,11 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31921
31921
  thinkingLevel: lr(Me) ? ps() : void 0
31922
31922
  })
31923
31923
  });
31924
- ct.sessionId && ea(ct.sessionId), je("live"), await Vt(), De.success(
31924
+ ct.sessionId && ea(ct.sessionId), je("live"), await Vt(), Le.success(
31925
31925
  `Started triage & execute for ${_.length} finding${_.length === 1 ? "" : "s"}`
31926
31926
  );
31927
31927
  } catch (ct) {
31928
- De.error(ct instanceof Error ? ct.message : "Could not start auto triage");
31928
+ Le.error(ct instanceof Error ? ct.message : "Could not start auto triage");
31929
31929
  } finally {
31930
31930
  Pe(!1);
31931
31931
  }
@@ -31938,7 +31938,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31938
31938
  (Et) => !!Et.busy && (!Et.sessionId || !re.has(Et.sessionId))
31939
31939
  ).length;
31940
31940
  if (!de.length) {
31941
- De.info(
31941
+ Le.info(
31942
31942
  Me ? "No unpinned idle sessions to clear" : Ve ? "Every session in scope is still working" : "No sessions to clear"
31943
31943
  );
31944
31944
  return;
@@ -31956,9 +31956,9 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31956
31956
  de.forEach((Et) => yt(Et));
31957
31957
  try {
31958
31958
  const Et = await OF(de, "live_clear_idle"), Rt = ((ct = Et.closed) == null ? void 0 : ct.length) ?? 0, Tt = ((pt = Et.failed) == null ? void 0 : pt.length) ?? 0;
31959
- Tt ? De.warning(`Archived ${Rt}, ${Tt} could not be archived`) : De.success(`Archived ${Rt} session${Rt === 1 ? "" : "s"}`);
31959
+ Tt ? Le.warning(`Archived ${Rt}, ${Tt} could not be archived`) : Le.success(`Archived ${Rt} session${Rt === 1 ? "" : "s"}`);
31960
31960
  } catch (Et) {
31961
- De.error(Et instanceof Error ? Et.message : "Could not archive sessions");
31961
+ Le.error(Et instanceof Error ? Et.message : "Could not archive sessions");
31962
31962
  } finally {
31963
31963
  await Vt().catch(() => {
31964
31964
  });
@@ -31971,7 +31971,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31971
31971
  Q
31972
31972
  ), Je = UF(_, Ke);
31973
31973
  try {
31974
- const ct = await Le("/api/sessions/new", {
31974
+ const ct = await De("/api/sessions/new", {
31975
31975
  method: "POST",
31976
31976
  headers: { "Content-Type": "application/json" },
31977
31977
  body: JSON.stringify({
@@ -31983,13 +31983,13 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
31983
31983
  thinkingLevel: lr(de) ? ps() : void 0
31984
31984
  })
31985
31985
  });
31986
- ct.sessionId && ea(ct.sessionId), je("live"), await Vt(), De.success(`Started ${_.label.toLowerCase()}`);
31986
+ ct.sessionId && ea(ct.sessionId), je("live"), await Vt(), Le.success(`Started ${_.label.toLowerCase()}`);
31987
31987
  } catch (ct) {
31988
- De.error(ct instanceof Error ? ct.message : "Could not start management session");
31988
+ Le.error(ct instanceof Error ? ct.message : "Could not start management session");
31989
31989
  }
31990
31990
  }
31991
31991
  const nc = ke(async (_) => {
31992
- const re = await Le("/api/settings", {
31992
+ const re = await De("/api/settings", {
31993
31993
  method: "POST",
31994
31994
  headers: { "Content-Type": "application/json" },
31995
31995
  body: JSON.stringify(_)
@@ -32000,7 +32000,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32000
32000
  onChange: (_) => nc({ transcriptView: _ })
32001
32001
  }), [Ln.transcriptView, nc]), kN = ke(async () => {
32002
32002
  try {
32003
- const _ = await Le("/api/onboarding", {
32003
+ const _ = await De("/api/onboarding", {
32004
32004
  method: "POST",
32005
32005
  headers: { "Content-Type": "application/json" },
32006
32006
  body: JSON.stringify({
@@ -32010,7 +32010,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32010
32010
  });
32011
32011
  ge(_.state), X(!0);
32012
32012
  } catch (_) {
32013
- De.error(_ instanceof Error ? _.message : "Couldn't restart onboarding");
32013
+ Le.error(_ instanceof Error ? _.message : "Couldn't restart onboarding");
32014
32014
  }
32015
32015
  }, []), SN = ke(async () => {
32016
32016
  try {
@@ -32018,7 +32018,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32018
32018
  } catch {
32019
32019
  }
32020
32020
  try {
32021
- const _ = await Le("/api/onboarding", {
32021
+ const _ = await De("/api/onboarding", {
32022
32022
  method: "POST",
32023
32023
  headers: { "Content-Type": "application/json" },
32024
32024
  body: JSON.stringify({ hostedIntroDone: !0 })
@@ -32028,7 +32028,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32028
32028
  }
32029
32029
  }, []), NN = ke(async () => {
32030
32030
  try {
32031
- const _ = await Le("/api/onboarding", {
32031
+ const _ = await De("/api/onboarding", {
32032
32032
  method: "POST",
32033
32033
  headers: { "Content-Type": "application/json" },
32034
32034
  body: JSON.stringify({
@@ -32043,15 +32043,15 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32043
32043
  }
32044
32044
  U(!1), J.current = !1;
32045
32045
  } catch (_) {
32046
- De.error(_ instanceof Error ? _.message : "Couldn't restart the tour");
32046
+ Le.error(_ instanceof Error ? _.message : "Couldn't restart the tour");
32047
32047
  }
32048
32048
  }, []), er = ke(async (_ = {}) => {
32049
32049
  const re = _.refreshModels ? "/api/coding-agents?refreshModels=1" : "/api/coding-agents";
32050
32050
  let de, Me;
32051
32051
  try {
32052
32052
  [de, Me] = await Promise.all([
32053
- Le(re),
32054
- Le("/api/setup/checks").catch(() => ({ checks: [] }))
32053
+ De(re),
32054
+ De("/api/setup/checks").catch(() => ({ checks: [] }))
32055
32055
  ]);
32056
32056
  } catch {
32057
32057
  return;
@@ -32059,7 +32059,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32059
32059
  M(de.agents ?? []), K(Ws(de.models)), me(Me.checks ?? []);
32060
32060
  }, []), rc = ke(async () => {
32061
32061
  try {
32062
- const _ = await Le("/api/connections");
32062
+ const _ = await De("/api/connections");
32063
32063
  te(_.connections ?? []);
32064
32064
  } catch {
32065
32065
  }
@@ -32067,8 +32067,8 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32067
32067
  function CN(_) {
32068
32068
  me(
32069
32069
  (re) => re.map((de) => de.key === _ ? { ...de, running: !0 } : de)
32070
- ), De.promise(
32071
- Le(`/api/setup/checks/${_}/run`, {
32070
+ ), Le.promise(
32071
+ De(`/api/setup/checks/${_}/run`, {
32072
32072
  method: "POST"
32073
32073
  }).then((re) => {
32074
32074
  me(re.checks ?? []), window.setTimeout(() => void er(), 2e3);
@@ -32086,14 +32086,14 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32086
32086
  (Me) => Me.map((Ve) => Ve.key === _ ? { ...Ve, visible: re } : Ve)
32087
32087
  );
32088
32088
  try {
32089
- const Me = await Le(`/api/coding-agents/${_}`, {
32089
+ const Me = await De(`/api/coding-agents/${_}`, {
32090
32090
  method: "POST",
32091
32091
  headers: { "Content-Type": "application/json" },
32092
32092
  body: JSON.stringify({ visible: re })
32093
32093
  });
32094
32094
  M(Me.agents ?? []), K(Ws(Me.models));
32095
32095
  } catch (Me) {
32096
- M(de), De.error(Me instanceof Error ? Me.message : String(Me));
32096
+ M(de), Le.error(Me instanceof Error ? Me.message : String(Me));
32097
32097
  }
32098
32098
  }
32099
32099
  function dg(_) {
@@ -32101,8 +32101,8 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32101
32101
  (re) => re.map(
32102
32102
  (de) => de.key === _ ? { ...de, status: { ...de.status, setupRunning: !0 } } : de
32103
32103
  )
32104
- ), De.promise(
32105
- Le(`/api/coding-agents/${_}/setup`, {
32104
+ ), Le.promise(
32105
+ De(`/api/coding-agents/${_}/setup`, {
32106
32106
  method: "POST"
32107
32107
  }).then((re) => {
32108
32108
  M(re.agents ?? []), K(Ws(re.models)), window.setTimeout(() => void er(), 3e3);
@@ -32118,14 +32118,14 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32118
32118
  V(de ?? null), de && $(null);
32119
32119
  const Ve = window.open("about:blank", "_blank");
32120
32120
  try {
32121
- const Je = await Le(re, {
32121
+ const Je = await De(re, {
32122
32122
  method: "POST",
32123
32123
  headers: { "Content-Type": "application/json" },
32124
32124
  body: JSON.stringify(Me)
32125
32125
  });
32126
32126
  if (Je.status === "error") throw new Error(Je.error || "Couldn't start login");
32127
32127
  if (Je.status === "complete") {
32128
- Ve == null || Ve.close(), De.success(`${Al(Je.provider)} connected`), V(null), de && $(de), await Promise.all([
32128
+ Ve == null || Ve.close(), Le.success(`${Al(Je.provider)} connected`), V(null), de && $(de), await Promise.all([
32129
32129
  er({ refreshModels: !0 }),
32130
32130
  rc()
32131
32131
  ]);
@@ -32133,13 +32133,13 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32133
32133
  }
32134
32134
  j(Je), Je.authorizationUrl && Ve ? (Ve.location.replace(Je.authorizationUrl), Ve.focus()) : Je.authorizationUrl || Ve == null || Ve.close();
32135
32135
  } catch (Je) {
32136
- Ve == null || Ve.close(), V(null), De.error(Je instanceof Error ? Je.message : "Couldn't start login");
32136
+ Ve == null || Ve.close(), V(null), Le.error(Je instanceof Error ? Je.message : "Couldn't start login");
32137
32137
  }
32138
32138
  }
32139
32139
  async function oc(_, re, de) {
32140
32140
  if (!Ix.has(_)) {
32141
- De.promise(
32142
- Le(`/api/coding-agents/${_}/login-terminal`, { method: "POST" }).then((Me) => {
32141
+ Le.promise(
32142
+ De(`/api/coding-agents/${_}/login-terminal`, { method: "POST" }).then((Me) => {
32143
32143
  localStorage.setItem("lfg_term_session", Me.terminalSession || `login-${_}`), window.dispatchEvent(new Event("lfg:term-session")), je("term");
32144
32144
  }),
32145
32145
  {
@@ -32175,13 +32175,13 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32175
32175
  });
32176
32176
  if (re)
32177
32177
  try {
32178
- await Le("/api/coding-agents/pi/api-key", {
32178
+ await De("/api/coding-agents/pi/api-key", {
32179
32179
  method: "POST",
32180
32180
  headers: { "Content-Type": "application/json" },
32181
32181
  body: JSON.stringify({ provider: _.id, key: re })
32182
- }), await er({ refreshModels: !0 }), De.success(`${_.label} connected`);
32182
+ }), await er({ refreshModels: !0 }), Le.success(`${_.label} connected`);
32183
32183
  } catch (de) {
32184
- De.error(de instanceof Error ? de.message : `Couldn't connect ${_.label}`);
32184
+ Le.error(de instanceof Error ? de.message : `Couldn't connect ${_.label}`);
32185
32185
  }
32186
32186
  }
32187
32187
  async function IN(_) {
@@ -32192,20 +32192,20 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32192
32192
  destructive: !0
32193
32193
  }))
32194
32194
  try {
32195
- await Le(`/api/coding-agents/pi/providers/${_.id}`, { method: "DELETE" }), await er({ refreshModels: !0 }), De.success(`${_.label} disconnected`);
32195
+ await De(`/api/coding-agents/pi/providers/${_.id}`, { method: "DELETE" }), await er({ refreshModels: !0 }), Le.success(`${_.label} disconnected`);
32196
32196
  } catch (de) {
32197
- De.error(de instanceof Error ? de.message : `Couldn't disconnect ${_.label}`);
32197
+ Le.error(de instanceof Error ? de.message : `Couldn't disconnect ${_.label}`);
32198
32198
  }
32199
32199
  }
32200
32200
  async function PN() {
32201
32201
  try {
32202
- const { account: _ } = await Le(
32202
+ const { account: _ } = await De(
32203
32203
  "/api/coding-agents/claude/accounts",
32204
32204
  { method: "POST" }
32205
32205
  );
32206
32206
  Vd(), await er(), await oc("aisdk", void 0, _.id);
32207
32207
  } catch (_) {
32208
- De.error(_ instanceof Error ? _.message : "Couldn't add Claude account");
32208
+ Le.error(_ instanceof Error ? _.message : "Couldn't add Claude account");
32209
32209
  }
32210
32210
  }
32211
32211
  async function _N(_) {
@@ -32216,9 +32216,9 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32216
32216
  destructive: !0
32217
32217
  })))
32218
32218
  try {
32219
- await Le(`/api/coding-agents/claude/accounts/${_.id}`, { method: "DELETE" }), Vd(), localStorage.getItem("lfg_claude_account") === _.id && localStorage.removeItem("lfg_claude_account"), await er({ refreshModels: !0 }), De.success(`${_.label} removed`);
32219
+ await De(`/api/coding-agents/claude/accounts/${_.id}`, { method: "DELETE" }), Vd(), localStorage.getItem("lfg_claude_account") === _.id && localStorage.removeItem("lfg_claude_account"), await er({ refreshModels: !0 }), Le.success(`${_.label} removed`);
32220
32220
  } catch (de) {
32221
- De.error(de instanceof Error ? de.message : "Couldn't remove Claude account");
32221
+ Le.error(de instanceof Error ? de.message : "Couldn't remove Claude account");
32222
32222
  }
32223
32223
  }
32224
32224
  async function Vu() {
@@ -32235,7 +32235,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32235
32235
  start: oc,
32236
32236
  setSession: j,
32237
32237
  clear: async () => {
32238
- B && B.status !== "complete" && await Le(`/api/coding-agents/auth/${B.id}`, { method: "DELETE" }).catch(() => {
32238
+ B && B.status !== "complete" && await De(`/api/coding-agents/auth/${B.id}`, { method: "DELETE" }).catch(() => {
32239
32239
  }), j(null), V(null);
32240
32240
  },
32241
32241
  complete: Vu
@@ -32842,7 +32842,7 @@ ${_.reasoning.map((jr) => `- ${jr}`).join(`
32842
32842
  (Je) => Me.has(Je)
32843
32843
  );
32844
32844
  if (!Ve) {
32845
- De.error("That agent isn't configured on this box");
32845
+ Le.error("That agent isn't configured on this box");
32846
32846
  return;
32847
32847
  }
32848
32848
  qe((Je) => ({
@@ -33428,7 +33428,7 @@ function kB({
33428
33428
  let q = !1;
33429
33429
  const A = async () => {
33430
33430
  try {
33431
- const pe = await Le(
33431
+ const pe = await De(
33432
33432
  "/api/coding-agents/setup/log"
33433
33433
  );
33434
33434
  q || w({
@@ -33448,7 +33448,7 @@ function kB({
33448
33448
  const q = k.current;
33449
33449
  q && (q.scrollTop = q.scrollHeight);
33450
33450
  }, [y.lines]);
33451
- const [K, oe] = H(""), me = U, Se = K || (me.some((q) => q.key === "claude") ? "claude" : ((se = me[0]) == null ? void 0 : se.key) || "claude"), ne = (q) => Le("/api/onboarding", {
33451
+ const [K, oe] = H(""), me = U, Se = K || (me.some((q) => q.key === "claude") ? "claude" : ((se = me[0]) == null ? void 0 : se.key) || "claude"), ne = (q) => De("/api/onboarding", {
33452
33452
  method: "POST",
33453
33453
  headers: { "Content-Type": "application/json" },
33454
33454
  body: JSON.stringify(q)
@@ -33457,7 +33457,7 @@ function kB({
33457
33457
  async function he() {
33458
33458
  m(!0), h(null);
33459
33459
  try {
33460
- let q = await Le(
33460
+ let q = await De(
33461
33461
  "/api/onboarding/profile",
33462
33462
  {
33463
33463
  method: "POST",
@@ -33465,7 +33465,7 @@ function kB({
33465
33465
  body: JSON.stringify({ email: R.trim(), name: C.trim() })
33466
33466
  }
33467
33467
  );
33468
- P && (q = await Le(
33468
+ P && (q = await De(
33469
33469
  `/api/onboarding/avatar?email=${encodeURIComponent(R.trim().toLowerCase())}`,
33470
33470
  { method: "POST", headers: { "Content-Type": P.type }, body: P }
33471
33471
  ).catch(() => q)), s(R.trim().toLowerCase(), q.users ?? []), f("agents"), i();
@@ -33482,7 +33482,7 @@ function kB({
33482
33482
  var q;
33483
33483
  m(!0), h(null);
33484
33484
  try {
33485
- const A = await Le("/api/onboarding/repo", {
33485
+ const A = await De("/api/onboarding/repo", {
33486
33486
  method: "POST",
33487
33487
  headers: { "Content-Type": "application/json" },
33488
33488
  body: JSON.stringify({ url: B.trim() })
@@ -33513,7 +33513,7 @@ function kB({
33513
33513
  if (q.length) {
33514
33514
  m(!0), h(null), w({ lines: [], running: !0, error: null });
33515
33515
  try {
33516
- await Le("/api/coding-agents/setup", {
33516
+ await De("/api/coding-agents/setup", {
33517
33517
  method: "POST",
33518
33518
  headers: { "Content-Type": "application/json" },
33519
33519
  body: JSON.stringify({ kinds: q })
@@ -33532,7 +33532,7 @@ function kB({
33532
33532
  }
33533
33533
  m(!0), h(null);
33534
33534
  try {
33535
- const q = await Le("/api/sessions/new", {
33535
+ const q = await De("/api/sessions/new", {
33536
33536
  method: "POST",
33537
33537
  headers: { "Content-Type": "application/json" },
33538
33538
  body: JSON.stringify({
@@ -34224,7 +34224,7 @@ function TB({
34224
34224
  }, [n, t == null ? void 0 : t.sessionId]);
34225
34225
  const Y = ke((X) => {
34226
34226
  const se = J.current, q = se.includes(X), A = q ? se.filter((G) => G !== X) : [...se, X];
34227
- J.current = A, U(A), Mt("selection"), De.success(q ? "Session unpinned" : "Session pinned to top");
34227
+ J.current = A, U(A), Mt("selection"), Le.success(q ? "Session unpinned" : "Session pinned to top");
34228
34228
  }, []);
34229
34229
  ue(() => {
34230
34230
  if (!V || F) return;
@@ -34673,7 +34673,7 @@ function MB({
34673
34673
  return;
34674
34674
  }
34675
34675
  if (We.length >= $) {
34676
- De.error(`${$} columns max — unpin one first`);
34676
+ Le.error(`${$} columns max — unpin one first`);
34677
34677
  return;
34678
34678
  }
34679
34679
  ae([...We, le]), oe((ve) => ve === le ? null : ve);
@@ -34725,7 +34725,7 @@ function MB({
34725
34725
  }
34726
34726
  const [Ot, ht] = ve < Pe ? [ve, Pe] : [Pe, ve];
34727
34727
  let Ft = dt.slice(Ot, ht + 1);
34728
- Ft.length > $ && (De.error(`${$} panes max — selection trimmed`), Ft = Pe >= ve ? Ft.slice(Ft.length - $) : Ft.slice(0, $)), ae(Ft), oe(null), he(le);
34728
+ Ft.length > $ && (Le.error(`${$} panes max — selection trimmed`), Ft = Pe >= ve ? Ft.slice(Ft.length - $) : Ft.slice(0, $)), ae(Ft), oe(null), he(le);
34729
34729
  },
34730
34730
  [dt]
34731
34731
  ), Ut = ke(
@@ -34743,7 +34743,7 @@ function MB({
34743
34743
  const ve = pe.get(le);
34744
34744
  if (!(!ve || !Io(ve)))
34745
34745
  try {
34746
- await Le(`/api/sessions/${le}/interrupt`, { method: "POST" }), await l();
34746
+ await De(`/api/sessions/${le}/interrupt`, { method: "POST" }), await l();
34747
34747
  } catch {
34748
34748
  }
34749
34749
  },
@@ -34761,7 +34761,7 @@ function MB({
34761
34761
  try {
34762
34762
  await $h(le, "live_keyboard_shift_e"), f(le);
34763
34763
  } catch (Ot) {
34764
- De.error(Ot instanceof Error ? Ot.message : "Couldn't archive session");
34764
+ Le.error(Ot instanceof Error ? Ot.message : "Couldn't archive session");
34765
34765
  } finally {
34766
34766
  await l().catch(() => {
34767
34767
  });
@@ -35696,7 +35696,7 @@ function AB({
35696
35696
  if (l) {
35697
35697
  s(!0), c(null);
35698
35698
  try {
35699
- await Le(`/api/sessions/${l}/model`, {
35699
+ await De(`/api/sessions/${l}/model`, {
35700
35700
  method: "POST",
35701
35701
  headers: { "Content-Type": "application/json" },
35702
35702
  body: JSON.stringify({ model: C })
@@ -35804,61 +35804,84 @@ function DB({
35804
35804
  const [n, r] = H([]), [o, s] = H(0);
35805
35805
  ue(() => {
35806
35806
  if (!e) return;
35807
- let c = !1;
35808
- return DF().then((l) => {
35809
- c || r(l);
35807
+ let f = !1;
35808
+ return DF().then((d) => {
35809
+ f || r(d);
35810
35810
  }).catch(() => {
35811
- c || r([]);
35811
+ f || r([]);
35812
35812
  }), () => {
35813
- c = !0;
35813
+ f = !0;
35814
35814
  };
35815
35815
  }, [e]), ue(() => s(0), [e == null ? void 0 : e.query]);
35816
- const i = Qe(() => {
35816
+ const i = (e == null ? void 0 : e.query) ?? "", [c, l] = H({
35817
+ q: "",
35818
+ items: []
35819
+ });
35820
+ ue(() => {
35821
+ if (!e || !i) {
35822
+ l({ q: "", items: [] });
35823
+ return;
35824
+ }
35825
+ let f = !1;
35826
+ const d = setTimeout(() => {
35827
+ De(`/api/skills?q=${encodeURIComponent(i)}`).then((m) => {
35828
+ f || l({ q: i, items: Array.isArray(m.skills) ? m.skills : [] });
35829
+ }).catch(() => {
35830
+ f || l({ q: i, items: [] });
35831
+ });
35832
+ }, 140);
35833
+ return () => {
35834
+ f = !0, clearTimeout(d);
35835
+ };
35836
+ }, [e, i]);
35837
+ const u = Qe(() => {
35817
35838
  if (!e) return [];
35818
- const c = e.query;
35819
- return n.filter((l) => {
35820
- const u = `${l.trigger} ${l.name} ${l.description} ${l.keywords || ""}`.toLowerCase();
35821
- return !c || u.includes(c);
35839
+ const f = e.query, d = n.filter((h) => {
35840
+ const b = `${h.trigger} ${h.name} ${h.description}`.toLowerCase();
35841
+ return !f || b.includes(f);
35822
35842
  });
35823
- }, [e, n]);
35824
- return !e || !i.length ? null : /* @__PURE__ */ a(
35843
+ if (!f) return d;
35844
+ const m = new Set(d.map((h) => `${h.source}:${h.trigger}`)), p = c.q === f ? c.items.filter((h) => !m.has(`${h.source}:${h.trigger}`)) : [];
35845
+ return [...d, ...p];
35846
+ }, [e, n, c]);
35847
+ return !e || !u.length ? null : /* @__PURE__ */ a(
35825
35848
  "div",
35826
35849
  {
35827
35850
  "data-no-composer-swipe": !0,
35828
- onWheel: (c) => c.stopPropagation(),
35829
- onTouchStart: (c) => c.stopPropagation(),
35830
- onTouchMove: (c) => c.stopPropagation(),
35831
- onTouchEnd: (c) => c.stopPropagation(),
35851
+ onWheel: (f) => f.stopPropagation(),
35852
+ onTouchStart: (f) => f.stopPropagation(),
35853
+ onTouchMove: (f) => f.stopPropagation(),
35854
+ onTouchEnd: (f) => f.stopPropagation(),
35832
35855
  className: "absolute bottom-full left-0 right-0 z-50 mb-2 overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl",
35833
- children: /* @__PURE__ */ a("div", { className: "max-h-[min(18rem,42dvh)] overflow-y-auto overscroll-contain p-1 touch-pan-y", children: i.map((c, l) => /* @__PURE__ */ x(
35856
+ children: /* @__PURE__ */ a("div", { className: "max-h-[min(18rem,42dvh)] overflow-y-auto overscroll-contain p-1 touch-pan-y", children: u.map((f, d) => /* @__PURE__ */ x(
35834
35857
  "button",
35835
35858
  {
35836
35859
  type: "button",
35837
35860
  "data-skill-suggest-option": !0,
35838
- onMouseDown: (u) => {
35839
- u.preventDefault();
35861
+ onMouseDown: (m) => {
35862
+ m.preventDefault();
35840
35863
  },
35841
- onClick: () => t(c),
35842
- onMouseEnter: () => s(l),
35864
+ onClick: () => t(f),
35865
+ onMouseEnter: () => s(d),
35843
35866
  className: ee(
35844
35867
  "flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm",
35845
- l === o ? "bg-accent text-accent-foreground" : "hover:bg-accent/70"
35868
+ d === o ? "bg-accent text-accent-foreground" : "hover:bg-accent/70"
35846
35869
  ),
35847
35870
  children: [
35848
35871
  /* @__PURE__ */ x("span", { className: "min-w-0 flex-1", children: [
35849
35872
  /* @__PURE__ */ x("span", { className: "block truncate font-medium", children: [
35850
35873
  /* @__PURE__ */ a("span", { className: "font-mono text-primary", children: "/" }),
35851
- c.trigger
35874
+ f.trigger
35852
35875
  ] }),
35853
- c.description ? /* @__PURE__ */ a("span", { className: "mt-0.5 block truncate text-xs leading-snug text-muted-foreground", children: c.description }) : null
35876
+ f.description ? /* @__PURE__ */ a("span", { className: "mt-0.5 block truncate text-xs leading-snug text-muted-foreground", children: f.description }) : null
35854
35877
  ] }),
35855
35878
  /* @__PURE__ */ x("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] uppercase text-muted-foreground", children: [
35856
- c.source,
35879
+ f.source,
35857
35880
  " skill"
35858
35881
  ] })
35859
35882
  ]
35860
35883
  },
35861
- `${c.source}:${c.trigger}`
35884
+ `${f.source}:${f.trigger}`
35862
35885
  )) })
35863
35886
  }
35864
35887
  );
@@ -35972,7 +35995,7 @@ function HS({ className: e, ...t }) {
35972
35995
  );
35973
35996
  }
35974
35997
  async function WS(e) {
35975
- const t = await Le(
35998
+ const t = await De(
35976
35999
  `/api/sessions/${encodeURIComponent(e)}/messages?limit=80`
35977
36000
  );
35978
36001
  return {
@@ -36051,7 +36074,7 @@ function zB({
36051
36074
  }
36052
36075
  let ne = !1;
36053
36076
  const he = E_(l);
36054
- return he ? (T(he.messages), w(he.nextBefore), g(!1)) : (g(!0), w(null), T([])), Le(
36077
+ return he ? (T(he.messages), w(he.nextBefore), g(!1)) : (g(!0), w(null), T([])), De(
36055
36078
  `/api/sessions/${encodeURIComponent(l)}/messages?limit=80`,
36056
36079
  { cache: "no-store" }
36057
36080
  ).then((ce) => {
@@ -36093,7 +36116,7 @@ function zB({
36093
36116
  }, [o, s, V, T, l]);
36094
36117
  const oe = ke(async () => {
36095
36118
  if (!l || y == null) return !1;
36096
- const ne = y, he = await Le(
36119
+ const ne = y, he = await De(
36097
36120
  `/api/sessions/${encodeURIComponent(l)}/messages?page=backward&before=${ne}&limit=80`,
36098
36121
  { cache: "no-store" }
36099
36122
  ), ce = xl(Array.isArray(he.messages) ? he.messages : []);
@@ -36123,7 +36146,7 @@ function zB({
36123
36146
  try {
36124
36147
  const fe = Ie.length ? await Promise.all(Ie.map(j)) : [], Z = Dl(we, fe);
36125
36148
  if (v(!0), window.setTimeout(() => v(!1), 480), u) {
36126
- await Le("/api/sessions/resume", {
36149
+ await De("/api/sessions/resume", {
36127
36150
  method: "POST",
36128
36151
  headers: { "Content-Type": "application/json" },
36129
36152
  body: JSON.stringify({
@@ -36134,7 +36157,7 @@ function zB({
36134
36157
  }), Gr(Re == null ? void 0 : Re.id, "sent");
36135
36158
  for (const ge of Ie)
36136
36159
  ge.previewUrl && URL.revokeObjectURL(ge.previewUrl);
36137
- z([]), W(), De.success("Session resumed"), await i();
36160
+ z([]), W(), Le.success("Session resumed"), await i();
36138
36161
  return;
36139
36162
  }
36140
36163
  V.run(
@@ -36173,7 +36196,7 @@ function zB({
36173
36196
  async function Se() {
36174
36197
  if (l)
36175
36198
  try {
36176
- await Le(`/api/sessions/${l}/interrupt`, { method: "POST" }), await i();
36199
+ await De(`/api/sessions/${l}/interrupt`, { method: "POST" }), await i();
36177
36200
  } catch (ne) {
36178
36201
  o(ne instanceof Error ? ne.message : String(ne));
36179
36202
  }
@@ -36436,7 +36459,7 @@ function KS({
36436
36459
  if (c) {
36437
36460
  o(null);
36438
36461
  try {
36439
- await Le(`/api/sessions/${c}/user`, {
36462
+ await De(`/api/sessions/${c}/user`, {
36440
36463
  method: "POST",
36441
36464
  headers: { "Content-Type": "application/json" },
36442
36465
  body: JSON.stringify({ user: p || null })
@@ -36450,7 +36473,7 @@ function KS({
36450
36473
  if (c) {
36451
36474
  o(null);
36452
36475
  try {
36453
- await Le(`/api/sessions/${c}/interrupt`, { method: "POST" }), await n();
36476
+ await De(`/api/sessions/${c}/interrupt`, { method: "POST" }), await n();
36454
36477
  } catch (p) {
36455
36478
  o(p instanceof Error ? p.message : String(p));
36456
36479
  }
@@ -36459,7 +36482,7 @@ function KS({
36459
36482
  async function d() {
36460
36483
  if (c)
36461
36484
  try {
36462
- await Kh(VF(c)), De.success("Session reference copied");
36485
+ await Kh(VF(c)), Le.success("Session reference copied");
36463
36486
  } catch (p) {
36464
36487
  o(p instanceof Error ? p.message : "Could not copy session reference");
36465
36488
  }
@@ -36601,7 +36624,7 @@ function YS({
36601
36624
  value: N.value,
36602
36625
  onValueChange: (E) => {
36603
36626
  E !== "full" && E !== "user-lfg-output" || N.onChange(E).catch((P) => {
36604
- De.error(P instanceof Error ? P.message : "Couldn’t change message view");
36627
+ Le.error(P instanceof Error ? P.message : "Couldn’t change message view");
36605
36628
  });
36606
36629
  },
36607
36630
  children: [
@@ -36705,7 +36728,7 @@ function BB({
36705
36728
  onRefresh: r,
36706
36729
  onRemove: o,
36707
36730
  onError: (C) => {
36708
- C && De.error(C);
36731
+ C && Le.error(C);
36709
36732
  }
36710
36733
  }), v = yn(Ou);
36711
36734
  return /* @__PURE__ */ x(st, { children: [
@@ -36791,7 +36814,7 @@ function BB({
36791
36814
  value: v.value,
36792
36815
  onValueChange: (C) => {
36793
36816
  C !== "full" && C !== "user-lfg-output" || v.onChange(C).catch((N) => {
36794
- De.error(N instanceof Error ? N.message : "Couldn’t change message view");
36817
+ Le.error(N instanceof Error ? N.message : "Couldn’t change message view");
36795
36818
  });
36796
36819
  },
36797
36820
  children: [
@@ -36860,11 +36883,11 @@ function UB({
36860
36883
  if (!(!r || !f || f === e.thinkingLevel || c)) {
36861
36884
  l(!0), n(null);
36862
36885
  try {
36863
- await Le(`/api/sessions/${r}/thinking-level`, {
36886
+ await De(`/api/sessions/${r}/thinking-level`, {
36864
36887
  method: "POST",
36865
36888
  headers: { "Content-Type": "application/json" },
36866
36889
  body: JSON.stringify({ thinkingLevel: f })
36867
- }), localStorage.setItem("lfg_thinking_level", f), await t(), De.success(`Thinking level set to ${f}`);
36890
+ }), localStorage.setItem("lfg_thinking_level", f), await t(), Le.success(`Thinking level set to ${f}`);
36868
36891
  } catch (d) {
36869
36892
  n(d instanceof Error ? d.message : String(d));
36870
36893
  } finally {
@@ -36926,7 +36949,7 @@ function VB({
36926
36949
  async (L) => {
36927
36950
  g(null), w(!1);
36928
36951
  try {
36929
- await f(e, L), De.success("Session renamed");
36952
+ await f(e, L), Le.success("Session renamed");
36930
36953
  } catch (D) {
36931
36954
  throw g(D instanceof Error ? D.message : String(D)), w(!0), D;
36932
36955
  }
@@ -37287,17 +37310,17 @@ function XS({
37287
37310
  function I(O, z) {
37288
37311
  if (O == null || O.preventDefault(), !C) return;
37289
37312
  if (!l.some((j) => j.key === d)) {
37290
- De.error(
37313
+ Le.error(
37291
37314
  `Set up and sign in to a coding agent before ${o ? "continuing" : "forking"} a session.`
37292
37315
  );
37293
37316
  return;
37294
37317
  }
37295
37318
  localStorage.setItem("lfg_fork_agent", d), localStorage.setItem(`lfg_fork_model_${d}`, b), lr(d) && localStorage.setItem("lfg_thinking_level", y);
37296
37319
  const M = (z ?? k).trim(), B = P.attachments;
37297
- n(), De.promise(
37320
+ n(), Le.promise(
37298
37321
  (async () => {
37299
37322
  const j = B.length ? await Promise.all(B.map(P.resolveUpload)) : [], W = Dl(M, j);
37300
- return Le(`/api/sessions/${C}/fork`, {
37323
+ return De(`/api/sessions/${C}/fork`, {
37301
37324
  method: "POST",
37302
37325
  headers: { "Content-Type": "application/json" },
37303
37326
  body: JSON.stringify({
@@ -37466,7 +37489,7 @@ const JS = gi(function({
37466
37489
  if (E) {
37467
37490
  C(null), R(!1);
37468
37491
  try {
37469
- await l(E, Q), De.success("Session renamed");
37492
+ await l(E, Q), Le.success("Session renamed");
37470
37493
  } catch (fe) {
37471
37494
  const Z = fe instanceof Error ? fe.message : String(fe);
37472
37495
  throw C(Z), R(!0), fe;
@@ -37479,7 +37502,7 @@ const JS = gi(function({
37479
37502
  if (!(!E || !Q || Q === t.model)) {
37480
37503
  C(null);
37481
37504
  try {
37482
- await Le(`/api/sessions/${E}/model`, {
37505
+ await De(`/api/sessions/${E}/model`, {
37483
37506
  method: "POST",
37484
37507
  headers: { "Content-Type": "application/json" },
37485
37508
  body: JSON.stringify({ model: Q })
@@ -38268,9 +38291,9 @@ function Nv({
38268
38291
  const h = ke(async () => {
38269
38292
  if (e)
38270
38293
  try {
38271
- await Kh(e), m(!0), window.setTimeout(() => m(!1), 1600), De("Message copied"), Mt("success");
38294
+ await Kh(e), m(!0), window.setTimeout(() => m(!1), 1600), Le("Message copied"), Mt("success");
38272
38295
  } catch {
38273
- De.error("Couldn’t copy message");
38296
+ Le.error("Couldn’t copy message");
38274
38297
  }
38275
38298
  }, [e]), b = ke(() => {
38276
38299
  const v = r.current;
@@ -38596,7 +38619,7 @@ function n6({
38596
38619
  onClick: async () => {
38597
38620
  i(o), n(null);
38598
38621
  try {
38599
- await Le(`/api/sessions/${t}/dismiss`, { method: "POST" });
38622
+ await De(`/api/sessions/${t}/dismiss`, { method: "POST" });
38600
38623
  } catch (l) {
38601
38624
  n(l instanceof Error ? l.message : String(l)), i(null);
38602
38625
  }
@@ -38616,7 +38639,7 @@ function n6({
38616
38639
  onClick: async () => {
38617
38640
  i(l.index), n(null);
38618
38641
  try {
38619
- await Le(`/api/sessions/${t}/answer`, {
38642
+ await De(`/api/sessions/${t}/answer`, {
38620
38643
  method: "POST",
38621
38644
  headers: { "Content-Type": "application/json" },
38622
38645
  body: JSON.stringify({ index: l.index })
@@ -38645,7 +38668,7 @@ function eN({
38645
38668
  let h = !1;
38646
38669
  return (async () => {
38647
38670
  try {
38648
- const b = await Le("/api/projects/delete-folder", {
38671
+ const b = await De("/api/projects/delete-folder", {
38649
38672
  method: "POST",
38650
38673
  headers: { "Content-Type": "application/json" },
38651
38674
  body: JSON.stringify({ path: d })
@@ -38663,11 +38686,11 @@ function eN({
38663
38686
  async function m() {
38664
38687
  l(!0), f(null);
38665
38688
  try {
38666
- await Le("/api/projects/delete-folder", {
38689
+ await De("/api/projects/delete-folder", {
38667
38690
  method: "POST",
38668
38691
  headers: { "Content-Type": "application/json" },
38669
38692
  body: JSON.stringify({ path: d, confirm: !0 })
38670
- }), De.success(`Deleted ${e.name}`), await n(d), t();
38693
+ }), Le.success(`Deleted ${e.name}`), await n(d), t();
38671
38694
  } catch (h) {
38672
38695
  f(h instanceof Error ? h.message : "Couldn't delete this folder");
38673
38696
  } finally {
@@ -38743,12 +38766,12 @@ function Yh({
38743
38766
  u(!0), b(null);
38744
38767
  try {
38745
38768
  const E = N ? `?path=${encodeURIComponent(N)}` : "";
38746
- c(await Le(`/api/filesystem/directories${E}`));
38769
+ c(await De(`/api/filesystem/directories${E}`));
38747
38770
  } catch (E) {
38748
38771
  const P = E instanceof Error ? E.message : "Couldn't open this folder";
38749
38772
  if (N && R)
38750
38773
  try {
38751
- c(await Le("/api/filesystem/directories")), b(`${N} is unavailable (${P}) — showing your projects folder instead.`);
38774
+ c(await De("/api/filesystem/directories")), b(`${N} is unavailable (${P}) — showing your projects folder instead.`);
38752
38775
  return;
38753
38776
  } catch {
38754
38777
  }
@@ -38765,12 +38788,12 @@ function Yh({
38765
38788
  var E;
38766
38789
  u(!0), b(null);
38767
38790
  try {
38768
- const P = await Le(N, {
38791
+ const P = await De(N, {
38769
38792
  method: "POST",
38770
38793
  headers: { "Content-Type": "application/json" },
38771
38794
  body: JSON.stringify(R)
38772
38795
  });
38773
- await o(((E = P.repos) == null ? void 0 : E.find((I) => I.cwd === P.repo.cwd)) ?? P.repo), r(!1), De.success("Project ready");
38796
+ await o(((E = P.repos) == null ? void 0 : E.find((I) => I.cwd === P.repo.cwd)) ?? P.repo), r(!1), Le.success("Project ready");
38774
38797
  } catch (P) {
38775
38798
  b(P instanceof Error ? P.message : "Couldn't create project");
38776
38799
  } finally {
@@ -38933,13 +38956,13 @@ function tN({
38933
38956
  async function N(I) {
38934
38957
  w(I.cwd);
38935
38958
  try {
38936
- await Le("/api/repos", {
38959
+ await De("/api/repos", {
38937
38960
  method: "DELETE",
38938
38961
  headers: { "Content-Type": "application/json" },
38939
38962
  body: JSON.stringify({ cwd: I.cwd })
38940
- }), De.success(`Removed ${I.name}`, { description: "The folder is still on disk." }), await (u == null ? void 0 : u(I.cwd));
38963
+ }), Le.success(`Removed ${I.name}`, { description: "The folder is still on disk." }), await (u == null ? void 0 : u(I.cwd));
38941
38964
  } catch (O) {
38942
- De.error(O instanceof Error ? O.message : "Couldn't remove that project");
38965
+ Le.error(O instanceof Error ? O.message : "Couldn't remove that project");
38943
38966
  } finally {
38944
38967
  w(null);
38945
38968
  }
@@ -39301,7 +39324,7 @@ function Ev({
39301
39324
  ye.removeEventListener("touchstart", Vt), ye.removeEventListener("touchmove", Er), ye.removeEventListener("touchend", xt), ye.removeEventListener("touchcancel", xt), $e.current || (ye.style.transition = "", ye.style.transform = "", ye.style.opacity = "");
39302
39325
  };
39303
39326
  }, [d, !f]), ue(() => {
39304
- !Re || fe || Le("/api/sessions/resumable?limit=20").then((ye) => Z(Array.isArray(ye.sessions) ? ye.sessions : [])).catch(() => Z([]));
39327
+ !Re || fe || De("/api/sessions/resumable?limit=20").then((ye) => Z(Array.isArray(ye.sessions) ? ye.sessions : [])).catch(() => Z([]));
39305
39328
  }, [Re, fe]);
39306
39329
  function je(ye) {
39307
39330
  const ot = W.trim(), bt = hf({
@@ -39313,8 +39336,8 @@ function Ev({
39313
39336
  project: ye.project
39314
39337
  }), Dt = ye.agent === "claude" ? ["fable", "opus", "sonnet", "haiku"].includes(I) ? I : void 0 : ye.agent === "opencode" ? (y.models.opencode ?? Eo.opencode).includes(I) ? I : k("opencode") : ye.agent === "codex" ? (y.models["codex-aisdk"] ?? Eo["codex-aisdk"]).includes(I) ? I : k("codex-aisdk") : void 0, tn = Jo(B, n);
39315
39338
  c();
39316
- const yt = (Kt) => De.promise(
39317
- Le("/api/sessions/resume", {
39339
+ const yt = (Kt) => Le.promise(
39340
+ De("/api/sessions/resume", {
39318
39341
  method: "POST",
39319
39342
  headers: { "Content-Type": "application/json" },
39320
39343
  body: JSON.stringify({
@@ -39420,7 +39443,7 @@ function Ev({
39420
39443
  if (!Dt && !tn.length) return;
39421
39444
  if (!mn.some((Ct) => Ct.key === v)) {
39422
39445
  const Ct = "Set up and sign in to a coding agent before starting a session.";
39423
- K(Ct), De.error(Ct);
39446
+ K(Ct), Le.error(Ct);
39424
39447
  return;
39425
39448
  }
39426
39449
  const yt = Jo(B, n) || null, Kt = v, Zt = I, kn = bt ?? z, pn = Kt === "aisdk" && N || void 0, Vt = hf({
@@ -39429,13 +39452,13 @@ function Ev({
39429
39452
  text: Dt,
39430
39453
  project: Cn
39431
39454
  }), Er = new Set(tn.map((Ct) => Ct.id));
39432
- K(null), De.dismiss(CS("create")), V(""), Se([]), J((Ct) => [
39455
+ K(null), Le.dismiss(CS("create")), V(""), Se([]), J((Ct) => [
39433
39456
  ...Ct,
39434
39457
  ...tn.map(
39435
39458
  (Bt) => Bt.status === "ready" ? { ...Bt, status: "uploading", progress: 0, error: void 0 } : Bt
39436
39459
  )
39437
39460
  ]), te((Ct) => Ct + 1), localStorage.setItem("lfg_v2_agent", Kt), localStorage.setItem("lfg_v2_repo", Lt), localStorage.setItem(`lfg_model_${Kt}`, Zt), lr(Kt) && localStorage.setItem("lfg_thinking_level", kn), Kt === "claude" && localStorage.setItem("lfg_model", Zt), yt && localStorage.setItem("lfg_user", yt), d === "inline" && ((gt = (xt = Fe.current) == null ? void 0 : xt.querySelector("textarea")) == null || gt.blur()), (async () => {
39438
- const Ct = (wt, mt) => Le("/api/sessions/new", {
39461
+ const Ct = (wt, mt) => De("/api/sessions/new", {
39439
39462
  method: "POST",
39440
39463
  headers: { "Content-Type": "application/json" },
39441
39464
  body: JSON.stringify({
@@ -39450,7 +39473,7 @@ function Ev({
39450
39473
  })
39451
39474
  }), Bt = async (wt) => {
39452
39475
  const mt = wt == null ? void 0 : wt.sessionId;
39453
- mt && (ea(mt), $S(mt)), wt.archivedSessionCount && De.info(
39476
+ mt && (ea(mt), $S(mt)), wt.archivedSessionCount && Le.info(
39454
39477
  `Archived ${wt.archivedSessionCount} idle session${wt.archivedSessionCount === 1 ? "" : "s"} to free memory`,
39455
39478
  { description: "Their transcripts are still available from Resume." }
39456
39479
  ), Gr(Vt == null ? void 0 : Vt.id, "sent"), await l({ launchId: mt, sessionId: mt, session: (wt == null ? void 0 : wt.session) ?? null });
@@ -39469,7 +39492,7 @@ function Ev({
39469
39492
  V(""), await Bt(Br);
39470
39493
  } catch (hr) {
39471
39494
  const _s = hr instanceof Error ? hr.message : String(hr);
39472
- De.error(_s || "Couldn't create session");
39495
+ Le.error(_s || "Couldn't create session");
39473
39496
  }
39474
39497
  })();
39475
39498
  });
@@ -39479,7 +39502,7 @@ function Ev({
39479
39502
  } catch (wt) {
39480
39503
  if (Gr(Vt == null ? void 0 : Vt.id, "draft"), V((zn) => zn || Dt), ve(wt, "start-session")) return;
39481
39504
  const mt = wt instanceof Error ? wt.message : String(wt);
39482
- K(mt), De.error(mt || "Couldn't create session");
39505
+ K(mt), Le.error(mt || "Couldn't create session");
39483
39506
  } finally {
39484
39507
  for (const mt of tn)
39485
39508
  mt.previewUrl && URL.revokeObjectURL(mt.previewUrl);
@@ -40707,9 +40730,9 @@ function l6({
40707
40730
  }
40708
40731
  async function ne() {
40709
40732
  try {
40710
- await Kh(Kx(e, t)), Vi(e.id, "copy", !!u.trim()), De.success("Finding reference copied");
40733
+ await Kh(Kx(e, t)), Vi(e.id, "copy", !!u.trim()), Le.success("Finding reference copied");
40711
40734
  } catch (Z) {
40712
- De.error(Z instanceof Error ? Z.message : "Could not copy finding reference");
40735
+ Le.error(Z instanceof Error ? Z.message : "Could not copy finding reference");
40713
40736
  }
40714
40737
  }
40715
40738
  function he() {
@@ -41075,7 +41098,7 @@ function d6({
41075
41098
  if (u || !(f != null && f.promptTruncated)) return;
41076
41099
  let we = !1;
41077
41100
  const Ie = f.prompt ?? "";
41078
- return Le(`/api/auto/agents/${encodeURIComponent(f.id)}`).then((Ee) => {
41101
+ return De(`/api/auto/agents/${encodeURIComponent(f.id)}`).then((Ee) => {
41079
41102
  var Q;
41080
41103
  if (we) return;
41081
41104
  const Re = (Q = Ee.agent) == null ? void 0 : Q.prompt;
@@ -41106,7 +41129,7 @@ function d6({
41106
41129
  if (!(J || !p.trim())) {
41107
41130
  Y(!0), ae(null);
41108
41131
  try {
41109
- const Ie = await Le("/api/auto/enhance-prompt", {
41132
+ const Ie = await De("/api/auto/enhance-prompt", {
41110
41133
  method: "POST",
41111
41134
  body: JSON.stringify({
41112
41135
  prompt: p.trim(),
@@ -41566,9 +41589,9 @@ function g6({
41566
41589
  if (!(!i || i === e.timeZone || n)) {
41567
41590
  r(!0);
41568
41591
  try {
41569
- await t({ timeZone: i }), De.success("Timezone updated");
41592
+ await t({ timeZone: i }), Le.success("Timezone updated");
41570
41593
  } catch (c) {
41571
- De.error(c instanceof Error ? c.message : "Could not update timezone");
41594
+ Le.error(c instanceof Error ? c.message : "Could not update timezone");
41572
41595
  } finally {
41573
41596
  r(!1);
41574
41597
  }
@@ -41617,7 +41640,7 @@ function sN(e, t = 3e3) {
41617
41640
  let o = !1;
41618
41641
  const s = async () => {
41619
41642
  try {
41620
- const c = await Le("/api/server/stats");
41643
+ const c = await De("/api/server/stats");
41621
41644
  o || r(c.stats ?? null);
41622
41645
  } catch {
41623
41646
  }
@@ -41636,7 +41659,7 @@ function b6(e, t = 15e3) {
41636
41659
  let o = !1;
41637
41660
  const s = async () => {
41638
41661
  try {
41639
- const c = await Le("/api/server/session-usage");
41662
+ const c = await De("/api/server/session-usage");
41640
41663
  o || r(c.usage ?? null);
41641
41664
  } catch {
41642
41665
  }
@@ -41661,11 +41684,11 @@ function x6({
41661
41684
  if (!(g === e.idleAgentArchiveMinutes || i)) {
41662
41685
  c(!0);
41663
41686
  try {
41664
- await t({ idleAgentArchiveMinutes: g }), De.success(
41687
+ await t({ idleAgentArchiveMinutes: g }), Le.success(
41665
41688
  g === 0 ? "Idle agents will stay open" : `Idle agents archived after ${Jd(g)}`
41666
41689
  );
41667
41690
  } catch (y) {
41668
- De.error(y instanceof Error ? y.message : "Could not update idle archiving");
41691
+ Le.error(y instanceof Error ? y.message : "Could not update idle archiving");
41669
41692
  } finally {
41670
41693
  c(!1);
41671
41694
  }
@@ -41675,11 +41698,11 @@ function x6({
41675
41698
  if (!(g === e.maxLiveAgents || n)) {
41676
41699
  r(!0);
41677
41700
  try {
41678
- await t({ maxLiveAgents: g }), De.success(
41701
+ await t({ maxLiveAgents: g }), Le.success(
41679
41702
  g === 0 ? "Agent limit removed (unlimited)" : `Agent limit set to ${g}`
41680
41703
  );
41681
41704
  } catch (y) {
41682
- De.error(y instanceof Error ? y.message : "Could not update agent limit");
41705
+ Le.error(y instanceof Error ? y.message : "Could not update agent limit");
41683
41706
  } finally {
41684
41707
  r(!1);
41685
41708
  }
@@ -41689,9 +41712,9 @@ function x6({
41689
41712
  if (!o) {
41690
41713
  s(!0);
41691
41714
  try {
41692
- await t({ agentsPaused: g }), De.success(g ? "New agents paused" : "New agents resumed");
41715
+ await t({ agentsPaused: g }), Le.success(g ? "New agents paused" : "New agents resumed");
41693
41716
  } catch (y) {
41694
- De.error(y instanceof Error ? y.message : "Could not update pause state");
41717
+ Le.error(y instanceof Error ? y.message : "Could not update pause state");
41695
41718
  } finally {
41696
41719
  s(!1);
41697
41720
  }
@@ -42264,10 +42287,10 @@ function cN({
42264
42287
  let m = !1;
42265
42288
  const p = async () => {
42266
42289
  try {
42267
- const b = await Le(`/api/coding-agents/auth/${e.id}`);
42290
+ const b = await De(`/api/coding-agents/auth/${e.id}`);
42268
42291
  if (m) return;
42269
42292
  if (b.status === "complete") {
42270
- De.success(`${Al(b.provider)} connected`), await n();
42293
+ Le.success(`${Al(b.provider)} connected`), await n();
42271
42294
  return;
42272
42295
  }
42273
42296
  t(b);
@@ -42286,14 +42309,14 @@ function cN({
42286
42309
  if (m.preventDefault(), !(!s.trim() || c)) {
42287
42310
  l(!0);
42288
42311
  try {
42289
- const p = await Le(`/api/coding-agents/auth/${e.id}/code`, {
42312
+ const p = await De(`/api/coding-agents/auth/${e.id}/code`, {
42290
42313
  method: "POST",
42291
42314
  headers: { "Content-Type": "application/json" },
42292
42315
  body: JSON.stringify({ code: s.trim() })
42293
42316
  });
42294
42317
  t(p);
42295
42318
  } catch (p) {
42296
- De.error(p instanceof Error ? p.message : "Couldn't submit the code");
42319
+ Le.error(p instanceof Error ? p.message : "Couldn't submit the code");
42297
42320
  } finally {
42298
42321
  l(!1);
42299
42322
  }
@@ -42311,7 +42334,7 @@ function cN({
42311
42334
  {
42312
42335
  type: "button",
42313
42336
  onClick: () => {
42314
- navigator.clipboard.writeText(e.userCode), De.success("Code copied");
42337
+ navigator.clipboard.writeText(e.userCode), Le.success("Code copied");
42315
42338
  },
42316
42339
  className: "inline-flex items-center gap-2 font-mono text-2xl font-semibold tracking-[0.15em]",
42317
42340
  children: [
@@ -42366,7 +42389,7 @@ function Pv({
42366
42389
  }) {
42367
42390
  const r = Al(e == null ? void 0 : e.provider);
42368
42391
  async function o() {
42369
- e && e.status !== "complete" && await Le(`/api/coding-agents/auth/${e.id}`, { method: "DELETE" }).catch(() => {
42392
+ e && e.status !== "complete" && await De(`/api/coding-agents/auth/${e.id}`, { method: "DELETE" }).catch(() => {
42370
42393
  }), t(null);
42371
42394
  }
42372
42395
  return /* @__PURE__ */ a(Es, { open: !!e, onOpenChange: (s) => {
@@ -42478,7 +42501,7 @@ function _6() {
42478
42501
  const [e, t] = H(null), [n, r] = H(!0), [o, s] = H(!1), [i, c] = H(!1), [l, u] = H(null), f = ke(async (R = !1) => {
42479
42502
  r(!0), u(null);
42480
42503
  try {
42481
- const P = await Le(R ? "/api/install?refresh=1" : "/api/install", { cache: "no-store" });
42504
+ const P = await De(R ? "/api/install?refresh=1" : "/api/install", { cache: "no-store" });
42482
42505
  if (!Jg(P)) throw new Error("Could not check for updates");
42483
42506
  t(P);
42484
42507
  } catch (E) {
@@ -42495,7 +42518,7 @@ function _6() {
42495
42518
  const E = Date.now() + 6e4;
42496
42519
  for (; Date.now() < E; ) {
42497
42520
  try {
42498
- if ((await Le("/api/install?ready=1", { cache: "no-store" })).bootId !== R) {
42521
+ if ((await De("/api/install?ready=1", { cache: "no-store" })).bootId !== R) {
42499
42522
  window.location.reload();
42500
42523
  return;
42501
42524
  }
@@ -42509,12 +42532,12 @@ function _6() {
42509
42532
  if (!(o || i)) {
42510
42533
  s(!0), u(null);
42511
42534
  try {
42512
- const R = await Le("/api/install", { method: "POST" });
42535
+ const R = await De("/api/install", { method: "POST" });
42513
42536
  if (!Jg(R)) throw new Error("Could not update LFG");
42514
- t(R), R.restarting ? (c(!0), De.success("omg.dev updated. Restarting…"), d(R.bootId)) : De.success("omg.dev is already up to date");
42537
+ t(R), R.restarting ? (c(!0), Le.success("omg.dev updated. Restarting…"), d(R.bootId)) : Le.success("omg.dev is already up to date");
42515
42538
  } catch (R) {
42516
42539
  const E = R instanceof Error ? R.message : "Could not update omg.dev";
42517
- u(E), De.error(E);
42540
+ u(E), Le.error(E);
42518
42541
  } finally {
42519
42542
  s(!1);
42520
42543
  }
@@ -43156,7 +43179,7 @@ export {
43156
43179
  Mx as Y,
43157
43180
  zp as Z,
43158
43181
  z_ as _,
43159
- Le as a,
43182
+ De as a,
43160
43183
  Kk as a0,
43161
43184
  Gx as a1,
43162
43185
  Pb as a2,
@@ -43185,7 +43208,7 @@ export {
43185
43208
  Ix as i,
43186
43209
  ri as j,
43187
43210
  Jl as k,
43188
- De as l,
43211
+ Le as l,
43189
43212
  fn as m,
43190
43213
  I_ as n,
43191
43214
  xu as o,