@omg-dev/app 0.6.30 → 0.6.32

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.
@@ -2371,7 +2371,7 @@ function Ad(e) {
2371
2371
  return !t || t.toLowerCase() === "unknown" ? null : t;
2372
2372
  }
2373
2373
  function uw() {
2374
- return Ad("0.6.30");
2374
+ return Ad("0.6.32");
2375
2375
  }
2376
2376
  const pf = uw();
2377
2377
  function fw(e) {
@@ -3398,7 +3398,7 @@ function ir({
3398
3398
  const b = c.current, N = d.current, S = f.current, I = u.current;
3399
3399
  if (!b || !N || !S || !I) return;
3400
3400
  const A = a2(), C = o % 10 * 0.7;
3401
- let R = (Ii[p.current] ?? Ks).slice(), P = R.slice(), z = R.slice(), j = 0, k = 0, O = null, q = null;
3401
+ let R = (Ii[p.current] ?? Ks).slice(), P = R.slice(), z = R.slice(), j = 0, k = 0, O = null, W = null;
3402
3402
  const X = { ..._i[h.current].pupil };
3403
3403
  if (A) {
3404
3404
  const E = _i[h.current], B = (Ii[p.current] ?? Ks).map(
@@ -3408,23 +3408,23 @@ function ir({
3408
3408
  return;
3409
3409
  }
3410
3410
  let L;
3411
- const H = () => {
3411
+ const q = () => {
3412
3412
  L = setTimeout(() => {
3413
- _i[h.current].closed || (I.classList.remove("bot-blink"), I.getBoundingClientRect(), I.classList.add("bot-blink")), H();
3413
+ _i[h.current].closed || (I.classList.remove("bot-blink"), I.getBoundingClientRect(), I.classList.add("bot-blink")), q();
3414
3414
  }, 2200 + Math.random() * 4200);
3415
3415
  };
3416
- H();
3416
+ q();
3417
3417
  const V = i2((E, B) => {
3418
- const _ = _i[h.current], F = (Ii[p.current] ?? Ks).map((W, Q) => W * (_.radii[Q] / or));
3419
- O !== h.current || q !== p.current ? (R = z.slice(), P = F, j = B, k = _.dur, O = h.current, q = p.current, S.style.transform = `rotate(${_.tilt}deg)`, I.style.transform = _.closed ? Tf : Yl) : k === 0 && (P = F);
3418
+ const _ = _i[h.current], F = (Ii[p.current] ?? Ks).map((H, Q) => H * (_.radii[Q] / or));
3419
+ O !== h.current || W !== p.current ? (R = z.slice(), P = F, j = B, k = _.dur, O = h.current, W = p.current, S.style.transform = `rotate(${_.tilt}deg)`, I.style.transform = _.closed ? Tf : Yl) : k === 0 && (P = F);
3420
3420
  let K;
3421
3421
  if (k > 0) {
3422
- const W = Math.min(1, (B - j) / k), Q = YN(W);
3423
- K = R.map((te, fe) => te + (P[fe] - te) * Q), W >= 1 && (k = 0);
3422
+ const H = Math.min(1, (B - j) / k), Q = YN(H);
3423
+ K = R.map((te, fe) => te + (P[fe] - te) * Q), H >= 1 && (k = 0);
3424
3424
  } else
3425
3425
  K = P.slice();
3426
3426
  K = K.map(
3427
- (W, Q) => W * (1 + _.wobbleAmp * Math.sin(E * _.wobbleSpeed + C + Q * 0.55))
3427
+ (H, Q) => H * (1 + _.wobbleAmp * Math.sin(E * _.wobbleSpeed + C + Q * 0.55))
3428
3428
  ), z = K, b.setAttribute("d", Gl(K)), X.x = Af(X.x, _.pupil.x, 0.12), X.y = Af(X.y, _.pupil.y, 0.12), N.setAttribute("transform", `translate(${X.x.toFixed(2)},${X.y.toFixed(2)})`);
3429
3429
  });
3430
3430
  return () => {
@@ -3995,7 +3995,7 @@ function D2(e) {
3995
3995
  }
3996
3996
  const B2 = (e) => {
3997
3997
  var t, n, s, o, i, a, l, c, d;
3998
- const { invert: f, toast: u, unstyled: h, interacting: p, setHeights: g, visibleToasts: v, heights: y, index: b, toasts: N, expanded: S, removeToast: I, defaultRichColors: A, closeButton: C, style: R, cancelButtonStyle: P, actionButtonStyle: z, className: j = "", descriptionClassName: k = "", duration: O, position: q, gap: X, expandByDefault: L, classNames: H, icons: V, closeButtonAriaLabel: E = "Close toast" } = e, [B, _] = ze.useState(null), [M, F] = ze.useState(null), [K, W] = ze.useState(!1), [Q, te] = ze.useState(!1), [fe, de] = ze.useState(!1), [Ue, Re] = ze.useState(!1), [Ae, we] = ze.useState(!1), [De, be] = ze.useState(0), [We, Ke] = ze.useState(0), Ze = ze.useRef(u.duration || O || If), st = ze.useRef(null), Fe = ze.useRef(null), se = b === 0, ae = b + 1 <= v, Ne = u.type, Te = u.dismissible !== !1, $ = u.className || "", Ve = u.descriptionClassName || "", J = ze.useMemo(() => y.findIndex((xe) => xe.toastId === u.id) || 0, [
3998
+ const { invert: f, toast: u, unstyled: h, interacting: p, setHeights: g, visibleToasts: v, heights: y, index: b, toasts: N, expanded: S, removeToast: I, defaultRichColors: A, closeButton: C, style: R, cancelButtonStyle: P, actionButtonStyle: z, className: j = "", descriptionClassName: k = "", duration: O, position: W, gap: X, expandByDefault: L, classNames: q, icons: V, closeButtonAriaLabel: E = "Close toast" } = e, [B, _] = ze.useState(null), [M, F] = ze.useState(null), [K, H] = ze.useState(!1), [Q, te] = ze.useState(!1), [fe, de] = ze.useState(!1), [Ue, Re] = ze.useState(!1), [Ae, we] = ze.useState(!1), [De, be] = ze.useState(0), [We, Ke] = ze.useState(0), Ze = ze.useRef(u.duration || O || If), st = ze.useRef(null), Fe = ze.useRef(null), se = b === 0, ae = b + 1 <= v, Ne = u.type, Te = u.dismissible !== !1, $ = u.className || "", Ve = u.descriptionClassName || "", J = ze.useMemo(() => y.findIndex((xe) => xe.toastId === u.id) || 0, [
3999
3999
  y,
4000
4000
  u.id
4001
4001
  ]), oe = ze.useMemo(() => {
@@ -4007,7 +4007,7 @@ const B2 = (e) => {
4007
4007
  ]), He = ze.useMemo(() => u.duration || O || If, [
4008
4008
  u.duration,
4009
4009
  O
4010
- ]), qe = ze.useRef(0), Qe = ze.useRef(0), ut = ze.useRef(0), Et = ze.useRef(null), [Y, le] = q.split("-"), he = ze.useMemo(() => y.reduce((xe, tt, Je) => Je >= J ? xe : xe + tt.height, 0), [
4010
+ ]), qe = ze.useRef(0), Qe = ze.useRef(0), ut = ze.useRef(0), Et = ze.useRef(null), [Y, le] = W.split("-"), he = ze.useMemo(() => y.reduce((xe, tt, Je) => Je >= J ? xe : xe + tt.height, 0), [
4011
4011
  y,
4012
4012
  J
4013
4013
  ]), pe = S2(), Oe = u.invert || f, Ie = Ne === "loading";
@@ -4019,7 +4019,7 @@ const B2 = (e) => {
4019
4019
  }, [
4020
4020
  He
4021
4021
  ]), ze.useEffect(() => {
4022
- W(!0);
4022
+ H(!0);
4023
4023
  }, []), ze.useEffect(() => {
4024
4024
  const xe = Fe.current;
4025
4025
  if (xe) {
@@ -4104,12 +4104,12 @@ const B2 = (e) => {
4104
4104
  if (V?.loading) {
4105
4105
  var tt;
4106
4106
  return /* @__PURE__ */ ze.createElement("div", {
4107
- className: nr(H?.loader, u == null || (tt = u.classNames) == null ? void 0 : tt.loader, "sonner-loader"),
4107
+ className: nr(q?.loader, u == null || (tt = u.classNames) == null ? void 0 : tt.loader, "sonner-loader"),
4108
4108
  "data-visible": Ne === "loading"
4109
4109
  }, V.loading);
4110
4110
  }
4111
4111
  return /* @__PURE__ */ ze.createElement(b2, {
4112
- className: nr(H?.loader, u == null || (xe = u.classNames) == null ? void 0 : xe.loader),
4112
+ className: nr(q?.loader, u == null || (xe = u.classNames) == null ? void 0 : xe.loader),
4113
4113
  visible: Ne === "loading"
4114
4114
  });
4115
4115
  }
@@ -4118,7 +4118,7 @@ const B2 = (e) => {
4118
4118
  return /* @__PURE__ */ ze.createElement("li", {
4119
4119
  tabIndex: 0,
4120
4120
  ref: Fe,
4121
- className: nr(j, $, H?.toast, u == null || (t = u.classNames) == null ? void 0 : t.toast, H?.default, H?.[Ne], u == null || (n = u.classNames) == null ? void 0 : n[Ne]),
4121
+ className: nr(j, $, q?.toast, u == null || (t = u.classNames) == null ? void 0 : t.toast, q?.default, q?.[Ne], u == null || (n = u.classNames) == null ? void 0 : n[Ne]),
4122
4122
  "data-sonner-toast": "",
4123
4123
  "data-rich-colors": (ge = u.richColors) != null ? ge : A,
4124
4124
  "data-styled": !(u.jsx || u.unstyled || h),
@@ -4176,7 +4176,7 @@ const B2 = (e) => {
4176
4176
  if (!Et.current || !Te || ((tt = window.getSelection()) == null ? void 0 : tt.toString().length) > 0) return;
4177
4177
  const kt = xe.clientY - Et.current.y, Rt = xe.clientX - Et.current.x;
4178
4178
  var $t;
4179
- const zt = ($t = e.swipeDirections) != null ? $t : D2(q);
4179
+ const zt = ($t = e.swipeDirections) != null ? $t : D2(W);
4180
4180
  !B && (Math.abs(Rt) > 1 || Math.abs(kt) > 1) && _(Math.abs(Rt) > Math.abs(kt) ? "x" : "y");
4181
4181
  let Mt = {
4182
4182
  x: 0,
@@ -4208,19 +4208,19 @@ const B2 = (e) => {
4208
4208
  } : () => {
4209
4209
  Be(), u.onDismiss == null || u.onDismiss.call(u, u);
4210
4210
  },
4211
- className: nr(H?.closeButton, u == null || (s = u.classNames) == null ? void 0 : s.closeButton)
4211
+ className: nr(q?.closeButton, u == null || (s = u.classNames) == null ? void 0 : s.closeButton)
4212
4212
  }, (Xe = V?.close) != null ? Xe : k2) : null, (Ne || u.icon || u.promise) && u.icon !== null && (V?.[Ne] !== null || u.icon) ? /* @__PURE__ */ ze.createElement("div", {
4213
4213
  "data-icon": "",
4214
- className: nr(H?.icon, u == null || (o = u.classNames) == null ? void 0 : o.icon)
4214
+ className: nr(q?.icon, u == null || (o = u.classNames) == null ? void 0 : o.icon)
4215
4215
  }, u.promise || u.type === "loading" && !u.icon ? u.icon || Ge() : null, u.type !== "loading" ? ue : null) : null, /* @__PURE__ */ ze.createElement("div", {
4216
4216
  "data-content": "",
4217
- className: nr(H?.content, u == null || (i = u.classNames) == null ? void 0 : i.content)
4217
+ className: nr(q?.content, u == null || (i = u.classNames) == null ? void 0 : i.content)
4218
4218
  }, /* @__PURE__ */ ze.createElement("div", {
4219
4219
  "data-title": "",
4220
- className: nr(H?.title, u == null || (a = u.classNames) == null ? void 0 : a.title)
4220
+ className: nr(q?.title, u == null || (a = u.classNames) == null ? void 0 : a.title)
4221
4221
  }, u.jsx ? u.jsx : typeof u.title == "function" ? u.title() : u.title), u.description ? /* @__PURE__ */ ze.createElement("div", {
4222
4222
  "data-description": "",
4223
- className: nr(k, Ve, H?.description, u == null || (l = u.classNames) == null ? void 0 : l.description)
4223
+ className: nr(k, Ve, q?.description, u == null || (l = u.classNames) == null ? void 0 : l.description)
4224
4224
  }, typeof u.description == "function" ? u.description() : u.description) : null), /* @__PURE__ */ ze.isValidElement(u.cancel) ? u.cancel : u.cancel && Fi(u.cancel) ? /* @__PURE__ */ ze.createElement("button", {
4225
4225
  "data-button": !0,
4226
4226
  "data-cancel": !0,
@@ -4228,7 +4228,7 @@ const B2 = (e) => {
4228
4228
  onClick: (xe) => {
4229
4229
  Fi(u.cancel) && Te && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, xe), Be());
4230
4230
  },
4231
- className: nr(H?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
4231
+ className: nr(q?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
4232
4232
  }, u.cancel.label) : null, /* @__PURE__ */ ze.isValidElement(u.action) ? u.action : u.action && Fi(u.action) ? /* @__PURE__ */ ze.createElement("button", {
4233
4233
  "data-button": !0,
4234
4234
  "data-action": !0,
@@ -4236,7 +4236,7 @@ const B2 = (e) => {
4236
4236
  onClick: (xe) => {
4237
4237
  Fi(u.action) && (u.action.onClick == null || u.action.onClick.call(u.action, xe), !xe.defaultPrevented && Be());
4238
4238
  },
4239
- className: nr(H?.actionButton, u == null || (d = u.classNames) == null ? void 0 : d.actionButton)
4239
+ className: nr(q?.actionButton, u == null || (d = u.classNames) == null ? void 0 : d.actionButton)
4240
4240
  }, u.action.label) : null);
4241
4241
  };
4242
4242
  function _f() {
@@ -4283,16 +4283,16 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4283
4283
  ].concat(P.filter((K) => K.position).map((K) => K.position)))), [
4284
4284
  P,
4285
4285
  i
4286
- ]), [j, k] = ze.useState([]), [O, q] = ze.useState(!1), [X, L] = ze.useState(!1), [H, V] = ze.useState(h !== "system" ? h : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), E = ze.useRef(null), B = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = ze.useRef(null), M = ze.useRef(!1), F = ze.useCallback((K) => {
4287
- R((W) => {
4286
+ ]), [j, k] = ze.useState([]), [O, W] = ze.useState(!1), [X, L] = ze.useState(!1), [q, V] = ze.useState(h !== "system" ? h : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), E = ze.useRef(null), B = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = ze.useRef(null), M = ze.useRef(!1), F = ze.useCallback((K) => {
4287
+ R((H) => {
4288
4288
  var Q;
4289
- return (Q = W.find((te) => te.id === K.id)) != null && Q.delete || Nn.dismiss(K.id), W.filter(({ id: te }) => te !== K.id);
4289
+ return (Q = H.find((te) => te.id === K.id)) != null && Q.delete || Nn.dismiss(K.id), H.filter(({ id: te }) => te !== K.id);
4290
4290
  });
4291
4291
  }, []);
4292
4292
  return ze.useEffect(() => Nn.subscribe((K) => {
4293
4293
  if (K.dismiss) {
4294
4294
  requestAnimationFrame(() => {
4295
- R((W) => W.map((Q) => Q.id === K.id ? {
4295
+ R((H) => H.map((Q) => Q.id === K.id ? {
4296
4296
  ...Q,
4297
4297
  delete: !0
4298
4298
  } : Q));
@@ -4301,18 +4301,18 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4301
4301
  }
4302
4302
  setTimeout(() => {
4303
4303
  kb.flushSync(() => {
4304
- R((W) => {
4305
- const Q = W.findIndex((te) => te.id === K.id);
4304
+ R((H) => {
4305
+ const Q = H.findIndex((te) => te.id === K.id);
4306
4306
  return Q !== -1 ? [
4307
- ...W.slice(0, Q),
4307
+ ...H.slice(0, Q),
4308
4308
  {
4309
- ...W[Q],
4309
+ ...H[Q],
4310
4310
  ...K
4311
4311
  },
4312
- ...W.slice(Q + 1)
4312
+ ...H.slice(Q + 1)
4313
4313
  ] : [
4314
4314
  K,
4315
- ...W
4315
+ ...H
4316
4316
  ];
4317
4317
  });
4318
4318
  });
@@ -4327,8 +4327,8 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4327
4327
  if (h === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? V("dark") : V("light")), typeof window > "u") return;
4328
4328
  const K = window.matchMedia("(prefers-color-scheme: dark)");
4329
4329
  try {
4330
- K.addEventListener("change", ({ matches: W }) => {
4331
- V(W ? "dark" : "light");
4330
+ K.addEventListener("change", ({ matches: H }) => {
4331
+ V(H ? "dark" : "light");
4332
4332
  });
4333
4333
  } catch {
4334
4334
  K.addListener(({ matches: Q }) => {
@@ -4342,17 +4342,17 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4342
4342
  }, [
4343
4343
  h
4344
4344
  ]), ze.useEffect(() => {
4345
- C.length <= 1 && q(!1);
4345
+ C.length <= 1 && W(!1);
4346
4346
  }, [
4347
4347
  C
4348
4348
  ]), ze.useEffect(() => {
4349
- const K = (W) => {
4349
+ const K = (H) => {
4350
4350
  var Q;
4351
- if (a.every((de) => W[de] || W.code === de)) {
4351
+ if (a.every((de) => H[de] || H.code === de)) {
4352
4352
  var fe;
4353
- q(!0), (fe = E.current) == null || fe.focus();
4353
+ W(!0), (fe = E.current) == null || fe.focus();
4354
4354
  }
4355
- W.code === "Escape" && (document.activeElement === E.current || (Q = E.current) != null && Q.contains(document.activeElement)) && q(!1);
4355
+ H.code === "Escape" && (document.activeElement === E.current || (Q = E.current) != null && Q.contains(document.activeElement)) && W(!1);
4356
4356
  };
4357
4357
  return document.addEventListener("keydown", K), () => document.removeEventListener("keydown", K);
4358
4358
  }, [
@@ -4375,7 +4375,7 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4375
4375
  "aria-relevant": "additions text",
4376
4376
  "aria-atomic": "false",
4377
4377
  suppressHydrationWarning: !0
4378
- }, z.map((K, W) => {
4378
+ }, z.map((K, H) => {
4379
4379
  var Q;
4380
4380
  const [te, fe] = K.split("-");
4381
4381
  return P.length ? /* @__PURE__ */ ze.createElement("ol", {
@@ -4385,7 +4385,7 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4385
4385
  ref: E,
4386
4386
  className: d,
4387
4387
  "data-sonner-toaster": !0,
4388
- "data-sonner-theme": H,
4388
+ "data-sonner-theme": q,
4389
4389
  "data-y-position": te,
4390
4390
  "data-x-position": fe,
4391
4391
  style: {
@@ -4403,17 +4403,17 @@ const j2 = /* @__PURE__ */ ze.forwardRef(function(t, n) {
4403
4403
  onFocus: (de) => {
4404
4404
  de.target instanceof HTMLElement && de.target.dataset.dismissible === "false" || M.current || (M.current = !0, _.current = de.relatedTarget);
4405
4405
  },
4406
- onMouseEnter: () => q(!0),
4407
- onMouseMove: () => q(!0),
4406
+ onMouseEnter: () => W(!0),
4407
+ onMouseMove: () => W(!0),
4408
4408
  onMouseLeave: () => {
4409
- X || q(!1);
4409
+ X || W(!1);
4410
4410
  },
4411
- onDragEnd: () => q(!1),
4411
+ onDragEnd: () => W(!1),
4412
4412
  onPointerDown: (de) => {
4413
4413
  de.target instanceof HTMLElement && de.target.dataset.dismissible === "false" || L(!0);
4414
4414
  },
4415
4415
  onPointerUp: () => L(!1)
4416
- }, P.filter((de) => !de.position && W === 0 || de.position === K).map((de, Ue) => {
4416
+ }, P.filter((de) => !de.position && H === 0 || de.position === K).map((de, Ue) => {
4417
4417
  var Re, Ae;
4418
4418
  return /* @__PURE__ */ ze.createElement(B2, {
4419
4419
  key: de.id,
@@ -4817,16 +4817,16 @@ function pk({
4817
4817
  if (!k.shouldFireQuestion(_, M)) return;
4818
4818
  const { event: F, props: K } = ck(_, M);
4819
4819
  z(F, K);
4820
- }, q = (_) => {
4820
+ }, W = (_) => {
4821
4821
  if (!k.shouldFireComplete()) return;
4822
4822
  const { event: M, props: F } = dk(_);
4823
4823
  z(M, F);
4824
4824
  }, X = (_) => {
4825
4825
  u((M) => ({ ...M, identity: _ })), O("identity", _), window.setTimeout(R, 150);
4826
4826
  }, L = (_) => {
4827
- u((M) => ({ ...M, pain: _ })), O("pain", _), q({ ...f, pain: _ }), window.setTimeout(R, 150);
4828
- }, H = () => {
4829
- c === Gs[Gs.length - 1] && q(f), R();
4827
+ u((M) => ({ ...M, pain: _ })), O("pain", _), W({ ...f, pain: _ }), window.setTimeout(R, 150);
4828
+ }, q = () => {
4829
+ c === Gs[Gs.length - 1] && W(f), R();
4830
4830
  }, V = Ff(c), E = V ? Gs : A, B = V ? Gs.indexOf(c) : A.indexOf(c);
4831
4831
  return /* @__PURE__ */ r(
4832
4832
  "div",
@@ -4861,7 +4861,7 @@ function pk({
4861
4861
  onToggle: X
4862
4862
  }
4863
4863
  ),
4864
- /* @__PURE__ */ r(Rf, { onSkip: H })
4864
+ /* @__PURE__ */ r(Rf, { onSkip: q })
4865
4865
  ] }) : c === "survey-pain" ? /* @__PURE__ */ m(je, { children: [
4866
4866
  /* @__PURE__ */ r("h1", { className: "text-xl font-semibold", children: "What hurts most right now?" }),
4867
4867
  /* @__PURE__ */ r("p", { className: "mb-5 mt-1 text-sm text-muted-foreground", children: "Pick the one that's true today." }),
@@ -4873,12 +4873,12 @@ function pk({
4873
4873
  onToggle: L
4874
4874
  }
4875
4875
  ),
4876
- /* @__PURE__ */ r(Rf, { onSkip: H })
4876
+ /* @__PURE__ */ r(Rf, { onSkip: q })
4877
4877
  ] }) : c === "agents" ? /* @__PURE__ */ m(je, { children: [
4878
4878
  /* @__PURE__ */ r("h1", { className: "text-xl font-semibold", children: "Connect a coding agent" }),
4879
4879
  /* @__PURE__ */ r("p", { className: "mb-5 mt-1 text-sm text-muted-foreground", children: "Sign in once and this Computer can start sessions. It opens the provider’s sign-in page — nothing is stored here." }),
4880
4880
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: e.map((_) => {
4881
- const M = n === _.kind, F = !_.installed, K = F && !_.canAutoSetup, W = _.provider === "claude" ? "Claude" : _.provider === "codex" ? "ChatGPT" : "xAI";
4881
+ const M = n === _.kind, F = !_.installed, K = F && !_.canAutoSetup, H = _.provider === "claude" ? "Claude" : _.provider === "codex" ? "ChatGPT" : "xAI";
4882
4882
  return /* @__PURE__ */ m(
4883
4883
  "div",
4884
4884
  {
@@ -4886,7 +4886,7 @@ function pk({
4886
4886
  children: [
4887
4887
  /* @__PURE__ */ m("span", { className: "min-w-0 flex-1", children: [
4888
4888
  /* @__PURE__ */ r("span", { className: "block truncate text-sm font-medium", children: _.label }),
4889
- /* @__PURE__ */ r("span", { className: "block truncate text-xs text-muted-foreground", children: _.configured ? "Connected" : K ? "CLI not installed on this Computer" : F ? "Install first, then sign in" : `Sign in with ${W}` })
4889
+ /* @__PURE__ */ r("span", { className: "block truncate text-xs text-muted-foreground", children: _.configured ? "Connected" : K ? "CLI not installed on this Computer" : F ? "Install first, then sign in" : `Sign in with ${H}` })
4890
4890
  ] }),
4891
4891
  _.configured ? /* @__PURE__ */ r("span", { className: "flex size-8 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-500", "aria-label": "Connected", children: /* @__PURE__ */ r(qt, { className: "size-4" }) }) : /* @__PURE__ */ r(
4892
4892
  Ee,
@@ -5316,19 +5316,14 @@ function xk({
5316
5316
  /* @__PURE__ */ r(
5317
5317
  Tr,
5318
5318
  {
5319
- nativeButton: !1,
5320
5319
  render: /* @__PURE__ */ m(
5321
- "span",
5320
+ "button",
5322
5321
  {
5323
- role: "button",
5324
- tabIndex: 0,
5322
+ type: "button",
5325
5323
  "aria-label": `Conversation participants: ${o}`,
5326
5324
  title: o,
5327
- className: "mt-0.5 flex w-fit max-w-full cursor-pointer items-center overflow-hidden rounded-full outline-none",
5325
+ className: "flex w-fit shrink-0 max-w-full cursor-pointer items-center overflow-hidden rounded-full outline-none",
5328
5326
  onClick: (i) => i.stopPropagation(),
5329
- onKeyDown: (i) => {
5330
- (i.key === "Enter" || i.key === " ") && i.stopPropagation();
5331
- },
5332
5327
  children: [
5333
5328
  n.slice(0, Xl).map((i) => /* @__PURE__ */ r(
5334
5329
  jc,
@@ -5612,7 +5607,7 @@ function _k({
5612
5607
  if (I.set(S.pointerId, C), I.size >= 2 && c.current) {
5613
5608
  const [R, P] = [...I.values()], z = Math.hypot(R.x - P.x, R.y - P.y), j = (R.x + P.x) / 2, k = (R.y + P.y) / 2, O = o.current;
5614
5609
  if (O && c.current.dist > 0) {
5615
- const q = O.getBoundingClientRect(), X = z / c.current.dist, L = j - c.current.mx, H = k - c.current.my, V = j - q.left, E = k - q.top;
5610
+ const W = O.getBoundingClientRect(), X = z / c.current.dist, L = j - c.current.mx, q = k - c.current.my, V = j - W.left, E = k - W.top;
5616
5611
  a((B) => {
5617
5612
  const _ = Jl(B.scale * X, rr, Oi);
5618
5613
  if (_ === rr) return ds;
@@ -5620,7 +5615,7 @@ function _k({
5620
5615
  return {
5621
5616
  scale: _,
5622
5617
  ox: B.ox + V * (1 - M) + L,
5623
- oy: B.oy + E * (1 - M) + H
5618
+ oy: B.oy + E * (1 - M) + q
5624
5619
  };
5625
5620
  }), d.current = !0;
5626
5621
  }
@@ -6860,7 +6855,7 @@ function IS(e, t, n = {}) {
6860
6855
  le.sessionId && he && (Y[le.sessionId] = he);
6861
6856
  }
6862
6857
  return Y;
6863
- }, [e]), [f, u] = w({}), [h, p] = w({}), [g, v] = w({}), [y, b] = w({}), [N, S] = w({}), [I, A] = w({}), C = U(null), R = U(!1), P = U(/* @__PURE__ */ new Set()), z = U(/* @__PURE__ */ new Set()), j = U(/* @__PURE__ */ new Map()), k = U(/* @__PURE__ */ new Set()), O = U(/* @__PURE__ */ new Set()), q = U({}), X = U({}), L = U({}), H = U({}), V = U({}), E = U(f), B = U(N), _ = U({}), M = U(/* @__PURE__ */ new Set()), F = U(/* @__PURE__ */ new Set()), K = U(0), W = U(0), Q = U(!1), te = U(zi), fe = U(null), de = U(!1), Ue = U(0), Re = U(null), Ae = U(null), we = U(() => {
6858
+ }, [e]), [f, u] = w({}), [h, p] = w({}), [g, v] = w({}), [y, b] = w({}), [N, S] = w({}), [I, A] = w({}), C = U(null), R = U(!1), P = U(/* @__PURE__ */ new Set()), z = U(/* @__PURE__ */ new Set()), j = U(/* @__PURE__ */ new Map()), k = U(/* @__PURE__ */ new Set()), O = U(/* @__PURE__ */ new Set()), W = U({}), X = U({}), L = U({}), q = U({}), V = U({}), E = U(f), B = U(N), _ = U({}), M = U(/* @__PURE__ */ new Set()), F = U(/* @__PURE__ */ new Set()), K = U(0), H = U(0), Q = U(!1), te = U(zi), fe = U(null), de = U(!1), Ue = U(0), Re = U(null), Ae = U(null), we = U(() => {
6864
6859
  }), [De, be] = w(TS), We = re((Y, le) => {
6865
6860
  const he = L.current[Y];
6866
6861
  if (he?.size)
@@ -6879,11 +6874,11 @@ function IS(e, t, n = {}) {
6879
6874
  const he = Ze.current[Y] ?? 0, pe = Date.now();
6880
6875
  le && pe - he < kS || (Ze.current[Y] = le ? pe : 0, Ke({ t: "typing", sid: Y, typing: le }));
6881
6876
  }, [Ke]), Fe = re((Y) => {
6882
- const le = q.current[$n(Y)];
6877
+ const le = W.current[$n(Y)];
6883
6878
  return le ? { ...Y, resumeFromSeq: le } : Y;
6884
6879
  }, []), se = re((Y) => Y.length ? Ke({ t: "subscribe", channels: Y.map(Fe), deferToolArgs: !0 }) : !1, [Fe, Ke]), ae = re((Y) => {
6885
6880
  if (!Y.length) return !1;
6886
- for (const le of Y) delete q.current[$n(le)];
6881
+ for (const le of Y) delete W.current[$n(le)];
6887
6882
  return Ke({ t: "unsubscribe", channels: Y });
6888
6883
  }, [Ke]), Ne = re((Y, le, he = !1, pe) => {
6889
6884
  M.current.has(Y) || (M.current.add(Y), kn("ws_client_first_msg", {
@@ -6920,9 +6915,9 @@ function IS(e, t, n = {}) {
6920
6915
  if ("kind" in Y && Y.kind && "key" in Y && typeof Y.key == "string") {
6921
6916
  const he = $n({ kind: Y.kind, key: Y.key });
6922
6917
  if (typeof Y.seq == "number" && Number.isFinite(Y.seq)) {
6923
- const pe = q.current[he] ?? 0;
6918
+ const pe = W.current[he] ?? 0;
6924
6919
  if (!(Y.t === "snapshot" || Y.t === "gap" || Y.t === "resumed") && Y.seq <= pe) return;
6925
- q.current[he] = Y.seq;
6920
+ W.current[he] = Y.seq;
6926
6921
  }
6927
6922
  if (Y.t === "error") {
6928
6923
  const pe = Y.message || Y.code || "live socket error";
@@ -7043,7 +7038,7 @@ function IS(e, t, n = {}) {
7043
7038
  }
7044
7039
  if (Y.t === "prompt" && v((he) => ({ ...he, [le]: Y.prompt ?? null })), Y.t === "queue") {
7045
7040
  const he = Array.isArray(Y.queue) ? Y.queue : [];
7046
- H.current[le] = he, We(le, { type: "queue", queue: he }), u((pe) => ({
7041
+ q.current[le] = he, We(le, { type: "queue", queue: he }), u((pe) => ({
7047
7042
  ...pe,
7048
7043
  [le]: Yp(pe[le] ?? [], he, CS)
7049
7044
  }));
@@ -7082,7 +7077,7 @@ function IS(e, t, n = {}) {
7082
7077
  return;
7083
7078
  }
7084
7079
  C.current = ge, K.current = performance.now(), M.current = /* @__PURE__ */ new Set(), F.current = /* @__PURE__ */ new Set(), ge.onopen = () => {
7085
- te.current = zi, kn("ws_client_open", { reconnects: W.current }), W.current = 0, be((tt) => ({ ...tt, status: "live", attempt: 0 })), Y();
7080
+ te.current = zi, kn("ws_client_open", { reconnects: H.current }), H.current = 0, be((tt) => ({ ...tt, status: "live", attempt: 0 })), Y();
7086
7081
  const xe = [...j.current.values()];
7087
7082
  xe.length && (ge.send(JSON.stringify({ t: "subscribe", channels: xe.map(Fe), deferToolArgs: !0 })), k.current = new Set(xe.map($n)), z.current = new Set(xe.filter((tt) => tt.kind === "transcript").map((tt) => tt.key)));
7088
7083
  }, ge.onmessage = (xe) => {
@@ -7092,7 +7087,7 @@ function IS(e, t, n = {}) {
7092
7087
  }, ge.onclose = (xe) => {
7093
7088
  const tt = Ae.current;
7094
7089
  if (tt?.ws === ge && (clearTimeout(tt.timer), Ae.current = null), C.current !== ge || (C.current = null, z.current = /* @__PURE__ */ new Set(), k.current = /* @__PURE__ */ new Set(), Q.current)) return;
7095
- const Je = W.current += 1, ht = xe.code, bt = xe.reason || null;
7090
+ const Je = H.current += 1, ht = xe.code, bt = xe.reason || null;
7096
7091
  kn("ws_client_reconnect", { attempt: Je, backoffMs: te.current, code: ht, reason: bt });
7097
7092
  const kt = typeof navigator < "u" && navigator.onLine === !1;
7098
7093
  if (be(($t) => ({
@@ -7116,7 +7111,7 @@ function IS(e, t, n = {}) {
7116
7111
  };
7117
7112
  }).catch((ue) => {
7118
7113
  if (R.current = !1, Q.current) return;
7119
- const ge = W.current += 1, Xe = ue instanceof Error ? ue.message : "socket open failed";
7114
+ const ge = H.current += 1, Xe = ue instanceof Error ? ue.message : "socket open failed";
7120
7115
  kn("ws_client_reconnect", {
7121
7116
  attempt: ge,
7122
7117
  backoffMs: te.current,
@@ -7135,7 +7130,7 @@ function IS(e, t, n = {}) {
7135
7130
  };
7136
7131
  we.current = pe;
7137
7132
  const Oe = () => {
7138
- te.current = zi, W.current = 0;
7133
+ te.current = zi, H.current = 0;
7139
7134
  }, Ie = () => {
7140
7135
  if (typeof document > "u" || document.visibilityState !== "visible") return;
7141
7136
  const Ge = C.current, ue = mS(
@@ -7188,8 +7183,8 @@ function IS(e, t, n = {}) {
7188
7183
  const Y = new Set(a);
7189
7184
  O.current = Y;
7190
7185
  const le = /* @__PURE__ */ new Set([...Y, ...Object.keys(L.current)]), he = new Set(Object.keys(c));
7191
- H.current = Object.fromEntries(
7192
- Object.entries(H.current).filter(([ge]) => he.has(ge))
7186
+ q.current = Object.fromEntries(
7187
+ Object.entries(q.current).filter(([ge]) => he.has(ge))
7193
7188
  );
7194
7189
  const pe = P.current;
7195
7190
  P.current = le, V.current = Object.fromEntries(Object.entries(V.current).filter(([ge]) => he.has(ge))), u((ge) => {
@@ -7321,7 +7316,7 @@ function IS(e, t, n = {}) {
7321
7316
  };
7322
7317
  }, [s, se, ae]), ut = re((Y, le) => {
7323
7318
  (L.current[Y] || (L.current[Y] = /* @__PURE__ */ new Set())).add(le);
7324
- const pe = H.current[Y];
7319
+ const pe = q.current[Y];
7325
7320
  pe && le({ type: "queue", queue: pe });
7326
7321
  const Oe = Li(Y), Ie = $n(Oe);
7327
7322
  return P.current.add(Y), j.current.set(Ie, Oe), s && !k.current.has(Ie) && se([Oe]) && (k.current.add(Ie), z.current.add(Y)), () => {
@@ -10590,13 +10585,13 @@ function fE(e, t, n) {
10590
10585
  const i = [], a = [], l = [], c = [], d = [], f = [], u = [], h = [], p = [], g = [], v = [], y = [];
10591
10586
  for (const C of s.segment(e))
10592
10587
  for (const R of G5(C.segment, C.isWordLike ?? !1, C.index, n)) {
10593
- let H = function() {
10588
+ let q = function() {
10594
10589
  f[L] !== null && (a[L] = [
10595
10590
  xm(i, f, u, L)
10596
- ], f[L] = null), a[L].push(R.text), l[L] = l[L] || R.isWordLike, h[L] = h[L] || j, p[L] = p[L] || k, g[L] = q, v[L] = X, y[L] = bm(p[L], O);
10591
+ ], f[L] = null), a[L].push(R.text), l[L] = l[L] || R.isWordLike, h[L] = h[L] || j, p[L] = p[L] || k, g[L] = W, v[L] = X, y[L] = bm(p[L], O);
10597
10592
  };
10598
- const P = R.kind === "text", z = U5(R.text, R.isWordLike, R.kind), j = lr(R.text), k = pm(R.text), O = ii(R.text), q = Kc(R.text), X = W5(R.text), L = o - 1;
10599
- t.carryCJKAfterClosingQuote && P && o > 0 && c[L] === "text" && j && h[L] && g[L] || P && o > 0 && c[L] === "text" && O5(R.text) && h[L] || P && o > 0 && c[L] === "text" && v[L] ? H() : P && o > 0 && c[L] === "text" && R.isWordLike && k && y[L] ? (H(), l[L] = !0) : z !== null && o > 0 && c[L] === "text" && f[L] === z ? u[L] = (u[L] ?? 1) + 1 : P && !R.isWordLike && o > 0 && c[L] === "text" && !h[L] && (F5(R.text) || R.text === "-" && l[L]) ? H() : (i[o] = R.text, a[o] = [R.text], l[o] = R.isWordLike, c[o] = R.kind, d[o] = R.start, f[o] = z, u[o] = z === null ? 0 : 1, h[o] = j, p[o] = k, g[o] = q, v[o] = X, y[o] = bm(k, O), o++);
10593
+ const P = R.kind === "text", z = U5(R.text, R.isWordLike, R.kind), j = lr(R.text), k = pm(R.text), O = ii(R.text), W = Kc(R.text), X = W5(R.text), L = o - 1;
10594
+ t.carryCJKAfterClosingQuote && P && o > 0 && c[L] === "text" && j && h[L] && g[L] || P && o > 0 && c[L] === "text" && O5(R.text) && h[L] || P && o > 0 && c[L] === "text" && v[L] ? q() : P && o > 0 && c[L] === "text" && R.isWordLike && k && y[L] ? (q(), l[L] = !0) : z !== null && o > 0 && c[L] === "text" && f[L] === z ? u[L] = (u[L] ?? 1) + 1 : P && !R.isWordLike && o > 0 && c[L] === "text" && !h[L] && (F5(R.text) || R.text === "-" && l[L]) ? q() : (i[o] = R.text, a[o] = [R.text], l[o] = R.isWordLike, c[o] = R.kind, d[o] = R.start, f[o] = z, u[o] = z === null ? 0 : 1, h[o] = j, p[o] = k, g[o] = W, v[o] = X, y[o] = bm(k, O), o++);
10600
10595
  }
10601
10596
  for (let C = 0; C < o; C++) {
10602
10597
  if (f[C] !== null) {
@@ -10985,22 +10980,22 @@ function LE(e, t, n) {
10985
10980
  u += k, v = j + 1, y = 0;
10986
10981
  }
10987
10982
  function P(j, k) {
10988
- const O = i[j], q = a[j] ?? null;
10989
- let X = q === null ? -1 : uo(q, 0, k + 1), L = -1, H = 0, V = k;
10983
+ const O = i[j], W = a[j] ?? null;
10984
+ let X = W === null ? -1 : uo(W, 0, k + 1), L = -1, q = 0, V = k;
10990
10985
  for (; V < O.length; ) {
10991
10986
  const E = O[V];
10992
10987
  if (!h)
10993
10988
  C(j, V, E);
10994
10989
  else if (u + E > d) {
10995
- if (q !== null && L > k) {
10996
- I(j, L, H), V = L, X = uo(q, X, V + 1), L = -1, H = 0;
10990
+ if (W !== null && L > k) {
10991
+ I(j, L, q), V = L, X = uo(W, X, V + 1), L = -1, q = 0;
10997
10992
  continue;
10998
10993
  }
10999
10994
  I(), C(j, V, E);
11000
10995
  } else
11001
10996
  u += E, v = j, y = V + 1;
11002
10997
  const B = V + 1;
11003
- q !== null && q[X] === B && (L = B, H = u, X++), V++;
10998
+ W !== null && W[X] === B && (L = B, q = u, X++), V++;
11004
10999
  }
11005
11000
  h && v === j && y === O.length && (v = j + 1, y = 0);
11006
11001
  }
@@ -11049,56 +11044,56 @@ function jg(e, t, n) {
11049
11044
  function P() {
11050
11045
  return C === "soft-hyphen" && S === b && N === 0 ? A : p;
11051
11046
  }
11052
- function z(H = b, V = N, E) {
11053
- h++, n !== void 0 && n(Pg(e, E ?? P(), v, y, H, V), v, y, H, V), p = 0, g = !1, R();
11047
+ function z(q = b, V = N, E) {
11048
+ h++, n !== void 0 && n(Pg(e, E ?? P(), v, y, q, V), v, y, q, V), p = 0, g = !1, R();
11054
11049
  }
11055
- function j(H, V) {
11056
- g = !0, v = H, y = 0, b = H + 1, N = 0, p = V;
11050
+ function j(q, V) {
11051
+ g = !0, v = q, y = 0, b = q + 1, N = 0, p = V;
11057
11052
  }
11058
- function k(H, V, E) {
11059
- g = !0, v = H, y = V, b = H, N = V + 1, p = E;
11053
+ function k(q, V, E) {
11054
+ g = !0, v = q, y = V, b = q, N = V + 1, p = E;
11060
11055
  }
11061
- function O(H, V) {
11056
+ function O(q, V) {
11062
11057
  if (!g) {
11063
- j(H, V);
11058
+ j(q, V);
11064
11059
  return;
11065
11060
  }
11066
- p += V, b = H + 1, N = 0;
11061
+ p += V, b = q + 1, N = 0;
11067
11062
  }
11068
- function q(H, V, E, B, _, M) {
11063
+ function W(q, V, E, B, _, M) {
11069
11064
  if (!V)
11070
11065
  return;
11071
- const F = Ca(e, H, E, _), K = Ea(e, H, E, _, B);
11072
- S = E + 1, I = p - M + F, A = p - M + K, C = H;
11066
+ const F = Ca(e, q, E, _), K = Ea(e, q, E, _, B);
11067
+ S = E + 1, I = p - M + F, A = p - M + K, C = q;
11073
11068
  }
11074
- function X(H, V) {
11075
- const E = i[H], B = a[H] ?? null;
11069
+ function X(q, V) {
11070
+ const E = i[q], B = a[q] ?? null;
11076
11071
  let _ = B === null ? -1 : uo(B, 0, V + 1), M = -1, F = 0, K = V;
11077
11072
  for (; K < E.length; ) {
11078
- const W = E[K];
11073
+ const H = E[K];
11079
11074
  if (!g)
11080
- k(H, K, W);
11075
+ k(q, K, H);
11081
11076
  else {
11082
- const te = Dg(e, !0, W), fe = p + te;
11077
+ const te = Dg(e, !0, H), fe = p + te;
11083
11078
  if (Bg(e, fe) > u) {
11084
11079
  if (B !== null && M > V) {
11085
- z(H, M, F), K = M, _ = uo(B, _, K + 1), M = -1, F = 0;
11080
+ z(q, M, F), K = M, _ = uo(B, _, K + 1), M = -1, F = 0;
11086
11081
  continue;
11087
11082
  }
11088
- z(), k(H, K, W);
11083
+ z(), k(q, K, H);
11089
11084
  } else
11090
- p = fe, b = H, N = K + 1;
11085
+ p = fe, b = q, N = K + 1;
11091
11086
  }
11092
11087
  const Q = K + 1;
11093
11088
  B !== null && B[_] === Q && (M = Q, F = p, _++), K++;
11094
11089
  }
11095
- g && b === H && N === E.length && (b = H + 1, N = 0);
11090
+ g && b === q && N === E.length && (b = q + 1, N = 0);
11096
11091
  }
11097
- function L(H) {
11098
- h++, n?.(0, H.startSegmentIndex, 0, H.consumedEndSegmentIndex, 0), R();
11092
+ function L(q) {
11093
+ h++, n?.(0, q.startSegmentIndex, 0, q.consumedEndSegmentIndex, 0), R();
11099
11094
  }
11100
- for (let H = 0; H < c.length; H++) {
11101
- const V = c[H];
11095
+ for (let q = 0; q < c.length; q++) {
11096
+ const V = c[q];
11102
11097
  if (V.startSegmentIndex === V.endSegmentIndex) {
11103
11098
  L(V);
11104
11099
  continue;
@@ -11106,16 +11101,16 @@ function jg(e, t, n) {
11106
11101
  g = !1, p = 0, v = V.startSegmentIndex, y = 0, b = V.startSegmentIndex, N = 0, R();
11107
11102
  let E = V.startSegmentIndex;
11108
11103
  for (; E < V.endSegmentIndex && !(!g && (E = Zd(e, E, V.endSegmentIndex), E >= V.endSegmentIndex)); ) {
11109
- const B = o[E], _ = ol(B), M = zg(e, g, E), F = B === "tab" ? Lg(p + M, e.tabStopAdvance) : s[E], K = M + F, W = $g(e, B, E, M, F);
11104
+ const B = o[E], _ = ol(B), M = zg(e, g, E), F = B === "tab" ? Lg(p + M, e.tabStopAdvance) : s[E], K = M + F, H = $g(e, B, E, M, F);
11110
11105
  if (B === "soft-hyphen") {
11111
11106
  g && (b = E + 1, N = 0, S = E + 1, I = p + l, A = p + l, C = B), E++;
11112
11107
  continue;
11113
11108
  }
11114
11109
  if (!g) {
11115
- W > u && i[E] !== null ? X(E, 0) : j(E, F), q(B, _, E, F, M, K), E++;
11110
+ H > u && i[E] !== null ? X(E, 0) : j(E, F), W(B, _, E, F, M, K), E++;
11116
11111
  continue;
11117
11112
  }
11118
- if (p + W > u) {
11113
+ if (p + H > u) {
11119
11114
  const te = p + Ca(e, B, E, M), fe = p + Ea(e, B, E, M, F);
11120
11115
  if (C === "soft-hyphen" && d.preferEarlySoftHyphenBreak && I <= u) {
11121
11116
  z(S, 0, A);
@@ -11134,14 +11129,14 @@ function jg(e, t, n) {
11134
11129
  z(de, 0, A), E = de;
11135
11130
  continue;
11136
11131
  }
11137
- if (W > u && i[E] !== null) {
11132
+ if (H > u && i[E] !== null) {
11138
11133
  z(), X(E, 0), E++;
11139
11134
  continue;
11140
11135
  }
11141
11136
  z();
11142
11137
  continue;
11143
11138
  }
11144
- O(E, K), q(B, _, E, F, M, K), E++;
11139
+ O(E, K), W(B, _, E, F, M, K), E++;
11145
11140
  }
11146
11141
  if (g) {
11147
11142
  const B = S === V.consumedEndSegmentIndex ? A : p;
@@ -11159,43 +11154,43 @@ function zE(e, t, n, s) {
11159
11154
  function R() {
11160
11155
  return C === "soft-hyphen" && S === b && N === 0 ? A : v;
11161
11156
  }
11162
- function P(L = b, H = N, V = R()) {
11163
- return y ? (t.segmentIndex = L, t.graphemeIndex = H, Pg(e, V, p, g, L, H)) : null;
11157
+ function P(L = b, q = N, V = R()) {
11158
+ return y ? (t.segmentIndex = L, t.graphemeIndex = q, Pg(e, V, p, g, L, q)) : null;
11164
11159
  }
11165
- function z(L, H) {
11166
- y = !0, b = L + 1, N = 0, v = H;
11160
+ function z(L, q) {
11161
+ y = !0, b = L + 1, N = 0, v = q;
11167
11162
  }
11168
- function j(L, H, V) {
11169
- y = !0, b = L, N = H + 1, v = V;
11163
+ function j(L, q, V) {
11164
+ y = !0, b = L, N = q + 1, v = V;
11170
11165
  }
11171
- function k(L, H) {
11166
+ function k(L, q) {
11172
11167
  if (!y) {
11173
- z(L, H);
11168
+ z(L, q);
11174
11169
  return;
11175
11170
  }
11176
- v += H, b = L + 1, N = 0;
11171
+ v += q, b = L + 1, N = 0;
11177
11172
  }
11178
- function O(L, H, V, E, B, _) {
11179
- if (!H)
11173
+ function O(L, q, V, E, B, _) {
11174
+ if (!q)
11180
11175
  return;
11181
11176
  const M = Ca(e, L, V, B), F = Ea(e, L, V, B, E);
11182
11177
  S = V + 1, I = v - _ + M, A = v - _ + F, C = L;
11183
11178
  }
11184
- function q(L, H) {
11179
+ function W(L, q) {
11185
11180
  const V = l[L], E = c[L] ?? null;
11186
- let B = E === null ? -1 : uo(E, 0, H + 1), _ = -1, M = 0;
11187
- for (let F = H; F < V.length; F++) {
11181
+ let B = E === null ? -1 : uo(E, 0, q + 1), _ = -1, M = 0;
11182
+ for (let F = q; F < V.length; F++) {
11188
11183
  const K = V[F];
11189
11184
  if (!y)
11190
11185
  j(L, F, K);
11191
11186
  else {
11192
11187
  const Q = Dg(e, !0, K), te = v + Q;
11193
11188
  if (Bg(e, te) > h)
11194
- return E !== null && _ > H ? P(L, _, M) : P();
11189
+ return E !== null && _ > q ? P(L, _, M) : P();
11195
11190
  v = te, b = L, N = F + 1;
11196
11191
  }
11197
- const W = F + 1;
11198
- E !== null && E[B] === W && (_ = W, M = v, B++);
11192
+ const H = F + 1;
11193
+ E !== null && E[B] === H && (_ = H, M = v, B++);
11199
11194
  }
11200
11195
  return y && b === L && N === V.length && (b = L + 1, N = 0), null;
11201
11196
  }
@@ -11203,33 +11198,33 @@ function zE(e, t, n, s) {
11203
11198
  return C !== "soft-hyphen" || S < 0 ? null : I <= h ? P(S, 0, A) : null;
11204
11199
  }
11205
11200
  for (let L = t.segmentIndex; L < o.endSegmentIndex; L++) {
11206
- const H = a[L], V = ol(H), E = L === t.segmentIndex ? t.graphemeIndex : 0, B = zg(e, y, L), _ = H === "tab" ? Lg(v + B, e.tabStopAdvance) : i[L], M = B + _, F = $g(e, H, L, B, _);
11207
- if (H === "soft-hyphen" && E === 0) {
11208
- y && (b = L + 1, N = 0, S = L + 1, I = v + d, A = v + d, C = H);
11201
+ const q = a[L], V = ol(q), E = L === t.segmentIndex ? t.graphemeIndex : 0, B = zg(e, y, L), _ = q === "tab" ? Lg(v + B, e.tabStopAdvance) : i[L], M = B + _, F = $g(e, q, L, B, _);
11202
+ if (q === "soft-hyphen" && E === 0) {
11203
+ y && (b = L + 1, N = 0, S = L + 1, I = v + d, A = v + d, C = q);
11209
11204
  continue;
11210
11205
  }
11211
11206
  if (!y) {
11212
11207
  if (E > 0) {
11213
- const W = q(L, E);
11214
- if (W !== null)
11215
- return W;
11208
+ const H = W(L, E);
11209
+ if (H !== null)
11210
+ return H;
11216
11211
  } else if (F > h && l[L] !== null) {
11217
- const W = q(L, 0);
11218
- if (W !== null)
11219
- return W;
11212
+ const H = W(L, 0);
11213
+ if (H !== null)
11214
+ return H;
11220
11215
  } else
11221
11216
  z(L, _);
11222
- O(H, V, L, _, B, M);
11217
+ O(q, V, L, _, B, M);
11223
11218
  continue;
11224
11219
  }
11225
11220
  if (v + F > h) {
11226
- const W = v + Ca(e, H, L, B), Q = v + Ea(e, H, L, B, _);
11221
+ const H = v + Ca(e, q, L, B), Q = v + Ea(e, q, L, B, _);
11227
11222
  if (C === "soft-hyphen" && f.preferEarlySoftHyphenBreak && I <= h)
11228
11223
  return P(S, 0, A);
11229
11224
  const te = X();
11230
11225
  if (te !== null)
11231
11226
  return te;
11232
- if (V && W <= h)
11227
+ if (V && H <= h)
11233
11228
  return k(L, M), P(L + 1, 0, Q);
11234
11229
  if (S >= 0 && I <= h)
11235
11230
  return b > S || b === S && N > 0 ? P() : P(S, 0, A);
@@ -11237,13 +11232,13 @@ function zE(e, t, n, s) {
11237
11232
  const fe = P();
11238
11233
  if (fe !== null)
11239
11234
  return fe;
11240
- const de = q(L, 0);
11235
+ const de = W(L, 0);
11241
11236
  if (de !== null)
11242
11237
  return de;
11243
11238
  }
11244
11239
  return P();
11245
11240
  }
11246
- k(L, M), O(H, V, L, _, B, M);
11241
+ k(L, M), O(q, V, L, _, B, M);
11247
11242
  }
11248
11243
  return S === o.consumedEndSegmentIndex && N === 0 ? P(o.consumedEndSegmentIndex, 0, A) : P(o.consumedEndSegmentIndex, 0, v);
11249
11244
  }
@@ -11259,10 +11254,10 @@ function $E(e, t, n) {
11259
11254
  const k = C[S];
11260
11255
  u = !0, f = k, h = y, p = S + 1, R !== null && R[P] === p && (z = p, j = f, P++);
11261
11256
  for (let O = S + 1; O < C.length; O++) {
11262
- const q = C[O];
11263
- if (f + q > d)
11257
+ const W = C[O];
11258
+ if (f + W > d)
11264
11259
  return R !== null && z > S ? (t.segmentIndex = y, t.graphemeIndex = z, j) : (t.segmentIndex = h, t.graphemeIndex = p, f);
11265
- f += q, h = y, p = O + 1, R !== null && R[P] === p && (z = p, j = f, P++);
11260
+ f += W, h = y, p = O + 1, R !== null && R[P] === p && (z = p, j = f, P++);
11266
11261
  }
11267
11262
  h === y && p === C.length && (h = y + 1, p = 0);
11268
11263
  } else
@@ -11415,23 +11410,23 @@ function qE(e, t, n, s, o) {
11415
11410
  const h = [], p = [], g = [], v = [];
11416
11411
  let y = e.chunks.length <= 1 && !u;
11417
11412
  const b = n ? [] : null, N = [], S = [], I = [], A = n ? [] : null, C = Array.from({ length: e.len });
11418
- function R(k, O, q, X, L, H, V, E, B) {
11419
- L !== "text" && L !== "space" && L !== "zero-width-break" && (y = !1), h.push(O), p.push(q), g.push(X), v.push(L), b?.push(H), N.push(V), S.push(E), u && I.push(B), A !== null && A.push(k);
11413
+ function R(k, O, W, X, L, q, V, E, B) {
11414
+ L !== "text" && L !== "space" && L !== "zero-width-break" && (y = !1), h.push(O), p.push(W), g.push(X), v.push(L), b?.push(q), N.push(V), S.push(E), u && I.push(B), A !== null && A.push(k);
11420
11415
  }
11421
- function P(k, O, q, X, L) {
11422
- const H = jr(k, a), V = u ? Nm(k, O) : 0, E = HE(xs(k, H, l), V, o), B = O === "space" || O === "preserved-space" || O === "zero-width-break" ? 0 : E, _ = B === 0 ? 0 : B + (V > 0 ? o : 0), M = O === "space" || O === "zero-width-break" ? 0 : E;
11416
+ function P(k, O, W, X, L) {
11417
+ const q = jr(k, a), V = u ? Nm(k, O) : 0, E = HE(xs(k, q, l), V, o), B = O === "space" || O === "preserved-space" || O === "zero-width-break" ? 0 : E, _ = B === 0 ? 0 : B + (V > 0 ? o : 0), M = O === "space" || O === "zero-width-break" ? 0 : E;
11423
11418
  if (L && X && k.length > 1) {
11424
11419
  let F = "sum-graphemes";
11425
11420
  o !== 0 ? F = "segment-prefixes" : Sa(k) ? F = "pair-context" : i.preferPrefixWidthsForBreakableRuns && (F = "segment-prefixes");
11426
- const K = EE(k, H, a, l, F), W = K === null || s === "keep-all" ? null : WE(k);
11427
- R(k, E, _, M, O, q, K, W, V);
11421
+ const K = EE(k, q, a, l, F), H = K === null || s === "keep-all" ? null : WE(k);
11422
+ R(k, E, _, M, O, W, K, H, V);
11428
11423
  return;
11429
11424
  }
11430
- R(k, E, _, M, O, q, null, null, V);
11425
+ R(k, E, _, M, O, W, null, null, V);
11431
11426
  }
11432
11427
  for (let k = 0; k < e.len; k++) {
11433
11428
  C[k] = h.length;
11434
- const O = e.texts[k], q = e.isWordLike[k], X = e.kinds[k], L = e.starts[k];
11429
+ const O = e.texts[k], W = e.isWordLike[k], X = e.kinds[k], L = e.starts[k];
11435
11430
  if (X === "soft-hyphen") {
11436
11431
  R(O, 0, c, c, X, L, null, null, 0);
11437
11432
  continue;
@@ -11444,16 +11439,16 @@ function qE(e, t, n, s, o) {
11444
11439
  R(O, 0, 0, 0, X, L, null, null, u ? Nm(O, X) : 0);
11445
11440
  continue;
11446
11441
  }
11447
- const H = jr(O, a);
11448
- if (X === "text" && H.containsCJK) {
11442
+ const q = jr(O, a);
11443
+ if (X === "text" && q.containsCJK) {
11449
11444
  const V = PE(O, i), E = s === "keep-all" ? jE(O, V, i.breakKeepAllAfterPunctuation) : V;
11450
11445
  for (let B = 0; B < E.length; B++) {
11451
11446
  const _ = E[B];
11452
- P(_.text, "text", L + _.start, q, s === "keep-all" || !lr(_.text));
11447
+ P(_.text, "text", L + _.start, W, s === "keep-all" || !lr(_.text));
11453
11448
  }
11454
11449
  continue;
11455
11450
  }
11456
- P(O, X, L, q, !0);
11451
+ P(O, X, L, W, !0);
11457
11452
  }
11458
11453
  const z = VE(e.chunks, C, h.length), j = b === null ? null : p5(e.normalized, b);
11459
11454
  return A !== null ? {
@@ -11793,20 +11788,20 @@ function uM(e, t, n, s, o) {
11793
11788
  const a = e.ownerDocument.createElement("div");
11794
11789
  a.className = t, a.style.width = `${s}px`, a.innerHTML = sM, i.appendChild(a), e.appendChild(i);
11795
11790
  try {
11796
- const l = (q) => a.querySelector(`[data-probe="${q}"]`), c = (q) => {
11797
- const X = qg(e, n, q);
11791
+ const l = (W) => a.querySelector(`[data-probe="${W}"]`), c = (W) => {
11792
+ const X = qg(e, n, W);
11798
11793
  if (X) return uc(X);
11799
- const L = l(q);
11794
+ const L = l(W);
11800
11795
  return L ? uc(L) : null;
11801
- }, d = c("p"), f = c("h1"), u = c("h2"), h = c("h3"), p = c("ul"), g = c("ol"), v = c("li"), y = c("pre"), b = c("blockquote"), N = c("table"), S = c("th"), I = c("td"), A = c("hr"), C = (q) => e.querySelector(`${n} p ${q}, ${n} li ${q}`), R = C("strong") ?? l("strong"), P = C("em") ?? l("em"), z = C("a") ?? l("a"), j = C("code"), k = j ?? l("code"), O = l("rich-line");
11796
+ }, d = c("p"), f = c("h1"), u = c("h2"), h = c("h3"), p = c("ul"), g = c("ol"), v = c("li"), y = c("pre"), b = c("blockquote"), N = c("table"), S = c("th"), I = c("td"), A = c("hr"), C = (W) => e.querySelector(`${n} p ${W}, ${n} li ${W}`), R = C("strong") ?? l("strong"), P = C("em") ?? l("em"), z = C("a") ?? l("a"), j = C("code"), k = j ?? l("code"), O = l("rich-line");
11802
11797
  if (O) {
11803
- const q = [e.ownerDocument.createTextNode("probe")];
11798
+ const W = [e.ownerDocument.createTextNode("probe")];
11804
11799
  for (const X of [R, j]) {
11805
11800
  if (!X) continue;
11806
11801
  const L = X.cloneNode(!1);
11807
- L.textContent = "probe", q.push(L);
11802
+ L.textContent = "probe", W.push(L);
11808
11803
  }
11809
- q.length > 1 && O.replaceChildren(...q);
11804
+ W.length > 1 && O.replaceChildren(...W);
11810
11805
  }
11811
11806
  return !d || !f || !u || !h || !p || !g || !v || !y || !b || !N || !S || !I || !A || !R || !P || !k || !z ? null : {
11812
11807
  metricsVersion: o,
@@ -12421,9 +12416,9 @@ class _M {
12421
12416
  A = k ? k.end + d : s + o;
12422
12417
  } else if (y === l) {
12423
12418
  let j = 0, k = v[0], O = g[0];
12424
- for (let q = 1; q < l; q++) {
12425
- const X = v[q];
12426
- (X < k || X === k && g[q] < O) && (j = q, k = X, O = g[q]);
12419
+ for (let W = 1; W < l; W++) {
12420
+ const X = v[W];
12421
+ (X < k || X === k && g[W] < O) && (j = W, k = X, O = g[W]);
12427
12422
  }
12428
12423
  I = j, A = k + d, C && this.laneAssignments.set(b, I);
12429
12424
  } else
@@ -13795,32 +13790,32 @@ function SA({
13795
13790
  const K = M.getContext("2d");
13796
13791
  if (K) {
13797
13792
  K.clearRect(0, 0, M.width, M.height), K.drawImage(F, 0, 0);
13798
- for (const W of p) $m(K, W);
13793
+ for (const H of p) $m(K, H);
13799
13794
  b && $m(K, b);
13800
13795
  }
13801
13796
  }, [l, p, b]);
13802
13797
  function k(M) {
13803
13798
  const F = i.current;
13804
13799
  if (!F) return { x: 0, y: 0 };
13805
- const K = F.getBoundingClientRect(), W = F.width / K.width, Q = F.height / K.height;
13806
- return { x: (M.clientX - K.left) * W, y: (M.clientY - K.top) * Q };
13800
+ const K = F.getBoundingClientRect(), H = F.width / K.width, Q = F.height / K.height;
13801
+ return { x: (M.clientX - K.left) * H, y: (M.clientY - K.top) * Q };
13807
13802
  }
13808
13803
  function O(M) {
13809
13804
  if (!l) return;
13810
13805
  const F = k(M);
13811
13806
  if (d === "text") {
13812
- const W = i.current?.getBoundingClientRect();
13807
+ const H = i.current?.getBoundingClientRect();
13813
13808
  I({
13814
13809
  x: F.x,
13815
13810
  y: F.y,
13816
- cssLeft: W ? M.clientX - W.left : 0,
13817
- cssTop: W ? M.clientY - W.top : 0
13811
+ cssLeft: H ? M.clientX - H.left : 0,
13812
+ cssTop: H ? M.clientY - H.top : 0
13818
13813
  }), C("");
13819
13814
  return;
13820
13815
  }
13821
13816
  M.currentTarget.setPointerCapture(M.pointerId), y([]), N(d === "pen" ? { type: "path", points: [F], color: u, width: z } : { type: d, x0: F.x, y0: F.y, x1: F.x, y1: F.y, color: u, width: z });
13822
13817
  }
13823
- function q(M) {
13818
+ function W(M) {
13824
13819
  if (!b) return;
13825
13820
  const F = k(M);
13826
13821
  N((K) => K && (K.type === "path" ? { ...K, points: [...K.points, F] } : K.type === "text" ? K : { ...K, x1: F.x, y1: F.y }));
@@ -13834,7 +13829,7 @@ function SA({
13834
13829
  { type: "text", x: S.x, y: S.y, text: A.trim(), color: u, fontSize: j }
13835
13830
  ]), y([])), I(null), C("");
13836
13831
  }
13837
- function H() {
13832
+ function q() {
13838
13833
  g((M) => {
13839
13834
  if (!M.length) return M;
13840
13835
  const F = M[M.length - 1];
@@ -13855,8 +13850,8 @@ function SA({
13855
13850
  const M = i.current;
13856
13851
  !M || !t || (P(!0), M.toBlob((F) => {
13857
13852
  if (P(!1), !F) return;
13858
- const K = t.name.replace(/\.[^./]+$/, "") || "image", W = new File([F], `${K}-annotated.png`, { type: "image/png" });
13859
- s(W);
13853
+ const K = t.name.replace(/\.[^./]+$/, "") || "image", H = new File([F], `${K}-annotated.png`, { type: "image/png" });
13854
+ s(H);
13860
13855
  }, "image/png"));
13861
13856
  }
13862
13857
  const _ = p.length > 0;
@@ -13906,7 +13901,7 @@ function SA({
13906
13901
  M
13907
13902
  )) }),
13908
13903
  /* @__PURE__ */ m("div", { className: "ml-auto flex items-center gap-1", children: [
13909
- /* @__PURE__ */ r(Ee, { type: "button", size: "icon-sm", variant: "ghost", title: "Undo", "aria-label": "Undo", onClick: H, disabled: !_, children: /* @__PURE__ */ r(hv, { className: "size-4" }) }),
13904
+ /* @__PURE__ */ r(Ee, { type: "button", size: "icon-sm", variant: "ghost", title: "Undo", "aria-label": "Undo", onClick: q, disabled: !_, children: /* @__PURE__ */ r(hv, { className: "size-4" }) }),
13910
13905
  /* @__PURE__ */ r(
13911
13906
  Ee,
13912
13907
  {
@@ -13942,7 +13937,7 @@ function SA({
13942
13937
  ref: i,
13943
13938
  className: "max-h-[calc(92dvh-14rem)] max-w-full touch-none rounded-2xl",
13944
13939
  onPointerDown: O,
13945
- onPointerMove: q,
13940
+ onPointerMove: W,
13946
13941
  onPointerUp: X,
13947
13942
  onPointerLeave: X,
13948
13943
  onPointerCancel: X
@@ -14228,7 +14223,7 @@ const FA = Mr(function({
14228
14223
  ] }) : null;
14229
14224
  }), OA = Jn(
14230
14225
  "session-files-panel",
14231
- () => import("./SessionFilesPanel-BLuPhZkd.js")
14226
+ () => import("./SessionFilesPanel-DnCnKVai.js")
14232
14227
  );
14233
14228
  function al({ className: e, ...t }) {
14234
14229
  return /* @__PURE__ */ r(
@@ -14763,7 +14758,7 @@ async function xF() {
14763
14758
  }
14764
14759
  const t4 = Jn(
14765
14760
  "StreamdownResponse",
14766
- () => import("./streamdown-response-bXqxXSZE.js").then((e) => ({ default: e.StreamdownResponse }))
14761
+ () => import("./streamdown-response-Dv9YoeCg.js").then((e) => ({ default: e.StreamdownResponse }))
14767
14762
  );
14768
14763
  function js({ className: e, from: t, ...n }) {
14769
14764
  return /* @__PURE__ */ r(
@@ -16682,7 +16677,7 @@ function i3({
16682
16677
  (E) => E.resetsAt != null && E.resetsAt > o && E.resetsAt !== R
16683
16678
  ).sort((E, B) => (E.resetsAt ?? 0) - (B.resetsAt ?? 0)) : [],
16684
16679
  [A, R, o]
16685
- ), j = I?.members ?? [], k = A ? nh(A) : null, O = A != null && R == null && k?.pct != null, q = d ? "60%" : "55%", X = k0(p, d), L = X.logo, H = X.ring, V = X.logo;
16680
+ ), j = I?.members ?? [], k = A ? nh(A) : null, O = A != null && R == null && k?.pct != null, W = d ? "60%" : "55%", X = k0(p, d), L = X.logo, q = X.ring, V = X.logo;
16686
16681
  return /* @__PURE__ */ m(
16687
16682
  "div",
16688
16683
  {
@@ -16716,7 +16711,7 @@ function i3({
16716
16711
  "div",
16717
16712
  {
16718
16713
  className: "pointer-events-none absolute left-1/2 z-0 -translate-x-1/2 -translate-y-1/2",
16719
- style: { top: q },
16714
+ style: { top: W },
16720
16715
  children: [
16721
16716
  /* @__PURE__ */ r(
16722
16717
  "div",
@@ -16745,7 +16740,7 @@ function i3({
16745
16740
  "div",
16746
16741
  {
16747
16742
  className: "pointer-events-none absolute left-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-1.5 text-center",
16748
- style: { top: q },
16743
+ style: { top: W },
16749
16744
  children: [
16750
16745
  /* @__PURE__ */ m(
16751
16746
  "div",
@@ -16843,7 +16838,7 @@ function i3({
16843
16838
  "--lfg-arc-y": `${E.y}px`,
16844
16839
  "--lfg-arc-scale": 1,
16845
16840
  left: `calc(50% + ${E.x}px)`,
16846
- top: `calc(${q} + ${E.y}px)`,
16841
+ top: `calc(${W} + ${E.y}px)`,
16847
16842
  transform: "translate(-50%, -50%)",
16848
16843
  animationDelay: `${B * 40}ms`
16849
16844
  },
@@ -16866,7 +16861,7 @@ function i3({
16866
16861
  `skeleton-${B}`
16867
16862
  )) : null,
16868
16863
  c.map((E, B) => {
16869
- const _ = E.usage, M = g[B] ?? { x: 0, y: 0 }, F = _ ? nh(_) : null, K = F?.pct ?? (_ ? t3(_) : null), W = v === E.id, Q = v != null && !W, te = _ == null, fe = !te && !eh(_);
16864
+ const _ = E.usage, M = g[B] ?? { x: 0, y: 0 }, F = _ ? nh(_) : null, K = F?.pct ?? (_ ? t3(_) : null), H = v === E.id, Q = v != null && !H, te = _ == null, fe = !te && !eh(_);
16870
16865
  return /* @__PURE__ */ m(
16871
16866
  "button",
16872
16867
  {
@@ -16901,10 +16896,10 @@ function i3({
16901
16896
  style: {
16902
16897
  "--lfg-arc-x": `${M.x}px`,
16903
16898
  "--lfg-arc-y": `${M.y}px`,
16904
- "--lfg-arc-scale": W ? 1.07 : 1,
16899
+ "--lfg-arc-scale": H ? 1.07 : 1,
16905
16900
  width: X.width,
16906
16901
  left: `calc(50% + ${M.x}px)`,
16907
- top: `calc(${q} + ${M.y}px)`,
16902
+ top: `calc(${W} + ${M.y}px)`,
16908
16903
  transform: "translate(-50%, -50%) scale(var(--lfg-arc-scale))",
16909
16904
  // Emphasis: the hovered agent stays lit, the rest recede.
16910
16905
  opacity: Q ? 0.42 : fe ? 0.62 : 1,
@@ -16924,7 +16919,7 @@ function i3({
16924
16919
  // drop-shadow, not box-shadow: several agent marks are
16925
16920
  // transparent SVGs, and a box shadow would draw a rectangle
16926
16921
  // behind the artwork instead of tracing it.
16927
- filter: W ? "drop-shadow(0 0 10px rgba(255,180,90,0.5)) drop-shadow(0 6px 14px rgba(0,0,0,0.5))" : "drop-shadow(0 4px 10px rgba(0,0,0,0.4))",
16922
+ filter: H ? "drop-shadow(0 0 10px rgba(255,180,90,0.5)) drop-shadow(0 6px 14px rgba(0,0,0,0.5))" : "drop-shadow(0 4px 10px rgba(0,0,0,0.4))",
16928
16923
  transition: "filter 200ms ease-out"
16929
16924
  }
16930
16925
  }
@@ -16952,7 +16947,7 @@ function i3({
16952
16947
  }
16953
16948
  ),
16954
16949
  /* @__PURE__ */ m("div", { className: "flex items-center justify-center gap-1.5", children: [
16955
- te ? /* @__PURE__ */ r(rh, { size: H, delayMs: B * 120 }) : F ? /* @__PURE__ */ r(s3, { windows: [F], size: H }) : null,
16950
+ te ? /* @__PURE__ */ r(rh, { size: q, delayMs: B * 120 }) : F ? /* @__PURE__ */ r(s3, { windows: [F], size: q }) : null,
16956
16951
  /* @__PURE__ */ r(
16957
16952
  "span",
16958
16953
  {
@@ -17226,27 +17221,27 @@ function v3({ className: e, isStreaming: t, children: n, ...s }) {
17226
17221
  function w3({ className: e, children: t, ...n }) {
17227
17222
  return /* @__PURE__ */ r(ul, { className: D("mt-2 text-sm", e), ...n, children: /* @__PURE__ */ r(mi, { className: "ai-live-text max-w-full opacity-90", children: t }) });
17228
17223
  }
17229
- const N3 = Jn("OmgChatEngine", () => import("./chat-engine-78lfU72W.js"));
17224
+ const N3 = Jn("OmgChatEngine", () => import("./chat-engine-D0jiOPZW.js"));
17230
17225
  function k3() {
17231
- const e = () => void import("./chat-engine-78lfU72W.js").catch(() => {
17226
+ const e = () => void import("./chat-engine-D0jiOPZW.js").catch(() => {
17232
17227
  }), t = globalThis.requestIdleCallback;
17233
17228
  typeof t == "function" ? t(e, { timeout: 3e3 }) : setTimeout(e, 1500);
17234
17229
  }
17235
17230
  const E0 = Jn(
17236
17231
  "TermView",
17237
- () => import("./TermView-B292TSBA.js").then((e) => ({ default: e.TermView }))
17238
- ), oh = Jn("ShippedPage", () => import("./shipped-page-BrCkU7Zg.js")), S3 = Jn(
17232
+ () => import("./TermView-BbBFGjMY.js").then((e) => ({ default: e.TermView }))
17233
+ ), oh = Jn("ShippedPage", () => import("./shipped-page-D75wuNW9.js")), S3 = Jn(
17239
17234
  "SessionTokenUsageDialog",
17240
- () => import("./session-token-usage-Cb445vwF.js")
17235
+ () => import("./session-token-usage-DsXrmvML.js")
17241
17236
  ), C3 = Jn(
17242
17237
  "CodingAgentsPage",
17243
- () => import("./coding-agents-page-BN-MOgeC.js")
17244
- ), E3 = Jn("ComputerPage", () => import("./computer-page-Cp-7x9HS.js")), ih = Jn(
17238
+ () => import("./coding-agents-page-BvjduLrc.js")
17239
+ ), E3 = Jn("ComputerPage", () => import("./computer-page-CWaKbT-Y.js")), ih = Jn(
17245
17240
  "ResumeSessionSheet",
17246
- () => import("./resume-session-sheet-CJRQS2Ji.js")
17241
+ () => import("./resume-session-sheet-CuZTh28H.js")
17247
17242
  ), M3 = Jn(
17248
17243
  "ChangelogPage",
17249
- () => import("./ChangelogPage-C4vkccNl.js")
17244
+ () => import("./ChangelogPage-C5Ym3Dlx.js")
17250
17245
  ), pi = Qt("configured"), A3 = {
17251
17246
  claude: "Claude",
17252
17247
  codex: "Codex",
@@ -18025,8 +18020,8 @@ function yu({
18025
18020
  preparing: !1
18026
18021
  } : { preparing: !1 };
18027
18022
  p(E.id, K);
18028
- const W = { ...F, ...K };
18029
- return g(W), W;
18023
+ const H = { ...F, ...K };
18024
+ return g(H), H;
18030
18025
  });
18031
18026
  return S.current.set(E.id, B), B;
18032
18027
  },
@@ -18120,7 +18115,7 @@ function yu({
18120
18115
  onDrop: (E) => {
18121
18116
  E.dataTransfer.files.length && (E.preventDefault(), l(!1), C(E.dataTransfer.files));
18122
18117
  }
18123
- }, q = (E) => {
18118
+ }, W = (E) => {
18124
18119
  const B = E.clipboardData?.files;
18125
18120
  return B?.length ? (E.preventDefault(), C(B), !0) : !1;
18126
18121
  }, X = re(() => f.current?.click(), []), L = /* @__PURE__ */ r(
@@ -18135,7 +18130,7 @@ function yu({
18135
18130
  E.target.files && C(E.target.files), E.currentTarget.value = "";
18136
18131
  }
18137
18132
  }
18138
- ), H = /* @__PURE__ */ r(
18133
+ ), q = /* @__PURE__ */ r(
18139
18134
  SA,
18140
18135
  {
18141
18136
  open: !!c,
@@ -18184,12 +18179,12 @@ function yu({
18184
18179
  forgetUpload: P,
18185
18180
  forgetAllUploads: z,
18186
18181
  dropZoneProps: O,
18187
- onPasteFiles: q,
18182
+ onPasteFiles: W,
18188
18183
  openFilePicker: X,
18189
18184
  // Ready-to-render pieces: drop these into the composer markup.
18190
18185
  fileInput: L,
18191
18186
  chips: V,
18192
- annotator: H
18187
+ annotator: q
18193
18188
  };
18194
18189
  }
18195
18190
  function Fo(e, t, n) {
@@ -18384,17 +18379,17 @@ function vT(e) {
18384
18379
  const u = U(!1), h = U(null), p = U(0), g = U(null), v = U(null), y = U(null), b = re(() => {
18385
18380
  y.current !== null && (clearTimeout(y.current), y.current = null);
18386
18381
  const L = v.current;
18387
- v.current = null, L?.getTracks().forEach((H) => H.stop());
18382
+ v.current = null, L?.getTracks().forEach((q) => q.stop());
18388
18383
  }, []), N = re(() => {
18389
18384
  v.current?.getAudioTracks().forEach((L) => L.enabled = !1), y.current !== null && clearTimeout(y.current), y.current = setTimeout(b, uh);
18390
18385
  }, [b]), S = U(e.onText), I = U(e.onAutoSubmit), A = U(e.onInterim), C = U(e.onCancel), R = U(e.baseText ?? ""), P = U(""), z = e.silenceMs ?? 2500;
18391
18386
  S.current = e.onText, I.current = e.onAutoSubmit, A.current = e.onInterim, C.current = e.onCancel, R.current = e.baseText ?? "";
18392
18387
  const j = typeof navigator < "u" && !!navigator.mediaDevices?.getUserMedia, k = re(
18393
- async (L = !1, H = !1) => {
18388
+ async (L = !1, q = !1) => {
18394
18389
  const V = c.current;
18395
18390
  if (l.current !== null && cancelAnimationFrame(l.current), l.current = null, i.current = 0, a.current = 0, o(0), !V) {
18396
18391
  if (u.current) {
18397
- h.current = { auto: L, discard: H }, g.current?.();
18392
+ h.current = { auto: L, discard: q }, g.current?.();
18398
18393
  return;
18399
18394
  }
18400
18395
  n("idle");
@@ -18413,7 +18408,7 @@ function vT(e) {
18413
18408
  } catch {
18414
18409
  }
18415
18410
  };
18416
- if (H) {
18411
+ if (q) {
18417
18412
  B(), E(), C.current?.(P.current);
18418
18413
  return;
18419
18414
  }
@@ -18449,9 +18444,9 @@ function vT(e) {
18449
18444
  return;
18450
18445
  }
18451
18446
  const K = new Float32Array(F);
18452
- let W = 0;
18447
+ let H = 0;
18453
18448
  for (const Q of V.chunks)
18454
- K.set(Q, W), W += Q.length;
18449
+ K.set(Q, H), H += Q.length;
18455
18450
  try {
18456
18451
  const Q = await Ht("/api/voice/stt", {
18457
18452
  method: "POST",
@@ -18466,7 +18461,7 @@ function vT(e) {
18466
18461
  },
18467
18462
  [b]
18468
18463
  ), O = re(async (L) => {
18469
- const H = L?.autoStop ?? !0;
18464
+ const q = L?.autoStop ?? !0;
18470
18465
  if (c.current || u.current) return;
18471
18466
  if (u.current = !0, h.current = null, P.current = R.current, n("starting"), Xg() === !1) {
18472
18467
  u.current = !1, n("idle"), Ta("input");
@@ -18484,7 +18479,7 @@ function vT(e) {
18484
18479
  _ = window.setTimeout(() => te(Oo), yT);
18485
18480
  }), F = (te) => Promise.race([te, B, M]), K = () => {
18486
18481
  clearTimeout(_), g.current === E && (g.current = null);
18487
- }, W = (te) => {
18482
+ }, H = (te) => {
18488
18483
  K(), u.current = !1;
18489
18484
  const fe = h.current;
18490
18485
  if (h.current = null, n("idle"), fe?.discard)
@@ -18517,7 +18512,7 @@ function vT(e) {
18517
18512
  }
18518
18513
  v.current = Re, N();
18519
18514
  }).catch(() => {
18520
- }), W(
18515
+ }), H(
18521
18516
  de === Oo ? "Microphone didn't respond — check for a blocked permission prompt" : void 0
18522
18517
  );
18523
18518
  return;
@@ -18525,24 +18520,24 @@ function vT(e) {
18525
18520
  Q = de, v.current = Q;
18526
18521
  }
18527
18522
  } catch (te) {
18528
- W(fh(te));
18523
+ H(fh(te));
18529
18524
  return;
18530
18525
  }
18531
18526
  if (h.current) {
18532
- N(), W();
18527
+ N(), H();
18533
18528
  return;
18534
18529
  }
18535
18530
  try {
18536
18531
  if (!f.current) {
18537
18532
  const Fe = await F(nA("input"));
18538
18533
  if (Fe === qi || Fe === Oo) {
18539
- N(), W(
18534
+ N(), H(
18540
18535
  Fe === Oo ? "Voice setup check timed out — try again" : void 0
18541
18536
  );
18542
18537
  return;
18543
18538
  }
18544
18539
  if (!Fe) {
18545
- N(), W();
18540
+ N(), H();
18546
18541
  return;
18547
18542
  }
18548
18543
  }
@@ -18628,7 +18623,7 @@ function vT(e) {
18628
18623
  }
18629
18624
  I.current && Ne > fT && (be = !0, We = Date.now());
18630
18625
  };
18631
- const Ke = H && I.current ? setInterval(() => {
18626
+ const Ke = q && I.current ? setInterval(() => {
18632
18627
  !c.current || !be || Date.now() - We >= z && k(!0);
18633
18628
  }, 200) : null;
18634
18629
  c.current = {
@@ -18659,9 +18654,9 @@ function vT(e) {
18659
18654
  const st = h.current;
18660
18655
  st && (h.current = null, k(st.auto, st.discard));
18661
18656
  } catch (te) {
18662
- N(), W(fh(te));
18657
+ N(), H(fh(te));
18663
18658
  }
18664
- }, [z, k, N]), q = re(() => {
18659
+ }, [z, k, N]), W = re(() => {
18665
18660
  t !== "transcribing" && (c.current || u.current ? k(!0) : O());
18666
18661
  }, [t, O, k]), X = re(() => {
18667
18662
  t !== "transcribing" && k(!1, !0);
@@ -18671,7 +18666,7 @@ function vT(e) {
18671
18666
  p.current += 1, g.current?.(), b();
18672
18667
  },
18673
18668
  [b]
18674
- ), { state: t, toggle: q, start: O, stop: k, cancel: X, supported: j, level: s };
18669
+ ), { state: t, toggle: W, start: O, stop: k, cancel: X, supported: j, level: s };
18675
18670
  }
18676
18671
  const B0 = 300, wT = 48, kc = 10, Sc = 32;
18677
18672
  function NT({
@@ -18770,7 +18765,7 @@ const yl = ja(function({ onText: t, onAutoSubmit: n, onInterim: s, onCancel: o,
18770
18765
  }
18771
18766
  },
18772
18767
  [u, p, k]
18773
- ), q = re(
18768
+ ), W = re(
18774
18769
  (F) => {
18775
18770
  if (!C.current || !S.current && u !== "recording" && u !== "starting") return;
18776
18771
  const K = I.current;
@@ -18797,7 +18792,7 @@ const yl = ja(function({ onText: t, onAutoSubmit: n, onInterim: s, onCancel: o,
18797
18792
  C.current = !1, k(), z(!1);
18798
18793
  const F = A.current;
18799
18794
  A.current = !1, F ? (S.current = !1, v()) : S.current && (S.current = !1, g(!0));
18800
- }, [g, v, k]), H = re(() => {
18795
+ }, [g, v, k]), q = re(() => {
18801
18796
  if (R.current) {
18802
18797
  R.current = !1;
18803
18798
  return;
@@ -18823,10 +18818,10 @@ const yl = ja(function({ onText: t, onAutoSubmit: n, onInterim: s, onCancel: o,
18823
18818
  ref: j,
18824
18819
  type: "button",
18825
18820
  onPointerDown: O,
18826
- onPointerMove: q,
18821
+ onPointerMove: W,
18827
18822
  onPointerUp: X,
18828
18823
  onPointerCancel: L,
18829
- onClick: H,
18824
+ onClick: q,
18830
18825
  onContextMenu: (F) => F.preventDefault(),
18831
18826
  "aria-label": _,
18832
18827
  "aria-busy": B,
@@ -19081,7 +19076,7 @@ function RT(e, t) {
19081
19076
  b.current[M]?.some((F) => !F.seed) || (_[M] = !0);
19082
19077
  return _;
19083
19078
  }), !n.length) return;
19084
- const O = crypto.randomUUID?.() ?? `live-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, q = performance.now(), X = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Set();
19079
+ const O = crypto.randomUUID?.() ?? `live-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, W = performance.now(), X = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
19085
19080
  kn("live_stream_client_start", { rid: O, ids: n, idsCount: n.length });
19086
19081
  const V = new EventSource(
19087
19082
  `/api/live/stream?ids=${n.join(",")}&rid=${encodeURIComponent(O)}&${jd}`
@@ -19089,14 +19084,14 @@ function RT(e, t) {
19089
19084
  V.onopen = () => {
19090
19085
  kn("live_stream_client_open", {
19091
19086
  rid: O,
19092
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19087
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19093
19088
  });
19094
19089
  };
19095
19090
  const E = window.setTimeout(() => {
19096
19091
  kn("live_stream_client_loading_fallback", {
19097
19092
  rid: O,
19098
19093
  ids: [...j],
19099
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19094
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19100
19095
  }), p((B) => {
19101
19096
  let _ = !1;
19102
19097
  const M = { ...B };
@@ -19115,14 +19110,14 @@ function RT(e, t) {
19115
19110
  sid: M,
19116
19111
  kind: F.kind,
19117
19112
  role: F.role,
19118
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19119
- })), p((W) => ({ ...W, [M]: !1 })), F.id && F.kind !== "thinking") {
19120
- const W = y.current[M] || (y.current[M] = /* @__PURE__ */ new Set());
19121
- if (W.has(F.id)) return;
19122
- W.add(F.id), W.size > 800 && (y.current[M] = new Set(Array.from(W).slice(-400)));
19123
- }
19124
- l((W) => {
19125
- const Q = W[M] ?? [];
19113
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19114
+ })), p((H) => ({ ...H, [M]: !1 })), F.id && F.kind !== "thinking") {
19115
+ const H = y.current[M] || (y.current[M] = /* @__PURE__ */ new Set());
19116
+ if (H.has(F.id)) return;
19117
+ H.add(F.id), H.size > 800 && (y.current[M] = new Set(Array.from(H).slice(-400)));
19118
+ }
19119
+ l((H) => {
19120
+ const Q = H[M] ?? [];
19126
19121
  let te = Q;
19127
19122
  if (F.kind === "thinking")
19128
19123
  te = [...Q.filter((fe) => fe.kind !== "thinking"), F];
@@ -19131,13 +19126,13 @@ function RT(e, t) {
19131
19126
  let de = !1;
19132
19127
  te = fe ? Q.filter((Ue) => !Ue.pending || de || !Ws(F.text, Ue.text) ? !0 : (de = !0, !1)) : Q.filter((Ue) => !(Ue.kind === "thinking" || F.role === "assistant" && F.kind === "text" && Zo(Ue))), te = aT(te, F);
19133
19128
  }
19134
- return { ...W, [M]: Hr(te) };
19129
+ return { ...H, [M]: Hr(te) };
19135
19130
  });
19136
19131
  const K = S.current;
19137
19132
  K[M] && clearTimeout(K[M]), F.kind === "thinking" ? K[M] = setTimeout(() => {
19138
- delete K[M], l((W) => {
19139
- const Q = W[M];
19140
- return Q?.some((te) => te.kind === "thinking") ? { ...W, [M]: Q.filter((te) => te.kind !== "thinking") } : W;
19133
+ delete K[M], l((H) => {
19134
+ const Q = H[M];
19135
+ return Q?.some((te) => te.kind === "thinking") ? { ...H, [M]: Q.filter((te) => te.kind !== "thinking") } : H;
19141
19136
  });
19142
19137
  }, 2500) : delete K[M];
19143
19138
  }), V.addEventListener("ai_part", (B) => {
@@ -19148,13 +19143,13 @@ function RT(e, t) {
19148
19143
  p((Q) => ({ ...Q, [M]: !1 }));
19149
19144
  const K = S.current;
19150
19145
  K[M] && (clearTimeout(K[M]), delete K[M]);
19151
- const W = !H.has(M);
19152
- H.add(M), l((Q) => {
19146
+ const H = !q.has(M);
19147
+ q.add(M), l((Q) => {
19153
19148
  const te = Q[M] ?? [], fe = te.find(
19154
19149
  (we) => Zo(we) && we.id === F.id
19155
19150
  ), de = F.reset ? F.text ?? F.delta ?? "" : `${fe?.text ?? ""}${F.delta ?? ""}`;
19156
19151
  if (!de) return Q;
19157
- const Ue = F.kind ?? "text", Re = fe?.catchUp ?? (W && !!F.reset && de.length > I3), Ae = {
19152
+ const Ue = F.kind ?? "text", Re = fe?.catchUp ?? (H && !!F.reset && de.length > I3), Ae = {
19158
19153
  id: F.id,
19159
19154
  role: "assistant",
19160
19155
  kind: Ue,
@@ -19175,31 +19170,31 @@ function RT(e, t) {
19175
19170
  if (!_ || !j.has(_.sid)) return;
19176
19171
  const M = _.sid, F = Wo(Array.isArray(_.messages) ? _.messages : []);
19177
19172
  if (!X.has(M) && F.length) {
19178
- const W = F[0];
19173
+ const H = F[0];
19179
19174
  X.add(M), kn("live_stream_client_first_msg", {
19180
19175
  rid: O,
19181
19176
  sid: M,
19182
- kind: W.kind,
19183
- role: W.role,
19177
+ kind: H.kind,
19178
+ role: H.role,
19184
19179
  batch: !0,
19185
19180
  count: F.length,
19186
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19181
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19187
19182
  });
19188
19183
  }
19189
- p((W) => ({ ...W, [M]: !1 }));
19184
+ p((H) => ({ ...H, [M]: !1 }));
19190
19185
  const K = y.current[M] || (y.current[M] = /* @__PURE__ */ new Set());
19191
- for (const W of F)
19192
- W.id && W.kind !== "thinking" && K.add(W.id);
19193
- K.size > 800 && (y.current[M] = new Set(Array.from(K).slice(-400))), v((W) => ({ ...W, [M]: _.nextBefore ?? null })), l((W) => {
19194
- const Q = W[M] ?? [];
19195
- return { ...W, [M]: lh(Q, F) };
19186
+ for (const H of F)
19187
+ H.id && H.kind !== "thinking" && K.add(H.id);
19188
+ K.size > 800 && (y.current[M] = new Set(Array.from(K).slice(-400))), v((H) => ({ ...H, [M]: _.nextBefore ?? null })), l((H) => {
19189
+ const Q = H[M] ?? [];
19190
+ return { ...H, [M]: lh(Q, F) };
19196
19191
  });
19197
19192
  }), V.addEventListener("ready", (B) => {
19198
19193
  const _ = Pr(B.data);
19199
19194
  !_ || !j.has(_.sid) || (L.has(_.sid) || (L.add(_.sid), kn("live_stream_client_ready", {
19200
19195
  rid: O,
19201
19196
  sid: _.sid,
19202
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19197
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19203
19198
  })), p((M) => ({ ...M, [_.sid]: !1 })));
19204
19199
  }), V.addEventListener("busy", (B) => {
19205
19200
  const _ = Pr(B.data);
@@ -19207,7 +19202,7 @@ function RT(e, t) {
19207
19202
  const M = S.current[_.sid];
19208
19203
  M && (clearTimeout(M), delete S.current[_.sid]), l((F) => {
19209
19204
  const K = F[_.sid];
19210
- return K?.some((W) => W.kind === "thinking") ? { ...F, [_.sid]: K.filter((W) => W.kind !== "thinking") } : F;
19205
+ return K?.some((H) => H.kind === "thinking") ? { ...F, [_.sid]: K.filter((H) => H.kind !== "thinking") } : F;
19211
19206
  });
19212
19207
  }
19213
19208
  }), V.addEventListener("prompt", (B) => {
@@ -19224,7 +19219,7 @@ function RT(e, t) {
19224
19219
  }), V.onerror = () => {
19225
19220
  kn("live_stream_client_error", {
19226
19221
  rid: O,
19227
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3
19222
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3
19228
19223
  }), p((B) => {
19229
19224
  let _ = !1;
19230
19225
  const M = { ...B };
@@ -19235,7 +19230,7 @@ function RT(e, t) {
19235
19230
  }, () => {
19236
19231
  kn("live_stream_client_close", {
19237
19232
  rid: O,
19238
- elapsedMs: Math.round((performance.now() - q) * 1e3) / 1e3,
19233
+ elapsedMs: Math.round((performance.now() - W) * 1e3) / 1e3,
19239
19234
  firstMsgCount: X.size,
19240
19235
  readyCount: L.size
19241
19236
  }), V.close(), clearTimeout(E);
@@ -19253,35 +19248,35 @@ function RT(e, t) {
19253
19248
  ts: Date.now(),
19254
19249
  pending: !0
19255
19250
  };
19256
- l((q) => ({
19257
- ...q,
19251
+ l((W) => ({
19252
+ ...W,
19258
19253
  [j]: Hr([
19259
- ...(q[j] ?? []).filter((X) => X.kind !== "thinking"),
19254
+ ...(W[j] ?? []).filter((X) => X.kind !== "thinking"),
19260
19255
  O
19261
19256
  ])
19262
- })), d((q) => ({ ...q, [j]: !0 }));
19257
+ })), d((W) => ({ ...W, [j]: !0 }));
19263
19258
  }, []), A = re((j, k) => {
19264
19259
  l((O) => {
19265
- const q = O[j] ?? [];
19260
+ const W = O[j] ?? [];
19266
19261
  let X = !1;
19267
- const L = q.filter((H) => X || !H.pending || !Ws(H.text, k) ? !0 : (X = !0, !1));
19268
- return L.length === q.length ? O : { ...O, [j]: L };
19262
+ const L = W.filter((q) => X || !q.pending || !Ws(q.text, k) ? !0 : (X = !0, !1));
19263
+ return L.length === W.length ? O : { ...O, [j]: L };
19269
19264
  });
19270
19265
  }, []), C = re(async (j, k, O = {}) => {
19271
- const q = await ye(Za(j)), X = Wo(Array.isArray(q.messages) ? q.messages : []), L = y.current[j] || (y.current[j] = /* @__PURE__ */ new Set());
19272
- for (const H of X)
19273
- H.id && H.kind !== "thinking" && L.add(H.id);
19274
- return L.size > 800 && (y.current[j] = new Set(Array.from(L).slice(-400))), p((H) => ({ ...H, [j]: !1 })), l((H) => {
19275
- const V = H[j] ?? [], E = lh(V, X);
19276
- return !O.dropOptimistic || !k ? { ...H, [j]: E } : {
19277
- ...H,
19266
+ const W = await ye(Za(j)), X = Wo(Array.isArray(W.messages) ? W.messages : []), L = y.current[j] || (y.current[j] = /* @__PURE__ */ new Set());
19267
+ for (const q of X)
19268
+ q.id && q.kind !== "thinking" && L.add(q.id);
19269
+ return L.size > 800 && (y.current[j] = new Set(Array.from(L).slice(-400))), p((q) => ({ ...q, [j]: !1 })), l((q) => {
19270
+ const V = q[j] ?? [], E = lh(V, X);
19271
+ return !O.dropOptimistic || !k ? { ...q, [j]: E } : {
19272
+ ...q,
19278
19273
  [j]: E.filter((B) => !B.pending || !Ws(B.text, k))
19279
19274
  };
19280
19275
  }), X;
19281
19276
  }, []), R = re(
19282
19277
  (j, k, O) => {
19283
19278
  (async () => {
19284
- const q = O?.id;
19279
+ const W = O?.id;
19285
19280
  for (let X = 0; X < 45; X++) {
19286
19281
  X > 0 && await new Promise((L) => window.setTimeout(L, X < 8 ? 500 : 1200));
19287
19282
  try {
@@ -19291,9 +19286,9 @@ function RT(e, t) {
19291
19286
  A(j, k);
19292
19287
  return;
19293
19288
  }
19294
- const H = await ye(
19289
+ const q = await ye(
19295
19290
  `/api/sessions/${encodeURIComponent(j)}/queue`
19296
- ), V = Array.isArray(H.queue) ? H.queue : [], E = (q ? V.find((B) => B.id === q) : null) ?? V.find((B) => Ws(B.text, k));
19291
+ ), V = Array.isArray(q.queue) ? q.queue : [], E = (W ? V.find((B) => B.id === W) : null) ?? V.find((B) => Ws(B.text, k));
19297
19292
  if (!E) {
19298
19293
  await C(j, k, { dropOptimistic: !0 }).catch(() => null), A(j, k);
19299
19294
  return;
@@ -19313,14 +19308,14 @@ function RT(e, t) {
19313
19308
  if (!(j in N.current)) return !0;
19314
19309
  const k = N.current[j];
19315
19310
  if (k == null) return !1;
19316
- const O = await ye(Ud(j, k)), q = Wo(Array.isArray(O.messages) ? O.messages : []);
19317
- if (v((L) => ({ ...L, [j]: O.nextBefore ?? null })), !q.length) return (O.nextBefore ?? null) !== null;
19311
+ const O = await ye(Ud(j, k)), W = Wo(Array.isArray(O.messages) ? O.messages : []);
19312
+ if (v((L) => ({ ...L, [j]: O.nextBefore ?? null })), !W.length) return (O.nextBefore ?? null) !== null;
19318
19313
  const X = y.current[j] || (y.current[j] = /* @__PURE__ */ new Set());
19319
- for (const L of q)
19314
+ for (const L of W)
19320
19315
  L.id && L.kind !== "thinking" && X.add(L.id);
19321
19316
  return l((L) => {
19322
- const H = L[j] ?? [], V = new Set(H.map((B) => B.id).filter(Boolean)), E = q.filter((B) => !B.id || !V.has(B.id));
19323
- return E.length ? { ...L, [j]: [...E, ...H.filter((B) => !B.seed)] } : L;
19317
+ const q = L[j] ?? [], V = new Set(q.map((B) => B.id).filter(Boolean)), E = W.filter((B) => !B.id || !V.has(B.id));
19318
+ return E.length ? { ...L, [j]: [...E, ...q.filter((B) => !B.seed)] } : L;
19324
19319
  }), (O.nextBefore ?? null) !== null;
19325
19320
  }, []), z = _e(
19326
19321
  () => ({ ...o, ...c }),
@@ -19550,7 +19545,7 @@ function jT() {
19550
19545
  x.removeEventListener("scroll", $e), window.removeEventListener("resize", $e), et.disconnect(), mt.disconnect(), ie && cancelAnimationFrame(ie), T.style.removeProperty("--lfg-mobile-header-fade-opacity"), Z.style.removeProperty("--lfg-mobile-composer-fade-opacity");
19551
19546
  };
19552
19547
  }, [z, k]);
19553
- const [q, X] = w(!1), [L, H] = w([]), [V, E] = w(null), [B, _] = w(null), [M, F] = w(null), [K, W] = w(null), [Q, te] = w(null), [fe, de] = w(!1), Ue = U(!1), [Re, Ae] = w(), [we, De] = w(
19548
+ const [W, X] = w(!1), [L, q] = w([]), [V, E] = w(null), [B, _] = w(null), [M, F] = w(null), [K, H] = w(null), [Q, te] = w(null), [fe, de] = w(!1), Ue = U(!1), [Re, Ae] = w(), [we, De] = w(
19554
19549
  () => Us()
19555
19550
  ), [be, We] = w([]), [Ke, Ze] = w([]), [st, Fe] = w(() => /* @__PURE__ */ new Set()), se = re((x) => {
19556
19551
  const T = Bw(x);
@@ -19757,7 +19752,7 @@ function jT() {
19757
19752
  version: typeof x.version == "string" ? x.version : null,
19758
19753
  generation: op(),
19759
19754
  bootId: typeof x.bootId == "string" ? x.bootId : null
19760
- }), Ie(x.onboarding ?? null), !b && x.onboarding && !x.onboarding.completedAt && !x.users?.length && !x.sessions?.length && Ge(!0), Lt(!!x.computer), H(x.codingAgents ?? []), De(Us(x.models)), Jt(x.settings ?? {
19755
+ }), Ie(x.onboarding ?? null), !b && x.onboarding && !x.onboarding.completedAt && !x.users?.length && !x.sessions?.length && Ge(!0), Lt(!!x.computer), q(x.codingAgents ?? []), De(Us(x.models)), Jt(x.settings ?? {
19761
19756
  timeZone: x.auto?.tz ?? gs,
19762
19757
  maxLiveAgents: 16,
19763
19758
  maxBotSchedules: 5,
@@ -20604,7 +20599,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20604
20599
  } catch {
20605
20600
  return;
20606
20601
  }
20607
- H(Z.agents ?? []), De(Us(Z.models)), We(ie.checks ?? []);
20602
+ q(Z.agents ?? []), De(Us(Z.models)), We(ie.checks ?? []);
20608
20603
  }, []), Si = re(async () => {
20609
20604
  try {
20610
20605
  const x = await ye("/api/connections");
@@ -20630,7 +20625,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20630
20625
  }
20631
20626
  async function tb(x, T) {
20632
20627
  const Z = L;
20633
- H(
20628
+ q(
20634
20629
  (ie) => ie.map(($e) => $e.key === x ? { ...$e, visible: T } : $e)
20635
20630
  );
20636
20631
  try {
@@ -20639,13 +20634,13 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20639
20634
  headers: { "Content-Type": "application/json" },
20640
20635
  body: JSON.stringify({ visible: T })
20641
20636
  });
20642
- H(ie.agents ?? []), De(Us(ie.models));
20637
+ q(ie.agents ?? []), De(Us(ie.models));
20643
20638
  } catch (ie) {
20644
- H(Z), ve.error(ie instanceof Error ? ie.message : String(ie));
20639
+ q(Z), ve.error(ie instanceof Error ? ie.message : String(ie));
20645
20640
  }
20646
20641
  }
20647
20642
  function Fl(x) {
20648
- H(
20643
+ q(
20649
20644
  (T) => T.map(
20650
20645
  (Z) => Z.key === x ? { ...Z, status: { ...Z.status, setupRunning: !0 } } : Z
20651
20646
  )
@@ -20653,7 +20648,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20653
20648
  ye(`/api/coding-agents/${x}/setup`, {
20654
20649
  method: "POST"
20655
20650
  }).then((T) => {
20656
- H(T.agents ?? []), De(Us(T.models)), window.setTimeout(() => void zn(), 3e3);
20651
+ q(T.agents ?? []), De(Us(T.models)), window.setTimeout(() => void zn(), 3e3);
20657
20652
  }),
20658
20653
  {
20659
20654
  loading: "Starting setup…",
@@ -20663,7 +20658,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20663
20658
  );
20664
20659
  }
20665
20660
  async function Ci(x, T, Z, ie = {}, $e = "the provider") {
20666
- F(Z ?? null), Z && W(null), _($e);
20661
+ F(Z ?? null), Z && H(null), _($e);
20667
20662
  try {
20668
20663
  const et = await ye(T, {
20669
20664
  method: "POST",
@@ -20672,7 +20667,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20672
20667
  });
20673
20668
  if (et.status === "error") throw new Error(et.error || "Couldn't start login");
20674
20669
  if (et.status === "complete") {
20675
- _(null), ve.success(`${La(et.provider)} connected`), F(null), Z && W(Z), await Promise.all([
20670
+ _(null), ve.success(`${La(et.provider)} connected`), F(null), Z && H(Z), await Promise.all([
20676
20671
  zn({ refreshModels: !0 }),
20677
20672
  Si()
20678
20673
  ]);
@@ -20795,7 +20790,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20795
20790
  }
20796
20791
  async function Ol() {
20797
20792
  const x = M;
20798
- E(null), F(null), x && W(x), yc(), await Promise.all([
20793
+ E(null), F(null), x && H(x), yc(), await Promise.all([
20799
20794
  zn({ refreshModels: !0 }),
20800
20795
  Si()
20801
20796
  ]);
@@ -20914,7 +20909,7 @@ ${x.reasoning.map((br) => `- ${br}`).join(`
20914
20909
  // composer mounted underneath means it rides the keyboard up and down (and
20915
20910
  // repads <main> as it goes) behind the sheet — motion you can see through
20916
20911
  // the backdrop, for a control you can't reach.
20917
- !l && ke === "live", db = $l ? "pb-[calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+var(--lfg-mobile-surface-dock-height))] [scroll-padding-bottom:calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+var(--lfg-mobile-surface-dock-height))]" : z && (ke === "bots" || ke === "auto") ? "pb-[calc(var(--lfg-mobile-surface-dock-height)+var(--lfg-device-safe-bottom))] [scroll-padding-bottom:calc(var(--lfg-mobile-surface-dock-height)+var(--lfg-device-safe-bottom))]" : ke === "live" ? q ? "pb-[calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+0.75rem)] md:pb-3" : "pb-[var(--lfg-above-orb)] md:pb-3" : "pb-3", Dr = Le === "new" ? "new" : Le ? un.find((x) => x.id === Le) ?? null : null, ef = ke === "bots" && j, Mi = (ke === "live" || ef) && !Dr, Dl = Mi && j, ub = Dl || ke === "computer";
20912
+ !l && ke === "live", db = $l ? "pb-[calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+var(--lfg-mobile-surface-dock-height))] [scroll-padding-bottom:calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+var(--lfg-mobile-surface-dock-height))]" : z && (ke === "bots" || ke === "auto") ? "pb-[calc(var(--lfg-mobile-surface-dock-height)+var(--lfg-device-safe-bottom))] [scroll-padding-bottom:calc(var(--lfg-mobile-surface-dock-height)+var(--lfg-device-safe-bottom))]" : ke === "live" ? W ? "pb-[calc(var(--lfg-inline-composer-height,var(--lfg-composer-clear))+0.75rem)] md:pb-3" : "pb-[var(--lfg-above-orb)] md:pb-3" : "pb-3", Dr = Le === "new" ? "new" : Le ? un.find((x) => x.id === Le) ?? null : null, ef = ke === "bots" && j, Mi = (ke === "live" || ef) && !Dr, Dl = Mi && j, ub = Dl || ke === "computer";
20918
20913
  return /* @__PURE__ */ r(
20919
20914
  pi.Provider,
20920
20915
  {
@@ -22084,13 +22079,13 @@ function GT({
22084
22079
  G(() => () => {
22085
22080
  k && URL.revokeObjectURL(k);
22086
22081
  }, [k]);
22087
- const [O, q] = w(s);
22082
+ const [O, W] = w(s);
22088
22083
  G(() => {
22089
- s.length && q(($) => $.length ? $ : s);
22084
+ s.length && W(($) => $.length ? $ : s);
22090
22085
  }, [s]);
22091
- const [X, L] = w(""), [H, V] = w(!1), [E, B] = w(() => localStorage.getItem("lfg_v2_repo") || ""), [_, M] = w(""), F = E || O[0]?.cwd || "", K = n.filter(($) => $.visible && $.status.configured), W = n.filter(
22086
+ const [X, L] = w(""), [q, V] = w(!1), [E, B] = w(() => localStorage.getItem("lfg_v2_repo") || ""), [_, M] = w(""), F = E || O[0]?.cwd || "", K = n.filter(($) => $.visible && $.status.configured), H = n.filter(
22092
22087
  ($) => !$.status.configured && $.status.canAutoSetup
22093
- ), Q = n.some(($) => $.status.setupRunning), te = W.length > 0 && W.every(($) => v.has($.key)), fe = W.filter(
22088
+ ), Q = n.some(($) => $.status.setupRunning), te = H.length > 0 && H.every(($) => v.has($.key)), fe = H.filter(
22094
22089
  ($) => v.has($.key)
22095
22090
  ).length;
22096
22091
  G(() => {
@@ -22160,7 +22155,7 @@ function GT({
22160
22155
  headers: { "Content-Type": "application/json" },
22161
22156
  body: JSON.stringify({ url: X.trim() })
22162
22157
  });
22163
- q($.repos ?? []), $.repo?.cwd && B($.repo.cwd), L("");
22158
+ W($.repos ?? []), $.repo?.cwd && B($.repo.cwd), L("");
22164
22159
  } catch ($) {
22165
22160
  g($ instanceof Error ? $.message : "Clone failed");
22166
22161
  } finally {
@@ -22178,11 +22173,11 @@ function GT({
22178
22173
  }
22179
22174
  function st() {
22180
22175
  y(
22181
- te ? /* @__PURE__ */ new Set() : new Set(W.map(($) => $.key))
22176
+ te ? /* @__PURE__ */ new Set() : new Set(H.map(($) => $.key))
22182
22177
  );
22183
22178
  }
22184
22179
  async function Fe() {
22185
- const $ = W.filter((Ve) => v.has(Ve.key)).map((Ve) => Ve.key);
22180
+ const $ = H.filter((Ve) => v.has(Ve.key)).map((Ve) => Ve.key);
22186
22181
  if ($.length) {
22187
22182
  h(!0), g(null), N({ lines: [], running: !0, error: null });
22188
22183
  try {
@@ -22315,7 +22310,7 @@ function GT({
22315
22310
  /* @__PURE__ */ r("h1", { className: "text-xl font-semibold", children: "Install coding agents" }),
22316
22311
  /* @__PURE__ */ r("p", { className: "mb-5 mt-1 text-sm text-muted-foreground", children: "Choose the agents you want, then install them together in one go. You can add more later in Settings." }),
22317
22312
  /* @__PURE__ */ m("div", { className: "flex max-h-72 flex-col gap-2 overflow-y-auto", children: [
22318
- W.length > 0 && /* @__PURE__ */ m("label", { className: "flex cursor-pointer items-center gap-3 px-3 py-1 text-xs font-medium text-muted-foreground", children: [
22313
+ H.length > 0 && /* @__PURE__ */ m("label", { className: "flex cursor-pointer items-center gap-3 px-3 py-1 text-xs font-medium text-muted-foreground", children: [
22319
22314
  /* @__PURE__ */ r(
22320
22315
  "input",
22321
22316
  {
@@ -22378,7 +22373,7 @@ function GT({
22378
22373
  }
22379
22374
  )
22380
22375
  ] }),
22381
- W.length > 0 && /* @__PURE__ */ m(
22376
+ H.length > 0 && /* @__PURE__ */ m(
22382
22377
  "button",
22383
22378
  {
22384
22379
  type: "button",
@@ -22482,11 +22477,11 @@ function GT({
22482
22477
  /* @__PURE__ */ r(
22483
22478
  Au,
22484
22479
  {
22485
- open: H,
22480
+ open: q,
22486
22481
  initialPath: F || void 0,
22487
22482
  onOpenChange: V,
22488
22483
  onSelected: ($) => {
22489
- q((Ve) => [
22484
+ W((Ve) => [
22490
22485
  ...Ve.filter((J) => J.cwd !== $.cwd),
22491
22486
  $
22492
22487
  ]), B($.cwd);
@@ -22495,7 +22490,7 @@ function GT({
22495
22490
  B((Ve) => Ve === $ ? "" : Ve);
22496
22491
  },
22497
22492
  onReposChanged: ($) => {
22498
- q((Ve) => Ve.filter((J) => J.cwd !== $)), B((Ve) => Ve === $ ? "" : Ve);
22493
+ W((Ve) => Ve.filter((J) => J.cwd !== $)), B((Ve) => Ve === $ ? "" : Ve);
22499
22494
  }
22500
22495
  }
22501
22496
  )
@@ -22774,10 +22769,10 @@ function rI({
22774
22769
  autoTriageBusy: j = !1,
22775
22770
  onClearFindings: k,
22776
22771
  clearFindingsBusy: O = !1,
22777
- projectOptions: q = [],
22772
+ projectOptions: W = [],
22778
22773
  onProjectChange: X,
22779
22774
  onUserChange: L,
22780
- onOpenSettings: H,
22775
+ onOpenSettings: q,
22781
22776
  onOpenAsk: V,
22782
22777
  onOpenBots: E,
22783
22778
  onOpenSessions: B,
@@ -22785,7 +22780,7 @@ function rI({
22785
22780
  railSurface: M = "sessions",
22786
22781
  bots: F = [],
22787
22782
  selectedBotId: K = null,
22788
- onOpenBot: W,
22783
+ onOpenBot: H,
22789
22784
  onNewBot: Q,
22790
22785
  onEditBot: te,
22791
22786
  onRefreshBots: fe,
@@ -22886,10 +22881,10 @@ function rI({
22886
22881
  clearFindingsBusy: O,
22887
22882
  onNew: I,
22888
22883
  userFilter: d,
22889
- projectOptions: q,
22884
+ projectOptions: W,
22890
22885
  onProjectChange: X,
22891
22886
  onUserChange: L,
22892
- onOpenSettings: H,
22887
+ onOpenSettings: q,
22893
22888
  onOpenAsk: V,
22894
22889
  onOpenBots: E,
22895
22890
  onOpenSessions: B,
@@ -22897,7 +22892,7 @@ function rI({
22897
22892
  railSurface: M,
22898
22893
  bots: F,
22899
22894
  selectedBotId: K,
22900
- onOpenBot: W,
22895
+ onOpenBot: H,
22901
22896
  onNewBot: Q,
22902
22897
  onEditBot: te,
22903
22898
  onRefreshBots: fe,
@@ -23062,10 +23057,10 @@ function sI({
23062
23057
  onOpenBots: k,
23063
23058
  onOpenSessions: O = () => {
23064
23059
  },
23065
- onOpenAuto: q,
23060
+ onOpenAuto: W,
23066
23061
  railSurface: X = "sessions",
23067
23062
  bots: L = [],
23068
- selectedBotId: H = null,
23063
+ selectedBotId: q = null,
23069
23064
  onOpenBot: V,
23070
23065
  onNewBot: E,
23071
23066
  onEditBot: B,
@@ -23073,7 +23068,7 @@ function sI({
23073
23068
  pagesMenu: M,
23074
23069
  repos: F = [],
23075
23070
  onReposChanged: K,
23076
- hosted: W = !1,
23071
+ hosted: H = !1,
23077
23072
  coach: Q = null,
23078
23073
  focus: te,
23079
23074
  topPinned: fe,
@@ -23246,11 +23241,11 @@ function sI({
23246
23241
  },
23247
23242
  [zt]
23248
23243
  ), nn = _e(
23249
- () => H ? L.find((ee) => ee.id === H) ?? null : null,
23250
- [L, H]
23251
- ), _t = H ? Re.find(
23252
- (ee) => ee.botId === H && (ee.conversationId === Ae || ee.sessionId === Ae)
23253
- )?.sessionId ?? Mt(H) : null;
23244
+ () => q ? L.find((ee) => ee.id === q) ?? null : null,
23245
+ [L, q]
23246
+ ), _t = q ? Re.find(
23247
+ (ee) => ee.botId === q && (ee.conversationId === Ae || ee.sessionId === Ae)
23248
+ )?.sessionId ?? Mt(q) : null;
23254
23249
  G(() => {
23255
23250
  X !== "chat" || !_t || (Te((ee) => ee === _t ? ee : _t), oe(_t));
23256
23251
  }, [X, _t]);
@@ -23632,7 +23627,7 @@ function sI({
23632
23627
  }
23633
23628
  ) : null,
23634
23629
  mr.map((ee) => {
23635
- const Se = ee.bot, Me = ee.sessionId, it = ee.session, Dt = !!(Me && i[Me]), nt = H === Se.id && (!Ae || Ae === ee.conversationId || Ae === ee.sessionId), rn = it?.last?.text || it?.lastUserText || ee.lastMessagePreview || Se.lastMessagePreview || "", un = bl(Cp(rn, Dt)), Ln = () => {
23630
+ const Se = ee.bot, Me = ee.sessionId, it = ee.session, Dt = !!(Me && i[Me]), nt = q === Se.id && (!Ae || Ae === ee.conversationId || Ae === ee.sessionId), rn = it?.last?.text || it?.lastUserText || ee.lastMessagePreview || Se.lastMessagePreview || "", un = bl(Cp(rn, Dt)), Ln = () => {
23636
23631
  V?.(Se.id, ee.conversationId), Me && en(Me, !1);
23637
23632
  }, ne = ee.unread && Me ? () => we(Me) : void 0;
23638
23633
  return /* @__PURE__ */ r(
@@ -23698,7 +23693,7 @@ function sI({
23698
23693
  M
23699
23694
  ] }) : /* @__PURE__ */ m("div", { className: "flex shrink-0 flex-col gap-2 border-b border-border px-2 py-2", children: [
23700
23695
  /* @__PURE__ */ m("div", { className: "flex items-center gap-1.5", children: [
23701
- /* @__PURE__ */ r(Su, { hosted: W }),
23696
+ /* @__PURE__ */ r(Su, { hosted: H }),
23702
23697
  le ? /* @__PURE__ */ r(
23703
23698
  "button",
23704
23699
  {
@@ -23712,7 +23707,7 @@ function sI({
23712
23707
  ) : null,
23713
23708
  /* @__PURE__ */ m("div", { className: "ml-auto flex items-center gap-1", children: [
23714
23709
  j ? /* @__PURE__ */ m(je, { children: [
23715
- W ? null : /* @__PURE__ */ r(u0, {}),
23710
+ H ? null : /* @__PURE__ */ r(u0, {}),
23716
23711
  /* @__PURE__ */ r(a0, { active: !1, onOpen: j })
23717
23712
  ] }) : null,
23718
23713
  P ? /* @__PURE__ */ r(
@@ -23726,7 +23721,7 @@ function sI({
23726
23721
  M
23727
23722
  ] })
23728
23723
  ] }),
23729
- /* @__PURE__ */ r(Fu, { active: X, onOpenSessions: O, onOpenBots: k, onOpenAuto: q })
23724
+ /* @__PURE__ */ r(Fu, { active: X, onOpenSessions: O, onOpenBots: k, onOpenAuto: W })
23730
23725
  ] }),
23731
23726
  /* @__PURE__ */ r("div", { className: "session-list-scroll min-h-0 flex-1 overflow-y-auto px-1.5 py-2", children: X === "chat" ? xo : /* @__PURE__ */ m(je, { children: [
23732
23727
  !$ && I ? /* @__PURE__ */ m(
@@ -23756,7 +23751,7 @@ function sI({
23756
23751
  }
23757
23752
  )
23758
23753
  ] }) }),
23759
- W ? /* @__PURE__ */ r(
23754
+ H ? /* @__PURE__ */ r(
23760
23755
  "div",
23761
23756
  {
23762
23757
  "data-lfg-host-slot": "rail-footer",
@@ -24039,15 +24034,15 @@ const K0 = Mr(function({
24039
24034
  onSwipeLeft: N
24040
24035
  }) {
24041
24036
  const S = U(null), I = U({ startX: 0, startY: 0, x: 0, dragging: !1, decided: !1, horizontal: !1, swiped: !1 }), [A, C] = w(!1), R = 52, P = (k) => {
24042
- const O = k.touches[0], q = S.current;
24043
- q && (q.style.transition = ""), I.current = { startX: O.clientX, startY: O.clientY, x: 0, dragging: !0, decided: !1, horizontal: !1, swiped: !1 };
24037
+ const O = k.touches[0], W = S.current;
24038
+ W && (W.style.transition = ""), I.current = { startX: O.clientX, startY: O.clientY, x: 0, dragging: !0, decided: !1, horizontal: !1, swiped: !1 };
24044
24039
  }, z = (k) => {
24045
24040
  const O = I.current;
24046
24041
  if (!O.dragging) return;
24047
- const q = k.touches[0], X = q.clientX - O.startX, L = q.clientY - O.startY;
24042
+ const W = k.touches[0], X = W.clientX - O.startX, L = W.clientY - O.startY;
24048
24043
  if (!O.decided && (Math.abs(X) > 8 || Math.abs(L) > 8) && (O.decided = !0, O.horizontal = Math.abs(X) > Math.abs(L), O.horizontal && (b || N) && C(!0)), !O.horizontal) return;
24049
- let H = X >= 0 ? b ? X : 0 : N ? X : 0;
24050
- H = Math.max(-96, Math.min(96, H)), O.x = H, S.current && (S.current.style.transform = `translateX(${H}px)`);
24044
+ let q = X >= 0 ? b ? X : 0 : N ? X : 0;
24045
+ q = Math.max(-96, Math.min(96, q)), O.x = q, S.current && (S.current.style.transform = `translateX(${q}px)`);
24051
24046
  }, j = () => {
24052
24047
  const k = I.current;
24053
24048
  k.horizontal && (k.swiped = !0, k.x >= R && b ? (Ct("selection"), b.onCommit()) : k.x <= -R && N && (Ct("selection"), N.onCommit()));
@@ -24753,9 +24748,11 @@ function bi({
24753
24748
  );
24754
24749
  G(() => N(0), [v?.query]);
24755
24750
  const C = re((O = f.current) => {
24756
- if (O && (O.style.height = "0px", O.style.height = `${O.scrollHeight}px`, l)) {
24757
- const q = window.getComputedStyle(O), X = Number.parseFloat(q.lineHeight), L = Number.parseFloat(q.paddingTop) + Number.parseFloat(q.paddingBottom), H = O.scrollHeight - L, V = Number.isFinite(X) && H > X * 1.5;
24758
- h.current !== V && (h.current = V, l(V));
24751
+ if (!O) return;
24752
+ const W = O.parentElement, X = W ? W.getBoundingClientRect().height : 0, L = W?.style.height ?? "", q = W?.style.boxSizing ?? "";
24753
+ if (W && X > 0 && (W.style.boxSizing = "border-box", W.style.height = `${X}px`), O.style.height = "0px", O.style.height = `${O.scrollHeight}px`, W && X > 0 && (W.style.height = L, W.style.boxSizing = q), l) {
24754
+ const V = window.getComputedStyle(O), E = Number.parseFloat(V.lineHeight), B = Number.parseFloat(V.paddingTop) + Number.parseFloat(V.paddingBottom), _ = O.scrollHeight - B, M = Number.isFinite(E) && _ > E * 1.5;
24755
+ h.current !== M && (h.current = M, l(M));
24759
24756
  }
24760
24757
  }, [l]), R = re(
24761
24758
  (O) => {
@@ -24776,22 +24773,22 @@ function bi({
24776
24773
  }
24777
24774
  function z(O) {
24778
24775
  if (!v) return;
24779
- const q = f.current, X = kN(e, v, O);
24776
+ const W = f.current, X = kN(e, v, O);
24780
24777
  t(X.value), y(null), requestAnimationFrame(() => {
24781
- q?.focus(), q?.setSelectionRange(X.cursor, X.cursor), C(q);
24778
+ W?.focus(), W?.setSelectionRange(X.cursor, X.cursor), C(W);
24782
24779
  });
24783
24780
  }
24784
24781
  function j(O) {
24785
24782
  if (!p) return;
24786
- const q = f.current, X = `$${O.trigger} `, L = e.slice(0, p.start) + X + e.slice(p.end), H = p.start + X.length;
24783
+ const W = f.current, X = `$${O.trigger} `, L = e.slice(0, p.start) + X + e.slice(p.end), q = p.start + X.length;
24787
24784
  t(L), g(null), requestAnimationFrame(() => {
24788
- q?.focus(), q?.setSelectionRange(H, H), C(q);
24785
+ W?.focus(), W?.setSelectionRange(q, q), C(W);
24789
24786
  });
24790
24787
  }
24791
24788
  function k() {
24792
- const O = f.current, q = O?.selectionStart ?? e.length;
24793
- g({ start: q, end: q, query: "" }), requestAnimationFrame(() => {
24794
- O?.focus(), O?.setSelectionRange(q, q);
24789
+ const O = f.current, W = O?.selectionStart ?? e.length;
24790
+ g({ start: W, end: W, query: "" }), requestAnimationFrame(() => {
24791
+ O?.focus(), O?.setSelectionRange(W, W);
24795
24792
  });
24796
24793
  }
24797
24794
  return /* @__PURE__ */ m("div", { ref: d, className: "relative min-w-0 flex-1", children: [
@@ -24836,21 +24833,21 @@ function bi({
24836
24833
  return;
24837
24834
  }
24838
24835
  if (v && A.length) {
24839
- const q = A.length;
24836
+ const W = A.length;
24840
24837
  if (O.key === "Escape") {
24841
24838
  O.preventDefault(), y(null);
24842
24839
  return;
24843
24840
  }
24844
24841
  if (O.key === "ArrowDown") {
24845
- O.preventDefault(), N((X) => (X + 1) % q);
24842
+ O.preventDefault(), N((X) => (X + 1) % W);
24846
24843
  return;
24847
24844
  }
24848
24845
  if (O.key === "ArrowUp") {
24849
- O.preventDefault(), N((X) => (X - 1 + q) % q);
24846
+ O.preventDefault(), N((X) => (X - 1 + W) % W);
24850
24847
  return;
24851
24848
  }
24852
24849
  if (O.key === "Enter" || O.key === "Tab") {
24853
- O.preventDefault(), z(A[Math.min(b, q - 1)]);
24850
+ O.preventDefault(), z(A[Math.min(b, W - 1)]);
24854
24851
  return;
24855
24852
  }
24856
24853
  }
@@ -24933,7 +24930,7 @@ function mI({
24933
24930
  }) {
24934
24931
  const h = e.sessionId, p = !!e.shippedReview, g = lu([e.sessionId, e.nativeSessionId]), { answerInSession: v } = hi(), y = h ? `session:${h}` : "session:missing", [b, N] = w(
24935
24932
  () => Wc(y)?.text ?? ""
24936
- ), [S, I] = w(!1), [A, C] = w(!1), [R, P] = w(null), [z, j] = w(!1), k = U(null), [O, q] = w(0), [X, L] = w(!1), H = yu({
24933
+ ), [S, I] = w(!1), [A, C] = w(!1), [R, P] = w(null), [z, j] = w(!1), k = U(null), [O, W] = w(0), [X, L] = w(!1), q = yu({
24937
24934
  endpoint: (se) => h ? p ? `/api/uploads?filename=${encodeURIComponent(se.name)}` : `/api/sessions/${h}/upload?filename=${encodeURIComponent(se.name)}` : null,
24938
24935
  disabled: S
24939
24936
  }), {
@@ -24943,7 +24940,7 @@ function mI({
24943
24940
  removeAttachment: _,
24944
24941
  resolveUpload: M,
24945
24942
  forgetAllUploads: F
24946
- } = H, [K] = w(() => new _S()), W = rS(), { messages: Q, setMessages: te, sendMessage: fe, status: de } = W, Ue = _e(() => RS(Q), [Q]), [Re, Ae] = w(!1), we = n || Re || de === "submitted" || de === "streaming", De = re(
24943
+ } = q, [K] = w(() => new _S()), H = rS(), { messages: Q, setMessages: te, sendMessage: fe, status: de } = H, Ue = _e(() => RS(Q), [Q]), [Re, Ae] = w(!1), we = n || Re || de === "submitted" || de === "streaming", De = re(
24947
24944
  (se) => {
24948
24945
  N(se), h && (i?.(h, se.trim().length > 0), dg({
24949
24946
  contextKey: y,
@@ -24963,7 +24960,7 @@ function mI({
24963
24960
  );
24964
24961
  }, [o, e]), We = re(
24965
24962
  (se, ae) => {
24966
- De(ae.trim() ? `${ae.trimEnd()} ${se}` : se), q((Ne) => Ne + 1);
24963
+ De(ae.trim() ? `${ae.trimEnd()} ${se}` : se), W((Ne) => Ne + 1);
24967
24964
  },
24968
24965
  [De]
24969
24966
  );
@@ -25178,7 +25175,7 @@ function mI({
25178
25175
  "form",
25179
25176
  {
25180
25177
  onSubmit: Ze,
25181
- ...H.dropZoneProps,
25178
+ ...q.dropZoneProps,
25182
25179
  className: D(
25183
25180
  // Sit on the same surface as the chat (no card/border seam) and let
25184
25181
  // the transcript melt into the bar via a soft gradient fade so the
@@ -25192,16 +25189,16 @@ function mI({
25192
25189
  ),
25193
25190
  children: [
25194
25191
  /* @__PURE__ */ r(yk, { participants: be }),
25195
- H.fileInput,
25192
+ q.fileInput,
25196
25193
  /* @__PURE__ */ r(
25197
25194
  bu,
25198
25195
  {
25199
25196
  className: "mb-2",
25200
25197
  items: V.map((se) => ({ att: se })),
25201
25198
  disabled: S,
25202
- onAnnotate: H.setAnnotatingId,
25199
+ onAnnotate: q.setAnnotatingId,
25203
25200
  onRemove: _,
25204
- onToggleHd: H.setAttachmentHd
25201
+ onToggleHd: q.setAttachmentHd
25205
25202
  }
25206
25203
  ),
25207
25204
  /* @__PURE__ */ m(
@@ -25225,7 +25222,7 @@ function mI({
25225
25222
  type: "button",
25226
25223
  variant: B ? "brand-soft" : "tint",
25227
25224
  className: "size-10 shrink-0 rounded-full md:size-8",
25228
- onClick: H.openFilePicker,
25225
+ onClick: q.openFilePicker,
25229
25226
  "aria-label": "Attach files",
25230
25227
  title: "Attach files",
25231
25228
  disabled: S,
@@ -25241,7 +25238,7 @@ function mI({
25241
25238
  onValueChange: De,
25242
25239
  onMultilineChange: L,
25243
25240
  scrollToEndNonce: O,
25244
- onPaste: H.onPasteFiles,
25241
+ onPaste: q.onPasteFiles,
25245
25242
  onKeyDown: (se) => {
25246
25243
  if (!(se.key !== "Enter" || se.shiftKey)) {
25247
25244
  if (se.preventDefault(), se.metaKey || se.ctrlKey) {
@@ -25322,7 +25319,7 @@ function mI({
25322
25319
  }
25323
25320
  ) : null
25324
25321
  ),
25325
- H.annotator
25322
+ q.annotator
25326
25323
  ] });
25327
25324
  }
25328
25325
  function Z0({
@@ -25894,13 +25891,13 @@ function xI({
25894
25891
  onTogglePin: v,
25895
25892
  onClose: y
25896
25893
  }) {
25897
- const b = yg(), [N, S] = w(null), [I, A] = w(!1), C = U(null), R = U(null), P = U(null), z = U(!1), j = U(null), k = !!o[e], O = i[e] ?? null, q = a[e] ?? U0, X = s.indexOf(e), L = X > 0 ? s[X - 1] : null, H = X >= 0 && X < s.length - 1 ? s[X + 1] : null, V = re(
25898
- (W) => {
25899
- if (!W || z.current) return;
25900
- const te = s.indexOf(W) > X ? 1 : -1;
25894
+ const b = yg(), [N, S] = w(null), [I, A] = w(!1), C = U(null), R = U(null), P = U(null), z = U(!1), j = U(null), k = !!o[e], O = i[e] ?? null, W = a[e] ?? U0, X = s.indexOf(e), L = X > 0 ? s[X - 1] : null, q = X >= 0 && X < s.length - 1 ? s[X + 1] : null, V = re(
25895
+ (H) => {
25896
+ if (!H || z.current) return;
25897
+ const te = s.indexOf(H) > X ? 1 : -1;
25901
25898
  j.current = te, Ct("selection");
25902
25899
  const fe = P.current;
25903
- fe && (fe.getAnimations().forEach((de) => de.cancel()), fe.style.transition = "", fe.style.transform = "", fe.style.opacity = ""), d(W);
25900
+ fe && (fe.getAnimations().forEach((de) => de.cancel()), fe.style.transition = "", fe.style.transform = "", fe.style.opacity = ""), d(H);
25904
25901
  },
25905
25902
  [X, d, s]
25906
25903
  );
@@ -25908,10 +25905,10 @@ function xI({
25908
25905
  S(null), A(!1);
25909
25906
  }, [e]);
25910
25907
  const E = re(
25911
- async (W) => {
25908
+ async (H) => {
25912
25909
  S(null), A(!1);
25913
25910
  try {
25914
- await h(e, W), ve.success("Session renamed");
25911
+ await h(e, H), ve.success("Session renamed");
25915
25912
  } catch (Q) {
25916
25913
  throw S(Q instanceof Error ? Q.message : String(Q)), A(!0), Q;
25917
25914
  }
@@ -25922,7 +25919,7 @@ function xI({
25922
25919
  B.current.add(e), IT(e);
25923
25920
  }, [e]), G(() => (bp(e), () => yp(e)), [e]), G(
25924
25921
  () => () => {
25925
- for (const W of B.current) _T(W);
25922
+ for (const H of B.current) _T(H);
25926
25923
  },
25927
25924
  []
25928
25925
  );
@@ -25932,14 +25929,14 @@ function xI({
25932
25929
  _.current = !1;
25933
25930
  return;
25934
25931
  }
25935
- const W = P.current;
25936
- if (!W) return;
25932
+ const H = P.current;
25933
+ if (!H) return;
25937
25934
  const Q = j.current;
25938
25935
  j.current = null;
25939
25936
  const te = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
25940
25937
  if (!Q || te) return;
25941
25938
  const fe = Q === 1 ? 18 : -18;
25942
- W.getAnimations().forEach((de) => de.cancel()), W.style.transition = "", W.style.transform = "", W.animate(
25939
+ H.getAnimations().forEach((de) => de.cancel()), H.style.transition = "", H.style.transform = "", H.animate(
25943
25940
  [
25944
25941
  { opacity: 0, transform: `translateX(${fe}px)` },
25945
25942
  { opacity: 1, transform: "translateX(0px)" }
@@ -25948,12 +25945,12 @@ function xI({
25948
25945
  );
25949
25946
  }, [e]), G(() => {
25950
25947
  if (!b.swipeBetweenChats) return;
25951
- const W = P.current;
25952
- if (!W) return;
25948
+ const H = P.current;
25949
+ if (!H) return;
25953
25950
  const Q = 60, te = { active: !1, decided: !1, horizontal: !1, x0: 0, y0: 0, dx: 0 }, fe = (we) => {
25954
- W.style.transition = "none", W.style.transform = we ? `translateX(${we}px)` : "";
25951
+ H.style.transition = "none", H.style.transform = we ? `translateX(${we}px)` : "";
25955
25952
  }, de = (we) => {
25956
- W.style.transition = "transform 180ms cubic-bezier(0.22,1,0.36,1)", W.style.transform = "";
25953
+ H.style.transition = "transform 180ms cubic-bezier(0.22,1,0.36,1)", H.style.transform = "";
25957
25954
  }, Ue = (we) => {
25958
25955
  if (z.current || we.touches.length !== 1) return;
25959
25956
  if (!!(we.target instanceof Element ? we.target : null)?.closest("form")) {
@@ -25974,28 +25971,28 @@ function xI({
25974
25971
  }
25975
25972
  if (!te.horizontal) return;
25976
25973
  we.preventDefault(), te.dx = be;
25977
- const Ke = be > 0 ? !L : !H;
25974
+ const Ke = be > 0 ? !L : !q;
25978
25975
  fe(be * (Ke ? 0.18 : 0.5));
25979
25976
  }, Ae = () => {
25980
25977
  if (!te.active) return;
25981
25978
  const { horizontal: we, dx: De } = te;
25982
25979
  if (te.active = !1, !we) return;
25983
- const be = De > Q ? L : De < -Q ? H : null;
25980
+ const be = De > Q ? L : De < -Q ? q : null;
25984
25981
  be ? V(be) : de();
25985
25982
  };
25986
- return W.addEventListener("touchstart", Ue, { passive: !0 }), W.addEventListener("touchmove", Re, { passive: !1 }), W.addEventListener("touchend", Ae, { passive: !0 }), W.addEventListener("touchcancel", Ae, { passive: !0 }), () => {
25987
- W.removeEventListener("touchstart", Ue), W.removeEventListener("touchmove", Re), W.removeEventListener("touchend", Ae), W.removeEventListener("touchcancel", Ae);
25983
+ return H.addEventListener("touchstart", Ue, { passive: !0 }), H.addEventListener("touchmove", Re, { passive: !1 }), H.addEventListener("touchend", Ae, { passive: !0 }), H.addEventListener("touchcancel", Ae, { passive: !0 }), () => {
25984
+ H.removeEventListener("touchstart", Ue), H.removeEventListener("touchmove", Re), H.removeEventListener("touchend", Ae), H.removeEventListener("touchcancel", Ae);
25988
25985
  };
25989
- }, [V, b.swipeBetweenChats, L, H]);
25986
+ }, [V, b.swipeBetweenChats, L, q]);
25990
25987
  const M = re(() => {
25991
- const W = window.innerWidth || 1, Q = window.innerHeight || 1, te = Math.max(c.width / W, 1e-4), fe = Math.max(c.height / Q, 1e-4);
25988
+ const H = window.innerWidth || 1, Q = window.innerHeight || 1, te = Math.max(c.width / H, 1e-4), fe = Math.max(c.height / Q, 1e-4);
25992
25989
  return `translate(${c.left}px, ${c.top}px) scale(${te}, ${fe})`;
25993
25990
  }, [c]);
25994
25991
  Wt(() => {
25995
- const W = C.current, Q = R.current, te = P.current;
25996
- if (!W) return;
25992
+ const H = C.current, Q = R.current, te = P.current;
25993
+ if (!H) return;
25997
25994
  const fe = M();
25998
- W.animate(
25995
+ H.animate(
25999
25996
  [
26000
25997
  { transform: fe, borderRadius: "16px", opacity: 0.55 },
26001
25998
  { transform: "translate(0px,0px) scale(1,1)", borderRadius: "0px", opacity: 1 }
@@ -26017,13 +26014,13 @@ function xI({
26017
26014
  const F = re(() => {
26018
26015
  if (z.current) return;
26019
26016
  z.current = !0, Ct("selection");
26020
- const W = C.current, Q = R.current, te = P.current, fe = M();
26017
+ const H = C.current, Q = R.current, te = P.current, fe = M();
26021
26018
  let de = !1;
26022
26019
  const Ue = () => {
26023
26020
  de || (de = !0, y());
26024
26021
  };
26025
- if (W) {
26026
- const Re = W.animate(
26022
+ if (H) {
26023
+ const Re = H.animate(
26027
26024
  [
26028
26025
  { transform: "translate(0px,0px) scale(1,1)", borderRadius: "0px", opacity: 1 },
26029
26026
  { transform: fe, borderRadius: "16px", opacity: 0.55 }
@@ -26044,10 +26041,10 @@ function xI({
26044
26041
  });
26045
26042
  }, [M, y]);
26046
26043
  G(() => {
26047
- const W = C.current;
26048
- if (!W) return;
26044
+ const H = C.current;
26045
+ if (!H) return;
26049
26046
  const Q = { active: !1, decided: !1, dismissing: !1, x0: 0, y0: 0, y: 0, t0: 0 }, te = (Ae, we = !1) => {
26050
- W.style.transition = we ? "transform 180ms cubic-bezier(0.22,1,0.36,1), opacity 180ms ease" : "none", W.style.transform = Ae ? `translate3d(0, ${Ae}px, 0)` : "", W.style.opacity = Ae ? `${1 - Math.min(0.16, Math.abs(Ae) / 1200)}` : "";
26047
+ H.style.transition = we ? "transform 180ms cubic-bezier(0.22,1,0.36,1), opacity 180ms ease" : "none", H.style.transform = Ae ? `translate3d(0, ${Ae}px, 0)` : "", H.style.opacity = Ae ? `${1 - Math.min(0.16, Math.abs(Ae) / 1200)}` : "";
26051
26048
  }, fe = () => {
26052
26049
  if (z.current) return;
26053
26050
  z.current = !0, Ct("selection");
@@ -26056,15 +26053,15 @@ function xI({
26056
26053
  const be = () => {
26057
26054
  De || (De = !0, y());
26058
26055
  };
26059
- W.getAnimations().forEach((Ke) => Ke.cancel()), W.style.transition = "transform 300ms cubic-bezier(0.32,0.72,0,1), opacity 220ms ease-out", W.style.transform = "translate3d(0, -105%, 0)", W.style.opacity = "0.92";
26056
+ H.getAnimations().forEach((Ke) => Ke.cancel()), H.style.transition = "transform 300ms cubic-bezier(0.32,0.72,0,1), opacity 220ms ease-out", H.style.transform = "translate3d(0, -105%, 0)", H.style.opacity = "0.92";
26060
26057
  const We = (Ke) => {
26061
- Ke.propertyName === "transform" && (W.removeEventListener("transitionend", We), be());
26058
+ Ke.propertyName === "transform" && (H.removeEventListener("transitionend", We), be());
26062
26059
  };
26063
- W.addEventListener("transitionend", We), window.setTimeout(be, 340), Ae && (Ae.style.transition = "opacity 240ms ease-out", Ae.style.opacity = "0"), we && (we.style.transition = "transform 260ms cubic-bezier(0.32,0.72,0,1), opacity 180ms ease-out", we.style.transform = "translate3d(0, -18px, 0)", we.style.opacity = "0");
26060
+ H.addEventListener("transitionend", We), window.setTimeout(be, 340), Ae && (Ae.style.transition = "opacity 240ms ease-out", Ae.style.opacity = "0"), we && (we.style.transition = "transform 260ms cubic-bezier(0.32,0.72,0,1), opacity 180ms ease-out", we.style.transform = "translate3d(0, -18px, 0)", we.style.opacity = "0");
26064
26061
  }, de = (Ae) => {
26065
26062
  if (z.current || Ae.touches.length !== 1 || !Ae.target?.closest("form")) return;
26066
26063
  const De = Ae.touches[0];
26067
- Q.active = !0, Q.decided = !1, Q.dismissing = !1, Q.x0 = De.clientX, Q.y0 = De.clientY, Q.y = 0, Q.t0 = performance.now(), W.getAnimations().forEach((be) => {
26064
+ Q.active = !0, Q.decided = !1, Q.dismissing = !1, Q.x0 = De.clientX, Q.y0 = De.clientY, Q.y = 0, Q.t0 = performance.now(), H.getAnimations().forEach((be) => {
26068
26065
  be.playState !== "finished" && be.cancel();
26069
26066
  }), te(0);
26070
26067
  }, Ue = (Ae) => {
@@ -26094,27 +26091,27 @@ function xI({
26094
26091
  De && (De.style.transition = "opacity 180ms ease", De.style.opacity = "", window.setTimeout(() => {
26095
26092
  De.style.transition = "";
26096
26093
  }, 200)), window.setTimeout(() => {
26097
- W.style.transition = "", W.style.transform = "", W.style.opacity = "";
26094
+ H.style.transition = "", H.style.transform = "", H.style.opacity = "";
26098
26095
  }, 200);
26099
26096
  };
26100
- return W.addEventListener("touchstart", de, { passive: !0 }), W.addEventListener("touchmove", Ue, { passive: !1 }), W.addEventListener("touchend", Re, { passive: !0 }), W.addEventListener("touchcancel", Re, { passive: !0 }), () => {
26101
- W.removeEventListener("touchstart", de), W.removeEventListener("touchmove", Ue), W.removeEventListener("touchend", Re), W.removeEventListener("touchcancel", Re);
26097
+ return H.addEventListener("touchstart", de, { passive: !0 }), H.addEventListener("touchmove", Ue, { passive: !1 }), H.addEventListener("touchend", Re, { passive: !0 }), H.addEventListener("touchcancel", Re, { passive: !0 }), () => {
26098
+ H.removeEventListener("touchstart", de), H.removeEventListener("touchmove", Ue), H.removeEventListener("touchend", Re), H.removeEventListener("touchcancel", Re);
26102
26099
  };
26103
26100
  }, [y]), G(() => {
26104
- const W = (te) => {
26101
+ const H = (te) => {
26105
26102
  if (te.key === "Escape") {
26106
26103
  if (I) return;
26107
26104
  F();
26108
26105
  return;
26109
26106
  }
26110
- ks(te.target) || ks() || I || (te.key === "ArrowLeft" || te.key === "ArrowUp" ? (te.preventDefault(), V(L)) : (te.key === "ArrowRight" || te.key === "ArrowDown") && (te.preventDefault(), V(H)));
26107
+ ks(te.target) || ks() || I || (te.key === "ArrowLeft" || te.key === "ArrowUp" ? (te.preventDefault(), V(L)) : (te.key === "ArrowRight" || te.key === "ArrowDown") && (te.preventDefault(), V(q)));
26111
26108
  };
26112
- document.addEventListener("keydown", W);
26109
+ document.addEventListener("keydown", H);
26113
26110
  const Q = document.body.style.overflow;
26114
26111
  return document.body.style.overflow = "hidden", () => {
26115
- document.removeEventListener("keydown", W), document.body.style.overflow = Q;
26112
+ document.removeEventListener("keydown", H), document.body.style.overflow = Q;
26116
26113
  };
26117
- }, [F, V, L, H, I]);
26114
+ }, [F, V, L, q, I]);
26118
26115
  const K = Wr(t);
26119
26116
  return es(
26120
26117
  /* @__PURE__ */ m(
@@ -26184,7 +26181,7 @@ function xI({
26184
26181
  children: /* @__PURE__ */ r(hI, { title: K })
26185
26182
  }
26186
26183
  ),
26187
- /* @__PURE__ */ r(sx, { session: t, typingIds: q }),
26184
+ /* @__PURE__ */ r(sx, { session: t, typingIds: W }),
26188
26185
  t.shippedReview ? /* @__PURE__ */ r("span", { className: "shrink-0 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold text-emerald-600 dark:text-emerald-400", children: "Shipped" }) : null,
26189
26186
  /* @__PURE__ */ r(
26190
26187
  tx,
@@ -26210,7 +26207,7 @@ function xI({
26210
26207
  session: t,
26211
26208
  busy: k,
26212
26209
  prompt: O,
26213
- typingIds: q,
26210
+ typingIds: W,
26214
26211
  onTyping: l,
26215
26212
  error: N,
26216
26213
  onError: S,
@@ -26269,15 +26266,15 @@ function rx({
26269
26266
  return;
26270
26267
  }
26271
26268
  localStorage.setItem("lfg_fork_agent", u), localStorage.setItem(`lfg_fork_model_${u}`, v), R.length && localStorage.setItem("lfg_thinking_level", b);
26272
- const q = (O ?? S).trim(), X = z.attachments;
26269
+ const W = (O ?? S).trim(), X = z.attachments;
26273
26270
  n(), ve.promise(
26274
26271
  (async () => {
26275
- const L = X.length ? await Promise.all(X.map(z.resolveUpload)) : [], H = za(q, L);
26272
+ const L = X.length ? await Promise.all(X.map(z.resolveUpload)) : [], q = za(W, L);
26276
26273
  return ye(`/api/sessions/${A}/fork`, {
26277
26274
  method: "POST",
26278
26275
  headers: { "Content-Type": "application/json" },
26279
26276
  body: JSON.stringify({
26280
- prompt: H || void 0,
26277
+ prompt: q || void 0,
26281
26278
  user: e.assignedUser || void 0,
26282
26279
  agent: u,
26283
26280
  model: v,
@@ -26351,8 +26348,8 @@ function rx({
26351
26348
  onText: (k, O) => I(O.trim() ? `${O.trimEnd()} ${k}` : k),
26352
26349
  onInterim: (k, O) => I(O.trim() ? `${O.trimEnd()} ${k}` : k),
26353
26350
  onAutoSubmit: (k, O) => {
26354
- const q = O.trim() ? `${O.trimEnd()} ${k}` : k;
26355
- I(q), j(void 0, q);
26351
+ const W = O.trim() ? `${O.trimEnd()} ${k}` : k;
26352
+ I(W), j(void 0, W);
26356
26353
  },
26357
26354
  onCancel: (k) => I(k)
26358
26355
  }
@@ -26445,7 +26442,7 @@ const yI = Mr(function({
26445
26442
  onTogglePin: N,
26446
26443
  stageBotId: S
26447
26444
  }) {
26448
- const I = ou(), A = ss(), C = is(), [R, P] = w(null), [z, j] = w(!1), k = xt(ur), O = gp(t, S), q = O ? k.get(O) ?? null : null, X = xt(I0), L = t.sessionId, H = lu([t.sessionId, t.nativeSessionId]), V = H.length > 0, E = re(() => {
26445
+ const I = ou(), A = ss(), C = is(), [R, P] = w(null), [z, j] = w(!1), k = xt(ur), O = gp(t, S), W = O ? k.get(O) ?? null : null, X = xt(I0), L = t.sessionId, q = lu([t.sessionId, t.nativeSessionId]), V = q.length > 0, E = re(() => {
26449
26446
  L && (Ct("selection"), j(!0));
26450
26447
  }, [L]), B = re(
26451
26448
  async (J) => {
@@ -26484,7 +26481,7 @@ const yI = Mr(function({
26484
26481
  const oe = window.setTimeout(() => J.classList.remove("lfg-card-focus-glow"), 2e3);
26485
26482
  return () => window.clearTimeout(oe);
26486
26483
  }, [y]);
26487
- const [K, W] = w(!1), Q = U(null), [te, fe] = w(44), [de, Ue] = w(!1), [Re, Ae] = w(null), [we, De] = w(!1), be = U({
26484
+ const [K, H] = w(!1), Q = U(null), [te, fe] = w(44), [de, Ue] = w(!1), [Re, Ae] = w(null), [we, De] = w(!1), be = U({
26488
26485
  startX: 0,
26489
26486
  startY: 0,
26490
26487
  x: 0,
@@ -26677,16 +26674,15 @@ const yI = Mr(function({
26677
26674
  !C && !t.shippedReview && "cursor-text rounded-md hover:bg-muted/50"
26678
26675
  ),
26679
26676
  children: /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col", children: [
26680
- /* @__PURE__ */ r("div", { className: "truncate text-[15px] font-semibold leading-tight", children: q ? q.name : Wr(t) }),
26681
- C && M ? /* @__PURE__ */ r("div", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: M }) : null,
26682
- q ? null : /* @__PURE__ */ r(sx, { session: t, typingIds: a })
26677
+ /* @__PURE__ */ r("div", { className: "truncate text-[15px] font-semibold leading-tight", children: W ? W.name : Wr(t) }),
26678
+ C && M ? /* @__PURE__ */ r("div", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: M }) : null
26683
26679
  ] })
26684
26680
  }
26685
26681
  ),
26686
26682
  V ? /* @__PURE__ */ m(
26687
26683
  "span",
26688
26684
  {
26689
- title: H.length === 1 ? "This session is waiting for your answer" : `${H.length} questions are waiting for your answer`,
26685
+ title: q.length === 1 ? "This session is waiting for your answer" : `${q.length} questions are waiting for your answer`,
26690
26686
  className: "flex shrink-0 items-center gap-1 rounded-full bg-primary/12 px-2 py-0.5 text-[10px] font-semibold text-primary",
26691
26687
  children: [
26692
26688
  /* @__PURE__ */ r(Nd, { className: "size-3" }),
@@ -26703,18 +26699,19 @@ const yI = Mr(function({
26703
26699
  children: /* @__PURE__ */ r(vr, { className: "size-3.5", fill: "currentColor" })
26704
26700
  }
26705
26701
  ) : null,
26706
- !Ve && q && X ? /* @__PURE__ */ r(
26702
+ W ? null : /* @__PURE__ */ r(sx, { session: t, typingIds: a }),
26703
+ !Ve && W && X ? /* @__PURE__ */ r(
26707
26704
  gd,
26708
26705
  {
26709
- bot: q,
26706
+ bot: W,
26710
26707
  runtimeHealthy: !0,
26711
26708
  busy: o,
26712
- onEdit: () => X(q),
26709
+ onEdit: () => X(W),
26713
26710
  onRefresh: d
26714
26711
  }
26715
26712
  ) : null,
26716
- !Ve && !q && t.botId && t.botName ? /* @__PURE__ */ r(C_, { session: t }) : null,
26717
- !Ve && !q && ((t.agent === "claude" || t.agent === "opencode") && (t.tmuxTarget || t.agent === "opencode") && L ? /* @__PURE__ */ m(Ar, { children: [
26713
+ !Ve && !W && t.botId && t.botName ? /* @__PURE__ */ r(C_, { session: t }) : null,
26714
+ !Ve && !W && ((t.agent === "claude" || t.agent === "opencode") && (t.tmuxTarget || t.agent === "opencode") && L ? /* @__PURE__ */ m(Ar, { children: [
26718
26715
  /* @__PURE__ */ r(
26719
26716
  Tr,
26720
26717
  {
@@ -26770,11 +26767,11 @@ const yI = Mr(function({
26770
26767
  {
26771
26768
  paused: t.status === "blocked",
26772
26769
  className: "lg:hidden",
26773
- variant: q ? "avatar" : "inline"
26770
+ variant: W ? "avatar" : "inline"
26774
26771
  }
26775
26772
  )
26776
26773
  ),
26777
- !Ve && !q && /* @__PURE__ */ r(
26774
+ !Ve && !W && /* @__PURE__ */ r(
26778
26775
  tx,
26779
26776
  {
26780
26777
  session: t,
@@ -26805,7 +26802,7 @@ const yI = Mr(function({
26805
26802
  Mu,
26806
26803
  {
26807
26804
  session: t,
26808
- bot: q ?? void 0,
26805
+ bot: W ?? void 0,
26809
26806
  busy: o,
26810
26807
  prompt: i,
26811
26808
  typingIds: a,
@@ -26814,7 +26811,7 @@ const yI = Mr(function({
26814
26811
  onError: P,
26815
26812
  onSubscribeTranscript: c,
26816
26813
  onRefresh: d,
26817
- onDictatingChange: W
26814
+ onDictatingChange: H
26818
26815
  }
26819
26816
  )
26820
26817
  ]
@@ -26856,13 +26853,13 @@ const yI = Mr(function({
26856
26853
  );
26857
26854
  },
26858
26855
  [n, l]
26859
- ), q = _e(
26856
+ ), W = _e(
26860
26857
  () => KM(O, f.value),
26861
26858
  [O, f.value]
26862
26859
  ), { items: X, queued: L } = _e(
26863
- () => yS(Pd(q)),
26864
- [q]
26865
- ), H = _e(() => X.map(iT), [X]), V = X[X.length - 1], E = V?.type === "msg" ? V.message : void 0, B = s && E?.kind !== "thinking", _ = U(null), [M, F] = w(0), K = yM(d, X.length), W = U(/* @__PURE__ */ new Map());
26860
+ () => yS(Pd(W)),
26861
+ [W]
26862
+ ), q = _e(() => X.map(iT), [X]), V = X[X.length - 1], E = V?.type === "msg" ? V.message : void 0, B = s && E?.kind !== "thinking", _ = U(null), [M, F] = w(0), K = yM(d, X.length), H = U(/* @__PURE__ */ new Map());
26866
26863
  G(() => {
26867
26864
  Fm();
26868
26865
  }, []);
@@ -26879,16 +26876,16 @@ const yI = Mr(function({
26879
26876
  (ce) => {
26880
26877
  const me = X[ce];
26881
26878
  if (!me) return Ag + Kd;
26882
- const Le = ce > 0 && xf(H, ce).firstOfRun;
26879
+ const Le = ce > 0 && xf(q, ce).firstOfRun;
26883
26880
  if (!Q)
26884
26881
  return u5(me, Le);
26885
- const Ye = me.type === "tools" ? "" : me.message.text ?? "", pt = `${me.key}|${K.version}|${e5}|${Le ? 1 : 0}|${Ye.length}`, At = W.current, en = At.get(pt);
26882
+ const Ye = me.type === "tools" ? "" : me.message.text ?? "", pt = `${me.key}|${K.version}|${e5}|${Le ? 1 : 0}|${Ye.length}`, At = H.current, en = At.get(pt);
26886
26883
  if (en != null) return en;
26887
26884
  At.size > 8e3 && At.clear();
26888
26885
  const yn = d5(me, { ...Q, speakerChanged: Le });
26889
26886
  return At.set(pt, yn), yn;
26890
26887
  },
26891
- [X, H, Q, K.version]
26888
+ [X, q, Q, K.version]
26892
26889
  ), fe = re(
26893
26890
  (ce) => {
26894
26891
  const me = Vg(ce), Le = Math.max(0, X.length - vI);
@@ -26930,13 +26927,13 @@ const yI = Mr(function({
26930
26927
  ), We = U(/* @__PURE__ */ new Set()), Ke = U(/* @__PURE__ */ new Map()), Ze = U(null);
26931
26928
  if (Ze.current !== t)
26932
26929
  Ze.current = t, We.current = new Set(
26933
- q.filter((ce) => ce.id && ch(ce)).map((ce) => ce.id)
26930
+ W.filter((ce) => ce.id && ch(ce)).map((ce) => ce.id)
26934
26931
  ), Ke.current = /* @__PURE__ */ new Map();
26935
26932
  else {
26936
26933
  const ce = Date.now();
26937
26934
  for (const [me, Le] of Ke.current)
26938
26935
  Le <= ce && Ke.current.delete(me);
26939
- for (const me of q)
26936
+ for (const me of W)
26940
26937
  !me.id || !ch(me) || We.current.has(me.id) || (We.current.add(me.id), s && Ke.current.set(me.id, ce + 500));
26941
26938
  }
26942
26939
  const st = U(!1), Fe = U(null), se = U(sm()), ae = U(null), Ne = U(u), Te = U(!0), $ = re(() => {
@@ -27101,7 +27098,7 @@ const yI = Mr(function({
27101
27098
  Y
27102
27099
  );
27103
27100
  }, [oe, jn, Y, Pt]), G(() => Ti, []), Wt(() => {
27104
- h(!0), Ne.current = !0, I(!0), R.current = null, P.current = null, j.current = !1, k.current = Number.NEGATIVE_INFINITY, W.current.clear(), ae.current = null, Te.current = !0, $(), z.current = 0;
27101
+ h(!0), Ne.current = !0, I(!0), R.current = null, P.current = null, j.current = !1, k.current = Number.NEGATIVE_INFINITY, H.current.clear(), ae.current = null, Te.current = !0, $(), z.current = 0;
27105
27102
  }, [t, $]), Wt(() => {
27106
27103
  if (o || v === t) return;
27107
27104
  const ce = requestAnimationFrame(() => {
@@ -27147,7 +27144,7 @@ const yI = Mr(function({
27147
27144
  running: Fe.current != null
27148
27145
  });
27149
27146
  Xt === "start" ? J(ce) : Xt === "snap" && ($(), ce.scrollTop = dn, z.current = ce.scrollTop, j.current = !1);
27150
- }, [q, s, u, X.length, B, Ae, p, v, t, J, $]), Wt(() => {
27147
+ }, [W, s, u, X.length, B, Ae, p, v, t, J, $]), Wt(() => {
27151
27148
  const ce = _.current, me = ce ? ce.offsetTop : 0;
27152
27149
  F((Le) => Le === me ? Le : me);
27153
27150
  }, [b, X.length > 0, s]), Wt(() => {
@@ -27171,7 +27168,7 @@ const yI = Mr(function({
27171
27168
  if (en == null) return;
27172
27169
  const yn = Math.max(0, Math.min(en, ce.scrollHeight - ce.clientHeight));
27173
27170
  Math.abs(yn - ce.scrollTop) > 0.5 && (ce.scrollTop = yn), z.current = ce.scrollTop, j.current = !1, P.current = { key: Ye.anchorKey, offset: Ye.anchorOffset };
27174
- }, [q, Ae, u, we, de]);
27171
+ }, [W, Ae, u, we, de]);
27175
27172
  const Un = re(async (ce) => {
27176
27173
  const me = d.current;
27177
27174
  if (!(!t || !me || b || !S)) {
@@ -27196,8 +27193,8 @@ const yI = Mr(function({
27196
27193
  }, [t]), G(() => {
27197
27194
  if (o || b || !S || !t) return;
27198
27195
  const ce = d.current;
27199
- !ce || !q.length || ke.current !== q.length && Wf(ce) === "backfill" && (ke.current = q.length, Un("backfill"));
27200
- }, [o, b, S, t, q, Ae, Un]), /* @__PURE__ */ m("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [
27196
+ !ce || !W.length || ke.current !== W.length && Wf(ce) === "backfill" && (ke.current = W.length, Un("backfill"));
27197
+ }, [o, b, S, t, W, Ae, Un]), /* @__PURE__ */ m("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [
27201
27198
  /* @__PURE__ */ r(
27202
27199
  C0,
27203
27200
  {
@@ -27229,7 +27226,7 @@ const yI = Mr(function({
27229
27226
  // while it's actually shown, so it never overlaps the last message.
27230
27227
  A ? "pb-16" : "pb-3"
27231
27228
  ),
27232
- children: q.length || s ? /* @__PURE__ */ m(p3, { children: [
27229
+ children: W.length || s ? /* @__PURE__ */ m(p3, { children: [
27233
27230
  b ? /* @__PURE__ */ m("div", { className: "flex justify-center py-1 text-xs text-muted-foreground", children: [
27234
27231
  /* @__PURE__ */ r(dt, { className: "mr-1.5 size-3.5 animate-spin" }),
27235
27232
  "Loading older messages"
@@ -27243,7 +27240,7 @@ const yI = Mr(function({
27243
27240
  children: Re.map((ce) => {
27244
27241
  const me = ce.index, Le = X[me];
27245
27242
  if (!Le) return null;
27246
- const { firstOfRun: Ye, lastOfRun: pt } = xf(H, me), At = me > 0 && Ye;
27243
+ const { firstOfRun: Ye, lastOfRun: pt } = xf(q, me), At = me > 0 && Ye;
27247
27244
  return /* @__PURE__ */ r(
27248
27245
  "div",
27249
27246
  {
@@ -27309,7 +27306,7 @@ const yI = Mr(function({
27309
27306
  },
27310
27307
  t ?? "no-session"
27311
27308
  ),
27312
- q.length ? /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-20 flex flex-col items-end gap-1 px-3", children: oe ? /* @__PURE__ */ m(je, { children: [
27309
+ W.length ? /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-20 flex flex-col items-end gap-1 px-3", children: oe ? /* @__PURE__ */ m(je, { children: [
27313
27310
  /* @__PURE__ */ m("div", { className: "lfg-scroll-pill pointer-events-auto flex w-full max-w-sm items-center gap-1 rounded-full border border-border bg-card/95 py-1 pl-3 pr-1 shadow-md backdrop-blur", children: [
27314
27311
  ue ? /* @__PURE__ */ r(dt, { className: "size-3.5 shrink-0 animate-spin text-muted-foreground" }) : /* @__PURE__ */ r(da, { className: "size-3.5 shrink-0 text-muted-foreground" }),
27315
27312
  /* @__PURE__ */ r(
@@ -27534,7 +27531,7 @@ const _I = Mr(
27534
27531
  ] }),
27535
27532
  /* @__PURE__ */ r("div", { className: "max-h-52 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-muted/60 p-2.5 text-[11px] leading-relaxed text-muted-foreground", children: I.text || "thinking..." })
27536
27533
  ] }, I.id ?? `thinking-${I.ts}-${A}`);
27537
- const P = I.text || (C ? "No command details" : "No result details"), z = C ? P.indexOf(":") : -1, j = C ? (z >= 0 ? P.slice(0, z) : P) || "Command" : `Result${t.filter((X) => X.kind === "tool_result").length > 1 ? ` ${A + 1}` : ""}`, k = C && z >= 0 ? P.slice(z + 1).trim() : C ? "" : P, O = wg(I) ? c[I.id] : void 0, q = O?.status === "ready" ? O.args : k;
27534
+ const P = I.text || (C ? "No command details" : "No result details"), z = C ? P.indexOf(":") : -1, j = C ? (z >= 0 ? P.slice(0, z) : P) || "Command" : `Result${t.filter((X) => X.kind === "tool_result").length > 1 ? ` ${A + 1}` : ""}`, k = C && z >= 0 ? P.slice(z + 1).trim() : C ? "" : P, O = wg(I) ? c[I.id] : void 0, W = O?.status === "ready" ? O.args : k;
27538
27535
  return /* @__PURE__ */ m("div", { className: "min-w-0", children: [
27539
27536
  /* @__PURE__ */ m("div", { className: "mb-1 flex items-center gap-2 text-xs font-semibold text-foreground", children: [
27540
27537
  /* @__PURE__ */ r("span", { className: D("size-1.5 rounded-full", C ? "bg-primary" : "bg-muted-foreground/60") }),
@@ -27556,7 +27553,7 @@ const _I = Mr(
27556
27553
  "data-testid": "tool-args-error",
27557
27554
  children: O.error
27558
27555
  }
27559
- ) : q ? /* @__PURE__ */ r("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: q }) : null
27556
+ ) : W ? /* @__PURE__ */ r("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: W }) : null
27560
27557
  ] }, I.id ?? `${I.kind}-${I.ts}-${A}`);
27561
27558
  }) }), S = /* @__PURE__ */ m(
27562
27559
  "button",
@@ -28688,15 +28685,15 @@ function gh({
28688
28685
  () => S0(localStorage.getItem("lfg_v2_agent"), S)
28689
28686
  ), [R, P] = w(""), [z, j] = w(() => localStorage.getItem("lfg_v2_repo") || ""), [k, O] = w(
28690
28687
  () => localStorage.getItem(`lfg_model_${A}`) || localStorage.getItem("lfg_model") || I(A)
28691
- ), [q, X] = w(
28688
+ ), [W, X] = w(
28692
28689
  () => Qr()
28693
- ), [L, H] = w(() => Zf(localStorage, A)), [V, E] = w(() => NC(localStorage)), [B, _] = w(
28690
+ ), [L, q] = w(() => Zf(localStorage, A)), [V, E] = w(() => NC(localStorage)), [B, _] = w(
28694
28691
  () => ps(s || localStorage.getItem("lfg_user"), n)
28695
28692
  ), [M, F] = w(
28696
28693
  () => Wc("new-session")?.text ?? ""
28697
28694
  ), K = U(M);
28698
28695
  K.current = M;
28699
- const [W, Q] = w(0), [te, fe] = w(!1), [de, Ue] = w([]), [Re, Ae] = w(0), [we, De] = w(null), be = yu({
28696
+ const [H, Q] = w(0), [te, fe] = w(!1), [de, Ue] = w([]), [Re, Ae] = w(0), [we, De] = w(null), be = yu({
28700
28697
  endpoint: (ne) => `/api/uploads?filename=${encodeURIComponent(ne.name)}`,
28701
28698
  onPatchExtra: (ne, ot) => Ue(
28702
28699
  (rt) => rt.map((ft) => ft.id === ne ? { ...ft, ...ot } : ft)
@@ -28893,7 +28890,7 @@ function gh({
28893
28890
  G(() => {
28894
28891
  e && _(ps(s || localStorage.getItem("lfg_user"), n));
28895
28892
  }, [e, s, n]);
28896
- const zt = b.models[A] ?? Xn[A], Mt = os(A, k), nn = SC({ agent: A, model: k }), _t = L && nn, Kt = wC({ agent: A, model: k, thinkingLevels: Mt }), Zt = V && Kt && _t && q === "high", Qn = o !== "__all" ? t.find((ne) => Nr(ne) === o) : void 0, jn = !!Qn, Pt = o === "__all", Yt = dC({
28893
+ const zt = b.models[A] ?? Xn[A], Mt = os(A, k), nn = SC({ agent: A, model: k }), _t = L && nn, Kt = wC({ agent: A, model: k, thinkingLevels: Mt }), Zt = V && Kt && _t && W === "high", Qn = o !== "__all" ? t.find((ne) => Nr(ne) === o) : void 0, jn = !!Qn, Pt = o === "__all", Yt = dC({
28897
28894
  scopedCwd: Qn?.cwd,
28898
28895
  lastCwd: z,
28899
28896
  repos: t
@@ -28927,17 +28924,17 @@ function gh({
28927
28924
  G(() => {
28928
28925
  zt.includes(k) || O(zt[0]);
28929
28926
  }, [zt, k]), G(() => {
28930
- Mt.length && !Mt.includes(q) && X(Mt.includes("high") ? "high" : Mt[0]);
28931
- }, [q, Mt]), G(() => {
28932
- H(Zf(localStorage, A));
28927
+ Mt.length && !Mt.includes(W) && X(Mt.includes("high") ? "high" : Mt[0]);
28928
+ }, [W, Mt]), G(() => {
28929
+ q(Zf(localStorage, A));
28933
28930
  }, [A]), G(() => {
28934
- Zt && q !== "high" && X("high");
28935
- }, [Zt, q]);
28931
+ Zt && W !== "high" && X("high");
28932
+ }, [Zt, W]);
28936
28933
  function yn(ne) {
28937
- E(ne), rc(localStorage, ne), ne && Kt ? (H(!0), sc(localStorage, A, !0), X("high")) : !ne && Zt && (H(!1), sc(localStorage, A, !1));
28934
+ E(ne), rc(localStorage, ne), ne && Kt ? (q(!0), sc(localStorage, A, !0), X("high")) : !ne && Zt && (q(!1), sc(localStorage, A, !1));
28938
28935
  }
28939
28936
  function dn(ne) {
28940
- H(ne), sc(localStorage, A, ne), !ne && V && (E(!1), rc(localStorage, !1));
28937
+ q(ne), sc(localStorage, A, ne), !ne && V && (E(!1), rc(localStorage, !1));
28941
28938
  }
28942
28939
  function On(ne) {
28943
28940
  Zt && ne !== "high" && (E(!1), rc(localStorage, !1)), X(ne);
@@ -28973,7 +28970,7 @@ function gh({
28973
28970
  enabled: V,
28974
28971
  available: Kt,
28975
28972
  model: k,
28976
- thinkingLevel: rt ?? q
28973
+ thinkingLevel: rt ?? W
28977
28974
  }), Jt = Tt.model, sn = Tt.thinkingLevel, vn = _t || Tt.fastMode === !0, Wn = Lt === "aisdk" && R || void 0, yt = Hc({
28978
28975
  contextKey: "new-session",
28979
28976
  source: "new-session",
@@ -29090,7 +29087,7 @@ function gh({
29090
29087
  Tu,
29091
29088
  {
29092
29089
  agent: A,
29093
- value: q,
29090
+ value: W,
29094
29091
  levels: Mt,
29095
29092
  onChange: On,
29096
29093
  flat: u === "inline",
@@ -29233,7 +29230,7 @@ function gh({
29233
29230
  value: M,
29234
29231
  onValueChange: me,
29235
29232
  onMultilineChange: u === "inline" ? fe : void 0,
29236
- scrollToEndNonce: W,
29233
+ scrollToEndNonce: H,
29237
29234
  onPaste: be.onPasteFiles,
29238
29235
  onKeyDown: (ne) => {
29239
29236
  (ne.metaKey || ne.ctrlKey) && ne.key === "Enter" && (ne.preventDefault(), ne.currentTarget.form?.requestSubmit());
@@ -29347,7 +29344,7 @@ function gh({
29347
29344
  HI,
29348
29345
  {
29349
29346
  disabled: !xo,
29350
- thinkingLevel: q,
29347
+ thinkingLevel: W,
29351
29348
  thinkingLevels: Zt ? ["high"] : F0(A) ? Mt : [],
29352
29349
  onLaunch: (ne) => {
29353
29350
  On(ne), Rn(void 0, void 0, ne);
@@ -29555,9 +29552,9 @@ function mx({
29555
29552
  openOnDrag: i = !1,
29556
29553
  orientation: a = "horizontal"
29557
29554
  }) {
29558
- const l = U(null), c = U({ x: 0, y: 0 }), d = U(null), f = U(0), u = U(0), h = U(!1), p = U(!1), g = U(!1), v = U(null), y = U(!1), [b, N] = w(!1), [S, I] = w(!1), A = U(!1), C = U(!1), R = U(!1), P = U(null), z = U(null), [j, k] = w(() => Math.max(0, t.indexOf(e))), [O, q] = w({}), [X, L] = w("above"), H = Math.max(0, t.indexOf(e)), V = s && t.length > 1, E = Math.max(0, Math.min(t.length - 1, j)), B = t[E] ?? e, _ = t.length > 1 ? E / (t.length - 1) : 0, M = fx(_), F = a === "vertical", K = Math.round(
29555
+ const l = U(null), c = U({ x: 0, y: 0 }), d = U(null), f = U(0), u = U(0), h = U(!1), p = U(!1), g = U(!1), v = U(null), y = U(!1), [b, N] = w(!1), [S, I] = w(!1), A = U(!1), C = U(!1), R = U(!1), P = U(null), z = U(null), [j, k] = w(() => Math.max(0, t.indexOf(e))), [O, W] = w({}), [X, L] = w("above"), q = Math.max(0, t.indexOf(e)), V = s && t.length > 1, E = Math.max(0, Math.min(t.length - 1, j)), B = t[E] ?? e, _ = t.length > 1 ? E / (t.length - 1) : 0, M = fx(_), F = a === "vertical", K = Math.round(
29559
29556
  Math.max(120, Math.min(260, (t.length - 1) * bh(t.length)))
29560
- ), W = () => {
29557
+ ), H = () => {
29561
29558
  l.current != null && (window.clearTimeout(l.current), l.current = null);
29562
29559
  }, Q = U(!1), te = () => {
29563
29560
  Q.current || (Q.current = !0, document.addEventListener("selectstart", Gi, !0), document.addEventListener("dragstart", Gi, !0));
@@ -29566,15 +29563,15 @@ function mx({
29566
29563
  };
29567
29564
  G(
29568
29565
  () => () => {
29569
- W(), fe();
29566
+ H(), fe();
29570
29567
  },
29571
29568
  []
29572
29569
  ), G(() => {
29573
29570
  if (b)
29574
29571
  return document.body.classList.add("thinking-scrubbing"), () => document.body.classList.remove("thinking-scrubbing");
29575
29572
  }, [b]), G(() => {
29576
- !h.current && !C.current && (u.current = H, k(H));
29577
- }, [H]);
29573
+ !h.current && !C.current && (u.current = q, k(q));
29574
+ }, [q]);
29578
29575
  const de = (J) => {
29579
29576
  const oe = J.getBoundingClientRect(), He = oe.left + oe.width / 2;
29580
29577
  if (F) {
@@ -29582,11 +29579,11 @@ function mx({
29582
29579
  12,
29583
29580
  Math.min(window.innerWidth - 168 - 12, He + PI - 168)
29584
29581
  ), pe = K + 70, Oe = Math.max(12, oe.top - pe - 12);
29585
- L("above"), q({ left: he, top: Oe, width: 168, transformOrigin: `${He - he}px 100%` });
29582
+ L("above"), W({ left: he, top: Oe, width: 168, transformOrigin: `${He - he}px 100%` });
29586
29583
  return;
29587
29584
  }
29588
29585
  const qe = Math.min(360, Math.max(248, window.innerWidth - 24)), Qe = Math.max(12, Math.min(window.innerWidth - qe - 12, He - qe / 2)), ut = 124, Et = oe.top - ut - 12 >= 12, Y = Et ? oe.top - ut - 12 : Math.min(window.innerHeight - ut - 12, oe.bottom + 12);
29589
- L(Et ? "above" : "below"), q({
29586
+ L(Et ? "above" : "below"), W({
29590
29587
  left: Qe,
29591
29588
  top: Y,
29592
29589
  width: qe,
@@ -29597,12 +29594,12 @@ function mx({
29597
29594
  const oe = Math.max(0, t.indexOf(e));
29598
29595
  document.getSelection()?.removeAllRanges(), u.current = oe, d.current = null, y.current = !1, h.current = !0, p.current = !0, k(oe), de(J), N(!0), Ct("heavy");
29599
29596
  }, Re = (J) => {
29600
- if (W(), !!h.current && (h.current = !1, N(!1), J)) {
29597
+ if (H(), !!h.current && (h.current = !1, N(!1), J)) {
29601
29598
  const oe = t[u.current];
29602
29599
  Bn.success(), oe && n(oe);
29603
29600
  }
29604
29601
  }, Ae = () => {
29605
- A.current && (A.current = !1, C.current = !1, I(!1), u.current = H, k(H));
29602
+ A.current && (A.current = !1, C.current = !1, I(!1), u.current = q, k(q));
29606
29603
  }, we = (J) => {
29607
29604
  if (!V || h.current) return;
29608
29605
  z.current = J;
@@ -29693,31 +29690,31 @@ function mx({
29693
29690
  }, Ne = {
29694
29691
  onPointerDown: (J) => {
29695
29692
  if (!V || J.button !== 0) return;
29696
- W(), c.current = { x: J.clientX, y: J.clientY }, d.current = null, p.current = !1, g.current = R.current, R.current = !1, f.current = H, te(), J.currentTarget.setPointerCapture(J.pointerId), Ct("light");
29693
+ H(), c.current = { x: J.clientX, y: J.clientY }, d.current = null, p.current = !1, g.current = R.current, R.current = !1, f.current = q, te(), J.currentTarget.setPointerCapture(J.pointerId), Ct("light");
29697
29694
  const oe = J.currentTarget;
29698
29695
  l.current = window.setTimeout(() => Ue(oe), BI);
29699
29696
  },
29700
29697
  onPointerMove: (J) => {
29701
29698
  if (!h.current) {
29702
29699
  if (!i || l.current == null || Math.abs(J.clientX - c.current.x) <= 8) return;
29703
- W(), Ue(J.currentTarget), We(J.clientX, J.clientY), J.preventDefault();
29700
+ H(), Ue(J.currentTarget), We(J.clientX, J.clientY), J.preventDefault();
29704
29701
  return;
29705
29702
  }
29706
29703
  J.preventDefault(), We(J.clientX, J.clientY);
29707
29704
  },
29708
29705
  onPointerUp: (J) => {
29709
- W(), fe(), p.current && (J.preventDefault(), g.current = !0, Re(!0));
29706
+ H(), fe(), p.current && (J.preventDefault(), g.current = !0, Re(!0));
29710
29707
  },
29711
29708
  // A cancelled pointer (scroll takeover, palm rejection) fires no click.
29712
29709
  onPointerCancel: () => {
29713
- W(), fe(), Re(!1);
29710
+ H(), fe(), Re(!1);
29714
29711
  },
29715
29712
  onContextMenu: (J) => {
29716
29713
  V && J.preventDefault();
29717
29714
  }
29718
29715
  }, Te = () => g.current ? (g.current = !1, !0) : !1, $ = (J) => {
29719
29716
  if (!V) return;
29720
- const oe = t[Math.max(0, Math.min(t.length - 1, H + J))];
29717
+ const oe = t[Math.max(0, Math.min(t.length - 1, q + J))];
29721
29718
  !oe || oe === e || (Bn.select(), n(oe));
29722
29719
  }, Ve = b || S ? es(
29723
29720
  /* @__PURE__ */ r(
@@ -30279,14 +30276,14 @@ function KI({
30279
30276
  onDismiss: a,
30280
30277
  onRefineAgent: l
30281
30278
  }) {
30282
- const c = Zr(n?.agent ?? "aisdk"), [d, f] = w(""), [u, h] = w(!1), [p, g] = w(!1), [v, y] = w(!1), [b, N] = w(!1), [S, I] = w(""), [A, C] = w(!1), R = U(null), P = U(null), [z, j] = w(n?.agent ?? "aisdk"), [k, O] = w(n?.claudeAccountId ?? ""), [q, X] = w(
30279
+ const c = Zr(n?.agent ?? "aisdk"), [d, f] = w(""), [u, h] = w(!1), [p, g] = w(!1), [v, y] = w(!1), [b, N] = w(!1), [S, I] = w(""), [A, C] = w(!1), R = U(null), P = U(null), [z, j] = w(n?.agent ?? "aisdk"), [k, O] = w(n?.claudeAccountId ?? ""), [W, X] = w(
30283
30280
  n?.model ?? c
30284
- ), [L, H] = w(
30281
+ ), [L, q] = w(
30285
30282
  n?.thinkingLevel ?? Qr()
30286
- ), V = U(null), E = gi(z), B = Zr(z), _ = os(z, q).length > 0;
30283
+ ), V = U(null), E = gi(z), B = Zr(z), _ = os(z, W).length > 0;
30287
30284
  G(() => {
30288
- E.includes(q) || X(B);
30289
- }, [B, E, q]);
30285
+ E.includes(W) || X(B);
30286
+ }, [B, E, W]);
30290
30287
  const M = _e(
30291
30288
  () => new Set(
30292
30289
  (s?.find((ae) => ae.key === "aisdk")?.status.accounts ?? []).filter((ae) => ae.connected).map((ae) => ae.id)
@@ -30294,10 +30291,10 @@ function KI({
30294
30291
  [s]
30295
30292
  ), F = k && M.has(k) ? k : "", K = () => ({
30296
30293
  agent: z,
30297
- model: q,
30294
+ model: W,
30298
30295
  thinkingLevel: _ ? L : void 0,
30299
30296
  claudeAccountId: z === "aisdk" && F || void 0
30300
- }), [W, Q] = w(!1), te = U(null), fe = () => {
30297
+ }), [H, Q] = w(!1), te = U(null), fe = () => {
30301
30298
  te.current !== null && (window.clearTimeout(te.current), te.current = null);
30302
30299
  };
30303
30300
  G(() => fe, []);
@@ -30351,7 +30348,7 @@ function KI({
30351
30348
  const ae = S.trim();
30352
30349
  !ae || u || !l || (Fo(e.id, "feedback", !!d.trim()), l(e, ae));
30353
30350
  }
30354
- const be = 3, We = e.reasoning, Ke = v || We.length <= be + 1 ? We : We.slice(0, be), Ze = We.length - Ke.length, st = [q, _ ? `${L} thinking` : null].filter(Boolean).join(" · "), Fe = /* @__PURE__ */ m("div", { className: "px-1 pb-2", children: [
30351
+ const be = 3, We = e.reasoning, Ke = v || We.length <= be + 1 ? We : We.slice(0, be), Ze = We.length - Ke.length, st = [W, _ ? `${L} thinking` : null].filter(Boolean).join(" · "), Fe = /* @__PURE__ */ m("div", { className: "px-1 pb-2", children: [
30355
30352
  /* @__PURE__ */ m(
30356
30353
  "button",
30357
30354
  {
@@ -30375,10 +30372,10 @@ function KI({
30375
30372
  {
30376
30373
  backend: z,
30377
30374
  setBackend: j,
30378
- model: q,
30375
+ model: W,
30379
30376
  setModel: X,
30380
30377
  thinkingLevel: L,
30381
- setThinkingLevel: H,
30378
+ setThinkingLevel: q,
30382
30379
  codingAgents: s,
30383
30380
  claudeAccountId: F,
30384
30381
  setClaudeAccountId: O,
@@ -30573,7 +30570,7 @@ function KI({
30573
30570
  ] })
30574
30571
  }
30575
30572
  );
30576
- return /* @__PURE__ */ r(_u, { onClose: o, title: `${t} finding`, page: W, footer: se, children: /* @__PURE__ */ m("div", { className: D("px-2 pb-2 pt-1", W && "mt-auto"), children: [
30573
+ return /* @__PURE__ */ r(_u, { onClose: o, title: `${t} finding`, page: H, footer: se, children: /* @__PURE__ */ m("div", { className: D("px-2 pb-2 pt-1", H && "mt-auto"), children: [
30577
30574
  /* @__PURE__ */ m("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
30578
30575
  /* @__PURE__ */ r("span", { className: D("size-2 shrink-0 rounded-full", Cu[e.severity]) }),
30579
30576
  /* @__PURE__ */ r("span", { className: "truncate font-medium text-foreground/75", children: t }),
@@ -30750,16 +30747,16 @@ function XI({
30750
30747
  const Ke = { ...We, ...be };
30751
30748
  return y(fS(Ke)), Ke;
30752
30749
  });
30753
- }, [z, j] = w(f?.enabled ?? !0), [k, O] = w(f?.cwd ?? t[0]?.cwd ?? ""), [q, X] = w(f?.agent ?? "aisdk"), [L, H] = w(f?.claudeAccountId ?? ""), V = Zr(f?.agent ?? "aisdk"), [E, B] = w(
30750
+ }, [z, j] = w(f?.enabled ?? !0), [k, O] = w(f?.cwd ?? t[0]?.cwd ?? ""), [W, X] = w(f?.agent ?? "aisdk"), [L, q] = w(f?.claudeAccountId ?? ""), V = Zr(f?.agent ?? "aisdk"), [E, B] = w(
30754
30751
  f?.model ?? V
30755
30752
  ), [_, M] = w(
30756
30753
  f?.thinkingLevel ?? Qr()
30757
- ), [F, K] = w(!1), [W, Q] = w(!1), [te, fe] = w(null), de = _e(() => Wp(v, n), [v, n]), Ue = gi(q), Re = Zr(q), Ae = os(q, E).length > 0;
30754
+ ), [F, K] = w(!1), [H, Q] = w(!1), [te, fe] = w(null), de = _e(() => Wp(v, n), [v, n]), Ue = gi(W), Re = Zr(W), Ae = os(W, E).length > 0;
30758
30755
  G(() => {
30759
30756
  Ue.includes(E) || B(Re);
30760
30757
  }, [Re, Ue, E]);
30761
30758
  async function we() {
30762
- if (!(W || !p.trim())) {
30759
+ if (!(H || !p.trim())) {
30763
30760
  Q(!0), fe(null);
30764
30761
  try {
30765
30762
  const be = await ye("/api/auto/enhance-prompt", {
@@ -30789,13 +30786,13 @@ function XI({
30789
30786
  schedule: v.trim(),
30790
30787
  enabled: z,
30791
30788
  cwd: k || void 0,
30792
- agent: q,
30789
+ agent: W,
30793
30790
  model: E.trim() || void 0,
30794
30791
  thinkingLevel: Ae ? _ : void 0,
30795
30792
  // null, not undefined: JSON.stringify drops undefined, and an absent
30796
30793
  // field means "keep the stored pin" — so clearing one has to be said
30797
30794
  // out loud or the save is a silent no-op.
30798
- claudeAccountId: q === "aisdk" && L || null
30795
+ claudeAccountId: W === "aisdk" && L || null
30799
30796
  });
30800
30797
  } finally {
30801
30798
  K(!1);
@@ -30991,7 +30988,7 @@ function XI({
30991
30988
  /* @__PURE__ */ r(
30992
30989
  wl,
30993
30990
  {
30994
- backend: q,
30991
+ backend: W,
30995
30992
  setBackend: X,
30996
30993
  model: E,
30997
30994
  setModel: B,
@@ -30999,7 +30996,7 @@ function XI({
30999
30996
  setThinkingLevel: M,
31000
30997
  codingAgents: s,
31001
30998
  claudeAccountId: L,
31002
- setClaudeAccountId: H,
30999
+ setClaudeAccountId: q,
31003
31000
  scheduledOnly: !0
31004
31001
  }
31005
31002
  ),
@@ -31041,13 +31038,13 @@ function XI({
31041
31038
  "button",
31042
31039
  {
31043
31040
  type: "button",
31044
- disabled: W || !p.trim(),
31041
+ disabled: H || !p.trim(),
31045
31042
  onClick: () => void we(),
31046
31043
  className: "flex items-center gap-1 text-[11px] font-semibold uppercase tracking-wide text-primary disabled:text-muted-foreground",
31047
31044
  title: "Rewrite into a sharper watch prompt",
31048
31045
  children: [
31049
- W ? /* @__PURE__ */ r(dt, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ r(po, { className: "size-3.5" }),
31050
- W ? "Enhancing…" : "Enhance"
31046
+ H ? /* @__PURE__ */ r(dt, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ r(po, { className: "size-3.5" }),
31047
+ H ? "Enhancing…" : "Enhance"
31051
31048
  ]
31052
31049
  }
31053
31050
  )
@@ -31058,7 +31055,7 @@ function XI({
31058
31055
  value: p,
31059
31056
  onValueChange: g,
31060
31057
  rows: 5,
31061
- disabled: W,
31058
+ disabled: H,
31062
31059
  placeholder: "What to watch for…",
31063
31060
  className: "mt-1.5 resize-none text-sm leading-relaxed"
31064
31061
  }
@@ -33350,9 +33347,9 @@ function T_({
33350
33347
  p ? e.shape ?? "circle" : Vl[Math.floor(Math.random() * Vl.length)]
33351
33348
  ), [k, O] = w(
33352
33349
  p ? e.colorway ?? "warm" : Kl[Math.floor(Math.random() * Kl.length)]
33353
- ), [q, X] = w(v), [L, H] = w(p ? e.claudeAccountId ?? "" : ""), [V, E] = w(p ? e.model ?? y : y), [B, _] = w(p ? e.thinkingLevel ?? Qr() : Qr()), [M, F] = w(!1), K = !p && i ? Yw(i) : null, [W, Q] = w(!1), [te, fe] = w(!1), [de, Ue] = w(p ? e.configRevision ?? 1 : 1), [Re, Ae] = w(
33350
+ ), [W, X] = w(v), [L, q] = w(p ? e.claudeAccountId ?? "" : ""), [V, E] = w(p ? e.model ?? y : y), [B, _] = w(p ? e.thinkingLevel ?? Qr() : Qr()), [M, F] = w(!1), K = !p && i ? Yw(i) : null, [H, Q] = w(!1), [te, fe] = w(!1), [de, Ue] = w(p ? e.configRevision ?? 1 : 1), [Re, Ae] = w(
33354
33351
  p ? e.configStatus ?? "current" : "current"
33355
- ), [we, De] = w(p ? e.rotationError : void 0), be = gi(q), We = Zr(q), Ke = os(q, V);
33352
+ ), [we, De] = w(p ? e.rotationError : void 0), be = gi(W), We = Zr(W), Ke = os(W, V);
33356
33353
  G(() => {
33357
33354
  be.includes(V) || E(We);
33358
33355
  }, [We, V, be]);
@@ -33361,7 +33358,7 @@ function T_({
33361
33358
  (n?.find(($) => $.key === "aisdk")?.status.accounts ?? []).filter(($) => $.connected).map(($) => $.id)
33362
33359
  ),
33363
33360
  [n]
33364
- ), st = q === "aisdk" && L && Ze.has(L) ? L : "";
33361
+ ), st = W === "aisdk" && L && Ze.has(L) ? L : "";
33365
33362
  G(() => {
33366
33363
  if (!h) return;
33367
33364
  const $ = document.body.style.overflow;
@@ -33370,7 +33367,7 @@ function T_({
33370
33367
  };
33371
33368
  }, [h]);
33372
33369
  const Fe = !!b.trim() && !!S.trim() && !K?.reached, se = async () => {
33373
- if (!Fe || W) return;
33370
+ if (!Fe || H) return;
33374
33371
  Q(!0);
33375
33372
  const $ = await c({
33376
33373
  id: p ? e.id : void 0,
@@ -33378,10 +33375,10 @@ function T_({
33378
33375
  shape: z,
33379
33376
  colorway: k,
33380
33377
  persona: S.trim(),
33381
- agent: q,
33378
+ agent: W,
33382
33379
  model: V || void 0,
33383
33380
  thinkingLevel: Ke.length ? B : void 0,
33384
- claudeAccountId: q === "aisdk" && st || null,
33381
+ claudeAccountId: W === "aisdk" && st || null,
33385
33382
  cwd: R || void 0,
33386
33383
  enabled: A
33387
33384
  });
@@ -33404,8 +33401,8 @@ function T_({
33404
33401
  }
33405
33402
  ),
33406
33403
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-[15px] font-semibold", children: p ? "Edit bot" : "New bot" }),
33407
- /* @__PURE__ */ m(Ee, { size: "sm", variant: "brand", disabled: !Fe || W, onClick: () => void se(), children: [
33408
- W ? /* @__PURE__ */ r(dt, { className: "mr-1 size-3.5 animate-spin" }) : null,
33404
+ /* @__PURE__ */ m(Ee, { size: "sm", variant: "brand", disabled: !Fe || H, onClick: () => void se(), children: [
33405
+ H ? /* @__PURE__ */ r(dt, { className: "mr-1 size-3.5 animate-spin" }) : null,
33409
33406
  p ? "Save" : "Create"
33410
33407
  ] })
33411
33408
  ] }), Te = /* @__PURE__ */ m(je, { children: [
@@ -33532,7 +33529,7 @@ function T_({
33532
33529
  "Advanced"
33533
33530
  ] }),
33534
33531
  /* @__PURE__ */ m("span", { className: "max-w-[55%] truncate text-xs text-muted-foreground", children: [
33535
- q,
33532
+ W,
33536
33533
  " · ",
33537
33534
  V
33538
33535
  ] })
@@ -33559,7 +33556,7 @@ function T_({
33559
33556
  /* @__PURE__ */ r(
33560
33557
  wl,
33561
33558
  {
33562
- backend: q,
33559
+ backend: W,
33563
33560
  setBackend: X,
33564
33561
  model: V,
33565
33562
  setModel: E,
@@ -33567,7 +33564,7 @@ function T_({
33567
33564
  setThinkingLevel: _,
33568
33565
  codingAgents: n,
33569
33566
  claudeAccountId: st,
33570
- setClaudeAccountId: H,
33567
+ setClaudeAccountId: q,
33571
33568
  scheduledOnly: !1
33572
33569
  }
33573
33570
  )