vite-plugin-opencode-assistant 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -948,7 +948,7 @@ function Ee(e) {
948
948
  return e ? e.__v_isRef === !0 : !1;
949
949
  }
950
950
  // @__NO_SIDE_EFFECTS__
951
- function L(e) {
951
+ function F(e) {
952
952
  return gr(e, !1);
953
953
  }
954
954
  function gr(e, t) {
@@ -1017,7 +1017,7 @@ class yr {
1017
1017
  }
1018
1018
  // @__NO_SIDE_EFFECTS__
1019
1019
  function Z(e, t, n) {
1020
- return /* @__PURE__ */ Ee(e) ? e : te(e) ? new yr(e) : ie(e) && arguments.length > 1 ? br(e, t, n) : /* @__PURE__ */ L(e);
1020
+ return /* @__PURE__ */ Ee(e) ? e : te(e) ? new yr(e) : ie(e) && arguments.length > 1 ? br(e, t, n) : /* @__PURE__ */ F(e);
1021
1021
  }
1022
1022
  function br(e, t, n) {
1023
1023
  return new _r(e, t, n);
@@ -1099,9 +1099,9 @@ function Tr(e, t, n = ae) {
1099
1099
  if (!(!(c.flags & 1) || !c.dirty && !y))
1100
1100
  if (t) {
1101
1101
  const $ = c.run();
1102
- if (o || C || (_ ? $.some((N, j) => ut(N, A[j])) : ut($, A))) {
1102
+ if (o || C || (_ ? $.some((I, j) => ut(I, A[j])) : ut($, A))) {
1103
1103
  p && p();
1104
- const N = Bt;
1104
+ const I = Bt;
1105
1105
  Bt = c;
1106
1106
  try {
1107
1107
  const j = [
@@ -1115,7 +1115,7 @@ function Tr(e, t, n = ae) {
1115
1115
  t(...j)
1116
1116
  );
1117
1117
  } finally {
1118
- Bt = N;
1118
+ Bt = I;
1119
1119
  }
1120
1120
  }
1121
1121
  } else
@@ -1400,9 +1400,9 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
1400
1400
  o: { insert: m, querySelector: C, createText: _, createComment: O }
1401
1401
  } = f, R = $t(t.props);
1402
1402
  let { dynamicChildren: A } = t;
1403
- const B = (N, j, z) => {
1404
- N.shapeFlag & 16 && c(
1405
- N.children,
1403
+ const B = (I, j, z) => {
1404
+ I.shapeFlag & 16 && c(
1405
+ I.children,
1406
1406
  j,
1407
1407
  z,
1408
1408
  o,
@@ -1411,31 +1411,31 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
1411
1411
  r,
1412
1412
  a
1413
1413
  );
1414
- }, y = (N = t) => {
1415
- const j = $t(N.props), z = N.target = Ss(N.props, C), ce = ws(z, N, _, m);
1416
- z && (l !== "svg" && io(z) ? l = "svg" : l !== "mathml" && lo(z) && (l = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(z), j || (B(N, z, ce), un(N, !1)));
1417
- }, $ = (N) => {
1414
+ }, y = (I = t) => {
1415
+ const j = $t(I.props), z = I.target = Ss(I.props, C), ce = ws(z, I, _, m);
1416
+ z && (l !== "svg" && io(z) ? l = "svg" : l !== "mathml" && lo(z) && (l = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(z), j || (B(I, z, ce), un(I, !1)));
1417
+ }, $ = (I) => {
1418
1418
  const j = () => {
1419
- Lt.get(N) === j && (Lt.delete(N), $t(N.props) && (B(N, n, N.anchor), un(N, !0)), y(N));
1419
+ Lt.get(I) === j && (Lt.delete(I), $t(I.props) && (B(I, n, I.anchor), un(I, !0)), y(I));
1420
1420
  };
1421
- Lt.set(N, j), ke(j, i);
1421
+ Lt.set(I, j), ke(j, i);
1422
1422
  };
1423
1423
  if (e == null) {
1424
- const N = t.el = _(""), j = t.anchor = _("");
1425
- if (m(N, n, s), m(j, n, s), Dr(t.props) || i && i.pendingBranch) {
1424
+ const I = t.el = _(""), j = t.anchor = _("");
1425
+ if (m(I, n, s), m(j, n, s), Dr(t.props) || i && i.pendingBranch) {
1426
1426
  $(t);
1427
1427
  return;
1428
1428
  }
1429
1429
  R && (B(t, n, j), un(t, !0)), y();
1430
1430
  } else {
1431
1431
  t.el = e.el;
1432
- const N = t.anchor = e.anchor, j = Lt.get(e);
1432
+ const I = t.anchor = e.anchor, j = Lt.get(e);
1433
1433
  if (j) {
1434
1434
  j.flags |= 8, Lt.delete(e), $(t);
1435
1435
  return;
1436
1436
  }
1437
1437
  t.targetStart = e.targetStart;
1438
- const z = t.target = e.target, ce = t.targetAnchor = e.targetAnchor, fe = $t(e.props), _e = fe ? n : z, Re = fe ? N : ce;
1438
+ const z = t.target = e.target, ce = t.targetAnchor = e.targetAnchor, fe = $t(e.props), _e = fe ? n : z, Re = fe ? I : ce;
1439
1439
  if (l === "svg" || io(z) ? l = "svg" : (l === "mathml" || lo(z)) && (l = "mathml"), A ? (p(
1440
1440
  e.dynamicChildren,
1441
1441
  A,
@@ -1458,18 +1458,18 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
1458
1458
  fe ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : kn(
1459
1459
  t,
1460
1460
  n,
1461
- N,
1461
+ I,
1462
1462
  f,
1463
1463
  1
1464
1464
  );
1465
1465
  else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
1466
- const I = t.target = Ss(
1466
+ const N = t.target = Ss(
1467
1467
  t.props,
1468
1468
  C
1469
1469
  );
1470
- I && kn(
1470
+ N && kn(
1471
1471
  t,
1472
- I,
1472
+ N,
1473
1473
  null,
1474
1474
  f,
1475
1475
  0
@@ -2363,7 +2363,7 @@ function ia(e, t) {
2363
2363
  P,
2364
2364
  k,
2365
2365
  M
2366
- ) : D & 6 ? I(
2366
+ ) : D & 6 ? N(
2367
2367
  u,
2368
2368
  h,
2369
2369
  g,
@@ -2425,7 +2425,7 @@ function ia(e, t) {
2425
2425
  o(h);
2426
2426
  }, $ = (u, h, g, T, b, S, P, k, M) => {
2427
2427
  if (h.type === "svg" ? P = "svg" : h.type === "math" && (P = "mathml"), u == null)
2428
- N(
2428
+ I(
2429
2429
  h,
2430
2430
  g,
2431
2431
  T,
@@ -2451,9 +2451,9 @@ function ia(e, t) {
2451
2451
  w && w._endPatch();
2452
2452
  }
2453
2453
  }
2454
- }, N = (u, h, g, T, b, S, P, k) => {
2454
+ }, I = (u, h, g, T, b, S, P, k) => {
2455
2455
  let M, w;
2456
- const { props: W, shapeFlag: D, transition: E, dirs: F } = u;
2456
+ const { props: W, shapeFlag: D, transition: E, dirs: L } = u;
2457
2457
  if (M = u.el = l(
2458
2458
  u.type,
2459
2459
  S,
@@ -2468,16 +2468,16 @@ function ia(e, t) {
2468
2468
  us(u, S),
2469
2469
  P,
2470
2470
  k
2471
- ), F && Nt(u, null, T, "created"), j(M, u, u.scopeId, P, T), W) {
2471
+ ), L && Nt(u, null, T, "created"), j(M, u, u.scopeId, P, T), W) {
2472
2472
  for (const K in W)
2473
2473
  K !== "value" && !fn(K) && i(M, K, null, W[K], S, T);
2474
2474
  "value" in W && i(M, "value", null, W.value, S), (w = W.onVnodeBeforeMount) && lt(w, T, u);
2475
2475
  }
2476
- F && Nt(u, null, T, "beforeMount");
2476
+ L && Nt(u, null, T, "beforeMount");
2477
2477
  const X = la(b, E);
2478
- X && E.beforeEnter(M), s(M, h, g), ((w = W && W.onVnodeMounted) || X || F) && ke(() => {
2478
+ X && E.beforeEnter(M), s(M, h, g), ((w = W && W.onVnodeMounted) || X || L) && ke(() => {
2479
2479
  try {
2480
- w && lt(w, T, u), X && E.enter(M), F && Nt(u, null, T, "mounted");
2480
+ w && lt(w, T, u), X && E.enter(M), L && Nt(u, null, T, "mounted");
2481
2481
  } finally {
2482
2482
  }
2483
2483
  }, b);
@@ -2518,8 +2518,8 @@ function ia(e, t) {
2518
2518
  let { patchFlag: M, dynamicChildren: w, dirs: W } = h;
2519
2519
  M |= u.patchFlag & 16;
2520
2520
  const D = u.props || ae, E = h.props || ae;
2521
- let F;
2522
- if (g && Ft(g, !1), (F = E.onVnodeBeforeUpdate) && lt(F, g, h, u), W && Nt(h, u, g, "beforeUpdate"), g && Ft(g, !0), (D.innerHTML && E.innerHTML == null || D.textContent && E.textContent == null) && c(k, ""), w ? fe(
2521
+ let L;
2522
+ if (g && Ft(g, !1), (L = E.onVnodeBeforeUpdate) && lt(L, g, h, u), W && Nt(h, u, g, "beforeUpdate"), g && Ft(g, !0), (D.innerHTML && E.innerHTML == null || D.textContent && E.textContent == null) && c(k, ""), w ? fe(
2523
2523
  u.dynamicChildren,
2524
2524
  w,
2525
2525
  k,
@@ -2549,8 +2549,8 @@ function ia(e, t) {
2549
2549
  }
2550
2550
  M & 1 && u.children !== h.children && c(k, h.children);
2551
2551
  } else !P && w == null && _e(k, D, E, g, b);
2552
- ((F = E.onVnodeUpdated) || W) && ke(() => {
2553
- F && lt(F, g, h, u), W && Nt(h, u, g, "updated");
2552
+ ((L = E.onVnodeUpdated) || W) && ke(() => {
2553
+ L && lt(L, g, h, u), W && Nt(h, u, g, "updated");
2554
2554
  }, T);
2555
2555
  }, fe = (u, h, g, T, b, S, P) => {
2556
2556
  for (let k = 0; k < h.length; k++) {
@@ -2601,8 +2601,8 @@ function ia(e, t) {
2601
2601
  }
2602
2602
  }, Re = (u, h, g, T, b, S, P, k, M) => {
2603
2603
  const w = h.el = u ? u.el : r(""), W = h.anchor = u ? u.anchor : r("");
2604
- let { patchFlag: D, dynamicChildren: E, slotScopeIds: F } = h;
2605
- F && (k = k ? k.concat(F) : F), u == null ? (s(w, g, T), s(W, g, T), z(
2604
+ let { patchFlag: D, dynamicChildren: E, slotScopeIds: L } = h;
2605
+ L && (k = k ? k.concat(L) : L), u == null ? (s(w, g, T), s(W, g, T), z(
2606
2606
  // #10007
2607
2607
  // such fragment like `<></>` will be compiled into
2608
2608
  // a fragment which doesn't have a children.
@@ -2645,7 +2645,7 @@ function ia(e, t) {
2645
2645
  k,
2646
2646
  M
2647
2647
  );
2648
- }, I = (u, h, g, T, b, S, P, k, M) => {
2648
+ }, N = (u, h, g, T, b, S, P, k, M) => {
2649
2649
  h.slotScopeIds = k, u == null ? h.shapeFlag & 512 ? b.ctx.activate(
2650
2650
  h,
2651
2651
  g,
@@ -2695,7 +2695,7 @@ function ia(e, t) {
2695
2695
  }, G = (u, h, g, T, b, S, P) => {
2696
2696
  const k = () => {
2697
2697
  if (u.isMounted) {
2698
- let { next: D, bu: E, u: F, parent: X, vnode: K } = u;
2698
+ let { next: D, bu: E, u: L, parent: X, vnode: K } = u;
2699
2699
  {
2700
2700
  const Ke = Wi(u);
2701
2701
  if (Ke) {
@@ -2720,14 +2720,14 @@ function ia(e, t) {
2720
2720
  u,
2721
2721
  b,
2722
2722
  S
2723
- ), D.el = de.el, Y === null && Jr(u, de.el), F && ke(F, b), (le = D.props && D.props.onVnodeUpdated) && ke(
2723
+ ), D.el = de.el, Y === null && Jr(u, de.el), L && ke(L, b), (le = D.props && D.props.onVnodeUpdated) && ke(
2724
2724
  () => lt(le, X, D, K),
2725
2725
  b
2726
2726
  );
2727
2727
  } else {
2728
2728
  let D;
2729
- const { el: E, props: F } = h, { bm: X, m: K, parent: Y, root: le, type: de } = u, Be = Xt(h);
2730
- Ft(u, !1), X && os(X), !Be && (D = F && F.onVnodeBeforeMount) && lt(D, Y, h), Ft(u, !0);
2729
+ const { el: E, props: L } = h, { bm: X, m: K, parent: Y, root: le, type: de } = u, Be = Xt(h);
2730
+ Ft(u, !1), X && os(X), !Be && (D = L && L.onVnodeBeforeMount) && lt(D, Y, h), Ft(u, !0);
2731
2731
  {
2732
2732
  le.ce && le.ce._hasShadowRoot() && le.ce._injectChildStyle(
2733
2733
  de,
@@ -2744,7 +2744,7 @@ function ia(e, t) {
2744
2744
  S
2745
2745
  ), h.el = Ke.el;
2746
2746
  }
2747
- if (K && ke(K, b), !Be && (D = F && F.onVnodeMounted)) {
2747
+ if (K && ke(K, b), !Be && (D = L && L.onVnodeMounted)) {
2748
2748
  const Ke = h;
2749
2749
  ke(
2750
2750
  () => lt(D, Y, Ke),
@@ -2764,7 +2764,7 @@ function ia(e, t) {
2764
2764
  const T = u.vnode.props;
2765
2765
  u.vnode = h, u.next = null, Qr(u, h.props, T, g), sa(u, h.children, g), Mt(), so(u), Pt();
2766
2766
  }, Ae = (u, h, g, T, b, S, P, k, M = !1) => {
2767
- const w = u && u.children, W = u ? u.shapeFlag : 0, D = h.children, { patchFlag: E, shapeFlag: F } = h;
2767
+ const w = u && u.children, W = u ? u.shapeFlag : 0, D = h.children, { patchFlag: E, shapeFlag: L } = h;
2768
2768
  if (E > 0) {
2769
2769
  if (E & 128) {
2770
2770
  ye(
@@ -2794,7 +2794,7 @@ function ia(e, t) {
2794
2794
  return;
2795
2795
  }
2796
2796
  }
2797
- F & 8 ? (W & 16 && qe(w, b, S), D !== w && c(g, D)) : W & 16 ? F & 16 ? ye(
2797
+ L & 8 ? (W & 16 && qe(w, b, S), D !== w && c(g, D)) : W & 16 ? L & 16 ? ye(
2798
2798
  w,
2799
2799
  D,
2800
2800
  g,
@@ -2804,7 +2804,7 @@ function ia(e, t) {
2804
2804
  P,
2805
2805
  k,
2806
2806
  M
2807
- ) : qe(w, b, S, !0) : (W & 8 && c(g, ""), F & 16 && z(
2807
+ ) : qe(w, b, S, !0) : (W & 8 && c(g, ""), L & 16 && z(
2808
2808
  D,
2809
2809
  g,
2810
2810
  T,
@@ -2819,10 +2819,10 @@ function ia(e, t) {
2819
2819
  const w = u.length, W = h.length, D = Math.min(w, W);
2820
2820
  let E;
2821
2821
  for (E = 0; E < D; E++) {
2822
- const F = h[E] = M ? vt(h[E]) : ct(h[E]);
2822
+ const L = h[E] = M ? vt(h[E]) : ct(h[E]);
2823
2823
  _(
2824
2824
  u[E],
2825
- F,
2825
+ L,
2826
2826
  g,
2827
2827
  null,
2828
2828
  b,
@@ -2855,10 +2855,10 @@ function ia(e, t) {
2855
2855
  const W = h.length;
2856
2856
  let D = u.length - 1, E = W - 1;
2857
2857
  for (; w <= D && w <= E; ) {
2858
- const F = u[w], X = h[w] = M ? vt(h[w]) : ct(h[w]);
2859
- if (rn(F, X))
2858
+ const L = u[w], X = h[w] = M ? vt(h[w]) : ct(h[w]);
2859
+ if (rn(L, X))
2860
2860
  _(
2861
- F,
2861
+ L,
2862
2862
  X,
2863
2863
  g,
2864
2864
  null,
@@ -2873,10 +2873,10 @@ function ia(e, t) {
2873
2873
  w++;
2874
2874
  }
2875
2875
  for (; w <= D && w <= E; ) {
2876
- const F = u[D], X = h[E] = M ? vt(h[E]) : ct(h[E]);
2877
- if (rn(F, X))
2876
+ const L = u[D], X = h[E] = M ? vt(h[E]) : ct(h[E]);
2877
+ if (rn(L, X))
2878
2878
  _(
2879
- F,
2879
+ L,
2880
2880
  X,
2881
2881
  g,
2882
2882
  null,
@@ -2892,7 +2892,7 @@ function ia(e, t) {
2892
2892
  }
2893
2893
  if (w > D) {
2894
2894
  if (w <= E) {
2895
- const F = E + 1, X = F < W ? h[F].el : T;
2895
+ const L = E + 1, X = L < W ? h[L].el : T;
2896
2896
  for (; w <= E; )
2897
2897
  _(
2898
2898
  null,
@@ -2910,7 +2910,7 @@ function ia(e, t) {
2910
2910
  for (; w <= D; )
2911
2911
  me(u[w], b, S, !0), w++;
2912
2912
  else {
2913
- const F = w, X = w, K = /* @__PURE__ */ new Map();
2913
+ const L = w, X = w, K = /* @__PURE__ */ new Map();
2914
2914
  for (w = X; w <= E; w++) {
2915
2915
  const Me = h[w] = M ? vt(h[w]) : ct(h[w]);
2916
2916
  Me.key != null && K.set(Me.key, w);
@@ -2920,7 +2920,7 @@ function ia(e, t) {
2920
2920
  let Be = !1, Ke = 0;
2921
2921
  const Tt = new Array(de);
2922
2922
  for (w = 0; w < de; w++) Tt[w] = 0;
2923
- for (w = F; w <= D; w++) {
2923
+ for (w = L; w <= D; w++) {
2924
2924
  const Me = u[w];
2925
2925
  if (le >= de) {
2926
2926
  me(Me, b, S, !0);
@@ -2995,14 +2995,14 @@ function ia(e, t) {
2995
2995
  if (T === 0)
2996
2996
  k.beforeEnter(S), s(S, h, g), ke(() => k.enter(S), b);
2997
2997
  else {
2998
- const { leave: D, delayLeave: E, afterLeave: F } = k, X = () => {
2998
+ const { leave: D, delayLeave: E, afterLeave: L } = k, X = () => {
2999
2999
  u.ctx.isUnmounted ? o(S) : s(S, h, g);
3000
3000
  }, K = () => {
3001
3001
  S._isLeaving && S[Nr](
3002
3002
  !0
3003
3003
  /* cancelled */
3004
3004
  ), D(S, () => {
3005
- X(), F && F();
3005
+ X(), L && L();
3006
3006
  });
3007
3007
  };
3008
3008
  E ? E(S, X, K) : K();
@@ -3019,10 +3019,10 @@ function ia(e, t) {
3019
3019
  shapeFlag: W,
3020
3020
  patchFlag: D,
3021
3021
  dirs: E,
3022
- cacheIndex: F,
3022
+ cacheIndex: L,
3023
3023
  memo: X
3024
3024
  } = u;
3025
- if (D === -2 && (b = !1), k != null && (Mt(), pn(k, null, g, u, !0), Pt()), F != null && (h.renderCache[F] = void 0), W & 256) {
3025
+ if (D === -2 && (b = !1), k != null && (Mt(), pn(k, null, g, u, !0), Pt()), L != null && (h.renderCache[L] = void 0), W & 256) {
3026
3026
  h.ctx.deactivate(u);
3027
3027
  return;
3028
3028
  }
@@ -3055,7 +3055,7 @@ function ia(e, t) {
3055
3055
  !0
3056
3056
  ) : (S === ue && D & 384 || !b && W & 16) && qe(M, h, g), T && st(u);
3057
3057
  }
3058
- const de = X != null && F == null;
3058
+ const de = X != null && L == null;
3059
3059
  (Y && (le = P && P.onVnodeUnmounted) || K || de) && ke(() => {
3060
3060
  le && lt(le, h, u), K && Nt(u, null, h, "unmounted"), de && (u.el = null);
3061
3061
  }, g);
@@ -4021,7 +4021,7 @@ var Xa = Object.defineProperty, Po = Object.getOwnPropertySymbols, Ga = Object.p
4021
4021
  const sl = /* @__PURE__ */ Ve({
4022
4022
  __name: "Frame",
4023
4023
  setup(e, { expose: t }) {
4024
- const n = /* @__PURE__ */ L(null), {
4024
+ const n = /* @__PURE__ */ F(null), {
4025
4025
  frameLoading: s,
4026
4026
  showEmptyState: o,
4027
4027
  showError: i,
@@ -4433,7 +4433,7 @@ const il = /* @__PURE__ */ Ve({
4433
4433
  handleDeleteSession: a,
4434
4434
  sessionKey: f,
4435
4435
  sessionStates: c
4436
- } = en(), d = /* @__PURE__ */ L(!1);
4436
+ } = en(), d = /* @__PURE__ */ F(!1);
4437
4437
  let p = null;
4438
4438
  ze(n, () => {
4439
4439
  d.value = !0, p && clearTimeout(p), p = setTimeout(() => {
@@ -4716,7 +4716,7 @@ const rl = /* @__PURE__ */ Ve(Uc(qc({}, {
4716
4716
  emits: ["resize", "resize-start", "resize-end"],
4717
4717
  setup(e, { expose: t, emit: n }) {
4718
4718
  t();
4719
- const s = e, o = n, i = /* @__PURE__ */ L(!1), l = /* @__PURE__ */ L(0), r = /* @__PURE__ */ L(0), a = (m) => {
4719
+ const s = e, o = n, i = /* @__PURE__ */ F(!1), l = /* @__PURE__ */ F(0), r = /* @__PURE__ */ F(0), a = (m) => {
4720
4720
  m.preventDefault(), i.value = !0, l.value = m.clientX, r.value = s.width, o("resize-start"), document.addEventListener("mousemove", f), document.addEventListener("mouseup", c);
4721
4721
  }, f = (m) => {
4722
4722
  if (!i.value) return;
@@ -4784,7 +4784,7 @@ const al = /* @__PURE__ */ Ve(tu(eu({}, {
4784
4784
  "-animationOrigin.x": _.animationOrigin.x,
4785
4785
  "-animationOrigin.y": _.animationOrigin.y
4786
4786
  }));
4787
- const s = e, o = n, i = ki(), l = /* @__PURE__ */ L(null), r = (_, O) => {
4787
+ const s = e, o = n, i = ki(), l = /* @__PURE__ */ F(null), r = (_, O) => {
4788
4788
  var R;
4789
4789
  (R = l.value) == null || R.sendMessageToIframe(_, O);
4790
4790
  };
@@ -5047,21 +5047,21 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
5047
5047
  },
5048
5048
  emits: ["update:offset", "click", "offset-change", "drag-start", "drag-end"],
5049
5049
  setup(e, { expose: t, emit: n }) {
5050
- const s = e, o = n, i = /* @__PURE__ */ L(null), l = /* @__PURE__ */ L({
5050
+ const s = e, o = n, i = /* @__PURE__ */ F(null), l = /* @__PURE__ */ F({
5051
5051
  x: 0,
5052
5052
  y: 0,
5053
5053
  width: 0,
5054
5054
  height: 0
5055
- }), r = (I) => I !== null && typeof I == "object", a = q(
5055
+ }), r = (N) => N !== null && typeof N == "object", a = q(
5056
5056
  () => r(s.gap) ? s.gap.x : s.gap
5057
5057
  ), f = q(
5058
5058
  () => r(s.gap) ? s.gap.y : s.gap
5059
- ), c = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), d = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), p = q(() => ({
5059
+ ), c = /* @__PURE__ */ F(typeof window < "u" ? window.innerWidth : 0), d = /* @__PURE__ */ F(typeof window < "u" ? window.innerHeight : 0), p = q(() => ({
5060
5060
  top: f.value,
5061
5061
  right: c.value - l.value.width - a.value,
5062
5062
  bottom: d.value - l.value.height - f.value,
5063
5063
  left: a.value
5064
- })), m = (I, J) => I.reduce(
5064
+ })), m = (N, J) => N.reduce(
5065
5065
  (se, G) => Math.abs(se - J) < Math.abs(G - J) ? se : G
5066
5066
  ), C = () => {
5067
5067
  if (s.magnetic === "x")
@@ -5070,76 +5070,76 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
5070
5070
  else if (R.value === "right")
5071
5071
  l.value.x = p.value.right;
5072
5072
  else {
5073
- const I = m(
5073
+ const N = m(
5074
5074
  [p.value.left, p.value.right],
5075
5075
  l.value.x
5076
5076
  );
5077
- l.value.x = I, R.value = I === p.value.left ? "left" : "right";
5077
+ l.value.x = N, R.value = N === p.value.left ? "left" : "right";
5078
5078
  }
5079
5079
  if (s.magnetic === "y") {
5080
- const I = m(
5080
+ const N = m(
5081
5081
  [p.value.top, p.value.bottom],
5082
5082
  l.value.y
5083
5083
  );
5084
- l.value.y = I;
5084
+ l.value.y = N;
5085
5085
  }
5086
- }, _ = /* @__PURE__ */ L(!1), O = /* @__PURE__ */ L(!1), R = /* @__PURE__ */ L(null), A = q(() => {
5087
- const I = {}, J = `${l.value.x}px`, se = `${l.value.y}px`;
5088
- return I.transform = `translate3d(${J}, ${se}, 0)`, _.value || !O.value ? I.transition = "none" : I.transition = "transform 0.3s ease", I;
5086
+ }, _ = /* @__PURE__ */ F(!1), O = /* @__PURE__ */ F(!1), R = /* @__PURE__ */ F(null), A = q(() => {
5087
+ const N = {}, J = `${l.value.x}px`, se = `${l.value.y}px`;
5088
+ return N.transform = `translate3d(${J}, ${se}, 0)`, _.value || !O.value ? N.transition = "none" : N.transition = "transform 0.3s ease", N;
5089
5089
  }), B = () => {
5090
5090
  if (!i.value || typeof window > "u") return;
5091
- const I = i.value.getBoundingClientRect(), { offset: J } = s;
5092
- let se = J ? J.x : c.value - I.width - a.value, G = J ? J.y : d.value - I.height - f.value;
5093
- const Oe = c.value - I.width - a.value, Ae = d.value - I.height - f.value;
5091
+ const N = i.value.getBoundingClientRect(), { offset: J } = s;
5092
+ let se = J ? J.x : c.value - N.width - a.value, G = J ? J.y : d.value - N.height - f.value;
5093
+ const Oe = c.value - N.width - a.value, Ae = d.value - N.height - f.value;
5094
5094
  se < a.value && (se = a.value), se > Oe && (se = Oe), G < f.value && (G = f.value), G > Ae && (G = Ae);
5095
5095
  const Le = l.value.x, ye = l.value.y;
5096
5096
  if (l.value = {
5097
5097
  x: se,
5098
5098
  y: G,
5099
- width: I.width,
5100
- height: I.height
5099
+ width: N.width,
5100
+ height: N.height
5101
5101
  }, !_.value && (s.magnetic === "x" && R.value ? R.value === "left" ? l.value.x = p.value.left : l.value.x = p.value.right : C(), l.value.x !== Le || l.value.y !== ye)) {
5102
5102
  const ge = { x: l.value.x, y: l.value.y };
5103
5103
  o("update:offset", ge), o("offset-change", ge);
5104
5104
  }
5105
5105
  }, y = {
5106
- startX: /* @__PURE__ */ L(0),
5107
- startY: /* @__PURE__ */ L(0),
5108
- deltaX: /* @__PURE__ */ L(0),
5109
- deltaY: /* @__PURE__ */ L(0),
5110
- offsetX: /* @__PURE__ */ L(0),
5111
- offsetY: /* @__PURE__ */ L(0),
5112
- isTap: /* @__PURE__ */ L(!0),
5113
- start(I) {
5114
- this.startX.value = "touches" in I ? I.touches[0].clientX : I.clientX, this.startY.value = "touches" in I ? I.touches[0].clientY : I.clientY, this.deltaX.value = 0, this.deltaY.value = 0, this.offsetX.value = 0, this.offsetY.value = 0, this.isTap.value = !0;
5106
+ startX: /* @__PURE__ */ F(0),
5107
+ startY: /* @__PURE__ */ F(0),
5108
+ deltaX: /* @__PURE__ */ F(0),
5109
+ deltaY: /* @__PURE__ */ F(0),
5110
+ offsetX: /* @__PURE__ */ F(0),
5111
+ offsetY: /* @__PURE__ */ F(0),
5112
+ isTap: /* @__PURE__ */ F(!0),
5113
+ start(N) {
5114
+ this.startX.value = "touches" in N ? N.touches[0].clientX : N.clientX, this.startY.value = "touches" in N ? N.touches[0].clientY : N.clientY, this.deltaX.value = 0, this.deltaY.value = 0, this.offsetX.value = 0, this.offsetY.value = 0, this.isTap.value = !0;
5115
5115
  },
5116
- move(I) {
5117
- const J = "touches" in I ? I.touches[0].clientX : I.clientX, se = "touches" in I ? I.touches[0].clientY : I.clientY;
5116
+ move(N) {
5117
+ const J = "touches" in N ? N.touches[0].clientX : N.clientX, se = "touches" in N ? N.touches[0].clientY : N.clientY;
5118
5118
  this.deltaX.value = J - this.startX.value, this.deltaY.value = se - this.startY.value, this.offsetX.value = Math.abs(this.deltaX.value), this.offsetY.value = Math.abs(this.deltaY.value);
5119
5119
  const G = 5;
5120
5120
  this.isTap.value && (this.offsetX.value > G || this.offsetY.value > G) && (this.isTap.value = !1);
5121
5121
  }
5122
5122
  };
5123
- let $ = 0, N = 0;
5124
- const j = (I) => {
5125
- y.start(I), _.value = !0, $ = l.value.x, N = l.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in I || (window.addEventListener("mousemove", z, { passive: !1 }), window.addEventListener("mouseup", ce));
5126
- }, z = (I) => {
5127
- I.cancelable && I.preventDefault();
5123
+ let $ = 0, I = 0;
5124
+ const j = (N) => {
5125
+ y.start(N), _.value = !0, $ = l.value.x, I = l.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in N || (window.addEventListener("mousemove", z, { passive: !1 }), window.addEventListener("mouseup", ce));
5126
+ }, z = (N) => {
5127
+ N.cancelable && N.preventDefault();
5128
5128
  const J = y.isTap.value;
5129
- if (y.move(I), J && !y.isTap.value && o("drag-start"), s.axis !== "lock" && !y.isTap.value) {
5129
+ if (y.move(N), J && !y.isTap.value && o("drag-start"), s.axis !== "lock" && !y.isTap.value) {
5130
5130
  if (s.axis === "x" || s.axis === "xy") {
5131
5131
  let G = $ + y.deltaX.value;
5132
5132
  G < p.value.left && (G = p.value.left), G > p.value.right && (G = p.value.right), l.value.x = G;
5133
5133
  }
5134
5134
  if (s.axis === "y" || s.axis === "xy") {
5135
- let G = N + y.deltaY.value;
5135
+ let G = I + y.deltaY.value;
5136
5136
  G < p.value.top && (G = p.value.top), G > p.value.bottom && (G = p.value.bottom), l.value.y = G;
5137
5137
  }
5138
5138
  const se = { x: l.value.x, y: l.value.y };
5139
5139
  o("update:offset", se);
5140
5140
  }
5141
- }, ce = (I) => {
5142
- _.value = !1, document.body.classList.remove("floating-bubble-dragging"), I && !("touches" in I) && I.type === "mouseup" && (window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", ce)), requestAnimationFrame(() => {
5141
+ }, ce = (N) => {
5142
+ _.value = !1, document.body.classList.remove("floating-bubble-dragging"), N && !("touches" in N) && N.type === "mouseup" && (window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", ce)), requestAnimationFrame(() => {
5143
5143
  if (s.magnetic === "x" && !y.isTap.value) {
5144
5144
  const J = l.value.x + l.value.width / 2, se = c.value / 2;
5145
5145
  R.value = J < se ? "left" : "right";
@@ -5147,11 +5147,11 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
5147
5147
  if (C(), !y.isTap.value) {
5148
5148
  o("drag-end");
5149
5149
  const J = { x: l.value.x, y: l.value.y };
5150
- o("update:offset", J), ($ !== J.x || N !== J.y) && o("offset-change", J);
5150
+ o("update:offset", J), ($ !== J.x || I !== J.y) && o("offset-change", J);
5151
5151
  }
5152
5152
  });
5153
- }, fe = (I) => {
5154
- y.isTap.value ? o("click", I) : I.stopPropagation();
5153
+ }, fe = (N) => {
5154
+ y.isTap.value ? o("click", N) : N.stopPropagation();
5155
5155
  }, _e = () => {
5156
5156
  typeof window < "u" && (c.value = window.innerWidth, d.value = window.innerHeight);
5157
5157
  };
@@ -5172,12 +5172,12 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
5172
5172
  });
5173
5173
  const Re = { props: s, emit: o, rootRef: i, state: l, isObject: r, gapX: a, gapY: f, windowWidth: c, windowHeight: d, boundary: p, closest: m, applyMagnetic: C, dragging: _, initialized: O, magneticSide: R, rootStyle: A, updateState: B, touch: y, get prevX() {
5174
5174
  return $;
5175
- }, set prevX(I) {
5176
- $ = I;
5175
+ }, set prevX(N) {
5176
+ $ = N;
5177
5177
  }, get prevY() {
5178
- return N;
5179
- }, set prevY(I) {
5180
- N = I;
5178
+ return I;
5179
+ }, set prevY(N) {
5180
+ I = N;
5181
5181
  }, onTouchStart: j, onTouchMove: z, onTouchEnd: ce, onClick: fe, handleResize: _e };
5182
5182
  return Object.defineProperty(Re, "__isScriptSetup", { enumerable: !1, value: !0 }), Re;
5183
5183
  }
@@ -5219,7 +5219,7 @@ const fl = /* @__PURE__ */ Ve({
5219
5219
  handleToggle: a,
5220
5220
  bubbleOffset: f,
5221
5221
  handleBubbleOffsetChange: c
5222
- } = en(), d = /* @__PURE__ */ L(f.value), p = n, m = (_) => {
5222
+ } = en(), d = /* @__PURE__ */ F(f.value), p = n, m = (_) => {
5223
5223
  d.value = _, c(_);
5224
5224
  };
5225
5225
  ze(f, (_) => {
@@ -5469,7 +5469,7 @@ function Du(e) {
5469
5469
  }
5470
5470
  const ps = ["auto", "light", "dark"];
5471
5471
  function Ru(e) {
5472
- const t = /* @__PURE__ */ L("light");
5472
+ const t = /* @__PURE__ */ F("light");
5473
5473
  function n() {
5474
5474
  return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
5475
5475
  }
@@ -6168,12 +6168,12 @@ function Ho(e, t) {
6168
6168
  return Qf(i, l);
6169
6169
  }
6170
6170
  function ed(e) {
6171
- const t = /* @__PURE__ */ L(!1), n = /* @__PURE__ */ L({
6171
+ const t = /* @__PURE__ */ F(!1), n = /* @__PURE__ */ F({
6172
6172
  top: "0px",
6173
6173
  left: "0px",
6174
6174
  width: "0px",
6175
6175
  height: "0px"
6176
- }), s = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L({ top: "0px", left: "0px" }), i = /* @__PURE__ */ L({ description: "", fileInfo: "" }), l = 500;
6176
+ }), s = /* @__PURE__ */ F(!1), o = /* @__PURE__ */ F({ top: "0px", left: "0px" }), i = /* @__PURE__ */ F({ description: "", fileInfo: "" }), l = 500;
6177
6177
  let r = null, a = "#3b82f6", f = "rgba(59, 130, 246, 0.1)";
6178
6178
  function c(O) {
6179
6179
  O.forEach((R) => {
@@ -6189,14 +6189,14 @@ function ed(e) {
6189
6189
  if (!e.selectMode.value) return;
6190
6190
  const R = document.querySelector(".opencode-element-highlight"), A = document.querySelector(".opencode-element-tooltip"), B = document.querySelector(".opencode-select-mode-hint"), y = document.querySelector(".floating-bubble"), $ = [R, A, B, y];
6191
6191
  c($);
6192
- const N = Wo(O), j = Ho(O, N);
6193
- if (d($), N) {
6192
+ const I = Wo(O), j = Ho(O, I);
6193
+ if (d($), I) {
6194
6194
  const z = document.querySelector(".opencode-widget");
6195
6195
  if (z) {
6196
6196
  const Fe = getComputedStyle(z);
6197
6197
  a = Fe.getPropertyValue("--oc-primary").trim() || a, f = Fe.getPropertyValue("--oc-primary-bg").trim() || f;
6198
6198
  }
6199
- const ce = jo(N), fe = j.file ? j.file.split("/").pop() : "";
6199
+ const ce = jo(I), fe = j.file ? j.file.split("/").pop() : "";
6200
6200
  let _e = "";
6201
6201
  j.line && (_e = `:${j.line}`, j.column && (_e += `:${j.column}`));
6202
6202
  const Re = fe ? `${fe}${_e}` : "";
@@ -6204,7 +6204,7 @@ function ed(e) {
6204
6204
  description: ce,
6205
6205
  fileInfo: Re
6206
6206
  };
6207
- const I = N.getBoundingClientRect(), J = `${I.top}px`, se = `${I.left}px`, G = `${I.width}px`, Oe = `${I.height}px`;
6207
+ const N = I.getBoundingClientRect(), J = `${N.top}px`, se = `${N.left}px`, G = `${N.width}px`, Oe = `${N.height}px`;
6208
6208
  (n.value.top !== J || n.value.left !== se || n.value.width !== G || n.value.height !== Oe) && (n.value = {
6209
6209
  top: J,
6210
6210
  left: se,
@@ -6214,8 +6214,8 @@ function ed(e) {
6214
6214
  background: f
6215
6215
  });
6216
6216
  const Ae = 50, Le = 200, ye = 10;
6217
- let ge = I.top - Ae - 8, me = I.left;
6218
- ge < ye && (ge = I.bottom + 8), ge + Ae > window.innerHeight - ye && (ge = Math.max(ye, I.top - Ae - 8)), me < ye && (me = ye), me + Le > window.innerWidth - ye && (me = window.innerWidth - Le - ye);
6217
+ let ge = N.top - Ae - 8, me = N.left;
6218
+ ge < ye && (ge = N.bottom + 8), ge + Ae > window.innerHeight - ye && (ge = Math.max(ye, N.top - Ae - 8)), me < ye && (me = ye), me + Le > window.innerWidth - ye && (me = window.innerWidth - Le - ye);
6219
6219
  const st = `${ge}px`, dt = `${me}px`;
6220
6220
  (o.value.top !== st || o.value.left !== dt) && (o.value = {
6221
6221
  top: st,
@@ -6234,12 +6234,12 @@ function ed(e) {
6234
6234
  A.preventDefault(), A.stopPropagation();
6235
6235
  const B = Wo(A), y = Ho(A, B);
6236
6236
  if (B) {
6237
- const $ = zf(B), N = jo(B), j = {
6237
+ const $ = zf(B), I = jo(B), j = {
6238
6238
  filePath: y.file,
6239
6239
  line: y.line,
6240
6240
  column: y.column,
6241
6241
  innerText: tl($, 200),
6242
- description: N
6242
+ description: I
6243
6243
  };
6244
6244
  e.onAddSelectedNode(j);
6245
6245
  }
@@ -6328,7 +6328,7 @@ function sd(e) {
6328
6328
  }
6329
6329
  const od = 1440;
6330
6330
  function id(e) {
6331
- const t = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), n = q(() => {
6331
+ const t = /* @__PURE__ */ F(typeof window < "u" ? window.innerWidth : 0), n = q(() => {
6332
6332
  var c, d, p, m, C, _;
6333
6333
  const O = e.splitMode.value || {};
6334
6334
  return {
@@ -6339,7 +6339,7 @@ function id(e) {
6339
6339
  shrinkPage: (C = O.shrinkPage) != null ? C : !0,
6340
6340
  defaultOpen: (_ = O.defaultOpen) != null ? _ : !0
6341
6341
  };
6342
- }), s = /* @__PURE__ */ L(n.value.width), o = q(() => e.displayMode.value === "bubble" ? "bubble" : e.displayMode.value === "split" || t.value >= od ? "split" : "bubble"), i = q(() => o.value === "split"), l = (c) => {
6342
+ }), s = /* @__PURE__ */ F(n.value.width), o = q(() => e.displayMode.value === "bubble" ? "bubble" : e.displayMode.value === "split" || t.value >= od ? "split" : "bubble"), i = q(() => o.value === "split"), l = (c) => {
6343
6343
  var d;
6344
6344
  s.value = c, (d = e.onWidthChange) == null || d.call(e, c);
6345
6345
  }, r = () => {
@@ -6414,14 +6414,14 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6414
6414
  "-chatAnimationOrigin.x": Ie.value.x,
6415
6415
  "-chatAnimationOrigin.y": Ie.value.y
6416
6416
  }));
6417
- const s = e, o = n, i = ki(), l = /* @__PURE__ */ L(""), r = /* @__PURE__ */ L(!1), a = /* @__PURE__ */ L("widget");
6417
+ const s = e, o = n, i = ki(), l = /* @__PURE__ */ F(""), r = /* @__PURE__ */ F(!1), a = /* @__PURE__ */ F("widget");
6418
6418
  let f = null;
6419
6419
  const c = (x, Pe) => {
6420
6420
  const { duration: Ge = 3e3, mode: ht = "widget" } = Pe || {};
6421
6421
  l.value = x, r.value = !0, a.value = ht, f && clearTimeout(f), f = setTimeout(() => {
6422
6422
  r.value = !1;
6423
6423
  }, Ge);
6424
- }, d = /* @__PURE__ */ L(!1), p = /* @__PURE__ */ L("");
6424
+ }, d = /* @__PURE__ */ F(!1), p = /* @__PURE__ */ F("");
6425
6425
  let m = null;
6426
6426
  const C = (x) => (p.value = x, d.value = !0, new Promise((Pe) => {
6427
6427
  m = Pe;
@@ -6429,11 +6429,11 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6429
6429
  d.value = !1, m && m(!0);
6430
6430
  }, O = () => {
6431
6431
  d.value = !1, m && m(!1);
6432
- }, R = /* @__PURE__ */ L(null), A = /* @__PURE__ */ L(null), B = (x, Pe) => {
6432
+ }, R = /* @__PURE__ */ F(null), A = /* @__PURE__ */ F(null), B = (x, Pe) => {
6433
6433
  var Ge;
6434
6434
  (Ge = R.value) == null || Ge.sendMessageToIframe(x, Pe);
6435
- }, y = /* @__PURE__ */ L(s.sessionListCollapsed), $ = /* @__PURE__ */ L(!1), N = /* @__PURE__ */ L(!0), j = /* @__PURE__ */ L(!0), z = /* @__PURE__ */ L(!1), ce = /* @__PURE__ */ L(s.splitPanelWidth), fe = () => {
6436
- z.value && (B("prompt-dock-visibility-change", { visible: N.value }), B("minimize-state-change", { minimized: $.value }));
6435
+ }, y = /* @__PURE__ */ F(s.sessionListCollapsed), $ = /* @__PURE__ */ F(!1), I = /* @__PURE__ */ F(!0), j = /* @__PURE__ */ F(!0), z = /* @__PURE__ */ F(!1), ce = /* @__PURE__ */ F(s.splitPanelWidth), fe = () => {
6436
+ z.value && (B("prompt-dock-visibility-change", { visible: I.value }), B("minimize-state-change", { minimized: $.value }));
6437
6437
  }, _e = () => {
6438
6438
  o("frame-loaded"), z.value = !0, fe();
6439
6439
  };
@@ -6454,7 +6454,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6454
6454
  );
6455
6455
  const {
6456
6456
  buttonActive: Re,
6457
- containerClasses: I,
6457
+ containerClasses: N,
6458
6458
  iframeSource: J,
6459
6459
  sessionListTitle: se,
6460
6460
  resolvedTheme: G,
@@ -6527,7 +6527,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6527
6527
  onExitSelectMode: () => {
6528
6528
  o("update:selectMode", !1), o("toggle-select-mode", !1);
6529
6529
  }
6530
- }), P = /* @__PURE__ */ L(void 0), {
6530
+ }), P = /* @__PURE__ */ F(void 0), {
6531
6531
  effectiveMode: k,
6532
6532
  isSplitMode: M,
6533
6533
  panelWidth: w,
@@ -6548,7 +6548,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6548
6548
  sd({
6549
6549
  open: /* @__PURE__ */ Z(s, "open"),
6550
6550
  minimized: $,
6551
- promptDockVisible: N,
6551
+ promptDockVisible: I,
6552
6552
  bubbleOffset: P,
6553
6553
  theme: /* @__PURE__ */ Z(s, "theme"),
6554
6554
  sessionListCollapsed: y,
@@ -6561,18 +6561,18 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6561
6561
  y: Math.max(10, Math.min(x.bubbleOffset.y, Rt))
6562
6562
  };
6563
6563
  }
6564
- x.theme !== void 0 && x.theme !== s.theme && (o("update:theme", x.theme), o("toggle-theme", x.theme)), x.sessionListCollapsed !== void 0 && x.sessionListCollapsed !== s.sessionListCollapsed && (y.value = x.sessionListCollapsed, o("update:sessionListCollapsed", x.sessionListCollapsed)), x.promptDockVisible !== void 0 ? N.value = x.promptDockVisible : $.value && (N.value = !1), x.splitPanelWidth !== void 0 && x.splitPanelWidth !== s.splitPanelWidth && D(x.splitPanelWidth), Si(() => {
6564
+ x.theme !== void 0 && x.theme !== s.theme && (o("update:theme", x.theme), o("toggle-theme", x.theme)), x.sessionListCollapsed !== void 0 && x.sessionListCollapsed !== s.sessionListCollapsed && (y.value = x.sessionListCollapsed, o("update:sessionListCollapsed", x.sessionListCollapsed)), x.promptDockVisible !== void 0 ? I.value = x.promptDockVisible : $.value && (I.value = !1), x.splitPanelWidth !== void 0 && x.splitPanelWidth !== s.splitPanelWidth && D(x.splitPanelWidth), Si(() => {
6565
6565
  fe(), setTimeout(() => {
6566
6566
  j.value = !1;
6567
6567
  }, 50);
6568
6568
  });
6569
6569
  }
6570
6570
  });
6571
- const F = () => {
6572
- $.value = !$.value, N.value = !$.value, B("prompt-dock-visibility-change", { visible: N.value }), B("minimize-state-change", { minimized: $.value });
6571
+ const L = () => {
6572
+ $.value = !$.value, I.value = !$.value, B("prompt-dock-visibility-change", { visible: I.value }), B("minimize-state-change", { minimized: $.value });
6573
6573
  }, X = () => {
6574
- N.value = !N.value, B("prompt-dock-visibility-change", { visible: N.value });
6575
- }, K = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), Y = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), le = () => {
6574
+ I.value = !I.value, B("prompt-dock-visibility-change", { visible: I.value });
6575
+ }, K = /* @__PURE__ */ F(typeof window < "u" ? window.innerWidth : 0), Y = /* @__PURE__ */ F(typeof window < "u" ? window.innerHeight : 0), le = () => {
6576
6576
  typeof window < "u" && (K.value = window.innerWidth, Y.value = window.innerHeight);
6577
6577
  };
6578
6578
  Xe(() => {
@@ -6622,7 +6622,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6622
6622
  default:
6623
6623
  return { x: "20px", y: "20px" };
6624
6624
  }
6625
- }), Ct = /* @__PURE__ */ L(!1);
6625
+ }), Ct = /* @__PURE__ */ F(!1);
6626
6626
  let Dt = !1;
6627
6627
  const kl = () => {
6628
6628
  Ct.value = !0, Dt = s.open, s.open && o("update:open", !1);
@@ -6650,7 +6650,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6650
6650
  open: /* @__PURE__ */ Z(s, "open"),
6651
6651
  thinking: /* @__PURE__ */ Z(s, "thinking"),
6652
6652
  minimized: $,
6653
- promptDockVisible: N,
6653
+ promptDockVisible: I,
6654
6654
  bubbleOffset: P,
6655
6655
  mode: k,
6656
6656
  sessionStates: q(() => {
@@ -6666,7 +6666,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6666
6666
  selectedElementItems: Et,
6667
6667
  handleToggle: Le,
6668
6668
  handleClose: Oe,
6669
- handleToggleMinimize: F,
6669
+ handleToggleMinimize: L,
6670
6670
  handleTogglePromptDock: X,
6671
6671
  handleToggleSessionList: ye,
6672
6672
  handleToggleTheme: ge,
@@ -6689,7 +6689,7 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
6689
6689
  return m;
6690
6690
  }, set dialogResolve(x) {
6691
6691
  m = x;
6692
- }, showConfirmDialog: C, handleDialogConfirm: _, handleDialogCancel: O, frameRef: R, triggerRef: A, sendMessageToIframe: B, localSessionListCollapsed: y, minimized: $, promptDockVisible: N, isRestoring: j, iframeLoaded: z, splitPanelWidth: ce, syncStateToIframe: fe, handleFrameLoaded: _e, buttonActive: Re, containerClasses: I, iframeSource: J, sessionListTitle: se, resolvedTheme: G, handleClose: Oe, handleEmptyAction: Ae, handleToggle: Le, handleToggleSessionList: ye, handleToggleTheme: ge, sessionItems: me, handleCreateSession: st, handleDeleteSession: dt, handleSelectSession: Fe, bubbleVisible: qe, hasSelectedElements: Ue, selectedElementItems: Et, handleClearSelectedNodes: kt, handleClickSelectedNode: ot, handleRemoveSelectedNode: tn, handleToggleSelectMode: u, highlightVisible: h, highlightStyle: g, tooltipVisible: T, tooltipStyle: b, tooltipContent: S, bubbleOffset: P, effectiveMode: k, isSplitMode: M, panelWidth: w, splitConfig: W, handleResize: D, handleSplitToggle: E, handleToggleMinimize: F, handleTogglePromptDock: X, windowWidth: K, windowHeight: Y, handleWindowResize: le, bubbleQuadrant: de, isBubbleOnRightSide: Be, chatPositionStyle: Ke, handleBubbleOffsetChange: Tt, handleResizeStart: On, handleResizeEnd: Me, chatAnimationOrigin: Ie, isDragging: Ct, get wasOpenBeforeDrag() {
6692
+ }, showConfirmDialog: C, handleDialogConfirm: _, handleDialogCancel: O, frameRef: R, triggerRef: A, sendMessageToIframe: B, localSessionListCollapsed: y, minimized: $, promptDockVisible: I, isRestoring: j, iframeLoaded: z, splitPanelWidth: ce, syncStateToIframe: fe, handleFrameLoaded: _e, buttonActive: Re, containerClasses: N, iframeSource: J, sessionListTitle: se, resolvedTheme: G, handleClose: Oe, handleEmptyAction: Ae, handleToggle: Le, handleToggleSessionList: ye, handleToggleTheme: ge, sessionItems: me, handleCreateSession: st, handleDeleteSession: dt, handleSelectSession: Fe, bubbleVisible: qe, hasSelectedElements: Ue, selectedElementItems: Et, handleClearSelectedNodes: kt, handleClickSelectedNode: ot, handleRemoveSelectedNode: tn, handleToggleSelectMode: u, highlightVisible: h, highlightStyle: g, tooltipVisible: T, tooltipStyle: b, tooltipContent: S, bubbleOffset: P, effectiveMode: k, isSplitMode: M, panelWidth: w, splitConfig: W, handleResize: D, handleSplitToggle: E, handleToggleMinimize: L, handleTogglePromptDock: X, windowWidth: K, windowHeight: Y, handleWindowResize: le, bubbleQuadrant: de, isBubbleOnRightSide: Be, chatPositionStyle: Ke, handleBubbleOffsetChange: Tt, handleResizeStart: On, handleResizeEnd: Me, chatAnimationOrigin: Ie, isDragging: Ct, get wasOpenBeforeDrag() {
6693
6693
  return Dt;
6694
6694
  }, set wasOpenBeforeDrag(x) {
6695
6695
  Dt = x;
@@ -6942,7 +6942,7 @@ function Ml(e) {
6942
6942
  onDisconnected: r,
6943
6943
  onError: a,
6944
6944
  onMessage: f
6945
- } = e, c = /* @__PURE__ */ L(null), d = /* @__PURE__ */ L("idle"), p = /* @__PURE__ */ L(0);
6945
+ } = e, c = /* @__PURE__ */ F(null), d = /* @__PURE__ */ F("idle"), p = /* @__PURE__ */ F(0);
6946
6946
  function m(A) {
6947
6947
  try {
6948
6948
  const B = JSON.parse(A.data);
@@ -7064,23 +7064,23 @@ function Ad(e) {
7064
7064
  };
7065
7065
  }
7066
7066
  function Md(e) {
7067
- const { proxyBaseUrl: t, currentSessionId: n, enabled: s, onConnected: o, onSessionUpdate: i } = e, l = /* @__PURE__ */ L({});
7067
+ const { proxyBaseUrl: t, currentSessionId: n, enabled: s, onConnected: o, onSessionUpdate: i } = e, l = /* @__PURE__ */ F({});
7068
7068
  function r(y) {
7069
7069
  return y?.role === "assistant" && typeof y?.time?.completed != "number";
7070
7070
  }
7071
7071
  function a(y) {
7072
- const $ = l.value[y], N = $?.hasPending || $?.statusType !== "idle";
7072
+ const $ = l.value[y], I = $?.hasPending || $?.statusType !== "idle";
7073
7073
  l.value[y] = {
7074
- thinking: N,
7074
+ thinking: I,
7075
7075
  statusType: $?.statusType || "idle",
7076
7076
  hasPending: $?.hasPending || !1
7077
7077
  };
7078
7078
  }
7079
7079
  function f(y) {
7080
- const $ = y.type, N = y.properties;
7080
+ const $ = y.type, I = y.properties;
7081
7081
  switch ($) {
7082
7082
  case "session.updated": {
7083
- const j = N.info;
7083
+ const j = I.info;
7084
7084
  if (!j?.id) return;
7085
7085
  i?.({
7086
7086
  id: j.id,
@@ -7091,9 +7091,9 @@ function Md(e) {
7091
7091
  break;
7092
7092
  }
7093
7093
  case "session.status": {
7094
- const j = N.sessionID;
7094
+ const j = I.sessionID;
7095
7095
  if (!j) return;
7096
- const z = N.status?.type || "idle";
7096
+ const z = I.status?.type || "idle";
7097
7097
  l.value[j] = {
7098
7098
  thinking: z !== "idle",
7099
7099
  statusType: z,
@@ -7102,7 +7102,7 @@ function Md(e) {
7102
7102
  break;
7103
7103
  }
7104
7104
  case "message.updated": {
7105
- const j = N.info;
7105
+ const j = I.info;
7106
7106
  if (!j?.sessionID) return;
7107
7107
  const z = j.sessionID;
7108
7108
  if (j.role === "assistant") {
@@ -7119,7 +7119,7 @@ function Md(e) {
7119
7119
  break;
7120
7120
  }
7121
7121
  case "message.part.delta": {
7122
- const j = N.sessionID;
7122
+ const j = I.sessionID;
7123
7123
  if (!j) return;
7124
7124
  const z = l.value[j];
7125
7125
  z?.hasPending || (l.value[j] = {
@@ -7157,7 +7157,7 @@ function Md(e) {
7157
7157
  }
7158
7158
  function B(y) {
7159
7159
  return y.reduce(
7160
- ($, N) => ($[N] = A(N), $),
7160
+ ($, I) => ($[I] = A(I), $),
7161
7161
  {}
7162
7162
  );
7163
7163
  }
@@ -7182,7 +7182,7 @@ function Md(e) {
7182
7182
  };
7183
7183
  }
7184
7184
  function Pd(e) {
7185
- const { showNotification: t } = e, n = /* @__PURE__ */ L([]), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(null), i = /* @__PURE__ */ L(!1), l = q(() => o.value && n.value.find((p) => p.id === o.value)?.url || ""), r = async () => {
7185
+ const { showNotification: t } = e, n = /* @__PURE__ */ F([]), s = /* @__PURE__ */ F(void 0), o = /* @__PURE__ */ F(null), i = /* @__PURE__ */ F(!1), l = q(() => o.value && n.value.find((p) => p.id === o.value)?.url || ""), r = async () => {
7186
7186
  s.value = !0;
7187
7187
  try {
7188
7188
  const m = await (await fetch(hs)).json();
@@ -7244,7 +7244,7 @@ function Pd(e) {
7244
7244
  };
7245
7245
  }
7246
7246
  function kd(e, t) {
7247
- const n = /* @__PURE__ */ L(e), s = q(() => n.value === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.value), o = () => {
7247
+ const n = /* @__PURE__ */ F(e), s = q(() => n.value === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.value), o = () => {
7248
7248
  t.value?.sendMessageToIframe("OPENCODE_SET_THEME", {
7249
7249
  theme: s.value
7250
7250
  });
@@ -7266,7 +7266,7 @@ function kd(e, t) {
7266
7266
  };
7267
7267
  }
7268
7268
  function Dd() {
7269
- const e = /* @__PURE__ */ L([]);
7269
+ const e = /* @__PURE__ */ F([]);
7270
7270
  try {
7271
7271
  const o = sessionStorage.getItem("__opencode_selected_elements__");
7272
7272
  o && (e.value = JSON.parse(o));
@@ -7292,7 +7292,7 @@ function Dd() {
7292
7292
  };
7293
7293
  }
7294
7294
  function Rd() {
7295
- const e = /* @__PURE__ */ L(""), t = /* @__PURE__ */ L("idle"), n = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(void 0), i = q(() => e.value && Ka[e.value] || "加载中...");
7295
+ const e = /* @__PURE__ */ F(""), t = /* @__PURE__ */ F("idle"), n = /* @__PURE__ */ F(!1), s = /* @__PURE__ */ F(void 0), o = /* @__PURE__ */ F(void 0), i = q(() => e.value && Ka[e.value] || "加载中...");
7296
7296
  return {
7297
7297
  currentTask: e,
7298
7298
  serviceStatus: t,
@@ -7433,13 +7433,13 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7433
7433
  for (const [s, o] of t)
7434
7434
  n[s] = o;
7435
7435
  return n;
7436
- }, Yd = /* @__PURE__ */ Kd(Ud, [["__scopeId", "data-v-6b3ae44a"]]), Xd = /* @__PURE__ */ Ve({
7436
+ }, Yd = /* @__PURE__ */ Kd(Ud, [["__scopeId", "data-v-762c7194"]]), Xd = /* @__PURE__ */ Ve({
7437
7437
  __name: "App",
7438
7438
  props: {
7439
7439
  config: {}
7440
7440
  },
7441
7441
  setup(e) {
7442
- const t = e, n = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L(!0), i = /* @__PURE__ */ L(!1), l = /* @__PURE__ */ L(null), r = /* @__PURE__ */ L(!1), {
7442
+ const t = e, n = /* @__PURE__ */ F(!1), s = /* @__PURE__ */ F(!1), o = /* @__PURE__ */ F(!0), i = /* @__PURE__ */ F(!1), l = /* @__PURE__ */ F(null), r = /* @__PURE__ */ F(!1), {
7443
7443
  theme: a = "auto",
7444
7444
  open: f = !1,
7445
7445
  hotkey: c = "ctrl+k",
@@ -7447,17 +7447,17 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7447
7447
  proxyHost: p = "localhost",
7448
7448
  displayMode: m = "bubble",
7449
7449
  splitMode: C
7450
- } = t.config, _ = a, O = /* @__PURE__ */ L(C?.width ?? 500), R = q(() => `http://${p}:${d}`), A = (E, F) => {
7451
- l.value?.showNotification?.(E, F);
7450
+ } = t.config, _ = a, O = /* @__PURE__ */ F(C?.width ?? 500), R = q(() => `http://${p}:${d}`), A = (E, L) => {
7451
+ l.value?.showNotification?.(E, L);
7452
7452
  }, {
7453
7453
  serviceStatus: B,
7454
7454
  chromeMcpFailed: y,
7455
7455
  chromeMcpErrorType: $,
7456
- chromeMcpErrorMessage: N,
7456
+ chromeMcpErrorMessage: I,
7457
7457
  loadingText: j,
7458
7458
  updateStatusFromTask: z,
7459
7459
  setStarting: ce
7460
- } = Rd(), { selectedElements: fe, removeElement: _e, clearElements: Re } = Dd(), { theme: I, sendThemeToIframe: J } = kd(_, l), {
7460
+ } = Rd(), { selectedElements: fe, removeElement: _e, clearElements: Re } = Dd(), { theme: N, sendThemeToIframe: J } = kd(_, l), {
7461
7461
  sessions: se,
7462
7462
  loadingSessionList: G,
7463
7463
  currentSessionId: Oe,
@@ -7470,7 +7470,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7470
7470
  updateSessionInfo: dt
7471
7471
  } = Pd({ showNotification: A }), { updateContext: Fe } = Id(B, fe), qe = Od({
7472
7472
  onStatusSync: (E) => {
7473
- E.isStarted !== void 0 && E.isStarted && B.value === "idle" && ce(), E.task && z(E.task, E.errorType, E.errorMessage), B.value !== "idle" && ye();
7473
+ E.isStarted !== void 0 && E.isStarted && B.value === "idle" && ce(), E.task && z(E.task, E.errorType, E.errorMessage);
7474
7474
  },
7475
7475
  onTaskUpdate: (E) => {
7476
7476
  z(E.task, E.errorType, E.errorMessage);
@@ -7489,8 +7489,8 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7489
7489
  }), Et = Ue.hasAnyThinking, kt = Ue.sessionStates, ot = q(() => B.value === "starting"), tn = q(() => B.value === "starting" || Le.value), u = q(() => B.value === "starting" ? j.value : "加载会话..."), h = async () => {
7490
7490
  r.value = !0;
7491
7491
  try {
7492
- const F = await (await fetch("/__opencode_warmup__", { method: "POST" })).json();
7493
- F.success ? (y.value = !1, B.value = "ready", A("Chrome DevTools MCP 连接成功")) : F.errorType === "AI_TIMEOUT" ? A("AI 响应超时,请检查 OpenCode AI 模型配置") : F.errorType === "AI_RESPONSE_ERROR" ? A("AI 响应错误,请检查 OpenCode AI 模型配置") : F.errorType === "CHROME_NOT_CONNECTED" ? A("Chrome 远程调试未开启,请按照提示操作") : A(F.error || "重试失败,请确认 Chrome 远程调试已开启");
7492
+ const L = await (await fetch("/__opencode_warmup__", { method: "POST" })).json();
7493
+ L.success ? (y.value = !1, $.value = void 0, I.value = void 0, B.value = "ready", A("Chrome DevTools MCP 连接成功")) : ($.value = L.errorType, I.value = L.error, L.errorType === "AI_TIMEOUT" ? A("AI 响应超时,请检查 OpenCode AI 模型配置") : L.errorType === "AI_RESPONSE_ERROR" ? A("AI 响应错误,请检查 OpenCode AI 模型配置") : L.errorType === "CHROME_NOT_CONNECTED" ? A("Chrome 远程调试未开启,请按照提示操作") : A(L.error || "重试失败,请确认 Chrome 远程调试已开启"));
7494
7494
  } catch (E) {
7495
7495
  console.error("[OpenCode] Retry warmup failed:", E), A("重试失败,请稍后再试");
7496
7496
  } finally {
@@ -7509,35 +7509,35 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7509
7509
  E.preventDefault(), T(!n.value);
7510
7510
  }), qo("ctrl+p", (E) => {
7511
7511
  E.preventDefault(), window.__VUE_INSPECTOR__ ? s.value = !s.value : A("Vue Inspector 未加载,无法使用元素选择功能");
7512
- }), ze(B, (E, F) => {
7513
- E !== "idle" && F === "idle" && (qe.connect(), Ue.connect());
7512
+ }), ze(B, (E, L) => {
7513
+ E !== "idle" && L === "idle" && (qe.connect(), Ue.connect()), E === "ready" && L !== "ready" && ye();
7514
7514
  }), Xe(() => {
7515
7515
  B.value === "ready" && (ye(), qe.connect(), Ue.connect(), Fe(!0)), f && B.value === "ready" && setTimeout(() => {
7516
7516
  n.value = !0;
7517
7517
  }, 1e3);
7518
- const E = (F) => {
7519
- F.data?.type === "OPENCODE_READY" && J();
7518
+ const E = (L) => {
7519
+ L.data?.type === "OPENCODE_READY" && J();
7520
7520
  };
7521
7521
  window.addEventListener("message", E);
7522
7522
  });
7523
7523
  const T = async (E) => {
7524
7524
  if (B.value === "idle" && E) {
7525
7525
  i.value = !0;
7526
- const F = await g();
7527
- if (i.value = !1, !F) {
7526
+ const L = await g();
7527
+ if (i.value = !1, !L) {
7528
7528
  A("服务启动失败");
7529
7529
  return;
7530
7530
  }
7531
7531
  }
7532
7532
  n.value = E, E && Fe(), E && (Le.value = !1);
7533
7533
  }, b = (E) => {
7534
- const F = {
7534
+ const L = {
7535
7535
  ...E,
7536
7536
  previewPageUrl: window.location.href,
7537
7537
  previewPageTitle: document.title
7538
7538
  };
7539
7539
  l.value?.sendMessageToIframe("OPENCODE_INSERT_FILE_PART", {
7540
- element: F
7540
+ element: L
7541
7541
  }), A("节点已添加到对话框", { mode: "page" });
7542
7542
  }, S = () => {
7543
7543
  Re(), Fe(!0), A("已清除所有选中元素");
@@ -7546,7 +7546,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7546
7546
  }, k = (E) => {
7547
7547
  o.value = E;
7548
7548
  }, M = (E) => {
7549
- I.value = E;
7549
+ N.value = E;
7550
7550
  }, w = (E) => {
7551
7551
  O.value = E;
7552
7552
  }, W = ({ index: E }) => {
@@ -7554,10 +7554,10 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7554
7554
  }, D = () => {
7555
7555
  Le.value = !1;
7556
7556
  };
7557
- return (E, F) => (H(), ft(re(wd), {
7557
+ return (E, L) => (H(), ft(re(wd), {
7558
7558
  ref_key: "widgetRef",
7559
7559
  ref: l,
7560
- theme: re(I),
7560
+ theme: re(N),
7561
7561
  open: n.value,
7562
7562
  "select-mode": s.value,
7563
7563
  "session-list-collapsed": o.value,
@@ -7598,7 +7598,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
7598
7598
  key: 0,
7599
7599
  retrying: r.value,
7600
7600
  "error-type": re($),
7601
- "error-message": re(N),
7601
+ "error-message": re(I),
7602
7602
  onRetry: h
7603
7603
  }, null, 8, ["retrying", "error-type", "error-message"])) : be("", !0)
7604
7604
  ]),