@omg-dev/app 0.1.379 → 0.1.380

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.
@@ -7,12 +7,12 @@ var Ct = (e, t, r) => Am(e, typeof t != "symbol" ? t + "" : t, r), $m = (e, t, r
7
7
  var fr = (e, t, r) => ($m(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Dl = (e, t, r) => t.has(e) ? Rl("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
8
8
  import { jsx as n, jsxs as d, Fragment as Be } from "react/jsx-runtime";
9
9
  import * as rt from "react";
10
- import _e, { createContext as hn, useContext as Ht, forwardRef as Jo, createElement as Gi, useSyncExternalStore as Zo, useState as v, useEffect as U, useMemo as Le, useRef as R, useCallback as ne, lazy as Qo, cloneElement as zm, memo as ls, Suspense as fn, useReducer as Pm, useImperativeHandle as Om, useLayoutEffect as Zt, useId as fd, Component as Lm } from "react";
10
+ import Ee, { createContext as hn, useContext as Ht, forwardRef as Jo, createElement as Gi, useSyncExternalStore as Zo, useState as v, useEffect as U, useMemo as Le, useRef as R, useCallback as ne, lazy as Qo, cloneElement as zm, memo as ls, Suspense as fn, useReducer as Pm, useImperativeHandle as Om, useLayoutEffect as Zt, useId as fd, Component as Lm } from "react";
11
11
  import { useSearch as Rm, useNavigate as Dm, useRouterState as jm, createRootRoute as Um, createRoute as md, redirect as pd, createRouter as Bm, createMemoryHistory as hd, RouterProvider as gd } from "@tanstack/react-router";
12
12
  import Fm, { createPortal as Er } from "react-dom";
13
13
  import { Button as qm } from "@base-ui/react/button";
14
14
  import { cva as bd } from "class-variance-authority";
15
- import { cn as z } from "cnfast";
15
+ import { cn as P } from "cnfast";
16
16
  import { Input as Hm } from "@base-ui/react/input";
17
17
  import { Dialog as ar } from "@base-ui/react/dialog";
18
18
  import { Switch as jl } from "@base-ui/react/switch";
@@ -2275,7 +2275,7 @@ function Ie({
2275
2275
  qm,
2276
2276
  {
2277
2277
  "data-slot": "button",
2278
- className: z(S0({ variant: t, size: r, className: e })),
2278
+ className: P(S0({ variant: t, size: r, className: e })),
2279
2279
  onClick: (a) => {
2280
2280
  !o && !i.disabled && t !== "link" && Nn.tap(), s == null || s(a);
2281
2281
  },
@@ -2428,7 +2428,7 @@ component stack:${t}` : null
2428
2428
  return c ? /* @__PURE__ */ n(
2429
2429
  "div",
2430
2430
  {
2431
- className: z(
2431
+ className: P(
2432
2432
  "flex flex-col items-center justify-center bg-background p-6 text-foreground",
2433
2433
  s === "screen" ? "h-full min-h-dvh" : "rounded-xl border border-border/60 py-12",
2434
2434
  i
@@ -2456,7 +2456,7 @@ component stack:${t}` : null
2456
2456
  ) : /* @__PURE__ */ n(
2457
2457
  "div",
2458
2458
  {
2459
- className: z(
2459
+ className: P(
2460
2460
  "flex flex-col items-center justify-center gap-4 bg-background p-6 text-foreground",
2461
2461
  s === "screen" ? "h-full min-h-dvh" : "rounded-xl border border-border/60",
2462
2462
  i
@@ -2552,7 +2552,7 @@ function U0({
2552
2552
  "span",
2553
2553
  {
2554
2554
  "aria-hidden": !0,
2555
- className: z(
2555
+ className: P(
2556
2556
  "pointer-events-none absolute -bottom-0.5 -right-0.5 flex items-center justify-center rounded-full bg-foreground font-bold leading-none text-background ring-1 ring-background",
2557
2557
  t === "sm" ? "size-3 text-[7px]" : "size-3.5 text-[8px]",
2558
2558
  r
@@ -2576,7 +2576,7 @@ function $a({
2576
2576
  className: t
2577
2577
  }
2578
2578
  );
2579
- return o == null && !s ? a : /* @__PURE__ */ d("span", { className: z("relative inline-flex shrink-0", s), children: [
2579
+ return o == null && !s ? a : /* @__PURE__ */ d("span", { className: P("relative inline-flex shrink-0", s), children: [
2580
2580
  a,
2581
2581
  /* @__PURE__ */ n(U0, { number: o, size: r })
2582
2582
  ] });
@@ -2960,7 +2960,7 @@ function Z0({
2960
2960
  onPointerUp: y,
2961
2961
  onPointerCancel: y,
2962
2962
  onDoubleClick: w,
2963
- className: z(
2963
+ className: P(
2964
2964
  "max-h-[92vh] max-w-[92vw] touch-none select-none object-contain",
2965
2965
  T ? "cursor-grab active:cursor-grabbing" : "cursor-zoom-out"
2966
2966
  ),
@@ -2993,7 +2993,7 @@ function wo({
2993
2993
  title: e,
2994
2994
  onClick: t,
2995
2995
  disabled: r,
2996
- className: z(
2996
+ className: P(
2997
2997
  "flex size-9 items-center justify-center rounded-full bg-white/10 text-white backdrop-blur-sm transition-colors",
2998
2998
  "hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50",
2999
2999
  "disabled:pointer-events-none disabled:opacity-40"
@@ -3030,7 +3030,7 @@ function Pa({ className: e }) {
3030
3030
  "div",
3031
3031
  {
3032
3032
  role: "status",
3033
- className: z(
3033
+ className: P(
3034
3034
  "flex min-h-28 min-w-40 items-center justify-center bg-muted/35 px-4 text-center text-xs text-muted-foreground",
3035
3035
  e
3036
3036
  ),
@@ -3052,7 +3052,7 @@ function Oa({
3052
3052
  aspectRatio: `${t} / ${r}`,
3053
3053
  width: `min(${t}px, calc(24rem * ${t / r}))`
3054
3054
  } : void 0,
3055
- className: z(
3055
+ className: P(
3056
3056
  "animate-pulse bg-muted/35",
3057
3057
  !s && "min-h-28 min-w-40",
3058
3058
  e
@@ -3080,7 +3080,7 @@ function Q0({
3080
3080
  loading: "lazy",
3081
3081
  decoding: "async",
3082
3082
  onClick: () => l(!0),
3083
- className: z("cursor-zoom-in", i)
3083
+ className: P("cursor-zoom-in", i)
3084
3084
  }
3085
3085
  ),
3086
3086
  /* @__PURE__ */ n(
@@ -3161,7 +3161,7 @@ function ou({
3161
3161
  type: "button",
3162
3162
  onClick: () => a(!0),
3163
3163
  "aria-label": t ? `Play ${t}` : "Play video",
3164
- className: z(
3164
+ className: P(
3165
3165
  "group relative flex items-center justify-center bg-black/90",
3166
3166
  o
3167
3167
  ),
@@ -3394,7 +3394,7 @@ function gb({
3394
3394
  "div",
3395
3395
  {
3396
3396
  role: "status",
3397
- className: z(
3397
+ className: P(
3398
3398
  "flex min-h-28 items-center justify-center bg-muted/35 px-4 text-center text-xs text-muted-foreground",
3399
3399
  t
3400
3400
  ),
@@ -3415,14 +3415,14 @@ function Ra({
3415
3415
  return m.current = a, U(() => {
3416
3416
  var f;
3417
3417
  l.status === "ready" && ((f = m.current) == null || f.call(m, u));
3418
- }, [l.status, u]), l.status === "error" ? /* @__PURE__ */ n(gb, { className: s, children: "Artifact couldn’t load." }) : l.status === "loading" ? /* @__PURE__ */ n("div", { "aria-hidden": !0, className: z("min-h-28 animate-pulse bg-muted/35", s) }) : u && r ? /* @__PURE__ */ n(
3418
+ }, [l.status, u]), l.status === "error" ? /* @__PURE__ */ n(gb, { className: s, children: "Artifact couldn’t load." }) : l.status === "loading" ? /* @__PURE__ */ n("div", { "aria-hidden": !0, className: P("min-h-28 animate-pulse bg-muted/35", s) }) : u && r ? /* @__PURE__ */ n(
3419
3419
  "iframe",
3420
3420
  {
3421
3421
  srcDoc: Y0(l.value.source, c),
3422
3422
  sandbox: "allow-scripts",
3423
3423
  title: i,
3424
3424
  style: o,
3425
- className: z("border-0 bg-card", s)
3425
+ className: P("border-0 bg-card", s)
3426
3426
  }
3427
3427
  ) : /* @__PURE__ */ n(
3428
3428
  hb,
@@ -3455,7 +3455,7 @@ function r2({
3455
3455
  { rootMargin: "300px" }
3456
3456
  );
3457
3457
  return u.observe(c), () => u.disconnect();
3458
- }, [s]), /* @__PURE__ */ d("div", { ref: l, className: z("relative overflow-hidden bg-card", r), children: [
3458
+ }, [s]), /* @__PURE__ */ d("div", { ref: l, className: P("relative overflow-hidden bg-card", r), children: [
3459
3459
  s ? /* @__PURE__ */ n(
3460
3460
  Ra,
3461
3461
  {
@@ -3502,7 +3502,7 @@ function bb({
3502
3502
  () => u ? { height: r } : i ? void 0 : { maxHeight: r },
3503
3503
  [u, i, r]
3504
3504
  );
3505
- return /* @__PURE__ */ d("div", { className: z("relative w-full", o), children: [
3505
+ return /* @__PURE__ */ d("div", { className: P("relative w-full", o), children: [
3506
3506
  /* @__PURE__ */ d(
3507
3507
  "div",
3508
3508
  {
@@ -3517,7 +3517,7 @@ function bb({
3517
3517
  cacheKey: t,
3518
3518
  title: s,
3519
3519
  onNeedsFrame: m,
3520
- className: z("block w-full", u && "h-full")
3520
+ className: P("block w-full", u && "h-full")
3521
3521
  }
3522
3522
  ),
3523
3523
  !u && !i && l ? /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white to-transparent" }) : null
@@ -3954,7 +3954,7 @@ function Fb(e, t, r = {}) {
3954
3954
  }
3955
3955
  return A;
3956
3956
  }, [e]), [u, m] = v({}), [f, p] = v({}), [h, b] = v({}), [x, y] = v({}), [w, T] = v({}), C = R(null), k = R(!1), N = R(/* @__PURE__ */ new Set()), O = R(/* @__PURE__ */ new Set()), F = R(/* @__PURE__ */ new Map()), q = R(/* @__PURE__ */ new Set()), ce = R(/* @__PURE__ */ new Set()), H = R({}), L = R({}), Z = R({}), Q = R({}), K = R({}), oe = R(u), ie = R(w), pe = R({}), j = R(/* @__PURE__ */ new Set()), $ = R(/* @__PURE__ */ new Set()), _ = R(0), M = R(0), S = R(!1), E = R(No), X = R(null), J = R(!1), xe = R(0), he = R(null), Y = R(null), fe = R(() => {
3957
- }), [me, Me] = v(Bb), Oe = ne((A, W) => {
3957
+ }), [me, Te] = v(Bb), Oe = ne((A, W) => {
3958
3958
  const ye = Z.current[A];
3959
3959
  if (ye != null && ye.size)
3960
3960
  for (const ze of ye) ze(W);
@@ -3967,10 +3967,10 @@ function Fb(e, t, r = {}) {
3967
3967
  const se = ne((A) => {
3968
3968
  const W = C.current;
3969
3969
  return !W || W.readyState !== WebSocket.OPEN ? !1 : (W.send(JSON.stringify(A)), !0);
3970
- }, []), Te = ne((A) => {
3970
+ }, []), _e = ne((A) => {
3971
3971
  const W = H.current[vn(A)];
3972
3972
  return W ? { ...A, resumeFromSeq: W } : A;
3973
- }, []), Ne = ne((A) => A.length ? se({ t: "subscribe", channels: A.map(Te) }) : !1, [Te, se]), je = ne((A) => {
3973
+ }, []), Se = ne((A) => A.length ? se({ t: "subscribe", channels: A.map(_e) }) : !1, [_e, se]), je = ne((A) => {
3974
3974
  if (!A.length) return !1;
3975
3975
  for (const W of A) delete H.current[vn(W)];
3976
3976
  return se({ t: "unsubscribe", channels: A });
@@ -3996,7 +3996,7 @@ function Fb(e, t, r = {}) {
3996
3996
  if (!A.id || !ve || A.id !== ve.id) return;
3997
3997
  he.current = null;
3998
3998
  const Fe = Math.max(1, Math.round(performance.now() - ve.startedAt));
3999
- Me((De) => ({ ...De, latencyMs: Fe }));
3999
+ Te((De) => ({ ...De, latencyMs: Fe }));
4000
4000
  return;
4001
4001
  }
4002
4002
  if ("kind" in A && A.kind && "key" in A && typeof A.key == "string") {
@@ -4130,11 +4130,11 @@ function Fb(e, t, r = {}) {
4130
4130
  he.current = { id: Ye, startedAt: performance.now() }, qe.send(JSON.stringify({ t: "ping", id: Ye }));
4131
4131
  }, W = window.setInterval(A, 5e3), ye = () => {
4132
4132
  const qe = Date.now();
4133
- qe - xe.current < 2e3 || (xe.current = qe, Me((Ye) => ({ ...Ye, lastMessageAt: qe })));
4133
+ qe - xe.current < 2e3 || (xe.current = qe, Te((Ye) => ({ ...Ye, lastMessageAt: qe })));
4134
4134
  }, ze = () => {
4135
4135
  if (S.current || k.current) return;
4136
4136
  const qe = C.current;
4137
- qe && (qe.readyState === WebSocket.OPEN || qe.readyState === WebSocket.CONNECTING) || (X.current != null && (clearTimeout(X.current), X.current = null), J.current = !1, Me((Ye) => ({
4137
+ qe && (qe.readyState === WebSocket.OPEN || qe.readyState === WebSocket.CONNECTING) || (X.current != null && (clearTimeout(X.current), X.current = null), J.current = !1, Te((Ye) => ({
4138
4138
  ...Ye,
4139
4139
  status: Ye.status === "offline" ? "offline" : Ye.attempt > 0 ? "reconnecting" : "connecting"
4140
4140
  })), k.current = !0, vp().then((Ye) => {
@@ -4150,9 +4150,9 @@ function Fb(e, t, r = {}) {
4150
4150
  return;
4151
4151
  }
4152
4152
  C.current = ee, _.current = performance.now(), j.current = /* @__PURE__ */ new Set(), $.current = /* @__PURE__ */ new Set(), ee.onopen = () => {
4153
- E.current = No, Br("ws_client_open", { reconnects: M.current }), M.current = 0, Me((De) => ({ ...De, status: "live", attempt: 0 })), A();
4153
+ E.current = No, Br("ws_client_open", { reconnects: M.current }), M.current = 0, Te((De) => ({ ...De, status: "live", attempt: 0 })), A();
4154
4154
  const Fe = [...F.current.values()];
4155
- Fe.length && (ee.send(JSON.stringify({ t: "subscribe", channels: Fe.map(Te) })), q.current = new Set(Fe.map(vn)), O.current = new Set(Fe.filter((De) => De.kind === "transcript").map((De) => De.key)));
4155
+ Fe.length && (ee.send(JSON.stringify({ t: "subscribe", channels: Fe.map(_e) })), q.current = new Set(Fe.map(vn)), O.current = new Set(Fe.filter((De) => De.kind === "transcript").map((De) => De.key)));
4156
4156
  }, ee.onmessage = (Fe) => {
4157
4157
  if (typeof Fe.data != "string") return;
4158
4158
  const De = Lb(Fe.data);
@@ -4163,7 +4163,7 @@ function Fb(e, t, r = {}) {
4163
4163
  const st = M.current += 1, kt = Fe.code, _t = Fe.reason || null;
4164
4164
  Br("ws_client_reconnect", { attempt: st, backoffMs: E.current, code: kt, reason: _t });
4165
4165
  const le = typeof navigator < "u" && navigator.onLine === !1;
4166
- if (Me((gt) => ({
4166
+ if (Te((gt) => ({
4167
4167
  ...gt,
4168
4168
  status: le || st >= ac ? "offline" : "reconnecting",
4169
4169
  attempt: st,
@@ -4189,7 +4189,7 @@ function Fb(e, t, r = {}) {
4189
4189
  attempt: ee,
4190
4190
  backoffMs: E.current,
4191
4191
  reason: ve
4192
- }), Me((De) => ({
4192
+ }), Te((De) => ({
4193
4193
  ...De,
4194
4194
  status: ee >= ac ? "offline" : "reconnecting",
4195
4195
  attempt: ee,
@@ -4288,10 +4288,10 @@ function Fb(e, t, r = {}) {
4288
4288
  if (Ye.length && je(Ye))
4289
4289
  for (const ee of Ye)
4290
4290
  $e.delete(vn(ee)), O.current.delete(ee.key);
4291
- if (qe.length && Ne(qe))
4291
+ if (qe.length && Se(qe))
4292
4292
  for (const ee of qe)
4293
4293
  $e.add(vn(ee)), O.current.add(ee.key);
4294
- }, [a, l, c, s, Ne, je]), U(() => {
4294
+ }, [a, l, c, s, Se, je]), U(() => {
4295
4295
  if (!i.length) return;
4296
4296
  const A = new Set(i), W = window.setTimeout(() => {
4297
4297
  Br("ws_client_loading_fallback", { ids: i }), y((ye) => {
@@ -4386,19 +4386,19 @@ function Fb(e, t, r = {}) {
4386
4386
  }), (ye.nextBefore ?? null) !== null;
4387
4387
  }, []), We = ne((A, W) => {
4388
4388
  const ye = { kind: "agent_run", key: A }, ze = vn(ye);
4389
- return L.current[A] = W, F.current.set(ze, ye), s && Ne([ye]) && q.current.add(ze), () => {
4389
+ return L.current[A] = W, F.current.set(ze, ye), s && Se([ye]) && q.current.add(ze), () => {
4390
4390
  delete L.current[A], F.current.delete(ze), s && je([ye]) && q.current.delete(ze);
4391
4391
  };
4392
- }, [s, Ne, je]), I = ne((A, W) => {
4392
+ }, [s, Se, je]), I = ne((A, W) => {
4393
4393
  (Z.current[A] || (Z.current[A] = /* @__PURE__ */ new Set())).add(W);
4394
4394
  const ze = Q.current[A];
4395
4395
  ze && W({ type: "queue", queue: ze });
4396
4396
  const Re = ko(A), $e = vn(Re);
4397
- return N.current.add(A), F.current.set($e, Re), s && !q.current.has($e) && Ne([Re]) && (q.current.add($e), O.current.add(A)), () => {
4397
+ return N.current.add(A), F.current.set($e, Re), s && !q.current.has($e) && Se([Re]) && (q.current.add($e), O.current.add(A)), () => {
4398
4398
  const Ue = Z.current[A];
4399
4399
  Ue && (Ue.delete(W), !Ue.size && (delete Z.current[A], !ce.current.has(A) && (N.current.delete(A), F.current.delete($e), s && q.current.has($e) && je([Re]) && (q.current.delete($e), O.current.delete(A)))));
4400
4400
  };
4401
- }, [s, Ne, je]), ue = Le(() => ({ ...l, ...f }), [l, f]);
4401
+ }, [s, Se, je]), ue = Le(() => ({ ...l, ...f }), [l, f]);
4402
4402
  return {
4403
4403
  messagesBySid: u,
4404
4404
  busyBySid: ue,
@@ -5144,58 +5144,58 @@ const Tx = (e) => {
5144
5144
  default:
5145
5145
  return null;
5146
5146
  }
5147
- }, _x = Array(12).fill(0), Ex = ({ visible: e, className: t }) => /* @__PURE__ */ _e.createElement("div", {
5147
+ }, _x = Array(12).fill(0), Ex = ({ visible: e, className: t }) => /* @__PURE__ */ Ee.createElement("div", {
5148
5148
  className: [
5149
5149
  "sonner-loading-wrapper",
5150
5150
  t
5151
5151
  ].filter(Boolean).join(" "),
5152
5152
  "data-visible": e
5153
- }, /* @__PURE__ */ _e.createElement("div", {
5153
+ }, /* @__PURE__ */ Ee.createElement("div", {
5154
5154
  className: "sonner-spinner"
5155
- }, _x.map((r, s) => /* @__PURE__ */ _e.createElement("div", {
5155
+ }, _x.map((r, s) => /* @__PURE__ */ Ee.createElement("div", {
5156
5156
  className: "sonner-loading-bar",
5157
5157
  key: `spinner-bar-${s}`
5158
- })))), Ix = /* @__PURE__ */ _e.createElement("svg", {
5158
+ })))), Ix = /* @__PURE__ */ Ee.createElement("svg", {
5159
5159
  xmlns: "http://www.w3.org/2000/svg",
5160
5160
  viewBox: "0 0 20 20",
5161
5161
  fill: "currentColor",
5162
5162
  height: "20",
5163
5163
  width: "20"
5164
- }, /* @__PURE__ */ _e.createElement("path", {
5164
+ }, /* @__PURE__ */ Ee.createElement("path", {
5165
5165
  fillRule: "evenodd",
5166
5166
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
5167
5167
  clipRule: "evenodd"
5168
- })), Ax = /* @__PURE__ */ _e.createElement("svg", {
5168
+ })), Ax = /* @__PURE__ */ Ee.createElement("svg", {
5169
5169
  xmlns: "http://www.w3.org/2000/svg",
5170
5170
  viewBox: "0 0 24 24",
5171
5171
  fill: "currentColor",
5172
5172
  height: "20",
5173
5173
  width: "20"
5174
- }, /* @__PURE__ */ _e.createElement("path", {
5174
+ }, /* @__PURE__ */ Ee.createElement("path", {
5175
5175
  fillRule: "evenodd",
5176
5176
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
5177
5177
  clipRule: "evenodd"
5178
- })), $x = /* @__PURE__ */ _e.createElement("svg", {
5178
+ })), $x = /* @__PURE__ */ Ee.createElement("svg", {
5179
5179
  xmlns: "http://www.w3.org/2000/svg",
5180
5180
  viewBox: "0 0 20 20",
5181
5181
  fill: "currentColor",
5182
5182
  height: "20",
5183
5183
  width: "20"
5184
- }, /* @__PURE__ */ _e.createElement("path", {
5184
+ }, /* @__PURE__ */ Ee.createElement("path", {
5185
5185
  fillRule: "evenodd",
5186
5186
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
5187
5187
  clipRule: "evenodd"
5188
- })), zx = /* @__PURE__ */ _e.createElement("svg", {
5188
+ })), zx = /* @__PURE__ */ Ee.createElement("svg", {
5189
5189
  xmlns: "http://www.w3.org/2000/svg",
5190
5190
  viewBox: "0 0 20 20",
5191
5191
  fill: "currentColor",
5192
5192
  height: "20",
5193
5193
  width: "20"
5194
- }, /* @__PURE__ */ _e.createElement("path", {
5194
+ }, /* @__PURE__ */ Ee.createElement("path", {
5195
5195
  fillRule: "evenodd",
5196
5196
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
5197
5197
  clipRule: "evenodd"
5198
- })), Px = /* @__PURE__ */ _e.createElement("svg", {
5198
+ })), Px = /* @__PURE__ */ Ee.createElement("svg", {
5199
5199
  xmlns: "http://www.w3.org/2000/svg",
5200
5200
  width: "12",
5201
5201
  height: "12",
@@ -5205,19 +5205,19 @@ const Tx = (e) => {
5205
5205
  strokeWidth: "1.5",
5206
5206
  strokeLinecap: "round",
5207
5207
  strokeLinejoin: "round"
5208
- }, /* @__PURE__ */ _e.createElement("line", {
5208
+ }, /* @__PURE__ */ Ee.createElement("line", {
5209
5209
  x1: "18",
5210
5210
  y1: "6",
5211
5211
  x2: "6",
5212
5212
  y2: "18"
5213
- }), /* @__PURE__ */ _e.createElement("line", {
5213
+ }), /* @__PURE__ */ Ee.createElement("line", {
5214
5214
  x1: "6",
5215
5215
  y1: "6",
5216
5216
  x2: "18",
5217
5217
  y2: "18"
5218
5218
  })), Ox = () => {
5219
- const [e, t] = _e.useState(document.hidden);
5220
- return _e.useEffect(() => {
5219
+ const [e, t] = Ee.useState(document.hidden);
5220
+ return Ee.useEffect(() => {
5221
5221
  const r = () => {
5222
5222
  t(document.hidden);
5223
5223
  };
@@ -5305,7 +5305,7 @@ class Lx {
5305
5305
  if (a = [
5306
5306
  "resolve",
5307
5307
  u
5308
- ], _e.isValidElement(u))
5308
+ ], Ee.isValidElement(u))
5309
5309
  i = !1, this.create({
5310
5310
  id: s,
5311
5311
  type: "default",
@@ -5313,7 +5313,7 @@ class Lx {
5313
5313
  });
5314
5314
  else if (Dx(u) && !u.ok) {
5315
5315
  i = !1;
5316
- const f = typeof r.error == "function" ? await r.error(`HTTP error! status: ${u.status}`) : r.error, p = typeof r.description == "function" ? await r.description(`HTTP error! status: ${u.status}`) : r.description, b = typeof f == "object" && !_e.isValidElement(f) ? f : {
5316
+ const f = typeof r.error == "function" ? await r.error(`HTTP error! status: ${u.status}`) : r.error, p = typeof r.description == "function" ? await r.description(`HTTP error! status: ${u.status}`) : r.description, b = typeof f == "object" && !Ee.isValidElement(f) ? f : {
5317
5317
  message: f
5318
5318
  };
5319
5319
  this.create({
@@ -5324,7 +5324,7 @@ class Lx {
5324
5324
  });
5325
5325
  } else if (u instanceof Error) {
5326
5326
  i = !1;
5327
- const f = typeof r.error == "function" ? await r.error(u) : r.error, p = typeof r.description == "function" ? await r.description(u) : r.description, b = typeof f == "object" && !_e.isValidElement(f) ? f : {
5327
+ const f = typeof r.error == "function" ? await r.error(u) : r.error, p = typeof r.description == "function" ? await r.description(u) : r.description, b = typeof f == "object" && !Ee.isValidElement(f) ? f : {
5328
5328
  message: f
5329
5329
  };
5330
5330
  this.create({
@@ -5335,7 +5335,7 @@ class Lx {
5335
5335
  });
5336
5336
  } else if (r.success !== void 0) {
5337
5337
  i = !1;
5338
- const f = typeof r.success == "function" ? await r.success(u) : r.success, p = typeof r.description == "function" ? await r.description(u) : r.description, b = typeof f == "object" && !_e.isValidElement(f) ? f : {
5338
+ const f = typeof r.success == "function" ? await r.success(u) : r.success, p = typeof r.description == "function" ? await r.description(u) : r.description, b = typeof f == "object" && !Ee.isValidElement(f) ? f : {
5339
5339
  message: f
5340
5340
  };
5341
5341
  this.create({
@@ -5351,7 +5351,7 @@ class Lx {
5351
5351
  u
5352
5352
  ], r.error !== void 0) {
5353
5353
  i = !1;
5354
- const m = typeof r.error == "function" ? await r.error(u) : r.error, f = typeof r.description == "function" ? await r.description(u) : r.description, h = typeof m == "object" && !_e.isValidElement(m) ? m : {
5354
+ const m = typeof r.error == "function" ? await r.error(u) : r.error, f = typeof r.description == "function" ? await r.description(u) : r.description, h = typeof m == "object" && !Ee.isValidElement(m) ? m : {
5355
5355
  message: m
5356
5356
  };
5357
5357
  this.create({
@@ -5414,32 +5414,32 @@ function Xx(e) {
5414
5414
  }
5415
5415
  const Yx = (e) => {
5416
5416
  var t, r, s, o, i, a, l, c, u;
5417
- const { invert: m, toast: f, unstyled: p, interacting: h, setHeights: b, visibleToasts: x, heights: y, index: w, toasts: T, expanded: C, removeToast: k, defaultRichColors: N, closeButton: O, style: F, cancelButtonStyle: q, actionButtonStyle: ce, className: H = "", descriptionClassName: L = "", duration: Z, position: Q, gap: K, expandByDefault: oe, classNames: ie, icons: pe, closeButtonAriaLabel: j = "Close toast" } = e, [$, _] = _e.useState(null), [M, S] = _e.useState(null), [E, X] = _e.useState(!1), [J, xe] = _e.useState(!1), [he, Y] = _e.useState(!1), [fe, me] = _e.useState(!1), [Me, Oe] = _e.useState(!1), [se, Te] = _e.useState(0), [Ne, je] = _e.useState(0), Ke = _e.useRef(f.duration || Z || uc), Ze = _e.useRef(null), ae = _e.useRef(null), re = w === 0, V = w + 1 <= x, be = f.type, He = f.dismissible !== !1, de = f.className || "", We = f.descriptionClassName || "", I = _e.useMemo(() => y.findIndex((le) => le.toastId === f.id) || 0, [
5417
+ const { invert: m, toast: f, unstyled: p, interacting: h, setHeights: b, visibleToasts: x, heights: y, index: w, toasts: T, expanded: C, removeToast: k, defaultRichColors: N, closeButton: O, style: F, cancelButtonStyle: q, actionButtonStyle: ce, className: H = "", descriptionClassName: L = "", duration: Z, position: Q, gap: K, expandByDefault: oe, classNames: ie, icons: pe, closeButtonAriaLabel: j = "Close toast" } = e, [$, _] = Ee.useState(null), [M, S] = Ee.useState(null), [E, X] = Ee.useState(!1), [J, xe] = Ee.useState(!1), [he, Y] = Ee.useState(!1), [fe, me] = Ee.useState(!1), [Te, Oe] = Ee.useState(!1), [se, _e] = Ee.useState(0), [Se, je] = Ee.useState(0), Ke = Ee.useRef(f.duration || Z || uc), Ze = Ee.useRef(null), ae = Ee.useRef(null), re = w === 0, V = w + 1 <= x, be = f.type, He = f.dismissible !== !1, de = f.className || "", We = f.descriptionClassName || "", I = Ee.useMemo(() => y.findIndex((le) => le.toastId === f.id) || 0, [
5418
5418
  y,
5419
5419
  f.id
5420
- ]), ue = _e.useMemo(() => {
5420
+ ]), ue = Ee.useMemo(() => {
5421
5421
  var le;
5422
5422
  return (le = f.closeButton) != null ? le : O;
5423
5423
  }, [
5424
5424
  f.closeButton,
5425
5425
  O
5426
- ]), A = _e.useMemo(() => f.duration || Z || uc, [
5426
+ ]), A = Ee.useMemo(() => f.duration || Z || uc, [
5427
5427
  f.duration,
5428
5428
  Z
5429
- ]), W = _e.useRef(0), ye = _e.useRef(0), ze = _e.useRef(0), Re = _e.useRef(null), [$e, Ue] = Q.split("-"), qe = _e.useMemo(() => y.reduce((le, yt, gt) => gt >= I ? le : le + yt.height, 0), [
5429
+ ]), W = Ee.useRef(0), ye = Ee.useRef(0), ze = Ee.useRef(0), Re = Ee.useRef(null), [$e, Ue] = Q.split("-"), qe = Ee.useMemo(() => y.reduce((le, yt, gt) => gt >= I ? le : le + yt.height, 0), [
5430
5430
  y,
5431
5431
  I
5432
5432
  ]), Ye = Ox(), ee = f.invert || m, ve = be === "loading";
5433
- ye.current = _e.useMemo(() => I * K + qe, [
5433
+ ye.current = Ee.useMemo(() => I * K + qe, [
5434
5434
  I,
5435
5435
  qe
5436
- ]), _e.useEffect(() => {
5436
+ ]), Ee.useEffect(() => {
5437
5437
  Ke.current = A;
5438
5438
  }, [
5439
5439
  A
5440
- ]), _e.useEffect(() => {
5440
+ ]), Ee.useEffect(() => {
5441
5441
  X(!0);
5442
- }, []), _e.useEffect(() => {
5442
+ }, []), Ee.useEffect(() => {
5443
5443
  const le = ae.current;
5444
5444
  if (le) {
5445
5445
  const yt = le.getBoundingClientRect().height;
@@ -5455,7 +5455,7 @@ const Yx = (e) => {
5455
5455
  }, [
5456
5456
  b,
5457
5457
  f.id
5458
- ]), _e.useLayoutEffect(() => {
5458
+ ]), Ee.useLayoutEffect(() => {
5459
5459
  if (!E) return;
5460
5460
  const le = ae.current, yt = le.style.height;
5461
5461
  le.style.height = "auto";
@@ -5481,8 +5481,8 @@ const Yx = (e) => {
5481
5481
  f.action,
5482
5482
  f.cancel
5483
5483
  ]);
5484
- const Fe = _e.useCallback(() => {
5485
- xe(!0), Te(ye.current), b((le) => le.filter((yt) => yt.toastId !== f.id)), setTimeout(() => {
5484
+ const Fe = Ee.useCallback(() => {
5485
+ xe(!0), _e(ye.current), b((le) => le.filter((yt) => yt.toastId !== f.id)), setTimeout(() => {
5486
5486
  k(f);
5487
5487
  }, Kx);
5488
5488
  }, [
@@ -5491,7 +5491,7 @@ const Yx = (e) => {
5491
5491
  b,
5492
5492
  ye
5493
5493
  ]);
5494
- _e.useEffect(() => {
5494
+ Ee.useEffect(() => {
5495
5495
  if (f.promise && be === "loading" || f.duration === 1 / 0 || f.type === "loading") return;
5496
5496
  let le;
5497
5497
  return C || h || Ye ? (() => {
@@ -5512,7 +5512,7 @@ const Yx = (e) => {
5512
5512
  be,
5513
5513
  Ye,
5514
5514
  Fe
5515
- ]), _e.useEffect(() => {
5515
+ ]), Ee.useEffect(() => {
5516
5516
  f.delete && (Fe(), f.onDismiss == null || f.onDismiss.call(f, f));
5517
5517
  }, [
5518
5518
  Fe,
@@ -5522,19 +5522,19 @@ const Yx = (e) => {
5522
5522
  var le;
5523
5523
  if (pe != null && pe.loading) {
5524
5524
  var yt;
5525
- return /* @__PURE__ */ _e.createElement("div", {
5525
+ return /* @__PURE__ */ Ee.createElement("div", {
5526
5526
  className: jn(ie == null ? void 0 : ie.loader, f == null || (yt = f.classNames) == null ? void 0 : yt.loader, "sonner-loader"),
5527
5527
  "data-visible": be === "loading"
5528
5528
  }, pe.loading);
5529
5529
  }
5530
- return /* @__PURE__ */ _e.createElement(Ex, {
5530
+ return /* @__PURE__ */ Ee.createElement(Ex, {
5531
5531
  className: jn(ie == null ? void 0 : ie.loader, f == null || (le = f.classNames) == null ? void 0 : le.loader),
5532
5532
  visible: be === "loading"
5533
5533
  });
5534
5534
  }
5535
5535
  const st = f.icon || (pe == null ? void 0 : pe[be]) || Tx(be);
5536
5536
  var kt, _t;
5537
- return /* @__PURE__ */ _e.createElement("li", {
5537
+ return /* @__PURE__ */ Ee.createElement("li", {
5538
5538
  tabIndex: 0,
5539
5539
  ref: ae,
5540
5540
  className: jn(H, de, ie == null ? void 0 : ie.toast, f == null || (t = f.classNames) == null ? void 0 : t.toast, ie == null ? void 0 : ie.default, ie == null ? void 0 : ie[be], f == null || (r = f.classNames) == null ? void 0 : r[be]),
@@ -5543,7 +5543,7 @@ const Yx = (e) => {
5543
5543
  "data-styled": !(f.jsx || f.unstyled || p),
5544
5544
  "data-mounted": E,
5545
5545
  "data-promise": !!f.promise,
5546
- "data-swiped": Me,
5546
+ "data-swiped": Te,
5547
5547
  "data-removed": J,
5548
5548
  "data-visible": V,
5549
5549
  "data-y-position": $e,
@@ -5563,7 +5563,7 @@ const Yx = (e) => {
5563
5563
  "--toasts-before": w,
5564
5564
  "--z-index": T.length - w,
5565
5565
  "--offset": `${J ? se : ye.current}px`,
5566
- "--initial-height": oe ? "auto" : `${Ne}px`,
5566
+ "--initial-height": oe ? "auto" : `${Se}px`,
5567
5567
  ...F,
5568
5568
  ...f.style
5569
5569
  },
@@ -5571,7 +5571,7 @@ const Yx = (e) => {
5571
5571
  Y(!1), _(null), Re.current = null;
5572
5572
  },
5573
5573
  onPointerDown: (le) => {
5574
- le.button !== 2 && (ve || !He || (Ze.current = /* @__PURE__ */ new Date(), Te(ye.current), le.target.setPointerCapture(le.pointerId), le.target.tagName !== "BUTTON" && (Y(!0), Re.current = {
5574
+ le.button !== 2 && (ve || !He || (Ze.current = /* @__PURE__ */ new Date(), _e(ye.current), le.target.setPointerCapture(le.pointerId), le.target.tagName !== "BUTTON" && (Y(!0), Re.current = {
5575
5575
  x: le.clientX,
5576
5576
  y: le.clientY
5577
5577
  })));
@@ -5582,7 +5582,7 @@ const Yx = (e) => {
5582
5582
  Re.current = null;
5583
5583
  const Ge = Number(((le = ae.current) == null ? void 0 : le.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Rt = Number(((yt = ae.current) == null ? void 0 : yt.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), lt = (/* @__PURE__ */ new Date()).getTime() - ((gt = Ze.current) == null ? void 0 : gt.getTime()), Et = $ === "x" ? Ge : Rt, tn = Math.abs(Et) / lt;
5584
5584
  if (Math.abs(Et) >= Gx || tn > 0.11) {
5585
- Te(ye.current), f.onDismiss == null || f.onDismiss.call(f, f), S($ === "x" ? Ge > 0 ? "right" : "left" : Rt > 0 ? "down" : "up"), Fe(), me(!0);
5585
+ _e(ye.current), f.onDismiss == null || f.onDismiss.call(f, f), S($ === "x" ? Ge > 0 ? "right" : "left" : Rt > 0 ? "down" : "up"), Fe(), me(!0);
5586
5586
  return;
5587
5587
  } else {
5588
5588
  var wt, jt;
@@ -5619,7 +5619,7 @@ const Yx = (e) => {
5619
5619
  }
5620
5620
  (Math.abs(jt.x) > 0 || Math.abs(jt.y) > 0) && Oe(!0), (gt = ae.current) == null || gt.style.setProperty("--swipe-amount-x", `${jt.x}px`), (Ge = ae.current) == null || Ge.style.setProperty("--swipe-amount-y", `${jt.y}px`);
5621
5621
  }
5622
- }, ue && !f.jsx && be !== "loading" ? /* @__PURE__ */ _e.createElement("button", {
5622
+ }, ue && !f.jsx && be !== "loading" ? /* @__PURE__ */ Ee.createElement("button", {
5623
5623
  "aria-label": j,
5624
5624
  "data-disabled": ve,
5625
5625
  "data-close-button": !0,
@@ -5628,19 +5628,19 @@ const Yx = (e) => {
5628
5628
  Fe(), f.onDismiss == null || f.onDismiss.call(f, f);
5629
5629
  },
5630
5630
  className: jn(ie == null ? void 0 : ie.closeButton, f == null || (s = f.classNames) == null ? void 0 : s.closeButton)
5631
- }, (_t = pe == null ? void 0 : pe.close) != null ? _t : Px) : null, (be || f.icon || f.promise) && f.icon !== null && ((pe == null ? void 0 : pe[be]) !== null || f.icon) ? /* @__PURE__ */ _e.createElement("div", {
5631
+ }, (_t = pe == null ? void 0 : pe.close) != null ? _t : Px) : null, (be || f.icon || f.promise) && f.icon !== null && ((pe == null ? void 0 : pe[be]) !== null || f.icon) ? /* @__PURE__ */ Ee.createElement("div", {
5632
5632
  "data-icon": "",
5633
5633
  className: jn(ie == null ? void 0 : ie.icon, f == null || (o = f.classNames) == null ? void 0 : o.icon)
5634
- }, f.promise || f.type === "loading" && !f.icon ? f.icon || De() : null, f.type !== "loading" ? st : null) : null, /* @__PURE__ */ _e.createElement("div", {
5634
+ }, f.promise || f.type === "loading" && !f.icon ? f.icon || De() : null, f.type !== "loading" ? st : null) : null, /* @__PURE__ */ Ee.createElement("div", {
5635
5635
  "data-content": "",
5636
5636
  className: jn(ie == null ? void 0 : ie.content, f == null || (i = f.classNames) == null ? void 0 : i.content)
5637
- }, /* @__PURE__ */ _e.createElement("div", {
5637
+ }, /* @__PURE__ */ Ee.createElement("div", {
5638
5638
  "data-title": "",
5639
5639
  className: jn(ie == null ? void 0 : ie.title, f == null || (a = f.classNames) == null ? void 0 : a.title)
5640
- }, f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title), f.description ? /* @__PURE__ */ _e.createElement("div", {
5640
+ }, f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title), f.description ? /* @__PURE__ */ Ee.createElement("div", {
5641
5641
  "data-description": "",
5642
5642
  className: jn(L, We, ie == null ? void 0 : ie.description, f == null || (l = f.classNames) == null ? void 0 : l.description)
5643
- }, typeof f.description == "function" ? f.description() : f.description) : null), /* @__PURE__ */ _e.isValidElement(f.cancel) ? f.cancel : f.cancel && Co(f.cancel) ? /* @__PURE__ */ _e.createElement("button", {
5643
+ }, typeof f.description == "function" ? f.description() : f.description) : null), /* @__PURE__ */ Ee.isValidElement(f.cancel) ? f.cancel : f.cancel && Co(f.cancel) ? /* @__PURE__ */ Ee.createElement("button", {
5644
5644
  "data-button": !0,
5645
5645
  "data-cancel": !0,
5646
5646
  style: f.cancelButtonStyle || q,
@@ -5648,7 +5648,7 @@ const Yx = (e) => {
5648
5648
  Co(f.cancel) && He && (f.cancel.onClick == null || f.cancel.onClick.call(f.cancel, le), Fe());
5649
5649
  },
5650
5650
  className: jn(ie == null ? void 0 : ie.cancelButton, f == null || (c = f.classNames) == null ? void 0 : c.cancelButton)
5651
- }, f.cancel.label) : null, /* @__PURE__ */ _e.isValidElement(f.action) ? f.action : f.action && Co(f.action) ? /* @__PURE__ */ _e.createElement("button", {
5651
+ }, f.cancel.label) : null, /* @__PURE__ */ Ee.isValidElement(f.action) ? f.action : f.action && Co(f.action) ? /* @__PURE__ */ Ee.createElement("button", {
5652
5652
  "data-button": !0,
5653
5653
  "data-action": !0,
5654
5654
  style: f.actionButtonStyle || ce,
@@ -5690,25 +5690,25 @@ function Jx(e, t) {
5690
5690
  }) : c(l);
5691
5691
  }), r;
5692
5692
  }
5693
- const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5693
+ const Zx = /* @__PURE__ */ Ee.forwardRef(function(t, r) {
5694
5694
  const { id: s, invert: o, position: i = "bottom-right", hotkey: a = [
5695
5695
  "altKey",
5696
5696
  "KeyT"
5697
- ], expand: l, closeButton: c, className: u, offset: m, mobileOffset: f, theme: p = "light", richColors: h, duration: b, style: x, visibleToasts: y = Fx, toastOptions: w, dir: T = fc(), gap: C = Wx, icons: k, containerAriaLabel: N = "Notifications" } = t, [O, F] = _e.useState([]), q = _e.useMemo(() => s ? O.filter((E) => E.toasterId === s) : O.filter((E) => !E.toasterId), [
5697
+ ], expand: l, closeButton: c, className: u, offset: m, mobileOffset: f, theme: p = "light", richColors: h, duration: b, style: x, visibleToasts: y = Fx, toastOptions: w, dir: T = fc(), gap: C = Wx, icons: k, containerAriaLabel: N = "Notifications" } = t, [O, F] = Ee.useState([]), q = Ee.useMemo(() => s ? O.filter((E) => E.toasterId === s) : O.filter((E) => !E.toasterId), [
5698
5698
  O,
5699
5699
  s
5700
- ]), ce = _e.useMemo(() => Array.from(new Set([
5700
+ ]), ce = Ee.useMemo(() => Array.from(new Set([
5701
5701
  i
5702
5702
  ].concat(q.filter((E) => E.position).map((E) => E.position)))), [
5703
5703
  q,
5704
5704
  i
5705
- ]), [H, L] = _e.useState([]), [Z, Q] = _e.useState(!1), [K, oe] = _e.useState(!1), [ie, pe] = _e.useState(p !== "system" ? p : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), j = _e.useRef(null), $ = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = _e.useRef(null), M = _e.useRef(!1), S = _e.useCallback((E) => {
5705
+ ]), [H, L] = Ee.useState([]), [Z, Q] = Ee.useState(!1), [K, oe] = Ee.useState(!1), [ie, pe] = Ee.useState(p !== "system" ? p : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), j = Ee.useRef(null), $ = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = Ee.useRef(null), M = Ee.useRef(!1), S = Ee.useCallback((E) => {
5706
5706
  F((X) => {
5707
5707
  var J;
5708
5708
  return (J = X.find((xe) => xe.id === E.id)) != null && J.delete || ln.dismiss(E.id), X.filter(({ id: xe }) => xe !== E.id);
5709
5709
  });
5710
5710
  }, []);
5711
- return _e.useEffect(() => ln.subscribe((E) => {
5711
+ return Ee.useEffect(() => ln.subscribe((E) => {
5712
5712
  if (E.dismiss) {
5713
5713
  requestAnimationFrame(() => {
5714
5714
  F((X) => X.map((J) => J.id === E.id ? {
@@ -5738,7 +5738,7 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5738
5738
  });
5739
5739
  }), [
5740
5740
  O
5741
- ]), _e.useEffect(() => {
5741
+ ]), Ee.useEffect(() => {
5742
5742
  if (p !== "system") {
5743
5743
  pe(p);
5744
5744
  return;
@@ -5760,11 +5760,11 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5760
5760
  }
5761
5761
  }, [
5762
5762
  p
5763
- ]), _e.useEffect(() => {
5763
+ ]), Ee.useEffect(() => {
5764
5764
  O.length <= 1 && Q(!1);
5765
5765
  }, [
5766
5766
  O
5767
- ]), _e.useEffect(() => {
5767
+ ]), Ee.useEffect(() => {
5768
5768
  const E = (X) => {
5769
5769
  var J;
5770
5770
  if (a.every((Y) => X[Y] || X.code === Y)) {
@@ -5776,7 +5776,7 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5776
5776
  return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
5777
5777
  }, [
5778
5778
  a
5779
- ]), _e.useEffect(() => {
5779
+ ]), Ee.useEffect(() => {
5780
5780
  if (j.current)
5781
5781
  return () => {
5782
5782
  _.current && (_.current.focus({
@@ -5786,7 +5786,7 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5786
5786
  }, [
5787
5787
  j.current
5788
5788
  ]), // Remove item from normal navigation flow, only available via hotkey
5789
- /* @__PURE__ */ _e.createElement("section", {
5789
+ /* @__PURE__ */ Ee.createElement("section", {
5790
5790
  ref: r,
5791
5791
  "aria-label": `${N} ${$}`,
5792
5792
  tabIndex: -1,
@@ -5797,7 +5797,7 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5797
5797
  }, ce.map((E, X) => {
5798
5798
  var J;
5799
5799
  const [xe, he] = E.split("-");
5800
- return q.length ? /* @__PURE__ */ _e.createElement("ol", {
5800
+ return q.length ? /* @__PURE__ */ Ee.createElement("ol", {
5801
5801
  key: E,
5802
5802
  dir: T === "auto" ? fc() : T,
5803
5803
  tabIndex: -1,
@@ -5833,8 +5833,8 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5833
5833
  },
5834
5834
  onPointerUp: () => oe(!1)
5835
5835
  }, q.filter((Y) => !Y.position && X === 0 || Y.position === E).map((Y, fe) => {
5836
- var me, Me;
5837
- return /* @__PURE__ */ _e.createElement(Yx, {
5836
+ var me, Te;
5837
+ return /* @__PURE__ */ Ee.createElement(Yx, {
5838
5838
  key: Y.id,
5839
5839
  icons: k,
5840
5840
  index: fe,
@@ -5845,7 +5845,7 @@ const Zx = /* @__PURE__ */ _e.forwardRef(function(t, r) {
5845
5845
  descriptionClassName: w == null ? void 0 : w.descriptionClassName,
5846
5846
  invert: o,
5847
5847
  visibleToasts: y,
5848
- closeButton: (Me = w == null ? void 0 : w.closeButton) != null ? Me : c,
5848
+ closeButton: (Te = w == null ? void 0 : w.closeButton) != null ? Te : c,
5849
5849
  interacting: K,
5850
5850
  position: E,
5851
5851
  style: w == null ? void 0 : w.style,
@@ -5888,7 +5888,7 @@ function Qx({
5888
5888
  r === "live" && a && An.success("Reconnected", { id: zi, duration: 2e3 });
5889
5889
  }, [r, s, o, t]), null;
5890
5890
  }
5891
- const Se = new Proxy(An, {
5891
+ const Ne = new Proxy(An, {
5892
5892
  get(e, t, r) {
5893
5893
  const s = Reflect.get(e, t, r);
5894
5894
  return t === "success" && typeof s == "function" ? (...o) => (Nn.success(), s(...o)) : t === "error" && typeof s == "function" ? (...o) => (Nn.error(), s(...o)) : typeof s == "function" ? s.bind(e) : s;
@@ -6156,7 +6156,7 @@ function Sy({ className: e, type: t, ...r }) {
6156
6156
  {
6157
6157
  type: t,
6158
6158
  "data-slot": "input",
6159
- className: z(
6159
+ className: P(
6160
6160
  "lfg-gfield h-9 w-full min-w-0 rounded-4xl px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
6161
6161
  e
6162
6162
  ),
@@ -6178,7 +6178,7 @@ function My({
6178
6178
  ar.Backdrop,
6179
6179
  {
6180
6180
  "data-slot": "dialog-overlay",
6181
- className: z(
6181
+ className: P(
6182
6182
  // z-[160] sits above every app-level sheet and drawer (the full-screen
6183
6183
  // session sheet is z-[90] and the tallest drawers are z-[150]). A
6184
6184
  // Dialog opened from one of those surfaces must remain visible and
@@ -6238,12 +6238,12 @@ function Pr({
6238
6238
  ), h = (f ? Array.from(f.querySelectorAll("button:not(:disabled)")) : []).at(-1);
6239
6239
  h && (u.preventDefault(), h.click());
6240
6240
  },
6241
- className: z(
6241
+ className: P(
6242
6242
  "pointer-events-auto fixed top-1/2 left-1/2 z-[160] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-4xl bg-background text-sm ring-1 ring-foreground/5 data-open:duration-[var(--duration-fast)] data-closed:duration-[var(--duration-quick)] ease-ios outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.96] data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-[0.96]",
6243
6243
  e
6244
6244
  ),
6245
6245
  ...a,
6246
- children: /* @__PURE__ */ d("div", { ref: c, className: z("grid gap-6 p-6", s), children: [
6246
+ children: /* @__PURE__ */ d("div", { ref: c, className: P("grid gap-6 p-6", s), children: [
6247
6247
  t,
6248
6248
  r && /* @__PURE__ */ d(
6249
6249
  ar.Close,
@@ -6276,7 +6276,7 @@ function so({ className: e, ...t }) {
6276
6276
  "div",
6277
6277
  {
6278
6278
  "data-slot": "dialog-header",
6279
- className: z("flex flex-col gap-2", e),
6279
+ className: P("flex flex-col gap-2", e),
6280
6280
  ...t
6281
6281
  }
6282
6282
  );
@@ -6291,7 +6291,7 @@ function Ba({
6291
6291
  "div",
6292
6292
  {
6293
6293
  "data-slot": "dialog-footer",
6294
- className: z(
6294
+ className: P(
6295
6295
  "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
6296
6296
  e
6297
6297
  ),
@@ -6308,7 +6308,7 @@ function Or({ className: e, ...t }) {
6308
6308
  ar.Title,
6309
6309
  {
6310
6310
  "data-slot": "dialog-title",
6311
- className: z(
6311
+ className: P(
6312
6312
  "font-heading text-base leading-none font-medium",
6313
6313
  e
6314
6314
  ),
@@ -6324,7 +6324,7 @@ function ii({
6324
6324
  ar.Description,
6325
6325
  {
6326
6326
  "data-slot": "dialog-description",
6327
- className: z(
6327
+ className: P(
6328
6328
  "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
6329
6329
  e
6330
6330
  ),
@@ -6587,7 +6587,7 @@ function Ha({
6587
6587
  {
6588
6588
  "data-slot": "shimmer-text",
6589
6589
  "data-text": e,
6590
- className: z("lfg-shimmer-text", t),
6590
+ className: P("lfg-shimmer-text", t),
6591
6591
  ...r,
6592
6592
  children: e
6593
6593
  }
@@ -6653,7 +6653,7 @@ function Zr({
6653
6653
  onCheckedChange: (s, o) => {
6654
6654
  Nn.toggle(s), t == null || t(s, o);
6655
6655
  },
6656
- className: z(
6656
+ className: P(
6657
6657
  "relative inline-flex h-[31px] w-[51px] shrink-0 items-center rounded-full p-0.5",
6658
6658
  "bg-foreground/[0.12] transition-colors duration-200 ease-apple",
6659
6659
  "data-[checked]:bg-success",
@@ -6665,7 +6665,7 @@ function Zr({
6665
6665
  children: /* @__PURE__ */ n(
6666
6666
  jl.Thumb,
6667
6667
  {
6668
- className: z(
6668
+ className: P(
6669
6669
  "pointer-events-none size-[27px] rounded-full bg-white",
6670
6670
  "shadow-[0_1px_1px_rgba(0,0,0,0.08),0_3px_8px_rgba(0,0,0,0.18)]",
6671
6671
  "transition-transform duration-200 ease-apple",
@@ -6690,7 +6690,7 @@ function Uy({
6690
6690
  Ir.Backdrop,
6691
6691
  {
6692
6692
  "data-slot": "alert-dialog-overlay",
6693
- className: z(
6693
+ className: P(
6694
6694
  // z-[160] sits above every app-level sheet and drawer (the full-screen
6695
6695
  // session sheet is z-[90] and the tallest drawers are z-[150]). A
6696
6696
  // destructive confirmation opened from one of those surfaces must
@@ -6728,7 +6728,7 @@ function By({
6728
6728
  o.stopPropagation(), r == null || r(o);
6729
6729
  },
6730
6730
  "data-size": t,
6731
- className: z(
6731
+ className: P(
6732
6732
  "group/alert-dialog-content pointer-events-auto fixed top-1/2 left-1/2 z-[160] grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-background p-6 ring-1 ring-foreground/5 data-open:duration-[var(--duration-fast)] data-closed:duration-[var(--duration-quick)] ease-ios outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.96] data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-[0.96]",
6733
6733
  e
6734
6734
  ),
@@ -6745,7 +6745,7 @@ function Fy({
6745
6745
  "div",
6746
6746
  {
6747
6747
  "data-slot": "alert-dialog-header",
6748
- className: z(
6748
+ className: P(
6749
6749
  "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
6750
6750
  e
6751
6751
  ),
@@ -6761,7 +6761,7 @@ function qy({
6761
6761
  "div",
6762
6762
  {
6763
6763
  "data-slot": "alert-dialog-footer",
6764
- className: z(
6764
+ className: P(
6765
6765
  "flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
6766
6766
  e
6767
6767
  ),
@@ -6777,7 +6777,7 @@ function Hy({
6777
6777
  Ir.Title,
6778
6778
  {
6779
6779
  "data-slot": "alert-dialog-title",
6780
- className: z(
6780
+ className: P(
6781
6781
  "font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
6782
6782
  e
6783
6783
  ),
@@ -6793,7 +6793,7 @@ function Vy({
6793
6793
  Ir.Description,
6794
6794
  {
6795
6795
  "data-slot": "alert-dialog-description",
6796
- className: z(
6796
+ className: P(
6797
6797
  "text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
6798
6798
  e
6799
6799
  ),
@@ -6809,7 +6809,7 @@ function Wy({
6809
6809
  Ie,
6810
6810
  {
6811
6811
  "data-slot": "alert-dialog-action",
6812
- className: z(e),
6812
+ className: P(e),
6813
6813
  ...t
6814
6814
  }
6815
6815
  );
@@ -6824,7 +6824,7 @@ function Gy({
6824
6824
  Ir.Close,
6825
6825
  {
6826
6826
  "data-slot": "alert-dialog-cancel",
6827
- className: z(e),
6827
+ className: P(e),
6828
6828
  render: /* @__PURE__ */ n(Ie, { variant: t, size: r }),
6829
6829
  ...s
6830
6830
  }
@@ -7145,7 +7145,7 @@ function Xy({
7145
7145
  type: "button",
7146
7146
  "aria-label": `Color ${_}`,
7147
7147
  onClick: () => f(_),
7148
- className: z(
7148
+ className: P(
7149
7149
  "size-6 shrink-0 rounded-full ring-1 ring-border/60 transition-transform",
7150
7150
  m === _ && "scale-110 ring-2 ring-foreground"
7151
7151
  ),
@@ -7252,7 +7252,7 @@ function Qy() {
7252
7252
  }
7253
7253
  const ev = { dark: "github-dark", light: "github-light" };
7254
7254
  function Ru({ additions: e, deletions: t, className: r }) {
7255
- return /* @__PURE__ */ d("span", { className: z("flex items-center gap-1.5 font-mono text-[11px] tabular-nums", r), children: [
7255
+ return /* @__PURE__ */ d("span", { className: P("flex items-center gap-1.5 font-mono text-[11px] tabular-nums", r), children: [
7256
7256
  /* @__PURE__ */ d("span", { className: "text-[var(--success)]", children: [
7257
7257
  "+",
7258
7258
  e
@@ -7292,7 +7292,7 @@ const tv = ls(function({
7292
7292
  onClick: h,
7293
7293
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-muted/50",
7294
7294
  children: [
7295
- /* @__PURE__ */ n(Mn, { className: z("size-3.5 shrink-0 text-muted-foreground transition-transform", !i && "-rotate-90") }),
7295
+ /* @__PURE__ */ n(Mn, { className: P("size-3.5 shrink-0 text-muted-foreground transition-transform", !i && "-rotate-90") }),
7296
7296
  /* @__PURE__ */ d("span", { className: "min-w-0 flex-1 truncate font-mono text-[12px] text-foreground", children: [
7297
7297
  r.oldPath && r.oldPath !== r.path ? /* @__PURE__ */ d("span", { className: "text-muted-foreground", children: [
7298
7298
  r.oldPath,
@@ -7301,7 +7301,7 @@ const tv = ls(function({
7301
7301
  r.path
7302
7302
  ] }),
7303
7303
  u ? /* @__PURE__ */ n(xt, { className: "size-3 shrink-0 animate-spin text-muted-foreground" }) : null,
7304
- /* @__PURE__ */ n("span", { className: z("shrink-0 text-[10px] font-medium uppercase tracking-wide", Zy[r.status]), children: Jy[r.status] }),
7304
+ /* @__PURE__ */ n("span", { className: P("shrink-0 text-[10px] font-medium uppercase tracking-wide", Zy[r.status]), children: Jy[r.status] }),
7305
7305
  /* @__PURE__ */ n(Ru, { additions: r.additions, deletions: r.deletions, className: "shrink-0" })
7306
7306
  ]
7307
7307
  }
@@ -7365,7 +7365,7 @@ function nv({ sid: e, onClose: t }) {
7365
7365
  type: "button",
7366
7366
  onClick: () => l("unified"),
7367
7367
  "aria-label": "Unified view",
7368
- className: z("rounded-md p-1.5 text-muted-foreground transition-colors hover:text-foreground", a === "unified" && "bg-muted text-foreground"),
7368
+ className: P("rounded-md p-1.5 text-muted-foreground transition-colors hover:text-foreground", a === "unified" && "bg-muted text-foreground"),
7369
7369
  children: /* @__PURE__ */ n(Ig, { className: "size-3.5" })
7370
7370
  }
7371
7371
  ),
@@ -7375,7 +7375,7 @@ function nv({ sid: e, onClose: t }) {
7375
7375
  type: "button",
7376
7376
  onClick: () => l("split"),
7377
7377
  "aria-label": "Split view",
7378
- className: z("rounded-md p-1.5 text-muted-foreground transition-colors hover:text-foreground", a === "split" && "bg-muted text-foreground"),
7378
+ className: P("rounded-md p-1.5 text-muted-foreground transition-colors hover:text-foreground", a === "split" && "bg-muted text-foreground"),
7379
7379
  children: /* @__PURE__ */ n(gh, { className: "size-3.5" })
7380
7380
  }
7381
7381
  )
@@ -7432,7 +7432,7 @@ const rv = ls(function({
7432
7432
  {
7433
7433
  type: "button",
7434
7434
  onClick: () => a(!0),
7435
- className: z(
7435
+ className: P(
7436
7436
  "lfg-scroll-pill pointer-events-auto flex items-center gap-2 rounded-full border px-3.5 py-1.5 text-xs font-medium shadow-md backdrop-blur transition-colors",
7437
7437
  s != null && s.merged ? "border-[var(--success)]/35 bg-[var(--success)]/10 text-foreground hover:bg-[var(--success)]/15" : "border-border bg-card/95 text-foreground hover:bg-card"
7438
7438
  ),
@@ -7452,7 +7452,7 @@ const rv = ls(function({
7452
7452
  s.deletions
7453
7453
  ] })
7454
7454
  ] }),
7455
- /* @__PURE__ */ n("span", { className: z("text-[11px]", s != null && s.merged ? "font-semibold text-[var(--success)]" : "text-muted-foreground"), children: s != null && s.merged ? "Merged" : "Review" })
7455
+ /* @__PURE__ */ n("span", { className: P("text-[11px]", s != null && s.merged ? "font-semibold text-[var(--success)]" : "text-muted-foreground"), children: s != null && s.merged ? "Merged" : "Review" })
7456
7456
  ]
7457
7457
  }
7458
7458
  ) : null }),
@@ -7460,14 +7460,14 @@ const rv = ls(function({
7460
7460
  ] }) : null;
7461
7461
  }), sv = $r(
7462
7462
  "session-files-panel",
7463
- () => import("./SessionFilesPanel-DfOf1KRB.js")
7463
+ () => import("./SessionFilesPanel-DaLoIpG5.js")
7464
7464
  );
7465
7465
  function Ga({ className: e, ...t }) {
7466
7466
  return /* @__PURE__ */ n(
7467
7467
  "textarea",
7468
7468
  {
7469
7469
  "data-slot": "textarea",
7470
- className: z(
7470
+ className: P(
7471
7471
  "flex field-sizing-content min-h-16 w-full resize-none rounded-xl border border-input bg-input/30 px-3 py-3 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
7472
7472
  e
7473
7473
  ),
@@ -7565,7 +7565,7 @@ function cv({
7565
7565
  en.Overlay,
7566
7566
  {
7567
7567
  "data-slot": "drawer-overlay",
7568
- className: z(
7568
+ className: P(
7569
7569
  "fixed inset-0 z-[70] bg-black/80 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
7570
7570
  e
7571
7571
  ),
@@ -7591,7 +7591,7 @@ function io({
7591
7591
  "data-slot": "drawer-content",
7592
7592
  showCloseButton: !1,
7593
7593
  overlayClassName: t,
7594
- className: z("max-h-[85dvh] overflow-hidden", e),
7594
+ className: P("max-h-[85dvh] overflow-hidden", e),
7595
7595
  innerClassName: "flex h-full min-h-0 flex-col overflow-hidden p-4",
7596
7596
  ...c,
7597
7597
  children: r
@@ -7603,7 +7603,7 @@ function io({
7603
7603
  {
7604
7604
  "data-slot": "drawer-content",
7605
7605
  "data-paged": f ? "true" : "false",
7606
- className: z(
7606
+ className: P(
7607
7607
  "group/drawer-content fixed z-[70] flex h-auto flex-col bg-transparent p-4 text-sm before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border before:border-border before:bg-background data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
7608
7608
  f && "lfg-sheet-page",
7609
7609
  e
@@ -7634,7 +7634,7 @@ function ao({
7634
7634
  Or,
7635
7635
  {
7636
7636
  "data-slot": "drawer-title",
7637
- className: z(
7637
+ className: P(
7638
7638
  "font-heading text-base font-medium text-foreground",
7639
7639
  e
7640
7640
  ),
@@ -7644,7 +7644,7 @@ function ao({
7644
7644
  en.Title,
7645
7645
  {
7646
7646
  "data-slot": "drawer-title",
7647
- className: z(
7647
+ className: P(
7648
7648
  "font-heading text-base font-medium text-foreground",
7649
7649
  e
7650
7650
  ),
@@ -7679,7 +7679,7 @@ function cr({
7679
7679
  dn.Popup,
7680
7680
  {
7681
7681
  "data-slot": "dropdown-menu-content",
7682
- className: z(
7682
+ className: P(
7683
7683
  Ka,
7684
7684
  "dark z-[170] max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto text-popover-foreground data-open:duration-[var(--duration-fast)] data-closed:duration-[var(--duration-quick)] ease-ios outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.97] data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-[0.99] relative **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",
7685
7685
  o
@@ -7703,7 +7703,7 @@ function Mr({
7703
7703
  {
7704
7704
  "data-slot": "dropdown-menu-label",
7705
7705
  "data-inset": t,
7706
- className: z(
7706
+ className: P(
7707
7707
  "px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
7708
7708
  e
7709
7709
  ),
@@ -7723,7 +7723,7 @@ function wn({
7723
7723
  "data-slot": "dropdown-menu-item",
7724
7724
  "data-inset": t,
7725
7725
  "data-variant": r,
7726
- className: z(
7726
+ className: P(
7727
7727
  "group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
7728
7728
  e
7729
7729
  ),
@@ -7745,7 +7745,7 @@ function ra({
7745
7745
  {
7746
7746
  "data-slot": "dropdown-menu-sub-trigger",
7747
7747
  "data-inset": t,
7748
- className: z(
7748
+ className: P(
7749
7749
  "flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7750
7750
  e
7751
7751
  ),
@@ -7769,7 +7769,7 @@ function sa({
7769
7769
  cr,
7770
7770
  {
7771
7771
  "data-slot": "dropdown-menu-sub-content",
7772
- className: z(
7772
+ className: P(
7773
7773
  Ka,
7774
7774
  "dark w-auto min-w-36 text-popover-foreground data-open:duration-[var(--duration-fast)] data-closed:duration-[var(--duration-quick)] ease-ios data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.97] data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-[0.99] animate-none! relative **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",
7775
7775
  o
@@ -7802,7 +7802,7 @@ function cn({
7802
7802
  {
7803
7803
  "data-slot": "dropdown-menu-radio-item",
7804
7804
  "data-inset": r,
7805
- className: z(
7805
+ className: P(
7806
7806
  "relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7807
7807
  e
7808
7808
  ),
@@ -7832,7 +7832,7 @@ function ss({
7832
7832
  dn.Separator,
7833
7833
  {
7834
7834
  "data-slot": "dropdown-menu-separator",
7835
- className: z("-mx-1 my-1 h-px bg-border/50", e),
7835
+ className: P("-mx-1 my-1 h-px bg-border/50", e),
7836
7836
  ...t
7837
7837
  }
7838
7838
  );
@@ -7848,7 +7848,7 @@ function fv({
7848
7848
  pn.Trigger,
7849
7849
  {
7850
7850
  "data-slot": "context-menu-trigger",
7851
- className: z(e),
7851
+ className: P(e),
7852
7852
  ...t
7853
7853
  }
7854
7854
  );
@@ -7873,7 +7873,7 @@ function Du({
7873
7873
  pn.Popup,
7874
7874
  {
7875
7875
  "data-slot": "context-menu-content",
7876
- className: z(
7876
+ className: P(
7877
7877
  Ka,
7878
7878
  "dark z-[170] max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto text-popover-foreground data-open:duration-[var(--duration-fast)] data-closed:duration-[var(--duration-quick)] ease-ios outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.97] data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-[0.99] relative **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",
7879
7879
  e
@@ -7894,7 +7894,7 @@ function kc({
7894
7894
  {
7895
7895
  "data-slot": "context-menu-label",
7896
7896
  "data-inset": t,
7897
- className: z(
7897
+ className: P(
7898
7898
  "px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
7899
7899
  e
7900
7900
  ),
@@ -7914,7 +7914,7 @@ function Hn({
7914
7914
  "data-slot": "context-menu-item",
7915
7915
  "data-inset": t,
7916
7916
  "data-variant": r,
7917
- className: z(
7917
+ className: P(
7918
7918
  "group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
7919
7919
  e
7920
7920
  ),
@@ -7936,7 +7936,7 @@ function Sc({
7936
7936
  {
7937
7937
  "data-slot": "context-menu-sub-trigger",
7938
7938
  "data-inset": t,
7939
- className: z(
7939
+ className: P(
7940
7940
  "flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7941
7941
  e
7942
7942
  ),
@@ -7956,7 +7956,7 @@ function Cc({
7956
7956
  Du,
7957
7957
  {
7958
7958
  "data-slot": "context-menu-sub-content",
7959
- className: z("dark w-auto min-w-36", e),
7959
+ className: P("dark w-auto min-w-36", e),
7960
7960
  ...t
7961
7961
  }
7962
7962
  );
@@ -7983,7 +7983,7 @@ function To({
7983
7983
  {
7984
7984
  "data-slot": "context-menu-radio-item",
7985
7985
  "data-inset": r,
7986
- className: z(
7986
+ className: P(
7987
7987
  "relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7988
7988
  e
7989
7989
  ),
@@ -8010,7 +8010,7 @@ function Tc({
8010
8010
  pn.Separator,
8011
8011
  {
8012
8012
  "data-slot": "context-menu-separator",
8013
- className: z("-mx-1 my-1 h-px bg-border/50", e),
8013
+ className: P("-mx-1 my-1 h-px bg-border/50", e),
8014
8014
  ...t
8015
8015
  }
8016
8016
  );
@@ -8175,13 +8175,13 @@ async function i2() {
8175
8175
  }
8176
8176
  }
8177
8177
  const Ev = Qo(
8178
- () => import("./streamdown-response-BqrzLg61.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
8178
+ () => import("./streamdown-response-CGSKMu-u.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
8179
8179
  );
8180
8180
  function vs({ className: e, from: t, ...r }) {
8181
8181
  return /* @__PURE__ */ n(
8182
8182
  "div",
8183
8183
  {
8184
- className: z(
8184
+ className: P(
8185
8185
  "group/message flex w-full min-w-0",
8186
8186
  t === "user" ? "justify-end" : "justify-start",
8187
8187
  e
@@ -8195,7 +8195,7 @@ function _s({ className: e, ...t }) {
8195
8195
  return /* @__PURE__ */ n(
8196
8196
  "div",
8197
8197
  {
8198
- className: z(
8198
+ className: P(
8199
8199
  // Default cap for assistant content that is a direct Message child.
8200
8200
  // User turns cap width on MessageActions instead (so the percentage
8201
8201
  // resolves against Message's definite width and stays right-aligned).
@@ -8210,7 +8210,7 @@ const fo = ls(
8210
8210
  ({ className: e, mode: t = "static", ...r }) => /* @__PURE__ */ n(
8211
8211
  fn,
8212
8212
  {
8213
- fallback: /* @__PURE__ */ n("div", { className: z("markdown msg-text size-full whitespace-pre-wrap", e), children: typeof r.children == "string" ? r.children : null }),
8213
+ fallback: /* @__PURE__ */ n("div", { className: P("markdown msg-text size-full whitespace-pre-wrap", e), children: typeof r.children == "string" ? r.children : null }),
8214
8214
  children: /* @__PURE__ */ n(Ev, { className: e, mode: t, ...r })
8215
8215
  }
8216
8216
  ),
@@ -8328,7 +8328,7 @@ function qu({
8328
8328
  "aria-current": e ? "page" : void 0,
8329
8329
  "aria-label": `${s} question${s === 1 ? "" : "s"} for you`,
8330
8330
  title: `${s} waiting for you`,
8331
- className: z(
8331
+ className: P(
8332
8332
  "relative flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/12 text-primary transition-colors duration-200 ease-out active:scale-[0.96]"
8333
8333
  ),
8334
8334
  children: [
@@ -8385,7 +8385,7 @@ function zv({
8385
8385
  a ? /* @__PURE__ */ n(
8386
8386
  fo,
8387
8387
  {
8388
- className: z(
8388
+ className: P(
8389
8389
  "mt-0.5 text-[13px] leading-relaxed",
8390
8390
  // Demote headings: a question card must never look like a pile
8391
8391
  // of h1s inside a notification row.
@@ -8581,9 +8581,9 @@ function Gu(e, t) {
8581
8581
  if (!o) {
8582
8582
  i(!0);
8583
8583
  try {
8584
- await t() && Se.success("omg installed");
8584
+ await t() && Ne.success("omg installed");
8585
8585
  } catch {
8586
- Se.error("Could not open the install prompt");
8586
+ Ne.error("Could not open the install prompt");
8587
8587
  } finally {
8588
8588
  i(!1);
8589
8589
  }
@@ -8634,7 +8634,7 @@ function Dv() {
8634
8634
  type: "button",
8635
8635
  onClick: () => void s.act(),
8636
8636
  disabled: s.busy,
8637
- className: z(
8637
+ className: P(
8638
8638
  "flex w-full items-center justify-between gap-4 px-4 py-2.5 text-left transition-colors duration-150 ease-ios hover:bg-foreground/[0.03] active:bg-foreground/[0.06]",
8639
8639
  s.busy && "opacity-50"
8640
8640
  ),
@@ -8721,7 +8721,7 @@ function qv({
8721
8721
  try {
8722
8722
  await t({ skippedUpdateVersion: h });
8723
8723
  } catch {
8724
- Se.error("Could not save — the update will keep nudging you");
8724
+ Ne.error("Could not save — the update will keep nudging you");
8725
8725
  }
8726
8726
  m(!1);
8727
8727
  }, [h, t]), y = {
@@ -8789,7 +8789,7 @@ function Hv() {
8789
8789
  /* @__PURE__ */ n(
8790
8790
  "div",
8791
8791
  {
8792
- className: z(
8792
+ className: P(
8793
8793
  "text-xs text-muted-foreground",
8794
8794
  o || m ? "text-pretty" : "truncate",
8795
8795
  o && "text-destructive"
@@ -8803,7 +8803,7 @@ function Hv() {
8803
8803
  /* @__PURE__ */ n(Qr, { className: "size-4" }),
8804
8804
  "Update"
8805
8805
  ] }) : /* @__PURE__ */ d(Ie, { size: "sm", variant: "outline", onClick: () => void i(!0), disabled: s || !u, children: [
8806
- /* @__PURE__ */ n(cs, { className: z("size-4", s && "animate-spin") }),
8806
+ /* @__PURE__ */ n(cs, { className: P("size-4", s && "animate-spin") }),
8807
8807
  "Check"
8808
8808
  ] })
8809
8809
  ] }) }),
@@ -8900,7 +8900,7 @@ function Kv() {
8900
8900
  /* @__PURE__ */ n("div", { className: "markdown text-sm", children: /* @__PURE__ */ n(fo, { children: T.bodyMarkdown }) })
8901
8901
  ] }, T.version)) }) : /* @__PURE__ */ n("p", { className: "text-sm text-muted-foreground", children: s != null && s.latestVersion ? `Version ${s.latestVersion} is available.` : s != null && s.latestSha ? `${s.latestSha.slice(0, 7)} is available.` : s == null ? void 0 : s.message }) }),
8902
8902
  u.phase === "confirmed" ? null : /* @__PURE__ */ d("div", { className: "mt-auto flex shrink-0 items-center justify-between gap-2 border-t border-border/70 pt-3", children: [
8903
- /* @__PURE__ */ n("span", { className: z("min-w-0 truncate text-xs text-muted-foreground", u.phase === "failed" && "text-destructive"), children: w }),
8903
+ /* @__PURE__ */ n("span", { className: P("min-w-0 truncate text-xs text-muted-foreground", u.phase === "failed" && "text-destructive"), children: w }),
8904
8904
  /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2", children: u.phase === "failed" ? /* @__PURE__ */ d(Be, { children: [
8905
8905
  /* @__PURE__ */ n(Ie, { size: "sm", variant: "outline", onClick: y, children: "Skip" }),
8906
8906
  /* @__PURE__ */ n(Ie, { size: "sm", onClick: () => void x(), children: "Retry" })
@@ -10263,7 +10263,7 @@ function zw({
10263
10263
  },
10264
10264
  onFocus: () => y(j.id),
10265
10265
  onBlur: () => y((Y) => Y === j.id ? null : Y),
10266
- className: z(
10266
+ className: P(
10267
10267
  "lfg-campfire-arc-item absolute z-20 flex select-none flex-col items-center gap-1 rounded-2xl px-1 py-1.5",
10268
10268
  l ? "cursor-pointer" : "cursor-default",
10269
10269
  // left/top animate too: when the last source lands, any slot
@@ -10512,7 +10512,7 @@ const uf = Jo(
10512
10512
  "div",
10513
10513
  {
10514
10514
  ref: r,
10515
- className: z("relative min-h-0 flex-1 overflow-y-auto", e),
10515
+ className: P("relative min-h-0 flex-1 overflow-y-auto", e),
10516
10516
  role: "log",
10517
10517
  ...t
10518
10518
  }
@@ -10520,7 +10520,7 @@ const uf = Jo(
10520
10520
  );
10521
10521
  uf.displayName = "Conversation";
10522
10522
  function Fw({ className: e, ...t }) {
10523
- return /* @__PURE__ */ n("div", { className: z("flex flex-col gap-3", e), ...t });
10523
+ return /* @__PURE__ */ n("div", { className: P("flex flex-col gap-3", e), ...t });
10524
10524
  }
10525
10525
  function Fc({
10526
10526
  className: e,
@@ -10533,7 +10533,7 @@ function Fc({
10533
10533
  return /* @__PURE__ */ n(
10534
10534
  "div",
10535
10535
  {
10536
- className: z(
10536
+ className: P(
10537
10537
  "flex h-full min-h-64 flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground",
10538
10538
  e
10539
10539
  ),
@@ -10559,13 +10559,13 @@ function Ww({
10559
10559
  children: e,
10560
10560
  className: t
10561
10561
  }) {
10562
- return /* @__PURE__ */ n(Ha, { className: z(t), children: e });
10562
+ return /* @__PURE__ */ n(Ha, { className: P(t), children: e });
10563
10563
  }
10564
10564
  function Gw({ className: e, isStreaming: t, ...r }) {
10565
10565
  return /* @__PURE__ */ n(
10566
10566
  qw,
10567
10567
  {
10568
- className: z("group/reasoning not-prose w-full text-muted-foreground", e),
10568
+ className: P("group/reasoning not-prose w-full text-muted-foreground", e),
10569
10569
  ...r
10570
10570
  }
10571
10571
  );
@@ -10574,7 +10574,7 @@ function Kw({ className: e, isStreaming: t, children: r, ...s }) {
10574
10574
  return /* @__PURE__ */ n(
10575
10575
  Hw,
10576
10576
  {
10577
- className: z(
10577
+ className: P(
10578
10578
  "flex items-center gap-2 text-xs text-muted-foreground transition-colors hover:text-foreground",
10579
10579
  e
10580
10580
  ),
@@ -10588,28 +10588,28 @@ function Kw({ className: e, isStreaming: t, children: r, ...s }) {
10588
10588
  );
10589
10589
  }
10590
10590
  function Xw({ className: e, children: t, ...r }) {
10591
- return /* @__PURE__ */ n(Vw, { className: z("mt-2 text-sm", e), ...r, children: /* @__PURE__ */ n(fo, { className: "ai-live-text max-w-full opacity-90", children: t }) });
10591
+ return /* @__PURE__ */ n(Vw, { className: P("mt-2 text-sm", e), ...r, children: /* @__PURE__ */ n(fo, { className: "ai-live-text max-w-full opacity-90", children: t }) });
10592
10592
  }
10593
- const Yw = Qo(() => import("./chat-engine-BsYNS00O.js"));
10593
+ const Yw = Qo(() => import("./chat-engine-CsKusFKD.js"));
10594
10594
  function Jw() {
10595
- const e = () => void import("./chat-engine-BsYNS00O.js"), t = globalThis.requestIdleCallback;
10595
+ const e = () => void import("./chat-engine-CsKusFKD.js"), t = globalThis.requestIdleCallback;
10596
10596
  typeof t == "function" ? t(e, { timeout: 3e3 }) : setTimeout(e, 1500);
10597
10597
  }
10598
10598
  const ff = $r(
10599
10599
  "TermView",
10600
- () => import("./TermView-vJQhHqB3.js").then((e) => ({ default: e.TermView }))
10601
- ), qc = $r("ShippedPage", () => import("./shipped-page-Urj06m2r.js")), Zw = $r(
10600
+ () => import("./TermView-P_P_VN00.js").then((e) => ({ default: e.TermView }))
10601
+ ), qc = $r("ShippedPage", () => import("./shipped-page-BogQUgKi.js")), Zw = $r(
10602
10602
  "SessionTokenUsageDialog",
10603
- () => import("./session-token-usage-CS1IswLB.js")
10603
+ () => import("./session-token-usage-Bdvle4Y0.js")
10604
10604
  ), Qw = $r(
10605
10605
  "CodingAgentsPage",
10606
- () => import("./coding-agents-page-BdG6_g86.js")
10606
+ () => import("./coding-agents-page-BKnMDYJ4.js")
10607
10607
  ), Hc = $r(
10608
10608
  "ResumeSessionSheet",
10609
- () => import("./resume-session-sheet-B21Qg-Tl.js")
10609
+ () => import("./resume-session-sheet-DGGgwdCf.js")
10610
10610
  ), e1 = $r(
10611
10611
  "ChangelogPage",
10612
- () => import("./ChangelogPage-B7K3fZnF.js")
10612
+ () => import("./ChangelogPage-CDAmJIg6.js")
10613
10613
  ), ci = hn("configured"), t1 = {
10614
10614
  claude: "Claude",
10615
10615
  codex: "Codex",
@@ -10784,7 +10784,7 @@ function x1() {
10784
10784
  }
10785
10785
  const xf = (e) => `agent-limit:${e}`;
10786
10786
  function yf(e, t, r) {
10787
- return Ki(e) ? (Se.error(e instanceof Error ? e.message : String(e), {
10787
+ return Ki(e) ? (Ne.error(e instanceof Error ? e.message : String(e), {
10788
10788
  id: xf(t),
10789
10789
  duration: 1 / 0,
10790
10790
  closeButton: !0,
@@ -10906,7 +10906,7 @@ function v1({
10906
10906
  /* @__PURE__ */ n(
10907
10907
  "div",
10908
10908
  {
10909
- className: z(
10909
+ className: P(
10910
10910
  "h-full bg-background",
10911
10911
  r ? "overflow-hidden" : "overflow-y-auto overscroll-contain"
10912
10912
  ),
@@ -10917,7 +10917,7 @@ function v1({
10917
10917
  cacheKey: e.cacheKey ?? e.version ?? 0,
10918
10918
  title: o,
10919
10919
  onNeedsFrame: s,
10920
- className: z("block w-full", r && "h-full")
10920
+ className: P("block w-full", r && "h-full")
10921
10921
  }
10922
10922
  )
10923
10923
  }
@@ -10952,7 +10952,7 @@ function kf({
10952
10952
  {
10953
10953
  "aria-label": "paused",
10954
10954
  title: "Paused",
10955
- className: z(
10955
+ className: P(
10956
10956
  "flex shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning",
10957
10957
  r === "avatar" ? "absolute -right-0.5 -top-0.5 size-3.5 ring-2 ring-card" : "size-4 ring-1 ring-inset ring-warning/30",
10958
10958
  s
@@ -10963,7 +10963,7 @@ function kf({
10963
10963
  "span",
10964
10964
  {
10965
10965
  "aria-label": e ? "working" : "idle",
10966
- className: z(
10966
+ className: P(
10967
10967
  "shrink-0 rounded-full",
10968
10968
  r === "avatar" ? "absolute -right-0.5 -top-0.5 size-2.5 ring-2 ring-card" : "size-2",
10969
10969
  e ? vf : wf,
@@ -11120,7 +11120,7 @@ function ol({
11120
11120
  return e.length ? /* @__PURE__ */ n(
11121
11121
  "div",
11122
11122
  {
11123
- className: z(
11123
+ className: P(
11124
11124
  "inline-flex h-8 items-center text-xs font-semibold",
11125
11125
  o ? "gap-0.5" : "rounded-full bg-muted p-0.5",
11126
11126
  i
@@ -11134,7 +11134,7 @@ function ol({
11134
11134
  title: h ? `Connect ${u}` : u,
11135
11135
  "aria-label": h ? `Connect ${u}` : u,
11136
11136
  onClick: () => h ? s == null ? void 0 : s(c) : r(c, { accountId: f, selectorId: m }),
11137
- className: z(
11137
+ className: P(
11138
11138
  "relative flex h-7 w-9 items-center justify-center rounded-full transition",
11139
11139
  b ? o ? (
11140
11140
  // The flat strip has no track of its own, so the selected
@@ -11152,7 +11152,7 @@ function ol({
11152
11152
  {
11153
11153
  src: Zn(c),
11154
11154
  alt: "",
11155
- className: z(
11155
+ className: P(
11156
11156
  "size-5",
11157
11157
  // Greyscale AND dimmed. Most of these marks are strongly
11158
11158
  // branded colour, so opacity alone still read as a live,
@@ -11187,10 +11187,10 @@ function il({
11187
11187
  onRemove: o,
11188
11188
  onToggleHd: i
11189
11189
  }) {
11190
- return e.length ? /* @__PURE__ */ n("div", { className: z("flex gap-1.5 overflow-x-auto pb-0.5", t), children: e.map(({ att: a, locked: l }) => /* @__PURE__ */ d(
11190
+ return e.length ? /* @__PURE__ */ n("div", { className: P("flex gap-1.5 overflow-x-auto pb-0.5", t), children: e.map(({ att: a, locked: l }) => /* @__PURE__ */ d(
11191
11191
  "div",
11192
11192
  {
11193
- className: z(
11193
+ className: P(
11194
11194
  // Wide enough that "96 KB · compressed" and the HD toggle fit on
11195
11195
  // one line next to the thumbnail; the row scrolls horizontally.
11196
11196
  "group relative flex h-12 max-w-64 shrink-0 items-center gap-2 overflow-hidden rounded-lg border bg-muted/55 pl-1.5 pr-1.5 text-xs",
@@ -11225,7 +11225,7 @@ function il({
11225
11225
  "button",
11226
11226
  {
11227
11227
  type: "button",
11228
- className: z(
11228
+ className: P(
11229
11229
  "flex h-6 shrink-0 items-center justify-center rounded-full px-1.5 text-[10px] font-bold tracking-wide disabled:pointer-events-none",
11230
11230
  a.hd || !a.preparing && !(a.original && a.compressed) ? "bg-foreground text-background" : "text-muted-foreground hover:bg-background hover:text-foreground",
11231
11231
  a.preparing && "opacity-40"
@@ -11331,10 +11331,10 @@ function al({
11331
11331
  if (!_.length) return;
11332
11332
  const M = Math.max(0, t - T.current.length);
11333
11333
  if (!M) {
11334
- Se.error("Remove an attachment before adding another.");
11334
+ Ne.error("Remove an attachment before adding another.");
11335
11335
  return;
11336
11336
  }
11337
- _.length > M && Se.error(`Added ${M} of ${_.length} files.`);
11337
+ _.length > M && Ne.error(`Added ${M} of ${_.length} files.`);
11338
11338
  const S = _.slice(0, M).map((E) => {
11339
11339
  const X = E.type.startsWith("image/") ? URL.createObjectURL(E) : void 0;
11340
11340
  return X && f.current.push(X), {
@@ -11767,10 +11767,10 @@ function Mf(e) {
11767
11767
  }
11768
11768
  !j.broken && Y && await new Promise((fe) => {
11769
11769
  let me = !1;
11770
- const Me = () => {
11770
+ const Te = () => {
11771
11771
  me || (me = !0, fe());
11772
11772
  };
11773
- j.finalWaiters.push(Me), setTimeout(Me, 1800);
11773
+ j.finalWaiters.push(Te), setTimeout(Te, 1800);
11774
11774
  });
11775
11775
  }
11776
11776
  const S = Bi(j.committed, j.partial);
@@ -11828,14 +11828,14 @@ function Mf(e) {
11828
11828
  (fe = O.current) == null || fe.call(O, q.current);
11829
11829
  } catch {
11830
11830
  }
11831
- he && Se(he);
11831
+ he && Ne(he);
11832
11832
  };
11833
11833
  let xe = x.current;
11834
11834
  try {
11835
11835
  if (!xe || !xe.getAudioTracks().some((he) => he.readyState === "live")) {
11836
11836
  xe == null || xe.getTracks().forEach((me) => me.stop()), x.current = null;
11837
11837
  const he = navigator.mediaDevices.getUserMedia(q1), Y = window.setTimeout(() => {
11838
- f.current && !p.current && Se("Waiting for the microphone… check for a permission prompt");
11838
+ f.current && !p.current && Ne("Waiting for the microphone… check for a permission prompt");
11839
11839
  }, H1);
11840
11840
  let fe;
11841
11841
  try {
@@ -11845,13 +11845,13 @@ function Mf(e) {
11845
11845
  }
11846
11846
  if (fe === Io || fe === Ss) {
11847
11847
  const me = fe === Io;
11848
- he.then((Me) => {
11848
+ he.then((Te) => {
11849
11849
  const Oe = h.current !== j;
11850
11850
  if (me || Oe || x.current || c.current) {
11851
- Me.getTracks().forEach((se) => se.stop());
11851
+ Te.getTracks().forEach((se) => se.stop());
11852
11852
  return;
11853
11853
  }
11854
- x.current = Me, T();
11854
+ x.current = Te, T();
11855
11855
  }).catch(() => {
11856
11856
  }), J(
11857
11857
  fe === Ss ? "Microphone didn't respond — check for a blocked permission prompt" : void 0
@@ -11890,13 +11890,13 @@ function Mf(e) {
11890
11890
  } catch {
11891
11891
  Y = new he();
11892
11892
  }
11893
- const fe = Y.createMediaStreamSource(xe), me = Y.createScriptProcessor(4096, 1, 1), Me = [], Oe = location.protocol === "https:" ? "wss:" : "ws:";
11893
+ const fe = Y.createMediaStreamSource(xe), me = Y.createScriptProcessor(4096, 1, 1), Te = [], Oe = location.protocol === "https:" ? "wss:" : "ws:";
11894
11894
  let se = null;
11895
- const Te = m.current;
11895
+ const _e = m.current;
11896
11896
  try {
11897
- if (Te) {
11898
- const re = await Te.getToken();
11899
- re && (se = new WebSocket(Te.url, [`vibes-bearer.${re}`]));
11897
+ if (_e) {
11898
+ const re = await _e.getToken();
11899
+ re && (se = new WebSocket(_e.url, [`vibes-bearer.${re}`]));
11900
11900
  }
11901
11901
  se || (se = new WebSocket(`${Oe}//${location.host}/api/voice/stt-stream`)), se.binaryType = "arraybuffer";
11902
11902
  } catch {
@@ -11944,10 +11944,10 @@ function Mf(e) {
11944
11944
  re.finalWaiters = [];
11945
11945
  for (const be of V) be();
11946
11946
  });
11947
- let Ne = !1, je = Date.now();
11947
+ let Se = !1, je = Date.now();
11948
11948
  me.onaudioprocess = (re) => {
11949
11949
  const V = re.inputBuffer.getChannelData(0);
11950
- Me.push(new Float32Array(V));
11950
+ Te.push(new Float32Array(V));
11951
11951
  let be = 0;
11952
11952
  for (let We = 0; We < V.length; We++) be += V[We] * V[We];
11953
11953
  const He = Math.sqrt(be / V.length);
@@ -11963,17 +11963,17 @@ function Mf(e) {
11963
11963
  }
11964
11964
  else de.ws.readyState === WebSocket.CONNECTING && de.pending.push(We);
11965
11965
  }
11966
- k.current && He > j1 && (Ne = !0, je = Date.now());
11966
+ k.current && He > j1 && (Se = !0, je = Date.now());
11967
11967
  };
11968
11968
  const Ke = pe && k.current ? setInterval(() => {
11969
- !c.current || !Ne || Date.now() - je >= ce && L(!0);
11969
+ !c.current || !Se || Date.now() - je >= ce && L(!0);
11970
11970
  }, 200) : null;
11971
11971
  c.current = {
11972
11972
  ac: Y,
11973
11973
  stream: xe,
11974
11974
  proc: me,
11975
11975
  src: fe,
11976
- chunks: Me,
11976
+ chunks: Te,
11977
11977
  rate: Y.sampleRate,
11978
11978
  vad: Ke,
11979
11979
  ws: se,
@@ -12173,7 +12173,7 @@ const pi = Jo(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12173
12173
  j ? pe ? "Transcribes after you stop · X or Esc to cancel" : "Tap to dictate · transcript appears after you stop" : pe ? "Tap to send · X or Esc to cancel" : "Tap to dictate · hold to talk"
12174
12174
  ),
12175
12175
  style: $,
12176
- className: z(
12176
+ className: P(
12177
12177
  "flex shrink-0 touch-none select-none items-center justify-center rounded-full transition",
12178
12178
  pe ? q ? "z-10 bg-muted-foreground text-background" : "z-10 bg-destructive text-destructive-foreground" : c ? "relative z-10 bg-transparent text-muted-foreground hover:bg-transparent hover:text-foreground" : "text-muted-foreground hover:bg-muted",
12179
12179
  l
@@ -12297,7 +12297,7 @@ function G1({
12297
12297
  "aria-label": oe ? F ? "Release to cancel voice message" : "Release to send voice message — drag away, or press Esc, to cancel" : e ? "Steer — hold to queue" : "Hold to talk",
12298
12298
  title: oe ? "Release to send · drag away or Esc to cancel" : e ? "Tap to steer · hold (or ⌘/Ctrl+Enter) to queue" : "Hold to talk",
12299
12299
  style: j,
12300
- className: z(
12300
+ className: P(
12301
12301
  "flex shrink-0 touch-none select-none items-center justify-center rounded-full font-semibold transition active:scale-[0.97]",
12302
12302
  oe ? F ? "z-10 bg-muted-foreground text-background" : "z-10 bg-destructive text-destructive-foreground" : "relative z-10 bg-foreground/[0.08] text-foreground/80 shadow-sm hover:bg-foreground/[0.12] hover:text-foreground",
12303
12303
  pe && "opacity-50",
@@ -12548,7 +12548,7 @@ function sk(e, t) {
12548
12548
  (Oe) => Xs(Oe) && Oe.id === E.id
12549
12549
  ), fe = E.reset ? E.text ?? E.delta ?? "" : `${(Y == null ? void 0 : Y.text) ?? ""}${E.delta ?? ""}`;
12550
12550
  if (!fe) return xe;
12551
- const me = (Y == null ? void 0 : Y.catchUp) ?? (J && !!E.reset && fe.length > r1), Me = {
12551
+ const me = (Y == null ? void 0 : Y.catchUp) ?? (J && !!E.reset && fe.length > r1), Te = {
12552
12552
  id: E.id,
12553
12553
  role: "assistant",
12554
12554
  kind: "text",
@@ -12560,7 +12560,7 @@ function sk(e, t) {
12560
12560
  ...xe,
12561
12561
  [S]: [
12562
12562
  ...he.filter((Oe) => Oe.kind !== "thinking" && Oe.id !== E.id),
12563
- Me
12563
+ Te
12564
12564
  ].slice(-80)
12565
12565
  };
12566
12566
  });
@@ -12748,21 +12748,21 @@ function ok({ user: e }) {
12748
12748
  o(!0);
12749
12749
  try {
12750
12750
  if (t)
12751
- await _v(), r(!1), Se("Notifications off");
12751
+ await _v(), r(!1), Ne("Notifications off");
12752
12752
  else {
12753
12753
  if (xv() === "denied") {
12754
- Se.error("Notifications are blocked in your browser settings");
12754
+ Ne.error("Notifications are blocked in your browser settings");
12755
12755
  return;
12756
12756
  }
12757
12757
  if (!e) {
12758
- Se.error("Pick your user in the top filter first, so notifications only show yours");
12758
+ Ne.error("Pick your user in the top filter first, so notifications only show yours");
12759
12759
  return;
12760
12760
  }
12761
12761
  const l = await Tv(e);
12762
- r(l), Se(l ? "Notifications on" : "Notifications permission dismissed");
12762
+ r(l), Ne(l ? "Notifications on" : "Notifications permission dismissed");
12763
12763
  }
12764
12764
  } catch (l) {
12765
- Se.error(l instanceof Error ? l.message : "Could not change notifications");
12765
+ Ne.error(l instanceof Error ? l.message : "Could not change notifications");
12766
12766
  } finally {
12767
12767
  o(!1);
12768
12768
  }
@@ -12794,7 +12794,7 @@ function lk() {
12794
12794
  if (r || !i) return;
12795
12795
  const a = Date.now(), l = (x, y, w, T) => {
12796
12796
  const C = e.current[x] ?? 0;
12797
- e.current[x] = y, !(y === 0 || y <= C) && (a - (t.current[x] ?? 0) < ak || (t.current[x] = a, (y >= 2 ? Se.error : Se.warning)(w, { description: T })));
12797
+ e.current[x] = y, !(y === 0 || y <= C) && (a - (t.current[x] ?? 0) < ak || (t.current[x] = a, (y >= 2 ? Ne.error : Ne.warning)(w, { description: T })));
12798
12798
  }, c = ((p = (f = i.pressure) == null ? void 0 : f.memory) == null ? void 0 : p.some10) ?? 0;
12799
12799
  l(
12800
12800
  "psiMem",
@@ -12848,8 +12848,8 @@ function ck() {
12848
12848
  return window.addEventListener(Bs, g), () => window.removeEventListener(Bs, g);
12849
12849
  }, []), U(() => Jw(), []);
12850
12850
  const s = R(null), o = R(null), [i, a] = v(null), [l, c] = v(null), u = ne((g) => {
12851
- a((P) => {
12852
- if (!P)
12851
+ a((z) => {
12852
+ if (!z)
12853
12853
  try {
12854
12854
  window.history.pushState({ omgArtifactViewer: !0 }, "");
12855
12855
  } catch {
@@ -12876,13 +12876,13 @@ function ck() {
12876
12876
  if (!w) return;
12877
12877
  const g = () => {
12878
12878
  document.visibilityState === "visible" && vb(document.getAnimations());
12879
- }, P = (ge) => {
12879
+ }, z = (ge) => {
12880
12880
  ge.source !== window.parent || !yb(ge.data) || g();
12881
12881
  }, B = () => {
12882
12882
  document.visibilityState === "visible" && g();
12883
12883
  };
12884
- return window.addEventListener("message", P), window.addEventListener("pageshow", g), window.addEventListener("focus", g), document.addEventListener("visibilitychange", B), () => {
12885
- window.removeEventListener("message", P), window.removeEventListener("pageshow", g), window.removeEventListener("focus", g), document.removeEventListener("visibilitychange", B);
12884
+ return window.addEventListener("message", z), window.addEventListener("pageshow", g), window.addEventListener("focus", g), document.addEventListener("visibilitychange", B), () => {
12885
+ window.removeEventListener("message", z), window.removeEventListener("pageshow", g), window.removeEventListener("focus", g), document.removeEventListener("visibilitychange", B);
12886
12886
  };
12887
12887
  }, [w]);
12888
12888
  const F = mo(), q = $f(), [ce, H] = v(null);
@@ -12892,29 +12892,29 @@ function ck() {
12892
12892
  document.documentElement.style.removeProperty("--lfg-mobile-header-height");
12893
12893
  return;
12894
12894
  }
12895
- const P = () => {
12895
+ const z = () => {
12896
12896
  document.documentElement.style.setProperty(
12897
12897
  "--lfg-mobile-header-height",
12898
12898
  `${Math.ceil(g.getBoundingClientRect().height)}px`
12899
12899
  );
12900
12900
  };
12901
- P();
12902
- const B = new ResizeObserver(P);
12903
- return B.observe(g), window.addEventListener("resize", P), () => {
12904
- B.disconnect(), window.removeEventListener("resize", P), document.documentElement.style.removeProperty("--lfg-mobile-header-height");
12901
+ z();
12902
+ const B = new ResizeObserver(z);
12903
+ return B.observe(g), window.addEventListener("resize", z), () => {
12904
+ B.disconnect(), window.removeEventListener("resize", z), document.documentElement.style.removeProperty("--lfg-mobile-header-height");
12905
12905
  };
12906
12906
  }, [F, ce]), U(() => {
12907
- const g = o.current, P = ce, B = s.current;
12908
- if (!F || !g || !P || !B) return;
12907
+ const g = o.current, z = ce, B = s.current;
12908
+ if (!F || !g || !z || !B) return;
12909
12909
  let ge = 0;
12910
- const Ee = () => {
12910
+ const Me = () => {
12911
12911
  ge || (ge = requestAnimationFrame(() => {
12912
12912
  ge = 0;
12913
12913
  const et = Math.min(1, Math.max(0, g.scrollTop) / 24), ut = Math.max(
12914
12914
  0,
12915
12915
  g.scrollHeight - g.clientHeight - g.scrollTop
12916
12916
  ), ft = Math.min(1, ut / 24);
12917
- P.style.setProperty(
12917
+ z.style.setProperty(
12918
12918
  "--lfg-mobile-header-fade-opacity",
12919
12919
  String(et)
12920
12920
  ), B.style.setProperty(
@@ -12923,33 +12923,33 @@ function ck() {
12923
12923
  );
12924
12924
  }));
12925
12925
  };
12926
- Ee(), g.addEventListener("scroll", Ee, { passive: !0 }), window.addEventListener("resize", Ee);
12927
- const Pe = new ResizeObserver(Ee);
12926
+ Me(), g.addEventListener("scroll", Me, { passive: !0 }), window.addEventListener("resize", Me);
12927
+ const Pe = new ResizeObserver(Me);
12928
12928
  Pe.observe(g);
12929
12929
  for (const et of g.children) Pe.observe(et);
12930
12930
  const Xe = new MutationObserver(() => {
12931
12931
  for (const et of g.children) Pe.observe(et);
12932
- Ee();
12932
+ Me();
12933
12933
  });
12934
12934
  return Xe.observe(g, { childList: !0, subtree: !0, characterData: !0 }), () => {
12935
- g.removeEventListener("scroll", Ee), window.removeEventListener("resize", Ee), Pe.disconnect(), Xe.disconnect(), ge && cancelAnimationFrame(ge), P.style.removeProperty("--lfg-mobile-header-fade-opacity"), B.style.removeProperty("--lfg-mobile-composer-fade-opacity");
12935
+ g.removeEventListener("scroll", Me), window.removeEventListener("resize", Me), Pe.disconnect(), Xe.disconnect(), ge && cancelAnimationFrame(ge), z.style.removeProperty("--lfg-mobile-header-fade-opacity"), B.style.removeProperty("--lfg-mobile-composer-fade-opacity");
12936
12936
  };
12937
12937
  }, [F, ce]);
12938
12938
  const [L, Z] = v(!1), [Q, K] = v([]), [oe, ie] = v(null), [pe, j] = v(null), [$, _] = v(null), [M, S] = v(null), [E, X] = v(!1), J = R(!1), [xe, he] = v(), [Y, fe] = v(
12939
12939
  () => Vr()
12940
- ), [me, Me] = v([]), [Oe, se] = v([]), Te = R(
12940
+ ), [me, Te] = v([]), [Oe, se] = v([]), _e = R(
12941
12941
  /* @__PURE__ */ new Map()
12942
- ), Ne = R(0), je = R(/* @__PURE__ */ new Map()), Ke = R(0), Ze = R(0), ae = R(/* @__PURE__ */ new Map()), [re, V] = v([]), [be, He] = v(null), [de, We] = v(!1), [I, ue] = v("unknown"), [A, W] = v([]), [ye, ze] = v(!0), [Re, $e] = v(null), [Ue, qe] = v(!1), [Ye, ee] = v(!1), [ve, Fe] = v(null), [De, st] = v(0), kt = Dm(), _t = jm({ select: (g) => g.location.pathname }), le = Vm(_t), yt = le === "term" || l !== null, gt = R(le);
12942
+ ), Se = R(0), je = R(/* @__PURE__ */ new Map()), Ke = R(0), Ze = R(0), ae = R(/* @__PURE__ */ new Map()), [re, V] = v([]), [be, He] = v(null), [de, We] = v(!1), [I, ue] = v("unknown"), [A, W] = v([]), [ye, ze] = v(!0), [Re, $e] = v(null), [Ue, qe] = v(!1), [Ye, ee] = v(!1), [ve, Fe] = v(null), [De, st] = v(0), kt = Dm(), _t = jm({ select: (g) => g.location.pathname }), le = Vm(_t), yt = le === "term" || l !== null, gt = R(le);
12943
12943
  gt.current = le;
12944
12944
  const Ge = ne(
12945
12945
  (g) => {
12946
- const P = typeof g == "function" ? g(gt.current) : g;
12947
- if (!Gm(gt.current, P)) return;
12946
+ const z = typeof g == "function" ? g(gt.current) : g;
12947
+ if (!Gm(gt.current, z)) return;
12948
12948
  const B = (ge) => ({
12949
12949
  ...ge.embed ? { embed: ge.embed } : {},
12950
12950
  ...ge.embedOrigin ? { embedOrigin: ge.embedOrigin } : {}
12951
12951
  });
12952
- kt(P === ei ? { to: "/", search: B } : { to: "/$tab", params: { tab: P }, search: B });
12952
+ kt(z === ei ? { to: "/", search: B } : { to: "/$tab", params: { tab: z }, search: B });
12953
12953
  },
12954
12954
  [kt]
12955
12955
  ), Rt = gv(), lt = ne(() => Ge("notifications"), [Ge]), [Et, tn] = v(() => O), [wt, jt] = v(!1), [gn, Gt] = v(!1);
@@ -12957,7 +12957,7 @@ function ck() {
12957
12957
  le === "live" && tn(!0), le === "notifications" && jt(!0), le === "artifacts" && Gt(!0);
12958
12958
  }, [le]), U(() => {
12959
12959
  if (ye) return;
12960
- const g = globalThis.requestIdleCallback, P = () => {
12960
+ const g = globalThis.requestIdleCallback, z = () => {
12961
12961
  Ls(Vs) || oi(), Ls(cc) || ke(
12962
12962
  `/api/artifacts?limit=${R0}&kind=html`,
12963
12963
  { cache: "no-store" }
@@ -12971,13 +12971,13 @@ function ck() {
12971
12971
  });
12972
12972
  };
12973
12973
  if (typeof g == "function") {
12974
- const ge = g(P, { timeout: 4e3 });
12974
+ const ge = g(z, { timeout: 4e3 });
12975
12975
  return () => {
12976
- const Ee = globalThis.cancelIdleCallback;
12977
- typeof Ee == "function" && Ee(ge);
12976
+ const Me = globalThis.cancelIdleCallback;
12977
+ typeof Me == "function" && Me(ge);
12978
12978
  };
12979
12979
  }
12980
- const B = window.setTimeout(P, 800);
12980
+ const B = window.setTimeout(z, 800);
12981
12981
  return () => window.clearTimeout(B);
12982
12982
  }, [ye]);
12983
12983
  const [It, bn] = v([]), [un, On] = v(!1), [Ln, dr] = v({
@@ -13003,19 +13003,19 @@ function ck() {
13003
13003
  const g = window.setTimeout(() => bt(!1), 2e3);
13004
13004
  return () => window.clearTimeout(g);
13005
13005
  }, [ye]), U(() => {
13006
- const g = window.visualViewport, P = () => {
13006
+ const g = window.visualViewport, z = () => {
13007
13007
  const mt = s.current;
13008
13008
  mt && (mt.style.height = "", mt.style.transform = ""), document.documentElement.style.removeProperty("--lfg-app-height"), document.documentElement.classList.remove("lfg-keyboard-open"), document.documentElement.style.removeProperty("--lfg-keyboard-height"), document.documentElement.style.removeProperty("--lfg-visual-offset-top"), document.documentElement.style.removeProperty("--lfg-visual-height"), Z(!1);
13009
13009
  };
13010
13010
  if (!g) {
13011
- P();
13011
+ z();
13012
13012
  return;
13013
13013
  }
13014
13014
  const B = () => {
13015
13015
  const mt = ai();
13016
13016
  return !mt || mt === document.body || mt === document.documentElement ? !1 : Cr(mt);
13017
13017
  };
13018
- let ge = !1, Ee = 0;
13018
+ let ge = !1, Me = 0;
13019
13019
  const Pe = /* @__PURE__ */ new Set(), Xe = (mt, Lt) => {
13020
13020
  const Qt = window.setTimeout(() => {
13021
13021
  Pe.delete(Qt), ge || mt();
@@ -13024,7 +13024,7 @@ function ck() {
13024
13024
  }, et = () => {
13025
13025
  if (ge) return;
13026
13026
  const mt = window.innerHeight || 0, Lt = g.scale && g.scale > 0 ? g.scale : 1, Qt = Math.min(g.height * Lt, mt + 120), qn = Math.max(0, mt - Qt), En = qn > 120, In = En && B(), ms = En && !In;
13027
- ms ? Ee < 10 && (Ee += 1, Xe(et, 150)) : Ee = 0;
13027
+ ms ? Me < 10 && (Me += 1, Xe(et, 150)) : Me = 0;
13028
13028
  const Ur = s.current, _m = Math.ceil(ms ? mt : Qt), Ll = Math.max(
13029
13029
  0,
13030
13030
  Math.round(
@@ -13044,7 +13044,7 @@ function ck() {
13044
13044
  };
13045
13045
  et(), g.addEventListener("resize", et, { passive: !0 }), g.addEventListener("scroll", et, { passive: !0 });
13046
13046
  const ut = () => {
13047
- Ee = 0, et(), requestAnimationFrame(et), requestAnimationFrame(() => requestAnimationFrame(et));
13047
+ Me = 0, et(), requestAnimationFrame(et), requestAnimationFrame(() => requestAnimationFrame(et));
13048
13048
  for (const mt of [80, 250, 750, 1500, 2500]) Xe(et, mt);
13049
13049
  }, ft = () => {
13050
13050
  document.visibilityState === "visible" && ut();
@@ -13052,64 +13052,64 @@ function ck() {
13052
13052
  return window.addEventListener("pageshow", ut), window.addEventListener("focus", ut), window.addEventListener("resize", ut, { passive: !0 }), window.addEventListener("orientationchange", ut, { passive: !0 }), window.addEventListener("pointerdown", et, { passive: !0, capture: !0 }), document.addEventListener("visibilitychange", ft), () => {
13053
13053
  ge = !0;
13054
13054
  for (const mt of Pe) window.clearTimeout(mt);
13055
- Pe.clear(), g.removeEventListener("resize", et), g.removeEventListener("scroll", et), window.removeEventListener("pageshow", ut), window.removeEventListener("focus", ut), window.removeEventListener("resize", ut), window.removeEventListener("orientationchange", ut), window.removeEventListener("pointerdown", et, { capture: !0 }), document.removeEventListener("visibilitychange", ft), P();
13055
+ Pe.clear(), g.removeEventListener("resize", et), g.removeEventListener("scroll", et), window.removeEventListener("pageshow", ut), window.removeEventListener("focus", ut), window.removeEventListener("resize", ut), window.removeEventListener("orientationchange", ut), window.removeEventListener("pointerdown", et, { capture: !0 }), document.removeEventListener("visibilitychange", ft), z();
13056
13056
  };
13057
13057
  }, [T, F, ye, le, yt]);
13058
13058
  const ct = ne(async () => {
13059
- var B, ge, Ee, Pe, Xe, et, ut;
13059
+ var B, ge, Me, Pe, Xe, et, ut;
13060
13060
  const g = await zy();
13061
13061
  ue(g.version || "unknown"), He(g.onboarding ?? null), !w && g.onboarding && !g.onboarding.completedAt && !((B = g.users) != null && B.length) && !((ge = g.sessions) != null && ge.length) && We(!0), On(!!g.computer), K(g.codingAgents ?? []), fe(Vr(g.models)), dr(g.settings ?? {
13062
- timeZone: ((Ee = g.auto) == null ? void 0 : Ee.tz) ?? vr,
13062
+ timeZone: ((Me = g.auto) == null ? void 0 : Me.tz) ?? vr,
13063
13063
  maxLiveAgents: 16,
13064
13064
  agentsPaused: !1,
13065
13065
  idleAgentArchiveMinutes: 0,
13066
13066
  transcriptView: "full",
13067
13067
  skippedUpdateVersion: ""
13068
13068
  }), se(g.sessions ?? []), V(g.users ?? []), W(g.repos ?? []), bn(((Pe = g.auto) == null ? void 0 : Pe.agents) ?? []), te(((Xe = g.settings) == null ? void 0 : Xe.timeZone) ?? ((et = g.auto) == null ? void 0 : et.tz) ?? vr);
13069
- const P = ((ut = g.auto) == null ? void 0 : ut.findings) ?? [];
13070
- ht(P), P.forEach((ft) => Qe.current.add(ft.id)), Tn.current = !0, $e(null);
13069
+ const z = ((ut = g.auto) == null ? void 0 : ut.findings) ?? [];
13070
+ ht(z), z.forEach((ft) => Qe.current.add(ft.id)), Tn.current = !0, $e(null);
13071
13071
  }, [w]), [zt, ot] = v(() => /* @__PURE__ */ new Set()), Tt = ne((g) => {
13072
- ot((P) => {
13073
- if (P.has(g)) return P;
13074
- const B = new Set(P);
13072
+ ot((z) => {
13073
+ if (z.has(g)) return z;
13074
+ const B = new Set(z);
13075
13075
  return B.add(g), B;
13076
- }), se((P) => P.filter((B) => B.sessionId !== g));
13076
+ }), se((z) => z.filter((B) => B.sessionId !== g));
13077
13077
  }, []), Pt = ne((g) => {
13078
- Qn((P) => {
13079
- if (P.has(g)) return P;
13080
- const B = new Set(P);
13078
+ Qn((z) => {
13079
+ if (z.has(g)) return z;
13080
+ const B = new Set(z);
13081
13081
  return B.add(g), B;
13082
13082
  });
13083
13083
  }, []), Wt = ne((g) => {
13084
- Qn((P) => {
13085
- if (!P.has(g)) return P;
13086
- const B = new Set(P);
13084
+ Qn((z) => {
13085
+ if (!z.has(g)) return z;
13086
+ const B = new Set(z);
13087
13087
  return B.delete(g), B;
13088
13088
  });
13089
13089
  }, []), on = Le(
13090
13090
  () => we.filter((g) => !Ut.has(g.id)),
13091
13091
  [we, Ut]
13092
13092
  ), At = ne(async () => {
13093
- const [g, P] = await Promise.all([
13093
+ const [g, z] = await Promise.all([
13094
13094
  ke("/api/auto/agents"),
13095
13095
  ke("/api/auto/findings?status=open")
13096
- ]), B = P.findings ?? [];
13096
+ ]), B = z.findings ?? [];
13097
13097
  if (bn(g.agents ?? []), g.tz && te(g.tz), ht(B), !Tn.current) {
13098
- B.forEach((Ee) => Qe.current.add(Ee.id)), Tn.current = !0;
13098
+ B.forEach((Me) => Qe.current.add(Me.id)), Tn.current = !0;
13099
13099
  return;
13100
13100
  }
13101
- const ge = new Map((g.agents ?? []).map((Ee) => [Ee.id, Ee.name]));
13102
- for (const Ee of B) {
13103
- if (Qe.current.has(Ee.id)) continue;
13104
- Qe.current.add(Ee.id), Pt(Ee.id);
13105
- const Pe = ge.get(Ee.agentId) ?? Ee.agentId;
13106
- Se.custom(
13101
+ const ge = new Map((g.agents ?? []).map((Me) => [Me.id, Me.name]));
13102
+ for (const Me of B) {
13103
+ if (Qe.current.has(Me.id)) continue;
13104
+ Qe.current.add(Me.id), Pt(Me.id);
13105
+ const Pe = ge.get(Me.agentId) ?? Me.agentId;
13106
+ Ne.custom(
13107
13107
  (Xe) => /* @__PURE__ */ d(
13108
13108
  "button",
13109
13109
  {
13110
13110
  type: "button",
13111
13111
  onClick: () => {
13112
- Ge("live"), Kt(Ee), Wt(Ee.id), Se.dismiss(Xe);
13112
+ Ge("live"), Kt(Me), Wt(Me.id), Ne.dismiss(Xe);
13113
13113
  },
13114
13114
  className: "pointer-events-auto flex w-full min-w-0 items-center gap-2.5 text-left",
13115
13115
  children: [
@@ -13119,7 +13119,7 @@ function ck() {
13119
13119
  Pe,
13120
13120
  " responded"
13121
13121
  ] }),
13122
- /* @__PURE__ */ n("span", { className: "block truncate text-[12px] leading-snug text-muted-foreground", children: Ee.title })
13122
+ /* @__PURE__ */ n("span", { className: "block truncate text-[12px] leading-snug text-muted-foreground", children: Me.title })
13123
13123
  ] }),
13124
13124
  /* @__PURE__ */ n("span", { className: "shrink-0 rounded-lg bg-primary px-2.5 py-1 text-[12px] font-medium text-white", children: "View" })
13125
13125
  ]
@@ -13128,26 +13128,26 @@ function ck() {
13128
13128
  {
13129
13129
  duration: 6500,
13130
13130
  className: "lfg-finding-toast",
13131
- onDismiss: () => Wt(Ee.id),
13132
- onAutoClose: () => Wt(Ee.id)
13131
+ onDismiss: () => Wt(Me.id),
13132
+ onAutoClose: () => Wt(Me.id)
13133
13133
  }
13134
13134
  );
13135
13135
  }
13136
13136
  }, [Pt, Wt]), Ot = ne(async (g) => {
13137
- const P = ae.current, B = g == null ? void 0 : g.seed;
13138
- B != null && B.sessionId && (P.set(B.sessionId, { session: B, at: Date.now() }), se(
13137
+ const z = ae.current, B = g == null ? void 0 : g.seed;
13138
+ B != null && B.sessionId && (z.set(B.sessionId, { session: B, at: Date.now() }), se(
13139
13139
  (ft) => ft.some((mt) => mt.sessionId === B.sessionId) ? ft : [...ft, B]
13140
13140
  ));
13141
- const ge = ++Ke.current, Ee = await ke("/api/sessions");
13141
+ const ge = ++Ke.current, Me = await ke("/api/sessions");
13142
13142
  if (ge < Ze.current) return;
13143
13143
  Ze.current = ge;
13144
- const Pe = Te.current, Xe = (Ee.sessions ?? []).map((ft) => {
13144
+ const Pe = _e.current, Xe = (Me.sessions ?? []).map((ft) => {
13145
13145
  const mt = ft.sessionId, Lt = mt ? Pe.get(mt) : void 0;
13146
13146
  return !mt || !Lt ? ft : Lt.persistedAfterFetch !== null && ge > Lt.persistedAfterFetch && (Lt.confirmedAt ?? (Lt.confirmedAt = Date.now()), Date.now() - Lt.confirmedAt >= 1e4) ? (Pe.delete(mt), ft) : { ...ft, title: Lt.title };
13147
13147
  }), et = new Set(Xe.map((ft) => ft.sessionId)), ut = Date.now();
13148
- for (const [ft, mt] of P) {
13148
+ for (const [ft, mt] of z) {
13149
13149
  if (et.has(ft) || ut - mt.at > nk) {
13150
- P.delete(ft);
13150
+ z.delete(ft);
13151
13151
  continue;
13152
13152
  }
13153
13153
  Xe.push(mt.session);
@@ -13158,9 +13158,9 @@ function ck() {
13158
13158
  return Lt.size === ft.size ? ft : Lt;
13159
13159
  });
13160
13160
  }, []), vt = ne(
13161
- async (g, P) => {
13162
- const B = P.trim().slice(0, 200), ge = ++Ne.current;
13163
- Te.current.set(g, {
13161
+ async (g, z) => {
13162
+ const B = z.trim().slice(0, 200), ge = ++Se.current;
13163
+ _e.current.set(g, {
13164
13164
  revision: ge,
13165
13165
  title: B,
13166
13166
  persistedAfterFetch: null,
@@ -13173,16 +13173,16 @@ function ck() {
13173
13173
  const Pe = (je.current.get(g) ?? Promise.resolve()).catch(() => {
13174
13174
  }).then(async () => {
13175
13175
  await k1(g, B);
13176
- const Xe = Te.current.get(g);
13176
+ const Xe = _e.current.get(g);
13177
13177
  (Xe == null ? void 0 : Xe.revision) === ge && (Xe.persistedAfterFetch = Ke.current, await Ot());
13178
13178
  });
13179
13179
  je.current.set(g, Pe);
13180
13180
  try {
13181
13181
  await Pe;
13182
13182
  } catch (Xe) {
13183
- const et = Te.current.get(g);
13183
+ const et = _e.current.get(g);
13184
13184
  if ((et == null ? void 0 : et.revision) !== ge) return;
13185
- throw Te.current.delete(g), await Ot().catch(() => {
13185
+ throw _e.current.delete(g), await Ot().catch(() => {
13186
13186
  }), Xe;
13187
13187
  } finally {
13188
13188
  je.current.get(g) === Pe && je.current.delete(g);
@@ -13192,8 +13192,8 @@ function ck() {
13192
13192
  );
13193
13193
  U(() => {
13194
13194
  let g = !1;
13195
- return ze(!0), ct().catch((P) => {
13196
- g || $e(P instanceof Error ? P.message : String(P));
13195
+ return ze(!0), ct().catch((z) => {
13196
+ g || $e(z instanceof Error ? z.message : String(z));
13197
13197
  }).finally(() => {
13198
13198
  g || ze(!1);
13199
13199
  }), () => {
@@ -13201,42 +13201,42 @@ function ck() {
13201
13201
  };
13202
13202
  }, [ct]), U(() => {
13203
13203
  if (ye || le !== "coding-agents") return;
13204
- let g = !1, P = null;
13204
+ let g = !1, z = null;
13205
13205
  const B = requestAnimationFrame(() => {
13206
- P = window.setTimeout(() => {
13206
+ z = window.setTimeout(() => {
13207
13207
  ke("/api/setup/checks").then((ge) => {
13208
- g || Me(ge.checks ?? []);
13208
+ g || Te(ge.checks ?? []);
13209
13209
  }).catch(() => {
13210
- g || Me([]);
13210
+ g || Te([]);
13211
13211
  });
13212
13212
  }, 0);
13213
13213
  });
13214
13214
  return () => {
13215
- g = !0, cancelAnimationFrame(B), P !== null && window.clearTimeout(P);
13215
+ g = !0, cancelAnimationFrame(B), z !== null && window.clearTimeout(z);
13216
13216
  };
13217
13217
  }, [ye, le]), U(() => {
13218
13218
  let g = null;
13219
- const P = () => {
13219
+ const z = () => {
13220
13220
  Ot().catch(() => {
13221
13221
  }), At().catch(() => {
13222
13222
  });
13223
13223
  }, B = () => {
13224
- g === null && (g = window.setInterval(P, 5e3));
13224
+ g === null && (g = window.setInterval(z, 5e3));
13225
13225
  }, ge = () => {
13226
13226
  g !== null && (window.clearInterval(g), g = null);
13227
- }, Ee = () => {
13227
+ }, Me = () => {
13228
13228
  if (document.hidden) {
13229
13229
  ge();
13230
13230
  return;
13231
13231
  }
13232
- P(), B();
13232
+ z(), B();
13233
13233
  };
13234
- return document.hidden || B(), document.addEventListener("visibilitychange", Ee), () => {
13235
- ge(), document.removeEventListener("visibilitychange", Ee);
13234
+ return document.hidden || B(), document.addEventListener("visibilitychange", Me), () => {
13235
+ ge(), document.removeEventListener("visibilitychange", Me);
13236
13236
  };
13237
13237
  }, [Ot, At]), U(() => {
13238
13238
  const g = () => {
13239
- ke("/api/users").then((P) => V(P.users ?? [])).catch(() => {
13239
+ ke("/api/users").then((z) => V(z.users ?? [])).catch(() => {
13240
13240
  });
13241
13241
  };
13242
13242
  return window.addEventListener("focus", g), () => window.removeEventListener("focus", g);
@@ -13247,17 +13247,17 @@ function ck() {
13247
13247
  return;
13248
13248
  }
13249
13249
  if (er.current || !re.length || (er.current = !0, w || y.current || O)) return;
13250
- const g = re.some((Ee) => Ee.email === Ae);
13250
+ const g = re.some((Me) => Me.email === Ae);
13251
13251
  if (Ae === "__unassigned" || g) return;
13252
- const P = localStorage.getItem("lfg_user"), B = P && re.some((Ee) => Ee.email === P) ? P : (ge = re[0]) == null ? void 0 : ge.email;
13252
+ const z = localStorage.getItem("lfg_user"), B = z && re.some((Me) => Me.email === z) ? z : (ge = re[0]) == null ? void 0 : ge.email;
13253
13253
  B && Xt(B);
13254
13254
  }, [re, Ae, w, O]), U(() => {
13255
- var P;
13255
+ var z;
13256
13256
  if (!re.length) {
13257
13257
  Ae !== "__all" && Ae !== "__unassigned" && Xt("__all");
13258
13258
  return;
13259
13259
  }
13260
- Ae === "__all" || Ae === "__unassigned" || re.some((B) => B.email === Ae) || Xt(((P = re[0]) == null ? void 0 : P.email) ?? "__all");
13260
+ Ae === "__all" || Ae === "__unassigned" || re.some((B) => B.email === Ae) || Xt(((z = re[0]) == null ? void 0 : z.email) ?? "__all");
13261
13261
  }, [Ae, re]), U(() => {
13262
13262
  w || Oi() || localStorage.setItem("lfg_v2_user_filter", Ae);
13263
13263
  }, [Ae, w]), U(() => {
@@ -13272,7 +13272,7 @@ function ck() {
13272
13272
  // AI-SDK sessions are fetched from /api/sessions and then hidden here.
13273
13273
  lr(g) && !zt.has(g.sessionId)
13274
13274
  ).sort(
13275
- (g, P) => (g.startedAt ?? 0) - (P.startedAt ?? 0) || (g.sessionId ?? "").localeCompare(P.sessionId ?? "")
13275
+ (g, z) => (g.startedAt ?? 0) - (z.startedAt ?? 0) || (g.sessionId ?? "").localeCompare(z.sessionId ?? "")
13276
13276
  ),
13277
13277
  [Oe, zt, un]
13278
13278
  ), Mt = Le(() => Ae === "__all" ? tt : Ae === "__unassigned" ? tt.filter((g) => !g.assignedUser) : tt.filter((g) => g.assignedUser === Ae), [tt, Ae]), nt = Le(
@@ -13282,7 +13282,7 @@ function ck() {
13282
13282
  ...It.map((g) => Ui(g, A)),
13283
13283
  ...Mt.map((g) => g.project).filter((g) => !!g)
13284
13284
  ])
13285
- ).sort((g, P) => Jn(g).localeCompare(Jn(P))),
13285
+ ).sort((g, z) => Jn(g).localeCompare(Jn(z))),
13286
13286
  [It, A, Mt]
13287
13287
  ), it = Le(
13288
13288
  () => nt,
@@ -13297,19 +13297,19 @@ function ck() {
13297
13297
  }, [O, le, Ge]);
13298
13298
  const xn = Le(() => at === "__all" ? It : It.filter((g) => Ui(g, A) === at), [It, at, A]), jr = Le(() => {
13299
13299
  if (at === "__all") return on;
13300
- const g = new Set(xn.map((P) => P.id));
13301
- return on.filter((P) => g.has(P.agentId));
13300
+ const g = new Set(xn.map((z) => z.id));
13301
+ return on.filter((z) => g.has(z.agentId));
13302
13302
  }, [on, at, xn]), ho = Le(
13303
13303
  () => tt.map((g) => g.sessionId).filter((g) => !!g),
13304
13304
  [tt]
13305
13305
  ), ur = ne(
13306
13306
  (g) => {
13307
13307
  if (!g.sessionId) return;
13308
- const P = tt.find(
13308
+ const z = tt.find(
13309
13309
  (ge) => ge.sessionId === g.sessionId || ge.nativeSessionId === g.sessionId
13310
- ), B = (P == null ? void 0 : P.project) || g.project;
13311
- if (B && rn(B), Ge("live"), P != null && P.sessionId) {
13312
- b(null), p({ sid: P.sessionId, n: Date.now() });
13310
+ ), B = (z == null ? void 0 : z.project) || g.project;
13311
+ if (B && rn(B), Ge("live"), z != null && z.sessionId) {
13312
+ b(null), p({ sid: z.sessionId, n: Date.now() });
13313
13313
  return;
13314
13314
  }
13315
13315
  b({
@@ -13329,22 +13329,22 @@ function ck() {
13329
13329
  U(() => {
13330
13330
  const g = y.current;
13331
13331
  if (!g || ye || _n) return;
13332
- const P = tt.find(
13332
+ const z = tt.find(
13333
13333
  (B) => B.sessionId === g || B.nativeSessionId === g
13334
13334
  );
13335
- P && (y.current = null, Ae !== "__all" && !(Ae === "__unassigned" ? !P.assignedUser : P.assignedUser === Ae) && Xt("__all"), at !== "__all" && P.project !== at && rn("__all"), Ge("live"), p({ sid: P.sessionId ?? g, n: Date.now() }));
13335
+ z && (y.current = null, Ae !== "__all" && !(Ae === "__unassigned" ? !z.assignedUser : z.assignedUser === Ae) && Xt("__all"), at !== "__all" && z.project !== at && rn("__all"), Ge("live"), p({ sid: z.sessionId ?? g, n: Date.now() }));
13336
13336
  }, [tt, ye, Ae, at, _n, Ge]), U(() => {
13337
13337
  if (!y.current || ye || _n) return;
13338
13338
  const g = window.setTimeout(() => {
13339
13339
  var ge;
13340
- const P = y.current;
13341
- if (!P) return;
13340
+ const z = y.current;
13341
+ if (!z) return;
13342
13342
  y.current = null;
13343
13343
  const B = (ge = Ls(Vs)) == null ? void 0 : ge.items.find(
13344
- (Ee) => Ee.sessionId === P
13344
+ (Me) => Me.sessionId === z
13345
13345
  );
13346
13346
  ur({
13347
- sessionId: P,
13347
+ sessionId: z,
13348
13348
  agent: B == null ? void 0 : B.agent,
13349
13349
  project: B == null ? void 0 : B.project,
13350
13350
  title: B == null ? void 0 : B.title,
@@ -13384,20 +13384,20 @@ function ck() {
13384
13384
  U(() => {
13385
13385
  const g = h == null ? void 0 : h.sessionId;
13386
13386
  if (!g) return;
13387
- const P = tt.find(
13387
+ const z = tt.find(
13388
13388
  (B) => B.sessionId === g || B.nativeSessionId === g
13389
13389
  );
13390
- P != null && P.sessionId && (b(null), p({ sid: P.sessionId, n: Date.now() }));
13390
+ z != null && z.sessionId && (b(null), p({ sid: z.sessionId, n: Date.now() }));
13391
13391
  }, [tt, h]);
13392
13392
  const gi = ho.join(","), tr = Le(() => pu(), []) === "ws", bi = ne((g) => {
13393
13393
  if (!g.length) return;
13394
- const P = new Map(g.map((B) => [B.sessionId, B]));
13394
+ const z = new Map(g.map((B) => [B.sessionId, B]));
13395
13395
  se((B) => {
13396
13396
  let ge = !1;
13397
- const Ee = B.map((Pe) => {
13398
- const Xe = Pe.sessionId, et = Xe ? P.get(Xe) : void 0;
13397
+ const Me = B.map((Pe) => {
13398
+ const Xe = Pe.sessionId, et = Xe ? z.get(Xe) : void 0;
13399
13399
  if (!et) return Pe;
13400
- const ut = Xe ? Te.current.get(Xe) : void 0, ft = ut == null ? void 0 : ut.title, mt = {
13400
+ const ut = Xe ? _e.current.get(Xe) : void 0, ft = ut == null ? void 0 : ut.title, mt = {
13401
13401
  ...Pe,
13402
13402
  ...et,
13403
13403
  ...ft !== void 0 ? { title: ft } : {}
@@ -13410,35 +13410,35 @@ function ck() {
13410
13410
  }
13411
13411
  return Lt ? (ge = !0, mt) : Pe;
13412
13412
  });
13413
- return ge ? Ee : B;
13413
+ return ge ? Me : B;
13414
13414
  });
13415
13415
  }, []);
13416
13416
  U(() => {
13417
13417
  if (tr || le !== "live" || !gi) return;
13418
13418
  const g = new EventSource(`/api/live/status?ids=${gi}`);
13419
- return g.addEventListener("status", (P) => {
13420
- const B = rr(P.data);
13419
+ return g.addEventListener("status", (z) => {
13420
+ const B = rr(z.data);
13421
13421
  B != null && B.length && bi(B);
13422
13422
  }), () => g.close();
13423
13423
  }, [bi, gi, le, tr]);
13424
13424
  const Sl = ne((g) => {
13425
- rn(g), Ge((P) => P === "shipped" || P === "artifacts" ? "live" : P);
13425
+ rn(g), Ge((z) => z === "shipped" || z === "artifacts" ? "live" : z);
13426
13426
  }, []), im = ne(
13427
13427
  (g) => {
13428
- const P = it;
13429
- if (P.length <= 1) return !1;
13430
- const B = Yo(P, at, g);
13428
+ const z = it;
13429
+ if (z.length <= 1) return !1;
13430
+ const B = Yo(z, at, g);
13431
13431
  return B === at ? !1 : (rn(B), !0);
13432
13432
  },
13433
13433
  [it, at]
13434
13434
  ), Cl = R({ tab: le, projectFilter: at, projectOptions: nt, setProjectFilter: rn });
13435
13435
  Cl.current = { tab: le, projectFilter: at, projectOptions: nt, setProjectFilter: rn }, U(() => {
13436
- const g = (P) => {
13437
- if (P.key !== "Tab" || P.metaKey || P.ctrlKey || P.altKey) return;
13436
+ const g = (z) => {
13437
+ if (z.key !== "Tab" || z.metaKey || z.ctrlKey || z.altKey) return;
13438
13438
  const B = Cl.current;
13439
13439
  if (B.tab !== "live") return;
13440
13440
  const ge = B.projectOptions;
13441
- ge.length <= 1 || Cr() || (P.preventDefault(), B.setProjectFilter(Yo(ge, B.projectFilter, P.shiftKey ? -1 : 1)));
13441
+ ge.length <= 1 || Cr() || (z.preventDefault(), B.setProjectFilter(Yo(ge, B.projectFilter, z.shiftKey ? -1 : 1)));
13442
13442
  };
13443
13443
  return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
13444
13444
  }, []);
@@ -13450,22 +13450,22 @@ function ck() {
13450
13450
  fb(!document.documentElement.classList.contains("dark"));
13451
13451
  }
13452
13452
  const xi = (g) => {
13453
- var P;
13454
- return ((P = It.find((B) => B.id === g)) == null ? void 0 : P.name) ?? g;
13453
+ var z;
13454
+ return ((z = It.find((B) => B.id === g)) == null ? void 0 : z.name) ?? g;
13455
13455
  };
13456
13456
  async function Tl(g) {
13457
- ht((P) => P.filter((B) => B.id !== g.id)), Kt(null);
13457
+ ht((z) => z.filter((B) => B.id !== g.id)), Kt(null);
13458
13458
  try {
13459
13459
  await ke(`/api/auto/findings/${g.id}`, {
13460
13460
  method: "POST",
13461
13461
  headers: { "Content-Type": "application/json" },
13462
13462
  body: JSON.stringify({ status: "dismissed" })
13463
13463
  });
13464
- } catch (P) {
13465
- Se.error(P instanceof Error ? P.message : String(P));
13464
+ } catch (z) {
13465
+ Ne.error(z instanceof Error ? z.message : String(z));
13466
13466
  }
13467
13467
  }
13468
- async function cm(g, P, B = {}) {
13468
+ async function cm(g, z, B = {}) {
13469
13469
  var Qt;
13470
13470
  const ge = `An automated watch agent ("${xi(g.agentId)}") flagged this:
13471
13471
 
@@ -13477,7 +13477,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13477
13477
 
13478
13478
  ` : "") + (g.suggest ? `Suggested fix: ${g.suggest}
13479
13479
 
13480
- ` : "") + `Now do this: ${P}`, Ee = g.title.trim().slice(0, 200), Pe = It.find((qn) => qn.id === g.agentId), Xe = B.agent ?? (Pe == null ? void 0 : Pe.agent) ?? "aisdk", et = B.thinkingLevel ?? (Pe == null ? void 0 : Pe.thinkingLevel), ft = (Pe == null ? void 0 : Pe.cwd) || localStorage.getItem("lfg_v2_repo") || ((Qt = A[0]) == null ? void 0 : Qt.cwd) || "", mt = yr(
13480
+ ` : "") + `Now do this: ${z}`, Me = g.title.trim().slice(0, 200), Pe = It.find((qn) => qn.id === g.agentId), Xe = B.agent ?? (Pe == null ? void 0 : Pe.agent) ?? "aisdk", et = B.thinkingLevel ?? (Pe == null ? void 0 : Pe.thinkingLevel), ft = (Pe == null ? void 0 : Pe.cwd) || localStorage.getItem("lfg_v2_repo") || ((Qt = A[0]) == null ? void 0 : Qt.cwd) || "", mt = yr(
13481
13481
  Ae !== "__all" && Ae !== "__unassigned" ? Ae : localStorage.getItem("lfg_user"),
13482
13482
  re
13483
13483
  );
@@ -13490,7 +13490,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13490
13490
  body: JSON.stringify({
13491
13491
  cwd: ft || void 0,
13492
13492
  prompt: ge,
13493
- title: Ee || void 0,
13493
+ title: Me || void 0,
13494
13494
  user: mt || void 0,
13495
13495
  agent: Xe,
13496
13496
  model: B.model ?? (Pe == null ? void 0 : Pe.model),
@@ -13512,18 +13512,18 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13512
13512
  }), ht((ms) => ms.filter((Ur) => Ur.id !== g.id)), Ge("live"), await Promise.all([Ot(), At()]);
13513
13513
  } catch (En) {
13514
13514
  if (!qn && yf(En, "finding", () => void Lt(!0))) return;
13515
- Se.error(En instanceof Error ? En.message : String(En));
13515
+ Ne.error(En instanceof Error ? En.message : String(En));
13516
13516
  }
13517
13517
  };
13518
13518
  await Lt(!1);
13519
13519
  }
13520
- function dm(g, P) {
13520
+ function dm(g, z) {
13521
13521
  const B = xi(g.agentId);
13522
- Kt(null), Se.promise(
13522
+ Kt(null), Ne.promise(
13523
13523
  ke(`/api/auto/agents/${g.agentId}/refine`, {
13524
13524
  method: "POST",
13525
13525
  headers: { "Content-Type": "application/json" },
13526
- body: JSON.stringify({ feedback: P, findingId: g.id })
13526
+ body: JSON.stringify({ feedback: z, findingId: g.id })
13527
13527
  }).then(() => At()),
13528
13528
  {
13529
13529
  loading: `Updating ${B}…`,
@@ -13539,18 +13539,18 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13539
13539
  headers: { "Content-Type": "application/json" },
13540
13540
  body: JSON.stringify(g)
13541
13541
  }), Bt(null), await At();
13542
- } catch (P) {
13543
- Se.error(P instanceof Error ? P.message : String(P));
13542
+ } catch (z) {
13543
+ Ne.error(z instanceof Error ? z.message : String(z));
13544
13544
  }
13545
13545
  }
13546
- function fm(g, P, B = {}) {
13547
- Se.promise(
13546
+ function fm(g, z, B = {}) {
13547
+ Ne.promise(
13548
13548
  ke(
13549
13549
  "/api/auto/compose",
13550
13550
  {
13551
13551
  method: "POST",
13552
13552
  headers: { "Content-Type": "application/json" },
13553
- body: JSON.stringify({ prompt: g, cwd: P })
13553
+ body: JSON.stringify({ prompt: g, cwd: z })
13554
13554
  }
13555
13555
  ).then(
13556
13556
  (ge) => ke("/api/auto/agents", {
@@ -13561,7 +13561,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13561
13561
  prompt: ge.draft.prompt,
13562
13562
  schedule: ge.draft.schedule,
13563
13563
  enabled: !0,
13564
- cwd: P,
13564
+ cwd: z,
13565
13565
  agent: B.agent,
13566
13566
  model: B.model,
13567
13567
  thinkingLevel: B.thinkingLevel,
@@ -13579,40 +13579,40 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13579
13579
  async function mm(g) {
13580
13580
  try {
13581
13581
  await ke(`/api/auto/agents/${g}`, { method: "DELETE" }), Bt(null), await At();
13582
- } catch (P) {
13583
- Se.error(P instanceof Error ? P.message : String(P));
13582
+ } catch (z) {
13583
+ Ne.error(z instanceof Error ? z.message : String(z));
13584
13584
  }
13585
13585
  }
13586
13586
  async function _l(g) {
13587
13587
  bn(
13588
- (P) => P.map((B) => B.id === g ? { ...B, running: !0 } : B)
13588
+ (z) => z.map((B) => B.id === g ? { ...B, running: !0 } : B)
13589
13589
  );
13590
13590
  try {
13591
13591
  await ke(`/api/auto/agents/${g}/run`, { method: "POST" });
13592
- } catch (P) {
13592
+ } catch (z) {
13593
13593
  bn(
13594
13594
  (B) => B.map((ge) => ge.id === g ? { ...ge, running: !1 } : ge)
13595
- ), Se.error(P instanceof Error ? P.message : String(P));
13595
+ ), Ne.error(z instanceof Error ? z.message : String(z));
13596
13596
  }
13597
13597
  }
13598
13598
  async function El(g) {
13599
13599
  if (!g.length || Je) return;
13600
13600
  St(!0);
13601
- const P = g.map((Xe) => {
13601
+ const z = g.map((Xe) => {
13602
13602
  const et = It.find((ut) => ut.id === Xe.agentId);
13603
13603
  return {
13604
13604
  cwd: et == null ? void 0 : et.cwd,
13605
13605
  project: et ? Ui(et, A) : void 0
13606
13606
  };
13607
13607
  }), B = bx({
13608
- sources: P,
13608
+ sources: z,
13609
13609
  projectFilter: at,
13610
13610
  repos: A.map((Xe) => ({ cwd: Xe.cwd, project: Pn(Xe) })),
13611
13611
  fallbackCwd: localStorage.getItem("lfg_v2_repo")
13612
13612
  }), ge = ma(
13613
13613
  localStorage.getItem("lfg_v2_agent"),
13614
13614
  k
13615
- ), Ee = localStorage.getItem(`lfg_model_${ge}`) || localStorage.getItem("lfg_model") || Y.defaults[ge] || _r[ge], Pe = Ae === "__unassigned" ? "" : yr(
13615
+ ), Me = localStorage.getItem(`lfg_model_${ge}`) || localStorage.getItem("lfg_model") || Y.defaults[ge] || _r[ge], Pe = Ae === "__unassigned" ? "" : yr(
13616
13616
  Ae !== "__all" ? Ae : localStorage.getItem("lfg_user"),
13617
13617
  re
13618
13618
  );
@@ -13626,29 +13626,29 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13626
13626
  title: `Triage ${g.length} auto finding${g.length === 1 ? "" : "s"}`,
13627
13627
  user: Pe || void 0,
13628
13628
  agent: ge,
13629
- model: Ee,
13629
+ model: Me,
13630
13630
  thinkingLevel: Cn(ge) ? Tr() : void 0
13631
13631
  })
13632
13632
  });
13633
- Xe.sessionId && Is(Xe.sessionId), Ge("live"), await Ot(), Se.success(
13633
+ Xe.sessionId && Is(Xe.sessionId), Ge("live"), await Ot(), Ne.success(
13634
13634
  `Started triage & execute for ${g.length} finding${g.length === 1 ? "" : "s"}`
13635
13635
  );
13636
13636
  } catch (Xe) {
13637
- Se.error(Xe instanceof Error ? Xe.message : "Could not start auto triage");
13637
+ Ne.error(Xe instanceof Error ? Xe.message : "Could not start auto triage");
13638
13638
  } finally {
13639
13639
  St(!1);
13640
13640
  }
13641
13641
  }
13642
13642
  async function Il() {
13643
13643
  var Xe, et;
13644
- const g = xa(), P = new Set(g), B = Nx(Ft, g), ge = Ft.filter(
13645
- (ut) => !!ut.sessionId && P.has(ut.sessionId)
13646
- ).length, Ee = Ft.filter(
13647
- (ut) => !!ut.busy && (!ut.sessionId || !P.has(ut.sessionId))
13644
+ const g = xa(), z = new Set(g), B = Nx(Ft, g), ge = Ft.filter(
13645
+ (ut) => !!ut.sessionId && z.has(ut.sessionId)
13646
+ ).length, Me = Ft.filter(
13647
+ (ut) => !!ut.busy && (!ut.sessionId || !z.has(ut.sessionId))
13648
13648
  ).length;
13649
13649
  if (!B.length) {
13650
- Se.info(
13651
- ge ? "No unpinned idle sessions to clear" : Ee ? "Every session in scope is still working" : "No sessions to clear"
13650
+ Ne.info(
13651
+ ge ? "No unpinned idle sessions to clear" : Me ? "Every session in scope is still working" : "No sessions to clear"
13652
13652
  );
13653
13653
  return;
13654
13654
  }
@@ -13656,7 +13656,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13656
13656
  title: `Archive ${B.length} idle session${B.length === 1 ? "" : "s"}?`,
13657
13657
  description: [
13658
13658
  ge ? `${ge} pinned session${ge === 1 ? "" : "s"} will be left running.` : "",
13659
- Ee ? `${Ee} session${Ee === 1 ? " is" : "s are"} still working and will be left running.` : "",
13659
+ Me ? `${Me} session${Me === 1 ? " is" : "s are"} still working and will be left running.` : "",
13660
13660
  "The idle sessions can be resumed later from Recent sessions."
13661
13661
  ].filter(Boolean).join(" "),
13662
13662
  confirmLabel: "Archive sessions",
@@ -13665,9 +13665,9 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13665
13665
  B.forEach((ut) => Tt(ut));
13666
13666
  try {
13667
13667
  const ut = await N1(B, "live_clear_idle"), ft = ((Xe = ut.closed) == null ? void 0 : Xe.length) ?? 0, mt = ((et = ut.failed) == null ? void 0 : et.length) ?? 0;
13668
- mt ? Se.warning(`Archived ${ft}, ${mt} could not be archived`) : Se.success(`Archived ${ft} session${ft === 1 ? "" : "s"}`);
13668
+ mt ? Ne.warning(`Archived ${ft}, ${mt} could not be archived`) : Ne.success(`Archived ${ft} session${ft === 1 ? "" : "s"}`);
13669
13669
  } catch (ut) {
13670
- Se.error(ut instanceof Error ? ut.message : "Could not archive sessions");
13670
+ Ne.error(ut instanceof Error ? ut.message : "Could not archive sessions");
13671
13671
  } finally {
13672
13672
  await Ot().catch(() => {
13673
13673
  });
@@ -13675,10 +13675,10 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13675
13675
  }
13676
13676
  }
13677
13677
  async function Al(g) {
13678
- const P = at !== "__all" ? A.find((Xe) => Pn(Xe) === at) : void 0, B = ma(
13678
+ const z = at !== "__all" ? A.find((Xe) => Pn(Xe) === at) : void 0, B = ma(
13679
13679
  localStorage.getItem("lfg_v2_agent"),
13680
13680
  k
13681
- ), ge = localStorage.getItem(`lfg_model_${B}`) || localStorage.getItem("lfg_model") || Y.defaults[B] || _r[B], Ee = Ae === "__unassigned" ? "" : yr(
13681
+ ), ge = localStorage.getItem(`lfg_model_${B}`) || localStorage.getItem("lfg_model") || Y.defaults[B] || _r[B], Me = Ae === "__unassigned" ? "" : yr(
13682
13682
  Ae !== "__all" ? Ae : localStorage.getItem("lfg_user"),
13683
13683
  re
13684
13684
  ), Pe = $1(g, at);
@@ -13687,26 +13687,26 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13687
13687
  method: "POST",
13688
13688
  headers: { "Content-Type": "application/json" },
13689
13689
  body: JSON.stringify({
13690
- cwd: P == null ? void 0 : P.cwd,
13690
+ cwd: z == null ? void 0 : z.cwd,
13691
13691
  prompt: Pe,
13692
- user: Ee || void 0,
13692
+ user: Me || void 0,
13693
13693
  agent: B,
13694
13694
  model: ge,
13695
13695
  thinkingLevel: Cn(B) ? Tr() : void 0
13696
13696
  })
13697
13697
  });
13698
- Xe.sessionId && Is(Xe.sessionId), Ge("live"), await Ot(), Se.success(`Started ${g.label.toLowerCase()}`);
13698
+ Xe.sessionId && Is(Xe.sessionId), Ge("live"), await Ot(), Ne.success(`Started ${g.label.toLowerCase()}`);
13699
13699
  } catch (Xe) {
13700
- Se.error(Xe instanceof Error ? Xe.message : "Could not start management session");
13700
+ Ne.error(Xe instanceof Error ? Xe.message : "Could not start management session");
13701
13701
  }
13702
13702
  }
13703
13703
  const fs = ne(async (g) => {
13704
- const P = await ke("/api/settings", {
13704
+ const z = await ke("/api/settings", {
13705
13705
  method: "POST",
13706
13706
  headers: { "Content-Type": "application/json" },
13707
13707
  body: JSON.stringify(g)
13708
13708
  });
13709
- dr(P.settings), te(P.settings.timeZone);
13709
+ dr(z.settings), te(z.settings.timeZone);
13710
13710
  }, []), pm = Le(() => ({
13711
13711
  value: Ln.transcriptView,
13712
13712
  onChange: (g) => fs({ transcriptView: g })
@@ -13722,7 +13722,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13722
13722
  });
13723
13723
  He(g.state), We(!0);
13724
13724
  } catch (g) {
13725
- Se.error(g instanceof Error ? g.message : "Couldn't restart onboarding");
13725
+ Ne.error(g instanceof Error ? g.message : "Couldn't restart onboarding");
13726
13726
  }
13727
13727
  }, []), gm = ne(async () => {
13728
13728
  try {
@@ -13755,20 +13755,20 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13755
13755
  }
13756
13756
  X(!1), J.current = !1;
13757
13757
  } catch (g) {
13758
- Se.error(g instanceof Error ? g.message : "Couldn't restart the tour");
13758
+ Ne.error(g instanceof Error ? g.message : "Couldn't restart the tour");
13759
13759
  }
13760
13760
  }, []), yn = ne(async (g = {}) => {
13761
- const P = g.refreshModels ? "/api/coding-agents?refreshModels=1" : "/api/coding-agents";
13761
+ const z = g.refreshModels ? "/api/coding-agents?refreshModels=1" : "/api/coding-agents";
13762
13762
  let B, ge;
13763
13763
  try {
13764
13764
  [B, ge] = await Promise.all([
13765
- ke(P),
13765
+ ke(z),
13766
13766
  ke("/api/setup/checks").catch(() => ({ checks: [] }))
13767
13767
  ]);
13768
13768
  } catch {
13769
13769
  return;
13770
13770
  }
13771
- K(B.agents ?? []), fe(Vr(B.models)), Me(ge.checks ?? []);
13771
+ K(B.agents ?? []), fe(Vr(B.models)), Te(ge.checks ?? []);
13772
13772
  }, []), bo = ne(async () => {
13773
13773
  try {
13774
13774
  const g = await ke("/api/connections");
@@ -13777,80 +13777,80 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13777
13777
  }
13778
13778
  }, []);
13779
13779
  function xm(g) {
13780
- Me(
13781
- (P) => P.map((B) => B.key === g ? { ...B, running: !0 } : B)
13782
- ), Se.promise(
13780
+ Te(
13781
+ (z) => z.map((B) => B.key === g ? { ...B, running: !0 } : B)
13782
+ ), Ne.promise(
13783
13783
  ke(`/api/setup/checks/${g}/run`, {
13784
13784
  method: "POST"
13785
- }).then((P) => {
13786
- Me(P.checks ?? []), window.setTimeout(() => void yn(), 2e3);
13785
+ }).then((z) => {
13786
+ Te(z.checks ?? []), window.setTimeout(() => void yn(), 2e3);
13787
13787
  }),
13788
13788
  {
13789
13789
  loading: "Starting setup…",
13790
13790
  success: "Setup complete",
13791
- error: (P) => P instanceof Error ? P.message : "Couldn't start setup"
13791
+ error: (z) => z instanceof Error ? z.message : "Couldn't start setup"
13792
13792
  }
13793
13793
  );
13794
13794
  }
13795
- async function ym(g, P) {
13795
+ async function ym(g, z) {
13796
13796
  const B = Q;
13797
13797
  K(
13798
- (ge) => ge.map((Ee) => Ee.key === g ? { ...Ee, visible: P } : Ee)
13798
+ (ge) => ge.map((Me) => Me.key === g ? { ...Me, visible: z } : Me)
13799
13799
  );
13800
13800
  try {
13801
13801
  const ge = await ke(`/api/coding-agents/${g}`, {
13802
13802
  method: "POST",
13803
13803
  headers: { "Content-Type": "application/json" },
13804
- body: JSON.stringify({ visible: P })
13804
+ body: JSON.stringify({ visible: z })
13805
13805
  });
13806
13806
  K(ge.agents ?? []), fe(Vr(ge.models));
13807
13807
  } catch (ge) {
13808
- K(B), Se.error(ge instanceof Error ? ge.message : String(ge));
13808
+ K(B), Ne.error(ge instanceof Error ? ge.message : String(ge));
13809
13809
  }
13810
13810
  }
13811
13811
  function $l(g) {
13812
13812
  K(
13813
- (P) => P.map(
13813
+ (z) => z.map(
13814
13814
  (B) => B.key === g ? { ...B, status: { ...B.status, setupRunning: !0 } } : B
13815
13815
  )
13816
- ), Se.promise(
13816
+ ), Ne.promise(
13817
13817
  ke(`/api/coding-agents/${g}/setup`, {
13818
13818
  method: "POST"
13819
- }).then((P) => {
13820
- K(P.agents ?? []), fe(Vr(P.models)), window.setTimeout(() => void yn(), 3e3);
13819
+ }).then((z) => {
13820
+ K(z.agents ?? []), fe(Vr(z.models)), window.setTimeout(() => void yn(), 3e3);
13821
13821
  }),
13822
13822
  {
13823
13823
  loading: "Starting setup…",
13824
13824
  success: "Setup started",
13825
- error: (P) => P instanceof Error ? P.message : "Couldn't start setup"
13825
+ error: (z) => z instanceof Error ? z.message : "Couldn't start setup"
13826
13826
  }
13827
13827
  );
13828
13828
  }
13829
- async function yi(g, P, B, ge = {}) {
13829
+ async function yi(g, z, B, ge = {}) {
13830
13830
  j(B ?? null), B && _(null);
13831
- const Ee = window.open("about:blank", "_blank");
13831
+ const Me = window.open("about:blank", "_blank");
13832
13832
  try {
13833
- const Pe = await ke(P, {
13833
+ const Pe = await ke(z, {
13834
13834
  method: "POST",
13835
13835
  headers: { "Content-Type": "application/json" },
13836
13836
  body: JSON.stringify(ge)
13837
13837
  });
13838
13838
  if (Pe.status === "error") throw new Error(Pe.error || "Couldn't start login");
13839
13839
  if (Pe.status === "complete") {
13840
- Ee == null || Ee.close(), Se.success(`${Ko(Pe.provider)} connected`), j(null), B && _(B), await Promise.all([
13840
+ Me == null || Me.close(), Ne.success(`${Ko(Pe.provider)} connected`), j(null), B && _(B), await Promise.all([
13841
13841
  yn({ refreshModels: !0 }),
13842
13842
  bo()
13843
13843
  ]);
13844
13844
  return;
13845
13845
  }
13846
- ie(Pe), Pe.authorizationUrl && Ee ? (Ee.location.replace(Pe.authorizationUrl), Ee.focus()) : Pe.authorizationUrl || Ee == null || Ee.close();
13846
+ ie(Pe), Pe.authorizationUrl && Me ? (Me.location.replace(Pe.authorizationUrl), Me.focus()) : Pe.authorizationUrl || Me == null || Me.close();
13847
13847
  } catch (Pe) {
13848
- Ee == null || Ee.close(), j(null), Se.error(Pe instanceof Error ? Pe.message : "Couldn't start login");
13848
+ Me == null || Me.close(), j(null), Ne.error(Pe instanceof Error ? Pe.message : "Couldn't start login");
13849
13849
  }
13850
13850
  }
13851
- async function xo(g, P, B) {
13851
+ async function xo(g, z, B) {
13852
13852
  if (!su.has(g)) {
13853
- Se.promise(
13853
+ Ne.promise(
13854
13854
  ke(`/api/coding-agents/${g}/login-terminal`, { method: "POST" }).then((ge) => {
13855
13855
  localStorage.setItem("lfg_term_session", ge.terminalSession || `login-${g}`), window.dispatchEvent(new Event("lfg:term-session")), Ge("term");
13856
13856
  }),
@@ -13865,48 +13865,54 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13865
13865
  return yi(
13866
13866
  g,
13867
13867
  `/api/coding-agents/${g}/auth`,
13868
- P,
13868
+ z,
13869
13869
  { claudeAccountId: B }
13870
13870
  );
13871
13871
  }
13872
13872
  async function vm(g) {
13873
13873
  return yi(g, `/api/connections/${g}/auth`);
13874
13874
  }
13875
- async function wm(g) {
13876
- return g.method === "api-key" ? km(g) : yi("pi", "/api/coding-agents/pi/auth", void 0, {
13877
- provider: g.id
13875
+ async function wm(g, z) {
13876
+ if (z.method === "api-key") return km(g, z);
13877
+ if (g !== "pi") {
13878
+ Ne.error(`Connect ${z.label} with \`opencode auth login\` in a terminal`);
13879
+ return;
13880
+ }
13881
+ return yi("pi", "/api/coding-agents/pi/auth", void 0, {
13882
+ provider: z.id
13878
13883
  });
13879
13884
  }
13880
- async function km(g) {
13881
- const P = await e.prompt({
13882
- title: `Connect ${g.label}`,
13883
- description: `Paste your ${g.label} API key. It is stored with pi's other credentials and never leaves this machine.`,
13885
+ async function km(g, z) {
13886
+ const B = g === "opencode" ? "OpenCode's" : "pi's", ge = await e.prompt({
13887
+ title: `Connect ${z.label}`,
13888
+ description: `Paste your ${z.label} API key. It is stored with ${B} other credentials and never leaves this machine.`,
13884
13889
  placeholder: "API key",
13885
13890
  confirmLabel: "Connect",
13886
13891
  password: !0
13887
13892
  });
13888
- if (P)
13893
+ if (ge)
13889
13894
  try {
13890
- await ke("/api/coding-agents/pi/api-key", {
13895
+ await ke(`/api/coding-agents/${g}/api-key`, {
13891
13896
  method: "POST",
13892
13897
  headers: { "Content-Type": "application/json" },
13893
- body: JSON.stringify({ provider: g.id, key: P })
13894
- }), await yn({ refreshModels: !0 }), Se.success(`${g.label} connected`);
13895
- } catch (B) {
13896
- Se.error(B instanceof Error ? B.message : `Couldn't connect ${g.label}`);
13898
+ body: JSON.stringify({ provider: z.id, key: ge })
13899
+ }), await yn({ refreshModels: !0 }), Ne.success(`${z.label} connected`);
13900
+ } catch (Me) {
13901
+ Ne.error(Me instanceof Error ? Me.message : `Couldn't connect ${z.label}`);
13897
13902
  }
13898
13903
  }
13899
- async function Nm(g) {
13904
+ async function Nm(g, z) {
13905
+ const B = g === "opencode" ? "OpenCode" : "pi";
13900
13906
  if (await e.confirm({
13901
- title: `Disconnect ${g.label}?`,
13902
- description: "pi will stop offering this provider's models until you connect it again.",
13907
+ title: `Disconnect ${z.label}?`,
13908
+ description: `${B} will stop offering this provider's models until you connect it again.`,
13903
13909
  confirmLabel: "Disconnect",
13904
13910
  destructive: !0
13905
13911
  }))
13906
13912
  try {
13907
- await ke(`/api/coding-agents/pi/providers/${g.id}`, { method: "DELETE" }), await yn({ refreshModels: !0 }), Se.success(`${g.label} disconnected`);
13908
- } catch (B) {
13909
- Se.error(B instanceof Error ? B.message : `Couldn't disconnect ${g.label}`);
13913
+ await ke(`/api/coding-agents/${g}/providers/${z.id}`, { method: "DELETE" }), await yn({ refreshModels: !0 }), Ne.success(`${z.label} disconnected`);
13914
+ } catch (Me) {
13915
+ Ne.error(Me instanceof Error ? Me.message : `Couldn't disconnect ${z.label}`);
13910
13916
  }
13911
13917
  }
13912
13918
  async function Sm() {
@@ -13917,7 +13923,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13917
13923
  );
13918
13924
  Di(), await yn(), await xo("aisdk", void 0, g.id);
13919
13925
  } catch (g) {
13920
- Se.error(g instanceof Error ? g.message : "Couldn't add Claude account");
13926
+ Ne.error(g instanceof Error ? g.message : "Couldn't add Claude account");
13921
13927
  }
13922
13928
  }
13923
13929
  async function Cm(g) {
@@ -13928,9 +13934,9 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
13928
13934
  destructive: !0
13929
13935
  })))
13930
13936
  try {
13931
- await ke(`/api/coding-agents/claude/accounts/${g.id}`, { method: "DELETE" }), Di(), localStorage.getItem("lfg_claude_account") === g.id && localStorage.removeItem("lfg_claude_account"), await yn({ refreshModels: !0 }), Se.success(`${g.label} removed`);
13937
+ await ke(`/api/coding-agents/claude/accounts/${g.id}`, { method: "DELETE" }), Di(), localStorage.getItem("lfg_claude_account") === g.id && localStorage.removeItem("lfg_claude_account"), await yn({ refreshModels: !0 }), Ne.success(`${g.label} removed`);
13932
13938
  } catch (B) {
13933
- Se.error(B instanceof Error ? B.message : "Couldn't remove Claude account");
13939
+ Ne.error(B instanceof Error ? B.message : "Couldn't remove Claude account");
13934
13940
  }
13935
13941
  }
13936
13942
  async function vi() {
@@ -14012,8 +14018,8 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14012
14018
  codingAgents: Q,
14013
14019
  repos: A,
14014
14020
  identity: sn,
14015
- onProfileCreated: (g, P) => {
14016
- P.length && V(P), G(g), dt(g);
14021
+ onProfileCreated: (g, z) => {
14022
+ z.length && V(z), G(g), dt(g);
14017
14023
  },
14018
14024
  onRefreshAgents: () => void yn(),
14019
14025
  onDone: (g) => {
@@ -14050,7 +14056,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14050
14056
  "aria-disabled": ye || void 0,
14051
14057
  "aria-describedby": ye ? "lfg-startup-status" : void 0,
14052
14058
  "data-startup-state": ye ? "connecting" : "ready",
14053
- className: z(
14059
+ className: P(
14054
14060
  T ? X1 : K1,
14055
14061
  ye && "[&_button]:cursor-wait [&_button]:opacity-60 [&_input]:cursor-wait [&_input]:opacity-60 [&_select]:cursor-wait [&_select]:opacity-60 [&_textarea]:cursor-wait [&_textarea]:opacity-60",
14056
14062
  // Embed: leave a blank band of our own background under the host
@@ -14067,7 +14073,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14067
14073
  "div",
14068
14074
  {
14069
14075
  ref: H,
14070
- className: z(
14076
+ className: P(
14071
14077
  "relative z-40 flex shrink-0 flex-col",
14072
14078
  F && "mobile-scroll-header-fade"
14073
14079
  ),
@@ -14081,7 +14087,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14081
14087
  /* @__PURE__ */ d(
14082
14088
  "header",
14083
14089
  {
14084
- className: z(
14090
+ className: P(
14085
14091
  "z-40 flex min-w-0 shrink-0 items-center justify-between gap-2 pb-1 pt-[calc(0.5rem+env(safe-area-inset-top))]",
14086
14092
  w ? "pl-3 pr-[calc(0.75rem+var(--lfg-host-top-inset))]" : "px-2 md:px-3"
14087
14093
  ),
@@ -14258,7 +14264,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14258
14264
  "main",
14259
14265
  {
14260
14266
  ref: o,
14261
- className: z(
14267
+ className: P(
14262
14268
  "min-h-0",
14263
14269
  // Every rule below exists to accommodate LFG's own chrome. A bare
14264
14270
  // surface has none of it: the gutter would double up on the host's
@@ -14281,7 +14287,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14281
14287
  Et || le === "live" ? /* @__PURE__ */ n(
14282
14288
  "div",
14283
14289
  {
14284
- className: z(
14290
+ className: P(
14285
14291
  // Desktop RailStage fills main via h-full; keep that chain intact
14286
14292
  // when live is active. Mobile scrolls inside main, so no height
14287
14293
  // lock there. Hidden when another tab is up.
@@ -14357,13 +14363,13 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14357
14363
  {
14358
14364
  setupChecks: me,
14359
14365
  agents: Q,
14360
- onVisibleChange: (g, P) => void ym(g, P),
14366
+ onVisibleChange: (g, z) => void ym(g, z),
14361
14367
  onSetup: $l,
14362
- onLogin: (g, P) => xo(g, void 0, P),
14368
+ onLogin: (g, z) => xo(g, void 0, z),
14363
14369
  onAddClaudeAccount: Sm,
14364
14370
  onRemoveClaudeAccount: Cm,
14365
- onConnectPiProvider: (g) => void wm(g),
14366
- onDisconnectPiProvider: (g) => void Nm(g),
14371
+ onConnectProvider: (g, z) => void wm(g, z),
14372
+ onDisconnectProvider: (g, z) => void Nm(g, z),
14367
14373
  onSetupCheck: xm,
14368
14374
  onRefresh: () => void yn({ refreshModels: !0 })
14369
14375
  }
@@ -14375,7 +14381,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14375
14381
  notificationIdentity: sn,
14376
14382
  liveSessionIds: new Set(
14377
14383
  Ft.flatMap(
14378
- (g) => [g.sessionId, g.nativeSessionId].filter((P) => !!P)
14384
+ (g) => [g.sessionId, g.nativeSessionId].filter((z) => !!z)
14379
14385
  )
14380
14386
  ),
14381
14387
  onOpenSession: (g) => {
@@ -14460,9 +14466,9 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14460
14466
  defaultUser: Ae !== "__all" && Ae !== "__unassigned" ? Ae : "",
14461
14467
  onClose: () => ee(!1),
14462
14468
  onCreated: async (g) => {
14463
- const P = g == null ? void 0 : g.launchId;
14469
+ const z = g == null ? void 0 : g.launchId;
14464
14470
  await Ot({
14465
- ...P ? { retireLaunchId: P } : {},
14471
+ ...z ? { retireLaunchId: z } : {},
14466
14472
  seed: (g == null ? void 0 : g.session) ?? null
14467
14473
  });
14468
14474
  }
@@ -14538,7 +14544,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14538
14544
  /* @__PURE__ */ n(
14539
14545
  $w,
14540
14546
  {
14541
- onSelectAgent: (g, P) => {
14547
+ onSelectAgent: (g, z) => {
14542
14548
  const B = {
14543
14549
  claude: ["aisdk", "claude"],
14544
14550
  codex: ["codex-aisdk", "codex"],
@@ -14553,18 +14559,18 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14553
14559
  Q,
14554
14560
  w ? "connected-or-opencode" : "configured"
14555
14561
  ).map((Pe) => Pe.key)
14556
- ), Ee = (B[g] ?? [g]).find(
14562
+ ), Me = (B[g] ?? [g]).find(
14557
14563
  (Pe) => ge.has(Pe)
14558
14564
  );
14559
- if (!Ee) {
14560
- Se.error("That agent isn't configured on this box");
14565
+ if (!Me) {
14566
+ Ne.error("That agent isn't configured on this box");
14561
14567
  return;
14562
14568
  }
14563
14569
  Fe((Pe) => ({
14564
- kind: Ee,
14570
+ kind: Me,
14565
14571
  // Picking "Claude 2" on the arc should compose on Claude 2, not on
14566
14572
  // whichever account the composer happened to be left on.
14567
- accountId: Ee === "aisdk" ? P : void 0,
14573
+ accountId: Me === "aisdk" ? z : void 0,
14568
14574
  nonce: ((Pe == null ? void 0 : Pe.nonce) ?? 0) + 1
14569
14575
  })), F ? (ee(!0), st((Pe) => Pe + 1)) : qe(!0);
14570
14576
  }
@@ -14595,7 +14601,7 @@ function As({
14595
14601
  return /* @__PURE__ */ n(
14596
14602
  "div",
14597
14603
  {
14598
- className: z(
14604
+ className: P(
14599
14605
  "rounded-full",
14600
14606
  r && "bg-gradient-to-b from-white/70 via-white/25 to-white/10 p-px shadow-[0_8px_28px_rgba(0,0,0,0.18)] dark:from-white/25 dark:via-white/10 dark:to-white/5",
14601
14607
  t
@@ -14610,7 +14616,7 @@ function Jc({ className: e }) {
14610
14616
  "svg",
14611
14617
  {
14612
14618
  viewBox: "0 0 100 100",
14613
- className: z("size-6 shrink-0", e),
14619
+ className: P("size-6 shrink-0", e),
14614
14620
  "aria-hidden": !0,
14615
14621
  children: [
14616
14622
  /* @__PURE__ */ d("mask", { id: t, children: [
@@ -14686,7 +14692,7 @@ function dk({
14686
14692
  As,
14687
14693
  {
14688
14694
  surface: p,
14689
- className: z(
14695
+ className: P(
14690
14696
  "shrink-0 overflow-hidden transition-[width] duration-500 ease-ios",
14691
14697
  e ? "w-11" : t ? "w-[min(17rem,calc(100vw-var(--lfg-host-top-inset)-1.5rem))]" : "w-[min(17rem,calc(100vw-6.75rem))]"
14692
14698
  ),
@@ -14699,7 +14705,7 @@ function dk({
14699
14705
  },
14700
14706
  "aria-label": e ? "omg.dev" : f ? `${O}. Tap to open notifications` : h ? `${N}. ${k}` : N,
14701
14707
  title: e ? "omg.dev" : "Open notifications",
14702
- className: z(
14708
+ className: P(
14703
14709
  "relative flex h-11 w-full items-center overflow-hidden rounded-full text-left transition-colors active:scale-[0.98]",
14704
14710
  p && "glass-island",
14705
14711
  "text-foreground"
@@ -14709,7 +14715,7 @@ function dk({
14709
14715
  "span",
14710
14716
  {
14711
14717
  "aria-hidden": !0,
14712
- className: z(
14718
+ className: P(
14713
14719
  "absolute inset-0 flex items-center justify-center transition-all duration-300 ease-ios",
14714
14720
  e ? "scale-100 opacity-100" : "scale-75 opacity-0"
14715
14721
  ),
@@ -14720,7 +14726,7 @@ function dk({
14720
14726
  "span",
14721
14727
  {
14722
14728
  "aria-live": f ? "polite" : "off",
14723
- className: z(
14729
+ className: P(
14724
14730
  "flex min-w-0 items-center px-1 transition-all duration-300 ease-ios",
14725
14731
  e ? "translate-y-1 opacity-0" : "translate-y-0 opacity-100 delay-150"
14726
14732
  ),
@@ -14728,7 +14734,7 @@ function dk({
14728
14734
  "span",
14729
14735
  {
14730
14736
  ref: T,
14731
- className: z(
14737
+ className: P(
14732
14738
  "t-text-swap block truncate tracking-[-0.01em]",
14733
14739
  y === "exit" && "is-exit",
14734
14740
  y === "enter" && "is-enter-start",
@@ -14761,7 +14767,7 @@ function ha({
14761
14767
  type: "button",
14762
14768
  "aria-label": "Filter live sessions by user",
14763
14769
  title: o ? o.name ?? is(o.email) : s ? "Unassigned" : "All users",
14764
- className: z(
14770
+ className: P(
14765
14771
  "relative inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-full border transition",
14766
14772
  s ? "border-primary/40 text-primary" : "border-border bg-muted/70 text-foreground"
14767
14773
  )
@@ -14815,7 +14821,7 @@ function Hi({
14815
14821
  width: t,
14816
14822
  height: t,
14817
14823
  viewBox: `0 0 ${t} ${t}`,
14818
- className: z("shrink-0 -rotate-90", r),
14824
+ className: P("shrink-0 -rotate-90", r),
14819
14825
  role: "img",
14820
14826
  "aria-label": l.map((c) => `${c.label} ${Math.round(c.pct ?? 0)}%`).join(", "),
14821
14827
  children: l.map((c, u) => {
@@ -14854,7 +14860,7 @@ function fk({
14854
14860
  width: e,
14855
14861
  height: e,
14856
14862
  viewBox: `0 0 ${e} ${e}`,
14857
- className: z("shrink-0 -rotate-90 animate-spin motion-reduce:animate-none", t),
14863
+ className: P("shrink-0 -rotate-90 animate-spin motion-reduce:animate-none", t),
14858
14864
  role: "status",
14859
14865
  "aria-label": "Loading usage",
14860
14866
  children: [0, 1, 2].map((a) => {
@@ -14918,7 +14924,7 @@ function pk({
14918
14924
  type: "button",
14919
14925
  "aria-label": `${e.label} usage. Long-press for all agents.`,
14920
14926
  title: `${e.label} usage · long-press for all agents · Shift`,
14921
- className: z(
14927
+ className: P(
14922
14928
  // The wider left pad keeps the rings clear of the screen edge on
14923
14929
  // the mobile inline composer; on desktop it just reads as a gap.
14924
14930
  "flex shrink-0 touch-none select-none items-center justify-center rounded-full p-1 pl-4 transition active:scale-90 [-webkit-touch-callout:none] md:pl-1",
@@ -14984,7 +14990,7 @@ function ul({
14984
14990
  type: "button",
14985
14991
  "aria-label": "Manage sessions",
14986
14992
  title: `Manage sessions: ${o}`,
14987
- className: z(
14993
+ className: P(
14988
14994
  "flex shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors duration-200 ease-out hover:text-foreground active:scale-[0.96]",
14989
14995
  s ? "gap-1 px-2 py-0.5 text-[11px] font-medium hover:bg-primary/10 hover:text-primary" : "size-9"
14990
14996
  )
@@ -15053,7 +15059,7 @@ function Vi({
15053
15059
  type: "button",
15054
15060
  "aria-label": "Pages",
15055
15061
  title: "Pages",
15056
- className: z(
15062
+ className: P(
15057
15063
  "flex size-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
15058
15064
  o
15059
15065
  )
@@ -15109,7 +15115,7 @@ function $s({
15109
15115
  }) {
15110
15116
  const i = e !== "__all", a = t, l = R(null), c = R(!1), u = (h) => {
15111
15117
  r(Yo(a, e, h));
15112
- }, m = z(
15118
+ }, m = P(
15113
15119
  "relative inline-flex h-8 shrink-0 touch-none select-none items-center justify-center gap-1 rounded-full border transition",
15114
15120
  i ? "max-w-[45vw] px-2.5 sm:max-w-[12rem]" : "size-8",
15115
15121
  s ? i ? "lfg-gborder border-transparent bg-background text-foreground shadow-sm" : "lfg-gborder border-transparent bg-background text-muted-foreground shadow-sm" : i ? "border-primary/30 bg-primary/10 text-primary" : "border-border bg-muted/70 text-muted-foreground"
@@ -15223,7 +15229,7 @@ function hk({
15223
15229
  const I = C.current;
15224
15230
  I && (I.scrollTop = I.scrollHeight);
15225
15231
  }, [w.lines]);
15226
- const [Y, fe] = v(""), me = E, Me = Y || (me.some((I) => I.key === "claude") ? "claude" : ((We = me[0]) == null ? void 0 : We.key) || "claude"), Oe = (I) => ke("/api/onboarding", {
15232
+ const [Y, fe] = v(""), me = E, Te = Y || (me.some((I) => I.key === "claude") ? "claude" : ((We = me[0]) == null ? void 0 : We.key) || "claude"), Oe = (I) => ke("/api/onboarding", {
15227
15233
  method: "POST",
15228
15234
  headers: { "Content-Type": "application/json" },
15229
15235
  body: JSON.stringify(I)
@@ -15250,10 +15256,10 @@ function hk({
15250
15256
  p(!1);
15251
15257
  }
15252
15258
  }
15253
- function Te() {
15259
+ function _e() {
15254
15260
  Oe({ steps: { agents: !0 } }), m("repo");
15255
15261
  }
15256
- async function Ne() {
15262
+ async function Se() {
15257
15263
  var I;
15258
15264
  p(!0), b(null);
15259
15265
  try {
@@ -15301,7 +15307,7 @@ function hk({
15301
15307
  }
15302
15308
  }
15303
15309
  async function re() {
15304
- if (!me.some((I) => I.key === Me)) {
15310
+ if (!me.some((I) => I.key === Te)) {
15305
15311
  b("Set up and sign in to a coding agent before starting a session.");
15306
15312
  return;
15307
15313
  }
@@ -15314,7 +15320,7 @@ function hk({
15314
15320
  cwd: S || void 0,
15315
15321
  prompt: _.trim() || "Give me a quick tour of this repo.",
15316
15322
  user: o || void 0,
15317
- agent: Me
15323
+ agent: Te
15318
15324
  })
15319
15325
  });
15320
15326
  await Oe({ steps: { firstSession: !0 }, completed: !0 }), l(I == null ? void 0 : I.sessionId);
@@ -15445,7 +15451,7 @@ function hk({
15445
15451
  return /* @__PURE__ */ d(
15446
15452
  "label",
15447
15453
  {
15448
- className: z(
15454
+ className: P(
15449
15455
  "flex items-center gap-3 rounded-xl border border-border bg-muted/40 px-3 py-2.5",
15450
15456
  !I.status.configured && I.status.canAutoSetup && !J ? "cursor-pointer" : "cursor-default"
15451
15457
  ),
@@ -15514,7 +15520,7 @@ function hk({
15514
15520
  "button",
15515
15521
  {
15516
15522
  type: "button",
15517
- onClick: Te,
15523
+ onClick: _e,
15518
15524
  className: "flex-1 rounded-xl bg-foreground px-3 py-2.5 text-sm font-medium text-background",
15519
15525
  children: E.length ? "Continue" : "Continue anyway"
15520
15526
  }
@@ -15558,7 +15564,7 @@ function hk({
15558
15564
  value: K,
15559
15565
  onChange: (I) => oe(I.target.value),
15560
15566
  onKeyDown: (I) => {
15561
- I.key === "Enter" && K.trim() && Ne();
15567
+ I.key === "Enter" && K.trim() && Se();
15562
15568
  },
15563
15569
  placeholder: "https://github.com/you/repo.git",
15564
15570
  className: "min-w-0 flex-1 rounded-xl border border-border bg-muted/40 px-3 py-2.5 text-sm outline-none focus:border-foreground/30"
@@ -15569,7 +15575,7 @@ function hk({
15569
15575
  {
15570
15576
  type: "button",
15571
15577
  disabled: f || !K.trim(),
15572
- onClick: () => void Ne(),
15578
+ onClick: () => void Se(),
15573
15579
  className: "flex shrink-0 items-center gap-2 rounded-xl border border-border px-3 py-2.5 text-sm font-medium hover:bg-muted disabled:opacity-50",
15574
15580
  children: [
15575
15581
  f ? /* @__PURE__ */ n(xt, { className: "size-4 animate-spin" }) : /* @__PURE__ */ n(js, { className: "size-4" }),
@@ -15616,7 +15622,7 @@ function hk({
15616
15622
  {
15617
15623
  type: "button",
15618
15624
  onClick: () => fe(I.key),
15619
- className: "rounded-full border px-3 py-1.5 text-xs font-medium transition-colors " + (Me === I.key ? "border-foreground bg-foreground text-background" : "border-border bg-muted/40 hover:bg-muted"),
15625
+ className: "rounded-full border px-3 py-1.5 text-xs font-medium transition-colors " + (Te === I.key ? "border-foreground bg-foreground text-background" : "border-border bg-muted/40 hover:bg-muted"),
15620
15626
  children: I.label
15621
15627
  },
15622
15628
  I.key
@@ -15781,13 +15787,13 @@ function zf({
15781
15787
  "span",
15782
15788
  {
15783
15789
  "aria-hidden": !0,
15784
- className: z("pointer-events-none absolute", t, e),
15790
+ className: P("pointer-events-none absolute", t, e),
15785
15791
  children: r ? /* @__PURE__ */ d(Be, { children: [
15786
- /* @__PURE__ */ n("span", { className: z("absolute left-0 top-0 bottom-0 w-[1.5px]", o) }),
15792
+ /* @__PURE__ */ n("span", { className: P("absolute left-0 top-0 bottom-0 w-[1.5px]", o) }),
15787
15793
  /* @__PURE__ */ n(
15788
15794
  "span",
15789
15795
  {
15790
- className: z(
15796
+ className: P(
15791
15797
  "absolute left-0 top-1/2 -translate-y-1/2 h-[1.5px] w-3",
15792
15798
  o
15793
15799
  )
@@ -15798,7 +15804,7 @@ function zf({
15798
15804
  /* @__PURE__ */ n(
15799
15805
  "span",
15800
15806
  {
15801
- className: z(
15807
+ className: P(
15802
15808
  "absolute left-0 top-0 bottom-1/2 w-3 rounded-bl-lg border-b-[1.5px] border-l-[1.5px]",
15803
15809
  "border-current"
15804
15810
  )
@@ -15874,7 +15880,7 @@ function Lf({
15874
15880
  type: "button",
15875
15881
  onClick: () => t(e),
15876
15882
  title: `Open shipped session: ${e.title}`,
15877
- className: z(
15883
+ className: P(
15878
15884
  "group flex w-full items-center text-left outline-none transition-[transform,background-color] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/60",
15879
15885
  r ? "live-pane lfg-gborder gap-3 rounded-xl border border-transparent bg-card px-3 py-2.5 active:scale-[0.99]" : "gap-2 rounded-xl border border-transparent px-2 py-1.5 hover:bg-muted/70"
15880
15886
  ),
@@ -15882,7 +15888,7 @@ function Lf({
15882
15888
  /* @__PURE__ */ d(
15883
15889
  "span",
15884
15890
  {
15885
- className: z(
15891
+ className: P(
15886
15892
  "relative flex shrink-0 items-center justify-center",
15887
15893
  r ? "size-8" : "size-6"
15888
15894
  ),
@@ -15892,7 +15898,7 @@ function Lf({
15892
15898
  {
15893
15899
  src: Zn(e.agent),
15894
15900
  alt: ri(e.agent),
15895
- className: z("rounded-md", r ? "size-8" : "size-6")
15901
+ className: P("rounded-md", r ? "size-8" : "size-6")
15896
15902
  }
15897
15903
  ),
15898
15904
  /* @__PURE__ */ n(
@@ -15911,7 +15917,7 @@ function Lf({
15911
15917
  /* @__PURE__ */ n(
15912
15918
  "span",
15913
15919
  {
15914
- className: z(
15920
+ className: P(
15915
15921
  "min-w-0 flex-1 truncate font-medium leading-tight",
15916
15922
  r ? "text-sm" : "text-[13px]"
15917
15923
  ),
@@ -15923,7 +15929,7 @@ function Lf({
15923
15929
  /* @__PURE__ */ n(
15924
15930
  "span",
15925
15931
  {
15926
- className: z(
15932
+ className: P(
15927
15933
  "truncate leading-tight text-muted-foreground",
15928
15934
  r ? "mt-0.5 text-xs" : "text-[11px]"
15929
15935
  ),
@@ -15999,7 +16005,7 @@ function wk({
15999
16005
  }, [r, t == null ? void 0 : t.sessionId]);
16000
16006
  const J = ne((de) => {
16001
16007
  const We = X.current, I = We.includes(de), ue = I ? We.filter((A) => A !== de) : [...We, de];
16002
- X.current = ue, E(ue), pt("selection"), Se.success(I ? "Session unpinned" : "Session pinned to top");
16008
+ X.current = ue, E(ue), pt("selection"), Ne.success(I ? "Session unpinned" : "Session pinned to top");
16003
16009
  }, []);
16004
16010
  U(() => {
16005
16011
  if (!pe || j) return;
@@ -16011,11 +16017,11 @@ function wk({
16011
16017
  // busyBySid changes frequently; include it so a parent follows a working child.
16012
16018
  // eslint-disable-next-line react-hooks/exhaustive-deps
16013
16019
  [e, l]
16014
- ), Y = new Set(S), fe = (de) => Y.has(Bn(de.session)) || de.children.some(fe), me = he.roots.filter(fe), Me = he.roots.filter(
16020
+ ), Y = new Set(S), fe = (de) => Y.has(Bn(de.session)) || de.children.some(fe), me = he.roots.filter(fe), Te = he.roots.filter(
16015
16021
  (de) => !fe(de) && he.effectiveBusy(de)
16016
16022
  ), Oe = he.roots.filter(
16017
16023
  (de) => !fe(de) && !he.effectiveBusy(de)
16018
- ), se = he.flatten(me), Te = he.flatten(Me), Ne = he.flatten(Oe), je = [...se, ...Te, ...Ne].map((de) => de.sessionId).filter((de) => !!de), Ke = je.slice(0, 8).join(",");
16024
+ ), se = he.flatten(me), _e = he.flatten(Te), Se = he.flatten(Oe), je = [...se, ..._e, ...Se].map((de) => de.sessionId).filter((de) => !!de), Ke = je.slice(0, 8).join(",");
16019
16025
  if (U(() => {
16020
16026
  Ke && vu(Ke.split(","), Df);
16021
16027
  }, [Ke]), !j && !e.length && !b.length && !t && !$.length)
@@ -16029,7 +16035,7 @@ function wk({
16029
16035
  }, ae = (de, We = 0) => /* @__PURE__ */ n(
16030
16036
  "div",
16031
16037
  {
16032
- className: z(
16038
+ className: P(
16033
16039
  We > 0 && "md:col-span-2"
16034
16040
  ),
16035
16041
  children: /* @__PURE__ */ n(
@@ -16153,16 +16159,16 @@ function wk({
16153
16159
  /* @__PURE__ */ n(Cs, { label: "Pinned", count: se.length, dotClass: "bg-primary" }),
16154
16160
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-2", children: me.flatMap((de) => V(de)) })
16155
16161
  ] }) : null,
16156
- Te.length ? /* @__PURE__ */ d("section", { children: [
16162
+ _e.length ? /* @__PURE__ */ d("section", { children: [
16157
16163
  /* @__PURE__ */ n(
16158
16164
  Cs,
16159
16165
  {
16160
16166
  label: "Working",
16161
- count: Te.length,
16167
+ count: _e.length,
16162
16168
  dotClass: vf
16163
16169
  }
16164
16170
  ),
16165
- /* @__PURE__ */ n("div", { className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-2", children: Me.flatMap((de) => V(de)) })
16171
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-2", children: Te.flatMap((de) => V(de)) })
16166
16172
  ] }) : null,
16167
16173
  b.length ? /* @__PURE__ */ d("section", { children: [
16168
16174
  /* @__PURE__ */ n(
@@ -16192,12 +16198,12 @@ function wk({
16192
16198
  de.id
16193
16199
  )) })
16194
16200
  ] }) : null,
16195
- Ne.length ? /* @__PURE__ */ d("section", { children: [
16201
+ Se.length ? /* @__PURE__ */ d("section", { children: [
16196
16202
  /* @__PURE__ */ n(
16197
16203
  Cs,
16198
16204
  {
16199
16205
  label: "Idle",
16200
- count: Ne.length,
16206
+ count: Se.length,
16201
16207
  dotClass: wf,
16202
16208
  action: /* @__PURE__ */ n(
16203
16209
  ul,
@@ -16317,8 +16323,8 @@ function kk({
16317
16323
  } catch {
16318
16324
  return !1;
16319
16325
  }
16320
- }, [_, E]), [xe, he] = v(X), [Y, fe] = v(null), [me, Me] = v(J), [Oe, se] = v(null), [Te, Ne] = v(!1), [je, Ke] = v(!1), [Ze, ae] = v(!1), re = L.length > 0 && !!C, V = L.find((D) => Pn(D) === s), be = (D) => {
16321
- Ne(!1), ae(D), window.setTimeout(() => Ke(!0), 180);
16326
+ }, [_, E]), [xe, he] = v(X), [Y, fe] = v(null), [me, Te] = v(J), [Oe, se] = v(null), [_e, Se] = v(!1), [je, Ke] = v(!1), [Ze, ae] = v(!1), re = L.length > 0 && !!C, V = L.find((D) => Pn(D) === s), be = (D) => {
16327
+ Se(!1), ae(D), window.setTimeout(() => Ke(!0), 180);
16322
16328
  }, [He, de] = v(!1), [We, I] = v(null), ue = R(null), A = R(null), W = Le(() => {
16323
16329
  const D = /* @__PURE__ */ new Map();
16324
16330
  for (const te of e) te.sessionId && D.set(te.sessionId, te);
@@ -16345,7 +16351,7 @@ function kk({
16345
16351
  }, [W]), U(() => {
16346
16352
  fe((D) => D && !W.has(D) ? null : D);
16347
16353
  }, [W]), Zt(() => {
16348
- he(X()), fe(null), Me(J()), ue.current = null;
16354
+ he(X()), fe(null), Te(J()), ue.current = null;
16349
16355
  }, [X, J]), U(() => {
16350
16356
  try {
16351
16357
  localStorage.setItem(S, JSON.stringify(xe));
@@ -16448,7 +16454,7 @@ function kk({
16448
16454
  return;
16449
16455
  }
16450
16456
  if ($e.length >= $) {
16451
- Se.error(`${$} columns max — unpin one first`);
16457
+ Ne.error(`${$} columns max — unpin one first`);
16452
16458
  return;
16453
16459
  }
16454
16460
  he([...$e, D]), fe((te) => te === D ? null : te);
@@ -16500,7 +16506,7 @@ function kk({
16500
16506
  }
16501
16507
  const [ht, Je] = te < we ? [te, we] : [we, te];
16502
16508
  let St = lt.slice(ht, Je + 1);
16503
- St.length > $ && (Se.error(`${$} panes max — selection trimmed`), St = we >= te ? St.slice(St.length - $) : St.slice(0, $)), he(St), fe(null), se(D);
16509
+ St.length > $ && (Ne.error(`${$} panes max — selection trimmed`), St = we >= te ? St.slice(St.length - $) : St.slice(0, $)), he(St), fe(null), se(D);
16504
16510
  },
16505
16511
  [lt]
16506
16512
  ), wt = ne(
@@ -16536,7 +16542,7 @@ function kk({
16536
16542
  try {
16537
16543
  await sl(D, "live_keyboard_shift_e"), m(D);
16538
16544
  } catch (ht) {
16539
- Se.error(ht instanceof Error ? ht.message : "Couldn't archive session");
16545
+ Ne.error(ht instanceof Error ? ht.message : "Couldn't archive session");
16540
16546
  } finally {
16541
16547
  await c().catch(() => {
16542
16548
  });
@@ -16558,7 +16564,7 @@ function kk({
16558
16564
  closeSession: gn,
16559
16565
  setCursor: se,
16560
16566
  setPreview: fe,
16561
- setRailCollapsed: Me,
16567
+ setRailCollapsed: Te,
16562
16568
  setShowHelp: de,
16563
16569
  showHelp: He,
16564
16570
  busyBySid: i,
@@ -16580,7 +16586,7 @@ function kk({
16580
16586
  closeSession: gn,
16581
16587
  setCursor: se,
16582
16588
  setPreview: fe,
16583
- setRailCollapsed: Me,
16589
+ setRailCollapsed: Te,
16584
16590
  setShowHelp: de,
16585
16591
  showHelp: He,
16586
16592
  busyBySid: i,
@@ -16817,7 +16823,7 @@ function kk({
16817
16823
  onClick: () => h(D),
16818
16824
  className: "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left hover:bg-muted",
16819
16825
  children: [
16820
- /* @__PURE__ */ n("span", { className: z("size-2 shrink-0 rounded-full", fl[D.severity]) }),
16826
+ /* @__PURE__ */ n("span", { className: P("size-2 shrink-0 rounded-full", fl[D.severity]) }),
16821
16827
  /* @__PURE__ */ d("span", { className: "flex min-w-0 flex-1 flex-col", children: [
16822
16828
  /* @__PURE__ */ n("span", { className: "truncate text-[13px] font-medium leading-tight", children: p(D.agentId) }),
16823
16829
  /* @__PURE__ */ n("span", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: D.title })
@@ -16840,7 +16846,7 @@ function kk({
16840
16846
  "button",
16841
16847
  {
16842
16848
  type: "button",
16843
- onClick: () => Me((D) => !D),
16849
+ onClick: () => Te((D) => !D),
16844
16850
  "aria-label": "Expand sidebar",
16845
16851
  title: "Expand sidebar (⌘B)",
16846
16852
  className: "flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted",
@@ -16869,7 +16875,7 @@ function kk({
16869
16875
  projects: T,
16870
16876
  onChange: C,
16871
16877
  solidSurface: !0,
16872
- onOpen: () => Ne(!0)
16878
+ onOpen: () => Se(!0)
16873
16879
  }
16874
16880
  ) : !Q && C ? /* @__PURE__ */ n(
16875
16881
  $s,
@@ -16911,7 +16917,7 @@ function kk({
16911
16917
  projects: T,
16912
16918
  onChange: C,
16913
16919
  solidSurface: !0,
16914
- onOpen: () => Ne(!0)
16920
+ onOpen: () => Se(!0)
16915
16921
  }
16916
16922
  ) : Q && C ? /* @__PURE__ */ n(
16917
16923
  $s,
@@ -16939,7 +16945,7 @@ function kk({
16939
16945
  "button",
16940
16946
  {
16941
16947
  type: "button",
16942
- onClick: () => Me((D) => !D),
16948
+ onClick: () => Te((D) => !D),
16943
16949
  "aria-label": "Collapse sidebar",
16944
16950
  title: "Collapse sidebar (⌘B)",
16945
16951
  className: "flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-muted",
@@ -17006,7 +17012,7 @@ function kk({
17006
17012
  /* @__PURE__ */ n(
17007
17013
  "div",
17008
17014
  {
17009
- className: z(
17015
+ className: P(
17010
17016
  "grid h-full min-h-0 min-w-0 flex-1 gap-3",
17011
17017
  // 1 pane → full; 2 → side by side; 3-4 → 2×2 (panes 1&2 top, 3&4 bottom).
17012
17018
  On.length <= 1 ? "grid-cols-1 grid-rows-1" : On.length === 2 ? "grid-cols-2 grid-rows-1" : "grid-cols-2 grid-rows-2"
@@ -17049,18 +17055,18 @@ function kk({
17049
17055
  /* @__PURE__ */ n(
17050
17056
  Kf,
17051
17057
  {
17052
- open: Te,
17058
+ open: _e,
17053
17059
  repos: L,
17054
17060
  selected: (V == null ? void 0 : V.cwd) ?? "",
17055
- onOpenChange: Ne,
17061
+ onOpenChange: Se,
17056
17062
  onSelect: (D) => {
17057
- C == null || C(Pn(D)), Ne(!1);
17063
+ C == null || C(Pn(D)), Se(!1);
17058
17064
  },
17059
17065
  onBrowse: () => be(!1),
17060
17066
  onCreate: () => be(!0),
17061
17067
  allSelected: s === "__all",
17062
17068
  onSelectAll: () => {
17063
- C == null || C("__all"), Ne(!1);
17069
+ C == null || C("__all"), Se(!1);
17064
17070
  },
17065
17071
  onReposChanged: Z
17066
17072
  }
@@ -17187,7 +17193,7 @@ const Sk = ls(function({
17187
17193
  "div",
17188
17194
  {
17189
17195
  "data-rail-sid": t.sessionId ?? "",
17190
- className: z(
17196
+ className: P(
17191
17197
  "lfg-rail-in relative rounded-xl",
17192
17198
  h ? "overflow-hidden" : "overflow-visible",
17193
17199
  i && "ring-2 ring-inset ring-primary/60"
@@ -17197,14 +17203,14 @@ const Sk = ls(function({
17197
17203
  "div",
17198
17204
  {
17199
17205
  "aria-hidden": !0,
17200
- className: z(
17206
+ className: P(
17201
17207
  "pointer-events-none absolute inset-0 flex items-center px-3",
17202
17208
  a ? "justify-end" : "justify-start"
17203
17209
  ),
17204
17210
  children: /* @__PURE__ */ n(
17205
17211
  sr,
17206
17212
  {
17207
- className: z("size-4", a ? "text-muted-foreground" : "text-primary"),
17213
+ className: P("size-4", a ? "text-muted-foreground" : "text-primary"),
17208
17214
  fill: a ? "none" : "currentColor"
17209
17215
  }
17210
17216
  )
@@ -17230,7 +17236,7 @@ const Sk = ls(function({
17230
17236
  onTouchMove: w,
17231
17237
  onTouchEnd: T,
17232
17238
  title: c ? Yn(t) : void 0,
17233
- className: z(
17239
+ className: P(
17234
17240
  "group relative flex cursor-pointer touch-pan-y select-none items-center gap-2 rounded-xl border py-1.5 outline-none transition-[background-color,box-shadow,border-color] duration-150",
17235
17241
  c ? "justify-center px-0" : "px-2",
17236
17242
  h ? "border-transparent bg-card" : o ? (
@@ -17282,7 +17288,7 @@ const Sk = ls(function({
17282
17288
  C.stopPropagation(), m();
17283
17289
  },
17284
17290
  "aria-label": a ? "Unpin column" : "Pin as column",
17285
- className: z(
17291
+ className: P(
17286
17292
  "flex size-6 shrink-0 items-center justify-center rounded-md transition-opacity",
17287
17293
  a ? "text-primary opacity-100" : "text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100"
17288
17294
  ),
@@ -17374,7 +17380,7 @@ function Ck({
17374
17380
  "aria-label": `Dismiss finding from ${t}`,
17375
17381
  tabIndex: i ? 0 : -1,
17376
17382
  onClick: h,
17377
- className: z(
17383
+ className: P(
17378
17384
  "absolute inset-0 flex items-center justify-end gap-2 rounded-xl bg-destructive pr-5 text-sm font-semibold text-white",
17379
17385
  i || l ? "" : "hidden",
17380
17386
  i ? "" : "pointer-events-none"
@@ -17408,7 +17414,7 @@ function Ck({
17408
17414
  className: "live-pane lfg-gborder relative z-[1] flex w-full touch-pan-y flex-col gap-1 rounded-xl border border-transparent bg-card px-3 py-2.5 text-left transition-[transform,opacity] active:scale-[0.99]",
17409
17415
  children: [
17410
17416
  /* @__PURE__ */ d("div", { className: "flex w-full items-center gap-2", children: [
17411
- /* @__PURE__ */ n("span", { className: z("size-2 shrink-0 rounded-full", fl[e.severity]) }),
17417
+ /* @__PURE__ */ n("span", { className: P("size-2 shrink-0 rounded-full", fl[e.severity]) }),
17412
17418
  /* @__PURE__ */ n("span", { className: "text-[13px] font-semibold", children: t }),
17413
17419
  /* @__PURE__ */ n("span", { className: "ml-auto text-[11px] text-muted-foreground", children: ml(e.createdAt) })
17414
17420
  ] }),
@@ -17425,7 +17431,7 @@ function Cs({
17425
17431
  action: s
17426
17432
  }) {
17427
17433
  return /* @__PURE__ */ d("div", { className: "mb-2 flex items-center gap-2 px-0.5", children: [
17428
- /* @__PURE__ */ n("span", { className: z("size-1.5 rounded-full", r) }),
17434
+ /* @__PURE__ */ n("span", { className: P("size-1.5 rounded-full", r) }),
17429
17435
  /* @__PURE__ */ n("span", { className: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e }),
17430
17436
  /* @__PURE__ */ n("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground", children: t }),
17431
17437
  s ? /* @__PURE__ */ n("div", { className: "ml-auto flex items-center", children: s }) : null
@@ -17447,7 +17453,7 @@ function pl({
17447
17453
  disabled: t || e === 0,
17448
17454
  onClick: r,
17449
17455
  "aria-label": `Triage and execute ${e} auto finding${e === 1 ? "" : "s"}`,
17450
- className: z(
17456
+ className: P(
17451
17457
  o && "gap-1.5",
17452
17458
  s && "size-5 rounded-md [&_svg]:size-3"
17453
17459
  ),
@@ -17641,7 +17647,7 @@ function _k({
17641
17647
  },
17642
17648
  onClick: () => t(m),
17643
17649
  onMouseEnter: () => i(f),
17644
- className: z(
17650
+ className: P(
17645
17651
  "flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm",
17646
17652
  f === o ? "bg-accent text-accent-foreground" : "hover:bg-accent/70"
17647
17653
  ),
@@ -17721,7 +17727,7 @@ function po({
17721
17727
  ...c,
17722
17728
  ref: y,
17723
17729
  value: e,
17724
- className: z(
17730
+ className: P(
17725
17731
  "relative z-0",
17726
17732
  c.className,
17727
17733
  o && "!pl-11",
@@ -17765,7 +17771,7 @@ function Rf({ className: e, ...t }) {
17765
17771
  po,
17766
17772
  {
17767
17773
  ...t,
17768
- className: z(
17774
+ className: P(
17769
17775
  "max-h-40 min-w-0 flex-1 resize-none overflow-y-auto [field-sizing:fixed] md:max-h-36",
17770
17776
  e
17771
17777
  )
@@ -17837,8 +17843,8 @@ function Ak({
17837
17843
  },
17838
17844
  [e.project, e.title, c, m]
17839
17845
  ), Y = ne(
17840
- (se, Te) => {
17841
- he(Te.trim() ? `${Te.trimEnd()} ${se}` : se), F((Ne) => Ne + 1);
17846
+ (se, _e) => {
17847
+ he(_e.trim() ? `${_e.trimEnd()} ${se}` : se), F((Se) => Se + 1);
17842
17848
  },
17843
17849
  [he]
17844
17850
  );
@@ -17851,27 +17857,27 @@ function Ak({
17851
17857
  return;
17852
17858
  }
17853
17859
  let se = !1;
17854
- const Te = sx(c);
17855
- return Te ? (_(Te.messages), T(Te.nextBefore), y(!1)) : (y(!0), T(null), _([])), ke(
17860
+ const _e = sx(c);
17861
+ return _e ? (_(_e.messages), T(_e.nextBefore), y(!1)) : (y(!0), T(null), _([])), ke(
17856
17862
  `/api/sessions/${encodeURIComponent(c)}/messages?limit=80`,
17857
17863
  { cache: "no-store" }
17858
- ).then((Ne) => {
17864
+ ).then((Se) => {
17859
17865
  if (se) return;
17860
- const je = Hs(Array.isArray(Ne.messages) ? Ne.messages : []), Ke = new Set(je.map((be) => be.id)), Ze = Te ? Te.messages.slice(
17866
+ const je = Hs(Array.isArray(Se.messages) ? Se.messages : []), Ke = new Set(je.map((be) => be.id)), Ze = _e ? _e.messages.slice(
17861
17867
  0,
17862
- Math.max(0, Te.messages.findIndex((be) => Ke.has(be.id)))
17868
+ Math.max(0, _e.messages.findIndex((be) => Ke.has(be.id)))
17863
17869
  ) : [], ae = new Set(Ze.map((be) => be.id));
17864
17870
  let re = je;
17865
17871
  _((be) => {
17866
17872
  const He = be.filter(
17867
17873
  (I) => !Ke.has(I.id) && !ae.has(I.id)
17868
- ), de = new Set((Te == null ? void 0 : Te.messages.map((I) => I.id)) ?? []), We = He.filter((I) => !de.has(I.id));
17874
+ ), de = new Set((_e == null ? void 0 : _e.messages.map((I) => I.id)) ?? []), We = He.filter((I) => !de.has(I.id));
17869
17875
  return re = [...Ze, ...je, ...We];
17870
17876
  });
17871
- const V = Ze.length ? (Te == null ? void 0 : Te.nextBefore) ?? null : Ne.nextBefore ?? null;
17877
+ const V = Ze.length ? (_e == null ? void 0 : _e.nextBefore) ?? null : Se.nextBefore ?? null;
17872
17878
  T(V), Yi(c, re, V);
17873
- }).catch((Ne) => {
17874
- se || o(Ne instanceof Error ? Ne.message : String(Ne));
17879
+ }).catch((Se) => {
17880
+ se || o(Se instanceof Error ? Se.message : String(Se));
17875
17881
  }).finally(() => {
17876
17882
  se || y(!1);
17877
17883
  }), () => {
@@ -17884,33 +17890,33 @@ function Ak({
17884
17890
  o(se.error);
17885
17891
  return;
17886
17892
  }
17887
- se.type === "busy" && J(se.busy), _((Te) => {
17888
- const Ne = Jb(Te, se, {
17893
+ se.type === "busy" && J(se.busy), _((_e) => {
17894
+ const Se = Jb(_e, se, {
17889
17895
  streamActive: pe.owns(c)
17890
17896
  });
17891
- return Ne !== Te && ox(c, Ne), Ne;
17897
+ return Se !== _e && ox(c, Se), Se;
17892
17898
  });
17893
17899
  });
17894
17900
  }, [o, i, pe, _, c]);
17895
17901
  const fe = ne(async () => {
17896
17902
  if (!c || w == null) return !1;
17897
- const se = w, Te = await ke(
17903
+ const se = w, _e = await ke(
17898
17904
  `/api/sessions/${encodeURIComponent(c)}/messages?page=backward&before=${se}&limit=80`,
17899
17905
  { cache: "no-store" }
17900
- ), Ne = Hs(Array.isArray(Te.messages) ? Te.messages : []);
17901
- if (T(Te.nextBefore ?? null), !Ne.length) return (Te.nextBefore ?? null) !== null;
17902
- let je = Ne;
17906
+ ), Se = Hs(Array.isArray(_e.messages) ? _e.messages : []);
17907
+ if (T(_e.nextBefore ?? null), !Se.length) return (_e.nextBefore ?? null) !== null;
17908
+ let je = Se;
17903
17909
  return _((Ke) => {
17904
- const Ze = new Set(Ke.map((re) => re.id)), ae = Ne.filter((re) => !Ze.has(re.id));
17910
+ const Ze = new Set(Ke.map((re) => re.id)), ae = Se.filter((re) => !Ze.has(re.id));
17905
17911
  return je = ae.length ? [...ae, ...Ke] : Ke;
17906
- }), Yi(c, je, Te.nextBefore ?? null), (Te.nextBefore ?? null) !== null;
17912
+ }), Yi(c, je, _e.nextBefore ?? null), (_e.nextBefore ?? null) !== null;
17907
17913
  }, [w, _, c]);
17908
- async function me(se, Te, Ne = "steer") {
17914
+ async function me(se, _e, Se = "steer") {
17909
17915
  var re;
17910
17916
  se == null || se.preventDefault();
17911
- const je = (Te ?? f).trim(), Ke = L;
17917
+ const je = (_e ?? f).trim(), Ke = L;
17912
17918
  if (!c || !je && !Ke.length) return;
17913
- const Ze = Ne === "queue" && xe;
17919
+ const Ze = Se === "queue" && xe;
17914
17920
  (re = N.current) == null || re.blur();
17915
17921
  const ae = Zi({
17916
17922
  contextKey: m,
@@ -17935,7 +17941,7 @@ function Ak({
17935
17941
  }), Wn(ae == null ? void 0 : ae.id, "sent");
17936
17942
  for (const He of Ke)
17937
17943
  He.previewUrl && URL.revokeObjectURL(He.previewUrl);
17938
- Z([]), ie(), Se.success("Session resumed"), await a();
17944
+ Z([]), ie(), Ne.success("Session resumed"), await a();
17939
17945
  return;
17940
17946
  }
17941
17947
  pe.run(
@@ -17955,7 +17961,7 @@ function Ak({
17955
17961
  }
17956
17962
  }
17957
17963
  },
17958
- { body: { mode: Ne } }
17964
+ { body: { mode: Se } }
17959
17965
  )
17960
17966
  ).then(() => Wn(ae == null ? void 0 : ae.id, "sent")).catch((He) => {
17961
17967
  Wn(ae == null ? void 0 : ae.id, "draft"), p((de) => de || je), o(He instanceof Error ? He.message : String(He));
@@ -17971,7 +17977,7 @@ function Ak({
17971
17977
  b(!1);
17972
17978
  }
17973
17979
  }
17974
- async function Me() {
17980
+ async function Te() {
17975
17981
  if (c)
17976
17982
  try {
17977
17983
  await ke(`/api/sessions/${c}/interrupt`, { method: "POST" }), await a();
@@ -17982,7 +17988,7 @@ function Ak({
17982
17988
  const Oe = ne(
17983
17989
  (se) => {
17984
17990
  !c || !se.queueId || Pb(c, se.queueId).catch(
17985
- (Te) => o(Te instanceof Error ? Te.message : String(Te))
17991
+ (_e) => o(_e instanceof Error ? _e.message : String(_e))
17986
17992
  );
17987
17993
  },
17988
17994
  [c, o]
@@ -18016,7 +18022,7 @@ function Ak({
18016
18022
  {
18017
18023
  onSubmit: me,
18018
18024
  ...H.dropZoneProps,
18019
- className: z(
18025
+ className: P(
18020
18026
  // Sit on the same surface as the chat (no card/border seam) and let
18021
18027
  // the transcript melt into the bar via a soft gradient fade so the
18022
18028
  // composer reads as part of the conversation, not a bolted-on panel.
@@ -18043,7 +18049,7 @@ function Ak({
18043
18049
  /* @__PURE__ */ d(
18044
18050
  "div",
18045
18051
  {
18046
- className: z(
18052
+ className: P(
18047
18053
  "flex gap-2",
18048
18054
  q ? "items-end" : "items-center"
18049
18055
  ),
@@ -18076,19 +18082,19 @@ function Ak({
18076
18082
  insetEnd: !0,
18077
18083
  onPaste: H.onPasteFiles,
18078
18084
  onKeyDown: (se) => {
18079
- var Te;
18085
+ var _e;
18080
18086
  if (!(se.key !== "Enter" || se.shiftKey)) {
18081
18087
  if (se.preventDefault(), se.metaKey || se.ctrlKey) {
18082
18088
  me(void 0, void 0, "queue");
18083
18089
  return;
18084
18090
  }
18085
- (Te = se.currentTarget.form) == null || Te.requestSubmit();
18091
+ (_e = se.currentTarget.form) == null || _e.requestSubmit();
18086
18092
  }
18087
18093
  },
18088
18094
  placeholder: L.length ? "Add a note" : u ? "Message to resume" : "Message",
18089
18095
  disabled: h,
18090
18096
  rows: 1,
18091
- className: z(
18097
+ className: P(
18092
18098
  // Height and follow-scroll are owned by ComposerTextarea.
18093
18099
  // Rest at one line; the shared cap stops before the transcript.
18094
18100
  "lfg-gfield min-h-11 rounded-2xl border-transparent px-4 py-3 text-base leading-5 shadow-sm transition-[background-color,border-color,box-shadow] duration-300 ease-ios placeholder:text-muted-foreground md:min-h-9 md:rounded-[1.125rem] md:px-3.5 md:py-2 md:text-sm"
@@ -18104,9 +18110,9 @@ function Ak({
18104
18110
  onRecordingChange: l,
18105
18111
  onText: Y,
18106
18112
  onInterim: Y,
18107
- onAutoSubmit: (se, Te) => {
18108
- const Ne = Te.trim() ? `${Te.trimEnd()} ${se}` : se;
18109
- me(void 0, Ne);
18113
+ onAutoSubmit: (se, _e) => {
18114
+ const Se = _e.trim() ? `${_e.trimEnd()} ${se}` : se;
18115
+ me(void 0, Se);
18110
18116
  },
18111
18117
  onCancel: (se) => he(se)
18112
18118
  }
@@ -18119,7 +18125,7 @@ function Ak({
18119
18125
  type: "button",
18120
18126
  variant: "tint",
18121
18127
  className: "size-11 md:size-9",
18122
- onClick: () => void Me(),
18128
+ onClick: () => void Te(),
18123
18129
  "aria-label": "Stop (Esc or Ctrl/Cmd+.)",
18124
18130
  title: "Stop — Esc or Ctrl/Cmd+.",
18125
18131
  children: /* @__PURE__ */ n(to, { className: "size-4" })
@@ -18137,9 +18143,9 @@ function Ak({
18137
18143
  onRecordingChange: l,
18138
18144
  onText: Y,
18139
18145
  onInterim: Y,
18140
- onAutoSubmit: (se, Te) => {
18141
- const Ne = Te.trim() ? `${Te.trimEnd()} ${se}` : se;
18142
- me(void 0, Ne);
18146
+ onAutoSubmit: (se, _e) => {
18147
+ const Se = _e.trim() ? `${_e.trimEnd()} ${se}` : se;
18148
+ me(void 0, Se);
18143
18149
  },
18144
18150
  onCancel: (se) => he(se)
18145
18151
  }
@@ -18222,7 +18228,7 @@ function $k({ title: e }) {
18222
18228
  "div",
18223
18229
  {
18224
18230
  ref: t,
18225
- className: z(
18231
+ className: P(
18226
18232
  "text-[17px] font-semibold leading-tight whitespace-nowrap",
18227
18233
  o ? "lfg-marquee inline-block" : "overflow-hidden text-ellipsis"
18228
18234
  ),
@@ -18269,7 +18275,7 @@ function Bf({
18269
18275
  async function f() {
18270
18276
  if (l)
18271
18277
  try {
18272
- await hl(z1(l)), Se.success("Session reference copied");
18278
+ await hl(z1(l)), Ne.success("Session reference copied");
18273
18279
  } catch (h) {
18274
18280
  o(h instanceof Error ? h.message : "Could not copy session reference");
18275
18281
  }
@@ -18350,7 +18356,7 @@ function Ff({
18350
18356
  "button",
18351
18357
  {
18352
18358
  type: "button",
18353
- className: z(
18359
+ className: P(
18354
18360
  "flex size-7 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted",
18355
18361
  l
18356
18362
  ),
@@ -18411,7 +18417,7 @@ function Ff({
18411
18417
  value: O.value,
18412
18418
  onValueChange: (q) => {
18413
18419
  q !== "full" && q !== "user-lfg-output" || O.onChange(q).catch((ce) => {
18414
- Se.error(ce instanceof Error ? ce.message : "Couldn’t change message view");
18420
+ Ne.error(ce instanceof Error ? ce.message : "Couldn’t change message view");
18415
18421
  });
18416
18422
  },
18417
18423
  children: [
@@ -18515,7 +18521,7 @@ function zk({
18515
18521
  onRefresh: s,
18516
18522
  onRemove: o,
18517
18523
  onError: (N) => {
18518
- N && Se.error(N);
18524
+ N && Ne.error(N);
18519
18525
  }
18520
18526
  }), k = Ht(di);
18521
18527
  return /* @__PURE__ */ d(Be, { children: [
@@ -18601,7 +18607,7 @@ function zk({
18601
18607
  value: k.value,
18602
18608
  onValueChange: (N) => {
18603
18609
  N !== "full" && N !== "user-lfg-output" || k.onChange(N).catch((O) => {
18604
- Se.error(O instanceof Error ? O.message : "Couldn’t change message view");
18610
+ Ne.error(O instanceof Error ? O.message : "Couldn’t change message view");
18605
18611
  });
18606
18612
  },
18607
18613
  children: [
@@ -18674,7 +18680,7 @@ function Ok({
18674
18680
  method: "POST",
18675
18681
  headers: { "Content-Type": "application/json" },
18676
18682
  body: JSON.stringify({ thinkingLevel: m })
18677
- }), localStorage.setItem("lfg_thinking_level", m), await t(), Se.success(`Thinking level set to ${m}`);
18683
+ }), localStorage.setItem("lfg_thinking_level", m), await t(), Ne.success(`Thinking level set to ${m}`);
18678
18684
  } catch (f) {
18679
18685
  r(f instanceof Error ? f.message : String(f));
18680
18686
  } finally {
@@ -18736,7 +18742,7 @@ function Lk({
18736
18742
  async (M) => {
18737
18743
  y(null), T(!1);
18738
18744
  try {
18739
- await m(e, M), Se.success("Session renamed");
18745
+ await m(e, M), Ne.success("Session renamed");
18740
18746
  } catch (S) {
18741
18747
  throw y(S instanceof Error ? S.message : String(S)), T(!0), S;
18742
18748
  }
@@ -18790,24 +18796,24 @@ function Lk({
18790
18796
  E.active = !0, E.decided = !1, E.horizontal = !1, E.x0 = Oe.clientX, E.y0 = Oe.clientY, E.dx = 0;
18791
18797
  }, he = (fe) => {
18792
18798
  if (!E.active) return;
18793
- const me = fe.touches[0], Me = me.clientX - E.x0, Oe = me.clientY - E.y0;
18799
+ const me = fe.touches[0], Te = me.clientX - E.x0, Oe = me.clientY - E.y0;
18794
18800
  if (!E.decided) {
18795
- if (Math.abs(Me) < 8 && Math.abs(Oe) < 8) return;
18796
- if (E.decided = !0, E.horizontal = Math.abs(Me) > Math.abs(Oe), !E.horizontal) {
18801
+ if (Math.abs(Te) < 8 && Math.abs(Oe) < 8) return;
18802
+ if (E.decided = !0, E.horizontal = Math.abs(Te) > Math.abs(Oe), !E.horizontal) {
18797
18803
  E.active = !1;
18798
18804
  return;
18799
18805
  }
18800
18806
  }
18801
18807
  if (!E.horizontal) return;
18802
- fe.preventDefault(), E.dx = Me;
18803
- const se = Me > 0 ? !L : !Z;
18804
- X(Me * (se ? 0.18 : 0.5));
18808
+ fe.preventDefault(), E.dx = Te;
18809
+ const se = Te > 0 ? !L : !Z;
18810
+ X(Te * (se ? 0.18 : 0.5));
18805
18811
  }, Y = () => {
18806
18812
  if (!E.active) return;
18807
18813
  const { horizontal: fe, dx: me } = E;
18808
18814
  if (E.active = !1, !fe) return;
18809
- const Me = me > S ? L : me < -S ? Z : null;
18810
- Me ? Q(Me) : J();
18815
+ const Te = me > S ? L : me < -S ? Z : null;
18816
+ Te ? Q(Te) : J();
18811
18817
  };
18812
18818
  return M.addEventListener("touchstart", xe, { passive: !0 }), M.addEventListener("touchmove", he, { passive: !1 }), M.addEventListener("touchend", Y, { passive: !0 }), M.addEventListener("touchcancel", Y, { passive: !0 }), () => {
18813
18819
  M.removeEventListener("touchstart", xe), M.removeEventListener("touchmove", he), M.removeEventListener("touchend", Y), M.removeEventListener("touchcancel", Y);
@@ -18879,34 +18885,34 @@ function Lk({
18879
18885
  O.current = !0, pt("selection");
18880
18886
  const Y = k.current, fe = N.current;
18881
18887
  let me = !1;
18882
- const Me = () => {
18888
+ const Te = () => {
18883
18889
  me || (me = !0, b());
18884
18890
  };
18885
18891
  M.getAnimations().forEach((se) => se.cancel()), M.style.transition = "transform 300ms cubic-bezier(0.32,0.72,0,1), opacity 220ms ease-out", M.style.transform = "translate3d(0, -105%, 0)", M.style.opacity = "0.92";
18886
18892
  const Oe = (se) => {
18887
- se.propertyName === "transform" && (M.removeEventListener("transitionend", Oe), Me());
18893
+ se.propertyName === "transform" && (M.removeEventListener("transitionend", Oe), Te());
18888
18894
  };
18889
- M.addEventListener("transitionend", Oe), window.setTimeout(Me, 340), Y && (Y.style.transition = "opacity 240ms ease-out", Y.style.opacity = "0"), fe && (fe.style.transition = "transform 260ms cubic-bezier(0.32,0.72,0,1), opacity 180ms ease-out", fe.style.transform = "translate3d(0, -18px, 0)", fe.style.opacity = "0");
18895
+ M.addEventListener("transitionend", Oe), window.setTimeout(Te, 340), Y && (Y.style.transition = "opacity 240ms ease-out", Y.style.opacity = "0"), fe && (fe.style.transition = "transform 260ms cubic-bezier(0.32,0.72,0,1), opacity 180ms ease-out", fe.style.transform = "translate3d(0, -18px, 0)", fe.style.opacity = "0");
18890
18896
  }, J = (Y) => {
18891
18897
  if (O.current || Y.touches.length !== 1) return;
18892
18898
  const fe = Y.target;
18893
18899
  if (!(fe != null && fe.closest("form"))) return;
18894
18900
  const me = Y.touches[0];
18895
- S.active = !0, S.decided = !1, S.dismissing = !1, S.x0 = me.clientX, S.y0 = me.clientY, S.y = 0, S.t0 = performance.now(), M.getAnimations().forEach((Me) => {
18896
- Me.playState !== "finished" && Me.cancel();
18901
+ S.active = !0, S.decided = !1, S.dismissing = !1, S.x0 = me.clientX, S.y0 = me.clientY, S.y = 0, S.t0 = performance.now(), M.getAnimations().forEach((Te) => {
18902
+ Te.playState !== "finished" && Te.cancel();
18897
18903
  }), E(0);
18898
18904
  }, xe = (Y) => {
18899
18905
  if (!S.active) return;
18900
- const fe = Y.touches[0], me = fe.clientX - S.x0, Me = fe.clientY - S.y0;
18906
+ const fe = Y.touches[0], me = fe.clientX - S.x0, Te = fe.clientY - S.y0;
18901
18907
  if (!S.decided) {
18902
- if (Math.abs(me) < 8 && Math.abs(Me) < 8) return;
18903
- if (S.decided = !0, S.dismissing = Me < 0 && Math.abs(Me) > Math.abs(me) * 1.2, !S.dismissing) {
18908
+ if (Math.abs(me) < 8 && Math.abs(Te) < 8) return;
18909
+ if (S.decided = !0, S.dismissing = Te < 0 && Math.abs(Te) > Math.abs(me) * 1.2, !S.dismissing) {
18904
18910
  S.active = !1;
18905
18911
  return;
18906
18912
  }
18907
18913
  }
18908
18914
  if (!S.dismissing) return;
18909
- Y.preventDefault(), S.y = -Math.min(Math.abs(Me), window.innerHeight * 0.6), E(S.y);
18915
+ Y.preventDefault(), S.y = -Math.min(Math.abs(Te), window.innerHeight * 0.6), E(S.y);
18910
18916
  const Oe = k.current;
18911
18917
  Oe && (Oe.style.opacity = `${1 - Math.min(0.35, Math.abs(S.y) / 520)}`);
18912
18918
  }, he = () => {
@@ -19097,14 +19103,14 @@ function qf({
19097
19103
  function H(L, Z) {
19098
19104
  if (L == null || L.preventDefault(), !N) return;
19099
19105
  if (!c.some((oe) => oe.key === f)) {
19100
- Se.error(
19106
+ Ne.error(
19101
19107
  `Set up and sign in to a coding agent before ${o ? "continuing" : "forking"} a session.`
19102
19108
  );
19103
19109
  return;
19104
19110
  }
19105
19111
  localStorage.setItem("lfg_fork_agent", f), localStorage.setItem(`lfg_fork_model_${f}`, x), Cn(f) && localStorage.setItem("lfg_thinking_level", w);
19106
19112
  const Q = (Z ?? C).trim(), K = ce.attachments;
19107
- r(), Se.promise(
19113
+ r(), Ne.promise(
19108
19114
  (async () => {
19109
19115
  const oe = K.length ? await Promise.all(K.map(ce.resolveUpload)) : [], ie = Xo(Q, oe);
19110
19116
  return ke(`/api/sessions/${N}/fork`, {
@@ -19148,7 +19154,7 @@ function qf({
19148
19154
  {
19149
19155
  onSubmit: H,
19150
19156
  ...ce.dropZoneProps,
19151
- className: z(
19157
+ className: P(
19152
19158
  "min-w-0 px-4 pb-5 pt-3 transition-colors",
19153
19159
  ce.draggingFiles && "bg-primary/8"
19154
19160
  ),
@@ -19276,7 +19282,7 @@ const Hf = ls(function({
19276
19282
  if (q) {
19277
19283
  N(null), F(!1);
19278
19284
  try {
19279
- await c(q, ae), Se.success("Session renamed");
19285
+ await c(q, ae), Ne.success("Session renamed");
19280
19286
  } catch (re) {
19281
19287
  const V = re instanceof Error ? re.message : String(re);
19282
19288
  throw N(V), F(!0), re;
@@ -19347,7 +19353,7 @@ const Hf = ls(function({
19347
19353
  async function me() {
19348
19354
  const ae = Q.current;
19349
19355
  if (!q) {
19350
- Me();
19356
+ Te();
19351
19357
  return;
19352
19358
  }
19353
19359
  if (!await w.confirm({
@@ -19356,12 +19362,12 @@ const Hf = ls(function({
19356
19362
  confirmLabel: "Archive session",
19357
19363
  destructive: !0
19358
19364
  })) {
19359
- Me();
19365
+ Te();
19360
19366
  return;
19361
19367
  }
19362
19368
  pt("warning"), _(!1), xe.current = "none", ae && (ae.style.transition = "transform 0.26s var(--ease-ios), opacity 0.26s", ae.style.transform = `translateX(-${ae.offsetWidth}px)`, ae.style.opacity = "0"), window.setTimeout(() => void fe(), 280);
19363
19369
  }
19364
- function Me() {
19370
+ function Te() {
19365
19371
  const ae = Q.current;
19366
19372
  ae && (ae.style.transition = ""), _(!1), S(null), xe.current = "none", Y(0);
19367
19373
  }
@@ -19389,7 +19395,7 @@ const Hf = ls(function({
19389
19395
  de < -re.w && (de = -re.w), de > 0 && (de = 0), re.x = de, S(de < -6 ? "archive" : null), Y(de);
19390
19396
  return;
19391
19397
  }
19392
- }, Te = () => {
19398
+ }, _e = () => {
19393
19399
  const ae = J.current;
19394
19400
  if (!ae.dragging) return;
19395
19401
  ae.dragging = !1, S(null);
@@ -19407,20 +19413,20 @@ const Hf = ls(function({
19407
19413
  V !== "none" && xe.current === "none" && pt("selection"), xe.current = V, _(V === "archive"), Y(V === "archive" ? -116 : 0);
19408
19414
  return;
19409
19415
  }
19410
- }, Ne = (ae) => {
19416
+ }, Se = (ae) => {
19411
19417
  if (C) {
19412
19418
  if (J.current.justSwiped) {
19413
19419
  J.current.justSwiped = !1;
19414
19420
  return;
19415
19421
  }
19416
19422
  if (xe.current !== "none") {
19417
- Me();
19423
+ Te();
19418
19424
  return;
19419
19425
  }
19420
19426
  !m || !q || (pt("selection"), m(q, ae.currentTarget.getBoundingClientRect()));
19421
19427
  }
19422
19428
  }, je = C;
19423
- return /* @__PURE__ */ d("div", { className: z("relative min-w-0 md:static", f === "stage" && "md:h-full"), children: [
19429
+ return /* @__PURE__ */ d("div", { className: P("relative min-w-0 md:static", f === "stage" && "md:h-full"), children: [
19424
19430
  /* @__PURE__ */ d(
19425
19431
  "button",
19426
19432
  {
@@ -19428,7 +19434,7 @@ const Hf = ls(function({
19428
19434
  "aria-label": "Archive session",
19429
19435
  tabIndex: $ ? 0 : -1,
19430
19436
  onClick: () => void me(),
19431
- className: z(
19437
+ className: P(
19432
19438
  "absolute inset-0 flex items-center justify-end gap-2 rounded-xl bg-destructive pr-6 text-sm font-semibold text-white md:hidden",
19433
19439
  $ || M === "archive" ? "" : "hidden",
19434
19440
  // out of the paint tree unless mid-swipe
@@ -19446,9 +19452,9 @@ const Hf = ls(function({
19446
19452
  ref: Q,
19447
19453
  onTouchStart: Oe,
19448
19454
  onTouchMove: se,
19449
- onTouchEnd: Te,
19455
+ onTouchEnd: _e,
19450
19456
  style: C ? { height: pe } : void 0,
19451
- className: z(
19457
+ className: P(
19452
19458
  "live-pane relative z-[1] flex h-[22rem] touch-pan-y flex-col overflow-hidden rounded-xl border bg-card text-card-foreground transition-[height,transform,border-color,box-shadow] duration-300 ease-ios md:static md:transition-[border-color,box-shadow]",
19453
19459
  h && "lfg-card-in",
19454
19460
  f === "stage" ? "md:h-full" : "md:h-[clamp(30rem,72vh,46rem)]",
@@ -19475,7 +19481,7 @@ const Hf = ls(function({
19475
19481
  $a,
19476
19482
  {
19477
19483
  session: t,
19478
- className: z(
19484
+ className: P(
19479
19485
  "rounded-lg transition-all duration-300 ease-ios",
19480
19486
  o ? "size-4" : "size-6"
19481
19487
  ),
@@ -19494,7 +19500,7 @@ const Hf = ls(function({
19494
19500
  "button",
19495
19501
  {
19496
19502
  type: "button",
19497
- onClick: Ne,
19503
+ onClick: Se,
19498
19504
  onDoubleClick: (ae) => {
19499
19505
  C || t.shippedReview || (ae.preventDefault(), ae.stopPropagation(), ce());
19500
19506
  },
@@ -19502,7 +19508,7 @@ const Hf = ls(function({
19502
19508
  onSelect: (ae) => ae.preventDefault(),
19503
19509
  onContextMenu: (ae) => ae.preventDefault(),
19504
19510
  title: C || t.shippedReview ? void 0 : "Double-click to rename",
19505
- className: z(
19511
+ className: P(
19506
19512
  "flex min-w-0 flex-1 touch-manipulation select-none items-center gap-2 text-left outline-none [-webkit-touch-callout:none] [-webkit-user-drag:none] [-webkit-user-select:none] [user-select:none]",
19507
19513
  !C && !t.shippedReview && "cursor-text rounded-md hover:bg-muted/50"
19508
19514
  ),
@@ -19666,7 +19672,7 @@ const Hf = ls(function({
19666
19672
  const oe = K.currentTarget;
19667
19673
  m(oe.scrollHeight - oe.scrollTop - oe.clientHeight < 72), Q();
19668
19674
  },
19669
- className: z(
19675
+ className: P(
19670
19676
  "chat-stream min-h-0 flex-1 overflow-y-auto bg-background px-3 pt-3",
19671
19677
  // Only reserve room for the floating "files changed / Review" bar
19672
19678
  // while it's actually shown, so it never overlaps the last message.
@@ -19721,7 +19727,7 @@ const Hf = ls(function({
19721
19727
  /* @__PURE__ */ n(
19722
19728
  "div",
19723
19729
  {
19724
- className: z(
19730
+ className: P(
19725
19731
  "pointer-events-none absolute inset-x-0 z-10 flex justify-center transition-[bottom] duration-200 ease-out",
19726
19732
  x ? "bottom-14" : "bottom-3"
19727
19733
  ),
@@ -19733,7 +19739,7 @@ const Hf = ls(function({
19733
19739
  "aria-hidden": u,
19734
19740
  tabIndex: u ? -1 : 0,
19735
19741
  "aria-label": "Scroll to latest",
19736
- className: z(
19742
+ className: P(
19737
19743
  "lfg-scroll-pill pointer-events-auto flex items-center gap-1.5 rounded-full border border-border bg-card/95 px-3 py-1.5 text-xs font-medium text-foreground shadow-md backdrop-blur",
19738
19744
  u && "lfg-scroll-pill--hidden"
19739
19745
  ),
@@ -19817,7 +19823,7 @@ function Vf({
19817
19823
  /* @__PURE__ */ d(
19818
19824
  "span",
19819
19825
  {
19820
- className: z(
19826
+ className: P(
19821
19827
  "lfg-organic-activity",
19822
19828
  t,
19823
19829
  s.exiting ? "is-exiting" : "is-active"
@@ -19862,7 +19868,7 @@ function qk({ items: e, live: t }) {
19862
19868
  const C = w.kind === "tool_use", k = w.text || (C ? "No command details" : "No result details"), N = C ? k.indexOf(":") : -1, O = C ? (N >= 0 ? k.slice(0, N) : k) || "Command" : `Result${e.filter((q) => q.kind === "tool_result").length > 1 ? ` ${T + 1}` : ""}`, F = C && N >= 0 ? k.slice(N + 1).trim() : C ? "" : k;
19863
19869
  return /* @__PURE__ */ d("div", { className: "min-w-0", children: [
19864
19870
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-2 text-xs font-semibold text-foreground", children: [
19865
- /* @__PURE__ */ n("span", { className: z("size-1.5 rounded-full", C ? "bg-primary" : "bg-muted-foreground/60") }),
19871
+ /* @__PURE__ */ n("span", { className: P("size-1.5 rounded-full", C ? "bg-primary" : "bg-muted-foreground/60") }),
19866
19872
  /* @__PURE__ */ n("span", { className: "truncate font-mono", children: O })
19867
19873
  ] }),
19868
19874
  F ? /* @__PURE__ */ n("pre", { className: "max-h-52 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-muted/60 p-2.5 font-mono text-[11px] leading-relaxed text-muted-foreground", children: F }) : null
@@ -19871,7 +19877,7 @@ function qk({ items: e, live: t }) {
19871
19877
  "button",
19872
19878
  {
19873
19879
  type: "button",
19874
- className: z(
19880
+ className: P(
19875
19881
  "tool-call-row not-prose flex w-fit max-w-full cursor-pointer items-center gap-2 rounded-full px-2.5 py-1 text-left text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
19876
19882
  t && "tool-call-row--live text-foreground"
19877
19883
  ),
@@ -19886,7 +19892,7 @@ function qk({ items: e, live: t }) {
19886
19892
  /* @__PURE__ */ n(
19887
19893
  "span",
19888
19894
  {
19889
- className: z(
19895
+ className: P(
19890
19896
  "relative z-[1] size-1.5 shrink-0 rounded-full bg-muted-foreground/55",
19891
19897
  t && "animate-pulse bg-foreground"
19892
19898
  ),
@@ -19927,7 +19933,7 @@ function Wf({ visible: e = !0 }) {
19927
19933
  return /* @__PURE__ */ n(
19928
19934
  "div",
19929
19935
  {
19930
- className: z("typing-indicator-slot", e && "is-visible"),
19936
+ className: P("typing-indicator-slot", e && "is-visible"),
19931
19937
  "aria-hidden": !e,
19932
19938
  children: /* @__PURE__ */ d("div", { className: "typing-indicator", role: "status", "aria-label": "Assistant is typing", children: [
19933
19939
  /* @__PURE__ */ n("span", { "aria-hidden": "true" }),
@@ -19954,7 +19960,7 @@ function Vk({
19954
19960
  attachments: e,
19955
19961
  pending: t
19956
19962
  }) {
19957
- return /* @__PURE__ */ n("div", { className: z("user-attachments", t && "is-pending"), children: e.map(
19963
+ return /* @__PURE__ */ n("div", { className: P("user-attachments", t && "is-pending"), children: e.map(
19958
19964
  (r) => r.url ? /* @__PURE__ */ n(
19959
19965
  La,
19960
19966
  {
@@ -19986,7 +19992,7 @@ function Wk({
19986
19992
  }, [e, o]), /* @__PURE__ */ d(
19987
19993
  _s,
19988
19994
  {
19989
- className: z(
19995
+ className: P(
19990
19996
  // MessageContent's own base classes include text-sm; since it and
19991
19997
  // .msg-text.markdown's font-size both land on this same element,
19992
19998
  // Tailwind's utilities layer beats our @layer components rule
@@ -20007,7 +20013,7 @@ function Wk({
20007
20013
  "div",
20008
20014
  {
20009
20015
  ref: c,
20010
- className: z(
20016
+ className: P(
20011
20017
  "user-bubble-body relative z-[1]",
20012
20018
  !o && "user-bubble-clamp"
20013
20019
  ),
@@ -20048,7 +20054,7 @@ function Gk({
20048
20054
  /* @__PURE__ */ n(
20049
20055
  Jt,
20050
20056
  {
20051
- className: z("size-3 transition-transform", r && "rotate-90"),
20057
+ className: P("size-3 transition-transform", r && "rotate-90"),
20052
20058
  "aria-hidden": "true"
20053
20059
  }
20054
20060
  )
@@ -20082,9 +20088,9 @@ function ed({
20082
20088
  const b = ne(async () => {
20083
20089
  if (e)
20084
20090
  try {
20085
- await hl(e), p(!0), window.setTimeout(() => p(!1), 1600), Se("Message copied"), pt("success");
20091
+ await hl(e), p(!0), window.setTimeout(() => p(!1), 1600), Ne("Message copied"), pt("success");
20086
20092
  } catch {
20087
- Se.error("Couldn’t copy message");
20093
+ Ne.error("Couldn’t copy message");
20088
20094
  }
20089
20095
  }, [e]), x = ne(() => {
20090
20096
  const k = s.current;
@@ -20117,7 +20123,7 @@ function ed({
20117
20123
  return /* @__PURE__ */ d(
20118
20124
  "div",
20119
20125
  {
20120
- className: z(
20126
+ className: P(
20121
20127
  // Cap width on this direct child of Message (which has a definite
20122
20128
  // w-full). Nested max-w-[85%] on the bubble used to resolve against a
20123
20129
  // content-sized ancestor after MessageActions was introduced, so the
@@ -20239,7 +20245,7 @@ function td({
20239
20245
  ] }) }) });
20240
20246
  if (e.kind === "html" && e.url) {
20241
20247
  const u = e.title || e.caption || e.text || e.name || "Artifact";
20242
- return /* @__PURE__ */ n(vs, { className: z("msg", r && "lfg-msg-in"), from: "assistant", children: /* @__PURE__ */ d(_s, { className: "not-prose w-full max-w-[min(42rem,92vw)] overflow-hidden rounded-lg border border-border bg-card p-0 shadow-sm", children: [
20248
+ return /* @__PURE__ */ n(vs, { className: P("msg", r && "lfg-msg-in"), from: "assistant", children: /* @__PURE__ */ d(_s, { className: "not-prose w-full max-w-[min(42rem,92vw)] overflow-hidden rounded-lg border border-border bg-card p-0 shadow-sm", children: [
20243
20249
  /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-3 border-b border-border px-3 py-2 text-xs", children: [
20244
20250
  /* @__PURE__ */ d(
20245
20251
  "button",
@@ -20302,7 +20308,7 @@ function td({
20302
20308
  }
20303
20309
  if ((e.kind === "image" || e.kind === "video") && e.url) {
20304
20310
  const u = e.kind === "video", m = e.caption || e.text || e.name || (u ? "Video" : "Image");
20305
- return /* @__PURE__ */ n(vs, { className: z("msg", r && "lfg-msg-in"), from: "assistant", children: /* @__PURE__ */ d(_s, { className: "not-prose inline-flex w-fit max-w-[min(34rem,92vw)] flex-col items-start overflow-hidden rounded-lg border border-border bg-card p-0 shadow-sm", children: [
20311
+ return /* @__PURE__ */ n(vs, { className: P("msg", r && "lfg-msg-in"), from: "assistant", children: /* @__PURE__ */ d(_s, { className: "not-prose inline-flex w-fit max-w-[min(34rem,92vw)] flex-col items-start overflow-hidden rounded-lg border border-border bg-card p-0 shadow-sm", children: [
20306
20312
  u ? /* @__PURE__ */ n(
20307
20313
  ou,
20308
20314
  {
@@ -20334,7 +20340,7 @@ function td({
20334
20340
  vs,
20335
20341
  {
20336
20342
  ref: i,
20337
- className: z("msg", r && "lfg-msg-in", e.pending && "lfg-user-send"),
20343
+ className: P("msg", r && "lfg-msg-in", e.pending && "lfg-user-send"),
20338
20344
  from: "user",
20339
20345
  children: /* @__PURE__ */ d("div", { className: "flex w-full min-w-0 flex-col items-end gap-1.5", children: [
20340
20346
  a ? /* @__PURE__ */ n(
@@ -20377,7 +20383,7 @@ function td({
20377
20383
  vs,
20378
20384
  {
20379
20385
  ref: i,
20380
- className: z(
20386
+ className: P(
20381
20387
  "msg",
20382
20388
  r && "lfg-msg-in",
20383
20389
  // A just-sent (optimistic) user turn springs up out of the composer.
@@ -20501,7 +20507,7 @@ function Gf({
20501
20507
  method: "POST",
20502
20508
  headers: { "Content-Type": "application/json" },
20503
20509
  body: JSON.stringify({ path: f, confirm: !0 })
20504
- }), Se.success(`Deleted ${e.name}`), await r(f), t();
20510
+ }), Ne.success(`Deleted ${e.name}`), await r(f), t();
20505
20511
  } catch (b) {
20506
20512
  m(b instanceof Error ? b.message : "Couldn't delete this folder");
20507
20513
  } finally {
@@ -20603,7 +20609,7 @@ function gl({
20603
20609
  headers: { "Content-Type": "application/json" },
20604
20610
  body: JSON.stringify(O)
20605
20611
  });
20606
- await o(((F = q.repos) == null ? void 0 : F.find((ce) => ce.cwd === q.repo.cwd)) ?? q.repo), s(!1), Se.success("Project ready");
20612
+ await o(((F = q.repos) == null ? void 0 : F.find((ce) => ce.cwd === q.repo.cwd)) ?? q.repo), s(!1), Ne.success("Project ready");
20607
20613
  } catch (q) {
20608
20614
  x(q instanceof Error ? q.message : "Couldn't create project");
20609
20615
  } finally {
@@ -20613,7 +20619,7 @@ function gl({
20613
20619
  return /* @__PURE__ */ n(oo, { open: e, onOpenChange: s, shouldScaleBackground: !1, children: /* @__PURE__ */ d(
20614
20620
  io,
20615
20621
  {
20616
- className: z(
20622
+ className: P(
20617
20623
  "mx-auto max-w-lg overflow-hidden",
20618
20624
  y ? "h-auto" : "h-[min(82dvh,42rem)]"
20619
20625
  ),
@@ -20766,16 +20772,16 @@ function Kf({
20766
20772
  method: "DELETE",
20767
20773
  headers: { "Content-Type": "application/json" },
20768
20774
  body: JSON.stringify({ cwd: H.cwd })
20769
- }), Se.success(`Removed ${H.name}`, { description: "The folder is still on disk." }), await (u == null ? void 0 : u(H.cwd));
20775
+ }), Ne.success(`Removed ${H.name}`, { description: "The folder is still on disk." }), await (u == null ? void 0 : u(H.cwd));
20770
20776
  } catch (L) {
20771
- Se.error(L instanceof Error ? L.message : "Couldn't remove that project");
20777
+ Ne.error(L instanceof Error ? L.message : "Couldn't remove that project");
20772
20778
  } finally {
20773
20779
  T(null);
20774
20780
  }
20775
20781
  }
20776
20782
  const F = Le(() => N ? t.filter(
20777
20783
  (H) => H.name.toLowerCase().includes(N) || H.cwd.toLowerCase().includes(N)
20778
- ) : t, [t, N]), q = l && !r, ce = z(
20784
+ ) : t, [t, N]), q = l && !r, ce = P(
20779
20785
  "flex w-full items-center gap-2.5 border-b border-border px-3 text-left last:border-0 active:bg-muted",
20780
20786
  m ? "py-2.5" : "py-2"
20781
20787
  );
@@ -20795,7 +20801,7 @@ function Kf({
20795
20801
  onClick: () => b((H) => !H),
20796
20802
  "aria-pressed": h,
20797
20803
  title: h ? "Done managing" : "Manage projects",
20798
- className: z(
20804
+ className: P(
20799
20805
  "flex h-8 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors",
20800
20806
  h ? "bg-blue-500/15 text-blue-500" : "bg-muted text-muted-foreground"
20801
20807
  ),
@@ -20812,7 +20818,7 @@ function Kf({
20812
20818
  onClick: () => ey({ showPaths: !m }),
20813
20819
  "aria-pressed": m,
20814
20820
  title: m ? "Hide folder paths" : "Show folder paths",
20815
- className: z(
20821
+ className: P(
20816
20822
  "flex h-8 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors",
20817
20823
  m ? "bg-blue-500/15 text-blue-500" : "bg-muted text-muted-foreground"
20818
20824
  ),
@@ -20989,11 +20995,11 @@ function nd({
20989
20995
  (bt) => bt.map((ct) => ct.id === G ? { ...ct, ...Ve } : ct)
20990
20996
  )
20991
20997
  }), {
20992
- attachments: Me,
20998
+ attachments: Te,
20993
20999
  setAttachments: Oe,
20994
21000
  draggingFiles: se,
20995
- removeAttachment: Te,
20996
- setAnnotatingId: Ne,
21001
+ removeAttachment: _e,
21002
+ setAnnotatingId: Se,
20997
21003
  previewUrls: je,
20998
21004
  resolveUpload: Ke,
20999
21005
  forgetUpload: Ze
@@ -21142,7 +21148,7 @@ function nd({
21142
21148
  project: G.project
21143
21149
  }), ct = G.agent === "claude" ? ["fable", "opus", "sonnet", "haiku"].includes(L) ? L : void 0 : G.agent === "opencode" ? (w.models.opencode ?? ir.opencode).includes(L) ? L : k("opencode") : G.agent === "codex" ? (w.models["codex-aisdk"] ?? ir["codex-aisdk"]).includes(L) ? L : k("codex-aisdk") : void 0, zt = yr(oe, r);
21144
21150
  l();
21145
- const ot = (Tt) => Se.promise(
21151
+ const ot = (Tt) => Ne.promise(
21146
21152
  ke("/api/sessions/resume", {
21147
21153
  method: "POST",
21148
21154
  headers: { "Content-Type": "application/json" },
@@ -21244,11 +21250,11 @@ function nd({
21244
21250
  function Ut(G, Ve, bt) {
21245
21251
  var vt, dt;
21246
21252
  if (G == null || G.preventDefault(), gn) return;
21247
- const ct = (Ve ?? pe).trim(), zt = Me;
21253
+ const ct = (Ve ?? pe).trim(), zt = Te;
21248
21254
  if (!ct && !zt.length) return;
21249
21255
  if (!D.some((tt) => tt.key === N)) {
21250
21256
  const tt = "Set up and sign in to a coding agent before starting a session.";
21251
- fe(tt), Se.error(tt);
21257
+ fe(tt), Ne.error(tt);
21252
21258
  return;
21253
21259
  }
21254
21260
  const ot = yr(oe, r) || null, Tt = N, Pt = L, Wt = bt ?? Q, on = Tt === "aisdk" && F || void 0, At = Zi({
@@ -21257,7 +21263,7 @@ function nd({
21257
21263
  text: ct,
21258
21264
  project: Gt
21259
21265
  }), Ot = new Set(zt.map((tt) => tt.id));
21260
- fe(null), Se.dismiss(xf("create")), j(""), Oe([]), J((tt) => [
21266
+ fe(null), Ne.dismiss(xf("create")), j(""), Oe([]), J((tt) => [
21261
21267
  ...tt,
21262
21268
  ...zt.map(
21263
21269
  (Mt) => Mt.status === "ready" ? { ...Mt, status: "uploading", progress: 0, error: void 0 } : Mt
@@ -21278,7 +21284,7 @@ function nd({
21278
21284
  })
21279
21285
  }), Mt = async (nt) => {
21280
21286
  const it = nt == null ? void 0 : nt.sessionId;
21281
- it && (Is(it), If(it)), nt.archivedSessionCount && Se.info(
21287
+ it && (Is(it), If(it)), nt.archivedSessionCount && Ne.info(
21282
21288
  `Archived ${nt.archivedSessionCount} idle session${nt.archivedSessionCount === 1 ? "" : "s"} to free memory`,
21283
21289
  { description: "Their transcripts are still available from Resume." }
21284
21290
  ), Wn(At == null ? void 0 : At.id, "sent"), await c({ launchId: it, sessionId: it, session: (nt == null ? void 0 : nt.session) ?? null });
@@ -21297,7 +21303,7 @@ function nd({
21297
21303
  j(""), await Mt(ho);
21298
21304
  } catch (xn) {
21299
21305
  const jr = xn instanceof Error ? xn.message : String(xn);
21300
- Se.error(jr || "Couldn't create session");
21306
+ Ne.error(jr || "Couldn't create session");
21301
21307
  }
21302
21308
  })();
21303
21309
  });
@@ -21307,7 +21313,7 @@ function nd({
21307
21313
  } catch (nt) {
21308
21314
  if (Wn(At == null ? void 0 : At.id, "draft"), j((Ft) => Ft || ct), ht(nt, "start-session")) return;
21309
21315
  const it = nt instanceof Error ? nt.message : String(nt);
21310
- fe(it), Se.error(it || "Couldn't create session");
21316
+ fe(it), Ne.error(it || "Couldn't create session");
21311
21317
  } finally {
21312
21318
  for (const it of zt)
21313
21319
  it.previewUrl && URL.revokeObjectURL(it.previewUrl);
@@ -21320,7 +21326,7 @@ function nd({
21320
21326
  }
21321
21327
  })();
21322
21328
  }
21323
- const Qn = f === "inline" && !p, nn = !!wt && D.some((G) => G.key === N) && (!!pe.trim() || Me.length > 0), Kt = Uw(
21329
+ const Qn = f === "inline" && !p, nn = !!wt && D.some((G) => G.key === N) && (!!pe.trim() || Te.length > 0), Kt = Uw(
21324
21330
  Fn,
21325
21331
  D,
21326
21332
  N,
@@ -21421,7 +21427,7 @@ function nd({
21421
21427
  src: Zn(N),
21422
21428
  alt: "",
21423
21429
  draggable: !1,
21424
- className: z(
21430
+ className: P(
21425
21431
  "size-5 select-none",
21426
21432
  ee > 0 && (qe === 1 ? "animate-in fade-in-0 slide-in-from-bottom-2 duration-200" : "animate-in fade-in-0 slide-in-from-top-2 duration-200")
21427
21433
  )
@@ -21451,7 +21457,7 @@ function nd({
21451
21457
  onSubmit: Ut,
21452
21458
  ...me.dropZoneProps,
21453
21459
  "aria-busy": gn,
21454
- className: z(
21460
+ className: P(
21455
21461
  // Inline home: original device home-indicator pad when standalone.
21456
21462
  // Embed cancels --lfg-device-safe-bottom to 0 (host owns that zone) and
21457
21463
  // the shell still applies host-inset, so Start clears the pill without
@@ -21465,11 +21471,11 @@ function nd({
21465
21471
  /* @__PURE__ */ d(
21466
21472
  "div",
21467
21473
  {
21468
- className: z(
21474
+ className: P(
21469
21475
  "lfg-gfield relative rounded-2xl",
21470
21476
  // Inline: a single row with the agent icon, field, and mic all
21471
21477
  // centered at rest, then pinned to the bottom as the textarea grows.
21472
- f === "inline" ? z(
21478
+ f === "inline" ? P(
21473
21479
  "flex gap-1.5 overflow-visible px-2.5 py-2",
21474
21480
  S ? "items-end" : "items-center"
21475
21481
  ) : "relative px-2 py-1"
@@ -21498,8 +21504,8 @@ function nd({
21498
21504
  var Ve;
21499
21505
  (G.metaKey || G.ctrlKey) && G.key === "Enter" && (G.preventDefault(), (Ve = G.currentTarget.form) == null || Ve.requestSubmit());
21500
21506
  },
21501
- placeholder: Me.length ? "Add a note for the files…" : "What should we work on?",
21502
- className: z(
21507
+ placeholder: Te.length ? "Add a note for the files…" : "What should we work on?",
21508
+ className: P(
21503
21509
  "border-0 bg-transparent text-base leading-relaxed shadow-none focus-visible:border-0 focus-visible:ring-0",
21504
21510
  f === "inline" ? "min-h-9 flex-1 px-1 py-1.5" : "min-h-40 max-h-[42dvh] px-1 py-1 pr-10"
21505
21511
  )
@@ -21509,7 +21515,7 @@ function nd({
21509
21515
  pi,
21510
21516
  {
21511
21517
  minimal: !0,
21512
- className: z("size-9 shrink-0", f !== "inline" && "absolute bottom-1 right-1"),
21518
+ className: P("size-9 shrink-0", f !== "inline" && "absolute bottom-1 right-1"),
21513
21519
  silenceMs: 2500,
21514
21520
  baseText: pe,
21515
21521
  onText: (G, Ve) => {
@@ -21537,10 +21543,10 @@ function nd({
21537
21543
  // longer be edited or removed; live composer attachments always can,
21538
21544
  // even while their upload is still running.
21539
21545
  ...X.map((G) => ({ att: G, locked: !0 })),
21540
- ...Me.map((G) => ({ att: G, locked: !1 }))
21546
+ ...Te.map((G) => ({ att: G, locked: !1 }))
21541
21547
  ],
21542
- onAnnotate: Ne,
21543
- onRemove: Te,
21548
+ onAnnotate: Se,
21549
+ onRemove: _e,
21544
21550
  onToggleHd: me.setAttachmentHd
21545
21551
  }
21546
21552
  ),
@@ -21548,7 +21554,7 @@ function nd({
21548
21554
  /* @__PURE__ */ d(
21549
21555
  "div",
21550
21556
  {
21551
- className: z(
21557
+ className: P(
21552
21558
  "flex items-center gap-2",
21553
21559
  Qn ? "mt-2" : "mt-3"
21554
21560
  ),
@@ -21557,7 +21563,7 @@ function nd({
21557
21563
  /* @__PURE__ */ n(
21558
21564
  "span",
21559
21565
  {
21560
- className: z(
21566
+ className: P(
21561
21567
  "min-w-0 flex-1 truncate text-xs",
21562
21568
  Y ? "text-destructive" : "text-muted-foreground"
21563
21569
  ),
@@ -21697,7 +21703,7 @@ function Xf({ icon: e, children: t, flat: r = !1 }) {
21697
21703
  return /* @__PURE__ */ d(
21698
21704
  "label",
21699
21705
  {
21700
- className: z(
21706
+ className: P(
21701
21707
  "relative inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-full text-foreground",
21702
21708
  r ? "px-1" : "bg-muted px-3"
21703
21709
  ),
@@ -21779,7 +21785,7 @@ function Qk({
21779
21785
  return /* @__PURE__ */ n(
21780
21786
  "span",
21781
21787
  {
21782
- className: z(
21788
+ className: P(
21783
21789
  "w-0.5 rounded-full bg-foreground/20 transition-[height,background-color,box-shadow] duration-200",
21784
21790
  c && l === o - 1 && "shadow-[0_0_8px_currentColor]"
21785
21791
  ),
@@ -21851,7 +21857,7 @@ function Jf({
21851
21857
  const ue = t[f.current];
21852
21858
  Nn.success(), ue && r(ue);
21853
21859
  }
21854
- }, Me = () => {
21860
+ }, Te = () => {
21855
21861
  N.current && (N.current = !1, O.current = !1, k(!1), f.current = ie, L(ie));
21856
21862
  }, Oe = (I) => {
21857
21863
  if (!pe || p.current) return;
@@ -21859,14 +21865,14 @@ function Jf({
21859
21865
  const ue = Math.max(0, t.indexOf(e));
21860
21866
  f.current = ue, L(ue), Y(I), N.current = !0, k(!0), pt("light");
21861
21867
  }, se = (I) => {
21862
- N.current ? Me() : Oe(I);
21863
- }, Te = (I) => {
21864
- Me(), Nn.success(), r(I);
21868
+ N.current ? Te() : Oe(I);
21869
+ }, _e = (I) => {
21870
+ Te(), Nn.success(), r(I);
21865
21871
  };
21866
21872
  U(() => {
21867
21873
  if (!w && !C) return;
21868
21874
  const I = (ue) => {
21869
- ue.key === "Escape" && (ue.preventDefault(), ue.stopPropagation(), me(!1), Me());
21875
+ ue.key === "Escape" && (ue.preventDefault(), ue.stopPropagation(), me(!1), Te());
21870
21876
  };
21871
21877
  return window.addEventListener("keydown", I, !0), () => window.removeEventListener("keydown", I, !0);
21872
21878
  }, [w, C]), U(() => {
@@ -21874,13 +21880,13 @@ function Jf({
21874
21880
  const I = (A) => {
21875
21881
  var ye, ze;
21876
21882
  const W = A.target;
21877
- W && ((ye = q.current) != null && ye.contains(W)) || (W && ((ze = ce.current) != null && ze.contains(W)) && (b.current = !0, F.current = !0), Me());
21878
- }, ue = () => Me();
21883
+ W && ((ye = q.current) != null && ye.contains(W)) || (W && ((ze = ce.current) != null && ze.contains(W)) && (b.current = !0, F.current = !0), Te());
21884
+ }, ue = () => Te();
21879
21885
  return document.addEventListener("pointerdown", I, !0), window.addEventListener("resize", ue), window.addEventListener("scroll", ue, !0), () => {
21880
21886
  document.removeEventListener("pointerdown", I, !0), window.removeEventListener("resize", ue), window.removeEventListener("scroll", ue, !0);
21881
21887
  };
21882
21888
  }, [C]);
21883
- const Ne = (I, ue) => {
21889
+ const Se = (I, ue) => {
21884
21890
  if (S) {
21885
21891
  je(ue);
21886
21892
  return;
@@ -21936,7 +21942,7 @@ function Jf({
21936
21942
  if (!O.current) return;
21937
21943
  O.current = !1, re(I);
21938
21944
  const ue = t[f.current];
21939
- ue && Te(ue);
21945
+ ue && _e(ue);
21940
21946
  },
21941
21947
  onPointerCancel: () => {
21942
21948
  O.current = !1;
@@ -21951,10 +21957,10 @@ function Jf({
21951
21957
  onPointerMove: (I) => {
21952
21958
  if (!p.current) {
21953
21959
  if (!i || l.current == null || Math.abs(I.clientX - c.current.x) <= 8) return;
21954
- X(), fe(I.currentTarget), Ne(I.clientX, I.clientY), I.preventDefault();
21960
+ X(), fe(I.currentTarget), Se(I.clientX, I.clientY), I.preventDefault();
21955
21961
  return;
21956
21962
  }
21957
- I.preventDefault(), Ne(I.clientX, I.clientY);
21963
+ I.preventDefault(), Se(I.clientX, I.clientY);
21958
21964
  },
21959
21965
  onPointerUp: (I) => {
21960
21966
  X(), he(), h.current && (I.preventDefault(), b.current = !0, me(!0));
@@ -21979,7 +21985,7 @@ function Jf({
21979
21985
  "aria-live": "polite",
21980
21986
  "aria-label": `${o} ${$}`,
21981
21987
  style: Z,
21982
- className: z(
21988
+ className: P(
21983
21989
  "fixed z-[220] select-none animate-in fade-in-0 zoom-in-90 duration-200",
21984
21990
  // A gesture panel is pure readout under a captured pointer; a
21985
21991
  // clicked-open one is the control itself, so it takes the pointer.
@@ -22043,7 +22049,7 @@ function Jf({
22043
22049
  "data-active": ue === j ? "" : void 0,
22044
22050
  style: A,
22045
22051
  onPointerEnter: () => Ze(ue),
22046
- onClick: () => Te(I),
22052
+ onClick: () => _e(I),
22047
22053
  children: Gr(I)
22048
22054
  },
22049
22055
  I
@@ -22065,7 +22071,7 @@ function Jf({
22065
22071
  "data-active": ue === j ? "" : void 0,
22066
22072
  style: ue === j ? { color: M } : void 0,
22067
22073
  onPointerEnter: () => Ze(ue),
22068
- onClick: () => Te(I),
22074
+ onClick: () => _e(I),
22069
22075
  children: Gr(I)
22070
22076
  },
22071
22077
  I
@@ -22137,7 +22143,7 @@ function eN({
22137
22143
  WebkitUserSelect: "none",
22138
22144
  WebkitTouchCallout: "none"
22139
22145
  },
22140
- className: z(
22146
+ className: P(
22141
22147
  "relative inline-flex h-8 cursor-pointer select-none items-center gap-1.5 rounded-full text-foreground outline-none transition-all duration-200 focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.98]",
22142
22148
  s ? "px-1" : "bg-muted px-3",
22143
22149
  (o.scrubbing || o.sticky) && "scale-[1.02] bg-foreground/10"
@@ -22149,7 +22155,7 @@ function eN({
22149
22155
  /* @__PURE__ */ n(
22150
22156
  "span",
22151
22157
  {
22152
- className: z(
22158
+ className: P(
22153
22159
  "max-w-14 truncate text-[11px] font-medium capitalize transition-colors duration-150",
22154
22160
  o.scrubbing ? "text-foreground" : "text-muted-foreground"
22155
22161
  ),
@@ -22246,7 +22252,7 @@ function xl({
22246
22252
  }, [a, u, i]), U(() => () => i == null ? void 0 : i(!1), [i]);
22247
22253
  const w = (O) => {
22248
22254
  r(O), c(!1);
22249
- }, T = z(
22255
+ }, T = P(
22250
22256
  "inline-flex min-w-0 cursor-pointer items-center gap-1.5 rounded-full text-foreground transition active:scale-[0.98]",
22251
22257
  a ? "h-11" : "h-8",
22252
22258
  s ? a ? "px-2" : "px-1" : a ? "bg-muted px-4" : "bg-muted px-3"
@@ -22259,8 +22265,8 @@ function xl({
22259
22265
  "aria-expanded": l,
22260
22266
  className: T,
22261
22267
  children: [
22262
- /* @__PURE__ */ n("span", { className: z("truncate text-xs font-medium", a && "text-sm", o), children: e || "model" }),
22263
- /* @__PURE__ */ n(Mn, { className: z("shrink-0 text-muted-foreground/70", a ? "size-4" : "size-3") })
22268
+ /* @__PURE__ */ n("span", { className: P("truncate text-xs font-medium", a && "text-sm", o), children: e || "model" }),
22269
+ /* @__PURE__ */ n(Mn, { className: P("shrink-0 text-muted-foreground/70", a ? "size-4" : "size-3") })
22264
22270
  ]
22265
22271
  }
22266
22272
  ), k = y ? /* @__PURE__ */ d("div", { className: "relative", children: [
@@ -22278,20 +22284,20 @@ function xl({
22278
22284
  className: "h-10 w-full rounded-xl border border-border bg-background pl-9 pr-3 text-sm outline-none transition-colors placeholder:text-muted-foreground focus:border-foreground/30"
22279
22285
  }
22280
22286
  )
22281
- ] }) : null, N = /* @__PURE__ */ n("div", { className: z("overflow-y-auto pr-1", a ? "max-h-[52dvh]" : "max-h-72"), children: x.length ? x.map((O) => {
22287
+ ] }) : null, N = /* @__PURE__ */ n("div", { className: P("overflow-y-auto pr-1", a ? "max-h-[52dvh]" : "max-h-72"), children: x.length ? x.map((O) => {
22282
22288
  const F = e === O;
22283
22289
  return /* @__PURE__ */ d(
22284
22290
  "button",
22285
22291
  {
22286
22292
  type: "button",
22287
22293
  onClick: () => w(O),
22288
- className: z(
22294
+ className: P(
22289
22295
  "flex w-full min-w-0 items-center gap-3 rounded-xl px-3 text-left text-sm outline-none transition-colors",
22290
22296
  a ? "h-12" : "h-10",
22291
- F ? "bg-primary/12 text-foreground ring-1 ring-inset ring-primary/20" : z("text-foreground focus-visible:bg-muted", !a && "hover:bg-muted")
22297
+ F ? "bg-primary/12 text-foreground ring-1 ring-inset ring-primary/20" : P("text-foreground focus-visible:bg-muted", !a && "hover:bg-muted")
22292
22298
  ),
22293
22299
  children: [
22294
- /* @__PURE__ */ n(qt, { className: z("size-4 shrink-0 text-primary", F ? "opacity-100" : "opacity-0") }),
22300
+ /* @__PURE__ */ n(qt, { className: P("size-4 shrink-0 text-primary", F ? "opacity-100" : "opacity-0") }),
22295
22301
  /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: O })
22296
22302
  ]
22297
22303
  },
@@ -22309,7 +22315,7 @@ function xl({
22309
22315
  onClick: () => c(!0),
22310
22316
  className: T,
22311
22317
  children: [
22312
- /* @__PURE__ */ n("span", { className: z("truncate text-sm font-medium", o), children: e || "model" }),
22318
+ /* @__PURE__ */ n("span", { className: P("truncate text-sm font-medium", o), children: e || "model" }),
22313
22319
  /* @__PURE__ */ n(Mn, { className: "size-4 shrink-0 text-muted-foreground/70" })
22314
22320
  ]
22315
22321
  }
@@ -22517,7 +22523,7 @@ function nN({
22517
22523
  }
22518
22524
  }
22519
22525
  }
22520
- async function Me() {
22526
+ async function Te() {
22521
22527
  if (!f) {
22522
22528
  p(!0), Ns(e.id, "execute", !!u.trim());
22523
22529
  try {
@@ -22533,16 +22539,16 @@ function nN({
22533
22539
  }
22534
22540
  async function Oe() {
22535
22541
  try {
22536
- await hl(Mu(e, t)), Ns(e.id, "copy", !!u.trim()), Se.success("Finding reference copied");
22542
+ await hl(Mu(e, t)), Ns(e.id, "copy", !!u.trim()), Ne.success("Finding reference copied");
22537
22543
  } catch (V) {
22538
- Se.error(V instanceof Error ? V.message : "Could not copy finding reference");
22544
+ Ne.error(V instanceof Error ? V.message : "Could not copy finding reference");
22539
22545
  }
22540
22546
  }
22541
22547
  function se() {
22542
22548
  const V = C.trim();
22543
22549
  !V || f || !l || (Ns(e.id, "feedback", !!u.trim()), l(e, V));
22544
22550
  }
22545
- const Te = 3, Ne = e.reasoning, je = x || Ne.length <= Te + 1 ? Ne : Ne.slice(0, Te), Ke = Ne.length - je.length, Ze = [Q, _ ? `${oe} thinking` : null].filter(Boolean).join(" · "), ae = /* @__PURE__ */ d("div", { className: "px-1 pb-2", children: [
22551
+ const _e = 3, Se = e.reasoning, je = x || Se.length <= _e + 1 ? Se : Se.slice(0, _e), Ke = Se.length - je.length, Ze = [Q, _ ? `${oe} thinking` : null].filter(Boolean).join(" · "), ae = /* @__PURE__ */ d("div", { className: "px-1 pb-2", children: [
22546
22552
  /* @__PURE__ */ d(
22547
22553
  "button",
22548
22554
  {
@@ -22555,7 +22561,7 @@ function nN({
22555
22561
  /* @__PURE__ */ n(
22556
22562
  Mn,
22557
22563
  {
22558
- className: z("size-3 shrink-0 transition-transform", h && "rotate-180")
22564
+ className: P("size-3 shrink-0 transition-transform", h && "rotate-180")
22559
22565
  }
22560
22566
  )
22561
22567
  ]
@@ -22694,7 +22700,7 @@ function nN({
22694
22700
  {
22695
22701
  variant: "brand",
22696
22702
  disabled: f,
22697
- onClick: () => void Me(),
22703
+ onClick: () => void Te(),
22698
22704
  className: "flex-1",
22699
22705
  children: [
22700
22706
  f ? /* @__PURE__ */ n(xt, { className: "size-4 animate-spin" }) : /* @__PURE__ */ n(qt, { className: "size-4" }),
@@ -22764,9 +22770,9 @@ function nN({
22764
22770
  ] })
22765
22771
  }
22766
22772
  );
22767
- return /* @__PURE__ */ n(vl, { onClose: o, title: `${t} finding`, page: X, footer: re, children: /* @__PURE__ */ d("div", { className: z("px-2 pb-2 pt-1", X && "mt-auto"), children: [
22773
+ return /* @__PURE__ */ n(vl, { onClose: o, title: `${t} finding`, page: X, footer: re, children: /* @__PURE__ */ d("div", { className: P("px-2 pb-2 pt-1", X && "mt-auto"), children: [
22768
22774
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
22769
- /* @__PURE__ */ n("span", { className: z("size-2 shrink-0 rounded-full", fl[e.severity]) }),
22775
+ /* @__PURE__ */ n("span", { className: P("size-2 shrink-0 rounded-full", fl[e.severity]) }),
22770
22776
  /* @__PURE__ */ n("span", { className: "truncate font-medium text-foreground/75", children: t }),
22771
22777
  /* @__PURE__ */ n("span", { "aria-hidden": !0, children: "·" }),
22772
22778
  /* @__PURE__ */ n("span", { className: "shrink-0", children: ml(e.createdAt) })
@@ -22895,40 +22901,40 @@ function sN({
22895
22901
  onDelete: l,
22896
22902
  onRunNow: c
22897
22903
  }) {
22898
- var Te;
22904
+ var _e;
22899
22905
  const u = e === "new", m = u ? null : e, [f, p] = v((m == null ? void 0 : m.name) ?? ""), [h, b] = v((m == null ? void 0 : m.prompt) ?? ""), [x, y] = v((m == null ? void 0 : m.schedule) ?? "0 9 * * *"), [w, T] = v(!(m != null && m.promptTruncated));
22900
22906
  U(() => {
22901
22907
  if (u || !(m != null && m.promptTruncated)) return;
22902
- let Ne = !1;
22908
+ let Se = !1;
22903
22909
  const je = m.prompt ?? "";
22904
22910
  return ke(`/api/auto/agents/${encodeURIComponent(m.id)}`).then((Ke) => {
22905
22911
  var ae;
22906
- if (Ne) return;
22912
+ if (Se) return;
22907
22913
  const Ze = (ae = Ke.agent) == null ? void 0 : ae.prompt;
22908
22914
  typeof Ze == "string" && b((re) => re === je ? Ze : re), T(!0);
22909
22915
  }).catch(() => {
22910
- Ne || T(!1);
22916
+ Se || T(!1);
22911
22917
  }), () => {
22912
- Ne = !0;
22918
+ Se = !0;
22913
22919
  };
22914
22920
  }, [u, m == null ? void 0 : m.id, m == null ? void 0 : m.promptTruncated]);
22915
22921
  const C = Ii((m == null ? void 0 : m.schedule) ?? "0 9 * * *"), [k, N] = v(C ?? du), [O, F] = v(
22916
22922
  C ? "simple" : "advanced"
22917
- ), q = (Ne) => {
22923
+ ), q = (Se) => {
22918
22924
  N((je) => {
22919
- const Ke = { ...je, ...Ne };
22925
+ const Ke = { ...je, ...Se };
22920
22926
  return y(Ab(Ke)), Ke;
22921
22927
  });
22922
- }, [ce, H] = v((m == null ? void 0 : m.enabled) ?? !0), [L, Z] = v((m == null ? void 0 : m.cwd) ?? ((Te = t[0]) == null ? void 0 : Te.cwd) ?? ""), [Q, K] = v((m == null ? void 0 : m.agent) ?? "aisdk"), [oe, ie] = v((m == null ? void 0 : m.claudeAccountId) ?? ""), pe = os((m == null ? void 0 : m.agent) ?? "aisdk"), [j, $] = v(
22928
+ }, [ce, H] = v((m == null ? void 0 : m.enabled) ?? !0), [L, Z] = v((m == null ? void 0 : m.cwd) ?? ((_e = t[0]) == null ? void 0 : _e.cwd) ?? ""), [Q, K] = v((m == null ? void 0 : m.agent) ?? "aisdk"), [oe, ie] = v((m == null ? void 0 : m.claudeAccountId) ?? ""), pe = os((m == null ? void 0 : m.agent) ?? "aisdk"), [j, $] = v(
22923
22929
  (m == null ? void 0 : m.model) ?? pe
22924
22930
  ), [_, M] = v(
22925
22931
  (m == null ? void 0 : m.thinkingLevel) ?? Tr()
22926
- ), [S, E] = v(!1), [X, J] = v(!1), [xe, he] = v(null), Y = Le(() => au(x, r), [x, r]), fe = ui(Q), me = os(Q), Me = Cn(Q);
22932
+ ), [S, E] = v(!1), [X, J] = v(!1), [xe, he] = v(null), Y = Le(() => au(x, r), [x, r]), fe = ui(Q), me = os(Q), Te = Cn(Q);
22927
22933
  U(() => {
22928
22934
  fe.includes(j) || $(me);
22929
22935
  }, [me, fe, j]);
22930
22936
  async function Oe() {
22931
- var Ne;
22937
+ var Se;
22932
22938
  if (!(X || !h.trim())) {
22933
22939
  J(!0), he(null);
22934
22940
  try {
@@ -22940,7 +22946,7 @@ function sN({
22940
22946
  cwd: L || void 0
22941
22947
  })
22942
22948
  });
22943
- (Ne = je.prompt) != null && Ne.trim() && b(je.prompt.trim());
22949
+ (Se = je.prompt) != null && Se.trim() && b(je.prompt.trim());
22944
22950
  } catch (je) {
22945
22951
  he(je instanceof Error ? je.message : "enhance failed");
22946
22952
  } finally {
@@ -22961,7 +22967,7 @@ function sN({
22961
22967
  cwd: L || void 0,
22962
22968
  agent: Q,
22963
22969
  model: j.trim() || void 0,
22964
- thinkingLevel: Me ? _ : void 0,
22970
+ thinkingLevel: Te ? _ : void 0,
22965
22971
  // null, not undefined: JSON.stringify drops undefined, and an absent
22966
22972
  // field means "keep the stored pin" — so clearing one has to be said
22967
22973
  // out loud or the save is a silent no-op.
@@ -22984,7 +22990,7 @@ function sN({
22984
22990
  "input",
22985
22991
  {
22986
22992
  value: f,
22987
- onChange: (Ne) => p(Ne.target.value),
22993
+ onChange: (Se) => p(Se.target.value),
22988
22994
  "aria-label": "Auto agent name",
22989
22995
  placeholder: "agent-name",
22990
22996
  className: "flex-1 bg-transparent text-[17px] font-semibold outline-none placeholder:text-muted-foreground"
@@ -23006,9 +23012,9 @@ function sN({
23006
23012
  )
23007
23013
  ] }),
23008
23014
  (() => {
23009
- const Ne = typeof navigator < "u" ? navigator.language : void 0, je = [0, 1, 2, 3, 4, 5, 6].map((V) => ({
23015
+ const Se = typeof navigator < "u" ? navigator.language : void 0, je = [0, 1, 2, 3, 4, 5, 6].map((V) => ({
23010
23016
  v: V,
23011
- label: new Date(Date.UTC(2024, 0, 7 + V)).toLocaleDateString(Ne, {
23017
+ label: new Date(Date.UTC(2024, 0, 7 + V)).toLocaleDateString(Se, {
23012
23018
  weekday: "long",
23013
23019
  timeZone: "UTC"
23014
23020
  })
@@ -23125,10 +23131,10 @@ function sN({
23125
23131
  }
23126
23132
  ),
23127
23133
  /* @__PURE__ */ d("div", { className: "mt-2 border-t border-border pt-1.5 text-xs text-muted-foreground", children: [
23128
- cu(x, Ne),
23134
+ cu(x, Se),
23129
23135
  Ke ? /* @__PURE__ */ d("span", { children: [
23130
23136
  " · next ",
23131
- lu(Ke, Ne)
23137
+ lu(Ke, Se)
23132
23138
  ] }) : null,
23133
23139
  /* @__PURE__ */ d("span", { className: "ml-1 text-muted-foreground/60", children: [
23134
23140
  "(",
@@ -23147,12 +23153,12 @@ function sN({
23147
23153
  "select",
23148
23154
  {
23149
23155
  value: L,
23150
- onChange: (Ne) => Z(Ne.target.value),
23156
+ onChange: (Se) => Z(Se.target.value),
23151
23157
  "aria-label": "Repo",
23152
23158
  className: "max-w-44 appearance-none truncate bg-transparent text-right text-[13px] font-medium outline-none",
23153
23159
  children: [
23154
23160
  t.length === 0 ? /* @__PURE__ */ n("option", { value: "", children: "(no repos)" }) : null,
23155
- t.map((Ne) => /* @__PURE__ */ n("option", { value: Ne.cwd, children: Ne.name }, Ne.cwd))
23161
+ t.map((Se) => /* @__PURE__ */ n("option", { value: Se.cwd, children: Se.name }, Se.cwd))
23156
23162
  ]
23157
23163
  }
23158
23164
  )
@@ -23176,7 +23182,7 @@ function sN({
23176
23182
  "button",
23177
23183
  {
23178
23184
  type: "button",
23179
- onClick: () => H((Ne) => !Ne),
23185
+ onClick: () => H((Se) => !Se),
23180
23186
  className: "mt-2 flex w-full items-center justify-between rounded-xl border border-border px-3 py-2",
23181
23187
  children: [
23182
23188
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-sm", children: [
@@ -23186,14 +23192,14 @@ function sN({
23186
23192
  /* @__PURE__ */ n(
23187
23193
  "span",
23188
23194
  {
23189
- className: z(
23195
+ className: P(
23190
23196
  "relative h-6 w-11 rounded-full transition-colors",
23191
23197
  ce ? "bg-success" : "bg-border"
23192
23198
  ),
23193
23199
  children: /* @__PURE__ */ n(
23194
23200
  "span",
23195
23201
  {
23196
- className: z(
23202
+ className: P(
23197
23203
  "absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",
23198
23204
  ce ? "translate-x-5" : ""
23199
23205
  )
@@ -23391,9 +23397,9 @@ function cN({
23391
23397
  if (!(!a || a === e.timeZone || r)) {
23392
23398
  s(!0);
23393
23399
  try {
23394
- await t({ timeZone: a }), Se.success("Timezone updated");
23400
+ await t({ timeZone: a }), Ne.success("Timezone updated");
23395
23401
  } catch (l) {
23396
- Se.error(l instanceof Error ? l.message : "Could not update timezone");
23402
+ Ne.error(l instanceof Error ? l.message : "Could not update timezone");
23397
23403
  } finally {
23398
23404
  s(!1);
23399
23405
  }
@@ -23486,11 +23492,11 @@ function mN({
23486
23492
  if (!(y === e.idleAgentArchiveMinutes || a)) {
23487
23493
  l(!0);
23488
23494
  try {
23489
- await t({ idleAgentArchiveMinutes: y }), Se.success(
23495
+ await t({ idleAgentArchiveMinutes: y }), Ne.success(
23490
23496
  y === 0 ? "Idle agents will stay open" : `Idle agents archived after ${Wi(y)}`
23491
23497
  );
23492
23498
  } catch (w) {
23493
- Se.error(w instanceof Error ? w.message : "Could not update idle archiving");
23499
+ Ne.error(w instanceof Error ? w.message : "Could not update idle archiving");
23494
23500
  } finally {
23495
23501
  l(!1);
23496
23502
  }
@@ -23500,11 +23506,11 @@ function mN({
23500
23506
  if (!(y === e.maxLiveAgents || r)) {
23501
23507
  s(!0);
23502
23508
  try {
23503
- await t({ maxLiveAgents: y }), Se.success(
23509
+ await t({ maxLiveAgents: y }), Ne.success(
23504
23510
  y === 0 ? "Agent limit removed (unlimited)" : `Agent limit set to ${y}`
23505
23511
  );
23506
23512
  } catch (w) {
23507
- Se.error(w instanceof Error ? w.message : "Could not update agent limit");
23513
+ Ne.error(w instanceof Error ? w.message : "Could not update agent limit");
23508
23514
  } finally {
23509
23515
  s(!1);
23510
23516
  }
@@ -23514,9 +23520,9 @@ function mN({
23514
23520
  if (!o) {
23515
23521
  i(!0);
23516
23522
  try {
23517
- await t({ agentsPaused: y }), Se.success(y ? "New agents paused" : "New agents resumed");
23523
+ await t({ agentsPaused: y }), Ne.success(y ? "New agents paused" : "New agents resumed");
23518
23524
  } catch (w) {
23519
- Se.error(w instanceof Error ? w.message : "Could not update pause state");
23525
+ Ne.error(w instanceof Error ? w.message : "Could not update pause state");
23520
23526
  } finally {
23521
23527
  i(!1);
23522
23528
  }
@@ -23539,7 +23545,7 @@ function mN({
23539
23545
  " live"
23540
23546
  ] })
23541
23547
  ] }),
23542
- /* @__PURE__ */ n("div", { className: z(
23548
+ /* @__PURE__ */ n("div", { className: P(
23543
23549
  "text-xs",
23544
23550
  x ? "font-medium text-warning" : "text-muted-foreground"
23545
23551
  ), children: b === 0 ? "No limit" : x ? `Limit reached · ${h}/${b} live` : `${h}/${b} live · limit` })
@@ -23562,13 +23568,13 @@ function mN({
23562
23568
  ] }),
23563
23569
  /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-3 px-4 py-2.5 text-left", children: [
23564
23570
  /* @__PURE__ */ d("div", { className: "flex min-w-0 items-center gap-3", children: [
23565
- /* @__PURE__ */ n("span", { className: z(
23571
+ /* @__PURE__ */ n("span", { className: P(
23566
23572
  "flex size-7 shrink-0 items-center justify-center rounded-[7px] text-white transition-colors duration-200 ease-apple",
23567
23573
  e.agentsPaused ? "bg-warning" : "bg-foreground/70"
23568
23574
  ), children: /* @__PURE__ */ n(to, { className: "size-4" }) }),
23569
23575
  /* @__PURE__ */ d("div", { className: "min-w-0", children: [
23570
23576
  /* @__PURE__ */ n("div", { className: "text-sm font-medium", children: "Pause new agents" }),
23571
- /* @__PURE__ */ n("div", { className: z(
23577
+ /* @__PURE__ */ n("div", { className: P(
23572
23578
  "text-xs",
23573
23579
  e.agentsPaused ? "font-medium text-warning" : "text-muted-foreground"
23574
23580
  ), children: e.agentsPaused ? "Paused — new sessions are blocked" : "Blocks creating & resuming agents" })
@@ -23586,7 +23592,7 @@ function mN({
23586
23592
  ] }),
23587
23593
  /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-3 px-4 py-2.5 text-left", children: [
23588
23594
  /* @__PURE__ */ d("div", { className: "flex min-w-0 items-center gap-3", children: [
23589
- /* @__PURE__ */ n("span", { className: z(
23595
+ /* @__PURE__ */ n("span", { className: P(
23590
23596
  "flex size-7 shrink-0 items-center justify-center rounded-[7px] text-white transition-colors duration-200 ease-apple",
23591
23597
  e.idleAgentArchiveMinutes > 0 ? "bg-primary" : "bg-foreground/70"
23592
23598
  ), children: /* @__PURE__ */ n(Qs, { className: "size-4" }) }),
@@ -23649,7 +23655,7 @@ function pN() {
23649
23655
  children: /* @__PURE__ */ n(
23650
23656
  "div",
23651
23657
  {
23652
- className: z(
23658
+ className: P(
23653
23659
  "h-full rounded-md transition-all duration-300 ease-ios",
23654
23660
  o != null && o >= 90 ? "bg-destructive" : o != null && o >= 75 ? "bg-amber-500" : "bg-primary"
23655
23661
  ),
@@ -23690,7 +23696,7 @@ function gN({
23690
23696
  if (e.length < 2)
23691
23697
  return /* @__PURE__ */ n("div", { className: "mt-2 flex h-[34px] items-center text-[11px] text-muted-foreground", children: "Collecting…" });
23692
23698
  const m = Math.max(t ?? 0, ...e, 1e-6), f = e.length, p = (T) => T / (f - 1) * l, h = (T) => c - u - Math.min(T, m) / m * (c - u * 2), b = e.map((T, C) => `${C ? "L" : "M"}${p(C).toFixed(1)},${h(T).toFixed(1)}`).join(" "), x = `${b} L${l.toFixed(1)},${c} L0,${c} Z`, y = e[e.length - 1], w = i != null ? e[i] : y;
23693
- return /* @__PURE__ */ d("div", { className: z("relative mt-2", Qf[r]), children: [
23699
+ return /* @__PURE__ */ d("div", { className: P("relative mt-2", Qf[r]), children: [
23694
23700
  /* @__PURE__ */ d(
23695
23701
  "svg",
23696
23702
  {
@@ -23758,7 +23764,7 @@ function br({
23758
23764
  /* @__PURE__ */ d("div", { className: "min-w-0", children: [
23759
23765
  /* @__PURE__ */ d("div", { className: "flex items-center gap-1.5 text-sm font-medium", children: [
23760
23766
  t,
23761
- c ? /* @__PURE__ */ n("span", { className: z("text-[10px] font-semibold uppercase tracking-wide", Qf[a]), children: c }) : null
23767
+ c ? /* @__PURE__ */ n("span", { className: P("text-[10px] font-semibold uppercase tracking-wide", Qf[a]), children: c }) : null
23762
23768
  ] }),
23763
23769
  s ? /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground tabular-nums", children: s }) : null
23764
23770
  ] })
@@ -23894,7 +23900,7 @@ function yN({ row: e }) {
23894
23900
  return s <= 0 ? null : /* @__PURE__ */ n(
23895
23901
  "div",
23896
23902
  {
23897
- className: z("h-full", Do[r].bar),
23903
+ className: P("h-full", Do[r].bar),
23898
23904
  style: { width: `${s / t * 100}%` }
23899
23905
  },
23900
23906
  r
@@ -23932,7 +23938,7 @@ function vN({ row: e, hostTotal: t }) {
23932
23938
  /* @__PURE__ */ n(
23933
23939
  Mn,
23934
23940
  {
23935
- className: z(
23941
+ className: P(
23936
23942
  "size-4 text-muted-foreground transition-transform duration-200",
23937
23943
  r && "rotate-180"
23938
23944
  )
@@ -23951,7 +23957,7 @@ function vN({ row: e, hostTotal: t }) {
23951
23957
  /* @__PURE__ */ n(
23952
23958
  "span",
23953
23959
  {
23954
- className: z("size-2 shrink-0 rounded-[2px]", Do[c].bar)
23960
+ className: P("size-2 shrink-0 rounded-[2px]", Do[c].bar)
23955
23961
  }
23956
23962
  ),
23957
23963
  Do[c].label,
@@ -23967,7 +23973,7 @@ function vN({ row: e, hostTotal: t }) {
23967
23973
  /* @__PURE__ */ n(
23968
23974
  "span",
23969
23975
  {
23970
- className: z(
23976
+ className: P(
23971
23977
  "mr-1.5 inline-block size-2 rounded-[2px] align-middle",
23972
23978
  Do[c.component].bar
23973
23979
  )
@@ -24007,7 +24013,7 @@ function wN() {
24007
24013
  /* @__PURE__ */ n(
24008
24014
  Mn,
24009
24015
  {
24010
- className: z(
24016
+ className: P(
24011
24017
  "size-4 shrink-0 text-muted-foreground transition-transform duration-200",
24012
24018
  e && "rotate-180"
24013
24019
  )
@@ -24092,7 +24098,7 @@ function tm({
24092
24098
  const x = await ke(`/api/coding-agents/auth/${e.id}`);
24093
24099
  if (p) return;
24094
24100
  if (x.status === "complete") {
24095
- Se.success(`${Ko(x.provider)} connected`), await r();
24101
+ Ne.success(`${Ko(x.provider)} connected`), await r();
24096
24102
  return;
24097
24103
  }
24098
24104
  t(x);
@@ -24118,14 +24124,14 @@ function tm({
24118
24124
  });
24119
24125
  t(h);
24120
24126
  } catch (h) {
24121
- Se.error(h instanceof Error ? h.message : "Couldn't submit the code");
24127
+ Ne.error(h instanceof Error ? h.message : "Couldn't submit the code");
24122
24128
  } finally {
24123
24129
  c(!1);
24124
24130
  }
24125
24131
  }
24126
24132
  }
24127
24133
  const f = Ko(e.provider);
24128
- return /* @__PURE__ */ n("div", { className: z("space-y-4", o && "mt-3 rounded-xl border border-warning/25 bg-background/70 p-3"), children: e.status === "error" ? /* @__PURE__ */ d("div", { className: "space-y-3", children: [
24134
+ return /* @__PURE__ */ n("div", { className: P("space-y-4", o && "mt-3 rounded-xl border border-warning/25 bg-background/70 p-3"), children: e.status === "error" ? /* @__PURE__ */ d("div", { className: "space-y-3", children: [
24129
24135
  /* @__PURE__ */ n("p", { className: "rounded-2xl bg-destructive/10 px-4 py-3 text-sm text-destructive", children: e.error || "Login failed. Please try again." }),
24130
24136
  /* @__PURE__ */ n(Ie, { variant: "outline", className: "w-full", onClick: () => void u(), children: "Close" })
24131
24137
  ] }) : /* @__PURE__ */ d(Be, { children: [
@@ -24136,7 +24142,7 @@ function tm({
24136
24142
  {
24137
24143
  type: "button",
24138
24144
  onClick: () => {
24139
- navigator.clipboard.writeText(e.userCode), Se.success("Code copied");
24145
+ navigator.clipboard.writeText(e.userCode), Ne.success("Code copied");
24140
24146
  },
24141
24147
  className: "inline-flex items-center gap-2 font-mono text-2xl font-semibold tracking-[0.15em]",
24142
24148
  children: [
@@ -24237,7 +24243,7 @@ function kN({ w: e }) {
24237
24243
  /* @__PURE__ */ n("div", { className: "h-1.5 overflow-hidden rounded-full bg-foreground/[0.08]", children: /* @__PURE__ */ n(
24238
24244
  "div",
24239
24245
  {
24240
- className: z("h-full rounded-full transition-all duration-300 ease-ios", r),
24246
+ className: P("h-full rounded-full transition-all duration-300 ease-ios", r),
24241
24247
  style: { width: `${t ?? 0}%` }
24242
24248
  }
24243
24249
  ) })
@@ -24259,7 +24265,7 @@ function NN() {
24259
24265
  disabled: s,
24260
24266
  className: "flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50",
24261
24267
  children: [
24262
- /* @__PURE__ */ n(cs, { className: z("size-3.5", s && "animate-spin") }),
24268
+ /* @__PURE__ */ n(cs, { className: P("size-3.5", s && "animate-spin") }),
24263
24269
  "Refresh"
24264
24270
  ]
24265
24271
  }
@@ -24331,7 +24337,7 @@ function CN({
24331
24337
  /* @__PURE__ */ n(
24332
24338
  "span",
24333
24339
  {
24334
- className: z(
24340
+ className: P(
24335
24341
  "size-2 rounded-full",
24336
24342
  (l == null ? void 0 : l.status) !== "live" ? "bg-muted-foreground/40" : l.latencyMs == null ? "animate-pulse bg-primary" : l.latencyMs <= 150 ? "bg-success" : l.latencyMs <= 300 ? "bg-warning" : "bg-destructive"
24337
24343
  )
@@ -24632,7 +24638,7 @@ function TN({
24632
24638
  /* @__PURE__ */ n(
24633
24639
  "span",
24634
24640
  {
24635
- className: z(
24641
+ className: P(
24636
24642
  "order-1 size-2.5 shrink-0 rounded-full",
24637
24643
  m.enabled ? "bg-success" : "bg-muted-foreground/40"
24638
24644
  )
@@ -24914,7 +24920,7 @@ export {
24914
24920
  su as h,
24915
24921
  Zr as i,
24916
24922
  ri as j,
24917
- Se as k,
24923
+ Ne as k,
24918
24924
  qt as l,
24919
24925
  lx as m,
24920
24926
  oo as n,