vite-plugin-opencode-assistant 1.1.24 → 1.1.26

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
@@ -846,12 +846,12 @@ function va(e, t = !1, n = Zt) {
846
846
  }
847
847
  }
848
848
  function ga(e, t, n = me) {
849
- const { immediate: i, deep: o, once: r, scheduler: s, augmentJob: l, call: a } = n, c = (b) => o ? b : /* @__PURE__ */ it(b) || o === !1 || o === 0 ? kt(b, 1) : kt(b);
850
- let u, f, p, v, y = !1, g = !1;
851
- if (/* @__PURE__ */ ke(e) ? (f = () => e.value, y = /* @__PURE__ */ it(e)) : /* @__PURE__ */ on(e) ? (f = () => c(e), y = !0) : X(e) ? (g = !0, y = e.some((b) => /* @__PURE__ */ on(b) || /* @__PURE__ */ it(b)), f = () => e.map((b) => {
852
- if (/* @__PURE__ */ ke(b)) return b.value;
853
- if (/* @__PURE__ */ on(b)) return c(b);
854
- if (ce(b)) return a ? a(b, 2) : b();
849
+ const { immediate: i, deep: o, once: r, scheduler: s, augmentJob: l, call: a } = n, c = (w) => o ? w : /* @__PURE__ */ it(w) || o === !1 || o === 0 ? kt(w, 1) : kt(w);
850
+ let u, f, p, v, b = !1, m = !1;
851
+ if (/* @__PURE__ */ ke(e) ? (f = () => e.value, b = /* @__PURE__ */ it(e)) : /* @__PURE__ */ on(e) ? (f = () => c(e), b = !0) : X(e) ? (m = !0, b = e.some((w) => /* @__PURE__ */ on(w) || /* @__PURE__ */ it(w)), f = () => e.map((w) => {
852
+ if (/* @__PURE__ */ ke(w)) return w.value;
853
+ if (/* @__PURE__ */ on(w)) return c(w);
854
+ if (ce(w)) return a ? a(w, 2) : w();
855
855
  })) : ce(e) ? t ? f = a ? () => a(e, 2) : e : f = () => {
856
856
  if (p) {
857
857
  Lt();
@@ -861,40 +861,40 @@ function ga(e, t, n = me) {
861
861
  Dt();
862
862
  }
863
863
  }
864
- const b = Zt;
864
+ const w = Zt;
865
865
  Zt = u;
866
866
  try {
867
867
  return a ? a(e, 3, [v]) : e(v);
868
868
  } finally {
869
- Zt = b;
869
+ Zt = w;
870
870
  }
871
871
  } : f = Ut, t && o) {
872
- const b = f, z = o === !0 ? 1 / 0 : o;
873
- f = () => kt(b(), z);
872
+ const w = f, z = o === !0 ? 1 / 0 : o;
873
+ f = () => kt(w(), z);
874
874
  }
875
- const T = jl(), S = () => {
876
- u.stop(), T && T.active && Dr(T.effects, u);
875
+ const _ = jl(), S = () => {
876
+ u.stop(), _ && _.active && Dr(_.effects, u);
877
877
  };
878
878
  if (r && t) {
879
- const b = t;
879
+ const w = t;
880
880
  t = (...z) => {
881
- const G = b(...z);
881
+ const G = w(...z);
882
882
  return S(), G;
883
883
  };
884
884
  }
885
- let P = g ? new Array(e.length).fill(Zn) : Zn;
886
- const V = (b) => {
887
- if (!(!(u.flags & 1) || !u.dirty && !b))
885
+ let P = m ? new Array(e.length).fill(Zn) : Zn;
886
+ const V = (w) => {
887
+ if (!(!(u.flags & 1) || !u.dirty && !w))
888
888
  if (t) {
889
889
  const z = u.run();
890
- if (b || o || y || (g ? z.some((G, A) => Tt(G, P[A])) : Tt(z, P))) {
890
+ if (w || o || b || (m ? z.some((G, A) => Tt(G, P[A])) : Tt(z, P))) {
891
891
  p && p();
892
892
  const G = Zt;
893
893
  Zt = u;
894
894
  try {
895
895
  const A = [
896
896
  z,
897
- P === Zn ? void 0 : g && P[0] === Zn ? [] : P,
897
+ P === Zn ? void 0 : m && P[0] === Zn ? [] : P,
898
898
  v
899
899
  ];
900
900
  P = z, a ? a(t, 3, A) : t(...A);
@@ -904,11 +904,11 @@ function ga(e, t, n = me) {
904
904
  }
905
905
  } else u.run();
906
906
  };
907
- return l && l(V), u = new Kr(f), u.scheduler = s ? () => s(V, !1) : V, v = (b) => va(b, !1, u), p = u.onStop = () => {
908
- const b = li.get(u);
909
- if (b) {
910
- if (a) a(b, 4);
911
- else for (const z of b) z();
907
+ return l && l(V), u = new Kr(f), u.scheduler = s ? () => s(V, !1) : V, v = (w) => va(w, !1, u), p = u.onStop = () => {
908
+ const w = li.get(u);
909
+ if (w) {
910
+ if (a) a(w, 4);
911
+ else for (const z of w) z();
912
912
  li.delete(u);
913
913
  }
914
914
  }, t ? i ? V(!0) : P = u.run() : s ? s(V.bind(null, !0), !0) : u.run(), S.pause = u.pause.bind(u), S.resume = u.resume.bind(u), S.stop = S, S;
@@ -1127,12 +1127,12 @@ function wa(e, t, n = me) {
1127
1127
  }
1128
1128
  }
1129
1129
  const u = tt;
1130
- l.call = (v, y, g) => Ct(v, u, y, g);
1130
+ l.call = (v, b, m) => Ct(v, u, b, m);
1131
1131
  let f = !1;
1132
1132
  r === "post" ? l.scheduler = (v) => {
1133
1133
  He(v, u && u.suspense);
1134
- } : r !== "sync" && (f = !0, l.scheduler = (v, y) => {
1135
- y ? v() : So(v);
1134
+ } : r !== "sync" && (f = !0, l.scheduler = (v, b) => {
1135
+ b ? v() : So(v);
1136
1136
  }), l.augmentJob = (v) => {
1137
1137
  t && (v.flags |= 4), f && (v.flags |= 2, u && (v.id = u.uid, v.i = u));
1138
1138
  };
@@ -1146,19 +1146,19 @@ var Ht = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ Symbol("_vte"), Ea
1146
1146
  name: "Teleport",
1147
1147
  __isTeleport: !0,
1148
1148
  process(e, t, n, i, o, r, s, l, a, c) {
1149
- const { mc: u, pc: f, pbc: p, o: { insert: v, querySelector: y, createText: g, createComment: T, parentNode: S } } = c, P = en(t.props);
1149
+ const { mc: u, pc: f, pbc: p, o: { insert: v, querySelector: b, createText: m, createComment: _, parentNode: S } } = c, P = en(t.props);
1150
1150
  let { dynamicChildren: V } = t;
1151
- const b = (A, W, F) => {
1151
+ const w = (A, W, F) => {
1152
1152
  A.shapeFlag & 16 && u(A.children, W, F, o, r, s, l, a);
1153
1153
  }, z = (A = t) => {
1154
- const W = en(A.props), F = A.target = oo(A.props, y), Q = ro(F, A, g, v);
1155
- F && (s !== "svg" && Bo(F) ? s = "svg" : s !== "mathml" && jo(F) && (s = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(F), W || (b(A, F, Q), Pn(A, !1)));
1154
+ const W = en(A.props), F = A.target = oo(A.props, b), Q = ro(F, A, m, v);
1155
+ F && (s !== "svg" && Bo(F) ? s = "svg" : s !== "mathml" && jo(F) && (s = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(F), W || (w(A, F, Q), Pn(A, !1)));
1156
1156
  }, G = (A) => {
1157
1157
  const W = () => {
1158
1158
  if (Ht.get(A) === W) {
1159
1159
  if (Ht.delete(A), en(A.props)) {
1160
1160
  const F = S(A.el) || n;
1161
- b(A, F, A.anchor), Pn(A, !0);
1161
+ w(A, F, A.anchor), Pn(A, !0);
1162
1162
  }
1163
1163
  z(A);
1164
1164
  }
@@ -1166,12 +1166,12 @@ var Ht = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ Symbol("_vte"), Ea
1166
1166
  Ht.set(A, W), He(W, r);
1167
1167
  };
1168
1168
  if (e == null) {
1169
- const A = t.el = g(""), W = t.anchor = g("");
1169
+ const A = t.el = m(""), W = t.anchor = m("");
1170
1170
  if (v(A, n, i), v(W, n, i), Ta(t.props) || r && r.pendingBranch) {
1171
1171
  G(t);
1172
1172
  return;
1173
1173
  }
1174
- P && (b(t, n, W), Pn(t, !0)), z();
1174
+ P && (w(t, n, W), Pn(t, !0)), z();
1175
1175
  } else {
1176
1176
  t.el = e.el;
1177
1177
  const A = t.anchor = e.anchor, W = Ht.get(e);
@@ -1184,17 +1184,17 @@ var Ht = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ Symbol("_vte"), Ea
1184
1184
  if (s === "svg" || Bo(F) ? s = "svg" : (s === "mathml" || jo(F)) && (s = "mathml"), V ? (p(e.dynamicChildren, V, We, o, r, s, l), Co(e, t, !0)) : a || f(e, t, We, N, o, r, s, l, !1), P)
1185
1185
  J ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : Qn(t, n, A, c, 1);
1186
1186
  else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
1187
- const U = oo(t.props, y);
1187
+ const U = oo(t.props, b);
1188
1188
  U && (t.target = U, Qn(t, U, null, c, 0));
1189
1189
  } else J && Qn(t, F, Q, c, 1);
1190
1190
  Pn(t, P);
1191
1191
  }
1192
1192
  },
1193
1193
  remove(e, t, n, { um: i, o: { remove: o } }, r) {
1194
- const { shapeFlag: s, children: l, anchor: a, targetStart: c, targetAnchor: u, target: f, props: p } = e, v = en(p), y = r || !v, g = Ht.get(e);
1195
- if (g && (g.flags |= 8, Ht.delete(e)), f && (o(c), o(u)), r && o(a), !g && (v || f) && s & 16) for (let T = 0; T < l.length; T++) {
1196
- const S = l[T];
1197
- i(S, t, n, y, !!S.dynamicChildren);
1194
+ const { shapeFlag: s, children: l, anchor: a, targetStart: c, targetAnchor: u, target: f, props: p } = e, v = en(p), b = r || !v, m = Ht.get(e);
1195
+ if (m && (m.flags |= 8, Ht.delete(e)), f && (o(c), o(u)), r && o(a), !m && (v || f) && s & 16) for (let _ = 0; _ < l.length; _++) {
1196
+ const S = l[_];
1197
+ i(S, t, n, b, !!S.dynamicChildren);
1198
1198
  }
1199
1199
  },
1200
1200
  move: Qn,
@@ -1208,27 +1208,27 @@ function Qn(e, t, n, { o: { insert: i }, m: o }, r = 2) {
1208
1208
  f && i(l, t, n);
1209
1209
  }
1210
1210
  function xa(e, t, n, i, o, r, { o: { nextSibling: s, parentNode: l, querySelector: a, insert: c, createText: u } }, f) {
1211
- function p(T, S) {
1211
+ function p(_, S) {
1212
1212
  let P = S;
1213
1213
  for (; P; ) {
1214
1214
  if (P && P.nodeType === 8) {
1215
1215
  if (P.data === "teleport start anchor") t.targetStart = P;
1216
1216
  else if (P.data === "teleport anchor") {
1217
- t.targetAnchor = P, T._lpa = t.targetAnchor && s(t.targetAnchor);
1217
+ t.targetAnchor = P, _._lpa = t.targetAnchor && s(t.targetAnchor);
1218
1218
  break;
1219
1219
  }
1220
1220
  }
1221
1221
  P = s(P);
1222
1222
  }
1223
1223
  }
1224
- function v(T, S) {
1225
- S.anchor = f(s(T), S, l(T), n, i, o, r);
1224
+ function v(_, S) {
1225
+ S.anchor = f(s(_), S, l(_), n, i, o, r);
1226
1226
  }
1227
- const y = t.target = oo(t.props, a), g = en(t.props);
1228
- if (y) {
1229
- const T = y._lpa || y.firstChild;
1230
- t.shapeFlag & 16 && (g ? (v(e, t), p(y, T), t.targetAnchor || ro(y, t, u, c, l(e) === y ? e : null)) : (t.anchor = s(e), p(y, T), t.targetAnchor || ro(y, t, u, c), f(T && s(T), t, y, n, i, o, r))), Pn(t, g);
1231
- } else g && t.shapeFlag & 16 && (v(e, t), t.targetStart = e, t.targetAnchor = s(e));
1227
+ const b = t.target = oo(t.props, a), m = en(t.props);
1228
+ if (b) {
1229
+ const _ = b._lpa || b.firstChild;
1230
+ t.shapeFlag & 16 && (m ? (v(e, t), p(b, _), t.targetAnchor || ro(b, t, u, c, l(e) === b ? e : null)) : (t.anchor = s(e), p(b, _), t.targetAnchor || ro(b, t, u, c), f(_ && s(_), t, b, n, i, o, r))), Pn(t, m);
1231
+ } else m && t.shapeFlag & 16 && (v(e, t), t.targetStart = e, t.targetAnchor = s(e));
1232
1232
  return t.anchor && s(t.anchor);
1233
1233
  }
1234
1234
  var ms = Ca;
@@ -1271,20 +1271,20 @@ function Wo(e, t) {
1271
1271
  var ui = /* @__PURE__ */ new WeakMap();
1272
1272
  function kn(e, t, n, i, o = !1) {
1273
1273
  if (X(e)) {
1274
- e.forEach((g, T) => kn(g, t && (X(t) ? t[T] : t), n, i, o));
1274
+ e.forEach((m, _) => kn(m, t && (X(t) ? t[_] : t), n, i, o));
1275
1275
  return;
1276
1276
  }
1277
1277
  if (fn(i) && !o) {
1278
1278
  i.shapeFlag & 512 && i.type.__asyncResolved && i.component.subTree.component && kn(e, t, n, i.component.subTree);
1279
1279
  return;
1280
1280
  }
1281
- const r = i.shapeFlag & 4 ? ki(i.component) : i.el, s = o ? null : r, { i: l, r: a } = e, c = t && t.r, u = l.refs === me ? l.refs = {} : l.refs, f = l.setupState, p = /* @__PURE__ */ oe(f), v = f === me ? Lr : (g) => Wo(u, g) ? !1 : ue(p, g), y = (g, T) => !(T && Wo(u, T));
1281
+ const r = i.shapeFlag & 4 ? ki(i.component) : i.el, s = o ? null : r, { i: l, r: a } = e, c = t && t.r, u = l.refs === me ? l.refs = {} : l.refs, f = l.setupState, p = /* @__PURE__ */ oe(f), v = f === me ? Lr : (m) => Wo(u, m) ? !1 : ue(p, m), b = (m, _) => !(_ && Wo(u, _));
1282
1282
  if (c != null && c !== a) {
1283
1283
  if (Vo(t), Ee(c))
1284
1284
  u[c] = null, v(c) && (f[c] = null);
1285
1285
  else if (/* @__PURE__ */ ke(c)) {
1286
- const g = t;
1287
- y(c, g.k) && (c.value = null), g.k && (u[g.k] = null);
1286
+ const m = t;
1287
+ b(c, m.k) && (c.value = null), m.k && (u[m.k] = null);
1288
1288
  }
1289
1289
  }
1290
1290
  if (ce(a)) {
@@ -1295,20 +1295,20 @@ function kn(e, t, n, i, o = !1) {
1295
1295
  Dt();
1296
1296
  }
1297
1297
  } else {
1298
- const g = Ee(a), T = /* @__PURE__ */ ke(a);
1299
- if (g || T) {
1298
+ const m = Ee(a), _ = /* @__PURE__ */ ke(a);
1299
+ if (m || _) {
1300
1300
  const S = () => {
1301
1301
  if (e.f) {
1302
- const P = g ? v(a) ? f[a] : u[a] : y(a) || !e.k ? a.value : u[e.k];
1302
+ const P = m ? v(a) ? f[a] : u[a] : b(a) || !e.k ? a.value : u[e.k];
1303
1303
  if (o) X(P) && Dr(P, r);
1304
1304
  else if (X(P)) P.includes(r) || P.push(r);
1305
- else if (g)
1305
+ else if (m)
1306
1306
  u[a] = [r], v(a) && (f[a] = u[a]);
1307
1307
  else {
1308
1308
  const V = [r];
1309
- y(a, e.k) && (a.value = V), e.k && (u[e.k] = V);
1309
+ b(a, e.k) && (a.value = V), e.k && (u[e.k] = V);
1310
1310
  }
1311
- } else g ? (u[a] = s, v(a) && (f[a] = s)) : T && (y(a, e.k) && (a.value = s), e.k && (u[e.k] = s));
1311
+ } else m ? (u[a] = s, v(a) && (f[a] = s)) : _ && (b(a, e.k) && (a.value = s), e.k && (u[e.k] = s));
1312
1312
  };
1313
1313
  if (s) {
1314
1314
  const P = () => {
@@ -1564,29 +1564,29 @@ function Ii(e, t) {
1564
1564
  return !e || !bi(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), ue(e, t[0].toLowerCase() + t.slice(1)) || ue(e, rn(t)) || ue(e, t));
1565
1565
  }
1566
1566
  function Hi(e) {
1567
- const { type: t, vnode: n, proxy: i, withProxy: o, propsOptions: [r], slots: s, attrs: l, emit: a, render: c, renderCache: u, props: f, data: p, setupState: v, ctx: y, inheritAttrs: g } = e, T = ci(e);
1567
+ const { type: t, vnode: n, proxy: i, withProxy: o, propsOptions: [r], slots: s, attrs: l, emit: a, render: c, renderCache: u, props: f, data: p, setupState: v, ctx: b, inheritAttrs: m } = e, _ = ci(e);
1568
1568
  let S, P;
1569
1569
  try {
1570
1570
  if (n.shapeFlag & 4) {
1571
- const b = o || i, z = b;
1572
- S = Et(c.call(z, b, u, f, v, p, y)), P = l;
1571
+ const w = o || i, z = w;
1572
+ S = Et(c.call(z, w, u, f, v, p, b)), P = l;
1573
1573
  } else {
1574
- const b = t;
1575
- S = Et(b.length > 1 ? b(f, {
1574
+ const w = t;
1575
+ S = Et(w.length > 1 ? w(f, {
1576
1576
  attrs: l,
1577
1577
  slots: s,
1578
1578
  emit: a
1579
- }) : b(f, null)), P = t.props ? l : ja(l);
1579
+ }) : w(f, null)), P = t.props ? l : ja(l);
1580
1580
  }
1581
- } catch (b) {
1582
- Dn.length = 0, Pi(b, e, 1), S = Pe(Ft);
1581
+ } catch (w) {
1582
+ Dn.length = 0, Pi(w, e, 1), S = Pe(Ft);
1583
1583
  }
1584
1584
  let V = S;
1585
- if (P && g !== !1) {
1586
- const b = Object.keys(P), { shapeFlag: z } = V;
1587
- b.length && z & 7 && (r && b.some(Si) && (P = Wa(P, r)), V = vn(V, P, !1, !0));
1585
+ if (P && m !== !1) {
1586
+ const w = Object.keys(P), { shapeFlag: z } = V;
1587
+ w.length && z & 7 && (r && w.some(Si) && (P = Wa(P, r)), V = vn(V, P, !1, !0));
1588
1588
  }
1589
- return n.dirs && (V = vn(V, null, !1, !0), V.dirs = V.dirs ? V.dirs.concat(n.dirs) : n.dirs), n.transition && wo(V, n.transition), S = V, ci(T), S;
1589
+ return n.dirs && (V = vn(V, null, !1, !0), V.dirs = V.dirs ? V.dirs.concat(n.dirs) : n.dirs), n.transition && wo(V, n.transition), S = V, ci(_), S;
1590
1590
  }
1591
1591
  var ja = (e) => {
1592
1592
  let t;
@@ -1657,8 +1657,8 @@ function Ua(e, t, n, i) {
1657
1657
  if (a) if (ue(r, p))
1658
1658
  v !== r[p] && (r[p] = v, c = !0);
1659
1659
  else {
1660
- const y = ht(p);
1661
- o[y] = lo(a, l, y, v, e, !1);
1660
+ const b = ht(p);
1661
+ o[b] = lo(a, l, b, v, e, !1);
1662
1662
  }
1663
1663
  else v !== r[p] && (r[p] = v, c = !0);
1664
1664
  }
@@ -1724,16 +1724,16 @@ function qa(e, t, n = !1) {
1724
1724
  const u = ht(c);
1725
1725
  if (zo(u)) {
1726
1726
  const f = r[c], p = s[u] = X(f) || ce(f) ? { type: f } : ot({}, f), v = p.type;
1727
- let y = !1, g = !0;
1728
- if (X(v)) for (let T = 0; T < v.length; ++T) {
1729
- const S = v[T], P = ce(S) && S.name;
1727
+ let b = !1, m = !0;
1728
+ if (X(v)) for (let _ = 0; _ < v.length; ++_) {
1729
+ const S = v[_], P = ce(S) && S.name;
1730
1730
  if (P === "Boolean") {
1731
- y = !0;
1731
+ b = !0;
1732
1732
  break;
1733
- } else P === "String" && (g = !1);
1733
+ } else P === "String" && (m = !1);
1734
1734
  }
1735
- else y = ce(v) && v.name === "Boolean";
1736
- p[0] = y, p[1] = g, (y || ue(p, "default")) && l.push(u);
1735
+ else b = ce(v) && v.name === "Boolean";
1736
+ p[0] = b, p[1] = m, (b || ue(p, "default")) && l.push(u);
1737
1737
  }
1738
1738
  }
1739
1739
  const a = [s, l];
@@ -1784,143 +1784,143 @@ function Xa(e) {
1784
1784
  function Ja(e, t) {
1785
1785
  const n = Ci();
1786
1786
  n.__VUE__ = !0;
1787
- const { insert: i, remove: o, patchProp: r, createElement: s, createText: l, createComment: a, setText: c, setElementText: u, parentNode: f, nextSibling: p, setScopeId: v = Ut, insertStaticContent: y } = e, g = (d, h, m, O = null, E = null, w = null, k = void 0, R = null, I = !!h.dynamicChildren) => {
1787
+ const { insert: i, remove: o, patchProp: r, createElement: s, createText: l, createComment: a, setText: c, setElementText: u, parentNode: f, nextSibling: p, setScopeId: v = Ut, insertStaticContent: b } = e, m = (d, h, g, O = null, T = null, E = null, k = void 0, R = null, I = !!h.dynamicChildren) => {
1788
1788
  if (d === h) return;
1789
- d && !Cn(d, h) && (O = st(d), Le(d, E, w, !0), d = null), h.patchFlag === -2 && (I = !1, h.dynamicChildren = null);
1789
+ d && !Cn(d, h) && (O = st(d), Le(d, T, E, !0), d = null), h.patchFlag === -2 && (I = !1, h.dynamicChildren = null);
1790
1790
  const { type: x, ref: H, shapeFlag: $ } = h;
1791
1791
  switch (x) {
1792
1792
  case Ai:
1793
- T(d, h, m, O);
1793
+ _(d, h, g, O);
1794
1794
  break;
1795
1795
  case Ft:
1796
- S(d, h, m, O);
1796
+ S(d, h, g, O);
1797
1797
  break;
1798
1798
  case Ln:
1799
- d == null && P(h, m, O, k);
1799
+ d == null && P(h, g, O, k);
1800
1800
  break;
1801
1801
  case fe:
1802
- We(d, h, m, O, E, w, k, R, I);
1802
+ We(d, h, g, O, T, E, k, R, I);
1803
1803
  break;
1804
1804
  default:
1805
- $ & 1 ? z(d, h, m, O, E, w, k, R, I) : $ & 6 ? N(d, h, m, O, E, w, k, R, I) : ($ & 64 || $ & 128) && x.process(d, h, m, O, E, w, k, R, I, ye);
1805
+ $ & 1 ? z(d, h, g, O, T, E, k, R, I) : $ & 6 ? N(d, h, g, O, T, E, k, R, I) : ($ & 64 || $ & 128) && x.process(d, h, g, O, T, E, k, R, I, ye);
1806
1806
  }
1807
- H != null && E ? kn(H, d && d.ref, w, h || d, !h) : H == null && d && d.ref != null && kn(d.ref, null, w, d, !0);
1808
- }, T = (d, h, m, O) => {
1809
- if (d == null) i(h.el = l(h.children), m, O);
1807
+ H != null && T ? kn(H, d && d.ref, E, h || d, !h) : H == null && d && d.ref != null && kn(d.ref, null, E, d, !0);
1808
+ }, _ = (d, h, g, O) => {
1809
+ if (d == null) i(h.el = l(h.children), g, O);
1810
1810
  else {
1811
- const E = h.el = d.el;
1812
- h.children !== d.children && c(E, h.children);
1811
+ const T = h.el = d.el;
1812
+ h.children !== d.children && c(T, h.children);
1813
1813
  }
1814
- }, S = (d, h, m, O) => {
1815
- d == null ? i(h.el = a(h.children || ""), m, O) : h.el = d.el;
1816
- }, P = (d, h, m, O) => {
1817
- [d.el, d.anchor] = y(d.children, h, m, O, d.el, d.anchor);
1818
- }, V = ({ el: d, anchor: h }, m, O) => {
1819
- let E;
1814
+ }, S = (d, h, g, O) => {
1815
+ d == null ? i(h.el = a(h.children || ""), g, O) : h.el = d.el;
1816
+ }, P = (d, h, g, O) => {
1817
+ [d.el, d.anchor] = b(d.children, h, g, O, d.el, d.anchor);
1818
+ }, V = ({ el: d, anchor: h }, g, O) => {
1819
+ let T;
1820
1820
  for (; d && d !== h; )
1821
- E = p(d), i(d, m, O), d = E;
1822
- i(h, m, O);
1823
- }, b = ({ el: d, anchor: h }) => {
1824
- let m;
1821
+ T = p(d), i(d, g, O), d = T;
1822
+ i(h, g, O);
1823
+ }, w = ({ el: d, anchor: h }) => {
1824
+ let g;
1825
1825
  for (; d && d !== h; )
1826
- m = p(d), o(d), d = m;
1826
+ g = p(d), o(d), d = g;
1827
1827
  o(h);
1828
- }, z = (d, h, m, O, E, w, k, R, I) => {
1829
- if (h.type === "svg" ? k = "svg" : h.type === "math" && (k = "mathml"), d == null) G(h, m, O, E, w, k, R, I);
1828
+ }, z = (d, h, g, O, T, E, k, R, I) => {
1829
+ if (h.type === "svg" ? k = "svg" : h.type === "math" && (k = "mathml"), d == null) G(h, g, O, T, E, k, R, I);
1830
1830
  else {
1831
1831
  const x = d.el && d.el._isVueCE ? d.el : null;
1832
1832
  try {
1833
- x && x._beginPatch(), F(d, h, E, w, k, R, I);
1833
+ x && x._beginPatch(), F(d, h, T, E, k, R, I);
1834
1834
  } finally {
1835
1835
  x && x._endPatch();
1836
1836
  }
1837
1837
  }
1838
- }, G = (d, h, m, O, E, w, k, R) => {
1838
+ }, G = (d, h, g, O, T, E, k, R) => {
1839
1839
  let I, x;
1840
1840
  const { props: H, shapeFlag: $, transition: B, dirs: K } = d;
1841
- if (I = d.el = s(d.type, w, H && H.is, H), $ & 8 ? u(I, d.children) : $ & 16 && W(d.children, I, null, O, E, zi(d, w), k, R), K && Xt(d, null, O, "created"), A(I, d, d.scopeId, k, O), H) {
1842
- for (const re in H) re !== "value" && !In(re) && r(I, re, null, H[re], w, O);
1843
- "value" in H && r(I, "value", null, H.value, w), (x = H.onVnodeBeforeMount) && yt(x, O, d);
1841
+ if (I = d.el = s(d.type, E, H && H.is, H), $ & 8 ? u(I, d.children) : $ & 16 && W(d.children, I, null, O, T, zi(d, E), k, R), K && Xt(d, null, O, "created"), A(I, d, d.scopeId, k, O), H) {
1842
+ for (const re in H) re !== "value" && !In(re) && r(I, re, null, H[re], E, O);
1843
+ "value" in H && r(I, "value", null, H.value, E), (x = H.onVnodeBeforeMount) && yt(x, O, d);
1844
1844
  }
1845
1845
  K && Xt(d, null, O, "beforeMount");
1846
- const Z = Za(E, B);
1847
- Z && B.beforeEnter(I), i(I, h, m), ((x = H && H.onVnodeMounted) || Z || K) && He(() => {
1846
+ const Z = Za(T, B);
1847
+ Z && B.beforeEnter(I), i(I, h, g), ((x = H && H.onVnodeMounted) || Z || K) && He(() => {
1848
1848
  x && yt(x, O, d), Z && B.enter(I), K && Xt(d, null, O, "mounted");
1849
- }, E);
1850
- }, A = (d, h, m, O, E) => {
1851
- if (m && v(d, m), O) for (let w = 0; w < O.length; w++) v(d, O[w]);
1852
- if (E) {
1853
- let w = E.subTree;
1854
- if (h === w || As(w.type) && (w.ssContent === h || w.ssFallback === h)) {
1855
- const k = E.vnode;
1856
- A(d, k, k.scopeId, k.slotScopeIds, E.parent);
1849
+ }, T);
1850
+ }, A = (d, h, g, O, T) => {
1851
+ if (g && v(d, g), O) for (let E = 0; E < O.length; E++) v(d, O[E]);
1852
+ if (T) {
1853
+ let E = T.subTree;
1854
+ if (h === E || As(E.type) && (E.ssContent === h || E.ssFallback === h)) {
1855
+ const k = T.vnode;
1856
+ A(d, k, k.scopeId, k.slotScopeIds, T.parent);
1857
1857
  }
1858
1858
  }
1859
- }, W = (d, h, m, O, E, w, k, R, I = 0) => {
1859
+ }, W = (d, h, g, O, T, E, k, R, I = 0) => {
1860
1860
  for (let x = I; x < d.length; x++) {
1861
1861
  const H = d[x] = R ? At(d[x]) : Et(d[x]);
1862
- g(null, H, h, m, O, E, w, k, R);
1862
+ m(null, H, h, g, O, T, E, k, R);
1863
1863
  }
1864
- }, F = (d, h, m, O, E, w, k) => {
1864
+ }, F = (d, h, g, O, T, E, k) => {
1865
1865
  const R = h.el = d.el;
1866
1866
  let { patchFlag: I, dynamicChildren: x, dirs: H } = h;
1867
1867
  I |= d.patchFlag & 16;
1868
1868
  const $ = d.props || me, B = h.props || me;
1869
1869
  let K;
1870
- if (m && Jt(m, !1), (K = B.onVnodeBeforeUpdate) && yt(K, m, h, d), H && Xt(h, d, m, "beforeUpdate"), m && Jt(m, !0), x && (!d.dynamicChildren || d.dynamicChildren.length !== x.length) && (I = 0, k = !1, x = null), ($.innerHTML && B.innerHTML == null || $.textContent && B.textContent == null) && u(R, ""), x ? Q(d.dynamicChildren, x, R, m, O, zi(h, E), w) : k || Ae(d, h, R, null, m, O, zi(h, E), w, !1), I > 0) {
1871
- if (I & 16) J(R, $, B, m, E);
1872
- else if (I & 2 && $.class !== B.class && r(R, "class", null, B.class, E), I & 4 && r(R, "style", $.style, B.style, E), I & 8) {
1870
+ if (g && Jt(g, !1), (K = B.onVnodeBeforeUpdate) && yt(K, g, h, d), H && Xt(h, d, g, "beforeUpdate"), g && Jt(g, !0), x && (!d.dynamicChildren || d.dynamicChildren.length !== x.length) && (I = 0, k = !1, x = null), ($.innerHTML && B.innerHTML == null || $.textContent && B.textContent == null) && u(R, ""), x ? Q(d.dynamicChildren, x, R, g, O, zi(h, T), E) : k || Ae(d, h, R, null, g, O, zi(h, T), E, !1), I > 0) {
1871
+ if (I & 16) J(R, $, B, g, T);
1872
+ else if (I & 2 && $.class !== B.class && r(R, "class", null, B.class, T), I & 4 && r(R, "style", $.style, B.style, T), I & 8) {
1873
1873
  const Z = h.dynamicProps;
1874
1874
  for (let re = 0; re < Z.length; re++) {
1875
1875
  const se = Z[re], he = $[se], pe = B[se];
1876
- (pe !== he || se === "value") && r(R, se, he, pe, E, m);
1876
+ (pe !== he || se === "value") && r(R, se, he, pe, T, g);
1877
1877
  }
1878
1878
  }
1879
1879
  I & 1 && d.children !== h.children && u(R, h.children);
1880
- } else !k && x == null && J(R, $, B, m, E);
1880
+ } else !k && x == null && J(R, $, B, g, T);
1881
1881
  ((K = B.onVnodeUpdated) || H) && He(() => {
1882
- K && yt(K, m, h, d), H && Xt(h, d, m, "updated");
1882
+ K && yt(K, g, h, d), H && Xt(h, d, g, "updated");
1883
1883
  }, O);
1884
- }, Q = (d, h, m, O, E, w, k) => {
1884
+ }, Q = (d, h, g, O, T, E, k) => {
1885
1885
  for (let R = 0; R < h.length; R++) {
1886
- const I = d[R], x = h[R], H = I.el && (I.type === fe || !Cn(I, x) || I.shapeFlag & 198) ? f(I.el) : m;
1887
- g(I, x, H, null, O, E, w, k, !0);
1886
+ const I = d[R], x = h[R], H = I.el && (I.type === fe || !Cn(I, x) || I.shapeFlag & 198) ? f(I.el) : g;
1887
+ m(I, x, H, null, O, T, E, k, !0);
1888
1888
  }
1889
- }, J = (d, h, m, O, E) => {
1890
- if (h !== m) {
1889
+ }, J = (d, h, g, O, T) => {
1890
+ if (h !== g) {
1891
1891
  if (h !== me)
1892
- for (const w in h) !In(w) && !(w in m) && r(d, w, h[w], null, E, O);
1893
- for (const w in m) {
1894
- if (In(w)) continue;
1895
- const k = m[w], R = h[w];
1896
- k !== R && w !== "value" && r(d, w, R, k, E, O);
1892
+ for (const E in h) !In(E) && !(E in g) && r(d, E, h[E], null, T, O);
1893
+ for (const E in g) {
1894
+ if (In(E)) continue;
1895
+ const k = g[E], R = h[E];
1896
+ k !== R && E !== "value" && r(d, E, R, k, T, O);
1897
1897
  }
1898
- "value" in m && r(d, "value", h.value, m.value, E);
1898
+ "value" in g && r(d, "value", h.value, g.value, T);
1899
1899
  }
1900
- }, We = (d, h, m, O, E, w, k, R, I) => {
1900
+ }, We = (d, h, g, O, T, E, k, R, I) => {
1901
1901
  const x = h.el = d ? d.el : l(""), H = h.anchor = d ? d.anchor : l("");
1902
1902
  let { patchFlag: $, dynamicChildren: B, slotScopeIds: K } = h;
1903
- K && (R = R ? R.concat(K) : K), d == null ? (i(x, m, O), i(H, m, O), W(h.children || [], m, H, E, w, k, R, I)) : $ > 0 && $ & 64 && B && d.dynamicChildren && d.dynamicChildren.length === B.length ? (Q(d.dynamicChildren, B, m, E, w, k, R), (h.key != null || E && h === E.subTree) && Co(d, h, !0)) : Ae(d, h, m, H, E, w, k, R, I);
1904
- }, N = (d, h, m, O, E, w, k, R, I) => {
1905
- h.slotScopeIds = R, d == null ? h.shapeFlag & 512 ? E.ctx.activate(h, m, O, k, I) : U(h, m, O, E, w, k, I) : ie(d, h, I);
1906
- }, U = (d, h, m, O, E, w, k) => {
1907
- const R = d.component = lc(d, O, E);
1903
+ K && (R = R ? R.concat(K) : K), d == null ? (i(x, g, O), i(H, g, O), W(h.children || [], g, H, T, E, k, R, I)) : $ > 0 && $ & 64 && B && d.dynamicChildren && d.dynamicChildren.length === B.length ? (Q(d.dynamicChildren, B, g, T, E, k, R), (h.key != null || T && h === T.subTree) && Co(d, h, !0)) : Ae(d, h, g, H, T, E, k, R, I);
1904
+ }, N = (d, h, g, O, T, E, k, R, I) => {
1905
+ h.slotScopeIds = R, d == null ? h.shapeFlag & 512 ? T.ctx.activate(h, g, O, k, I) : U(h, g, O, T, E, k, I) : ie(d, h, I);
1906
+ }, U = (d, h, g, O, T, E, k) => {
1907
+ const R = d.component = lc(d, O, T);
1908
1908
  if (Ma(d) && (R.ctx.renderer = ye), ac(R, !1, k), R.asyncDep) {
1909
- if (E && E.registerDep(R, Y, k), !d.el) {
1909
+ if (T && T.registerDep(R, Y, k), !d.el) {
1910
1910
  const I = R.subTree = Pe(Ft);
1911
- S(null, I, h, m), d.placeholder = I.el;
1911
+ S(null, I, h, g), d.placeholder = I.el;
1912
1912
  }
1913
- } else Y(R, d, h, m, E, w, k);
1914
- }, ie = (d, h, m) => {
1913
+ } else Y(R, d, h, g, T, E, k);
1914
+ }, ie = (d, h, g) => {
1915
1915
  const O = h.component = d.component;
1916
- if (Va(d, h, m)) if (O.asyncDep && !O.asyncResolved) {
1917
- ee(O, h, m);
1916
+ if (Va(d, h, g)) if (O.asyncDep && !O.asyncResolved) {
1917
+ ee(O, h, g);
1918
1918
  return;
1919
1919
  } else
1920
1920
  O.next = h, O.update();
1921
1921
  else
1922
1922
  h.el = d.el, O.vnode = h;
1923
- }, Y = (d, h, m, O, E, w, k) => {
1923
+ }, Y = (d, h, g, O, T, E, k) => {
1924
1924
  const R = () => {
1925
1925
  if (d.isMounted) {
1926
1926
  let { next: $, bu: B, u: K, parent: Z, vnode: re } = d;
@@ -1930,7 +1930,7 @@ function Ja(e, t) {
1930
1930
  $ && ($.el = re.el, ee(d, $, k)), Re.asyncDep.then(() => {
1931
1931
  He(() => {
1932
1932
  d.isUnmounted || x();
1933
- }, E);
1933
+ }, T);
1934
1934
  });
1935
1935
  return;
1936
1936
  }
@@ -1938,25 +1938,25 @@ function Ja(e, t) {
1938
1938
  let se = $, he;
1939
1939
  Jt(d, !1), $ ? ($.el = re.el, ee(d, $, k)) : $ = re, B && oi(B), (he = $.props && $.props.onVnodeBeforeUpdate) && yt(he, Z, $, re), Jt(d, !0);
1940
1940
  const pe = Hi(d), Te = d.subTree;
1941
- d.subTree = pe, g(Te, pe, f(Te.el), st(Te), d, E, w), $.el = pe.el, se === null && Ha(d, pe.el), K && He(K, E), (he = $.props && $.props.onVnodeUpdated) && He(() => yt(he, Z, $, re), E);
1941
+ d.subTree = pe, m(Te, pe, f(Te.el), st(Te), d, T, E), $.el = pe.el, se === null && Ha(d, pe.el), K && He(K, T), (he = $.props && $.props.onVnodeUpdated) && He(() => yt(he, Z, $, re), T);
1942
1942
  } else {
1943
1943
  let $;
1944
1944
  const { el: B, props: K } = h, { bm: Z, m: re, parent: se, root: he, type: pe } = d, Te = fn(h);
1945
1945
  if (Jt(d, !1), Z && oi(Z), !Te && ($ = K && K.onVnodeBeforeMount) && yt($, se, h), Jt(d, !0), B && Qe) {
1946
1946
  const Re = () => {
1947
- d.subTree = Hi(d), Qe(B, d.subTree, d, E, null);
1947
+ d.subTree = Hi(d), Qe(B, d.subTree, d, T, null);
1948
1948
  };
1949
1949
  Te && pe.__asyncHydrate ? pe.__asyncHydrate(B, d, Re) : Re();
1950
1950
  } else {
1951
1951
  he.ce && he.ce._hasShadowRoot() && he.ce._injectChildStyle(pe, d.parent ? d.parent.type : void 0);
1952
1952
  const Re = d.subTree = Hi(d);
1953
- g(null, Re, m, O, d, E, w), h.el = Re.el;
1953
+ m(null, Re, g, O, d, T, E), h.el = Re.el;
1954
1954
  }
1955
- if (re && He(re, E), !Te && ($ = K && K.onVnodeMounted)) {
1955
+ if (re && He(re, T), !Te && ($ = K && K.onVnodeMounted)) {
1956
1956
  const Re = h;
1957
- He(() => yt($, se, Re), E);
1957
+ He(() => yt($, se, Re), T);
1958
1958
  }
1959
- (h.shapeFlag & 256 || se && fn(se.vnode) && se.vnode.shapeFlag & 256) && d.a && He(d.a, E), d.isMounted = !0, h = m = O = null;
1959
+ (h.shapeFlag & 256 || se && fn(se.vnode) && se.vnode.shapeFlag & 256) && d.a && He(d.a, T), d.isMounted = !0, h = g = O = null;
1960
1960
  }
1961
1961
  };
1962
1962
  d.scope.on();
@@ -1964,44 +1964,44 @@ function Ja(e, t) {
1964
1964
  d.scope.off();
1965
1965
  const x = d.update = I.run.bind(I), H = d.job = I.runIfDirty.bind(I);
1966
1966
  H.i = d, H.id = d.uid, I.scheduler = () => So(H), Jt(d, !0), x();
1967
- }, ee = (d, h, m) => {
1967
+ }, ee = (d, h, g) => {
1968
1968
  h.component = d;
1969
1969
  const O = d.vnode.props;
1970
- d.vnode = h, d.next = null, Ua(d, h.props, O, m), Ya(d, h.children, m), Lt(), Fo(d), Dt();
1971
- }, Ae = (d, h, m, O, E, w, k, R, I = !1) => {
1970
+ d.vnode = h, d.next = null, Ua(d, h.props, O, g), Ya(d, h.children, g), Lt(), Fo(d), Dt();
1971
+ }, Ae = (d, h, g, O, T, E, k, R, I = !1) => {
1972
1972
  const x = d && d.children, H = d ? d.shapeFlag : 0, $ = h.children, { patchFlag: B, shapeFlag: K } = h;
1973
1973
  if (B > 0) {
1974
1974
  if (B & 128) {
1975
- Ke(x, $, m, O, E, w, k, R, I);
1975
+ Ke(x, $, g, O, T, E, k, R, I);
1976
1976
  return;
1977
1977
  } else if (B & 256) {
1978
- Je(x, $, m, O, E, w, k, R, I);
1978
+ Je(x, $, g, O, T, E, k, R, I);
1979
1979
  return;
1980
1980
  }
1981
1981
  }
1982
- K & 8 ? (H & 16 && Ge(x, E, w), $ !== x && u(m, $)) : H & 16 ? K & 16 ? Ke(x, $, m, O, E, w, k, R, I) : Ge(x, E, w, !0) : (H & 8 && u(m, ""), K & 16 && W($, m, O, E, w, k, R, I));
1983
- }, Je = (d, h, m, O, E, w, k, R, I) => {
1982
+ K & 8 ? (H & 16 && Ge(x, T, E), $ !== x && u(g, $)) : H & 16 ? K & 16 ? Ke(x, $, g, O, T, E, k, R, I) : Ge(x, T, E, !0) : (H & 8 && u(g, ""), K & 16 && W($, g, O, T, E, k, R, I));
1983
+ }, Je = (d, h, g, O, T, E, k, R, I) => {
1984
1984
  d = d || cn, h = h || cn;
1985
1985
  const x = d.length, H = h.length, $ = Math.min(x, H);
1986
1986
  let B;
1987
1987
  for (B = 0; B < $; B++) {
1988
1988
  const K = h[B] = I ? At(h[B]) : Et(h[B]);
1989
- g(d[B], K, m, null, E, w, k, R, I);
1989
+ m(d[B], K, g, null, T, E, k, R, I);
1990
1990
  }
1991
- x > H ? Ge(d, E, w, !0, !1, $) : W(h, m, O, E, w, k, R, I, $);
1992
- }, Ke = (d, h, m, O, E, w, k, R, I) => {
1991
+ x > H ? Ge(d, T, E, !0, !1, $) : W(h, g, O, T, E, k, R, I, $);
1992
+ }, Ke = (d, h, g, O, T, E, k, R, I) => {
1993
1993
  let x = 0;
1994
1994
  const H = h.length;
1995
1995
  let $ = d.length - 1, B = H - 1;
1996
1996
  for (; x <= $ && x <= B; ) {
1997
1997
  const K = d[x], Z = h[x] = I ? At(h[x]) : Et(h[x]);
1998
- if (Cn(K, Z)) g(K, Z, m, null, E, w, k, R, I);
1998
+ if (Cn(K, Z)) m(K, Z, g, null, T, E, k, R, I);
1999
1999
  else break;
2000
2000
  x++;
2001
2001
  }
2002
2002
  for (; x <= $ && x <= B; ) {
2003
2003
  const K = d[$], Z = h[B] = I ? At(h[B]) : Et(h[B]);
2004
- if (Cn(K, Z)) g(K, Z, m, null, E, w, k, R, I);
2004
+ if (Cn(K, Z)) m(K, Z, g, null, T, E, k, R, I);
2005
2005
  else break;
2006
2006
  $--, B--;
2007
2007
  }
@@ -2009,10 +2009,10 @@ function Ja(e, t) {
2009
2009
  if (x <= B) {
2010
2010
  const K = B + 1, Z = K < H ? h[K].el : O;
2011
2011
  for (; x <= B; )
2012
- g(null, h[x] = I ? At(h[x]) : Et(h[x]), m, Z, E, w, k, R, I), x++;
2012
+ m(null, h[x] = I ? At(h[x]) : Et(h[x]), g, Z, T, E, k, R, I), x++;
2013
2013
  }
2014
2014
  } else if (x > B) for (; x <= $; )
2015
- Le(d[x], E, w, !0), x++;
2015
+ Le(d[x], T, E, !0), x++;
2016
2016
  else {
2017
2017
  const K = x, Z = x, re = /* @__PURE__ */ new Map();
2018
2018
  for (x = Z; x <= B; x++) {
@@ -2027,7 +2027,7 @@ function Ja(e, t) {
2027
2027
  for (x = K; x <= $; x++) {
2028
2028
  const be = d[x];
2029
2029
  if (he >= pe) {
2030
- Le(be, E, w, !0);
2030
+ Le(be, T, E, !0);
2031
2031
  continue;
2032
2032
  }
2033
2033
  let Ve;
@@ -2036,112 +2036,112 @@ function Ja(e, t) {
2036
2036
  Ve = se;
2037
2037
  break;
2038
2038
  }
2039
- Ve === void 0 ? Le(be, E, w, !0) : (ct[Ve - Z] = x + 1, Ve >= Re ? Re = Ve : Te = !0, g(be, h[Ve], m, null, E, w, k, R, I), he++);
2039
+ Ve === void 0 ? Le(be, T, E, !0) : (ct[Ve - Z] = x + 1, Ve >= Re ? Re = Ve : Te = !0, m(be, h[Ve], g, null, T, E, k, R, I), he++);
2040
2040
  }
2041
2041
  const Kt = Te ? Qa(ct) : cn;
2042
2042
  for (se = Kt.length - 1, x = pe - 1; x >= 0; x--) {
2043
2043
  const be = Z + x, Ve = h[be], Wt = h[be + 1], et = be + 1 < H ? Wt.el || Is(Wt) : O;
2044
- ct[x] === 0 ? g(null, Ve, m, et, E, w, k, R, I) : Te && (se < 0 || x !== Kt[se] ? Ne(Ve, m, et, 2) : se--);
2044
+ ct[x] === 0 ? m(null, Ve, g, et, T, E, k, R, I) : Te && (se < 0 || x !== Kt[se] ? Ne(Ve, g, et, 2) : se--);
2045
2045
  }
2046
2046
  }
2047
- }, Ne = (d, h, m, O, E = null) => {
2048
- const { el: w, type: k, transition: R, children: I, shapeFlag: x } = d;
2047
+ }, Ne = (d, h, g, O, T = null) => {
2048
+ const { el: E, type: k, transition: R, children: I, shapeFlag: x } = d;
2049
2049
  if (x & 6) {
2050
- Ne(d.component.subTree, h, m, O);
2050
+ Ne(d.component.subTree, h, g, O);
2051
2051
  return;
2052
2052
  }
2053
2053
  if (x & 128) {
2054
- d.suspense.move(h, m, O);
2054
+ d.suspense.move(h, g, O);
2055
2055
  return;
2056
2056
  }
2057
2057
  if (x & 64) {
2058
- k.move(d, h, m, ye);
2058
+ k.move(d, h, g, ye);
2059
2059
  return;
2060
2060
  }
2061
2061
  if (k === fe) {
2062
- i(w, h, m);
2063
- for (let H = 0; H < I.length; H++) Ne(I[H], h, m, O);
2064
- i(d.anchor, h, m);
2062
+ i(E, h, g);
2063
+ for (let H = 0; H < I.length; H++) Ne(I[H], h, g, O);
2064
+ i(d.anchor, h, g);
2065
2065
  return;
2066
2066
  }
2067
2067
  if (k === Ln) {
2068
- V(d, h, m);
2068
+ V(d, h, g);
2069
2069
  return;
2070
2070
  }
2071
- if (O !== 2 && x & 1 && R) if (O === 0) R.persisted && !w[Wi] ? i(w, h, m) : (R.beforeEnter(w), i(w, h, m), He(() => R.enter(w), E));
2071
+ if (O !== 2 && x & 1 && R) if (O === 0) R.persisted && !E[Wi] ? i(E, h, g) : (R.beforeEnter(E), i(E, h, g), He(() => R.enter(E), T));
2072
2072
  else {
2073
2073
  const { leave: H, delayLeave: $, afterLeave: B } = R, K = () => {
2074
- d.ctx.isUnmounted ? o(w) : i(w, h, m);
2074
+ d.ctx.isUnmounted ? o(E) : i(E, h, g);
2075
2075
  }, Z = () => {
2076
- const re = w._isLeaving || !!w[Wi];
2077
- w._isLeaving && w[Wi](!0), R.persisted && !re ? K() : H(w, () => {
2076
+ const re = E._isLeaving || !!E[Wi];
2077
+ E._isLeaving && E[Wi](!0), R.persisted && !re ? K() : H(E, () => {
2078
2078
  K(), B && B();
2079
2079
  });
2080
2080
  };
2081
- $ ? $(w, K, Z) : Z();
2081
+ $ ? $(E, K, Z) : Z();
2082
2082
  }
2083
- else i(w, h, m);
2084
- }, Le = (d, h, m, O = !1, E = !1) => {
2085
- const { type: w, props: k, ref: R, children: I, dynamicChildren: x, shapeFlag: H, patchFlag: $, dirs: B, cacheIndex: K, memo: Z } = d;
2086
- if ($ === -2 && (E = !1), R != null && (Lt(), kn(R, null, m, d, !0), Dt()), K != null && (h.renderCache[K] = void 0), H & 256) {
2083
+ else i(E, h, g);
2084
+ }, Le = (d, h, g, O = !1, T = !1) => {
2085
+ const { type: E, props: k, ref: R, children: I, dynamicChildren: x, shapeFlag: H, patchFlag: $, dirs: B, cacheIndex: K, memo: Z } = d;
2086
+ if ($ === -2 && (T = !1), R != null && (Lt(), kn(R, null, g, d, !0), Dt()), K != null && (h.renderCache[K] = void 0), H & 256) {
2087
2087
  h.ctx.deactivate(d);
2088
2088
  return;
2089
2089
  }
2090
2090
  const re = H & 1 && B, se = !fn(d);
2091
2091
  let he;
2092
- if (se && (he = k && k.onVnodeBeforeUnmount) && yt(he, h, d), H & 6) at(d.component, m, O);
2092
+ if (se && (he = k && k.onVnodeBeforeUnmount) && yt(he, h, d), H & 6) at(d.component, g, O);
2093
2093
  else {
2094
2094
  if (H & 128) {
2095
- d.suspense.unmount(m, O);
2095
+ d.suspense.unmount(g, O);
2096
2096
  return;
2097
2097
  }
2098
- re && Xt(d, null, h, "beforeUnmount"), H & 64 ? d.type.remove(d, h, m, ye, O) : x && !x.hasOnce && (w !== fe || $ > 0 && $ & 64) ? Ge(x, h, m, !1, !0) : (w === fe && $ & 384 || !E && H & 16) && Ge(I, h, m), O && gt(d);
2098
+ re && Xt(d, null, h, "beforeUnmount"), H & 64 ? d.type.remove(d, h, g, ye, O) : x && !x.hasOnce && (E !== fe || $ > 0 && $ & 64) ? Ge(x, h, g, !1, !0) : (E === fe && $ & 384 || !T && H & 16) && Ge(I, h, g), O && gt(d);
2099
2099
  }
2100
2100
  const pe = Z != null && K == null;
2101
2101
  (se && (he = k && k.onVnodeUnmounted) || re || pe) && He(() => {
2102
2102
  he && yt(he, h, d), re && Xt(d, null, h, "unmounted"), pe && (d.el = null);
2103
- }, m);
2103
+ }, g);
2104
2104
  }, gt = (d) => {
2105
- const { type: h, el: m, anchor: O, transition: E } = d;
2105
+ const { type: h, el: g, anchor: O, transition: T } = d;
2106
2106
  if (h === fe) {
2107
- mt(m, O);
2107
+ mt(g, O);
2108
2108
  return;
2109
2109
  }
2110
2110
  if (h === Ln) {
2111
- b(d);
2111
+ w(d);
2112
2112
  return;
2113
2113
  }
2114
- const w = () => {
2115
- o(m), E && !E.persisted && E.afterLeave && E.afterLeave();
2114
+ const E = () => {
2115
+ o(g), T && !T.persisted && T.afterLeave && T.afterLeave();
2116
2116
  };
2117
- if (d.shapeFlag & 1 && E && !E.persisted) {
2118
- const { leave: k, delayLeave: R } = E, I = () => k(m, w);
2119
- R ? R(d.el, w, I) : I();
2120
- } else w();
2117
+ if (d.shapeFlag & 1 && T && !T.persisted) {
2118
+ const { leave: k, delayLeave: R } = T, I = () => k(g, E);
2119
+ R ? R(d.el, E, I) : I();
2120
+ } else E();
2121
2121
  }, mt = (d, h) => {
2122
- let m;
2122
+ let g;
2123
2123
  for (; d !== h; )
2124
- m = p(d), o(d), d = m;
2124
+ g = p(d), o(d), d = g;
2125
2125
  o(h);
2126
- }, at = (d, h, m) => {
2127
- const { bum: O, scope: E, job: w, subTree: k, um: R, m: I, a: x } = d;
2128
- Uo(I), Uo(x), O && oi(O), E.stop(), w && (w.flags |= 8, Le(k, d, h, m)), R && He(R, h), He(() => {
2126
+ }, at = (d, h, g) => {
2127
+ const { bum: O, scope: T, job: E, subTree: k, um: R, m: I, a: x } = d;
2128
+ Uo(I), Uo(x), O && oi(O), T.stop(), E && (E.flags |= 8, Le(k, d, h, g)), R && He(R, h), He(() => {
2129
2129
  d.isUnmounted = !0;
2130
2130
  }, h);
2131
- }, Ge = (d, h, m, O = !1, E = !1, w = 0) => {
2132
- for (let k = w; k < d.length; k++) Le(d[k], h, m, O, E);
2131
+ }, Ge = (d, h, g, O = !1, T = !1, E = 0) => {
2132
+ for (let k = E; k < d.length; k++) Le(d[k], h, g, O, T);
2133
2133
  }, st = (d) => {
2134
2134
  if (d.shapeFlag & 6) return st(d.component.subTree);
2135
2135
  if (d.shapeFlag & 128) return d.suspense.next();
2136
- const h = p(d.anchor || d.el), m = h && h[gs];
2137
- return m ? p(m) : h;
2136
+ const h = p(d.anchor || d.el), g = h && h[gs];
2137
+ return g ? p(g) : h;
2138
2138
  };
2139
2139
  let $e = !1;
2140
- const Fe = (d, h, m) => {
2140
+ const Fe = (d, h, g) => {
2141
2141
  let O;
2142
- d == null ? h._vnode && (Le(h._vnode, null, null, !0), O = h._vnode.component) : g(h._vnode || null, d, h, null, null, null, m), h._vnode = d, $e || ($e = !0, Fo(O), fs(), $e = !1);
2142
+ d == null ? h._vnode && (Le(h._vnode, null, null, !0), O = h._vnode.component) : m(h._vnode || null, d, h, null, null, null, g), h._vnode = d, $e || ($e = !0, Fo(O), fs(), $e = !1);
2143
2143
  }, ye = {
2144
- p: g,
2144
+ p: m,
2145
2145
  um: Le,
2146
2146
  m: Ne,
2147
2147
  r: gt,
@@ -2227,7 +2227,7 @@ function Rs(e) {
2227
2227
  return e.dynamicChildren = Vn > 0 ? nt || cn : null, tc(), Vn > 0 && nt && nt.push(e), e;
2228
2228
  }
2229
2229
  function j(e, t, n, i, o, r) {
2230
- return Rs(_(e, t, n, i, o, r, !0));
2230
+ return Rs(y(e, t, n, i, o, r, !0));
2231
2231
  }
2232
2232
  function xt(e, t, n, i, o) {
2233
2233
  return Rs(Pe(e, t, n, i, o, !0));
@@ -2244,7 +2244,7 @@ var ks = ({ key: e }) => e ?? null, ri = ({ ref: e, ref_key: t, ref_for: n }) =>
2244
2244
  k: t,
2245
2245
  f: !!n
2246
2246
  } : e : null);
2247
- function _(e, t = null, n = null, i = 0, o = null, r = e === fe ? 0 : 1, s = !1, l = !1) {
2247
+ function y(e, t = null, n = null, i = 0, o = null, r = e === fe ? 0 : 1, s = !1, l = !1) {
2248
2248
  const a = {
2249
2249
  __v_isVNode: !0,
2250
2250
  __v_skip: !0,
@@ -2288,7 +2288,7 @@ function nc(e, t = null, n = null, i = 0, o = null, r = !1) {
2288
2288
  l && !Ee(l) && (t.class = Me(l)), ve(a) && (/* @__PURE__ */ Oi(a) && !X(a) && (a = ot({}, a)), t.style = qt(a));
2289
2289
  }
2290
2290
  const s = Ee(e) ? 1 : As(e) ? 128 : Ea(e) ? 64 : ve(e) ? 4 : ce(e) ? 2 : 0;
2291
- return _(e, t, n, i, o, s, r, !0);
2291
+ return y(e, t, n, i, o, s, r, !0);
2292
2292
  }
2293
2293
  function ic(e) {
2294
2294
  return e ? /* @__PURE__ */ Oi(e) || Ts(e) ? ot({}, e) : e : null;
@@ -3116,9 +3116,9 @@ var au = Object.defineProperty, mr = Object.getOwnPropertySymbols, cu = Object.p
3116
3116
  __name: "Frame",
3117
3117
  setup(e, { expose: t }) {
3118
3118
  const n = /* @__PURE__ */ L(null), { frameLoading: i, showEmptyState: o, showError: r, iframeSource: s, emptyStateText: l, emptyStateActionText: a, handleEmptyAction: c, handleFrameLoaded: u } = mn();
3119
- function f(v, y) {
3120
- var g;
3121
- (g = n.value) != null && g.contentWindow && n.value.contentWindow.postMessage(du({ type: v }, y), "*");
3119
+ function f(v, b) {
3120
+ var m;
3121
+ (m = n.value) != null && m.contentWindow && n.value.contentWindow.postMessage(du({ type: v }, b), "*");
3122
3122
  }
3123
3123
  t({ sendMessageToIframe: f });
3124
3124
  const p = {
@@ -3141,8 +3141,8 @@ var au = Object.defineProperty, mr = Object.getOwnPropertySymbols, cu = Object.p
3141
3141
  }), fu = { class: "opencode-iframe-container" }, hu = { class: "opencode-empty-state-text" }, pu = ["src"];
3142
3142
  function vu(e, t, n, i, o, r) {
3143
3143
  return D(), j("div", fu, [
3144
- _("div", { class: Me(["opencode-empty-state-overlay", { visible: i.showEmptyState }]) }, [ne(e.$slots, "empty-state", {}, () => [
3145
- t[2] || (t[2] = _("div", { class: "opencode-empty-state-icon" }, [_("svg", {
3144
+ y("div", { class: Me(["opencode-empty-state-overlay", { visible: i.showEmptyState }]) }, [ne(e.$slots, "empty-state", {}, () => [
3145
+ t[2] || (t[2] = y("div", { class: "opencode-empty-state-icon" }, [y("svg", {
3146
3146
  viewBox: "0 0 24 24",
3147
3147
  width: "48",
3148
3148
  height: "48",
@@ -3150,21 +3150,21 @@ function vu(e, t, n, i, o, r) {
3150
3150
  stroke: "currentColor",
3151
3151
  "stroke-width": "1.5",
3152
3152
  "aria-hidden": "true"
3153
- }, [_("path", {
3153
+ }, [y("path", {
3154
3154
  "stroke-linecap": "round",
3155
3155
  "stroke-linejoin": "round",
3156
3156
  d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 0 1-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
3157
3157
  })])], -1)),
3158
- _("div", hu, xe(i.emptyStateText), 1),
3159
- _("button", {
3158
+ y("div", hu, xe(i.emptyStateText), 1),
3159
+ y("button", {
3160
3160
  class: "opencode-empty-state-btn",
3161
3161
  type: "button",
3162
3162
  onClick: t[0] || (t[0] = (...s) => i.handleEmptyAction && i.handleEmptyAction(...s))
3163
3163
  }, xe(i.emptyStateActionText), 1)
3164
3164
  ])], 2),
3165
- _("div", { class: Me(["opencode-loading-overlay", { visible: i.frameLoading }]) }, [ne(e.$slots, "loading", {}, () => [t[3] || (t[3] = _("div", { class: "opencode-loading-spinner" }, null, -1)), t[4] || (t[4] = _("div", { class: "opencode-loading-text" }, "加载中...", -1))])], 2),
3166
- _("div", { class: Me(["opencode-error-overlay", { visible: i.showError }]) }, [ne(e.$slots, "error")], 2),
3167
- ne(e.$slots, "content", {}, () => [_("iframe", {
3165
+ y("div", { class: Me(["opencode-loading-overlay", { visible: i.frameLoading }]) }, [ne(e.$slots, "loading", {}, () => [t[3] || (t[3] = y("div", { class: "opencode-loading-spinner" }, null, -1)), t[4] || (t[4] = y("div", { class: "opencode-loading-text" }, "加载中...", -1))])], 2),
3166
+ y("div", { class: Me(["opencode-error-overlay", { visible: i.showError }]) }, [ne(e.$slots, "error")], 2),
3167
+ ne(e.$slots, "content", {}, () => [y("iframe", {
3168
3168
  ref: "iframeRef",
3169
3169
  class: "opencode-iframe",
3170
3170
  src: i.iframeSrc,
@@ -3179,7 +3179,7 @@ var gu = Gs, Ys = /* @__PURE__ */ Ye({
3179
3179
  __name: "Header",
3180
3180
  setup(e, { expose: t }) {
3181
3181
  t();
3182
- const { title: n, sessionListTitle: i, sessionListCollapsed: o, selectMode: r, selectEnabled: s, theme: l, resolvedTheme: a, minimized: c, promptDockVisible: u, reviewPanelVisible: f, mode: p, displayMode: v, splitPosition: y, handleToggleSessionList: g, handleToggleSelectMode: T, handleToggleTheme: S, handleToggleDisplayMode: P, handleToggleSplitPosition: V, handleClose: b, handleToggleMinimize: z, handleTogglePromptDock: G, handleToggleReviewPanel: A, handleRefresh: W } = mn(), F = {
3182
+ const { title: n, sessionListTitle: i, sessionListCollapsed: o, selectMode: r, selectEnabled: s, theme: l, resolvedTheme: a, minimized: c, promptDockVisible: u, reviewPanelVisible: f, mode: p, displayMode: v, splitPosition: b, handleToggleSessionList: m, handleToggleSelectMode: _, handleToggleTheme: S, handleToggleDisplayMode: P, handleToggleSplitPosition: V, handleClose: w, handleToggleMinimize: z, handleTogglePromptDock: G, handleToggleReviewPanel: A, handleRefresh: W } = mn(), F = {
3183
3183
  title: n,
3184
3184
  sessionListTitle: i,
3185
3185
  sessionListCollapsed: o,
@@ -3192,13 +3192,13 @@ var gu = Gs, Ys = /* @__PURE__ */ Ye({
3192
3192
  reviewPanelVisible: f,
3193
3193
  mode: p,
3194
3194
  displayMode: v,
3195
- splitPosition: y,
3196
- handleToggleSessionList: g,
3197
- handleToggleSelectMode: T,
3195
+ splitPosition: b,
3196
+ handleToggleSessionList: m,
3197
+ handleToggleSelectMode: _,
3198
3198
  handleToggleTheme: S,
3199
3199
  handleToggleDisplayMode: P,
3200
3200
  handleToggleSplitPosition: V,
3201
- handleClose: b,
3201
+ handleClose: w,
3202
3202
  handleToggleMinimize: z,
3203
3203
  handleTogglePromptDock: G,
3204
3204
  handleToggleReviewPanel: A,
@@ -3238,8 +3238,8 @@ var gu = Gs, Ys = /* @__PURE__ */ Ye({
3238
3238
  splitPositionIconTitle: q(() => `分栏位置: ${{
3239
3239
  left: "左侧",
3240
3240
  right: "右侧"
3241
- }[y.value]}`),
3242
- splitPositionIconLabel: q(() => `切换分栏位置 - 下一个: ${y.value === "right" ? "左侧" : "右侧"}`)
3241
+ }[b.value]}`),
3242
+ splitPositionIconLabel: q(() => `切换分栏位置 - 下一个: ${b.value === "right" ? "左侧" : "右侧"}`)
3243
3243
  };
3244
3244
  return Object.defineProperty(F, "__isScriptSetup", {
3245
3245
  enumerable: !1,
@@ -3355,15 +3355,15 @@ var gu = Gs, Ys = /* @__PURE__ */ Ye({
3355
3355
  };
3356
3356
  function Bu(e, t, n, i, o, r) {
3357
3357
  return D(), j("div", mu, [
3358
- _("div", _u, [
3359
- _("button", {
3358
+ y("div", _u, [
3359
+ y("button", {
3360
3360
  class: Me(["opencode-header-btn session-toggle", { active: !i.sessionListCollapsed }]),
3361
3361
  type: "button",
3362
3362
  title: i.sessionListTitle,
3363
3363
  "aria-label": i.sessionListTitle,
3364
3364
  "aria-expanded": !i.sessionListCollapsed,
3365
3365
  onClick: t[0] || (t[0] = (...s) => i.handleToggleSessionList && i.handleToggleSessionList(...s))
3366
- }, [ne(e.$slots, "session-toggle-icon", {}, () => [t[10] || (t[10] = _("svg", {
3366
+ }, [ne(e.$slots, "session-toggle-icon", {}, () => [t[10] || (t[10] = y("svg", {
3367
3367
  viewBox: "0 0 24 24",
3368
3368
  width: "16",
3369
3369
  height: "16",
@@ -3371,11 +3371,11 @@ function Bu(e, t, n, i, o, r) {
3371
3371
  stroke: "currentColor",
3372
3372
  "stroke-width": "2",
3373
3373
  "aria-hidden": "true"
3374
- }, [_("path", {
3374
+ }, [y("path", {
3375
3375
  d: "M4 6h16M4 12h16M4 18h16",
3376
3376
  "stroke-linecap": "round"
3377
3377
  })], -1))])], 10, yu),
3378
- _("button", {
3378
+ y("button", {
3379
3379
  class: Me(["opencode-header-btn select-btn", { active: i.selectMode }]),
3380
3380
  type: "button",
3381
3381
  title: "选择页面元素 (Ctrl+P)",
@@ -3383,25 +3383,25 @@ function Bu(e, t, n, i, o, r) {
3383
3383
  "aria-pressed": i.selectMode,
3384
3384
  disabled: !i.selectEnabled,
3385
3385
  onClick: t[1] || (t[1] = (...s) => i.handleToggleSelectMode && i.handleToggleSelectMode(...s))
3386
- }, [ne(e.$slots, "select-icon", {}, () => [t[11] || (t[11] = _("svg", {
3386
+ }, [ne(e.$slots, "select-icon", {}, () => [t[11] || (t[11] = y("svg", {
3387
3387
  viewBox: "0 0 1024 1024",
3388
3388
  width: "16",
3389
3389
  height: "16",
3390
3390
  "aria-hidden": "true"
3391
- }, [_("path", {
3391
+ }, [y("path", {
3392
3392
  fill: "currentColor",
3393
3393
  d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
3394
- }), _("path", {
3394
+ }), y("path", {
3395
3395
  fill: "currentColor",
3396
3396
  d: "M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"
3397
3397
  })], -1))])], 10, bu),
3398
- _("button", {
3398
+ y("button", {
3399
3399
  class: "opencode-header-btn theme-btn",
3400
3400
  type: "button",
3401
3401
  title: i.themeIconTitle,
3402
3402
  "aria-label": i.themeIconLabel,
3403
3403
  onClick: t[2] || (t[2] = (...s) => i.handleToggleTheme && i.handleToggleTheme(...s))
3404
- }, [ne(e.$slots, "theme-icon", {}, () => [i.theme === "light" ? (D(), j("svg", wu, [...t[12] || (t[12] = [ao('<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>', 9)])])) : i.theme === "dark" ? (D(), j("svg", Eu, [...t[13] || (t[13] = [_("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (D(), j("svg", Tu, [...t[14] || (t[14] = [ao('<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line><circle cx="12" cy="10" r="3"></circle><path d="M7 7l2 2M17 7l-2 2M7 13l2-2M17 13l-2-2"></path>', 5)])]))])], 8, Su),
3404
+ }, [ne(e.$slots, "theme-icon", {}, () => [i.theme === "light" ? (D(), j("svg", wu, [...t[12] || (t[12] = [ao('<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>', 9)])])) : i.theme === "dark" ? (D(), j("svg", Eu, [...t[13] || (t[13] = [y("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (D(), j("svg", Tu, [...t[14] || (t[14] = [ao('<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line><circle cx="12" cy="10" r="3"></circle><path d="M7 7l2 2M17 7l-2 2M7 13l2-2M17 13l-2-2"></path>', 5)])]))])], 8, Su),
3405
3405
  i.displayMode !== "extension" ? (D(), j("button", {
3406
3406
  key: 0,
3407
3407
  class: "opencode-header-btn display-mode-btn",
@@ -3410,71 +3410,71 @@ function Bu(e, t, n, i, o, r) {
3410
3410
  "aria-label": i.displayModeIconLabel,
3411
3411
  onClick: t[3] || (t[3] = (...s) => i.handleToggleDisplayMode && i.handleToggleDisplayMode(...s))
3412
3412
  }, [ne(e.$slots, "display-mode-icon", {}, () => [i.displayMode === "bubble" ? (D(), j("svg", xu, [...t[15] || (t[15] = [
3413
- _("circle", {
3413
+ y("circle", {
3414
3414
  cx: "12",
3415
3415
  cy: "12",
3416
3416
  r: "10"
3417
3417
  }, null, -1),
3418
- _("path", {
3418
+ y("path", {
3419
3419
  d: "M8 14s1.5 2 4 2 4-2 4-2",
3420
3420
  "stroke-linecap": "round"
3421
3421
  }, null, -1),
3422
- _("line", {
3422
+ y("line", {
3423
3423
  x1: "9",
3424
3424
  y1: "9",
3425
3425
  x2: "9.01",
3426
3426
  y2: "9",
3427
3427
  "stroke-linecap": "round"
3428
3428
  }, null, -1),
3429
- _("line", {
3429
+ y("line", {
3430
3430
  x1: "15",
3431
3431
  y1: "9",
3432
3432
  x2: "15.01",
3433
3433
  y2: "9",
3434
3434
  "stroke-linecap": "round"
3435
3435
  }, null, -1)
3436
- ])])) : i.displayMode === "split" ? (D(), j("svg", Ou, [...t[16] || (t[16] = [_("rect", {
3436
+ ])])) : i.displayMode === "split" ? (D(), j("svg", Ou, [...t[16] || (t[16] = [y("rect", {
3437
3437
  x: "3",
3438
3438
  y: "3",
3439
3439
  width: "18",
3440
3440
  height: "18",
3441
3441
  rx: "2"
3442
- }, null, -1), _("line", {
3442
+ }, null, -1), y("line", {
3443
3443
  x1: "12",
3444
3444
  y1: "3",
3445
3445
  x2: "12",
3446
3446
  y2: "21"
3447
3447
  }, null, -1)])])) : (D(), j("svg", Pu, [...t[17] || (t[17] = [
3448
- _("rect", {
3448
+ y("rect", {
3449
3449
  x: "3",
3450
3450
  y: "3",
3451
3451
  width: "8",
3452
3452
  height: "8",
3453
3453
  rx: "1"
3454
3454
  }, null, -1),
3455
- _("rect", {
3455
+ y("rect", {
3456
3456
  x: "15",
3457
3457
  y: "3",
3458
3458
  width: "6",
3459
3459
  height: "8",
3460
3460
  rx: "1"
3461
3461
  }, null, -1),
3462
- _("rect", {
3462
+ y("rect", {
3463
3463
  x: "3",
3464
3464
  y: "15",
3465
3465
  width: "8",
3466
3466
  height: "6",
3467
3467
  rx: "1"
3468
3468
  }, null, -1),
3469
- _("circle", {
3469
+ y("circle", {
3470
3470
  cx: "18",
3471
3471
  cy: "18",
3472
3472
  r: "3"
3473
3473
  }, null, -1)
3474
3474
  ])]))])], 8, Cu)) : ae("v-if", !0)
3475
3475
  ]),
3476
- _("span", Mu, xe(i.title), 1),
3477
- _("div", Iu, [
3476
+ y("span", Mu, xe(i.title), 1),
3477
+ y("div", Iu, [
3478
3478
  i.displayMode === "extension" ? (D(), j("button", {
3479
3479
  key: 0,
3480
3480
  class: "opencode-header-btn refresh-btn",
@@ -3482,7 +3482,7 @@ function Bu(e, t, n, i, o, r) {
3482
3482
  title: "刷新面板",
3483
3483
  "aria-label": "刷新面板",
3484
3484
  onClick: t[4] || (t[4] = (...s) => i.handleRefresh && i.handleRefresh(...s))
3485
- }, [...t[18] || (t[18] = [_("svg", {
3485
+ }, [...t[18] || (t[18] = [y("svg", {
3486
3486
  viewBox: "0 0 24 24",
3487
3487
  width: "16",
3488
3488
  height: "16",
@@ -3490,7 +3490,7 @@ function Bu(e, t, n, i, o, r) {
3490
3490
  stroke: "currentColor",
3491
3491
  "stroke-width": "2",
3492
3492
  "aria-hidden": "true"
3493
- }, [_("polyline", { points: "23,4 23,10 17,10" }), _("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })], -1)])])) : ae("v-if", !0),
3493
+ }, [y("polyline", { points: "23,4 23,10 17,10" }), y("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })], -1)])])) : ae("v-if", !0),
3494
3494
  i.isSplitMode && i.displayMode !== "extension" ? (D(), j("button", {
3495
3495
  key: 1,
3496
3496
  class: "opencode-header-btn split-position-btn",
@@ -3498,37 +3498,37 @@ function Bu(e, t, n, i, o, r) {
3498
3498
  title: i.splitPositionIconTitle,
3499
3499
  "aria-label": i.splitPositionIconLabel,
3500
3500
  onClick: t[5] || (t[5] = (...s) => i.handleToggleSplitPosition && i.handleToggleSplitPosition(...s))
3501
- }, [ne(e.$slots, "split-position-icon", {}, () => [i.splitPosition === "right" ? (D(), j("svg", Ru, [...t[19] || (t[19] = [_("rect", {
3501
+ }, [ne(e.$slots, "split-position-icon", {}, () => [i.splitPosition === "right" ? (D(), j("svg", Ru, [...t[19] || (t[19] = [y("rect", {
3502
3502
  x: "3",
3503
3503
  y: "3",
3504
3504
  width: "18",
3505
3505
  height: "18",
3506
3506
  rx: "2"
3507
- }, null, -1), _("line", {
3507
+ }, null, -1), y("line", {
3508
3508
  x1: "15",
3509
3509
  y1: "3",
3510
3510
  x2: "15",
3511
3511
  y2: "21"
3512
- }, null, -1)])])) : (D(), j("svg", ku, [...t[20] || (t[20] = [_("rect", {
3512
+ }, null, -1)])])) : (D(), j("svg", ku, [...t[20] || (t[20] = [y("rect", {
3513
3513
  x: "3",
3514
3514
  y: "3",
3515
3515
  width: "18",
3516
3516
  height: "18",
3517
3517
  rx: "2"
3518
- }, null, -1), _("line", {
3518
+ }, null, -1), y("line", {
3519
3519
  x1: "9",
3520
3520
  y1: "3",
3521
3521
  x2: "9",
3522
3522
  y2: "21"
3523
3523
  }, null, -1)])]))])], 8, Au)) : ae("v-if", !0),
3524
- _("button", {
3524
+ y("button", {
3525
3525
  class: Me(["opencode-header-btn review-panel", { active: i.reviewPanelVisible }]),
3526
3526
  type: "button",
3527
3527
  title: i.reviewPanelVisible ? "收起审查面板" : "展开审查面板",
3528
3528
  "aria-label": i.reviewPanelVisible ? "收起审查面板" : "展开审查面板",
3529
3529
  "aria-pressed": i.reviewPanelVisible,
3530
3530
  onClick: t[6] || (t[6] = (...s) => i.handleToggleReviewPanel && i.handleToggleReviewPanel(...s))
3531
- }, [...t[21] || (t[21] = [_("svg", {
3531
+ }, [...t[21] || (t[21] = [y("svg", {
3532
3532
  viewBox: "0 0 24 24",
3533
3533
  width: "15",
3534
3534
  height: "15",
@@ -3538,7 +3538,7 @@ function Bu(e, t, n, i, o, r) {
3538
3538
  "stroke-linecap": "round",
3539
3539
  "stroke-linejoin": "round",
3540
3540
  "aria-hidden": "true"
3541
- }, [_("polyline", { points: "16 18 22 12 16 6" }), _("polyline", { points: "8 6 2 12 8 18" })], -1)])], 10, Nu),
3541
+ }, [y("polyline", { points: "16 18 22 12 16 6" }), y("polyline", { points: "8 6 2 12 8 18" })], -1)])], 10, Nu),
3542
3542
  i.isSplitMode ? ae("v-if", !0) : (D(), j("button", {
3543
3543
  key: 2,
3544
3544
  class: "opencode-header-btn prompt-dock",
@@ -3547,7 +3547,7 @@ function Bu(e, t, n, i, o, r) {
3547
3547
  "aria-label": i.promptDockVisible ? "隐藏对话框" : "显示对话框",
3548
3548
  "aria-pressed": i.promptDockVisible,
3549
3549
  onClick: t[7] || (t[7] = (...s) => i.handleTogglePromptDock && i.handleTogglePromptDock(...s))
3550
- }, [ne(e.$slots, "prompt-dock-icon", {}, () => [t[22] || (t[22] = _("svg", {
3550
+ }, [ne(e.$slots, "prompt-dock-icon", {}, () => [t[22] || (t[22] = y("svg", {
3551
3551
  viewBox: "0 0 24 24",
3552
3552
  width: "14",
3553
3553
  height: "14",
@@ -3555,7 +3555,7 @@ function Bu(e, t, n, i, o, r) {
3555
3555
  stroke: "currentColor",
3556
3556
  "stroke-width": "2",
3557
3557
  "aria-hidden": "true"
3558
- }, [_("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })], -1))])], 8, Lu)),
3558
+ }, [y("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })], -1))])], 8, Lu)),
3559
3559
  i.isSplitMode ? ae("v-if", !0) : (D(), j("button", {
3560
3560
  key: 3,
3561
3561
  class: "opencode-header-btn minimize",
@@ -3564,7 +3564,7 @@ function Bu(e, t, n, i, o, r) {
3564
3564
  "aria-label": i.minimized ? "展开面板" : "最小化面板",
3565
3565
  "aria-pressed": i.minimized,
3566
3566
  onClick: t[8] || (t[8] = (...s) => i.handleToggleMinimize && i.handleToggleMinimize(...s))
3567
- }, [ne(e.$slots, "minimize-icon", {}, () => [i.minimized ? (D(), j("svg", $u, [...t[23] || (t[23] = [_("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)])])) : (D(), j("svg", Fu, [...t[24] || (t[24] = [_("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)])]))])], 8, Du)),
3567
+ }, [ne(e.$slots, "minimize-icon", {}, () => [i.minimized ? (D(), j("svg", $u, [...t[23] || (t[23] = [y("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)])])) : (D(), j("svg", Fu, [...t[24] || (t[24] = [y("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)])]))])], 8, Du)),
3568
3568
  i.isSplitMode ? ae("v-if", !0) : (D(), j("button", {
3569
3569
  key: 4,
3570
3570
  class: "opencode-header-btn close",
@@ -3572,7 +3572,7 @@ function Bu(e, t, n, i, o, r) {
3572
3572
  title: "关闭",
3573
3573
  "aria-label": "关闭面板",
3574
3574
  onClick: t[9] || (t[9] = (...s) => i.handleClose && i.handleClose(...s))
3575
- }, [ne(e.$slots, "close-icon", {}, () => [t[25] || (t[25] = _("svg", {
3575
+ }, [ne(e.$slots, "close-icon", {}, () => [t[25] || (t[25] = y("svg", {
3576
3576
  viewBox: "0 0 24 24",
3577
3577
  width: "14",
3578
3578
  height: "14",
@@ -3580,7 +3580,7 @@ function Bu(e, t, n, i, o, r) {
3580
3580
  stroke: "currentColor",
3581
3581
  "stroke-width": "2",
3582
3582
  "aria-hidden": "true"
3583
- }, [_("path", { d: "M18 6L6 18M6 6l12 12" })], -1))])]))
3583
+ }, [y("path", { d: "M18 6L6 18M6 6l12 12" })], -1))])]))
3584
3584
  ])
3585
3585
  ]);
3586
3586
  }
@@ -3597,11 +3597,11 @@ var ju = Ys, Xs = /* @__PURE__ */ Ye({
3597
3597
  }, 200);
3598
3598
  });
3599
3599
  const v = q(() => !!(f.value || r.value));
3600
- function y(T) {
3600
+ function b(_) {
3601
3601
  var S, P;
3602
- return !u?.value || !T ? !1 : (P = (S = u.value[T]) == null ? void 0 : S.thinking) != null ? P : !1;
3602
+ return !u?.value || !_ ? !1 : (P = (S = u.value[_]) == null ? void 0 : S.thinking) != null ? P : !1;
3603
3603
  }
3604
- const g = {
3604
+ const m = {
3605
3605
  collapsed: n,
3606
3606
  sessions: i,
3607
3607
  loadingSessionList: o,
@@ -3615,16 +3615,16 @@ var ju = Ys, Xs = /* @__PURE__ */ Ye({
3615
3615
  get animTimer() {
3616
3616
  return p;
3617
3617
  },
3618
- set animTimer(T) {
3619
- p = T;
3618
+ set animTimer(_) {
3619
+ p = _;
3620
3620
  },
3621
3621
  showSkeleton: v,
3622
- isSessionThinking: y
3622
+ isSessionThinking: b
3623
3623
  };
3624
- return Object.defineProperty(g, "__isScriptSetup", {
3624
+ return Object.defineProperty(m, "__isScriptSetup", {
3625
3625
  enumerable: !1,
3626
3626
  value: !0
3627
- }), g;
3627
+ }), m;
3628
3628
  }
3629
3629
  }), Wu = {
3630
3630
  key: 0,
@@ -3646,7 +3646,7 @@ var ju = Ys, Xs = /* @__PURE__ */ Ye({
3646
3646
  function Ju(e, t, n, i, o, r) {
3647
3647
  return D(), j("div", { class: Me(["opencode-session-list", { collapsed: i.collapsed }]) }, [
3648
3648
  ae(" Header "),
3649
- i.showSkeleton ? (D(), j(fe, { key: 1 }, [ae(" Header Skeleton "), t[2] || (t[2] = _("div", { class: "opencode-session-header-skeleton visible" }, [_("div", { class: "opencode-skeleton-header-title" }), _("div", { class: "opencode-skeleton-header-btn" })], -1))], 2112)) : (D(), j("div", Wu, [t[1] || (t[1] = _("span", { id: "opencode-session-list-title" }, "会话列表", -1)), _("button", {
3649
+ i.showSkeleton ? (D(), j(fe, { key: 1 }, [ae(" Header Skeleton "), t[2] || (t[2] = y("div", { class: "opencode-session-header-skeleton visible" }, [y("div", { class: "opencode-skeleton-header-title" }), y("div", { class: "opencode-skeleton-header-btn" })], -1))], 2112)) : (D(), j("div", Wu, [t[1] || (t[1] = y("span", { id: "opencode-session-list-title" }, "会话列表", -1)), y("button", {
3650
3650
  class: "opencode-new-session-btn",
3651
3651
  type: "button",
3652
3652
  title: "新建会话",
@@ -3654,10 +3654,10 @@ function Ju(e, t, n, i, o, r) {
3654
3654
  onClick: t[0] || (t[0] = (...s) => i.handleCreateSession && i.handleCreateSession(...s))
3655
3655
  }, " + ")])),
3656
3656
  ae(" Content Skeleton "),
3657
- i.showSkeleton ? (D(), j("div", Vu, [(D(), j(fe, null, Wn(5, (s) => _("div", {
3657
+ i.showSkeleton ? (D(), j("div", Vu, [(D(), j(fe, null, Wn(5, (s) => y("div", {
3658
3658
  key: `skeleton-${s}`,
3659
3659
  class: "opencode-skeleton-item"
3660
- }, [...t[3] || (t[3] = [_("div", { class: "opencode-skeleton-title" }, null, -1), _("div", { class: "opencode-skeleton-meta" }, null, -1)])])), 64))])) : (D(), j(fe, { key: 3 }, [ae(" Content "), _("div", Hu, [i.loadingSessionList ? (D(), j("div", zu, [...t[4] || (t[4] = [_("div", { class: "opencode-loading-spinner small" }, null, -1)])])) : ae("v-if", !0), i.sessions.length > 0 ? (D(!0), j(fe, { key: 1 }, Wn(i.sessions, (s) => (D(), j("div", {
3660
+ }, [...t[3] || (t[3] = [y("div", { class: "opencode-skeleton-title" }, null, -1), y("div", { class: "opencode-skeleton-meta" }, null, -1)])])), 64))])) : (D(), j(fe, { key: 3 }, [ae(" Content "), y("div", Hu, [i.loadingSessionList ? (D(), j("div", zu, [...t[4] || (t[4] = [y("div", { class: "opencode-loading-spinner small" }, null, -1)])])) : ae("v-if", !0), i.sessions.length > 0 ? (D(!0), j(fe, { key: 1 }, Wn(i.sessions, (s) => (D(), j("div", {
3661
3661
  key: s[i.sessionKey],
3662
3662
  class: Me(["opencode-session-item", {
3663
3663
  active: s.active,
@@ -3666,12 +3666,12 @@ function Ju(e, t, n, i, o, r) {
3666
3666
  role: "option",
3667
3667
  "aria-selected": s.active,
3668
3668
  onClick: (l) => i.handleSelectSession(s)
3669
- }, [_("div", qu, [_("div", Ku, [i.isSessionThinking(s.id) ? (D(), j("span", Gu)) : ae("v-if", !0), Oo(" " + xe(s.title), 1)]), _("button", {
3669
+ }, [y("div", qu, [y("div", Ku, [i.isSessionThinking(s.id) ? (D(), j("span", Gu)) : ae("v-if", !0), Oo(" " + xe(s.title), 1)]), y("button", {
3670
3670
  class: "opencode-session-delete-btn",
3671
3671
  type: "button",
3672
3672
  "aria-label": `删除会话: ${s.title}`,
3673
3673
  onClick: Vs((l) => i.handleDeleteSession(s), ["stop"])
3674
- }, " × ", 8, Yu)]), _("div", Xu, xe(s.meta), 1)], 10, Uu))), 128)) : (D(), j(fe, { key: 2 }, [ae(" Empty State "), ne(e.$slots, "empty")], 64))])], 2112))
3674
+ }, " × ", 8, Yu)]), y("div", Xu, xe(s.meta), 1)], 10, Uu))), 128)) : (D(), j(fe, { key: 2 }, [ae(" Empty State "), ne(e.$slots, "empty")], 64))])], 2112))
3675
3675
  ], 2);
3676
3676
  }
3677
3677
  Xs.render = Ju;
@@ -3698,13 +3698,13 @@ var Zu = Xs, Js = /* @__PURE__ */ Ye({
3698
3698
  }, ed = ["onClick"], td = { class: "opencode-node-content" }, nd = { class: "opencode-node-text" }, id = { class: "opencode-node-file" }, od = ["aria-label", "onClick"];
3699
3699
  function rd(e, t, n, i, o, r) {
3700
3700
  return D(), j("div", { class: Me(["opencode-right-toolbar", { collapsed: i.items.length === 0 }]) }, [
3701
- t[1] || (t[1] = _("div", { class: "opencode-selected-nodes-header" }, [_("div", { class: "opencode-selected-nodes-title" }, "已选节点"), _("div", { class: "opencode-selected-nodes-desc" }, "选中的节点会在对话时一起发送给助手")], -1)),
3702
- _("div", Qu, [(D(!0), j(fe, null, Wn(i.items, (s, l) => (D(), j("div", {
3701
+ t[1] || (t[1] = y("div", { class: "opencode-selected-nodes-header" }, [y("div", { class: "opencode-selected-nodes-title" }, "已选节点"), y("div", { class: "opencode-selected-nodes-desc" }, "选中的节点会在对话时一起发送给助手")], -1)),
3702
+ y("div", Qu, [(D(!0), j(fe, null, Wn(i.items, (s, l) => (D(), j("div", {
3703
3703
  key: s.key,
3704
3704
  class: "opencode-selected-node",
3705
3705
  role: "listitem",
3706
3706
  onClick: (a) => i.handleClickSelectedNode(s)
3707
- }, [_("div", td, [_("span", nd, xe(s.description), 1), _("span", id, xe(s.panelFileText), 1)]), _("button", {
3707
+ }, [y("div", td, [y("span", nd, xe(s.description), 1), y("span", id, xe(s.panelFileText), 1)]), y("button", {
3708
3708
  class: "opencode-node-remove",
3709
3709
  type: "button",
3710
3710
  "aria-label": `移除元素: ${s.description}`,
@@ -3769,10 +3769,10 @@ var sd = Js, ld = Object.defineProperty, ad = Object.defineProperties, cd = Obje
3769
3769
  v.preventDefault(), r.value = !0, s.value = v.clientX, l.value = i.width, o("resize-start"), document.addEventListener("mousemove", c), document.addEventListener("mouseup", u);
3770
3770
  }, c = (v) => {
3771
3771
  if (!r.value) return;
3772
- let y;
3773
- i.position === "right" ? y = s.value - v.clientX : y = v.clientX - s.value;
3774
- const g = Math.max(i.minWidth, Math.min(i.maxWidth, l.value + y));
3775
- o("resize", g);
3772
+ let b;
3773
+ i.position === "right" ? b = s.value - v.clientX : b = v.clientX - s.value;
3774
+ const m = Math.max(i.minWidth, Math.min(i.maxWidth, l.value + b));
3775
+ o("resize", m);
3776
3776
  }, u = () => {
3777
3777
  r.value = !1, o("resize-end"), document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u);
3778
3778
  }, f = () => {
@@ -3912,9 +3912,9 @@ var vd = Zs, gd = Object.defineProperty, md = Object.defineProperties, _d = Obje
3912
3912
  "-animationOrigin.x": v.animationOrigin.x,
3913
3913
  "-animationOrigin.y": v.animationOrigin.y
3914
3914
  }));
3915
- const i = e, o = n, r = ys(), s = /* @__PURE__ */ L(null), l = (v, y) => {
3916
- var g;
3917
- (g = s.value) == null || g.sendMessageToIframe(v, y);
3915
+ const i = e, o = n, r = ys(), s = /* @__PURE__ */ L(null), l = (v, b) => {
3916
+ var m;
3917
+ (m = s.value) == null || m.sendMessageToIframe(v, b);
3918
3918
  };
3919
3919
  t({
3920
3920
  sendMessageToIframe: l,
@@ -4025,23 +4025,23 @@ function Id(e, t, n, i, o, r) {
4025
4025
  "aria-expanded": n.open,
4026
4026
  "aria-label": "切换面板",
4027
4027
  onClick: i.handleToggle
4028
- }, [_("span", Td, [
4029
- n.open && n.splitPosition === "right" ? (D(), j("svg", Cd, [...t[0] || (t[0] = [_("path", {
4028
+ }, [y("span", Td, [
4029
+ n.open && n.splitPosition === "right" ? (D(), j("svg", Cd, [...t[0] || (t[0] = [y("path", {
4030
4030
  d: "M9 18l6-6-6-6",
4031
4031
  "stroke-linecap": "round",
4032
4032
  "stroke-linejoin": "round"
4033
4033
  }, null, -1)])])) : ae("v-if", !0),
4034
- !n.open && n.splitPosition === "right" ? (D(), j("svg", xd, [...t[1] || (t[1] = [_("path", {
4034
+ !n.open && n.splitPosition === "right" ? (D(), j("svg", xd, [...t[1] || (t[1] = [y("path", {
4035
4035
  d: "M15 18l-6-6 6-6",
4036
4036
  "stroke-linecap": "round",
4037
4037
  "stroke-linejoin": "round"
4038
4038
  }, null, -1)])])) : ae("v-if", !0),
4039
- n.open && n.splitPosition === "left" ? (D(), j("svg", Od, [...t[2] || (t[2] = [_("path", {
4039
+ n.open && n.splitPosition === "left" ? (D(), j("svg", Od, [...t[2] || (t[2] = [y("path", {
4040
4040
  d: "M15 18l-6-6 6-6",
4041
4041
  "stroke-linecap": "round",
4042
4042
  "stroke-linejoin": "round"
4043
4043
  }, null, -1)])])) : ae("v-if", !0),
4044
- !n.open && n.splitPosition === "left" ? (D(), j("svg", Pd, [...t[3] || (t[3] = [_("path", {
4044
+ !n.open && n.splitPosition === "left" ? (D(), j("svg", Pd, [...t[3] || (t[3] = [y("path", {
4045
4045
  d: "M9 18l6-6-6-6",
4046
4046
  "stroke-linecap": "round",
4047
4047
  "stroke-linejoin": "round"
@@ -4064,9 +4064,9 @@ function Id(e, t, n, i, o, r) {
4064
4064
  key: "2"
4065
4065
  } : void 0
4066
4066
  ]), 1024),
4067
- _("div", Md, [
4067
+ y("div", Md, [
4068
4068
  Pe(i.SessionList, null, {
4069
- empty: Se(() => [ne(e.$slots, "sessions-empty", {}, () => [t[4] || (t[4] = _("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
4069
+ empty: Se(() => [ne(e.$slots, "sessions-empty", {}, () => [t[4] || (t[4] = y("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
4070
4070
  _: 3
4071
4071
  }),
4072
4072
  Pe(i.Frame, { ref: "frameRef" }, di({ _: 2 }, [
@@ -4111,7 +4111,7 @@ var Ad = Qs, el = /* @__PURE__ */ Ye({
4111
4111
  }
4112
4112
  }), Rd = { class: "opencode-hint-shortcut" };
4113
4113
  function kd(e, t, n, i, o, r) {
4114
- return D(), j("div", { class: Me(["opencode-select-mode-hint", { visible: i.visible }]) }, [t[0] || (t[0] = ao('<span class="opencode-hint-main"><span class="opencode-hint-icon" aria-hidden="true"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8"></circle><circle cx="12" cy="12" r="2.5" fill="currentColor"></circle><line x1="12" y1="2" x2="12" y2="5"></line><line x1="12" y1="19" x2="12" y2="22"></line><line x1="2" y1="12" x2="5" y2="12"></line><line x1="19" y1="12" x2="22" y2="12"></line></svg></span><span class="opencode-hint-text">选择模式已开启 · 点击元素进行选择</span></span>', 1)), _("span", Rd, xe(i.shortcutLabel), 1)], 2);
4114
+ return D(), j("div", { class: Me(["opencode-select-mode-hint", { visible: i.visible }]) }, [t[0] || (t[0] = ao('<span class="opencode-hint-main"><span class="opencode-hint-icon" aria-hidden="true"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8"></circle><circle cx="12" cy="12" r="2.5" fill="currentColor"></circle><line x1="12" y1="2" x2="12" y2="5"></line><line x1="12" y1="19" x2="12" y2="22"></line><line x1="2" y1="12" x2="5" y2="12"></line><line x1="19" y1="12" x2="22" y2="12"></line></svg></span><span class="opencode-hint-text">选择模式已开启 · 点击元素进行选择</span></span>', 1)), y("span", Rd, xe(i.shortcutLabel), 1)], 2);
4115
4115
  }
4116
4116
  el.render = kd;
4117
4117
  var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Object.getOwnPropertyDescriptors, Er = Object.getOwnPropertySymbols, Fd = Object.prototype.hasOwnProperty, Bd = Object.prototype.propertyIsEnumerable, Tr = (e, t, n) => t in e ? Ld(e, t, {
@@ -4171,7 +4171,7 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4171
4171
  right: u.value - s.value.width - a.value,
4172
4172
  bottom: f.value - s.value.height - c.value,
4173
4173
  left: a.value
4174
- })), v = (N, U) => N.reduce((ie, Y) => Math.abs(ie - U) < Math.abs(Y - U) ? ie : Y), y = () => {
4174
+ })), v = (N, U) => N.reduce((ie, Y) => Math.abs(ie - U) < Math.abs(Y - U) ? ie : Y), b = () => {
4175
4175
  if (i.magnetic === "x") if (S.value === "left") s.value.x = p.value.left;
4176
4176
  else if (S.value === "right") s.value.x = p.value.right;
4177
4177
  else {
@@ -4182,9 +4182,9 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4182
4182
  const N = v([p.value.top, p.value.bottom], s.value.y);
4183
4183
  s.value.y = N;
4184
4184
  }
4185
- }, g = /* @__PURE__ */ L(!1), T = /* @__PURE__ */ L(!1), S = /* @__PURE__ */ L(null), P = q(() => {
4185
+ }, m = /* @__PURE__ */ L(!1), _ = /* @__PURE__ */ L(!1), S = /* @__PURE__ */ L(null), P = q(() => {
4186
4186
  const N = {};
4187
- return N.transform = `translate3d(${`${s.value.x}px`}, ${`${s.value.y}px`}, 0)`, g.value || !T.value ? N.transition = "none" : N.transition = "transform 0.3s ease", N;
4187
+ return N.transform = `translate3d(${`${s.value.x}px`}, ${`${s.value.y}px`}, 0)`, m.value || !_.value ? N.transition = "none" : N.transition = "transform 0.3s ease", N;
4188
4188
  }), V = () => {
4189
4189
  if (!r.value || typeof window > "u") return;
4190
4190
  const N = r.value.getBoundingClientRect(), { offset: U } = i;
@@ -4197,14 +4197,14 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4197
4197
  y: Y,
4198
4198
  width: N.width,
4199
4199
  height: N.height
4200
- }, !g.value && (i.magnetic === "x" && S.value ? S.value === "left" ? s.value.x = p.value.left : s.value.x = p.value.right : y(), s.value.x !== Je || s.value.y !== Ke)) {
4200
+ }, !m.value && (i.magnetic === "x" && S.value ? S.value === "left" ? s.value.x = p.value.left : s.value.x = p.value.right : b(), s.value.x !== Je || s.value.y !== Ke)) {
4201
4201
  const Ne = {
4202
4202
  x: s.value.x,
4203
4203
  y: s.value.y
4204
4204
  };
4205
4205
  o("update:offset", Ne), o("offset-change", Ne);
4206
4206
  }
4207
- }, b = {
4207
+ }, w = {
4208
4208
  startX: /* @__PURE__ */ L(0),
4209
4209
  startY: /* @__PURE__ */ L(0),
4210
4210
  deltaX: /* @__PURE__ */ L(0),
@@ -4224,17 +4224,17 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4224
4224
  };
4225
4225
  let z = 0, G = 0;
4226
4226
  const A = (N) => {
4227
- b.start(N), g.value = !0, z = s.value.x, G = s.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in N || (window.addEventListener("mousemove", W, { passive: !1 }), window.addEventListener("mouseup", F));
4227
+ w.start(N), m.value = !0, z = s.value.x, G = s.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in N || (window.addEventListener("mousemove", W, { passive: !1 }), window.addEventListener("mouseup", F));
4228
4228
  }, W = (N) => {
4229
4229
  N.cancelable && N.preventDefault();
4230
- const U = b.isTap.value;
4231
- if (b.move(N), U && !b.isTap.value && o("drag-start"), i.axis !== "lock" && !b.isTap.value) {
4230
+ const U = w.isTap.value;
4231
+ if (w.move(N), U && !w.isTap.value && o("drag-start"), i.axis !== "lock" && !w.isTap.value) {
4232
4232
  if (i.axis === "x" || i.axis === "xy") {
4233
- let Y = z + b.deltaX.value;
4233
+ let Y = z + w.deltaX.value;
4234
4234
  Y < p.value.left && (Y = p.value.left), Y > p.value.right && (Y = p.value.right), s.value.x = Y;
4235
4235
  }
4236
4236
  if (i.axis === "y" || i.axis === "xy") {
4237
- let Y = G + b.deltaY.value;
4237
+ let Y = G + w.deltaY.value;
4238
4238
  Y < p.value.top && (Y = p.value.top), Y > p.value.bottom && (Y = p.value.bottom), s.value.y = Y;
4239
4239
  }
4240
4240
  const ie = {
@@ -4244,12 +4244,12 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4244
4244
  o("update:offset", ie);
4245
4245
  }
4246
4246
  }, F = (N) => {
4247
- g.value = !1, document.body.classList.remove("floating-bubble-dragging"), N && !("touches" in N) && N.type === "mouseup" && (window.removeEventListener("mousemove", W), window.removeEventListener("mouseup", F)), requestAnimationFrame(() => {
4248
- if (i.magnetic === "x" && !b.isTap.value) {
4247
+ m.value = !1, document.body.classList.remove("floating-bubble-dragging"), N && !("touches" in N) && N.type === "mouseup" && (window.removeEventListener("mousemove", W), window.removeEventListener("mouseup", F)), requestAnimationFrame(() => {
4248
+ if (i.magnetic === "x" && !w.isTap.value) {
4249
4249
  const U = s.value.x + s.value.width / 2, ie = u.value / 2;
4250
4250
  S.value = U < ie ? "left" : "right";
4251
4251
  }
4252
- if (y(), !b.isTap.value) {
4252
+ if (b(), !w.isTap.value) {
4253
4253
  o("drag-end");
4254
4254
  const U = {
4255
4255
  x: s.value.x,
@@ -4259,13 +4259,13 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4259
4259
  }
4260
4260
  });
4261
4261
  }, Q = (N) => {
4262
- b.isTap.value ? o("click", N) : N.stopPropagation();
4262
+ w.isTap.value ? o("click", N) : N.stopPropagation();
4263
4263
  }, J = () => {
4264
4264
  typeof window < "u" && (u.value = window.innerWidth, f.value = window.innerHeight);
4265
4265
  };
4266
4266
  Xe(() => {
4267
4267
  V(), requestAnimationFrame(() => {
4268
- T.value = !0;
4268
+ _.value = !0;
4269
4269
  }), typeof window < "u" && window.addEventListener("resize", J), r.value && r.value.addEventListener("touchmove", W, { passive: !1 });
4270
4270
  }), qe(() => {
4271
4271
  document.body.classList.remove("floating-bubble-dragging"), typeof window < "u" && (window.removeEventListener("resize", J), window.removeEventListener("mousemove", W), window.removeEventListener("mouseup", F)), r.value && r.value.removeEventListener("touchmove", W);
@@ -4292,13 +4292,13 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4292
4292
  windowHeight: f,
4293
4293
  boundary: p,
4294
4294
  closest: v,
4295
- applyMagnetic: y,
4296
- dragging: g,
4297
- initialized: T,
4295
+ applyMagnetic: b,
4296
+ dragging: m,
4297
+ initialized: _,
4298
4298
  magneticSide: S,
4299
4299
  rootStyle: P,
4300
4300
  updateState: V,
4301
- touch: b,
4301
+ touch: w,
4302
4302
  get prevX() {
4303
4303
  return z;
4304
4304
  },
@@ -4324,7 +4324,7 @@ var Nd = el, Ld = Object.defineProperty, Dd = Object.defineProperties, $d = Obje
4324
4324
  }
4325
4325
  }));
4326
4326
  function Vd(e, t, n, i, o, r) {
4327
- return D(), xt(ms, { to: n.teleport }, [_("div", {
4327
+ return D(), xt(ms, { to: n.teleport }, [y("div", {
4328
4328
  ref: "rootRef",
4329
4329
  class: "floating-bubble",
4330
4330
  style: qt(i.rootStyle),
@@ -4392,13 +4392,13 @@ var Kd = nl, il = /* @__PURE__ */ Ye({
4392
4392
  __name: "Trigger",
4393
4393
  emits: ["drag-start", "drag-end"],
4394
4394
  setup(e, { expose: t, emit: n }) {
4395
- const { buttonActive: i, open: o, hotkeyLabel: r, thinking: s, resolvedTheme: l, handleToggle: a, bubbleOffset: c, handleBubbleOffsetChange: u } = mn(), f = /* @__PURE__ */ L(c.value), p = n, v = (g) => {
4396
- f.value = g, u(g);
4395
+ const { buttonActive: i, open: o, hotkeyLabel: r, thinking: s, resolvedTheme: l, handleToggle: a, bubbleOffset: c, handleBubbleOffsetChange: u } = mn(), f = /* @__PURE__ */ L(c.value), p = n, v = (m) => {
4396
+ f.value = m, u(m);
4397
4397
  };
4398
- Ie(c, (g) => {
4399
- f.value = g;
4398
+ Ie(c, (m) => {
4399
+ f.value = m;
4400
4400
  }), t({ offset: f });
4401
- const y = {
4401
+ const b = {
4402
4402
  active: i,
4403
4403
  open: o,
4404
4404
  hotkeyLabel: r,
@@ -4413,10 +4413,10 @@ var Kd = nl, il = /* @__PURE__ */ Ye({
4413
4413
  FloatingBubble: Hd,
4414
4414
  OpenCodeLogo: Kd
4415
4415
  };
4416
- return Object.defineProperty(y, "__isScriptSetup", {
4416
+ return Object.defineProperty(b, "__isScriptSetup", {
4417
4417
  enumerable: !1,
4418
4418
  value: !0
4419
- }), y;
4419
+ }), b;
4420
4420
  }
4421
4421
  }), Gd = ["aria-expanded", "title"];
4422
4422
  function Yd(e, t, n, i, o, r) {
@@ -4432,7 +4432,7 @@ function Yd(e, t, n, i, o, r) {
4432
4432
  onDragStart: t[1] || (t[1] = (s) => i.emit("drag-start")),
4433
4433
  onDragEnd: t[2] || (t[2] = (s) => i.emit("drag-end"))
4434
4434
  }, {
4435
- default: Se(() => [_("button", {
4435
+ default: Se(() => [y("button", {
4436
4436
  class: Me(["opencode-button", {
4437
4437
  active: i.active,
4438
4438
  thinking: i.thinking,
@@ -4514,14 +4514,14 @@ function tf(e) {
4514
4514
  const f = document.createElement("div");
4515
4515
  f.className = "opencode-element-highlight-temp";
4516
4516
  const p = document.querySelector(".opencode-widget");
4517
- let v = "#3b82f6", y = "rgba(59, 130, 246, 0.1)";
4517
+ let v = "#3b82f6", b = "rgba(59, 130, 246, 0.1)";
4518
4518
  if (p) {
4519
- const T = getComputedStyle(p);
4520
- v = T.getPropertyValue("--oc-primary").trim() || v, y = T.getPropertyValue("--oc-primary-bg").trim() || y;
4519
+ const _ = getComputedStyle(p);
4520
+ v = _.getPropertyValue("--oc-primary").trim() || v, b = _.getPropertyValue("--oc-primary-bg").trim() || b;
4521
4521
  }
4522
- f.style.border = `2px solid ${v}`, f.style.background = y;
4523
- const g = u.getBoundingClientRect();
4524
- f.style.top = `${g.top + window.scrollY}px`, f.style.left = `${g.left + window.scrollX}px`, f.style.width = `${g.width}px`, f.style.height = `${g.height}px`, document.body.appendChild(f), setTimeout(() => {
4522
+ f.style.border = `2px solid ${v}`, f.style.background = b;
4523
+ const m = u.getBoundingClientRect();
4524
+ f.style.top = `${m.top + window.scrollY}px`, f.style.left = `${m.left + window.scrollX}px`, f.style.width = `${m.width}px`, f.style.height = `${m.height}px`, document.body.appendChild(f), setTimeout(() => {
4525
4525
  f.remove();
4526
4526
  }, 2e3);
4527
4527
  }
@@ -4609,21 +4609,21 @@ function sf(e) {
4609
4609
  }
4610
4610
  let i = null, o = null;
4611
4611
  Xe(() => {
4612
- typeof window > "u" || (t.value = n(), i = window.matchMedia("(prefers-color-scheme: dark)"), o = (g) => {
4613
- t.value = g.matches ? "dark" : "light";
4612
+ typeof window > "u" || (t.value = n(), i = window.matchMedia("(prefers-color-scheme: dark)"), o = (m) => {
4613
+ t.value = m.matches ? "dark" : "light";
4614
4614
  }, i.addEventListener("change", o));
4615
4615
  }), qe(() => {
4616
4616
  i && o && i.removeEventListener("change", o);
4617
4617
  });
4618
4618
  const r = q(() => e.theme.value === "auto" ? t.value : e.theme.value), s = q(() => ["opencode-widget", `opencode-theme-${r.value}`]), l = q(() => !!(e.open.value || e.selectMode.value)), a = q(() => e.iframeSrc.value || "about:blank"), c = q(() => e.sessionListCollapsed.value ? "展开会话列表" : "折叠会话列表");
4619
4619
  function u() {
4620
- var g;
4620
+ var m;
4621
4621
  if (e.selectMode.value) {
4622
- (g = e.onToggleSelectMode) == null || g.call(e, !1);
4622
+ (m = e.onToggleSelectMode) == null || m.call(e, !1);
4623
4623
  return;
4624
4624
  }
4625
- const T = !e.open.value;
4626
- e.onToggle(T);
4625
+ const _ = !e.open.value;
4626
+ e.onToggle(_);
4627
4627
  }
4628
4628
  function f() {
4629
4629
  e.onClose();
@@ -4634,10 +4634,10 @@ function sf(e) {
4634
4634
  function v() {
4635
4635
  e.onEmptyAction();
4636
4636
  }
4637
- function y() {
4638
- var g;
4639
- const T = (Yi.indexOf(e.theme.value) + 1) % Yi.length, S = Yi[T];
4640
- (g = e.onToggleTheme) == null || g.call(e, S);
4637
+ function b() {
4638
+ var m;
4639
+ const _ = (Yi.indexOf(e.theme.value) + 1) % Yi.length, S = Yi[_];
4640
+ (m = e.onToggleTheme) == null || m.call(e, S);
4641
4641
  }
4642
4642
  return {
4643
4643
  buttonActive: l,
@@ -4649,7 +4649,7 @@ function sf(e) {
4649
4649
  handleEmptyAction: v,
4650
4650
  handleToggle: u,
4651
4651
  handleToggleSessionList: p,
4652
- handleToggleTheme: y
4652
+ handleToggleTheme: b
4653
4653
  };
4654
4654
  }
4655
4655
  function ol(e) {
@@ -5274,17 +5274,17 @@ function Ch(e) {
5274
5274
  fileInfo: ""
5275
5275
  }), s = 500;
5276
5276
  let l = null, a = "#3b82f6", c = "rgba(59, 130, 246, 0.1)";
5277
- function u(T) {
5278
- T.forEach((S) => {
5277
+ function u(_) {
5278
+ _.forEach((S) => {
5279
5279
  S && (S.style.pointerEvents = "none");
5280
5280
  });
5281
5281
  }
5282
- function f(T) {
5283
- T.forEach((S) => {
5282
+ function f(_) {
5283
+ _.forEach((S) => {
5284
5284
  S && (S.style.pointerEvents = "");
5285
5285
  });
5286
5286
  }
5287
- function p(T) {
5287
+ function p(_) {
5288
5288
  if (!e.selectMode.value) return;
5289
5289
  const S = [
5290
5290
  document.querySelector(".opencode-element-highlight"),
@@ -5293,11 +5293,11 @@ function Ch(e) {
5293
5293
  document.querySelector(".floating-bubble")
5294
5294
  ];
5295
5295
  u(S);
5296
- const P = Pr(T), V = Mr(T, P);
5296
+ const P = Pr(_), V = Mr(_, P);
5297
5297
  if (f(S), P) {
5298
- const b = document.querySelector(".opencode-widget");
5299
- if (b) {
5300
- const U = getComputedStyle(b);
5298
+ const w = document.querySelector(".opencode-widget");
5299
+ if (w) {
5300
+ const U = getComputedStyle(w);
5301
5301
  a = U.getPropertyValue("--oc-primary").trim() || a, c = U.getPropertyValue("--oc-primary-bg").trim() || c;
5302
5302
  }
5303
5303
  const z = Or(P), G = V.file ? V.file.split("/").pop() : "";
@@ -5343,8 +5343,8 @@ function Ch(e) {
5343
5343
  }
5344
5344
  ];
5345
5345
  for (const h of d) {
5346
- const m = h.left + ie, O = h.top + Y;
5347
- if (m <= F.left || F.right <= h.left || O <= F.top || F.bottom <= h.top) {
5346
+ const g = h.left + ie, O = h.top + Y;
5347
+ if (g <= F.left || F.right <= h.left || O <= F.top || F.bottom <= h.top) {
5348
5348
  $e = h.top, Fe = h.left, ye = !0;
5349
5349
  break;
5350
5350
  }
@@ -5361,18 +5361,18 @@ function Ch(e) {
5361
5361
  t.value = !1, i.value = !1;
5362
5362
  }
5363
5363
  const v = p;
5364
- function y() {
5365
- const T = window.__VUE_INSPECTOR__;
5366
- if (!T || T.__opencode_hooked) return;
5367
- const S = T.handleClick.bind(T);
5368
- T.handleClick = function(P) {
5364
+ function b() {
5365
+ const _ = window.__VUE_INSPECTOR__;
5366
+ if (!_ || _.__opencode_hooked) return;
5367
+ const S = _.handleClick.bind(_);
5368
+ _.handleClick = function(P) {
5369
5369
  if (e.selectMode.value) {
5370
5370
  const V = P.target instanceof Element ? P.target : null;
5371
- if (V && V.closest(".opencode-widget")) return S.call(T, P);
5371
+ if (V && V.closest(".opencode-widget")) return S.call(_, P);
5372
5372
  P.preventDefault(), P.stopPropagation();
5373
- const b = Pr(P), z = Mr(P, b);
5374
- if (b) {
5375
- const G = vh(b), A = Or(b), W = {
5373
+ const w = Pr(P), z = Mr(P, w);
5374
+ if (w) {
5375
+ const G = vh(w), A = Or(w), W = {
5376
5376
  filePath: z.file,
5377
5377
  line: z.line,
5378
5378
  column: z.column,
@@ -5383,21 +5383,21 @@ function Ch(e) {
5383
5383
  }
5384
5384
  return;
5385
5385
  }
5386
- return S.call(T, P);
5387
- }, T.__opencode_hooked = !0;
5386
+ return S.call(_, P);
5387
+ }, _.__opencode_hooked = !0;
5388
5388
  }
5389
- function g(T) {
5390
- T.key === "Escape" && e.selectMode.value && (T.preventDefault(), T.stopPropagation(), e.onExitSelectMode());
5389
+ function m(_) {
5390
+ _.key === "Escape" && e.selectMode.value && (_.preventDefault(), _.stopPropagation(), e.onExitSelectMode());
5391
5391
  }
5392
- return Ie(e.selectMode, (T) => {
5392
+ return Ie(e.selectMode, (_) => {
5393
5393
  const S = window.__VUE_INSPECTOR__;
5394
- T ? (S && S.enable(), document.addEventListener("mousemove", v), document.addEventListener("keydown", g, !0)) : (S && S.disable(), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", g, !0), t.value = !1, i.value = !1);
5394
+ _ ? (S && S.enable(), document.addEventListener("mousemove", v), document.addEventListener("keydown", m, !0)) : (S && S.disable(), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", m, !0), t.value = !1, i.value = !1);
5395
5395
  }), Xe(() => {
5396
- window.__VUE_INSPECTOR__ ? y() : l = window.setInterval(() => {
5397
- window.__VUE_INSPECTOR__ && (y(), l && (window.clearInterval(l), l = null));
5396
+ window.__VUE_INSPECTOR__ ? b() : l = window.setInterval(() => {
5397
+ window.__VUE_INSPECTOR__ && (b(), l && (window.clearInterval(l), l = null));
5398
5398
  }, s);
5399
5399
  }), qe(() => {
5400
- l && window.clearInterval(l), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", g, !0);
5400
+ l && window.clearInterval(l), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", m, !0);
5401
5401
  }), {
5402
5402
  highlightVisible: t,
5403
5403
  highlightStyle: n,
@@ -5467,13 +5467,13 @@ var Mh = 1440;
5467
5467
  function Ih(e) {
5468
5468
  var t, n;
5469
5469
  const i = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), o = /* @__PURE__ */ L((n = (t = e.splitPosition) == null ? void 0 : t.value) != null ? n : "right"), r = q(() => e.displayMode.value === "extension"), s = q(() => r.value || e.displayMode.value === "extension-selector"), l = q(() => {
5470
- var S, P, V, b, z, G, A;
5470
+ var S, P, V, w, z, G, A;
5471
5471
  const W = e.splitMode.value || {}, F = r.value;
5472
5472
  return {
5473
5473
  width: (S = W.width) != null ? S : 500,
5474
5474
  minWidth: (P = W.minWidth) != null ? P : 400,
5475
5475
  maxWidth: (V = W.maxWidth) != null ? V : 800,
5476
- resizable: F ? !1 : (b = W.resizable) != null ? b : !0,
5476
+ resizable: F ? !1 : (w = W.resizable) != null ? w : !0,
5477
5477
  shrinkPage: F ? !1 : (z = W.shrinkPage) != null ? z : !0,
5478
5478
  defaultOpen: F ? !0 : (G = W.defaultOpen) != null ? G : !0,
5479
5479
  position: (A = W.position) != null ? A : o.value
@@ -5485,13 +5485,13 @@ function Ih(e) {
5485
5485
  var S;
5486
5486
  const P = !e.open.value;
5487
5487
  (S = e.onOpenChange) == null || S.call(e, P);
5488
- }, y = () => {
5488
+ }, b = () => {
5489
5489
  var S;
5490
5490
  const P = o.value === "right" ? "left" : "right";
5491
5491
  o.value = P, (S = e.onPositionChange) == null || S.call(e, P);
5492
- }, g = () => {
5492
+ }, m = () => {
5493
5493
  typeof window < "u" && (i.value = window.innerWidth);
5494
- }, T = () => {
5494
+ }, _ = () => {
5495
5495
  if (!(typeof document > "u")) {
5496
5496
  if (s.value) {
5497
5497
  document.body.classList.remove("has-opencode-split"), document.body.classList.remove("has-opencode-split-left"), document.body.classList.remove("has-opencode-split-right"), document.body.style.removeProperty("--opencode-split-width");
@@ -5505,7 +5505,7 @@ function Ih(e) {
5505
5505
  e.open,
5506
5506
  a,
5507
5507
  f
5508
- ], T, { immediate: !0 }), Ie(l, (S) => {
5508
+ ], _, { immediate: !0 }), Ie(l, (S) => {
5509
5509
  a.value < S.minWidth && (a.value = S.minWidth), a.value > S.maxWidth && (a.value = S.maxWidth);
5510
5510
  }), Ie(() => {
5511
5511
  var S;
@@ -5514,9 +5514,9 @@ function Ih(e) {
5514
5514
  S && S !== o.value && (o.value = S);
5515
5515
  }), Xe(() => {
5516
5516
  var S;
5517
- typeof window < "u" && (window.addEventListener("resize", g), !r.value && u.value && l.value.defaultOpen && !e.open.value && ((S = e.onOpenChange) == null || S.call(e, !0)));
5517
+ typeof window < "u" && (window.addEventListener("resize", m), !r.value && u.value && l.value.defaultOpen && !e.open.value && ((S = e.onOpenChange) == null || S.call(e, !0)));
5518
5518
  }), qe(() => {
5519
- typeof window < "u" && (window.removeEventListener("resize", g), r.value || (document.body.classList.remove("has-opencode-split"), document.body.classList.remove("has-opencode-split-left"), document.body.classList.remove("has-opencode-split-right"), document.body.style.removeProperty("--opencode-split-width")));
5519
+ typeof window < "u" && (window.removeEventListener("resize", m), r.value || (document.body.classList.remove("has-opencode-split"), document.body.classList.remove("has-opencode-split-left"), document.body.classList.remove("has-opencode-split-right"), document.body.style.removeProperty("--opencode-split-width")));
5520
5520
  }), {
5521
5521
  effectiveMode: c,
5522
5522
  isSplitMode: u,
@@ -5526,7 +5526,7 @@ function Ih(e) {
5526
5526
  splitPosition: f,
5527
5527
  handleResize: p,
5528
5528
  handleToggle: v,
5529
- handleTogglePosition: y
5529
+ handleTogglePosition: b
5530
5530
  };
5531
5531
  }
5532
5532
  var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwnPropertyDescriptors, Ir = Object.getOwnPropertySymbols, Nh = Object.prototype.hasOwnProperty, Lh = Object.prototype.propertyIsEnumerable, Ar = (e, t, n) => t in e ? Ah(e, t, {
@@ -5714,15 +5714,15 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5714
5714
  a.value = C, c.value = !0, u.value = Ot, f && clearTimeout(f), f = setTimeout(() => {
5715
5715
  c.value = !1;
5716
5716
  }, dt);
5717
- }, v = /* @__PURE__ */ L(!1), y = /* @__PURE__ */ L("");
5718
- let g = null;
5719
- const T = (C) => (y.value = C, v.value = !0, new Promise((Ce) => {
5720
- g = Ce;
5717
+ }, v = /* @__PURE__ */ L(!1), b = /* @__PURE__ */ L("");
5718
+ let m = null;
5719
+ const _ = (C) => (b.value = C, v.value = !0, new Promise((Ce) => {
5720
+ m = Ce;
5721
5721
  })), S = () => {
5722
- v.value = !1, g && g(!0);
5722
+ v.value = !1, m && m(!0);
5723
5723
  }, P = () => {
5724
- v.value = !1, g && g(!1);
5725
- }, V = /* @__PURE__ */ L(null), b = /* @__PURE__ */ L(null), z = (C, Ce) => {
5724
+ v.value = !1, m && m(!1);
5725
+ }, V = /* @__PURE__ */ L(null), w = /* @__PURE__ */ L(null), z = (C, Ce) => {
5726
5726
  var dt;
5727
5727
  (dt = V.value) == null || dt.sendMessageToIframe(C, Ce);
5728
5728
  }, G = /* @__PURE__ */ L(r.sessionListCollapsed), A = /* @__PURE__ */ L(r.displayMode), W = /* @__PURE__ */ L((o = (i = r.splitMode) == null ? void 0 : i.position) != null ? o : "right"), F = /* @__PURE__ */ L(!1), Q = /* @__PURE__ */ L(!0), J = /* @__PURE__ */ L(!1), We = /* @__PURE__ */ L(!0), N = /* @__PURE__ */ L(!1), U = /* @__PURE__ */ L(!1), ie = /* @__PURE__ */ L(r.splitPanelWidth), Y = () => {
@@ -5777,8 +5777,8 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5777
5777
  s("update:currentSessionId", C.id), s("select-session", C);
5778
5778
  },
5779
5779
  onDeleteSession: (C) => s("delete-session", C),
5780
- showConfirmDialog: T
5781
- }), { bubbleVisible: d, hasSelectedElements: h, selectedElementItems: m, handleClearSelectedNodes: O, handleClickSelectedNode: E, handleRemoveSelectedNode: w, handleToggleSelectMode: k } = tf({
5780
+ showConfirmDialog: _
5781
+ }), { bubbleVisible: d, hasSelectedElements: h, selectedElementItems: g, handleClearSelectedNodes: O, handleClickSelectedNode: T, handleRemoveSelectedNode: E, handleToggleSelectMode: k } = tf({
5782
5782
  selectMode: /* @__PURE__ */ le(r, "selectMode"),
5783
5783
  selectedElements: /* @__PURE__ */ le(r, "selectedElements"),
5784
5784
  onToggleSelectMode: (C) => {
@@ -5792,7 +5792,7 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5792
5792
  onClearSelectedNodes: () => {
5793
5793
  s("clear-selected-nodes"), s("update:selectedElements", []);
5794
5794
  },
5795
- showConfirmDialog: T
5795
+ showConfirmDialog: _
5796
5796
  }), { highlightVisible: R, highlightStyle: I, tooltipVisible: x, tooltipStyle: H, tooltipContent: $ } = Ch({
5797
5797
  selectMode: /* @__PURE__ */ le(r, "selectMode"),
5798
5798
  onAddSelectedNode: (C) => {
@@ -5864,7 +5864,7 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5864
5864
  const te = q(() => {
5865
5865
  var C, Ce, dt, Ot;
5866
5866
  if (typeof window > "u") return "bottom-right";
5867
- const Gt = et.value / 2, Vt = ut.value / 2, Pt = 44, lt = (Ce = (C = b.value) == null ? void 0 : C.offset) != null ? Ce : B.value, Yt = ((dt = lt?.x) != null ? dt : et.value - Pt - 24) + Pt / 2, _t = ((Ot = lt?.y) != null ? Ot : ut.value - Pt - 24) + Pt / 2;
5867
+ const Gt = et.value / 2, Vt = ut.value / 2, Pt = 44, lt = (Ce = (C = w.value) == null ? void 0 : C.offset) != null ? Ce : B.value, Yt = ((dt = lt?.x) != null ? dt : et.value - Pt - 24) + Pt / 2, _t = ((Ot = lt?.y) != null ? Ot : ut.value - Pt - 24) + Pt / 2;
5868
5868
  return Yt >= Gt && _t >= Vt ? "bottom-right" : Yt < Gt && _t >= Vt ? "bottom-left" : Yt >= Gt && _t < Vt ? "top-right" : "top-left";
5869
5869
  }), yn = q(() => {
5870
5870
  const C = te.value;
@@ -5872,7 +5872,7 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5872
5872
  }), Ni = q(() => {
5873
5873
  var C, Ce, dt;
5874
5874
  if (typeof window > "u") return {};
5875
- const Ot = F.value ? 300 : 700, Gt = F.value ? 300 : Math.min(ut.value * 0.86, ut.value - 40), Vt = 24, Pt = 44, lt = 20, Yt = (dt = (Ce = (C = b.value) == null ? void 0 : C.offset) != null ? Ce : B.value) != null ? dt : {
5875
+ const Ot = F.value ? 300 : 700, Gt = F.value ? 300 : Math.min(ut.value * 0.86, ut.value - 40), Vt = 24, Pt = 44, lt = 20, Yt = (dt = (Ce = (C = w.value) == null ? void 0 : C.offset) != null ? Ce : B.value) != null ? dt : {
5876
5876
  x: et.value - Pt - Vt,
5877
5877
  y: ut.value - Pt - Vt
5878
5878
  }, _t = {};
@@ -5961,7 +5961,7 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5961
5961
  bubbleVisible: d,
5962
5962
  hasSelectedElements: h,
5963
5963
  sessionItems: Fe,
5964
- selectedElementItems: m,
5964
+ selectedElementItems: g,
5965
5965
  handleToggle: Ge,
5966
5966
  handleClose: mt,
5967
5967
  handleToggleMinimize: Kt,
@@ -5976,15 +5976,15 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
5976
5976
  handleSelectSession: Qe,
5977
5977
  handleDeleteSession: Ze,
5978
5978
  handleToggleSelectMode: k,
5979
- handleClickSelectedNode: E,
5980
- handleRemoveSelectedNode: (C) => w(C.item, C.index, C.source),
5979
+ handleClickSelectedNode: T,
5980
+ handleRemoveSelectedNode: (C) => E(C.item, C.index, C.source),
5981
5981
  handleClearSelectedNodes: O,
5982
5982
  handleFrameLoaded: ee,
5983
5983
  handleBubbleOffsetChange: Ao,
5984
5984
  handleRefresh: Wt
5985
5985
  }), t({
5986
5986
  showNotification: p,
5987
- showConfirmDialog: T,
5987
+ showConfirmDialog: _,
5988
5988
  sendMessageToIframe: z,
5989
5989
  isSplitMode: Z
5990
5990
  });
@@ -6003,18 +6003,18 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
6003
6003
  },
6004
6004
  showNotification: p,
6005
6005
  dialogVisible: v,
6006
- dialogMessage: y,
6006
+ dialogMessage: b,
6007
6007
  get dialogResolve() {
6008
- return g;
6008
+ return m;
6009
6009
  },
6010
6010
  set dialogResolve(C) {
6011
- g = C;
6011
+ m = C;
6012
6012
  },
6013
- showConfirmDialog: T,
6013
+ showConfirmDialog: _,
6014
6014
  handleDialogConfirm: S,
6015
6015
  handleDialogCancel: P,
6016
6016
  frameRef: V,
6017
- triggerRef: b,
6017
+ triggerRef: w,
6018
6018
  sendMessageToIframe: z,
6019
6019
  localSessionListCollapsed: G,
6020
6020
  localDisplayMode: A,
@@ -6045,10 +6045,10 @@ var Ah = Object.defineProperty, Rh = Object.defineProperties, kh = Object.getOwn
6045
6045
  handleSelectSession: Qe,
6046
6046
  bubbleVisible: d,
6047
6047
  hasSelectedElements: h,
6048
- selectedElementItems: m,
6048
+ selectedElementItems: g,
6049
6049
  handleClearSelectedNodes: O,
6050
- handleClickSelectedNode: E,
6051
- handleRemoveSelectedNode: w,
6050
+ handleClickSelectedNode: T,
6051
+ handleRemoveSelectedNode: E,
6052
6052
  handleToggleSelectMode: k,
6053
6053
  highlightVisible: R,
6054
6054
  highlightStyle: I,
@@ -6141,7 +6141,7 @@ function zh(e, t, n, i, o, r) {
6141
6141
  onResizeEnd: i.handleResizeEnd,
6142
6142
  onToggle: i.handleSplitToggle
6143
6143
  }, di({
6144
- "sessions-empty": Se(() => [ne(e.$slots, "sessions-empty", {}, () => [t[0] || (t[0] = _("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
6144
+ "sessions-empty": Se(() => [ne(e.$slots, "sessions-empty", {}, () => [t[0] || (t[0] = y("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
6145
6145
  _: 2
6146
6146
  }, [
6147
6147
  i.slots["session-toggle-icon"] ? {
@@ -6200,18 +6200,18 @@ function zh(e, t, n, i, o, r) {
6200
6200
  ]),
6201
6201
  Pe(i.SelectHint)
6202
6202
  ], 64)) : ae("v-if", !0),
6203
- io(_("div", {
6203
+ io(y("div", {
6204
6204
  class: "opencode-element-highlight",
6205
6205
  style: qt(i.highlightStyle)
6206
6206
  }, null, 4), [[Qo, i.highlightVisible]]),
6207
- io(_("div", {
6207
+ io(y("div", {
6208
6208
  class: "opencode-element-tooltip",
6209
6209
  style: qt(i.tooltipStyle)
6210
- }, [_("div", Fh, xe(i.tooltipContent.description), 1), _("div", Bh, xe(i.tooltipContent.fileInfo), 1)], 4), [[Qo, i.tooltipVisible]]),
6211
- i.dialogVisible ? (D(), j("div", jh, [_("div", Wh, [_("div", Vh, [_("div", Hh, xe(i.dialogMessage), 1)]), _("div", { class: "opencode-dialog-actions" }, [_("button", {
6210
+ }, [y("div", Fh, xe(i.tooltipContent.description), 1), y("div", Bh, xe(i.tooltipContent.fileInfo), 1)], 4), [[Qo, i.tooltipVisible]]),
6211
+ i.dialogVisible ? (D(), j("div", jh, [y("div", Wh, [y("div", Vh, [y("div", Hh, xe(i.dialogMessage), 1)]), y("div", { class: "opencode-dialog-actions" }, [y("button", {
6212
6212
  class: "opencode-dialog-btn cancel",
6213
6213
  onClick: i.handleDialogCancel
6214
- }, "取消"), _("button", {
6214
+ }, "取消"), y("button", {
6215
6215
  class: "opencode-dialog-btn confirm",
6216
6216
  onClick: i.handleDialogConfirm
6217
6217
  }, "确认")])])])) : ae("v-if", !0),
@@ -6267,7 +6267,7 @@ function wl(e) {
6267
6267
  c?.(P.data);
6268
6268
  }
6269
6269
  }
6270
- function y() {
6270
+ function b() {
6271
6271
  if (!(u.value || f.value === "connecting")) {
6272
6272
  if (i?.value === !1) {
6273
6273
  f.value = "idle";
@@ -6289,10 +6289,10 @@ function wl(e) {
6289
6289
  const V = /* @__PURE__ */ new Error(`SSE connection error: ${t}`);
6290
6290
  if (a?.(V), p.value < o) {
6291
6291
  p.value++;
6292
- const b = r * p.value;
6293
- ln.debug(`will retry #${p.value} in ${b}ms -> ${t}`), setTimeout(() => {
6294
- i?.value !== !1 && !u.value && f.value !== "disconnected" && y();
6295
- }, b);
6292
+ const w = r * p.value;
6293
+ ln.debug(`will retry #${p.value} in ${w}ms -> ${t}`), setTimeout(() => {
6294
+ i?.value !== !1 && !u.value && f.value !== "disconnected" && b();
6295
+ }, w);
6296
6296
  } else P ? (ln.debug(`max retries reached, calling onDisconnected for ${t}`), l?.()) : ln.debug(`max retries reached, was never connected, NOT calling onDisconnected for ${t}`);
6297
6297
  };
6298
6298
  } catch (P) {
@@ -6300,34 +6300,34 @@ function wl(e) {
6300
6300
  const V = P instanceof Error ? P : new Error(String(P));
6301
6301
  if (a?.(V), p.value < o) {
6302
6302
  p.value++;
6303
- const b = r * p.value;
6303
+ const w = r * p.value;
6304
6304
  setTimeout(() => {
6305
- !u.value && f.value !== "disconnected" && y();
6306
- }, b);
6305
+ !u.value && f.value !== "disconnected" && b();
6306
+ }, w);
6307
6307
  }
6308
6308
  }
6309
6309
  }
6310
6310
  }
6311
- function g() {
6311
+ function m() {
6312
6312
  u.value && (u.value.close(), u.value = null), f.value = "disconnected", p.value = 0, l?.();
6313
6313
  }
6314
- function T() {
6315
- g(), y();
6314
+ function _() {
6315
+ m(), b();
6316
6316
  }
6317
6317
  function S() {
6318
6318
  p.value = 0;
6319
6319
  }
6320
- return n && i?.value !== !1 && y(), qe(() => {
6321
- g();
6320
+ return n && i?.value !== !1 && b(), qe(() => {
6321
+ m();
6322
6322
  }), {
6323
6323
  connection: u,
6324
6324
  status: f,
6325
6325
  retryCount: p,
6326
6326
  isConnected: q(() => f.value === "connected"),
6327
6327
  isConnecting: q(() => f.value === "connecting"),
6328
- connect: y,
6329
- disconnect: g,
6330
- reconnect: T,
6328
+ connect: b,
6329
+ disconnect: m,
6330
+ reconnect: _,
6331
6331
  resetRetryCount: S
6332
6332
  };
6333
6333
  }
@@ -6385,19 +6385,19 @@ function Jh(e) {
6385
6385
  }
6386
6386
  function Zh(e) {
6387
6387
  const { proxyBaseUrl: t, currentSessionId: n, enabled: i, onConnected: o, onSessionUpdate: r } = e, s = /* @__PURE__ */ L({});
6388
- function l(b) {
6389
- return b?.role === "assistant" && typeof b?.time?.completed != "number";
6388
+ function l(w) {
6389
+ return w?.role === "assistant" && typeof w?.time?.completed != "number";
6390
6390
  }
6391
- function a(b) {
6392
- const z = s.value[b], G = z?.hasPending || z?.statusType !== "idle";
6393
- s.value[b] = {
6391
+ function a(w) {
6392
+ const z = s.value[w], G = z?.hasPending || z?.statusType !== "idle";
6393
+ s.value[w] = {
6394
6394
  thinking: G,
6395
6395
  statusType: z?.statusType || "idle",
6396
6396
  hasPending: z?.hasPending || !1
6397
6397
  };
6398
6398
  }
6399
- function c(b) {
6400
- const z = b.type, G = b.properties;
6399
+ function c(w) {
6400
+ const z = w.type, G = w.properties;
6401
6401
  switch (z) {
6402
6402
  case "session.updated": {
6403
6403
  const A = G.info;
@@ -6457,26 +6457,26 @@ function Zh(e) {
6457
6457
  onEvent: c,
6458
6458
  onConnected: o
6459
6459
  }), f = q(() => {
6460
- const b = n.value;
6461
- return b ? s.value[b]?.thinking ?? !1 : !1;
6460
+ const w = n.value;
6461
+ return w ? s.value[w]?.thinking ?? !1 : !1;
6462
6462
  }), p = q(() => {
6463
- const b = n.value;
6464
- return b && s.value[b] || null;
6465
- }), v = q(() => Object.values(s.value).some((b) => b.thinking)), y = q(() => Object.values(s.value).filter((b) => b.thinking).length);
6466
- function g(b) {
6467
- delete s.value[b];
6463
+ const w = n.value;
6464
+ return w && s.value[w] || null;
6465
+ }), v = q(() => Object.values(s.value).some((w) => w.thinking)), b = q(() => Object.values(s.value).filter((w) => w.thinking).length);
6466
+ function m(w) {
6467
+ delete s.value[w];
6468
6468
  }
6469
- function T() {
6469
+ function _() {
6470
6470
  s.value = {};
6471
6471
  }
6472
- function S(b) {
6473
- return s.value[b];
6472
+ function S(w) {
6473
+ return s.value[w];
6474
6474
  }
6475
- function P(b) {
6476
- return s.value[b]?.thinking ?? !1;
6475
+ function P(w) {
6476
+ return s.value[w]?.thinking ?? !1;
6477
6477
  }
6478
- function V(b) {
6479
- return b.reduce((z, G) => (z[G] = P(G), z), {});
6478
+ function V(w) {
6479
+ return w.reduce((z, G) => (z[G] = P(G), z), {});
6480
6480
  }
6481
6481
  return {
6482
6482
  status: u.status,
@@ -6485,11 +6485,11 @@ function Zh(e) {
6485
6485
  currentThinking: f,
6486
6486
  currentSessionState: p,
6487
6487
  hasAnyThinking: v,
6488
- thinkingSessionCount: y,
6488
+ thinkingSessionCount: b,
6489
6489
  connect: u.connect,
6490
6490
  disconnect: u.disconnect,
6491
- clearSessionState: g,
6492
- clearAllSessionStates: T,
6491
+ clearSessionState: m,
6492
+ clearAllSessionStates: _,
6493
6493
  getSessionState: S,
6494
6494
  isSessionThinking: P,
6495
6495
  getSessionsThinking: V
@@ -6497,37 +6497,37 @@ function Zh(e) {
6497
6497
  }
6498
6498
  var Qh = Bt("OpenCode");
6499
6499
  function ep(e) {
6500
- const { showNotification: t, viteBaseUrl: n = "" } = e, i = (y) => n ? `${n}${y}` : y, o = /* @__PURE__ */ L([]), r = /* @__PURE__ */ L(void 0), s = /* @__PURE__ */ L(null), l = /* @__PURE__ */ L(!1), a = q(() => s.value && o.value.find((y) => y.id === s.value)?.url || ""), c = async () => {
6500
+ const { showNotification: t, viteBaseUrl: n = "" } = e, i = (b) => n ? `${n}${b}` : b, o = /* @__PURE__ */ L([]), r = /* @__PURE__ */ L(void 0), s = /* @__PURE__ */ L(null), l = /* @__PURE__ */ L(!1), a = q(() => s.value && o.value.find((b) => b.id === s.value)?.url || ""), c = async () => {
6501
6501
  r.value = !0;
6502
6502
  try {
6503
- const y = await (await fetch(i(Gi))).json();
6504
- o.value = y.filter((g) => !(g.title === "__chrome_mcp_warmup__" || g.parentID || g.time?.archived)).map((g) => ({
6505
- ...g,
6506
- updatedAt: g.time?.updated || Date.now()
6503
+ const b = await (await fetch(i(Gi))).json();
6504
+ o.value = b.filter((m) => !(m.title === "__chrome_mcp_warmup__" || m.parentID || m.time?.archived)).map((m) => ({
6505
+ ...m,
6506
+ updatedAt: m.time?.updated || Date.now()
6507
6507
  })), o.value.length || f(), s.value = o.value[0]?.id || null;
6508
- } catch (y) {
6509
- Qh.error("Failed to load sessions:", { error: y });
6508
+ } catch (b) {
6509
+ Qh.error("Failed to load sessions:", { error: b });
6510
6510
  } finally {
6511
6511
  r.value = !1;
6512
6512
  }
6513
- }, u = (y) => {
6514
- const g = o.value.findIndex((S) => S.id === y.id);
6515
- if (g === -1) return;
6516
- const T = o.value[g];
6517
- y.title && y.title !== T.title && (o.value[g] = {
6518
- ...T,
6519
- title: y.title,
6520
- updatedAt: y.time?.updated || Date.now()
6513
+ }, u = (b) => {
6514
+ const m = o.value.findIndex((S) => S.id === b.id);
6515
+ if (m === -1) return;
6516
+ const _ = o.value[m];
6517
+ b.title && b.title !== _.title && (o.value[m] = {
6518
+ ..._,
6519
+ title: b.title,
6520
+ updatedAt: b.time?.updated || Date.now()
6521
6521
  });
6522
6522
  }, f = async () => {
6523
6523
  try {
6524
- const y = await (await fetch(i(Gi), { method: "POST" })).json();
6524
+ const b = await (await fetch(i(Gi), { method: "POST" })).json();
6525
6525
  o.value.unshift({
6526
- id: y.id,
6526
+ id: b.id,
6527
6527
  title: "新会话",
6528
6528
  updatedAt: Date.now(),
6529
- url: y.url
6530
- }), s.value = y.id, l.value = !0;
6529
+ url: b.url
6530
+ }), s.value = b.id, l.value = !0;
6531
6531
  } catch {
6532
6532
  t("创建会话失败");
6533
6533
  }
@@ -6540,18 +6540,18 @@ function ep(e) {
6540
6540
  iframeLoading: l,
6541
6541
  loadSessions: c,
6542
6542
  createSession: f,
6543
- deleteSession: async (y) => {
6543
+ deleteSession: async (b) => {
6544
6544
  try {
6545
- if (await fetch(i(`${Gi}?id=${y.id}`), { method: "DELETE" }), await c(), t("会话已删除"), s.value === y.id) if (o.value.length > 0) {
6546
- const g = o.value[0];
6547
- s.value = g.id, l.value = !0;
6545
+ if (await fetch(i(`${Gi}?id=${b.id}`), { method: "DELETE" }), await c(), t("会话已删除"), s.value === b.id) if (o.value.length > 0) {
6546
+ const m = o.value[0];
6547
+ s.value = m.id, l.value = !0;
6548
6548
  } else s.value = null;
6549
6549
  } catch {
6550
6550
  t("删除会话失败");
6551
6551
  }
6552
6552
  },
6553
- selectSession: (y) => {
6554
- s.value !== y.id && (s.value = y.id, l.value = !0);
6553
+ selectSession: (b) => {
6554
+ s.value !== b.id && (s.value = b.id, l.value = !0);
6555
6555
  },
6556
6556
  updateSessionInfo: u
6557
6557
  };
@@ -6629,8 +6629,8 @@ function op(e, t, n = "") {
6629
6629
  });
6630
6630
  }, l = (p = !1) => {
6631
6631
  if (e.value === "idle") return;
6632
- const v = window.location.href, y = document.title;
6633
- (p || v !== i || y !== o) && (i = v, o = y, s(v, y));
6632
+ const v = window.location.href, b = document.title;
6633
+ (p || v !== i || b !== o) && (i = v, o = b, s(v, b));
6634
6634
  }, a = () => {
6635
6635
  requestAnimationFrame(() => l());
6636
6636
  };
@@ -6653,13 +6653,14 @@ function op(e, t, n = "") {
6653
6653
  }
6654
6654
  function rp(e, t, n = "", i = "") {
6655
6655
  let o = "", r = "", s, l;
6656
- const a = /* @__PURE__ */ L(""), c = /* @__PURE__ */ L(""), u = Bt("ExtCtx"), f = (g) => n ? `${n}${g}` : g, p = (g, T) => {
6657
- u.debug(`[ExtCtx] POST 上下文: tabId=${s} url=${g} title=${T}`), fetch(f(Us), {
6656
+ const a = /* @__PURE__ */ L(""), c = /* @__PURE__ */ L(""), u = /* @__PURE__ */ L(""), f = Bt("ExtCtx"), p = (_) => n ? `${n}${_}` : _, v = (_, S) => {
6657
+ f.debug(`[ExtCtx] POST 上下文: tabId=${s} url=${_} title=${S}`), fetch(p(Us), {
6658
6658
  method: "POST",
6659
6659
  headers: { "Content-Type": "application/json" },
6660
6660
  body: JSON.stringify({
6661
- url: g,
6662
- title: T,
6661
+ url: _,
6662
+ title: S,
6663
+ sessionId: u.value,
6663
6664
  active: !0,
6664
6665
  ...s !== void 0 ? { tabId: s } : {},
6665
6666
  ...l !== void 0 ? { tabIndex: l } : {},
@@ -6667,38 +6668,38 @@ function rp(e, t, n = "", i = "") {
6667
6668
  })
6668
6669
  }).catch(() => {
6669
6670
  });
6670
- }, v = (g = !1) => {
6671
+ }, b = (_ = !1) => {
6671
6672
  if (e.value === "idle") return;
6672
- const T = a.value, S = c.value;
6673
- !T && !S || (g || T !== o || S !== r) && (o = T, r = S, p(T, S));
6674
- }, y = (g) => {
6675
- if (!(g.serviceInstanceId && g.serviceInstanceId !== i)) {
6676
- if (g.type === Nt.TAB_SWITCHED) {
6677
- u.debug(`[ExtCtx] activeTabId: ${s} → ${g.tabId} (windowId=${g.windowId})`), s = g.tabId;
6673
+ const S = a.value, P = c.value;
6674
+ !S && !P || (_ || S !== o || P !== r) && (o = S, r = P, v(S, P));
6675
+ }, m = (_) => {
6676
+ if (!(_.serviceInstanceId && _.serviceInstanceId !== i)) {
6677
+ if (_.type === Nt.TAB_SWITCHED) {
6678
+ f.debug(`[ExtCtx] activeTabId: ${s} → ${_.tabId} (windowId=${_.windowId})`), s = _.tabId;
6678
6679
  return;
6679
6680
  }
6680
- if (g.type === Nt.PAGE_CONTEXT && g.ctx) {
6681
- const T = s === void 0 || g.tabId === void 0 || g.tabId === s;
6682
- if (s === void 0 && g.tabId !== void 0 && (s = g.tabId), !T) return;
6683
- a.value = g.ctx.url, c.value = g.ctx.title, v(!0);
6681
+ if (_.type === Nt.PAGE_CONTEXT && _.ctx) {
6682
+ const S = s === void 0 || _.tabId === void 0 || _.tabId === s;
6683
+ if (s === void 0 && _.tabId !== void 0 && (s = _.tabId), !S) return;
6684
+ a.value = _.ctx.url, c.value = _.ctx.title, u.value = _.ctx.sessionId || "", b(!0);
6684
6685
  }
6685
6686
  }
6686
6687
  };
6687
6688
  return Xe(async () => {
6688
- chrome.runtime.onMessage.addListener(y);
6689
+ chrome.runtime.onMessage.addListener(m);
6689
6690
  try {
6690
- const g = await chrome.tabs.query({
6691
+ const _ = await chrome.tabs.query({
6691
6692
  active: !0,
6692
6693
  currentWindow: !0
6693
6694
  });
6694
- g[0]?.id !== void 0 ? (s = g[0].id, l = g[0].index, u.debug(`onMounted activeTabId=${s} tabIndex=${l} url=${g[0].url}`), chrome.tabs.sendMessage(g[0].id, { type: Nt.REQUEST_PAGE_CONTEXT }).catch(() => {
6695
- })) : u.debug(`onMounted 未查询到活跃 Tab, tabs=${JSON.stringify(g)}`);
6696
- } catch (g) {
6697
- u.debug(`onMounted 查询 Tab 失败: ${g}`);
6695
+ _[0]?.id !== void 0 ? (s = _[0].id, l = _[0].index, f.debug(`onMounted activeTabId=${s} tabIndex=${l} url=${_[0].url}`), chrome.tabs.sendMessage(_[0].id, { type: Nt.REQUEST_PAGE_CONTEXT }).catch(() => {
6696
+ })) : f.debug(`onMounted 未查询到活跃 Tab, tabs=${JSON.stringify(_)}`);
6697
+ } catch (_) {
6698
+ f.debug(`onMounted 查询 Tab 失败: ${_}`);
6698
6699
  }
6699
6700
  }), qe(() => {
6700
- chrome.runtime.onMessage.removeListener(y);
6701
- }), { updateContext: v };
6701
+ chrome.runtime.onMessage.removeListener(m);
6702
+ }), { updateContext: b };
6702
6703
  }
6703
6704
  function sp(e) {
6704
6705
  const { selectMode: t, serviceInstanceId: n, onElementSelected: i, onThemeChange: o } = e, r = (c) => {
@@ -6789,7 +6790,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6789
6790
  __name: "LoadingContent",
6790
6791
  props: { loadingText: {} },
6791
6792
  setup(e) {
6792
- return (t, n) => (D(), j("div", ap, [n[0] || (n[0] = _("div", { class: "opencode-loading-spinner" }, null, -1)), _("div", cp, xe(e.loadingText), 1)]));
6793
+ return (t, n) => (D(), j("div", ap, [n[0] || (n[0] = y("div", { class: "opencode-loading-spinner" }, null, -1)), y("div", cp, xe(e.loadingText), 1)]));
6793
6794
  }
6794
6795
  }), dp = up, fp = { class: "opencode-chrome-warmup-failed" }, hp = { class: "opencode-chrome-warmup-failed-text" }, pp = {
6795
6796
  key: 0,
@@ -6832,7 +6833,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6832
6833
  }), a = q(() => {
6833
6834
  if (!o.value || !n.models) return n.models?.[0] || null;
6834
6835
  const [p, v] = o.value.split(":");
6835
- return n.models.find((y) => y.providerID === p && y.modelID === v) || null;
6836
+ return n.models.find((b) => b.providerID === p && b.modelID === v) || null;
6836
6837
  }), c = (p) => ({
6837
6838
  anthropic: "Anthropic",
6838
6839
  openai: "OpenAI",
@@ -6847,7 +6848,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6847
6848
  }) : i("retry");
6848
6849
  };
6849
6850
  return (p, v) => (D(), j("div", fp, [
6850
- v[11] || (v[11] = _("div", { class: "opencode-chrome-warmup-failed-icon" }, [_("svg", {
6851
+ v[11] || (v[11] = y("div", { class: "opencode-chrome-warmup-failed-icon" }, [y("svg", {
6851
6852
  xmlns: "http://www.w3.org/2000/svg",
6852
6853
  fill: "none",
6853
6854
  viewBox: "0 0 24 24",
@@ -6855,58 +6856,58 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6855
6856
  height: "48",
6856
6857
  stroke: "currentColor",
6857
6858
  "stroke-width": "1.5"
6858
- }, [_("path", {
6859
+ }, [y("path", {
6859
6860
  "stroke-linecap": "round",
6860
6861
  "stroke-linejoin": "round",
6861
6862
  d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
6862
6863
  })])], -1)),
6863
- e.errorType === ge(Qt).CHROME_NOT_CONNECTED ? (D(), j(fe, { key: 0 }, [v[2] || (v[2] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)), v[3] || (v[3] = _("div", { class: "opencode-chrome-warmup-failed-text" }, [_("p", null, "请按以下步骤开启 Chrome 远程调试:"), _("div", { class: "opencode-chrome-warmup-steps" }, [
6864
- _("div", null, [Oo(" 在 Chrome 地址栏输入 "), _("code", { class: "opencode-chrome-warmup-code" }, "chrome://inspect/#remote-debugging")]),
6865
- _("div", null, "勾选 'Allow remote debugging for this browser instance' 选项"),
6866
- _("div", null, "重新启动浏览器"),
6867
- _("div", null, "完成后点击下方按钮重试")
6868
- ])], -1))], 64)) : e.errorType === ge(Qt).AI_TIMEOUT ? (D(), j(fe, { key: 1 }, [v[6] || (v[6] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应超时", -1)), _("div", hp, [
6869
- v[4] || (v[4] = _("p", null, "AI 模型响应超时,可能的原因:", -1)),
6870
- v[5] || (v[5] = _("div", { class: "opencode-chrome-warmup-steps" }, [
6871
- _("div", null, "当前选择的 AI 模型服务不可用或响应缓慢"),
6872
- _("div", null, "网络连接问题"),
6873
- _("div", null, "模型配置不正确")
6864
+ e.errorType === ge(Qt).CHROME_NOT_CONNECTED ? (D(), j(fe, { key: 0 }, [v[2] || (v[2] = y("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)), v[3] || (v[3] = y("div", { class: "opencode-chrome-warmup-failed-text" }, [y("p", null, "请按以下步骤开启 Chrome 远程调试:"), y("div", { class: "opencode-chrome-warmup-steps" }, [
6865
+ y("div", null, [Oo(" 在 Chrome 地址栏输入 "), y("code", { class: "opencode-chrome-warmup-code" }, "chrome://inspect/#remote-debugging")]),
6866
+ y("div", null, "勾选 'Allow remote debugging for this browser instance' 选项"),
6867
+ y("div", null, "重新启动浏览器"),
6868
+ y("div", null, "完成后点击下方按钮重试")
6869
+ ])], -1))], 64)) : e.errorType === ge(Qt).AI_TIMEOUT ? (D(), j(fe, { key: 1 }, [v[6] || (v[6] = y("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应超时", -1)), y("div", hp, [
6870
+ v[4] || (v[4] = y("p", null, "AI 模型响应超时,可能的原因:", -1)),
6871
+ v[5] || (v[5] = y("div", { class: "opencode-chrome-warmup-steps" }, [
6872
+ y("div", null, "当前选择的 AI 模型服务不可用或响应缓慢"),
6873
+ y("div", null, "网络连接问题"),
6874
+ y("div", null, "模型配置不正确")
6874
6875
  ], -1)),
6875
6876
  s.value ? (D(), j("p", pp, "可选择其他模型重试:")) : ae("", !0)
6876
- ])], 64)) : e.errorType === ge(Qt).AI_RESPONSE_ERROR ? (D(), j(fe, { key: 2 }, [v[8] || (v[8] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应错误", -1)), _("div", vp, [
6877
- v[7] || (v[7] = _("p", null, "AI 模型返回了意外的响应:", -1)),
6878
- _("div", gp, xe(e.errorMessage || "未知错误"), 1),
6877
+ ])], 64)) : e.errorType === ge(Qt).AI_RESPONSE_ERROR ? (D(), j(fe, { key: 2 }, [v[8] || (v[8] = y("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应错误", -1)), y("div", vp, [
6878
+ v[7] || (v[7] = y("p", null, "AI 模型返回了意外的响应:", -1)),
6879
+ y("div", gp, xe(e.errorMessage || "未知错误"), 1),
6879
6880
  s.value ? (D(), j("p", mp, "可选择其他模型重试:")) : ae("", !0)
6880
- ])], 64)) : (D(), j(fe, { key: 3 }, [v[9] || (v[9] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)), _("div", _p, [e.errorMessage ? (D(), j("p", yp, xe(e.errorMessage), 1)) : (D(), j("p", bp, "连接失败,请重试")), s.value ? (D(), j("p", Sp, "可选择模型重试:")) : ae("", !0)])], 64)),
6881
- r.value && s.value ? (D(), j("div", wp, [_("div", Ep, [io(_("select", {
6882
- "onUpdate:modelValue": v[0] || (v[0] = (y) => o.value = y),
6881
+ ])], 64)) : (D(), j(fe, { key: 3 }, [v[9] || (v[9] = y("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)), y("div", _p, [e.errorMessage ? (D(), j("p", yp, xe(e.errorMessage), 1)) : (D(), j("p", bp, "连接失败,请重试")), s.value ? (D(), j("p", Sp, "可选择模型重试:")) : ae("", !0)])], 64)),
6882
+ r.value && s.value ? (D(), j("div", wp, [y("div", Ep, [io(y("select", {
6883
+ "onUpdate:modelValue": v[0] || (v[0] = (b) => o.value = b),
6883
6884
  class: "native-select",
6884
6885
  disabled: e.retrying
6885
- }, [(D(!0), j(fe, null, Wn(l.value, (y, g) => (D(), j("optgroup", {
6886
- key: g,
6887
- label: c(g)
6888
- }, [(D(!0), j(fe, null, Wn(y, (T) => (D(), j("option", {
6889
- key: u(T),
6890
- value: u(T)
6891
- }, xe(T.name || T.modelID), 9, xp))), 128))], 8, Cp))), 128))], 8, Tp), [[kc, o.value]]), v[10] || (v[10] = _("span", { class: "select-arrow" }, [_("svg", {
6886
+ }, [(D(!0), j(fe, null, Wn(l.value, (b, m) => (D(), j("optgroup", {
6887
+ key: m,
6888
+ label: c(m)
6889
+ }, [(D(!0), j(fe, null, Wn(b, (_) => (D(), j("option", {
6890
+ key: u(_),
6891
+ value: u(_)
6892
+ }, xe(_.name || _.modelID), 9, xp))), 128))], 8, Cp))), 128))], 8, Tp), [[kc, o.value]]), v[10] || (v[10] = y("span", { class: "select-arrow" }, [y("svg", {
6892
6893
  viewBox: "0 0 24 24",
6893
6894
  width: "16",
6894
6895
  height: "16",
6895
6896
  fill: "none",
6896
6897
  stroke: "currentColor",
6897
6898
  "stroke-width": "2"
6898
- }, [_("path", {
6899
+ }, [y("path", {
6899
6900
  d: "M6 9l6 6 6-6",
6900
6901
  "stroke-linecap": "round",
6901
6902
  "stroke-linejoin": "round"
6902
- })])], -1))]), _("button", {
6903
+ })])], -1))]), y("button", {
6903
6904
  class: "retry-btn",
6904
6905
  disabled: e.retrying,
6905
6906
  onClick: f
6906
- }, xe(e.retrying ? "连接中..." : "重试连接"), 9, Op)])) : (D(), j("div", Pp, [_("button", {
6907
+ }, xe(e.retrying ? "连接中..." : "重试连接"), 9, Op)])) : (D(), j("div", Pp, [y("button", {
6907
6908
  class: "opencode-chrome-warmup-failed-btn primary",
6908
6909
  disabled: e.retrying,
6909
- onClick: v[1] || (v[1] = (y) => f())
6910
+ onClick: v[1] || (v[1] = (b) => f())
6910
6911
  }, xe(e.retrying ? "连接中..." : "重试连接"), 9, Mp)]))
6911
6912
  ]));
6912
6913
  }
@@ -6918,7 +6919,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6918
6919
  __name: "App",
6919
6920
  props: { config: {} },
6920
6921
  setup(e) {
6921
- const t = e, n = /* @__PURE__ */ L(!1), i = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L(!0), r = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(null), l = /* @__PURE__ */ L(!1), a = /* @__PURE__ */ L([]), { theme: c = "auto", open: u = !1, hotkey: f = "ctrl+k", proxyPort: p = 4098, proxyHost: v = "localhost", displayMode: y = "bubble", splitMode: g, vitePort: T = "", serviceInstanceId: S = "", myWindowId: P } = t.config, V = Bt("OpenCode"), b = Bt("App"), z = c, G = /* @__PURE__ */ L(g?.width ?? 500), A = y === "extension", W = y === "extension-selector", F = q(() => T ? `http://127.0.0.1:${T}` : ""), Q = (M) => F.value ? `${F.value}${M}` : M, J = {
6922
+ const t = e, n = /* @__PURE__ */ L(!1), i = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L(!0), r = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(null), l = /* @__PURE__ */ L(!1), a = /* @__PURE__ */ L([]), { theme: c = "auto", open: u = !1, hotkey: f = "ctrl+k", proxyPort: p = 4098, proxyHost: v = "localhost", displayMode: b = "bubble", splitMode: m, vitePort: _ = "", serviceInstanceId: S = "", myWindowId: P } = t.config, V = Bt("OpenCode"), w = Bt("App"), z = c, G = /* @__PURE__ */ L(m?.width ?? 500), A = b === "extension", W = b === "extension-selector", F = q(() => _ ? `http://127.0.0.1:${_}` : ""), Q = (M) => F.value ? `${F.value}${M}` : M, J = {
6922
6923
  onSelectModeChange: null,
6923
6924
  broadcastTheme: null,
6924
6925
  notifySelectionResult: null,
@@ -6928,35 +6929,35 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6928
6929
  ...te,
6929
6930
  mode: A ? "widget" : te?.mode
6930
6931
  });
6931
- }, { serviceStatus: U, currentTask: ie, chromeMcpFailed: Y, chromeMcpErrorType: ee, chromeMcpErrorMessage: Ae, loadingText: Je, updateStatusFromTask: Ke, setStarting: Ne } = ip(), { selectedElements: Le, removeElement: gt, clearElements: mt } = np(S), { theme: at, sendThemeToIframe: Ge } = tp(z, s), { sessions: st, loadingSessionList: $e, currentSessionId: Fe, iframeSrc: ye, iframeLoading: Ze, loadSessions: Qe, createSession: d, deleteSession: h, selectSession: m, updateSessionInfo: O } = ep({
6932
+ }, { serviceStatus: U, currentTask: ie, chromeMcpFailed: Y, chromeMcpErrorType: ee, chromeMcpErrorMessage: Ae, loadingText: Je, updateStatusFromTask: Ke, setStarting: Ne } = ip(), { selectedElements: Le, removeElement: gt, clearElements: mt } = np(S), { theme: at, sendThemeToIframe: Ge } = tp(z, s), { sessions: st, loadingSessionList: $e, currentSessionId: Fe, iframeSrc: ye, iframeLoading: Ze, loadSessions: Qe, createSession: d, deleteSession: h, selectSession: g, updateSessionInfo: O } = ep({
6932
6933
  showNotification: N,
6933
6934
  viteBaseUrl: F.value
6934
- }), { updateContext: E } = A ? rp(U, Le, F.value, S) : op(U, Le, F.value), w = Xh({
6935
+ }), { updateContext: T } = A ? rp(U, Le, F.value, S) : op(U, Le, F.value), E = Xh({
6935
6936
  viteBaseUrl: F.value,
6936
6937
  onStatusSync: (M) => {
6937
- if (b.debug(`SSE STATUS_SYNC: ${JSON.stringify(M)} currentStatus: ${U.value}`), R && M.task && M.task !== "ready" && M.task !== "chrome_mcp_failed" && M.task !== "session_creation_failed" && M.task !== "opencode_not_installed" && M.task !== "web_start_timeout") {
6938
- b.debug(`SSE 重连后服务仍在启动中(${M.task}),重置 status 为 starting`), ie.value = M.task, U.value = "starting", R = !1;
6938
+ if (w.debug(`SSE STATUS_SYNC: ${JSON.stringify(M)} currentStatus: ${U.value}`), R && M.task && M.task !== "ready" && M.task !== "chrome_mcp_failed" && M.task !== "session_creation_failed" && M.task !== "opencode_not_installed" && M.task !== "web_start_timeout") {
6939
+ w.debug(`SSE 重连后服务仍在启动中(${M.task}),重置 status 为 starting`), ie.value = M.task, U.value = "starting", R = !1;
6939
6940
  return;
6940
6941
  }
6941
6942
  R = !1, M.isStarted !== void 0 && M.isStarted && U.value === "idle" && Ne(), M.task && Ke(M.task, M.errorType, M.errorMessage);
6942
6943
  },
6943
6944
  onTaskUpdate: (M) => {
6944
- b.debug(`SSE TASK_UPDATE: ${JSON.stringify(M)} currentStatus: ${U.value}`), Ke(M.task, M.errorType, M.errorMessage);
6945
+ w.debug(`SSE TASK_UPDATE: ${JSON.stringify(M)} currentStatus: ${U.value}`), Ke(M.task, M.errorType, M.errorMessage);
6945
6946
  },
6946
6947
  onClearElements: () => mt(),
6947
- onConnected: () => E(!0)
6948
+ onConnected: () => T(!0)
6948
6949
  });
6949
6950
  let k = !1, R = !1;
6950
- Ie(w.isConnected, (M, te) => {
6951
- !M && te && S ? (k = !0, b.debug(`SSE 断开,通知服务下线: ${S}`), chrome.runtime.sendMessage({
6951
+ Ie(E.isConnected, (M, te) => {
6952
+ !M && te && S ? (k = !0, w.debug(`SSE 断开,通知服务下线: ${S}`), chrome.runtime.sendMessage({
6952
6953
  type: Nt.SERVICE_GONE,
6953
6954
  serviceInstanceId: S,
6954
6955
  windowId: P
6955
6956
  }).catch(() => {
6956
- })) : M && !te && k && S && (k = !1, R = !0, b.debug(`SSE 重连,通知服务上线: ${S}`), chrome.runtime.sendMessage({
6957
+ })) : M && !te && k && S && (k = !1, R = !0, w.debug(`SSE 重连,通知服务上线: ${S}`), chrome.runtime.sendMessage({
6957
6958
  type: Nt.SERVICE_APPEARED,
6958
6959
  proxyPort: p,
6959
- vitePort: T,
6960
+ vitePort: _,
6960
6961
  serviceInstanceId: S,
6961
6962
  windowId: P
6962
6963
  }).catch(() => {
@@ -6997,9 +6998,9 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
6997
6998
  try {
6998
6999
  const M = await (await fetch(Q(Gc))).json();
6999
7000
  if (U.value !== "idle")
7000
- return b.debug(`[ensureServicesStarted] fetch 完成但 serviceStatus 已变为 ${U.value},跳过启动`), !0;
7001
+ return w.debug(`[ensureServicesStarted] fetch 完成但 serviceStatus 已变为 ${U.value},跳过启动`), !0;
7001
7002
  if (M.success)
7002
- return Ne(), w.connect(), !0;
7003
+ return Ne(), E.connect(), !0;
7003
7004
  } catch {
7004
7005
  }
7005
7006
  return !1;
@@ -7017,7 +7018,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7017
7018
  A || Rr("ctrl+p", (M) => {
7018
7019
  M.preventDefault(), he();
7019
7020
  }), Ie(U, (M, te) => {
7020
- M !== "idle" && te === "idle" && (w.connect(), I.connect()), M === "ready" && te !== "ready" && (b.debug("服务就绪,加载会话列表"), Qe());
7021
+ M !== "idle" && te === "idle" && (E.connect(), I.connect()), M === "ready" && te !== "ready" && (w.debug("服务就绪,加载会话列表"), Qe());
7021
7022
  }), Ie(Y, (M) => {
7022
7023
  M && re();
7023
7024
  });
@@ -7027,7 +7028,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7027
7028
  i.value && J.onSelectModeChange?.(!1);
7028
7029
  };
7029
7030
  Xe(() => {
7030
- b.debug(`onMounted, sid=${S}, serviceStatus=${U.value}, config: ${JSON.stringify(t.config)}`), U.value === "ready" ? (b.debug("onMounted: ready 分支,直接加载会话"), Qe(), w.connect(), I.connect(), E(!0)) : U.value === "idle" && (A ? (b.debug("onMounted: idle 分支(扩展模式),先 setStarting 显示蒙层"), Ne(), w.connect()) : (b.debug("onMounted: idle 分支(非扩展模式),直接加载会话"), Qe(), w.connect())), u && U.value === "ready" && setTimeout(() => {
7031
+ w.debug(`onMounted, sid=${S}, serviceStatus=${U.value}, config: ${JSON.stringify(t.config)}`), U.value === "ready" ? (w.debug("onMounted: ready 分支,直接加载会话"), Qe(), E.connect(), I.connect(), T(!0)) : U.value === "idle" && (A ? (w.debug("onMounted: idle 分支(扩展模式),先 setStarting 显示蒙层"), Ne(), E.connect()) : (w.debug("onMounted: idle 分支(非扩展模式),直接加载会话"), Qe(), E.connect())), u && U.value === "ready" && setTimeout(() => {
7031
7032
  n.value = !0;
7032
7033
  }, 1e3), window.addEventListener("message", pe), document.addEventListener("visibilitychange", Te), window.addEventListener("pagehide", Te);
7033
7034
  }), qe(() => {
@@ -7042,7 +7043,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7042
7043
  return;
7043
7044
  }
7044
7045
  }
7045
- n.value = M, M && E(), M && (Ze.value = !1);
7046
+ n.value = M, M && T(), M && (Ze.value = !1);
7046
7047
  }, ct = async (M, te, yn) => {
7047
7048
  if (W) {
7048
7049
  J.notifySelectionResult?.(M), N("元素已选中", { mode: "page" });
@@ -7055,7 +7056,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7055
7056
  };
7056
7057
  s.value?.sendMessageToIframe(_e.INSERT_FILE_PART, { element: Ni }), N("节点已添加到对话框", { mode: "page" });
7057
7058
  }, Kt = () => {
7058
- mt(), E(!0), N("已清除所有选中元素");
7059
+ mt(), T(!0), N("已清除所有选中元素");
7059
7060
  }, be = (M) => {
7060
7061
  if (i.value === M) return;
7061
7062
  i.value = M, A && J.onSelectModeChange?.(M), s.value?.sendMessageToIframe(_e.SELECT_MODE_CHANGE, { selectMode: M });
@@ -7084,7 +7085,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7084
7085
  }, et = (M) => {
7085
7086
  G.value = M;
7086
7087
  }, ut = ({ index: M }) => {
7087
- gt(M), E(!0);
7088
+ gt(M), T(!0);
7088
7089
  }, _n = () => {
7089
7090
  Ze.value = !1;
7090
7091
  };
@@ -7106,8 +7107,8 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7106
7107
  "session-key": "id",
7107
7108
  "hotkey-label": ge(f),
7108
7109
  thinking: ge(x),
7109
- "display-mode": ge(y),
7110
- "split-mode": ge(g),
7110
+ "display-mode": ge(b),
7111
+ "split-mode": ge(m),
7111
7112
  "split-panel-width": G.value,
7112
7113
  "onUpdate:open": Re,
7113
7114
  "onUpdate:selectMode": be,
@@ -7117,7 +7118,7 @@ var ap = { class: "opencode-custom-loading" }, cp = { class: "opencode-loading-t
7117
7118
  onToggleTheme: Wt,
7118
7119
  onCreateSession: ge(d),
7119
7120
  onDeleteSession: ge(h),
7120
- onSelectSession: ge(m),
7121
+ onSelectSession: ge(g),
7121
7122
  onClickSelectedNode: ct,
7122
7123
  onClearSelectedNodes: Kt,
7123
7124
  onRemoveSelectedNode: ut,