vite-plugin-opencode-assistant 1.1.7 → 1.1.9
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 +691 -691
- package/package.json +5 -5
package/lib/client.js
CHANGED
|
@@ -847,8 +847,8 @@ function fa(e, t = !1, n = Jt) {
|
|
|
847
847
|
}
|
|
848
848
|
function ha(e, t, n = ye) {
|
|
849
849
|
const { immediate: i, deep: o, once: r, scheduler: s, augmentJob: l, call: a } = n, c = (S) => o ? S : /* @__PURE__ */ it(S) || o === !1 || o === 0 ? kt(S, 1) : kt(S);
|
|
850
|
-
let u, f, p, v,
|
|
851
|
-
if (/* @__PURE__ */ Ae(e) ? (f = () => e.value,
|
|
850
|
+
let u, f, p, v, y = !1, g = !1;
|
|
851
|
+
if (/* @__PURE__ */ Ae(e) ? (f = () => e.value, y = /* @__PURE__ */ it(e)) : /* @__PURE__ */ nn(e) ? (f = () => c(e), y = !0) : J(e) ? (g = !0, y = e.some((S) => /* @__PURE__ */ nn(S) || /* @__PURE__ */ it(S)), f = () => e.map((S) => {
|
|
852
852
|
if (/* @__PURE__ */ Ae(S)) return S.value;
|
|
853
853
|
if (/* @__PURE__ */ nn(S)) return c(S);
|
|
854
854
|
if (ue(S)) return a ? a(S, 2) : S();
|
|
@@ -869,35 +869,35 @@ function ha(e, t, n = ye) {
|
|
|
869
869
|
Jt = S;
|
|
870
870
|
}
|
|
871
871
|
} : f = Ut, t && o) {
|
|
872
|
-
const S = f,
|
|
873
|
-
f = () => kt(S(),
|
|
872
|
+
const S = f, H = o === !0 ? 1 / 0 : o;
|
|
873
|
+
f = () => kt(S(), H);
|
|
874
874
|
}
|
|
875
|
-
const
|
|
876
|
-
u.stop(),
|
|
875
|
+
const O = $l(), b = () => {
|
|
876
|
+
u.stop(), O && O.active && kr(O.effects, u);
|
|
877
877
|
};
|
|
878
878
|
if (r && t) {
|
|
879
879
|
const S = t;
|
|
880
|
-
t = (...
|
|
881
|
-
const U = S(...
|
|
882
|
-
return
|
|
880
|
+
t = (...H) => {
|
|
881
|
+
const U = S(...H);
|
|
882
|
+
return b(), U;
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
let
|
|
885
|
+
let P = g ? new Array(e.length).fill(Zn) : Zn;
|
|
886
886
|
const F = (S) => {
|
|
887
887
|
if (!(!(u.flags & 1) || !u.dirty && !S))
|
|
888
888
|
if (t) {
|
|
889
|
-
const
|
|
890
|
-
if (S || o ||
|
|
889
|
+
const H = u.run();
|
|
890
|
+
if (S || o || y || (g ? H.some((U, N) => Tt(U, P[N])) : Tt(H, P))) {
|
|
891
891
|
p && p();
|
|
892
892
|
const U = Jt;
|
|
893
893
|
Jt = u;
|
|
894
894
|
try {
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
|
|
895
|
+
const N = [
|
|
896
|
+
H,
|
|
897
|
+
P === Zn ? void 0 : g && P[0] === Zn ? [] : P,
|
|
898
898
|
v
|
|
899
899
|
];
|
|
900
|
-
|
|
900
|
+
P = H, a ? a(t, 3, N) : t(...N);
|
|
901
901
|
} finally {
|
|
902
902
|
Jt = U;
|
|
903
903
|
}
|
|
@@ -908,10 +908,10 @@ function ha(e, t, n = ye) {
|
|
|
908
908
|
const S = li.get(u);
|
|
909
909
|
if (S) {
|
|
910
910
|
if (a) a(S, 4);
|
|
911
|
-
else for (const
|
|
911
|
+
else for (const H of S) H();
|
|
912
912
|
li.delete(u);
|
|
913
913
|
}
|
|
914
|
-
}, t ? i ? F(!0) :
|
|
914
|
+
}, t ? i ? F(!0) : P = u.run() : s ? s(F.bind(null, !0), !0) : u.run(), b.pause = u.pause.bind(u), b.resume = u.resume.bind(u), b.stop = b, b;
|
|
915
915
|
}
|
|
916
916
|
function kt(e, t = 1 / 0, n) {
|
|
917
917
|
if (t <= 0 || !ge(e) || e.__v_skip || (n = n || /* @__PURE__ */ new Map(), (n.get(e) || 0) >= t)) return e;
|
|
@@ -1127,12 +1127,12 @@ function ya(e, t, n = ye) {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
const u = tt;
|
|
1130
|
-
l.call = (v,
|
|
1130
|
+
l.call = (v, y, g) => Ct(v, u, y, g);
|
|
1131
1131
|
let f = !1;
|
|
1132
1132
|
r === "post" ? l.scheduler = (v) => {
|
|
1133
1133
|
ze(v, u && u.suspense);
|
|
1134
|
-
} : r !== "sync" && (f = !0, l.scheduler = (v,
|
|
1135
|
-
|
|
1134
|
+
} : r !== "sync" && (f = !0, l.scheduler = (v, y) => {
|
|
1135
|
+
y ? v() : yo(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,55 +1146,55 @@ var Wt = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ Symbol("_vte"), ba
|
|
|
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:
|
|
1149
|
+
const { mc: u, pc: f, pbc: p, o: { insert: v, querySelector: y, createText: g, createComment: O, parentNode: b } } = c, P = Qt(t.props);
|
|
1150
1150
|
let { dynamicChildren: F } = t;
|
|
1151
|
-
const S = (
|
|
1152
|
-
|
|
1153
|
-
},
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1156
|
-
}, U = (
|
|
1157
|
-
const
|
|
1158
|
-
if (Wt.get(
|
|
1159
|
-
if (Wt.delete(
|
|
1160
|
-
const
|
|
1161
|
-
S(
|
|
1151
|
+
const S = (N, j, B) => {
|
|
1152
|
+
N.shapeFlag & 16 && u(N.children, j, B, o, r, s, l, a);
|
|
1153
|
+
}, H = (N = t) => {
|
|
1154
|
+
const j = Qt(N.props), B = N.target = io(N.props, y), Y = oo(B, N, g, v);
|
|
1155
|
+
B && (s !== "svg" && Do(B) ? s = "svg" : s !== "mathml" && $o(B) && (s = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(B), j || (S(N, B, Y), xn(N, !1)));
|
|
1156
|
+
}, U = (N) => {
|
|
1157
|
+
const j = () => {
|
|
1158
|
+
if (Wt.get(N) === j) {
|
|
1159
|
+
if (Wt.delete(N), Qt(N.props)) {
|
|
1160
|
+
const B = b(N.el) || n;
|
|
1161
|
+
S(N, B, N.anchor), xn(N, !0);
|
|
1162
1162
|
}
|
|
1163
|
-
|
|
1163
|
+
H(N);
|
|
1164
1164
|
}
|
|
1165
1165
|
};
|
|
1166
|
-
Wt.set(
|
|
1166
|
+
Wt.set(N, j), ze(j, r);
|
|
1167
1167
|
};
|
|
1168
1168
|
if (e == null) {
|
|
1169
|
-
const
|
|
1170
|
-
if (v(
|
|
1169
|
+
const N = t.el = g(""), j = t.anchor = g("");
|
|
1170
|
+
if (v(N, n, i), v(j, n, i), Sa(t.props) || r && r.pendingBranch) {
|
|
1171
1171
|
U(t);
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
-
|
|
1174
|
+
P && (S(t, n, j), xn(t, !0)), H();
|
|
1175
1175
|
} else {
|
|
1176
1176
|
t.el = e.el;
|
|
1177
|
-
const
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1177
|
+
const N = t.anchor = e.anchor, j = Wt.get(e);
|
|
1178
|
+
if (j) {
|
|
1179
|
+
j.flags |= 8, Wt.delete(e), U(t);
|
|
1180
1180
|
return;
|
|
1181
1181
|
}
|
|
1182
1182
|
t.targetStart = e.targetStart;
|
|
1183
|
-
const
|
|
1184
|
-
if (s === "svg" || Do(
|
|
1185
|
-
le ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : Qn(t, n,
|
|
1183
|
+
const B = t.target = e.target, Y = t.targetAnchor = e.targetAnchor, le = Qt(e.props), fe = le ? n : B, I = le ? N : Y;
|
|
1184
|
+
if (s === "svg" || Do(B) ? s = "svg" : (s === "mathml" || $o(B)) && (s = "mathml"), F ? (p(e.dynamicChildren, F, fe, o, r, s, l), wo(e, t, !0)) : a || f(e, t, fe, I, o, r, s, l, !1), P)
|
|
1185
|
+
le ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : Qn(t, n, N, c, 1);
|
|
1186
1186
|
else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
|
|
1187
|
-
const X = io(t.props,
|
|
1187
|
+
const X = io(t.props, y);
|
|
1188
1188
|
X && (t.target = X, Qn(t, X, null, c, 0));
|
|
1189
|
-
} else le && Qn(t,
|
|
1190
|
-
xn(t,
|
|
1189
|
+
} else le && Qn(t, B, Y, c, 1);
|
|
1190
|
+
xn(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 = Qt(p),
|
|
1195
|
-
if (g && (g.flags |= 8, Wt.delete(e)), f && (o(c), o(u)), r && o(a), !g && (v || f) && s & 16) for (let
|
|
1196
|
-
const
|
|
1197
|
-
i(
|
|
1194
|
+
const { shapeFlag: s, children: l, anchor: a, targetStart: c, targetAnchor: u, target: f, props: p } = e, v = Qt(p), y = r || !v, g = Wt.get(e);
|
|
1195
|
+
if (g && (g.flags |= 8, Wt.delete(e)), f && (o(c), o(u)), r && o(a), !g && (v || f) && s & 16) for (let O = 0; O < l.length; O++) {
|
|
1196
|
+
const b = l[O];
|
|
1197
|
+
i(b, t, n, y, !!b.dynamicChildren);
|
|
1198
1198
|
}
|
|
1199
1199
|
},
|
|
1200
1200
|
move: Qn,
|
|
@@ -1208,26 +1208,26 @@ function Qn(e, t, n, { o: { insert: i }, m: o }, r = 2) {
|
|
|
1208
1208
|
f && i(l, t, n);
|
|
1209
1209
|
}
|
|
1210
1210
|
function wa(e, t, n, i, o, r, { o: { nextSibling: s, parentNode: l, querySelector: a, insert: c, createText: u } }, f) {
|
|
1211
|
-
function p(
|
|
1212
|
-
let
|
|
1213
|
-
for (;
|
|
1214
|
-
if (
|
|
1215
|
-
if (
|
|
1216
|
-
else if (
|
|
1217
|
-
t.targetAnchor =
|
|
1211
|
+
function p(O, b) {
|
|
1212
|
+
let P = b;
|
|
1213
|
+
for (; P; ) {
|
|
1214
|
+
if (P && P.nodeType === 8) {
|
|
1215
|
+
if (P.data === "teleport start anchor") t.targetStart = P;
|
|
1216
|
+
else if (P.data === "teleport anchor") {
|
|
1217
|
+
t.targetAnchor = P, O._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(
|
|
1225
|
-
|
|
1224
|
+
function v(O, b) {
|
|
1225
|
+
b.anchor = f(s(O), b, l(O), n, i, o, r);
|
|
1226
1226
|
}
|
|
1227
|
-
const
|
|
1228
|
-
if (
|
|
1229
|
-
const
|
|
1230
|
-
t.shapeFlag & 16 && (g ? (v(e, t), p(
|
|
1227
|
+
const y = t.target = io(t.props, a), g = Qt(t.props);
|
|
1228
|
+
if (y) {
|
|
1229
|
+
const O = y._lpa || y.firstChild;
|
|
1230
|
+
t.shapeFlag & 16 && (g ? (v(e, t), p(y, O), t.targetAnchor || oo(y, t, u, c, l(e) === y ? e : null)) : (t.anchor = s(e), p(y, O), t.targetAnchor || oo(y, t, u, c), f(O && s(O), t, y, n, i, o, r))), xn(t, g);
|
|
1231
1231
|
} else g && t.shapeFlag & 16 && (v(e, t), t.targetStart = e, t.targetAnchor = s(e));
|
|
1232
1232
|
return t.anchor && s(t.anchor);
|
|
1233
1233
|
}
|
|
@@ -1271,20 +1271,20 @@ function Fo(e, t) {
|
|
|
1271
1271
|
var ui = /* @__PURE__ */ new WeakMap();
|
|
1272
1272
|
function An(e, t, n, i, o = !1) {
|
|
1273
1273
|
if (J(e)) {
|
|
1274
|
-
e.forEach((g,
|
|
1274
|
+
e.forEach((g, O) => An(g, t && (J(t) ? t[O] : t), n, i, o));
|
|
1275
1275
|
return;
|
|
1276
1276
|
}
|
|
1277
1277
|
if (dn(i) && !o) {
|
|
1278
1278
|
i.shapeFlag & 512 && i.type.__asyncResolved && i.component.subTree.component && An(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 === ye ? l.refs = {} : l.refs, f = l.setupState, p = /* @__PURE__ */ oe(f), v = f === ye ? Rr : (g) => Fo(u, g) ? !1 : de(p, g),
|
|
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 === ye ? l.refs = {} : l.refs, f = l.setupState, p = /* @__PURE__ */ oe(f), v = f === ye ? Rr : (g) => Fo(u, g) ? !1 : de(p, g), y = (g, O) => !(O && Fo(u, O));
|
|
1282
1282
|
if (c != null && c !== a) {
|
|
1283
1283
|
if (Bo(t), we(c))
|
|
1284
1284
|
u[c] = null, v(c) && (f[c] = null);
|
|
1285
1285
|
else if (/* @__PURE__ */ Ae(c)) {
|
|
1286
1286
|
const g = t;
|
|
1287
|
-
|
|
1287
|
+
y(c, g.k) && (c.value = null), g.k && (u[g.k] = null);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
if (ue(a)) {
|
|
@@ -1295,28 +1295,28 @@ function An(e, t, n, i, o = !1) {
|
|
|
1295
1295
|
Dt();
|
|
1296
1296
|
}
|
|
1297
1297
|
} else {
|
|
1298
|
-
const g = we(a),
|
|
1299
|
-
if (g ||
|
|
1300
|
-
const
|
|
1298
|
+
const g = we(a), O = /* @__PURE__ */ Ae(a);
|
|
1299
|
+
if (g || O) {
|
|
1300
|
+
const b = () => {
|
|
1301
1301
|
if (e.f) {
|
|
1302
|
-
const
|
|
1303
|
-
if (o) J(
|
|
1304
|
-
else if (J(
|
|
1302
|
+
const P = g ? v(a) ? f[a] : u[a] : y(a) || !e.k ? a.value : u[e.k];
|
|
1303
|
+
if (o) J(P) && kr(P, r);
|
|
1304
|
+
else if (J(P)) P.includes(r) || P.push(r);
|
|
1305
1305
|
else if (g)
|
|
1306
1306
|
u[a] = [r], v(a) && (f[a] = u[a]);
|
|
1307
1307
|
else {
|
|
1308
1308
|
const F = [r];
|
|
1309
|
-
|
|
1309
|
+
y(a, e.k) && (a.value = F), e.k && (u[e.k] = F);
|
|
1310
1310
|
}
|
|
1311
|
-
} else g ? (u[a] = s, v(a) && (f[a] = s)) :
|
|
1311
|
+
} else g ? (u[a] = s, v(a) && (f[a] = s)) : O && (y(a, e.k) && (a.value = s), e.k && (u[e.k] = s));
|
|
1312
1312
|
};
|
|
1313
1313
|
if (s) {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1314
|
+
const P = () => {
|
|
1315
|
+
b(), ui.delete(e);
|
|
1316
1316
|
};
|
|
1317
|
-
|
|
1317
|
+
P.id = -1, ui.set(e, P), ze(P, n);
|
|
1318
1318
|
} else
|
|
1319
|
-
Bo(e),
|
|
1319
|
+
Bo(e), b();
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
@@ -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$/, ""), de(e, t[0].toLowerCase() + t.slice(1)) || de(e, on(t)) || de(e, t));
|
|
1565
1565
|
}
|
|
1566
1566
|
function Wi(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:
|
|
1568
|
-
let
|
|
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, O = ci(e);
|
|
1568
|
+
let b, P;
|
|
1569
1569
|
try {
|
|
1570
1570
|
if (n.shapeFlag & 4) {
|
|
1571
|
-
const S = o || i,
|
|
1572
|
-
|
|
1571
|
+
const S = o || i, H = S;
|
|
1572
|
+
b = wt(c.call(H, S, u, f, v, p, y)), P = l;
|
|
1573
1573
|
} else {
|
|
1574
1574
|
const S = t;
|
|
1575
|
-
|
|
1575
|
+
b = wt(S.length > 1 ? S(f, {
|
|
1576
1576
|
attrs: l,
|
|
1577
1577
|
slots: s,
|
|
1578
1578
|
emit: a
|
|
1579
|
-
}) : S(f, null)),
|
|
1579
|
+
}) : S(f, null)), P = t.props ? l : $a(l);
|
|
1580
1580
|
}
|
|
1581
1581
|
} catch (S) {
|
|
1582
|
-
Nn.length = 0, Pi(S, e, 1),
|
|
1582
|
+
Nn.length = 0, Pi(S, e, 1), b = Oe(Ft);
|
|
1583
1583
|
}
|
|
1584
|
-
let F =
|
|
1585
|
-
if (
|
|
1586
|
-
const S = Object.keys(
|
|
1587
|
-
S.length &&
|
|
1584
|
+
let F = b;
|
|
1585
|
+
if (P && g !== !1) {
|
|
1586
|
+
const S = Object.keys(P), { shapeFlag: H } = F;
|
|
1587
|
+
S.length && H & 7 && (r && S.some(Si) && (P = Fa(P, r)), F = pn(F, P, !1, !0));
|
|
1588
1588
|
}
|
|
1589
|
-
return n.dirs && (F = pn(F, null, !1, !0), F.dirs = F.dirs ? F.dirs.concat(n.dirs) : n.dirs), n.transition && bo(F, n.transition),
|
|
1589
|
+
return n.dirs && (F = pn(F, null, !1, !0), F.dirs = F.dirs ? F.dirs.concat(n.dirs) : n.dirs), n.transition && bo(F, n.transition), b = F, ci(O), b;
|
|
1590
1590
|
}
|
|
1591
1591
|
var $a = (e) => {
|
|
1592
1592
|
let t;
|
|
@@ -1657,8 +1657,8 @@ function Wa(e, t, n, i) {
|
|
|
1657
1657
|
if (a) if (de(r, p))
|
|
1658
1658
|
v !== r[p] && (r[p] = v, c = !0);
|
|
1659
1659
|
else {
|
|
1660
|
-
const
|
|
1661
|
-
o[
|
|
1660
|
+
const y = pt(p);
|
|
1661
|
+
o[y] = so(a, l, y, v, e, !1);
|
|
1662
1662
|
}
|
|
1663
1663
|
else v !== r[p] && (r[p] = v, c = !0);
|
|
1664
1664
|
}
|
|
@@ -1724,16 +1724,16 @@ function Ha(e, t, n = !1) {
|
|
|
1724
1724
|
const u = pt(c);
|
|
1725
1725
|
if (Vo(u)) {
|
|
1726
1726
|
const f = r[c], p = s[u] = J(f) || ue(f) ? { type: f } : ot({}, f), v = p.type;
|
|
1727
|
-
let
|
|
1728
|
-
if (J(v)) for (let
|
|
1729
|
-
const
|
|
1730
|
-
if (
|
|
1731
|
-
|
|
1727
|
+
let y = !1, g = !0;
|
|
1728
|
+
if (J(v)) for (let O = 0; O < v.length; ++O) {
|
|
1729
|
+
const b = v[O], P = ue(b) && b.name;
|
|
1730
|
+
if (P === "Boolean") {
|
|
1731
|
+
y = !0;
|
|
1732
1732
|
break;
|
|
1733
|
-
} else
|
|
1733
|
+
} else P === "String" && (g = !1);
|
|
1734
1734
|
}
|
|
1735
|
-
else
|
|
1736
|
-
p[0] =
|
|
1735
|
+
else y = ue(v) && v.name === "Boolean";
|
|
1736
|
+
p[0] = y, p[1] = g, (y || de(p, "default")) && l.push(u);
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
1739
|
const a = [s, l];
|
|
@@ -1784,37 +1784,37 @@ function Ka(e) {
|
|
|
1784
1784
|
function Ga(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:
|
|
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, T = null, E = null, w = null, k = void 0, A = null, R = !!h.dynamicChildren) => {
|
|
1788
1788
|
if (d === h) return;
|
|
1789
1789
|
d && !wn(d, h) && (T = st(d), Fe(d, E, w, !0), d = null), h.patchFlag === -2 && (R = !1, h.dynamicChildren = null);
|
|
1790
1790
|
const { type: C, ref: z, shapeFlag: D } = h;
|
|
1791
1791
|
switch (C) {
|
|
1792
1792
|
case Ai:
|
|
1793
|
-
|
|
1793
|
+
O(d, h, m, T);
|
|
1794
1794
|
break;
|
|
1795
1795
|
case Ft:
|
|
1796
|
-
|
|
1796
|
+
b(d, h, m, T);
|
|
1797
1797
|
break;
|
|
1798
1798
|
case kn:
|
|
1799
|
-
d == null &&
|
|
1799
|
+
d == null && P(h, m, T, k);
|
|
1800
1800
|
break;
|
|
1801
1801
|
case ve:
|
|
1802
|
-
fe(d, h, m, T, E, w,
|
|
1802
|
+
fe(d, h, m, T, E, w, k, A, R);
|
|
1803
1803
|
break;
|
|
1804
1804
|
default:
|
|
1805
|
-
D & 1 ?
|
|
1805
|
+
D & 1 ? H(d, h, m, T, E, w, k, A, R) : D & 6 ? I(d, h, m, T, E, w, k, A, R) : (D & 64 || D & 128) && C.process(d, h, m, T, E, w, k, A, R, me);
|
|
1806
1806
|
}
|
|
1807
1807
|
z != null && E ? An(z, d && d.ref, w, h || d, !h) : z == null && d && d.ref != null && An(d.ref, null, w, d, !0);
|
|
1808
|
-
},
|
|
1808
|
+
}, O = (d, h, m, T) => {
|
|
1809
1809
|
if (d == null) i(h.el = l(h.children), m, T);
|
|
1810
1810
|
else {
|
|
1811
1811
|
const E = h.el = d.el;
|
|
1812
1812
|
h.children !== d.children && c(E, h.children);
|
|
1813
1813
|
}
|
|
1814
|
-
},
|
|
1814
|
+
}, b = (d, h, m, T) => {
|
|
1815
1815
|
d == null ? i(h.el = a(h.children || ""), m, T) : h.el = d.el;
|
|
1816
|
-
},
|
|
1817
|
-
[d.el, d.anchor] =
|
|
1816
|
+
}, P = (d, h, m, T) => {
|
|
1817
|
+
[d.el, d.anchor] = y(d.children, h, m, T, d.el, d.anchor);
|
|
1818
1818
|
}, F = ({ el: d, anchor: h }, m, T) => {
|
|
1819
1819
|
let E;
|
|
1820
1820
|
for (; d && d !== h; )
|
|
@@ -1825,66 +1825,66 @@ function Ga(e, t) {
|
|
|
1825
1825
|
for (; d && d !== h; )
|
|
1826
1826
|
m = p(d), o(d), d = m;
|
|
1827
1827
|
o(h);
|
|
1828
|
-
},
|
|
1829
|
-
if (h.type === "svg" ?
|
|
1828
|
+
}, H = (d, h, m, T, E, w, k, A, R) => {
|
|
1829
|
+
if (h.type === "svg" ? k = "svg" : h.type === "math" && (k = "mathml"), d == null) U(h, m, T, E, w, k, A, R);
|
|
1830
1830
|
else {
|
|
1831
1831
|
const C = d.el && d.el._isVueCE ? d.el : null;
|
|
1832
1832
|
try {
|
|
1833
|
-
C && C._beginPatch(),
|
|
1833
|
+
C && C._beginPatch(), B(d, h, E, w, k, A, R);
|
|
1834
1834
|
} finally {
|
|
1835
1835
|
C && C._endPatch();
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
}, U = (d, h, m, T, E, w,
|
|
1838
|
+
}, U = (d, h, m, T, E, w, k, A) => {
|
|
1839
1839
|
let R, C;
|
|
1840
|
-
const { props: z, shapeFlag: D, transition:
|
|
1841
|
-
if (R = d.el = s(d.type, w, z && z.is, z), D & 8 ? u(R, d.children) : D & 16 &&
|
|
1840
|
+
const { props: z, shapeFlag: D, transition: W, dirs: K } = d;
|
|
1841
|
+
if (R = d.el = s(d.type, w, z && z.is, z), D & 8 ? u(R, d.children) : D & 16 && j(d.children, R, null, T, E, Hi(d, w), k, A), K && Yt(d, null, T, "created"), N(R, d, d.scopeId, k, T), z) {
|
|
1842
1842
|
for (const re in z) re !== "value" && !Pn(re) && r(R, re, null, z[re], w, T);
|
|
1843
1843
|
"value" in z && r(R, "value", null, z.value, w), (C = z.onVnodeBeforeMount) && bt(C, T, d);
|
|
1844
1844
|
}
|
|
1845
1845
|
K && Yt(d, null, T, "beforeMount");
|
|
1846
|
-
const Z = Ya(E,
|
|
1847
|
-
Z &&
|
|
1848
|
-
C && bt(C, T, d), Z &&
|
|
1846
|
+
const Z = Ya(E, W);
|
|
1847
|
+
Z && W.beforeEnter(R), i(R, h, m), ((C = z && z.onVnodeMounted) || Z || K) && ze(() => {
|
|
1848
|
+
C && bt(C, T, d), Z && W.enter(R), K && Yt(d, null, T, "mounted");
|
|
1849
1849
|
}, E);
|
|
1850
|
-
},
|
|
1850
|
+
}, N = (d, h, m, T, E) => {
|
|
1851
1851
|
if (m && v(d, m), T) for (let w = 0; w < T.length; w++) v(d, T[w]);
|
|
1852
1852
|
if (E) {
|
|
1853
1853
|
let w = E.subTree;
|
|
1854
1854
|
if (h === w || Ps(w.type) && (w.ssContent === h || w.ssFallback === h)) {
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1855
|
+
const k = E.vnode;
|
|
1856
|
+
N(d, k, k.scopeId, k.slotScopeIds, E.parent);
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
|
-
},
|
|
1859
|
+
}, j = (d, h, m, T, E, w, k, A, R = 0) => {
|
|
1860
1860
|
for (let C = R; C < d.length; C++) {
|
|
1861
1861
|
const z = d[C] = A ? At(d[C]) : wt(d[C]);
|
|
1862
|
-
g(null, z, h, m, T, E, w,
|
|
1862
|
+
g(null, z, h, m, T, E, w, k, A);
|
|
1863
1863
|
}
|
|
1864
|
-
},
|
|
1864
|
+
}, B = (d, h, m, T, E, w, k) => {
|
|
1865
1865
|
const A = h.el = d.el;
|
|
1866
1866
|
let { patchFlag: R, dynamicChildren: C, dirs: z } = h;
|
|
1867
1867
|
R |= d.patchFlag & 16;
|
|
1868
|
-
const D = d.props || ye,
|
|
1868
|
+
const D = d.props || ye, W = h.props || ye;
|
|
1869
1869
|
let K;
|
|
1870
|
-
if (m && Xt(m, !1), (K =
|
|
1871
|
-
if (R & 16) le(A, D,
|
|
1872
|
-
else if (R & 2 && D.class !==
|
|
1870
|
+
if (m && Xt(m, !1), (K = W.onVnodeBeforeUpdate) && bt(K, m, h, d), z && Yt(h, d, m, "beforeUpdate"), m && Xt(m, !0), C && (!d.dynamicChildren || d.dynamicChildren.length !== C.length) && (R = 0, k = !1, C = null), (D.innerHTML && W.innerHTML == null || D.textContent && W.textContent == null) && u(A, ""), C ? Y(d.dynamicChildren, C, A, m, T, Hi(h, E), w) : k || Le(d, h, A, null, m, T, Hi(h, E), w, !1), R > 0) {
|
|
1871
|
+
if (R & 16) le(A, D, W, m, E);
|
|
1872
|
+
else if (R & 2 && D.class !== W.class && r(A, "class", null, W.class, E), R & 4 && r(A, "style", D.style, W.style, E), R & 8) {
|
|
1873
1873
|
const Z = h.dynamicProps;
|
|
1874
1874
|
for (let re = 0; re < Z.length; re++) {
|
|
1875
|
-
const ne = Z[re], he = D[ne], ae =
|
|
1875
|
+
const ne = Z[re], he = D[ne], ae = W[ne];
|
|
1876
1876
|
(ae !== he || ne === "value") && r(A, ne, he, ae, E, m);
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
1879
|
R & 1 && d.children !== h.children && u(A, h.children);
|
|
1880
|
-
} else !
|
|
1881
|
-
((K =
|
|
1880
|
+
} else !k && C == null && le(A, D, W, m, E);
|
|
1881
|
+
((K = W.onVnodeUpdated) || z) && ze(() => {
|
|
1882
1882
|
K && bt(K, m, h, d), z && Yt(h, d, m, "updated");
|
|
1883
1883
|
}, T);
|
|
1884
|
-
}, Y = (d, h, m, T, E, w,
|
|
1884
|
+
}, Y = (d, h, m, T, E, w, k) => {
|
|
1885
1885
|
for (let A = 0; A < h.length; A++) {
|
|
1886
1886
|
const R = d[A], C = h[A], z = R.el && (R.type === ve || !wn(R, C) || R.shapeFlag & 198) ? f(R.el) : m;
|
|
1887
|
-
g(R, C, z, null, T, E, w,
|
|
1887
|
+
g(R, C, z, null, T, E, w, k, !0);
|
|
1888
1888
|
}
|
|
1889
1889
|
}, le = (d, h, m, T, E) => {
|
|
1890
1890
|
if (h !== m) {
|
|
@@ -1892,25 +1892,25 @@ function Ga(e, t) {
|
|
|
1892
1892
|
for (const w in h) !Pn(w) && !(w in m) && r(d, w, h[w], null, E, T);
|
|
1893
1893
|
for (const w in m) {
|
|
1894
1894
|
if (Pn(w)) continue;
|
|
1895
|
-
const
|
|
1896
|
-
|
|
1895
|
+
const k = m[w], A = h[w];
|
|
1896
|
+
k !== A && w !== "value" && r(d, w, A, k, E, T);
|
|
1897
1897
|
}
|
|
1898
1898
|
"value" in m && r(d, "value", h.value, m.value, E);
|
|
1899
1899
|
}
|
|
1900
|
-
}, fe = (d, h, m, T, E, w,
|
|
1900
|
+
}, fe = (d, h, m, T, E, w, k, A, R) => {
|
|
1901
1901
|
const C = h.el = d ? d.el : l(""), z = h.anchor = d ? d.anchor : l("");
|
|
1902
|
-
let { patchFlag: D, dynamicChildren:
|
|
1903
|
-
K && (A = A ? A.concat(K) : K), d == null ? (i(C, m, T), i(z, m, T),
|
|
1904
|
-
}, I = (d, h, m, T, E, w,
|
|
1905
|
-
h.slotScopeIds = A, d == null ? h.shapeFlag & 512 ? E.ctx.activate(h, m, T,
|
|
1906
|
-
}, X = (d, h, m, T, E, w,
|
|
1902
|
+
let { patchFlag: D, dynamicChildren: W, slotScopeIds: K } = h;
|
|
1903
|
+
K && (A = A ? A.concat(K) : K), d == null ? (i(C, m, T), i(z, m, T), j(h.children || [], m, z, E, w, k, A, R)) : D > 0 && D & 64 && W && d.dynamicChildren && d.dynamicChildren.length === W.length ? (Y(d.dynamicChildren, W, m, E, w, k, A), (h.key != null || E && h === E.subTree) && wo(d, h, !0)) : Le(d, h, m, z, E, w, k, A, R);
|
|
1904
|
+
}, I = (d, h, m, T, E, w, k, A, R) => {
|
|
1905
|
+
h.slotScopeIds = A, d == null ? h.shapeFlag & 512 ? E.ctx.activate(h, m, T, k, R) : X(h, m, T, E, w, k, R) : Q(d, h, R);
|
|
1906
|
+
}, X = (d, h, m, T, E, w, k) => {
|
|
1907
1907
|
const A = d.component = oc(d, T, E);
|
|
1908
|
-
if (xa(d) && (A.ctx.renderer = me), rc(A, !1,
|
|
1909
|
-
if (E && E.registerDep(A, G,
|
|
1908
|
+
if (xa(d) && (A.ctx.renderer = me), rc(A, !1, k), A.asyncDep) {
|
|
1909
|
+
if (E && E.registerDep(A, G, k), !d.el) {
|
|
1910
1910
|
const R = A.subTree = Oe(Ft);
|
|
1911
|
-
|
|
1911
|
+
b(null, R, h, m), d.placeholder = R.el;
|
|
1912
1912
|
}
|
|
1913
|
-
} else G(A, d, h, m, E, w,
|
|
1913
|
+
} else G(A, d, h, m, E, w, k);
|
|
1914
1914
|
}, Q = (d, h, m) => {
|
|
1915
1915
|
const T = h.component = d.component;
|
|
1916
1916
|
if (Ba(d, h, m)) if (T.asyncDep && !T.asyncResolved) {
|
|
@@ -1920,14 +1920,14 @@ function Ga(e, t) {
|
|
|
1920
1920
|
T.next = h, T.update();
|
|
1921
1921
|
else
|
|
1922
1922
|
h.el = d.el, T.vnode = h;
|
|
1923
|
-
}, G = (d, h, m, T, E, w,
|
|
1923
|
+
}, G = (d, h, m, T, E, w, k) => {
|
|
1924
1924
|
const A = () => {
|
|
1925
1925
|
if (d.isMounted) {
|
|
1926
|
-
let { next: D, bu:
|
|
1926
|
+
let { next: D, bu: W, u: K, parent: Z, vnode: re } = d;
|
|
1927
1927
|
{
|
|
1928
1928
|
const Te = xs(d);
|
|
1929
1929
|
if (Te) {
|
|
1930
|
-
D && (D.el = re.el, ee(d, D,
|
|
1930
|
+
D && (D.el = re.el, ee(d, D, k)), Te.asyncDep.then(() => {
|
|
1931
1931
|
ze(() => {
|
|
1932
1932
|
d.isUnmounted || C();
|
|
1933
1933
|
}, E);
|
|
@@ -1936,17 +1936,17 @@ function Ga(e, t) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
let ne = D, he;
|
|
1939
|
-
Xt(d, !1), D ? (D.el = re.el, ee(d, D,
|
|
1939
|
+
Xt(d, !1), D ? (D.el = re.el, ee(d, D, k)) : D = re, W && oi(W), (he = D.props && D.props.onVnodeBeforeUpdate) && bt(he, Z, D, re), Xt(d, !0);
|
|
1940
1940
|
const ae = Wi(d), Be = d.subTree;
|
|
1941
1941
|
d.subTree = ae, g(Be, ae, f(Be.el), st(Be), d, E, w), D.el = ae.el, ne === null && ja(d, ae.el), K && ze(K, E), (he = D.props && D.props.onVnodeUpdated) && ze(() => bt(he, Z, D, re), E);
|
|
1942
1942
|
} else {
|
|
1943
1943
|
let D;
|
|
1944
|
-
const { el:
|
|
1945
|
-
if (Xt(d, !1), Z && oi(Z), !Be && (D = K && K.onVnodeBeforeMount) && bt(D, ne, h), Xt(d, !0),
|
|
1944
|
+
const { el: W, props: K } = h, { bm: Z, m: re, parent: ne, root: he, type: ae } = d, Be = dn(h);
|
|
1945
|
+
if (Xt(d, !1), Z && oi(Z), !Be && (D = K && K.onVnodeBeforeMount) && bt(D, ne, h), Xt(d, !0), W && lt) {
|
|
1946
1946
|
const Te = () => {
|
|
1947
|
-
d.subTree = Wi(d), lt(
|
|
1947
|
+
d.subTree = Wi(d), lt(W, d.subTree, d, E, null);
|
|
1948
1948
|
};
|
|
1949
|
-
Be && ae.__asyncHydrate ? ae.__asyncHydrate(
|
|
1949
|
+
Be && ae.__asyncHydrate ? ae.__asyncHydrate(W, d, Te) : Te();
|
|
1950
1950
|
} else {
|
|
1951
1951
|
he.ce && he.ce._hasShadowRoot() && he.ce._injectChildStyle(ae, d.parent ? d.parent.type : void 0);
|
|
1952
1952
|
const Te = d.subTree = Wi(d);
|
|
@@ -1968,59 +1968,59 @@ function Ga(e, t) {
|
|
|
1968
1968
|
h.component = d;
|
|
1969
1969
|
const T = d.vnode.props;
|
|
1970
1970
|
d.vnode = h, d.next = null, Wa(d, h.props, T, m), qa(d, h.children, m), Lt(), Lo(d), Dt();
|
|
1971
|
-
}, Le = (d, h, m, T, E, w,
|
|
1972
|
-
const C = d && d.children, z = d ? d.shapeFlag : 0, D = h.children, { patchFlag:
|
|
1973
|
-
if (
|
|
1974
|
-
if (
|
|
1975
|
-
De(C, D, m, T, E, w,
|
|
1971
|
+
}, Le = (d, h, m, T, E, w, k, A, R = !1) => {
|
|
1972
|
+
const C = d && d.children, z = d ? d.shapeFlag : 0, D = h.children, { patchFlag: W, shapeFlag: K } = h;
|
|
1973
|
+
if (W > 0) {
|
|
1974
|
+
if (W & 128) {
|
|
1975
|
+
De(C, D, m, T, E, w, k, A, R);
|
|
1976
1976
|
return;
|
|
1977
|
-
} else if (
|
|
1978
|
-
Je(C, D, m, T, E, w,
|
|
1977
|
+
} else if (W & 256) {
|
|
1978
|
+
Je(C, D, m, T, E, w, k, A, R);
|
|
1979
1979
|
return;
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
|
-
K & 8 ? (z & 16 && Ze(C, E, w), D !== C && u(m, D)) : z & 16 ? K & 16 ? De(C, D, m, T, E, w,
|
|
1983
|
-
}, Je = (d, h, m, T, E, w,
|
|
1982
|
+
K & 8 ? (z & 16 && Ze(C, E, w), D !== C && u(m, D)) : z & 16 ? K & 16 ? De(C, D, m, T, E, w, k, A, R) : Ze(C, E, w, !0) : (z & 8 && u(m, ""), K & 16 && j(D, m, T, E, w, k, A, R));
|
|
1983
|
+
}, Je = (d, h, m, T, E, w, k, A, R) => {
|
|
1984
1984
|
d = d || an, h = h || an;
|
|
1985
1985
|
const C = d.length, z = h.length, D = Math.min(C, z);
|
|
1986
|
-
let
|
|
1987
|
-
for (
|
|
1988
|
-
const K = h[
|
|
1989
|
-
g(d[
|
|
1986
|
+
let W;
|
|
1987
|
+
for (W = 0; W < D; W++) {
|
|
1988
|
+
const K = h[W] = R ? At(h[W]) : wt(h[W]);
|
|
1989
|
+
g(d[W], K, m, null, E, w, k, A, R);
|
|
1990
1990
|
}
|
|
1991
|
-
C > z ? Ze(d, E, w, !0, !1, D) :
|
|
1992
|
-
}, De = (d, h, m, T, E, w,
|
|
1991
|
+
C > z ? Ze(d, E, w, !0, !1, D) : j(h, m, T, E, w, k, A, R, D);
|
|
1992
|
+
}, De = (d, h, m, T, E, w, k, A, R) => {
|
|
1993
1993
|
let C = 0;
|
|
1994
1994
|
const z = h.length;
|
|
1995
|
-
let D = d.length - 1,
|
|
1996
|
-
for (; C <= D && C <=
|
|
1995
|
+
let D = d.length - 1, W = z - 1;
|
|
1996
|
+
for (; C <= D && C <= W; ) {
|
|
1997
1997
|
const K = d[C], Z = h[C] = R ? At(h[C]) : wt(h[C]);
|
|
1998
|
-
if (wn(K, Z)) g(K, Z, m, null, E, w,
|
|
1998
|
+
if (wn(K, Z)) g(K, Z, m, null, E, w, k, A, R);
|
|
1999
1999
|
else break;
|
|
2000
2000
|
C++;
|
|
2001
2001
|
}
|
|
2002
|
-
for (; C <= D && C <=
|
|
2003
|
-
const K = d[D], Z = h[
|
|
2004
|
-
if (wn(K, Z)) g(K, Z, m, null, E, w,
|
|
2002
|
+
for (; C <= D && C <= W; ) {
|
|
2003
|
+
const K = d[D], Z = h[W] = R ? At(h[W]) : wt(h[W]);
|
|
2004
|
+
if (wn(K, Z)) g(K, Z, m, null, E, w, k, A, R);
|
|
2005
2005
|
else break;
|
|
2006
|
-
D--,
|
|
2006
|
+
D--, W--;
|
|
2007
2007
|
}
|
|
2008
2008
|
if (C > D) {
|
|
2009
|
-
if (C <=
|
|
2010
|
-
const K =
|
|
2011
|
-
for (; C <=
|
|
2012
|
-
g(null, h[C] = R ? At(h[C]) : wt(h[C]), m, Z, E, w,
|
|
2009
|
+
if (C <= W) {
|
|
2010
|
+
const K = W + 1, Z = K < z ? h[K].el : T;
|
|
2011
|
+
for (; C <= W; )
|
|
2012
|
+
g(null, h[C] = R ? At(h[C]) : wt(h[C]), m, Z, E, w, k, A, R), C++;
|
|
2013
2013
|
}
|
|
2014
|
-
} else if (C >
|
|
2014
|
+
} else if (C > W) for (; C <= D; )
|
|
2015
2015
|
Fe(d[C], E, w, !0), C++;
|
|
2016
2016
|
else {
|
|
2017
2017
|
const K = C, Z = C, re = /* @__PURE__ */ new Map();
|
|
2018
|
-
for (C = Z; C <=
|
|
2018
|
+
for (C = Z; C <= W; C++) {
|
|
2019
2019
|
const Ie = h[C] = R ? At(h[C]) : wt(h[C]);
|
|
2020
2020
|
Ie.key != null && re.set(Ie.key, C);
|
|
2021
2021
|
}
|
|
2022
2022
|
let ne, he = 0;
|
|
2023
|
-
const ae =
|
|
2023
|
+
const ae = W - Z + 1;
|
|
2024
2024
|
let Be = !1, Te = 0;
|
|
2025
2025
|
const _t = new Array(ae);
|
|
2026
2026
|
for (C = 0; C < ae; C++) _t[C] = 0;
|
|
@@ -2032,20 +2032,20 @@ function Ga(e, t) {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
let je;
|
|
2034
2034
|
if (Ie.key != null) je = re.get(Ie.key);
|
|
2035
|
-
else for (ne = Z; ne <=
|
|
2035
|
+
else for (ne = Z; ne <= W; ne++) if (_t[ne - Z] === 0 && wn(Ie, h[ne])) {
|
|
2036
2036
|
je = ne;
|
|
2037
2037
|
break;
|
|
2038
2038
|
}
|
|
2039
|
-
je === void 0 ? Fe(Ie, E, w, !0) : (_t[je - Z] = C + 1, je >= Te ? Te = je : Be = !0, g(Ie, h[je], m, null, E, w,
|
|
2039
|
+
je === void 0 ? Fe(Ie, E, w, !0) : (_t[je - Z] = C + 1, je >= Te ? Te = je : Be = !0, g(Ie, h[je], m, null, E, w, k, A, R), he++);
|
|
2040
2040
|
}
|
|
2041
2041
|
const dt = Be ? Xa(_t) : an;
|
|
2042
2042
|
for (ne = dt.length - 1, C = ae - 1; C >= 0; C--) {
|
|
2043
2043
|
const Ie = Z + C, je = h[Ie], et = h[Ie + 1], Ge = Ie + 1 < z ? et.el || Os(et) : T;
|
|
2044
|
-
_t[C] === 0 ? g(null, je, m, Ge, E, w,
|
|
2044
|
+
_t[C] === 0 ? g(null, je, m, Ge, E, w, k, A, R) : Be && (ne < 0 || C !== dt[ne] ? $e(je, m, Ge, 2) : ne--);
|
|
2045
2045
|
}
|
|
2046
2046
|
}
|
|
2047
2047
|
}, $e = (d, h, m, T, E = null) => {
|
|
2048
|
-
const { el: w, type:
|
|
2048
|
+
const { el: w, type: k, transition: A, children: R, shapeFlag: C } = d;
|
|
2049
2049
|
if (C & 6) {
|
|
2050
2050
|
$e(d.component.subTree, h, m, T);
|
|
2051
2051
|
return;
|
|
@@ -2055,41 +2055,41 @@ function Ga(e, t) {
|
|
|
2055
2055
|
return;
|
|
2056
2056
|
}
|
|
2057
2057
|
if (C & 64) {
|
|
2058
|
-
|
|
2058
|
+
k.move(d, h, m, me);
|
|
2059
2059
|
return;
|
|
2060
2060
|
}
|
|
2061
|
-
if (
|
|
2061
|
+
if (k === ve) {
|
|
2062
2062
|
i(w, h, m);
|
|
2063
2063
|
for (let z = 0; z < R.length; z++) $e(R[z], h, m, T);
|
|
2064
2064
|
i(d.anchor, h, m);
|
|
2065
2065
|
return;
|
|
2066
2066
|
}
|
|
2067
|
-
if (
|
|
2067
|
+
if (k === kn) {
|
|
2068
2068
|
F(d, h, m);
|
|
2069
2069
|
return;
|
|
2070
2070
|
}
|
|
2071
2071
|
if (T !== 2 && C & 1 && A) if (T === 0) A.persisted && !w[ji] ? i(w, h, m) : (A.beforeEnter(w), i(w, h, m), ze(() => A.enter(w), E));
|
|
2072
2072
|
else {
|
|
2073
|
-
const { leave: z, delayLeave: D, afterLeave:
|
|
2073
|
+
const { leave: z, delayLeave: D, afterLeave: W } = A, K = () => {
|
|
2074
2074
|
d.ctx.isUnmounted ? o(w) : i(w, h, m);
|
|
2075
2075
|
}, Z = () => {
|
|
2076
2076
|
const re = w._isLeaving || !!w[ji];
|
|
2077
2077
|
w._isLeaving && w[ji](!0), A.persisted && !re ? K() : z(w, () => {
|
|
2078
|
-
K(),
|
|
2078
|
+
K(), W && W();
|
|
2079
2079
|
});
|
|
2080
2080
|
};
|
|
2081
2081
|
D ? D(w, K, Z) : Z();
|
|
2082
2082
|
}
|
|
2083
2083
|
else i(w, h, m);
|
|
2084
2084
|
}, Fe = (d, h, m, T = !1, E = !1) => {
|
|
2085
|
-
const { type: w, props:
|
|
2085
|
+
const { type: w, props: k, ref: A, children: R, dynamicChildren: C, shapeFlag: z, patchFlag: D, dirs: W, cacheIndex: K, memo: Z } = d;
|
|
2086
2086
|
if (D === -2 && (E = !1), A != null && (Lt(), An(A, null, m, d, !0), Dt()), K != null && (h.renderCache[K] = void 0), z & 256) {
|
|
2087
2087
|
h.ctx.deactivate(d);
|
|
2088
2088
|
return;
|
|
2089
2089
|
}
|
|
2090
|
-
const re = z & 1 &&
|
|
2090
|
+
const re = z & 1 && W, ne = !dn(d);
|
|
2091
2091
|
let he;
|
|
2092
|
-
if (ne && (he =
|
|
2092
|
+
if (ne && (he = k && k.onVnodeBeforeUnmount) && bt(he, h, d), z & 6) mt(d.component, m, T);
|
|
2093
2093
|
else {
|
|
2094
2094
|
if (z & 128) {
|
|
2095
2095
|
d.suspense.unmount(m, T);
|
|
@@ -2098,7 +2098,7 @@ function Ga(e, t) {
|
|
|
2098
2098
|
re && Yt(d, null, h, "beforeUnmount"), z & 64 ? d.type.remove(d, h, m, me, T) : C && !C.hasOnce && (w !== ve || D > 0 && D & 64) ? Ze(C, h, m, !1, !0) : (w === ve && D & 384 || !E && z & 16) && Ze(R, h, m), T && ct(d);
|
|
2099
2099
|
}
|
|
2100
2100
|
const ae = Z != null && K == null;
|
|
2101
|
-
(ne && (he =
|
|
2101
|
+
(ne && (he = k && k.onVnodeUnmounted) || re || ae) && ze(() => {
|
|
2102
2102
|
he && bt(he, h, d), re && Yt(d, null, h, "unmounted"), ae && (d.el = null);
|
|
2103
2103
|
}, m);
|
|
2104
2104
|
}, ct = (d) => {
|
|
@@ -2115,7 +2115,7 @@ function Ga(e, t) {
|
|
|
2115
2115
|
o(m), E && !E.persisted && E.afterLeave && E.afterLeave();
|
|
2116
2116
|
};
|
|
2117
2117
|
if (d.shapeFlag & 1 && E && !E.persisted) {
|
|
2118
|
-
const { leave:
|
|
2118
|
+
const { leave: k, delayLeave: A } = E, R = () => k(m, w);
|
|
2119
2119
|
A ? A(d.el, w, R) : R();
|
|
2120
2120
|
} else w();
|
|
2121
2121
|
}, ut = (d, h) => {
|
|
@@ -2124,12 +2124,12 @@ function Ga(e, t) {
|
|
|
2124
2124
|
m = p(d), o(d), d = m;
|
|
2125
2125
|
o(h);
|
|
2126
2126
|
}, mt = (d, h, m) => {
|
|
2127
|
-
const { bum: T, scope: E, job: w, subTree:
|
|
2128
|
-
Wo(R), Wo(C), T && oi(T), E.stop(), w && (w.flags |= 8, Fe(
|
|
2127
|
+
const { bum: T, scope: E, job: w, subTree: k, um: A, m: R, a: C } = d;
|
|
2128
|
+
Wo(R), Wo(C), T && oi(T), E.stop(), w && (w.flags |= 8, Fe(k, d, h, m)), A && ze(A, h), ze(() => {
|
|
2129
2129
|
d.isUnmounted = !0;
|
|
2130
2130
|
}, h);
|
|
2131
2131
|
}, Ze = (d, h, m, T = !1, E = !1, w = 0) => {
|
|
2132
|
-
for (let
|
|
2132
|
+
for (let k = w; k < d.length; k++) Fe(d[k], h, m, T, E);
|
|
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();
|
|
@@ -2146,7 +2146,7 @@ function Ga(e, t) {
|
|
|
2146
2146
|
m: $e,
|
|
2147
2147
|
r: ct,
|
|
2148
2148
|
mt: X,
|
|
2149
|
-
mc:
|
|
2149
|
+
mc: j,
|
|
2150
2150
|
pc: Le,
|
|
2151
2151
|
pbc: Y,
|
|
2152
2152
|
n: st,
|
|
@@ -2226,8 +2226,8 @@ function Ho(e, t = !1) {
|
|
|
2226
2226
|
function Ms(e) {
|
|
2227
2227
|
return e.dynamicChildren = jn > 0 ? nt || an : null, Za(), jn > 0 && nt && nt.push(e), e;
|
|
2228
2228
|
}
|
|
2229
|
-
function
|
|
2230
|
-
return Ms(
|
|
2229
|
+
function V(e, t, n, i, o, r) {
|
|
2230
|
+
return Ms(_(e, t, n, i, o, r, !0));
|
|
2231
2231
|
}
|
|
2232
2232
|
function xt(e, t, n, i, o) {
|
|
2233
2233
|
return Ms(Oe(e, t, n, i, o, !0));
|
|
@@ -2244,7 +2244,7 @@ var Is = ({ 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
|
|
2247
|
+
function _(e, t = null, n = null, i = 0, o = null, r = e === ve ? 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 Qa(e, t = null, n = null, i = 0, o = null, r = !1) {
|
|
|
2288
2288
|
l && !we(l) && (t.class = Pe(l)), ge(a) && (/* @__PURE__ */ Oi(a) && !J(a) && (a = ot({}, a)), t.style = qt(a));
|
|
2289
2289
|
}
|
|
2290
2290
|
const s = we(e) ? 1 : Ps(e) ? 128 : ba(e) ? 64 : ge(e) ? 4 : ue(e) ? 2 : 0;
|
|
2291
|
-
return
|
|
2291
|
+
return _(e, t, n, i, o, s, r, !0);
|
|
2292
2292
|
}
|
|
2293
2293
|
function ec(e) {
|
|
2294
2294
|
return e ? /* @__PURE__ */ Oi(e) || Ss(e) ? ot({}, e) : e : null;
|
|
@@ -3112,9 +3112,9 @@ var ru = Object.defineProperty, pr = Object.getOwnPropertySymbols, su = Object.p
|
|
|
3112
3112
|
__name: "Frame",
|
|
3113
3113
|
setup(e, { expose: t }) {
|
|
3114
3114
|
const n = /* @__PURE__ */ L(null), { frameLoading: i, showEmptyState: o, showError: r, iframeSource: s, emptyStateText: l, emptyStateActionText: a, handleEmptyAction: c, handleFrameLoaded: u } = gn();
|
|
3115
|
-
function f(v,
|
|
3115
|
+
function f(v, y) {
|
|
3116
3116
|
var g;
|
|
3117
|
-
(g = n.value) != null && g.contentWindow && n.value.contentWindow.postMessage(au({ type: v },
|
|
3117
|
+
(g = n.value) != null && g.contentWindow && n.value.contentWindow.postMessage(au({ type: v }, y), "*");
|
|
3118
3118
|
}
|
|
3119
3119
|
t({ sendMessageToIframe: f });
|
|
3120
3120
|
const p = {
|
|
@@ -3136,9 +3136,9 @@ var ru = Object.defineProperty, pr = Object.getOwnPropertySymbols, su = Object.p
|
|
|
3136
3136
|
}
|
|
3137
3137
|
}), cu = { class: "opencode-iframe-container" }, uu = { class: "opencode-empty-state-text" }, du = ["src"];
|
|
3138
3138
|
function fu(e, t, n, i, o, r) {
|
|
3139
|
-
return $(),
|
|
3140
|
-
|
|
3141
|
-
t[2] || (t[2] =
|
|
3139
|
+
return $(), V("div", cu, [
|
|
3140
|
+
_("div", { class: Pe(["opencode-empty-state-overlay", { visible: i.showEmptyState }]) }, [te(e.$slots, "empty-state", {}, () => [
|
|
3141
|
+
t[2] || (t[2] = _("div", { class: "opencode-empty-state-icon" }, [_("svg", {
|
|
3142
3142
|
viewBox: "0 0 24 24",
|
|
3143
3143
|
width: "48",
|
|
3144
3144
|
height: "48",
|
|
@@ -3146,21 +3146,21 @@ function fu(e, t, n, i, o, r) {
|
|
|
3146
3146
|
stroke: "currentColor",
|
|
3147
3147
|
"stroke-width": "1.5",
|
|
3148
3148
|
"aria-hidden": "true"
|
|
3149
|
-
}, [
|
|
3149
|
+
}, [_("path", {
|
|
3150
3150
|
"stroke-linecap": "round",
|
|
3151
3151
|
"stroke-linejoin": "round",
|
|
3152
3152
|
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"
|
|
3153
3153
|
})])], -1)),
|
|
3154
|
-
|
|
3155
|
-
|
|
3154
|
+
_("div", uu, Ce(i.emptyStateText), 1),
|
|
3155
|
+
_("button", {
|
|
3156
3156
|
class: "opencode-empty-state-btn",
|
|
3157
3157
|
type: "button",
|
|
3158
3158
|
onClick: t[0] || (t[0] = (...s) => i.handleEmptyAction && i.handleEmptyAction(...s))
|
|
3159
3159
|
}, Ce(i.emptyStateActionText), 1)
|
|
3160
3160
|
])], 2),
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
te(e.$slots, "content", {}, () => [
|
|
3161
|
+
_("div", { class: Pe(["opencode-loading-overlay", { visible: i.frameLoading }]) }, [te(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),
|
|
3162
|
+
_("div", { class: Pe(["opencode-error-overlay", { visible: i.showError }]) }, [te(e.$slots, "error")], 2),
|
|
3163
|
+
te(e.$slots, "content", {}, () => [_("iframe", {
|
|
3164
3164
|
ref: "iframeRef",
|
|
3165
3165
|
class: "opencode-iframe",
|
|
3166
3166
|
src: i.iframeSrc,
|
|
@@ -3175,7 +3175,7 @@ var hu = Us, qs = /* @__PURE__ */ Ye({
|
|
|
3175
3175
|
__name: "Header",
|
|
3176
3176
|
setup(e, { expose: t }) {
|
|
3177
3177
|
t();
|
|
3178
|
-
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:
|
|
3178
|
+
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: O, handleToggleTheme: b, handleToggleDisplayMode: P, handleToggleSplitPosition: F, handleClose: S, handleToggleMinimize: H, handleTogglePromptDock: U, handleToggleReviewPanel: N, handleRefresh: j } = gn(), B = {
|
|
3179
3179
|
title: n,
|
|
3180
3180
|
sessionListTitle: i,
|
|
3181
3181
|
sessionListCollapsed: o,
|
|
@@ -3188,17 +3188,17 @@ var hu = Us, qs = /* @__PURE__ */ Ye({
|
|
|
3188
3188
|
reviewPanelVisible: f,
|
|
3189
3189
|
mode: p,
|
|
3190
3190
|
displayMode: v,
|
|
3191
|
-
splitPosition:
|
|
3191
|
+
splitPosition: y,
|
|
3192
3192
|
handleToggleSessionList: g,
|
|
3193
|
-
handleToggleSelectMode:
|
|
3194
|
-
handleToggleTheme:
|
|
3195
|
-
handleToggleDisplayMode:
|
|
3193
|
+
handleToggleSelectMode: O,
|
|
3194
|
+
handleToggleTheme: b,
|
|
3195
|
+
handleToggleDisplayMode: P,
|
|
3196
3196
|
handleToggleSplitPosition: F,
|
|
3197
3197
|
handleClose: S,
|
|
3198
|
-
handleToggleMinimize:
|
|
3198
|
+
handleToggleMinimize: H,
|
|
3199
3199
|
handleTogglePromptDock: U,
|
|
3200
|
-
handleToggleReviewPanel:
|
|
3201
|
-
handleRefresh:
|
|
3200
|
+
handleToggleReviewPanel: N,
|
|
3201
|
+
handleRefresh: j,
|
|
3202
3202
|
isSplitMode: q(() => p.value === "split"),
|
|
3203
3203
|
themeIconTitle: q(() => `主题: ${{
|
|
3204
3204
|
auto: "自动",
|
|
@@ -3234,13 +3234,13 @@ var hu = Us, qs = /* @__PURE__ */ Ye({
|
|
|
3234
3234
|
splitPositionIconTitle: q(() => `分栏位置: ${{
|
|
3235
3235
|
left: "左侧",
|
|
3236
3236
|
right: "右侧"
|
|
3237
|
-
}[
|
|
3238
|
-
splitPositionIconLabel: q(() => `切换分栏位置 - 下一个: ${
|
|
3237
|
+
}[y.value]}`),
|
|
3238
|
+
splitPositionIconLabel: q(() => `切换分栏位置 - 下一个: ${y.value === "right" ? "左侧" : "右侧"}`)
|
|
3239
3239
|
};
|
|
3240
|
-
return Object.defineProperty(
|
|
3240
|
+
return Object.defineProperty(B, "__isScriptSetup", {
|
|
3241
3241
|
enumerable: !1,
|
|
3242
3242
|
value: !0
|
|
3243
|
-
}),
|
|
3243
|
+
}), B;
|
|
3244
3244
|
}
|
|
3245
3245
|
}), pu = { class: "opencode-chat-header" }, vu = { class: "opencode-chat-header-left" }, gu = [
|
|
3246
3246
|
"title",
|
|
@@ -3350,16 +3350,16 @@ var hu = Us, qs = /* @__PURE__ */ Ye({
|
|
|
3350
3350
|
"aria-hidden": "true"
|
|
3351
3351
|
};
|
|
3352
3352
|
function Du(e, t, n, i, o, r) {
|
|
3353
|
-
return $(),
|
|
3354
|
-
|
|
3355
|
-
|
|
3353
|
+
return $(), V("div", pu, [
|
|
3354
|
+
_("div", vu, [
|
|
3355
|
+
_("button", {
|
|
3356
3356
|
class: Pe(["opencode-header-btn session-toggle", { active: !i.sessionListCollapsed }]),
|
|
3357
3357
|
type: "button",
|
|
3358
3358
|
title: i.sessionListTitle,
|
|
3359
3359
|
"aria-label": i.sessionListTitle,
|
|
3360
3360
|
"aria-expanded": !i.sessionListCollapsed,
|
|
3361
3361
|
onClick: t[0] || (t[0] = (...s) => i.handleToggleSessionList && i.handleToggleSessionList(...s))
|
|
3362
|
-
}, [te(e.$slots, "session-toggle-icon", {}, () => [t[10] || (t[10] =
|
|
3362
|
+
}, [te(e.$slots, "session-toggle-icon", {}, () => [t[10] || (t[10] = _("svg", {
|
|
3363
3363
|
viewBox: "0 0 24 24",
|
|
3364
3364
|
width: "16",
|
|
3365
3365
|
height: "16",
|
|
@@ -3367,11 +3367,11 @@ function Du(e, t, n, i, o, r) {
|
|
|
3367
3367
|
stroke: "currentColor",
|
|
3368
3368
|
"stroke-width": "2",
|
|
3369
3369
|
"aria-hidden": "true"
|
|
3370
|
-
}, [
|
|
3370
|
+
}, [_("path", {
|
|
3371
3371
|
d: "M4 6h16M4 12h16M4 18h16",
|
|
3372
3372
|
"stroke-linecap": "round"
|
|
3373
3373
|
})], -1))])], 10, gu),
|
|
3374
|
-
|
|
3374
|
+
_("button", {
|
|
3375
3375
|
class: Pe(["opencode-header-btn select-btn", { active: i.selectMode }]),
|
|
3376
3376
|
type: "button",
|
|
3377
3377
|
title: "选择页面元素 (Ctrl+P)",
|
|
@@ -3379,106 +3379,106 @@ function Du(e, t, n, i, o, r) {
|
|
|
3379
3379
|
"aria-pressed": i.selectMode,
|
|
3380
3380
|
disabled: !i.selectEnabled,
|
|
3381
3381
|
onClick: t[1] || (t[1] = (...s) => i.handleToggleSelectMode && i.handleToggleSelectMode(...s))
|
|
3382
|
-
}, [te(e.$slots, "select-icon", {}, () => [t[11] || (t[11] =
|
|
3382
|
+
}, [te(e.$slots, "select-icon", {}, () => [t[11] || (t[11] = _("svg", {
|
|
3383
3383
|
viewBox: "0 0 1024 1024",
|
|
3384
3384
|
width: "16",
|
|
3385
3385
|
height: "16",
|
|
3386
3386
|
"aria-hidden": "true"
|
|
3387
|
-
}, [
|
|
3387
|
+
}, [_("path", {
|
|
3388
3388
|
fill: "currentColor",
|
|
3389
3389
|
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"
|
|
3390
|
-
}),
|
|
3390
|
+
}), _("path", {
|
|
3391
3391
|
fill: "currentColor",
|
|
3392
3392
|
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"
|
|
3393
3393
|
})], -1))])], 10, mu),
|
|
3394
|
-
|
|
3394
|
+
_("button", {
|
|
3395
3395
|
class: "opencode-header-btn theme-btn",
|
|
3396
3396
|
type: "button",
|
|
3397
3397
|
title: i.themeIconTitle,
|
|
3398
3398
|
"aria-label": i.themeIconLabel,
|
|
3399
3399
|
onClick: t[2] || (t[2] = (...s) => i.handleToggleTheme && i.handleToggleTheme(...s))
|
|
3400
|
-
}, [te(e.$slots, "theme-icon", {}, () => [i.theme === "light" ? ($(),
|
|
3401
|
-
i.displayMode !== "extension" ? ($(),
|
|
3400
|
+
}, [te(e.$slots, "theme-icon", {}, () => [i.theme === "light" ? ($(), V("svg", yu, [...t[12] || (t[12] = [lo('<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" ? ($(), V("svg", bu, [...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)])])) : ($(), V("svg", Su, [...t[14] || (t[14] = [lo('<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, _u),
|
|
3401
|
+
i.displayMode !== "extension" ? ($(), V("button", {
|
|
3402
3402
|
key: 0,
|
|
3403
3403
|
class: "opencode-header-btn display-mode-btn",
|
|
3404
3404
|
type: "button",
|
|
3405
3405
|
title: i.displayModeIconTitle,
|
|
3406
3406
|
"aria-label": i.displayModeIconLabel,
|
|
3407
3407
|
onClick: t[3] || (t[3] = (...s) => i.handleToggleDisplayMode && i.handleToggleDisplayMode(...s))
|
|
3408
|
-
}, [te(e.$slots, "display-mode-icon", {}, () => [i.displayMode === "bubble" ? ($(),
|
|
3409
|
-
|
|
3408
|
+
}, [te(e.$slots, "display-mode-icon", {}, () => [i.displayMode === "bubble" ? ($(), V("svg", wu, [...t[15] || (t[15] = [
|
|
3409
|
+
_("circle", {
|
|
3410
3410
|
cx: "12",
|
|
3411
3411
|
cy: "12",
|
|
3412
3412
|
r: "10"
|
|
3413
3413
|
}, null, -1),
|
|
3414
|
-
|
|
3414
|
+
_("path", {
|
|
3415
3415
|
d: "M8 14s1.5 2 4 2 4-2 4-2",
|
|
3416
3416
|
"stroke-linecap": "round"
|
|
3417
3417
|
}, null, -1),
|
|
3418
|
-
|
|
3418
|
+
_("line", {
|
|
3419
3419
|
x1: "9",
|
|
3420
3420
|
y1: "9",
|
|
3421
3421
|
x2: "9.01",
|
|
3422
3422
|
y2: "9",
|
|
3423
3423
|
"stroke-linecap": "round"
|
|
3424
3424
|
}, null, -1),
|
|
3425
|
-
|
|
3425
|
+
_("line", {
|
|
3426
3426
|
x1: "15",
|
|
3427
3427
|
y1: "9",
|
|
3428
3428
|
x2: "15.01",
|
|
3429
3429
|
y2: "9",
|
|
3430
3430
|
"stroke-linecap": "round"
|
|
3431
3431
|
}, null, -1)
|
|
3432
|
-
])])) : i.displayMode === "split" ? ($(),
|
|
3432
|
+
])])) : i.displayMode === "split" ? ($(), V("svg", Tu, [...t[16] || (t[16] = [_("rect", {
|
|
3433
3433
|
x: "3",
|
|
3434
3434
|
y: "3",
|
|
3435
3435
|
width: "18",
|
|
3436
3436
|
height: "18",
|
|
3437
3437
|
rx: "2"
|
|
3438
|
-
}, null, -1),
|
|
3438
|
+
}, null, -1), _("line", {
|
|
3439
3439
|
x1: "12",
|
|
3440
3440
|
y1: "3",
|
|
3441
3441
|
x2: "12",
|
|
3442
3442
|
y2: "21"
|
|
3443
|
-
}, null, -1)])])) : ($(),
|
|
3444
|
-
|
|
3443
|
+
}, null, -1)])])) : ($(), V("svg", Cu, [...t[17] || (t[17] = [
|
|
3444
|
+
_("rect", {
|
|
3445
3445
|
x: "3",
|
|
3446
3446
|
y: "3",
|
|
3447
3447
|
width: "8",
|
|
3448
3448
|
height: "8",
|
|
3449
3449
|
rx: "1"
|
|
3450
3450
|
}, null, -1),
|
|
3451
|
-
|
|
3451
|
+
_("rect", {
|
|
3452
3452
|
x: "15",
|
|
3453
3453
|
y: "3",
|
|
3454
3454
|
width: "6",
|
|
3455
3455
|
height: "8",
|
|
3456
3456
|
rx: "1"
|
|
3457
3457
|
}, null, -1),
|
|
3458
|
-
|
|
3458
|
+
_("rect", {
|
|
3459
3459
|
x: "3",
|
|
3460
3460
|
y: "15",
|
|
3461
3461
|
width: "8",
|
|
3462
3462
|
height: "6",
|
|
3463
3463
|
rx: "1"
|
|
3464
3464
|
}, null, -1),
|
|
3465
|
-
|
|
3465
|
+
_("circle", {
|
|
3466
3466
|
cx: "18",
|
|
3467
3467
|
cy: "18",
|
|
3468
3468
|
r: "3"
|
|
3469
3469
|
}, null, -1)
|
|
3470
3470
|
])]))])], 8, Eu)) : ce("v-if", !0)
|
|
3471
3471
|
]),
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
i.displayMode === "extension" ? ($(),
|
|
3472
|
+
_("span", xu, Ce(i.title), 1),
|
|
3473
|
+
_("div", Ou, [
|
|
3474
|
+
i.displayMode === "extension" ? ($(), V("button", {
|
|
3475
3475
|
key: 0,
|
|
3476
3476
|
class: "opencode-header-btn refresh-btn",
|
|
3477
3477
|
type: "button",
|
|
3478
3478
|
title: "刷新面板",
|
|
3479
3479
|
"aria-label": "刷新面板",
|
|
3480
3480
|
onClick: t[4] || (t[4] = (...s) => i.handleRefresh && i.handleRefresh(...s))
|
|
3481
|
-
}, [...t[18] || (t[18] = [
|
|
3481
|
+
}, [...t[18] || (t[18] = [_("svg", {
|
|
3482
3482
|
viewBox: "0 0 24 24",
|
|
3483
3483
|
width: "16",
|
|
3484
3484
|
height: "16",
|
|
@@ -3486,45 +3486,45 @@ function Du(e, t, n, i, o, r) {
|
|
|
3486
3486
|
stroke: "currentColor",
|
|
3487
3487
|
"stroke-width": "2",
|
|
3488
3488
|
"aria-hidden": "true"
|
|
3489
|
-
}, [
|
|
3490
|
-
i.isSplitMode && i.displayMode !== "extension" ? ($(),
|
|
3489
|
+
}, [_("polyline", { points: "23,4 23,10 17,10" }), _("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })], -1)])])) : ce("v-if", !0),
|
|
3490
|
+
i.isSplitMode && i.displayMode !== "extension" ? ($(), V("button", {
|
|
3491
3491
|
key: 1,
|
|
3492
3492
|
class: "opencode-header-btn split-position-btn",
|
|
3493
3493
|
type: "button",
|
|
3494
3494
|
title: i.splitPositionIconTitle,
|
|
3495
3495
|
"aria-label": i.splitPositionIconLabel,
|
|
3496
3496
|
onClick: t[5] || (t[5] = (...s) => i.handleToggleSplitPosition && i.handleToggleSplitPosition(...s))
|
|
3497
|
-
}, [te(e.$slots, "split-position-icon", {}, () => [i.splitPosition === "right" ? ($(),
|
|
3497
|
+
}, [te(e.$slots, "split-position-icon", {}, () => [i.splitPosition === "right" ? ($(), V("svg", Mu, [...t[19] || (t[19] = [_("rect", {
|
|
3498
3498
|
x: "3",
|
|
3499
3499
|
y: "3",
|
|
3500
3500
|
width: "18",
|
|
3501
3501
|
height: "18",
|
|
3502
3502
|
rx: "2"
|
|
3503
|
-
}, null, -1),
|
|
3503
|
+
}, null, -1), _("line", {
|
|
3504
3504
|
x1: "15",
|
|
3505
3505
|
y1: "3",
|
|
3506
3506
|
x2: "15",
|
|
3507
3507
|
y2: "21"
|
|
3508
|
-
}, null, -1)])])) : ($(),
|
|
3508
|
+
}, null, -1)])])) : ($(), V("svg", Iu, [...t[20] || (t[20] = [_("rect", {
|
|
3509
3509
|
x: "3",
|
|
3510
3510
|
y: "3",
|
|
3511
3511
|
width: "18",
|
|
3512
3512
|
height: "18",
|
|
3513
3513
|
rx: "2"
|
|
3514
|
-
}, null, -1),
|
|
3514
|
+
}, null, -1), _("line", {
|
|
3515
3515
|
x1: "9",
|
|
3516
3516
|
y1: "3",
|
|
3517
3517
|
x2: "9",
|
|
3518
3518
|
y2: "21"
|
|
3519
3519
|
}, null, -1)])]))])], 8, Pu)) : ce("v-if", !0),
|
|
3520
|
-
|
|
3520
|
+
_("button", {
|
|
3521
3521
|
class: Pe(["opencode-header-btn review-panel", { active: i.reviewPanelVisible }]),
|
|
3522
3522
|
type: "button",
|
|
3523
3523
|
title: i.reviewPanelVisible ? "收起审查面板" : "展开审查面板",
|
|
3524
3524
|
"aria-label": i.reviewPanelVisible ? "收起审查面板" : "展开审查面板",
|
|
3525
3525
|
"aria-pressed": i.reviewPanelVisible,
|
|
3526
3526
|
onClick: t[6] || (t[6] = (...s) => i.handleToggleReviewPanel && i.handleToggleReviewPanel(...s))
|
|
3527
|
-
}, [...t[21] || (t[21] = [
|
|
3527
|
+
}, [...t[21] || (t[21] = [_("svg", {
|
|
3528
3528
|
viewBox: "0 0 24 24",
|
|
3529
3529
|
width: "15",
|
|
3530
3530
|
height: "15",
|
|
@@ -3534,8 +3534,8 @@ function Du(e, t, n, i, o, r) {
|
|
|
3534
3534
|
"stroke-linecap": "round",
|
|
3535
3535
|
"stroke-linejoin": "round",
|
|
3536
3536
|
"aria-hidden": "true"
|
|
3537
|
-
}, [
|
|
3538
|
-
i.isSplitMode ? ce("v-if", !0) : ($(),
|
|
3537
|
+
}, [_("polyline", { points: "16 18 22 12 16 6" }), _("polyline", { points: "8 6 2 12 8 18" })], -1)])], 10, Au),
|
|
3538
|
+
i.isSplitMode ? ce("v-if", !0) : ($(), V("button", {
|
|
3539
3539
|
key: 2,
|
|
3540
3540
|
class: "opencode-header-btn prompt-dock",
|
|
3541
3541
|
type: "button",
|
|
@@ -3543,7 +3543,7 @@ function Du(e, t, n, i, o, r) {
|
|
|
3543
3543
|
"aria-label": i.promptDockVisible ? "隐藏对话框" : "显示对话框",
|
|
3544
3544
|
"aria-pressed": i.promptDockVisible,
|
|
3545
3545
|
onClick: t[7] || (t[7] = (...s) => i.handleTogglePromptDock && i.handleTogglePromptDock(...s))
|
|
3546
|
-
}, [te(e.$slots, "prompt-dock-icon", {}, () => [t[22] || (t[22] =
|
|
3546
|
+
}, [te(e.$slots, "prompt-dock-icon", {}, () => [t[22] || (t[22] = _("svg", {
|
|
3547
3547
|
viewBox: "0 0 24 24",
|
|
3548
3548
|
width: "14",
|
|
3549
3549
|
height: "14",
|
|
@@ -3551,8 +3551,8 @@ function Du(e, t, n, i, o, r) {
|
|
|
3551
3551
|
stroke: "currentColor",
|
|
3552
3552
|
"stroke-width": "2",
|
|
3553
3553
|
"aria-hidden": "true"
|
|
3554
|
-
}, [
|
|
3555
|
-
i.isSplitMode ? ce("v-if", !0) : ($(),
|
|
3554
|
+
}, [_("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, Ru)),
|
|
3555
|
+
i.isSplitMode ? ce("v-if", !0) : ($(), V("button", {
|
|
3556
3556
|
key: 3,
|
|
3557
3557
|
class: "opencode-header-btn minimize",
|
|
3558
3558
|
type: "button",
|
|
@@ -3560,15 +3560,15 @@ function Du(e, t, n, i, o, r) {
|
|
|
3560
3560
|
"aria-label": i.minimized ? "展开面板" : "最小化面板",
|
|
3561
3561
|
"aria-pressed": i.minimized,
|
|
3562
3562
|
onClick: t[8] || (t[8] = (...s) => i.handleToggleMinimize && i.handleToggleMinimize(...s))
|
|
3563
|
-
}, [te(e.$slots, "minimize-icon", {}, () => [i.minimized ? ($(),
|
|
3564
|
-
i.isSplitMode ? ce("v-if", !0) : ($(),
|
|
3563
|
+
}, [te(e.$slots, "minimize-icon", {}, () => [i.minimized ? ($(), V("svg", Nu, [...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)])])) : ($(), V("svg", Lu, [...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, ku)),
|
|
3564
|
+
i.isSplitMode ? ce("v-if", !0) : ($(), V("button", {
|
|
3565
3565
|
key: 4,
|
|
3566
3566
|
class: "opencode-header-btn close",
|
|
3567
3567
|
type: "button",
|
|
3568
3568
|
title: "关闭",
|
|
3569
3569
|
"aria-label": "关闭面板",
|
|
3570
3570
|
onClick: t[9] || (t[9] = (...s) => i.handleClose && i.handleClose(...s))
|
|
3571
|
-
}, [te(e.$slots, "close-icon", {}, () => [t[25] || (t[25] =
|
|
3571
|
+
}, [te(e.$slots, "close-icon", {}, () => [t[25] || (t[25] = _("svg", {
|
|
3572
3572
|
viewBox: "0 0 24 24",
|
|
3573
3573
|
width: "14",
|
|
3574
3574
|
height: "14",
|
|
@@ -3576,7 +3576,7 @@ function Du(e, t, n, i, o, r) {
|
|
|
3576
3576
|
stroke: "currentColor",
|
|
3577
3577
|
"stroke-width": "2",
|
|
3578
3578
|
"aria-hidden": "true"
|
|
3579
|
-
}, [
|
|
3579
|
+
}, [_("path", { d: "M18 6L6 18M6 6l12 12" })], -1))])]))
|
|
3580
3580
|
])
|
|
3581
3581
|
]);
|
|
3582
3582
|
}
|
|
@@ -3593,9 +3593,9 @@ var $u = qs, Ks = /* @__PURE__ */ Ye({
|
|
|
3593
3593
|
}, 200);
|
|
3594
3594
|
});
|
|
3595
3595
|
const v = q(() => !!(f.value || r.value));
|
|
3596
|
-
function
|
|
3597
|
-
var
|
|
3598
|
-
return !u?.value || !
|
|
3596
|
+
function y(O) {
|
|
3597
|
+
var b, P;
|
|
3598
|
+
return !u?.value || !O ? !1 : (P = (b = u.value[O]) == null ? void 0 : b.thinking) != null ? P : !1;
|
|
3599
3599
|
}
|
|
3600
3600
|
const g = {
|
|
3601
3601
|
collapsed: n,
|
|
@@ -3611,11 +3611,11 @@ var $u = qs, Ks = /* @__PURE__ */ Ye({
|
|
|
3611
3611
|
get animTimer() {
|
|
3612
3612
|
return p;
|
|
3613
3613
|
},
|
|
3614
|
-
set animTimer(
|
|
3615
|
-
p =
|
|
3614
|
+
set animTimer(O) {
|
|
3615
|
+
p = O;
|
|
3616
3616
|
},
|
|
3617
3617
|
showSkeleton: v,
|
|
3618
|
-
isSessionThinking:
|
|
3618
|
+
isSessionThinking: y
|
|
3619
3619
|
};
|
|
3620
3620
|
return Object.defineProperty(g, "__isScriptSetup", {
|
|
3621
3621
|
enumerable: !1,
|
|
@@ -3640,9 +3640,9 @@ var $u = qs, Ks = /* @__PURE__ */ Ye({
|
|
|
3640
3640
|
class: "opencode-thinking-loading"
|
|
3641
3641
|
}, qu = ["aria-label", "onClick"], Ku = { class: "opencode-session-meta" };
|
|
3642
3642
|
function Gu(e, t, n, i, o, r) {
|
|
3643
|
-
return $(),
|
|
3643
|
+
return $(), V("div", { class: Pe(["opencode-session-list", { collapsed: i.collapsed }]) }, [
|
|
3644
3644
|
ce(" Header "),
|
|
3645
|
-
i.showSkeleton ? ($(),
|
|
3645
|
+
i.showSkeleton ? ($(), V(ve, { key: 1 }, [ce(" 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)) : ($(), V("div", Fu, [t[1] || (t[1] = _("span", { id: "opencode-session-list-title" }, "会话列表", -1)), _("button", {
|
|
3646
3646
|
class: "opencode-new-session-btn",
|
|
3647
3647
|
type: "button",
|
|
3648
3648
|
title: "新建会话",
|
|
@@ -3650,10 +3650,10 @@ function Gu(e, t, n, i, o, r) {
|
|
|
3650
3650
|
onClick: t[0] || (t[0] = (...s) => i.handleCreateSession && i.handleCreateSession(...s))
|
|
3651
3651
|
}, " + ")])),
|
|
3652
3652
|
ce(" Content Skeleton "),
|
|
3653
|
-
i.showSkeleton ? ($(),
|
|
3653
|
+
i.showSkeleton ? ($(), V("div", Bu, [($(), V(ve, null, Bn(5, (s) => _("div", {
|
|
3654
3654
|
key: `skeleton-${s}`,
|
|
3655
3655
|
class: "opencode-skeleton-item"
|
|
3656
|
-
}, [...t[3] || (t[3] = [
|
|
3656
|
+
}, [...t[3] || (t[3] = [_("div", { class: "opencode-skeleton-title" }, null, -1), _("div", { class: "opencode-skeleton-meta" }, null, -1)])])), 64))])) : ($(), V(ve, { key: 3 }, [ce(" Content "), _("div", ju, [i.loadingSessionList ? ($(), V("div", Vu, [...t[4] || (t[4] = [_("div", { class: "opencode-loading-spinner small" }, null, -1)])])) : ce("v-if", !0), i.sessions.length > 0 ? ($(!0), V(ve, { key: 1 }, Bn(i.sessions, (s) => ($(), V("div", {
|
|
3657
3657
|
key: s[i.sessionKey],
|
|
3658
3658
|
class: Pe(["opencode-session-item", {
|
|
3659
3659
|
active: s.active,
|
|
@@ -3662,12 +3662,12 @@ function Gu(e, t, n, i, o, r) {
|
|
|
3662
3662
|
role: "option",
|
|
3663
3663
|
"aria-selected": s.active,
|
|
3664
3664
|
onClick: (l) => i.handleSelectSession(s)
|
|
3665
|
-
}, [
|
|
3665
|
+
}, [_("div", Hu, [_("div", zu, [i.isSessionThinking(s.id) ? ($(), V("span", Uu)) : ce("v-if", !0), Co(" " + Ce(s.title), 1)]), _("button", {
|
|
3666
3666
|
class: "opencode-session-delete-btn",
|
|
3667
3667
|
type: "button",
|
|
3668
3668
|
"aria-label": `删除会话: ${s.title}`,
|
|
3669
3669
|
onClick: Bs((l) => i.handleDeleteSession(s), ["stop"])
|
|
3670
|
-
}, " × ", 8, qu)]),
|
|
3670
|
+
}, " × ", 8, qu)]), _("div", Ku, Ce(s.meta), 1)], 10, Wu))), 128)) : ($(), V(ve, { key: 2 }, [ce(" Empty State "), te(e.$slots, "empty")], 64))])], 2112))
|
|
3671
3671
|
], 2);
|
|
3672
3672
|
}
|
|
3673
3673
|
Ks.render = Gu;
|
|
@@ -3693,14 +3693,14 @@ var Yu = Ks, Gs = /* @__PURE__ */ Ye({
|
|
|
3693
3693
|
"aria-label": "已选元素列表"
|
|
3694
3694
|
}, Ju = ["onClick"], Zu = { class: "opencode-node-content" }, Qu = { class: "opencode-node-text" }, ed = { class: "opencode-node-file" }, td = ["aria-label", "onClick"];
|
|
3695
3695
|
function nd(e, t, n, i, o, r) {
|
|
3696
|
-
return $(),
|
|
3697
|
-
t[1] || (t[1] =
|
|
3698
|
-
|
|
3696
|
+
return $(), V("div", { class: Pe(["opencode-right-toolbar", { collapsed: i.items.length === 0 }]) }, [
|
|
3697
|
+
t[1] || (t[1] = _("div", { class: "opencode-selected-nodes-header" }, [_("div", { class: "opencode-selected-nodes-title" }, "已选节点"), _("div", { class: "opencode-selected-nodes-desc" }, "选中的节点会在对话时一起发送给助手")], -1)),
|
|
3698
|
+
_("div", Xu, [($(!0), V(ve, null, Bn(i.items, (s, l) => ($(), V("div", {
|
|
3699
3699
|
key: s.key,
|
|
3700
3700
|
class: "opencode-selected-node",
|
|
3701
3701
|
role: "listitem",
|
|
3702
3702
|
onClick: (a) => i.handleClickSelectedNode(s)
|
|
3703
|
-
}, [
|
|
3703
|
+
}, [_("div", Zu, [_("span", Qu, Ce(s.description), 1), _("span", ed, Ce(s.panelFileText), 1)]), _("button", {
|
|
3704
3704
|
class: "opencode-node-remove",
|
|
3705
3705
|
type: "button",
|
|
3706
3706
|
"aria-label": `移除元素: ${s.description}`,
|
|
@@ -3710,7 +3710,7 @@ function nd(e, t, n, i, o, r) {
|
|
|
3710
3710
|
source: "panel"
|
|
3711
3711
|
}), ["stop"])
|
|
3712
3712
|
}, " × ", 8, td)], 8, Ju))), 128))]),
|
|
3713
|
-
i.showClearAll && i.items.length > 0 ? ($(),
|
|
3713
|
+
i.showClearAll && i.items.length > 0 ? ($(), V("button", {
|
|
3714
3714
|
key: 0,
|
|
3715
3715
|
class: "opencode-clear-all-btn",
|
|
3716
3716
|
type: "button",
|
|
@@ -3765,9 +3765,9 @@ var id = Gs, od = Object.defineProperty, rd = Object.defineProperties, sd = Obje
|
|
|
3765
3765
|
v.preventDefault(), r.value = !0, s.value = v.clientX, l.value = i.width, o("resize-start"), document.addEventListener("mousemove", c), document.addEventListener("mouseup", u);
|
|
3766
3766
|
}, c = (v) => {
|
|
3767
3767
|
if (!r.value) return;
|
|
3768
|
-
let
|
|
3769
|
-
i.position === "right" ?
|
|
3770
|
-
const g = Math.max(i.minWidth, Math.min(i.maxWidth, l.value +
|
|
3768
|
+
let y;
|
|
3769
|
+
i.position === "right" ? y = s.value - v.clientX : y = v.clientX - s.value;
|
|
3770
|
+
const g = Math.max(i.minWidth, Math.min(i.maxWidth, l.value + y));
|
|
3771
3771
|
o("resize", g);
|
|
3772
3772
|
}, u = () => {
|
|
3773
3773
|
r.value = !1, o("resize-end"), document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u);
|
|
@@ -3795,7 +3795,7 @@ var id = Gs, od = Object.defineProperty, rd = Object.defineProperties, sd = Obje
|
|
|
3795
3795
|
}
|
|
3796
3796
|
}));
|
|
3797
3797
|
function dd(e, t, n, i, o, r) {
|
|
3798
|
-
return $(),
|
|
3798
|
+
return $(), V("div", {
|
|
3799
3799
|
class: Pe(["opencode-resize-handle", {
|
|
3800
3800
|
resizing: i.isResizing,
|
|
3801
3801
|
"handle-left": n.position === "left"
|
|
@@ -3908,9 +3908,9 @@ var fd = Ys, hd = Object.defineProperty, pd = Object.defineProperties, vd = Obje
|
|
|
3908
3908
|
"-animationOrigin.x": v.animationOrigin.x,
|
|
3909
3909
|
"-animationOrigin.y": v.animationOrigin.y
|
|
3910
3910
|
}));
|
|
3911
|
-
const i = e, o = n, r = gs(), s = /* @__PURE__ */ L(null), l = (v,
|
|
3911
|
+
const i = e, o = n, r = gs(), s = /* @__PURE__ */ L(null), l = (v, y) => {
|
|
3912
3912
|
var g;
|
|
3913
|
-
(g = s.value) == null || g.sendMessageToIframe(v,
|
|
3913
|
+
(g = s.value) == null || g.sendMessageToIframe(v, y);
|
|
3914
3914
|
};
|
|
3915
3915
|
t({
|
|
3916
3916
|
sendMessageToIframe: l,
|
|
@@ -3990,7 +3990,7 @@ var fd = Ys, hd = Object.defineProperty, pd = Object.defineProperties, vd = Obje
|
|
|
3990
3990
|
"stroke-width": "2"
|
|
3991
3991
|
}, xd = { class: "opencode-chat-content" };
|
|
3992
3992
|
function Od(e, t, n, i, o, r) {
|
|
3993
|
-
return $(),
|
|
3993
|
+
return $(), V("div", {
|
|
3994
3994
|
class: Pe(i.panelClasses),
|
|
3995
3995
|
style: qt(i.panelStyle)
|
|
3996
3996
|
}, [
|
|
@@ -4009,7 +4009,7 @@ function Od(e, t, n, i, o, r) {
|
|
|
4009
4009
|
"max-width",
|
|
4010
4010
|
"position"
|
|
4011
4011
|
])) : ce("v-if", !0),
|
|
4012
|
-
n.mode === "split" && n.resizable ? ($(),
|
|
4012
|
+
n.mode === "split" && n.resizable ? ($(), V("button", {
|
|
4013
4013
|
key: 1,
|
|
4014
4014
|
type: "button",
|
|
4015
4015
|
class: Pe(["opencode-split-toggle-btn", {
|
|
@@ -4021,23 +4021,23 @@ function Od(e, t, n, i, o, r) {
|
|
|
4021
4021
|
"aria-expanded": n.open,
|
|
4022
4022
|
"aria-label": "切换面板",
|
|
4023
4023
|
onClick: i.handleToggle
|
|
4024
|
-
}, [
|
|
4025
|
-
n.open && n.splitPosition === "right" ? ($(),
|
|
4024
|
+
}, [_("span", Sd, [
|
|
4025
|
+
n.open && n.splitPosition === "right" ? ($(), V("svg", Ed, [...t[0] || (t[0] = [_("path", {
|
|
4026
4026
|
d: "M9 18l6-6-6-6",
|
|
4027
4027
|
"stroke-linecap": "round",
|
|
4028
4028
|
"stroke-linejoin": "round"
|
|
4029
4029
|
}, null, -1)])])) : ce("v-if", !0),
|
|
4030
|
-
!n.open && n.splitPosition === "right" ? ($(),
|
|
4030
|
+
!n.open && n.splitPosition === "right" ? ($(), V("svg", wd, [...t[1] || (t[1] = [_("path", {
|
|
4031
4031
|
d: "M15 18l-6-6 6-6",
|
|
4032
4032
|
"stroke-linecap": "round",
|
|
4033
4033
|
"stroke-linejoin": "round"
|
|
4034
4034
|
}, null, -1)])])) : ce("v-if", !0),
|
|
4035
|
-
n.open && n.splitPosition === "left" ? ($(),
|
|
4035
|
+
n.open && n.splitPosition === "left" ? ($(), V("svg", Td, [...t[2] || (t[2] = [_("path", {
|
|
4036
4036
|
d: "M15 18l-6-6 6-6",
|
|
4037
4037
|
"stroke-linecap": "round",
|
|
4038
4038
|
"stroke-linejoin": "round"
|
|
4039
4039
|
}, null, -1)])])) : ce("v-if", !0),
|
|
4040
|
-
!n.open && n.splitPosition === "left" ? ($(),
|
|
4040
|
+
!n.open && n.splitPosition === "left" ? ($(), V("svg", Cd, [...t[3] || (t[3] = [_("path", {
|
|
4041
4041
|
d: "M9 18l6-6-6-6",
|
|
4042
4042
|
"stroke-linecap": "round",
|
|
4043
4043
|
"stroke-linejoin": "round"
|
|
@@ -4060,9 +4060,9 @@ function Od(e, t, n, i, o, r) {
|
|
|
4060
4060
|
key: "2"
|
|
4061
4061
|
} : void 0
|
|
4062
4062
|
]), 1024),
|
|
4063
|
-
|
|
4063
|
+
_("div", xd, [
|
|
4064
4064
|
Oe(i.SessionList, null, {
|
|
4065
|
-
empty: Se(() => [te(e.$slots, "sessions-empty", {}, () => [t[4] || (t[4] =
|
|
4065
|
+
empty: Se(() => [te(e.$slots, "sessions-empty", {}, () => [t[4] || (t[4] = _("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
|
|
4066
4066
|
_: 3
|
|
4067
4067
|
}),
|
|
4068
4068
|
Oe(i.Frame, { ref: "frameRef" }, di({ _: 2 }, [
|
|
@@ -4107,7 +4107,7 @@ var Pd = Xs, Js = /* @__PURE__ */ Ye({
|
|
|
4107
4107
|
}
|
|
4108
4108
|
}), Md = { class: "opencode-hint-shortcut" };
|
|
4109
4109
|
function Id(e, t, n, i, o, r) {
|
|
4110
|
-
return $(),
|
|
4110
|
+
return $(), V("div", { class: Pe(["opencode-select-mode-hint", { visible: i.visible }]) }, [t[0] || (t[0] = lo('<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", Md, Ce(i.shortcutLabel), 1)], 2);
|
|
4111
4111
|
}
|
|
4112
4112
|
Js.render = Id;
|
|
4113
4113
|
var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Object.getOwnPropertyDescriptors, br = Object.getOwnPropertySymbols, Ld = Object.prototype.hasOwnProperty, Dd = Object.prototype.propertyIsEnumerable, Sr = (e, t, n) => t in e ? Rd(e, t, {
|
|
@@ -4167,20 +4167,20 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4167
4167
|
right: u.value - s.value.width - a.value,
|
|
4168
4168
|
bottom: f.value - s.value.height - c.value,
|
|
4169
4169
|
left: a.value
|
|
4170
|
-
})), v = (I, X) => I.reduce((Q, G) => Math.abs(Q - X) < Math.abs(G - X) ? Q : G),
|
|
4171
|
-
if (i.magnetic === "x") if (
|
|
4172
|
-
else if (
|
|
4170
|
+
})), v = (I, X) => I.reduce((Q, G) => Math.abs(Q - X) < Math.abs(G - X) ? Q : G), y = () => {
|
|
4171
|
+
if (i.magnetic === "x") if (b.value === "left") s.value.x = p.value.left;
|
|
4172
|
+
else if (b.value === "right") s.value.x = p.value.right;
|
|
4173
4173
|
else {
|
|
4174
4174
|
const I = v([p.value.left, p.value.right], s.value.x);
|
|
4175
|
-
s.value.x = I,
|
|
4175
|
+
s.value.x = I, b.value = I === p.value.left ? "left" : "right";
|
|
4176
4176
|
}
|
|
4177
4177
|
if (i.magnetic === "y") {
|
|
4178
4178
|
const I = v([p.value.top, p.value.bottom], s.value.y);
|
|
4179
4179
|
s.value.y = I;
|
|
4180
4180
|
}
|
|
4181
|
-
}, g = /* @__PURE__ */ L(!1),
|
|
4181
|
+
}, g = /* @__PURE__ */ L(!1), O = /* @__PURE__ */ L(!1), b = /* @__PURE__ */ L(null), P = q(() => {
|
|
4182
4182
|
const I = {};
|
|
4183
|
-
return I.transform = `translate3d(${`${s.value.x}px`}, ${`${s.value.y}px`}, 0)`, g.value || !
|
|
4183
|
+
return I.transform = `translate3d(${`${s.value.x}px`}, ${`${s.value.y}px`}, 0)`, g.value || !O.value ? I.transition = "none" : I.transition = "transform 0.3s ease", I;
|
|
4184
4184
|
}), F = () => {
|
|
4185
4185
|
if (!r.value || typeof window > "u") return;
|
|
4186
4186
|
const I = r.value.getBoundingClientRect(), { offset: X } = i;
|
|
@@ -4193,7 +4193,7 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4193
4193
|
y: G,
|
|
4194
4194
|
width: I.width,
|
|
4195
4195
|
height: I.height
|
|
4196
|
-
}, !g.value && (i.magnetic === "x" &&
|
|
4196
|
+
}, !g.value && (i.magnetic === "x" && b.value ? b.value === "left" ? s.value.x = p.value.left : s.value.x = p.value.right : y(), s.value.x !== Je || s.value.y !== De)) {
|
|
4197
4197
|
const $e = {
|
|
4198
4198
|
x: s.value.x,
|
|
4199
4199
|
y: s.value.y
|
|
@@ -4218,15 +4218,15 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4218
4218
|
this.isTap.value && (this.offsetX.value > G || this.offsetY.value > G) && (this.isTap.value = !1);
|
|
4219
4219
|
}
|
|
4220
4220
|
};
|
|
4221
|
-
let
|
|
4222
|
-
const
|
|
4223
|
-
S.start(I), g.value = !0,
|
|
4224
|
-
},
|
|
4221
|
+
let H = 0, U = 0;
|
|
4222
|
+
const N = (I) => {
|
|
4223
|
+
S.start(I), g.value = !0, H = s.value.x, U = s.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in I || (window.addEventListener("mousemove", j, { passive: !1 }), window.addEventListener("mouseup", B));
|
|
4224
|
+
}, j = (I) => {
|
|
4225
4225
|
I.cancelable && I.preventDefault();
|
|
4226
4226
|
const X = S.isTap.value;
|
|
4227
4227
|
if (S.move(I), X && !S.isTap.value && o("drag-start"), i.axis !== "lock" && !S.isTap.value) {
|
|
4228
4228
|
if (i.axis === "x" || i.axis === "xy") {
|
|
4229
|
-
let G =
|
|
4229
|
+
let G = H + S.deltaX.value;
|
|
4230
4230
|
G < p.value.left && (G = p.value.left), G > p.value.right && (G = p.value.right), s.value.x = G;
|
|
4231
4231
|
}
|
|
4232
4232
|
if (i.axis === "y" || i.axis === "xy") {
|
|
@@ -4239,19 +4239,19 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4239
4239
|
};
|
|
4240
4240
|
o("update:offset", Q);
|
|
4241
4241
|
}
|
|
4242
|
-
},
|
|
4243
|
-
g.value = !1, document.body.classList.remove("floating-bubble-dragging"), I && !("touches" in I) && I.type === "mouseup" && (window.removeEventListener("mousemove",
|
|
4242
|
+
}, B = (I) => {
|
|
4243
|
+
g.value = !1, document.body.classList.remove("floating-bubble-dragging"), I && !("touches" in I) && I.type === "mouseup" && (window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", B)), requestAnimationFrame(() => {
|
|
4244
4244
|
if (i.magnetic === "x" && !S.isTap.value) {
|
|
4245
4245
|
const X = s.value.x + s.value.width / 2, Q = u.value / 2;
|
|
4246
|
-
|
|
4246
|
+
b.value = X < Q ? "left" : "right";
|
|
4247
4247
|
}
|
|
4248
|
-
if (
|
|
4248
|
+
if (y(), !S.isTap.value) {
|
|
4249
4249
|
o("drag-end");
|
|
4250
4250
|
const X = {
|
|
4251
4251
|
x: s.value.x,
|
|
4252
4252
|
y: s.value.y
|
|
4253
4253
|
};
|
|
4254
|
-
o("update:offset", X), (
|
|
4254
|
+
o("update:offset", X), (H !== X.x || U !== X.y) && o("offset-change", X);
|
|
4255
4255
|
}
|
|
4256
4256
|
});
|
|
4257
4257
|
}, Y = (I) => {
|
|
@@ -4261,17 +4261,17 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4261
4261
|
};
|
|
4262
4262
|
Xe(() => {
|
|
4263
4263
|
F(), requestAnimationFrame(() => {
|
|
4264
|
-
|
|
4265
|
-
}), typeof window < "u" && window.addEventListener("resize", le), r.value && r.value.addEventListener("touchmove",
|
|
4264
|
+
O.value = !0;
|
|
4265
|
+
}), typeof window < "u" && window.addEventListener("resize", le), r.value && r.value.addEventListener("touchmove", j, { passive: !1 });
|
|
4266
4266
|
}), Ke(() => {
|
|
4267
|
-
document.body.classList.remove("floating-bubble-dragging"), typeof window < "u" && (window.removeEventListener("resize", le), window.removeEventListener("mousemove",
|
|
4267
|
+
document.body.classList.remove("floating-bubble-dragging"), typeof window < "u" && (window.removeEventListener("resize", le), window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", B)), r.value && r.value.removeEventListener("touchmove", j);
|
|
4268
4268
|
}), Me([
|
|
4269
4269
|
u,
|
|
4270
4270
|
f,
|
|
4271
4271
|
a,
|
|
4272
4272
|
c
|
|
4273
4273
|
], F), Me(() => i.offset, (I) => {
|
|
4274
|
-
I && (
|
|
4274
|
+
I && (b.value = null), F();
|
|
4275
4275
|
}, { deep: !0 }), t({ offset: q(() => ({
|
|
4276
4276
|
x: s.value.x,
|
|
4277
4277
|
y: s.value.y
|
|
@@ -4288,18 +4288,18 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4288
4288
|
windowHeight: f,
|
|
4289
4289
|
boundary: p,
|
|
4290
4290
|
closest: v,
|
|
4291
|
-
applyMagnetic:
|
|
4291
|
+
applyMagnetic: y,
|
|
4292
4292
|
dragging: g,
|
|
4293
|
-
initialized:
|
|
4294
|
-
magneticSide:
|
|
4295
|
-
rootStyle:
|
|
4293
|
+
initialized: O,
|
|
4294
|
+
magneticSide: b,
|
|
4295
|
+
rootStyle: P,
|
|
4296
4296
|
updateState: F,
|
|
4297
4297
|
touch: S,
|
|
4298
4298
|
get prevX() {
|
|
4299
|
-
return
|
|
4299
|
+
return H;
|
|
4300
4300
|
},
|
|
4301
4301
|
set prevX(I) {
|
|
4302
|
-
|
|
4302
|
+
H = I;
|
|
4303
4303
|
},
|
|
4304
4304
|
get prevY() {
|
|
4305
4305
|
return U;
|
|
@@ -4307,9 +4307,9 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4307
4307
|
set prevY(I) {
|
|
4308
4308
|
U = I;
|
|
4309
4309
|
},
|
|
4310
|
-
onTouchStart:
|
|
4311
|
-
onTouchMove:
|
|
4312
|
-
onTouchEnd:
|
|
4310
|
+
onTouchStart: N,
|
|
4311
|
+
onTouchMove: j,
|
|
4312
|
+
onTouchEnd: B,
|
|
4313
4313
|
onClick: Y,
|
|
4314
4314
|
handleResize: le
|
|
4315
4315
|
};
|
|
@@ -4320,7 +4320,7 @@ var Ad = Js, Rd = Object.defineProperty, kd = Object.defineProperties, Nd = Obje
|
|
|
4320
4320
|
}
|
|
4321
4321
|
}));
|
|
4322
4322
|
function Bd(e, t, n, i, o, r) {
|
|
4323
|
-
return $(), xt(ps, { to: n.teleport }, [
|
|
4323
|
+
return $(), xt(ps, { to: n.teleport }, [_("div", {
|
|
4324
4324
|
ref: "rootRef",
|
|
4325
4325
|
class: "floating-bubble",
|
|
4326
4326
|
style: qt(i.rootStyle),
|
|
@@ -4374,7 +4374,7 @@ var jd = Zs, Vd = `<svg t="1775402599580" class="icon" viewBox="0 0 1024 1024" v
|
|
|
4374
4374
|
}
|
|
4375
4375
|
}), Wd = ["innerHTML"];
|
|
4376
4376
|
function Hd(e, t, n, i, o, r) {
|
|
4377
|
-
return $(),
|
|
4377
|
+
return $(), V("span", {
|
|
4378
4378
|
class: "opencode-logo",
|
|
4379
4379
|
style: qt([{
|
|
4380
4380
|
display: "inline-block",
|
|
@@ -4394,7 +4394,7 @@ var zd = Qs, el = /* @__PURE__ */ Ye({
|
|
|
4394
4394
|
Me(c, (g) => {
|
|
4395
4395
|
f.value = g;
|
|
4396
4396
|
}), t({ offset: f });
|
|
4397
|
-
const
|
|
4397
|
+
const y = {
|
|
4398
4398
|
active: i,
|
|
4399
4399
|
open: o,
|
|
4400
4400
|
hotkeyLabel: r,
|
|
@@ -4409,10 +4409,10 @@ var zd = Qs, el = /* @__PURE__ */ Ye({
|
|
|
4409
4409
|
FloatingBubble: jd,
|
|
4410
4410
|
OpenCodeLogo: zd
|
|
4411
4411
|
};
|
|
4412
|
-
return Object.defineProperty(
|
|
4412
|
+
return Object.defineProperty(y, "__isScriptSetup", {
|
|
4413
4413
|
enumerable: !1,
|
|
4414
4414
|
value: !0
|
|
4415
|
-
}),
|
|
4415
|
+
}), y;
|
|
4416
4416
|
}
|
|
4417
4417
|
}), Ud = ["aria-expanded", "title"];
|
|
4418
4418
|
function qd(e, t, n, i, o, r) {
|
|
@@ -4428,7 +4428,7 @@ function qd(e, t, n, i, o, r) {
|
|
|
4428
4428
|
onDragStart: t[1] || (t[1] = (s) => i.emit("drag-start")),
|
|
4429
4429
|
onDragEnd: t[2] || (t[2] = (s) => i.emit("drag-end"))
|
|
4430
4430
|
}, {
|
|
4431
|
-
default: Se(() => [
|
|
4431
|
+
default: Se(() => [_("button", {
|
|
4432
4432
|
class: Pe(["opencode-button", {
|
|
4433
4433
|
active: i.active,
|
|
4434
4434
|
thinking: i.thinking,
|
|
@@ -4510,12 +4510,12 @@ function Zd(e) {
|
|
|
4510
4510
|
const f = document.createElement("div");
|
|
4511
4511
|
f.className = "opencode-element-highlight-temp";
|
|
4512
4512
|
const p = document.querySelector(".opencode-widget");
|
|
4513
|
-
let v = "#3b82f6",
|
|
4513
|
+
let v = "#3b82f6", y = "rgba(59, 130, 246, 0.1)";
|
|
4514
4514
|
if (p) {
|
|
4515
|
-
const
|
|
4516
|
-
v =
|
|
4515
|
+
const O = getComputedStyle(p);
|
|
4516
|
+
v = O.getPropertyValue("--oc-primary").trim() || v, y = O.getPropertyValue("--oc-primary-bg").trim() || y;
|
|
4517
4517
|
}
|
|
4518
|
-
f.style.border = `2px solid ${v}`, f.style.background =
|
|
4518
|
+
f.style.border = `2px solid ${v}`, f.style.background = y;
|
|
4519
4519
|
const g = u.getBoundingClientRect();
|
|
4520
4520
|
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(() => {
|
|
4521
4521
|
f.remove();
|
|
@@ -4618,8 +4618,8 @@ function nf(e) {
|
|
|
4618
4618
|
(g = e.onToggleSelectMode) == null || g.call(e, !1);
|
|
4619
4619
|
return;
|
|
4620
4620
|
}
|
|
4621
|
-
const
|
|
4622
|
-
e.onToggle(
|
|
4621
|
+
const O = !e.open.value;
|
|
4622
|
+
e.onToggle(O);
|
|
4623
4623
|
}
|
|
4624
4624
|
function f() {
|
|
4625
4625
|
e.onClose();
|
|
@@ -4630,10 +4630,10 @@ function nf(e) {
|
|
|
4630
4630
|
function v() {
|
|
4631
4631
|
e.onEmptyAction();
|
|
4632
4632
|
}
|
|
4633
|
-
function
|
|
4633
|
+
function y() {
|
|
4634
4634
|
var g;
|
|
4635
|
-
const
|
|
4636
|
-
(g = e.onToggleTheme) == null || g.call(e,
|
|
4635
|
+
const O = (Gi.indexOf(e.theme.value) + 1) % Gi.length, b = Gi[O];
|
|
4636
|
+
(g = e.onToggleTheme) == null || g.call(e, b);
|
|
4637
4637
|
}
|
|
4638
4638
|
return {
|
|
4639
4639
|
buttonActive: l,
|
|
@@ -4645,7 +4645,7 @@ function nf(e) {
|
|
|
4645
4645
|
handleEmptyAction: v,
|
|
4646
4646
|
handleToggle: u,
|
|
4647
4647
|
handleToggleSessionList: p,
|
|
4648
|
-
handleToggleTheme:
|
|
4648
|
+
handleToggleTheme: y
|
|
4649
4649
|
};
|
|
4650
4650
|
}
|
|
4651
4651
|
function tl(e) {
|
|
@@ -5270,41 +5270,41 @@ function Eh(e) {
|
|
|
5270
5270
|
fileInfo: ""
|
|
5271
5271
|
}), s = 500;
|
|
5272
5272
|
let l = null, a = "#3b82f6", c = "rgba(59, 130, 246, 0.1)";
|
|
5273
|
-
function u(
|
|
5274
|
-
|
|
5275
|
-
|
|
5273
|
+
function u(O) {
|
|
5274
|
+
O.forEach((b) => {
|
|
5275
|
+
b && (b.style.pointerEvents = "none");
|
|
5276
5276
|
});
|
|
5277
5277
|
}
|
|
5278
|
-
function f(
|
|
5279
|
-
|
|
5280
|
-
|
|
5278
|
+
function f(O) {
|
|
5279
|
+
O.forEach((b) => {
|
|
5280
|
+
b && (b.style.pointerEvents = "");
|
|
5281
5281
|
});
|
|
5282
5282
|
}
|
|
5283
|
-
function p(
|
|
5283
|
+
function p(O) {
|
|
5284
5284
|
if (!e.selectMode.value) return;
|
|
5285
|
-
const
|
|
5285
|
+
const b = [
|
|
5286
5286
|
document.querySelector(".opencode-element-highlight"),
|
|
5287
5287
|
document.querySelector(".opencode-element-tooltip"),
|
|
5288
5288
|
document.querySelector(".opencode-select-mode-hint"),
|
|
5289
5289
|
document.querySelector(".floating-bubble")
|
|
5290
5290
|
];
|
|
5291
|
-
u(
|
|
5292
|
-
const
|
|
5293
|
-
if (f(
|
|
5291
|
+
u(b);
|
|
5292
|
+
const P = Cr(O), F = xr(O, P);
|
|
5293
|
+
if (f(b), P) {
|
|
5294
5294
|
const S = document.querySelector(".opencode-widget");
|
|
5295
5295
|
if (S) {
|
|
5296
5296
|
const X = getComputedStyle(S);
|
|
5297
5297
|
a = X.getPropertyValue("--oc-primary").trim() || a, c = X.getPropertyValue("--oc-primary-bg").trim() || c;
|
|
5298
5298
|
}
|
|
5299
|
-
const
|
|
5300
|
-
let
|
|
5301
|
-
F.line && (
|
|
5302
|
-
const
|
|
5299
|
+
const H = Tr(P), U = F.file ? F.file.split("/").pop() : "";
|
|
5300
|
+
let N = "";
|
|
5301
|
+
F.line && (N = `:${F.line}`, F.column && (N += `:${F.column}`));
|
|
5302
|
+
const j = U ? `${U}${N}` : "";
|
|
5303
5303
|
r.value = {
|
|
5304
|
-
description:
|
|
5305
|
-
fileInfo:
|
|
5304
|
+
description: H,
|
|
5305
|
+
fileInfo: j
|
|
5306
5306
|
};
|
|
5307
|
-
const
|
|
5307
|
+
const B = P.getBoundingClientRect(), Y = `${B.top}px`, le = `${B.left}px`, fe = `${B.width}px`, I = `${B.height}px`;
|
|
5308
5308
|
(n.value.top !== Y || n.value.left !== le || n.value.width !== fe || n.value.height !== I) && (n.value = {
|
|
5309
5309
|
top: Y,
|
|
5310
5310
|
left: le,
|
|
@@ -5317,9 +5317,9 @@ function Eh(e) {
|
|
|
5317
5317
|
if (!X) return;
|
|
5318
5318
|
const Q = X.offsetWidth, G = X.offsetHeight;
|
|
5319
5319
|
if (Q === 0 || G === 0) return;
|
|
5320
|
-
const ee = 10, Le = 4, Je = window.innerWidth, De = window.innerHeight, $e = (d) => Math.max(ee, Math.min(d, Je - Q - ee)), Fe = (d) => Math.max(ee, Math.min(d, De - G - ee)), ct =
|
|
5320
|
+
const ee = 10, Le = 4, Je = window.innerWidth, De = window.innerHeight, $e = (d) => Math.max(ee, Math.min(d, Je - Q - ee)), Fe = (d) => Math.max(ee, Math.min(d, De - G - ee)), ct = B.top - G - Le, ut = B.bottom + Le, mt = B.right + Le, Ze = B.left - Q - Le, st = B.top + (B.height - G) / 2;
|
|
5321
5321
|
let Re = 0, He = 0, me = !1;
|
|
5322
|
-
if (ct >= ee && (Re = ct, He = $e(
|
|
5322
|
+
if (ct >= ee && (Re = ct, He = $e(B.left), me = !0), !me && ut + G <= De - ee && (Re = ut, He = $e(B.left), me = !0), !me && mt + Q <= Je - ee && (He = mt, Re = Fe(st), me = !0), !me && Ze >= ee && (He = Ze, Re = Fe(st), me = !0), !me) {
|
|
5323
5323
|
const d = [
|
|
5324
5324
|
{
|
|
5325
5325
|
top: ee,
|
|
@@ -5340,7 +5340,7 @@ function Eh(e) {
|
|
|
5340
5340
|
];
|
|
5341
5341
|
for (const h of d) {
|
|
5342
5342
|
const m = h.left + Q, T = h.top + G;
|
|
5343
|
-
if (m <=
|
|
5343
|
+
if (m <= B.left || B.right <= h.left || T <= B.top || B.bottom <= h.top) {
|
|
5344
5344
|
Re = h.top, He = h.left, me = !0;
|
|
5345
5345
|
break;
|
|
5346
5346
|
}
|
|
@@ -5357,40 +5357,40 @@ function Eh(e) {
|
|
|
5357
5357
|
t.value = !1, i.value = !1;
|
|
5358
5358
|
}
|
|
5359
5359
|
const v = p;
|
|
5360
|
-
function
|
|
5361
|
-
const
|
|
5362
|
-
if (!
|
|
5363
|
-
const
|
|
5364
|
-
|
|
5360
|
+
function y() {
|
|
5361
|
+
const O = window.__VUE_INSPECTOR__;
|
|
5362
|
+
if (!O || O.__opencode_hooked) return;
|
|
5363
|
+
const b = O.handleClick.bind(O);
|
|
5364
|
+
O.handleClick = function(P) {
|
|
5365
5365
|
if (e.selectMode.value) {
|
|
5366
|
-
const F =
|
|
5367
|
-
if (F && F.closest(".opencode-widget")) return
|
|
5368
|
-
|
|
5369
|
-
const S = Cr(
|
|
5366
|
+
const F = P.target instanceof Element ? P.target : null;
|
|
5367
|
+
if (F && F.closest(".opencode-widget")) return b.call(O, P);
|
|
5368
|
+
P.preventDefault(), P.stopPropagation();
|
|
5369
|
+
const S = Cr(P), H = xr(P, S);
|
|
5370
5370
|
if (S) {
|
|
5371
|
-
const U = fh(S),
|
|
5372
|
-
filePath:
|
|
5373
|
-
line:
|
|
5374
|
-
column:
|
|
5371
|
+
const U = fh(S), N = Tr(S), j = {
|
|
5372
|
+
filePath: H.file,
|
|
5373
|
+
line: H.line,
|
|
5374
|
+
column: H.column,
|
|
5375
5375
|
innerText: Hs(U, 200),
|
|
5376
|
-
description:
|
|
5376
|
+
description: N
|
|
5377
5377
|
};
|
|
5378
|
-
e.onAddSelectedNode(
|
|
5378
|
+
e.onAddSelectedNode(j);
|
|
5379
5379
|
}
|
|
5380
5380
|
return;
|
|
5381
5381
|
}
|
|
5382
|
-
return
|
|
5383
|
-
},
|
|
5382
|
+
return b.call(O, P);
|
|
5383
|
+
}, O.__opencode_hooked = !0;
|
|
5384
5384
|
}
|
|
5385
|
-
function g(
|
|
5386
|
-
|
|
5385
|
+
function g(O) {
|
|
5386
|
+
O.key === "Escape" && e.selectMode.value && (O.preventDefault(), O.stopPropagation(), e.onExitSelectMode());
|
|
5387
5387
|
}
|
|
5388
|
-
return Me(e.selectMode, (
|
|
5389
|
-
const
|
|
5390
|
-
|
|
5388
|
+
return Me(e.selectMode, (O) => {
|
|
5389
|
+
const b = window.__VUE_INSPECTOR__;
|
|
5390
|
+
O ? (b && b.enable(), document.addEventListener("mousemove", v), document.addEventListener("keydown", g, !0)) : (b && b.disable(), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", g, !0), t.value = !1, i.value = !1);
|
|
5391
5391
|
}), Xe(() => {
|
|
5392
|
-
window.__VUE_INSPECTOR__ ?
|
|
5393
|
-
window.__VUE_INSPECTOR__ && (
|
|
5392
|
+
window.__VUE_INSPECTOR__ ? y() : l = window.setInterval(() => {
|
|
5393
|
+
window.__VUE_INSPECTOR__ && (y(), l && (window.clearInterval(l), l = null));
|
|
5394
5394
|
}, s);
|
|
5395
5395
|
}), Ke(() => {
|
|
5396
5396
|
l && window.clearInterval(l), document.removeEventListener("mousemove", v), document.removeEventListener("keydown", g, !0);
|
|
@@ -5462,67 +5462,67 @@ function Ch(e) {
|
|
|
5462
5462
|
var xh = 1440;
|
|
5463
5463
|
function Oh(e) {
|
|
5464
5464
|
var t, n;
|
|
5465
|
-
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(() => {
|
|
5466
|
-
var
|
|
5467
|
-
const
|
|
5465
|
+
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(() => {
|
|
5466
|
+
var b, P, F, S, H, U, N;
|
|
5467
|
+
const j = e.splitMode.value || {}, B = r.value;
|
|
5468
5468
|
return {
|
|
5469
|
-
width: (
|
|
5470
|
-
minWidth: (
|
|
5471
|
-
maxWidth: (
|
|
5472
|
-
resizable:
|
|
5473
|
-
shrinkPage:
|
|
5474
|
-
defaultOpen:
|
|
5475
|
-
position: (
|
|
5469
|
+
width: (b = j.width) != null ? b : 500,
|
|
5470
|
+
minWidth: (P = j.minWidth) != null ? P : 400,
|
|
5471
|
+
maxWidth: (F = j.maxWidth) != null ? F : 800,
|
|
5472
|
+
resizable: B ? !1 : (S = j.resizable) != null ? S : !0,
|
|
5473
|
+
shrinkPage: B ? !1 : (H = j.shrinkPage) != null ? H : !0,
|
|
5474
|
+
defaultOpen: B ? !0 : (U = j.defaultOpen) != null ? U : !0,
|
|
5475
|
+
position: (N = j.position) != null ? N : o.value
|
|
5476
5476
|
};
|
|
5477
|
-
}),
|
|
5478
|
-
var
|
|
5479
|
-
|
|
5480
|
-
}, p = () => {
|
|
5481
|
-
var _;
|
|
5482
|
-
const O = !e.open.value;
|
|
5483
|
-
(_ = e.onOpenChange) == null || _.call(e, O);
|
|
5477
|
+
}), a = /* @__PURE__ */ L(l.value.width), c = q(() => r.value ? "split" : e.displayMode.value === "bubble" ? "bubble" : e.displayMode.value === "split" || i.value >= xh ? "split" : "bubble"), u = q(() => c.value === "split"), f = q(() => l.value.position), p = (b) => {
|
|
5478
|
+
var P;
|
|
5479
|
+
a.value = b, (P = e.onWidthChange) == null || P.call(e, b);
|
|
5484
5480
|
}, v = () => {
|
|
5485
|
-
var
|
|
5486
|
-
const
|
|
5487
|
-
|
|
5488
|
-
},
|
|
5489
|
-
|
|
5481
|
+
var b;
|
|
5482
|
+
const P = !e.open.value;
|
|
5483
|
+
(b = e.onOpenChange) == null || b.call(e, P);
|
|
5484
|
+
}, y = () => {
|
|
5485
|
+
var b;
|
|
5486
|
+
const P = o.value === "right" ? "left" : "right";
|
|
5487
|
+
o.value = P, (b = e.onPositionChange) == null || b.call(e, P);
|
|
5490
5488
|
}, g = () => {
|
|
5489
|
+
typeof window < "u" && (i.value = window.innerWidth);
|
|
5490
|
+
}, O = () => {
|
|
5491
5491
|
if (!(typeof document > "u")) {
|
|
5492
|
-
if (
|
|
5492
|
+
if (s.value) {
|
|
5493
5493
|
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");
|
|
5494
5494
|
return;
|
|
5495
5495
|
}
|
|
5496
|
-
|
|
5496
|
+
u.value && e.open.value && l.value.shrinkPage ? (document.body.classList.add("has-opencode-split"), document.body.style.setProperty("--opencode-split-width", `${a.value}px`), f.value === "left" ? (document.body.classList.add("has-opencode-split-left"), document.body.classList.remove("has-opencode-split-right")) : (document.body.classList.add("has-opencode-split-right"), document.body.classList.remove("has-opencode-split-left"))) : (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"));
|
|
5497
5497
|
}
|
|
5498
5498
|
};
|
|
5499
5499
|
return Me([
|
|
5500
|
-
|
|
5500
|
+
u,
|
|
5501
5501
|
e.open,
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
],
|
|
5505
|
-
|
|
5502
|
+
a,
|
|
5503
|
+
f
|
|
5504
|
+
], O, { immediate: !0 }), Me(l, (b) => {
|
|
5505
|
+
a.value < b.minWidth && (a.value = b.minWidth), a.value > b.maxWidth && (a.value = b.maxWidth);
|
|
5506
5506
|
}), Me(() => {
|
|
5507
|
-
var
|
|
5508
|
-
return (
|
|
5509
|
-
}, (
|
|
5510
|
-
|
|
5507
|
+
var b;
|
|
5508
|
+
return (b = e.splitPosition) == null ? void 0 : b.value;
|
|
5509
|
+
}, (b) => {
|
|
5510
|
+
b && b !== o.value && (o.value = b);
|
|
5511
5511
|
}), Xe(() => {
|
|
5512
|
-
var
|
|
5513
|
-
typeof window < "u" && (window.addEventListener("resize",
|
|
5512
|
+
var b;
|
|
5513
|
+
typeof window < "u" && (window.addEventListener("resize", g), !r.value && u.value && l.value.defaultOpen && !e.open.value && ((b = e.onOpenChange) == null || b.call(e, !0)));
|
|
5514
5514
|
}), Ke(() => {
|
|
5515
|
-
typeof window < "u" && (window.removeEventListener("resize",
|
|
5515
|
+
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")));
|
|
5516
5516
|
}), {
|
|
5517
|
-
effectiveMode:
|
|
5518
|
-
isSplitMode:
|
|
5517
|
+
effectiveMode: c,
|
|
5518
|
+
isSplitMode: u,
|
|
5519
5519
|
isExtensionMode: r,
|
|
5520
|
-
panelWidth:
|
|
5521
|
-
splitConfig:
|
|
5522
|
-
splitPosition:
|
|
5523
|
-
handleResize:
|
|
5524
|
-
handleToggle:
|
|
5525
|
-
handleTogglePosition:
|
|
5520
|
+
panelWidth: a,
|
|
5521
|
+
splitConfig: l,
|
|
5522
|
+
splitPosition: f,
|
|
5523
|
+
handleResize: p,
|
|
5524
|
+
handleToggle: v,
|
|
5525
|
+
handleTogglePosition: y
|
|
5526
5526
|
};
|
|
5527
5527
|
}
|
|
5528
5528
|
var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwnPropertyDescriptors, Or = Object.getOwnPropertySymbols, Ah = Object.prototype.hasOwnProperty, Rh = Object.prototype.propertyIsEnumerable, Pr = (e, t, n) => t in e ? Ph(e, t, {
|
|
@@ -5710,19 +5710,19 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5710
5710
|
a.value = x, c.value = !0, u.value = Ot, f && clearTimeout(f), f = setTimeout(() => {
|
|
5711
5711
|
c.value = !1;
|
|
5712
5712
|
}, ft);
|
|
5713
|
-
}, v = /* @__PURE__ */ L(!1),
|
|
5713
|
+
}, v = /* @__PURE__ */ L(!1), y = /* @__PURE__ */ L("");
|
|
5714
5714
|
let g = null;
|
|
5715
|
-
const
|
|
5715
|
+
const O = (x) => (y.value = x, v.value = !0, new Promise((ke) => {
|
|
5716
5716
|
g = ke;
|
|
5717
|
-
})),
|
|
5717
|
+
})), b = () => {
|
|
5718
5718
|
v.value = !1, g && g(!0);
|
|
5719
|
-
},
|
|
5719
|
+
}, P = () => {
|
|
5720
5720
|
v.value = !1, g && g(!1);
|
|
5721
|
-
}, F = /* @__PURE__ */ L(null), S = /* @__PURE__ */ L(null),
|
|
5721
|
+
}, F = /* @__PURE__ */ L(null), S = /* @__PURE__ */ L(null), H = (x, ke) => {
|
|
5722
5722
|
var ft;
|
|
5723
5723
|
(ft = F.value) == null || ft.sendMessageToIframe(x, ke);
|
|
5724
|
-
}, U = /* @__PURE__ */ L(r.sessionListCollapsed),
|
|
5725
|
-
I.value && (
|
|
5724
|
+
}, U = /* @__PURE__ */ L(r.sessionListCollapsed), N = /* @__PURE__ */ L(r.displayMode), j = /* @__PURE__ */ L((o = (i = r.splitMode) == null ? void 0 : i.position) != null ? o : "right"), B = /* @__PURE__ */ L(!1), Y = /* @__PURE__ */ L(!0), le = /* @__PURE__ */ L(!1), fe = /* @__PURE__ */ L(!0), I = /* @__PURE__ */ L(!1), X = /* @__PURE__ */ L(r.splitPanelWidth), Q = () => {
|
|
5725
|
+
I.value && (H(be.PROMPT_DOCK_VISIBILITY, { visible: Y.value }), H(be.MINIMIZE_STATE, { minimized: B.value }), H(be.REVIEW_PANEL_TOGGLE, { visible: le.value }));
|
|
5726
5726
|
}, G = () => {
|
|
5727
5727
|
s("frame-loaded"), I.value = !0, Q();
|
|
5728
5728
|
};
|
|
@@ -5731,16 +5731,16 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5731
5731
|
}), Me(() => r.splitPanelWidth, (x) => {
|
|
5732
5732
|
X.value = x;
|
|
5733
5733
|
}), Me(() => r.displayMode, (x) => {
|
|
5734
|
-
|
|
5734
|
+
N.value = x;
|
|
5735
5735
|
});
|
|
5736
5736
|
const ee = () => {
|
|
5737
|
-
if (
|
|
5737
|
+
if (N.value === "extension" || N.value === "extension-selector") return;
|
|
5738
5738
|
const x = [
|
|
5739
5739
|
"bubble",
|
|
5740
5740
|
"split",
|
|
5741
5741
|
"auto"
|
|
5742
|
-
], ke = (x.indexOf(
|
|
5743
|
-
|
|
5742
|
+
], ke = (x.indexOf(N.value) + 1) % x.length;
|
|
5743
|
+
N.value = x[ke];
|
|
5744
5744
|
}, { buttonActive: Le, containerClasses: Je, iframeSource: De, sessionListTitle: $e, resolvedTheme: Fe, handleClose: ct, handleEmptyAction: ut, handleToggle: mt, handleToggleSessionList: Ze, handleToggleTheme: st } = nf({
|
|
5745
5745
|
theme: /* @__PURE__ */ se(r, "theme"),
|
|
5746
5746
|
open: /* @__PURE__ */ se(r, "open"),
|
|
@@ -5773,7 +5773,7 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5773
5773
|
s("update:currentSessionId", x.id), s("select-session", x);
|
|
5774
5774
|
},
|
|
5775
5775
|
onDeleteSession: (x) => s("delete-session", x),
|
|
5776
|
-
showConfirmDialog:
|
|
5776
|
+
showConfirmDialog: O
|
|
5777
5777
|
}), { bubbleVisible: lt, hasSelectedElements: d, selectedElementItems: h, handleClearSelectedNodes: m, handleClickSelectedNode: T, handleRemoveSelectedNode: E, handleToggleSelectMode: w } = Zd({
|
|
5778
5778
|
selectMode: /* @__PURE__ */ se(r, "selectMode"),
|
|
5779
5779
|
selectedElements: /* @__PURE__ */ se(r, "selectedElements"),
|
|
@@ -5788,8 +5788,8 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5788
5788
|
onClearSelectedNodes: () => {
|
|
5789
5789
|
s("clear-selected-nodes"), s("update:selectedElements", []);
|
|
5790
5790
|
},
|
|
5791
|
-
showConfirmDialog:
|
|
5792
|
-
}), { highlightVisible:
|
|
5791
|
+
showConfirmDialog: O
|
|
5792
|
+
}), { highlightVisible: k, highlightStyle: A, tooltipVisible: R, tooltipStyle: C, tooltipContent: z } = Eh({
|
|
5793
5793
|
selectMode: /* @__PURE__ */ se(r, "selectMode"),
|
|
5794
5794
|
onAddSelectedNode: (x) => {
|
|
5795
5795
|
s("click-selected-node", x);
|
|
@@ -5797,11 +5797,11 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5797
5797
|
onExitSelectMode: () => {
|
|
5798
5798
|
s("update:selectMode", !1), s("toggle-select-mode", !1);
|
|
5799
5799
|
}
|
|
5800
|
-
}), D = /* @__PURE__ */ L(void 0), { effectiveMode:
|
|
5801
|
-
displayMode:
|
|
5800
|
+
}), D = /* @__PURE__ */ L(void 0), { effectiveMode: W, isSplitMode: K, isExtensionMode: Z, panelWidth: re, splitConfig: ne, splitPosition: he, handleResize: ae, handleToggle: Be, handleTogglePosition: Te } = Oh({
|
|
5801
|
+
displayMode: N,
|
|
5802
5802
|
splitMode: /* @__PURE__ */ se(r, "splitMode"),
|
|
5803
5803
|
open: /* @__PURE__ */ se(r, "open"),
|
|
5804
|
-
splitPosition:
|
|
5804
|
+
splitPosition: j,
|
|
5805
5805
|
onOpenChange: (x) => {
|
|
5806
5806
|
s("update:open", x), s("toggle", x);
|
|
5807
5807
|
},
|
|
@@ -5809,29 +5809,29 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5809
5809
|
X.value = x, s("update:splitPanelWidth", x), s("split-panel-width-change", x);
|
|
5810
5810
|
},
|
|
5811
5811
|
onPositionChange: (x) => {
|
|
5812
|
-
|
|
5812
|
+
j.value = x;
|
|
5813
5813
|
}
|
|
5814
5814
|
});
|
|
5815
5815
|
Ch({
|
|
5816
5816
|
open: /* @__PURE__ */ se(r, "open"),
|
|
5817
|
-
minimized:
|
|
5817
|
+
minimized: B,
|
|
5818
5818
|
promptDockVisible: Y,
|
|
5819
5819
|
reviewPanelVisible: le,
|
|
5820
5820
|
bubbleOffset: D,
|
|
5821
5821
|
theme: /* @__PURE__ */ se(r, "theme"),
|
|
5822
5822
|
sessionListCollapsed: U,
|
|
5823
5823
|
splitPanelWidth: X,
|
|
5824
|
-
displayMode:
|
|
5825
|
-
splitPosition:
|
|
5824
|
+
displayMode: N,
|
|
5825
|
+
splitPosition: j,
|
|
5826
5826
|
onRestore: (x) => {
|
|
5827
|
-
if (x.open !== void 0 && x.open !== r.open && (s("update:open", x.open), s("toggle", x.open)), x.minimized !== void 0 && (
|
|
5827
|
+
if (x.open !== void 0 && x.open !== r.open && (s("update:open", x.open), s("toggle", x.open)), x.minimized !== void 0 && (B.value = x.minimized), x.bubbleOffset !== void 0) {
|
|
5828
5828
|
const Ot = window.innerWidth - 44 - 10, Kt = window.innerHeight - 44 - 10;
|
|
5829
5829
|
D.value = {
|
|
5830
5830
|
x: Math.max(10, Math.min(x.bubbleOffset.x, Ot)),
|
|
5831
5831
|
y: Math.max(10, Math.min(x.bubbleOffset.y, Kt))
|
|
5832
5832
|
};
|
|
5833
5833
|
}
|
|
5834
|
-
x.theme !== void 0 && x.theme !== r.theme && (s("update:theme", x.theme), s("toggle-theme", x.theme)), x.sessionListCollapsed !== void 0 && x.sessionListCollapsed !== r.sessionListCollapsed && (U.value = x.sessionListCollapsed, s("update:sessionListCollapsed", x.sessionListCollapsed)), x.promptDockVisible !== void 0 ? Y.value = x.promptDockVisible :
|
|
5834
|
+
x.theme !== void 0 && x.theme !== r.theme && (s("update:theme", x.theme), s("toggle-theme", x.theme)), x.sessionListCollapsed !== void 0 && x.sessionListCollapsed !== r.sessionListCollapsed && (U.value = x.sessionListCollapsed, s("update:sessionListCollapsed", x.sessionListCollapsed)), x.promptDockVisible !== void 0 ? Y.value = x.promptDockVisible : B.value && (Y.value = !1), x.reviewPanelVisible !== void 0 && (le.value = x.reviewPanelVisible), x.splitPanelWidth !== void 0 && x.splitPanelWidth !== r.splitPanelWidth && ae(x.splitPanelWidth), x.displayMode !== void 0 && x.displayMode !== r.displayMode && r.displayMode !== "extension" && r.displayMode !== "extension-selector" && (N.value = x.displayMode), x.splitPosition !== void 0 && (j.value = x.splitPosition), Mi(() => {
|
|
5835
5835
|
Q(), setTimeout(() => {
|
|
5836
5836
|
fe.value = !1;
|
|
5837
5837
|
}, 50);
|
|
@@ -5839,11 +5839,11 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5839
5839
|
}
|
|
5840
5840
|
});
|
|
5841
5841
|
const _t = () => {
|
|
5842
|
-
|
|
5842
|
+
B.value = !B.value, Y.value = !B.value, H(be.PROMPT_DOCK_VISIBILITY, { visible: Y.value }), H(be.MINIMIZE_STATE, { minimized: B.value });
|
|
5843
5843
|
}, dt = () => {
|
|
5844
|
-
Y.value = !Y.value,
|
|
5844
|
+
Y.value = !Y.value, H(be.PROMPT_DOCK_VISIBILITY, { visible: Y.value });
|
|
5845
5845
|
}, Ie = () => {
|
|
5846
|
-
le.value = !le.value,
|
|
5846
|
+
le.value = !le.value, H(be.REVIEW_PANEL_TOGGLE, { visible: le.value });
|
|
5847
5847
|
}, je = () => {
|
|
5848
5848
|
window.location.reload();
|
|
5849
5849
|
}, et = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), Ge = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), mn = () => {
|
|
@@ -5854,18 +5854,18 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5854
5854
|
}), Ke(() => {
|
|
5855
5855
|
typeof window < "u" && window.removeEventListener("resize", mn);
|
|
5856
5856
|
});
|
|
5857
|
-
const
|
|
5857
|
+
const M = q(() => {
|
|
5858
5858
|
var x, ke, ft, Ot;
|
|
5859
5859
|
if (typeof window > "u") return "bottom-right";
|
|
5860
5860
|
const Kt = et.value / 2, Vt = Ge.value / 2, Pt = 44, at = (ke = (x = S.value) == null ? void 0 : x.offset) != null ? ke : D.value, Gt = ((ft = at?.x) != null ? ft : et.value - Pt - 24) + Pt / 2, yt = ((Ot = at?.y) != null ? Ot : Ge.value - Pt - 24) + Pt / 2;
|
|
5861
5861
|
return Gt >= Kt && yt >= Vt ? "bottom-right" : Gt < Kt && yt >= Vt ? "bottom-left" : Gt >= Kt && yt < Vt ? "top-right" : "top-left";
|
|
5862
5862
|
}), ie = q(() => {
|
|
5863
|
-
const x =
|
|
5863
|
+
const x = M.value;
|
|
5864
5864
|
return x === "top-right" || x === "bottom-right";
|
|
5865
5865
|
}), Kn = q(() => {
|
|
5866
5866
|
var x, ke, ft;
|
|
5867
5867
|
if (typeof window > "u") return {};
|
|
5868
|
-
const Ot =
|
|
5868
|
+
const Ot = B.value ? 300 : 700, Kt = B.value ? 300 : Math.min(Ge.value * 0.86, Ge.value - 40), Vt = 24, Pt = 44, at = 20, Gt = (ft = (ke = (x = S.value) == null ? void 0 : x.offset) != null ? ke : D.value) != null ? ft : {
|
|
5869
5869
|
x: et.value - Pt - Vt,
|
|
5870
5870
|
y: Ge.value - Pt - Vt
|
|
5871
5871
|
}, yt = {};
|
|
@@ -5888,7 +5888,7 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5888
5888
|
}, Sl = () => {
|
|
5889
5889
|
_n.value = !1;
|
|
5890
5890
|
}, Ni = q(() => {
|
|
5891
|
-
switch (
|
|
5891
|
+
switch (M.value) {
|
|
5892
5892
|
case "top-left":
|
|
5893
5893
|
return {
|
|
5894
5894
|
x: "-20px",
|
|
@@ -5937,12 +5937,12 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5937
5937
|
showClearAll: /* @__PURE__ */ se(r, "showClearAll"),
|
|
5938
5938
|
open: /* @__PURE__ */ se(r, "open"),
|
|
5939
5939
|
thinking: /* @__PURE__ */ se(r, "thinking"),
|
|
5940
|
-
minimized:
|
|
5940
|
+
minimized: B,
|
|
5941
5941
|
promptDockVisible: Y,
|
|
5942
5942
|
reviewPanelVisible: le,
|
|
5943
5943
|
bubbleOffset: D,
|
|
5944
|
-
mode:
|
|
5945
|
-
displayMode:
|
|
5944
|
+
mode: W,
|
|
5945
|
+
displayMode: N,
|
|
5946
5946
|
splitPosition: he,
|
|
5947
5947
|
sessionStates: q(() => {
|
|
5948
5948
|
var x;
|
|
@@ -5977,8 +5977,8 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5977
5977
|
handleRefresh: je
|
|
5978
5978
|
}), t({
|
|
5979
5979
|
showNotification: p,
|
|
5980
|
-
showConfirmDialog:
|
|
5981
|
-
sendMessageToIframe:
|
|
5980
|
+
showConfirmDialog: O,
|
|
5981
|
+
sendMessageToIframe: H,
|
|
5982
5982
|
isSplitMode: K
|
|
5983
5983
|
});
|
|
5984
5984
|
const Mo = {
|
|
@@ -5996,23 +5996,23 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
5996
5996
|
},
|
|
5997
5997
|
showNotification: p,
|
|
5998
5998
|
dialogVisible: v,
|
|
5999
|
-
dialogMessage:
|
|
5999
|
+
dialogMessage: y,
|
|
6000
6000
|
get dialogResolve() {
|
|
6001
6001
|
return g;
|
|
6002
6002
|
},
|
|
6003
6003
|
set dialogResolve(x) {
|
|
6004
6004
|
g = x;
|
|
6005
6005
|
},
|
|
6006
|
-
showConfirmDialog:
|
|
6007
|
-
handleDialogConfirm:
|
|
6008
|
-
handleDialogCancel:
|
|
6006
|
+
showConfirmDialog: O,
|
|
6007
|
+
handleDialogConfirm: b,
|
|
6008
|
+
handleDialogCancel: P,
|
|
6009
6009
|
frameRef: F,
|
|
6010
6010
|
triggerRef: S,
|
|
6011
|
-
sendMessageToIframe:
|
|
6011
|
+
sendMessageToIframe: H,
|
|
6012
6012
|
localSessionListCollapsed: U,
|
|
6013
|
-
localDisplayMode:
|
|
6014
|
-
localSplitPosition:
|
|
6015
|
-
minimized:
|
|
6013
|
+
localDisplayMode: N,
|
|
6014
|
+
localSplitPosition: j,
|
|
6015
|
+
minimized: B,
|
|
6016
6016
|
promptDockVisible: Y,
|
|
6017
6017
|
reviewPanelVisible: le,
|
|
6018
6018
|
isRestoring: fe,
|
|
@@ -6042,13 +6042,13 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
6042
6042
|
handleClickSelectedNode: T,
|
|
6043
6043
|
handleRemoveSelectedNode: E,
|
|
6044
6044
|
handleToggleSelectMode: w,
|
|
6045
|
-
highlightVisible:
|
|
6045
|
+
highlightVisible: k,
|
|
6046
6046
|
highlightStyle: A,
|
|
6047
6047
|
tooltipVisible: R,
|
|
6048
6048
|
tooltipStyle: C,
|
|
6049
6049
|
tooltipContent: z,
|
|
6050
6050
|
bubbleOffset: D,
|
|
6051
|
-
effectiveMode:
|
|
6051
|
+
effectiveMode: W,
|
|
6052
6052
|
isSplitMode: K,
|
|
6053
6053
|
isExtensionMode: Z,
|
|
6054
6054
|
panelWidth: re,
|
|
@@ -6064,7 +6064,7 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
6064
6064
|
windowWidth: et,
|
|
6065
6065
|
windowHeight: Ge,
|
|
6066
6066
|
handleWindowResize: mn,
|
|
6067
|
-
bubbleQuadrant:
|
|
6067
|
+
bubbleQuadrant: M,
|
|
6068
6068
|
isBubbleOnRightSide: ie,
|
|
6069
6069
|
chatPositionStyle: Kn,
|
|
6070
6070
|
handleBubbleOffsetChange: Gn,
|
|
@@ -6098,8 +6098,8 @@ var Ph = Object.defineProperty, Mh = Object.defineProperties, Ih = Object.getOwn
|
|
|
6098
6098
|
"aria-modal": "true"
|
|
6099
6099
|
}, Bh = { class: "opencode-dialog-content" }, jh = { class: "opencode-dialog-message" };
|
|
6100
6100
|
function Vh(e, t, n, i, o, r) {
|
|
6101
|
-
return $(),
|
|
6102
|
-
n.displayMode !== "extension-selector" ? ($(),
|
|
6101
|
+
return $(), V("div", { class: Pe([...i.containerClasses, { "extension-mode": i.isExtensionMode }]) }, [
|
|
6102
|
+
n.displayMode !== "extension-selector" ? ($(), V(ve, { key: 0 }, [
|
|
6103
6103
|
!i.isSplitMode && !i.props.hideBubble ? ($(), xt(i.Trigger, {
|
|
6104
6104
|
key: 0,
|
|
6105
6105
|
ref: "triggerRef",
|
|
@@ -6132,7 +6132,7 @@ function Vh(e, t, n, i, o, r) {
|
|
|
6132
6132
|
onResizeEnd: i.handleResizeEnd,
|
|
6133
6133
|
onToggle: i.handleSplitToggle
|
|
6134
6134
|
}, di({
|
|
6135
|
-
"sessions-empty": Se(() => [te(e.$slots, "sessions-empty", {}, () => [t[0] || (t[0] =
|
|
6135
|
+
"sessions-empty": Se(() => [te(e.$slots, "sessions-empty", {}, () => [t[0] || (t[0] = _("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
|
|
6136
6136
|
_: 2
|
|
6137
6137
|
}, [
|
|
6138
6138
|
i.slots["session-toggle-icon"] ? {
|
|
@@ -6191,25 +6191,25 @@ function Vh(e, t, n, i, o, r) {
|
|
|
6191
6191
|
]),
|
|
6192
6192
|
Oe(i.SelectHint)
|
|
6193
6193
|
], 64)) : ce("v-if", !0),
|
|
6194
|
-
no(
|
|
6194
|
+
no(_("div", {
|
|
6195
6195
|
class: "opencode-element-highlight",
|
|
6196
6196
|
style: qt(i.highlightStyle)
|
|
6197
6197
|
}, null, 4), [[Xo, i.highlightVisible]]),
|
|
6198
|
-
no(
|
|
6198
|
+
no(_("div", {
|
|
6199
6199
|
class: "opencode-element-tooltip",
|
|
6200
6200
|
style: qt(i.tooltipStyle)
|
|
6201
|
-
}, [
|
|
6202
|
-
i.dialogVisible ? ($(),
|
|
6201
|
+
}, [_("div", Lh, Ce(i.tooltipContent.description), 1), _("div", Dh, Ce(i.tooltipContent.fileInfo), 1)], 4), [[Xo, i.tooltipVisible]]),
|
|
6202
|
+
i.dialogVisible ? ($(), V("div", $h, [_("div", Fh, [_("div", Bh, [_("div", jh, Ce(i.dialogMessage), 1)]), _("div", { class: "opencode-dialog-actions" }, [_("button", {
|
|
6203
6203
|
class: "opencode-dialog-btn cancel",
|
|
6204
6204
|
onClick: i.handleDialogCancel
|
|
6205
|
-
}, "取消"),
|
|
6205
|
+
}, "取消"), _("button", {
|
|
6206
6206
|
class: "opencode-dialog-btn confirm",
|
|
6207
6207
|
onClick: i.handleDialogConfirm
|
|
6208
6208
|
}, "确认")])])])) : ce("v-if", !0),
|
|
6209
6209
|
($(), xt(ps, {
|
|
6210
6210
|
to: "body",
|
|
6211
6211
|
disabled: i.notificationMode === "widget"
|
|
6212
|
-
}, [i.notificationVisible ? ($(),
|
|
6212
|
+
}, [i.notificationVisible ? ($(), V("div", {
|
|
6213
6213
|
key: 0,
|
|
6214
6214
|
class: Pe(i.notificationMode === "page" ? "opencode-page-notification" : "opencode-notification"),
|
|
6215
6215
|
role: "alert"
|
|
@@ -6250,15 +6250,15 @@ function Mr(e, t) {
|
|
|
6250
6250
|
var sn = Bt("SSE"), Uh = 10, qh = 1e3;
|
|
6251
6251
|
function yl(e) {
|
|
6252
6252
|
const { endpoint: t, autoConnect: n = !0, enabled: i, maxRetries: o = Uh, retryDelay: r = qh, onConnected: s, onDisconnected: l, onError: a, onMessage: c } = e, u = /* @__PURE__ */ L(null), f = /* @__PURE__ */ L("idle"), p = /* @__PURE__ */ L(0);
|
|
6253
|
-
function v(
|
|
6253
|
+
function v(P) {
|
|
6254
6254
|
try {
|
|
6255
|
-
const F = JSON.parse(
|
|
6255
|
+
const F = JSON.parse(P.data);
|
|
6256
6256
|
c?.(F);
|
|
6257
6257
|
} catch {
|
|
6258
|
-
c?.(
|
|
6258
|
+
c?.(P.data);
|
|
6259
6259
|
}
|
|
6260
6260
|
}
|
|
6261
|
-
function
|
|
6261
|
+
function y() {
|
|
6262
6262
|
if (!(u.value || f.value === "connecting")) {
|
|
6263
6263
|
if (i?.value === !1) {
|
|
6264
6264
|
f.value = "idle";
|
|
@@ -6270,10 +6270,10 @@ function yl(e) {
|
|
|
6270
6270
|
f.value = "connected", p.value = 0, sn.debug(`connected: ${t}`), s?.();
|
|
6271
6271
|
}, u.value.onmessage = v, u.value.onerror = () => {
|
|
6272
6272
|
if (!u.value) return;
|
|
6273
|
-
const
|
|
6273
|
+
const P = f.value === "connected";
|
|
6274
6274
|
f.value = "error", u.value?.close(), u.value = null, sn.debug("error on", {
|
|
6275
6275
|
endpoint: t,
|
|
6276
|
-
wasConnected:
|
|
6276
|
+
wasConnected: P,
|
|
6277
6277
|
retryCount: p.value,
|
|
6278
6278
|
maxRetries: o
|
|
6279
6279
|
});
|
|
@@ -6282,18 +6282,18 @@ function yl(e) {
|
|
|
6282
6282
|
p.value++;
|
|
6283
6283
|
const S = r * p.value;
|
|
6284
6284
|
sn.debug(`will retry #${p.value} in ${S}ms -> ${t}`), setTimeout(() => {
|
|
6285
|
-
i?.value !== !1 && !u.value && f.value !== "disconnected" &&
|
|
6285
|
+
i?.value !== !1 && !u.value && f.value !== "disconnected" && y();
|
|
6286
6286
|
}, S);
|
|
6287
|
-
} else
|
|
6287
|
+
} else P ? (sn.debug(`max retries reached, calling onDisconnected for ${t}`), l?.()) : sn.debug(`max retries reached, was never connected, NOT calling onDisconnected for ${t}`);
|
|
6288
6288
|
};
|
|
6289
|
-
} catch (
|
|
6289
|
+
} catch (P) {
|
|
6290
6290
|
f.value = "error";
|
|
6291
|
-
const F =
|
|
6291
|
+
const F = P instanceof Error ? P : new Error(String(P));
|
|
6292
6292
|
if (a?.(F), p.value < o) {
|
|
6293
6293
|
p.value++;
|
|
6294
6294
|
const S = r * p.value;
|
|
6295
6295
|
setTimeout(() => {
|
|
6296
|
-
!u.value && f.value !== "disconnected" &&
|
|
6296
|
+
!u.value && f.value !== "disconnected" && y();
|
|
6297
6297
|
}, S);
|
|
6298
6298
|
}
|
|
6299
6299
|
}
|
|
@@ -6302,13 +6302,13 @@ function yl(e) {
|
|
|
6302
6302
|
function g() {
|
|
6303
6303
|
u.value && (u.value.close(), u.value = null), f.value = "disconnected", p.value = 0, l?.();
|
|
6304
6304
|
}
|
|
6305
|
-
function _() {
|
|
6306
|
-
g(), b();
|
|
6307
|
-
}
|
|
6308
6305
|
function O() {
|
|
6306
|
+
g(), y();
|
|
6307
|
+
}
|
|
6308
|
+
function b() {
|
|
6309
6309
|
p.value = 0;
|
|
6310
6310
|
}
|
|
6311
|
-
return n && i?.value !== !1 &&
|
|
6311
|
+
return n && i?.value !== !1 && y(), Ke(() => {
|
|
6312
6312
|
g();
|
|
6313
6313
|
}), {
|
|
6314
6314
|
connection: u,
|
|
@@ -6316,10 +6316,10 @@ function yl(e) {
|
|
|
6316
6316
|
retryCount: p,
|
|
6317
6317
|
isConnected: q(() => f.value === "connected"),
|
|
6318
6318
|
isConnecting: q(() => f.value === "connecting"),
|
|
6319
|
-
connect:
|
|
6319
|
+
connect: y,
|
|
6320
6320
|
disconnect: g,
|
|
6321
|
-
reconnect:
|
|
6322
|
-
resetRetryCount:
|
|
6321
|
+
reconnect: O,
|
|
6322
|
+
resetRetryCount: b
|
|
6323
6323
|
};
|
|
6324
6324
|
}
|
|
6325
6325
|
var Ir = Bt("ServerSSE");
|
|
@@ -6380,62 +6380,62 @@ function Yh(e) {
|
|
|
6380
6380
|
return S?.role === "assistant" && typeof S?.time?.completed != "number";
|
|
6381
6381
|
}
|
|
6382
6382
|
function a(S) {
|
|
6383
|
-
const
|
|
6383
|
+
const H = s.value[S], U = H?.hasPending || H?.statusType !== "idle";
|
|
6384
6384
|
s.value[S] = {
|
|
6385
6385
|
thinking: U,
|
|
6386
|
-
statusType:
|
|
6387
|
-
hasPending:
|
|
6386
|
+
statusType: H?.statusType || "idle",
|
|
6387
|
+
hasPending: H?.hasPending || !1
|
|
6388
6388
|
};
|
|
6389
6389
|
}
|
|
6390
6390
|
function c(S) {
|
|
6391
|
-
const
|
|
6392
|
-
switch (
|
|
6391
|
+
const H = S.type, U = S.properties;
|
|
6392
|
+
switch (H) {
|
|
6393
6393
|
case "session.updated": {
|
|
6394
|
-
const
|
|
6395
|
-
if (!
|
|
6394
|
+
const N = U.info;
|
|
6395
|
+
if (!N?.id) return;
|
|
6396
6396
|
r?.({
|
|
6397
|
-
id:
|
|
6398
|
-
title:
|
|
6399
|
-
time:
|
|
6400
|
-
summary:
|
|
6397
|
+
id: N.id,
|
|
6398
|
+
title: N.title,
|
|
6399
|
+
time: N.time,
|
|
6400
|
+
summary: N.summary
|
|
6401
6401
|
});
|
|
6402
6402
|
break;
|
|
6403
6403
|
}
|
|
6404
6404
|
case "session.status": {
|
|
6405
|
-
const
|
|
6406
|
-
if (!
|
|
6407
|
-
const
|
|
6408
|
-
s.value[
|
|
6409
|
-
thinking:
|
|
6410
|
-
statusType:
|
|
6405
|
+
const N = U.sessionID;
|
|
6406
|
+
if (!N) return;
|
|
6407
|
+
const j = U.status?.type || "idle";
|
|
6408
|
+
s.value[N] = {
|
|
6409
|
+
thinking: j !== "idle",
|
|
6410
|
+
statusType: j,
|
|
6411
6411
|
hasPending: !1
|
|
6412
|
-
}, a(
|
|
6412
|
+
}, a(N);
|
|
6413
6413
|
break;
|
|
6414
6414
|
}
|
|
6415
6415
|
case "message.updated": {
|
|
6416
|
-
const
|
|
6417
|
-
if (!
|
|
6418
|
-
const
|
|
6419
|
-
if (
|
|
6420
|
-
const
|
|
6416
|
+
const N = U.info;
|
|
6417
|
+
if (!N?.sessionID) return;
|
|
6418
|
+
const j = N.sessionID;
|
|
6419
|
+
if (N.role === "assistant") {
|
|
6420
|
+
const B = l(N), Y = s.value[j] || {
|
|
6421
6421
|
thinking: !1,
|
|
6422
6422
|
statusType: "idle",
|
|
6423
6423
|
hasPending: !1
|
|
6424
6424
|
};
|
|
6425
|
-
s.value[
|
|
6425
|
+
s.value[j] = {
|
|
6426
6426
|
...Y,
|
|
6427
|
-
hasPending:
|
|
6428
|
-
}, a(
|
|
6427
|
+
hasPending: B
|
|
6428
|
+
}, a(j);
|
|
6429
6429
|
}
|
|
6430
6430
|
break;
|
|
6431
6431
|
}
|
|
6432
6432
|
case "message.part.delta": {
|
|
6433
|
-
const
|
|
6434
|
-
if (!
|
|
6435
|
-
const
|
|
6436
|
-
|
|
6433
|
+
const N = U.sessionID;
|
|
6434
|
+
if (!N) return;
|
|
6435
|
+
const j = s.value[N];
|
|
6436
|
+
j?.hasPending || (s.value[N] = {
|
|
6437
6437
|
thinking: !0,
|
|
6438
|
-
statusType:
|
|
6438
|
+
statusType: j?.statusType || "idle",
|
|
6439
6439
|
hasPending: !0
|
|
6440
6440
|
});
|
|
6441
6441
|
break;
|
|
@@ -6453,21 +6453,21 @@ function Yh(e) {
|
|
|
6453
6453
|
}), p = q(() => {
|
|
6454
6454
|
const S = n.value;
|
|
6455
6455
|
return S && s.value[S] || null;
|
|
6456
|
-
}), v = q(() => Object.values(s.value).some((S) => S.thinking)),
|
|
6456
|
+
}), v = q(() => Object.values(s.value).some((S) => S.thinking)), y = q(() => Object.values(s.value).filter((S) => S.thinking).length);
|
|
6457
6457
|
function g(S) {
|
|
6458
6458
|
delete s.value[S];
|
|
6459
6459
|
}
|
|
6460
|
-
function
|
|
6460
|
+
function O() {
|
|
6461
6461
|
s.value = {};
|
|
6462
6462
|
}
|
|
6463
|
-
function
|
|
6463
|
+
function b(S) {
|
|
6464
6464
|
return s.value[S];
|
|
6465
6465
|
}
|
|
6466
|
-
function
|
|
6466
|
+
function P(S) {
|
|
6467
6467
|
return s.value[S]?.thinking ?? !1;
|
|
6468
6468
|
}
|
|
6469
6469
|
function F(S) {
|
|
6470
|
-
return S.reduce((
|
|
6470
|
+
return S.reduce((H, U) => (H[U] = P(U), H), {});
|
|
6471
6471
|
}
|
|
6472
6472
|
return {
|
|
6473
6473
|
status: u.status,
|
|
@@ -6476,49 +6476,49 @@ function Yh(e) {
|
|
|
6476
6476
|
currentThinking: f,
|
|
6477
6477
|
currentSessionState: p,
|
|
6478
6478
|
hasAnyThinking: v,
|
|
6479
|
-
thinkingSessionCount:
|
|
6479
|
+
thinkingSessionCount: y,
|
|
6480
6480
|
connect: u.connect,
|
|
6481
6481
|
disconnect: u.disconnect,
|
|
6482
6482
|
clearSessionState: g,
|
|
6483
|
-
clearAllSessionStates:
|
|
6484
|
-
getSessionState:
|
|
6485
|
-
isSessionThinking:
|
|
6483
|
+
clearAllSessionStates: O,
|
|
6484
|
+
getSessionState: b,
|
|
6485
|
+
isSessionThinking: P,
|
|
6486
6486
|
getSessionsThinking: F
|
|
6487
6487
|
};
|
|
6488
6488
|
}
|
|
6489
6489
|
var Xh = Bt("OpenCode");
|
|
6490
6490
|
function Jh(e) {
|
|
6491
|
-
const { showNotification: t, viteBaseUrl: n = "" } = e, i = (
|
|
6491
|
+
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 () => {
|
|
6492
6492
|
r.value = !0;
|
|
6493
6493
|
try {
|
|
6494
|
-
const
|
|
6495
|
-
o.value =
|
|
6494
|
+
const y = await (await fetch(i(Ki))).json();
|
|
6495
|
+
o.value = y.filter((g) => !(g.title === "__chrome_mcp_warmup__" || g.parentID || g.time?.archived)).map((g) => ({
|
|
6496
6496
|
...g,
|
|
6497
6497
|
updatedAt: g.time?.updated || Date.now()
|
|
6498
6498
|
})), o.value.length || f(), s.value = o.value[0]?.id || null;
|
|
6499
|
-
} catch (
|
|
6500
|
-
Xh.error("Failed to load sessions:", { error:
|
|
6499
|
+
} catch (y) {
|
|
6500
|
+
Xh.error("Failed to load sessions:", { error: y });
|
|
6501
6501
|
} finally {
|
|
6502
6502
|
r.value = !1;
|
|
6503
6503
|
}
|
|
6504
|
-
}, u = (
|
|
6505
|
-
const g = o.value.findIndex((
|
|
6504
|
+
}, u = (y) => {
|
|
6505
|
+
const g = o.value.findIndex((b) => b.id === y.id);
|
|
6506
6506
|
if (g === -1) return;
|
|
6507
|
-
const
|
|
6508
|
-
|
|
6509
|
-
...
|
|
6510
|
-
title:
|
|
6511
|
-
updatedAt:
|
|
6507
|
+
const O = o.value[g];
|
|
6508
|
+
y.title && y.title !== O.title && (o.value[g] = {
|
|
6509
|
+
...O,
|
|
6510
|
+
title: y.title,
|
|
6511
|
+
updatedAt: y.time?.updated || Date.now()
|
|
6512
6512
|
});
|
|
6513
6513
|
}, f = async () => {
|
|
6514
6514
|
try {
|
|
6515
|
-
const
|
|
6515
|
+
const y = await (await fetch(i(Ki), { method: "POST" })).json();
|
|
6516
6516
|
o.value.unshift({
|
|
6517
|
-
id:
|
|
6517
|
+
id: y.id,
|
|
6518
6518
|
title: "新会话",
|
|
6519
6519
|
updatedAt: Date.now(),
|
|
6520
|
-
url:
|
|
6521
|
-
}), s.value =
|
|
6520
|
+
url: y.url
|
|
6521
|
+
}), s.value = y.id, l.value = !0;
|
|
6522
6522
|
} catch {
|
|
6523
6523
|
t("创建会话失败");
|
|
6524
6524
|
}
|
|
@@ -6531,9 +6531,9 @@ function Jh(e) {
|
|
|
6531
6531
|
iframeLoading: l,
|
|
6532
6532
|
loadSessions: c,
|
|
6533
6533
|
createSession: f,
|
|
6534
|
-
deleteSession: async (
|
|
6534
|
+
deleteSession: async (y) => {
|
|
6535
6535
|
try {
|
|
6536
|
-
if (await fetch(i(`${Ki}?id=${
|
|
6536
|
+
if (await fetch(i(`${Ki}?id=${y.id}`), { method: "DELETE" }), await c(), t("会话已删除"), s.value === y.id) if (o.value.length > 0) {
|
|
6537
6537
|
const g = o.value[0];
|
|
6538
6538
|
s.value = g.id, l.value = !0;
|
|
6539
6539
|
} else s.value = null;
|
|
@@ -6541,8 +6541,8 @@ function Jh(e) {
|
|
|
6541
6541
|
t("删除会话失败");
|
|
6542
6542
|
}
|
|
6543
6543
|
},
|
|
6544
|
-
selectSession: (
|
|
6545
|
-
s.value !==
|
|
6544
|
+
selectSession: (y) => {
|
|
6545
|
+
s.value !== y.id && (s.value = y.id, l.value = !0);
|
|
6546
6546
|
},
|
|
6547
6547
|
updateSessionInfo: u
|
|
6548
6548
|
};
|
|
@@ -6620,8 +6620,8 @@ function tp(e, t, n = "") {
|
|
|
6620
6620
|
});
|
|
6621
6621
|
}, l = (p = !1) => {
|
|
6622
6622
|
if (e.value === "idle") return;
|
|
6623
|
-
const v = window.location.href,
|
|
6624
|
-
(p || v !== i ||
|
|
6623
|
+
const v = window.location.href, y = document.title;
|
|
6624
|
+
(p || v !== i || y !== o) && (i = v, o = y, s(v, y));
|
|
6625
6625
|
}, a = () => {
|
|
6626
6626
|
requestAnimationFrame(() => l());
|
|
6627
6627
|
};
|
|
@@ -6644,13 +6644,13 @@ function tp(e, t, n = "") {
|
|
|
6644
6644
|
}
|
|
6645
6645
|
function np(e, t, n = "", i = "") {
|
|
6646
6646
|
let o = "", r = "", s, l;
|
|
6647
|
-
const a = /* @__PURE__ */ L(""), c = /* @__PURE__ */ L(""), u = Bt("ExtCtx"), f = (g) => n ? `${n}${g}` : g, p = (g,
|
|
6647
|
+
const a = /* @__PURE__ */ L(""), c = /* @__PURE__ */ L(""), u = Bt("ExtCtx"), f = (g) => n ? `${n}${g}` : g, p = (g, O) => {
|
|
6648
6648
|
u.debug(`sendContext: tabId=${s} tabIndex=${l} url=${g}`), fetch(f(Ws), {
|
|
6649
6649
|
method: "POST",
|
|
6650
6650
|
headers: { "Content-Type": "application/json" },
|
|
6651
6651
|
body: JSON.stringify({
|
|
6652
6652
|
url: g,
|
|
6653
|
-
title:
|
|
6653
|
+
title: O,
|
|
6654
6654
|
...s !== void 0 ? { tabId: s } : {},
|
|
6655
6655
|
...l !== void 0 ? { tabIndex: l } : {},
|
|
6656
6656
|
selectedElements: t.value
|
|
@@ -6659,9 +6659,9 @@ function np(e, t, n = "", i = "") {
|
|
|
6659
6659
|
});
|
|
6660
6660
|
}, v = (g = !1) => {
|
|
6661
6661
|
if (e.value === "idle") return;
|
|
6662
|
-
const
|
|
6663
|
-
!
|
|
6664
|
-
},
|
|
6662
|
+
const O = a.value, b = c.value;
|
|
6663
|
+
!O && !b || (g || O !== o || b !== r) && (o = O, r = b, p(O, b));
|
|
6664
|
+
}, y = (g) => {
|
|
6665
6665
|
if (!(g.serviceInstanceId && g.serviceInstanceId !== i)) {
|
|
6666
6666
|
if (g.type === Nt.TAB_SWITCHED) {
|
|
6667
6667
|
s = g.tabId;
|
|
@@ -6674,7 +6674,7 @@ function np(e, t, n = "", i = "") {
|
|
|
6674
6674
|
}
|
|
6675
6675
|
};
|
|
6676
6676
|
return Xe(async () => {
|
|
6677
|
-
chrome.runtime.onMessage.addListener(
|
|
6677
|
+
chrome.runtime.onMessage.addListener(y);
|
|
6678
6678
|
try {
|
|
6679
6679
|
const g = await chrome.tabs.query({
|
|
6680
6680
|
active: !0,
|
|
@@ -6686,7 +6686,7 @@ function np(e, t, n = "", i = "") {
|
|
|
6686
6686
|
u.debug(`onMounted 查询 Tab 失败: ${g}`);
|
|
6687
6687
|
}
|
|
6688
6688
|
}), Ke(() => {
|
|
6689
|
-
chrome.runtime.onMessage.removeListener(
|
|
6689
|
+
chrome.runtime.onMessage.removeListener(y);
|
|
6690
6690
|
}), { updateContext: v };
|
|
6691
6691
|
}
|
|
6692
6692
|
function ip(e) {
|
|
@@ -6778,7 +6778,7 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6778
6778
|
__name: "LoadingContent",
|
|
6779
6779
|
props: { loadingText: {} },
|
|
6780
6780
|
setup(e) {
|
|
6781
|
-
return (t, n) => ($(),
|
|
6781
|
+
return (t, n) => ($(), V("div", rp, [n[0] || (n[0] = _("div", { class: "opencode-loading-spinner" }, null, -1)), _("div", sp, Ce(e.loadingText), 1)]));
|
|
6782
6782
|
}
|
|
6783
6783
|
}), ap = lp, cp = { class: "opencode-chrome-warmup-failed" }, up = { class: "opencode-chrome-warmup-failed-text" }, dp = {
|
|
6784
6784
|
key: 0,
|
|
@@ -6821,7 +6821,7 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6821
6821
|
}), a = q(() => {
|
|
6822
6822
|
if (!o.value || !n.models) return n.models?.[0] || null;
|
|
6823
6823
|
const [p, v] = o.value.split(":");
|
|
6824
|
-
return n.models.find((
|
|
6824
|
+
return n.models.find((y) => y.providerID === p && y.modelID === v) || null;
|
|
6825
6825
|
}), c = (p) => ({
|
|
6826
6826
|
anthropic: "Anthropic",
|
|
6827
6827
|
openai: "OpenAI",
|
|
@@ -6835,8 +6835,8 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6835
6835
|
modelID: a.value.modelID
|
|
6836
6836
|
}) : i("retry");
|
|
6837
6837
|
};
|
|
6838
|
-
return (p, v) => ($(),
|
|
6839
|
-
v[11] || (v[11] =
|
|
6838
|
+
return (p, v) => ($(), V("div", cp, [
|
|
6839
|
+
v[11] || (v[11] = _("div", { class: "opencode-chrome-warmup-failed-icon" }, [_("svg", {
|
|
6840
6840
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6841
6841
|
fill: "none",
|
|
6842
6842
|
viewBox: "0 0 24 24",
|
|
@@ -6844,58 +6844,58 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6844
6844
|
height: "48",
|
|
6845
6845
|
stroke: "currentColor",
|
|
6846
6846
|
"stroke-width": "1.5"
|
|
6847
|
-
}, [
|
|
6847
|
+
}, [_("path", {
|
|
6848
6848
|
"stroke-linecap": "round",
|
|
6849
6849
|
"stroke-linejoin": "round",
|
|
6850
6850
|
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"
|
|
6851
6851
|
})])], -1)),
|
|
6852
|
-
e.errorType === _e(Zt).CHROME_NOT_CONNECTED ? ($(),
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
])], -1))], 64)) : e.errorType === _e(Zt).AI_TIMEOUT ? ($(),
|
|
6858
|
-
v[4] || (v[4] =
|
|
6859
|
-
v[5] || (v[5] =
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6852
|
+
e.errorType === _e(Zt).CHROME_NOT_CONNECTED ? ($(), V(ve, { 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" }, [
|
|
6853
|
+
_("div", null, [Co(" 在 Chrome 地址栏输入 "), _("code", { class: "opencode-chrome-warmup-code" }, "chrome://inspect/#remote-debugging")]),
|
|
6854
|
+
_("div", null, "勾选 'Allow remote debugging for this browser instance' 选项"),
|
|
6855
|
+
_("div", null, "重新启动浏览器"),
|
|
6856
|
+
_("div", null, "完成后点击下方按钮重试")
|
|
6857
|
+
])], -1))], 64)) : e.errorType === _e(Zt).AI_TIMEOUT ? ($(), V(ve, { key: 1 }, [v[6] || (v[6] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应超时", -1)), _("div", up, [
|
|
6858
|
+
v[4] || (v[4] = _("p", null, "AI 模型响应超时,可能的原因:", -1)),
|
|
6859
|
+
v[5] || (v[5] = _("div", { class: "opencode-chrome-warmup-steps" }, [
|
|
6860
|
+
_("div", null, "当前选择的 AI 模型服务不可用或响应缓慢"),
|
|
6861
|
+
_("div", null, "网络连接问题"),
|
|
6862
|
+
_("div", null, "模型配置不正确")
|
|
6863
6863
|
], -1)),
|
|
6864
|
-
s.value ? ($(),
|
|
6865
|
-
])], 64)) : e.errorType === _e(Zt).AI_RESPONSE_ERROR ? ($(),
|
|
6866
|
-
v[7] || (v[7] =
|
|
6867
|
-
|
|
6868
|
-
s.value ? ($(),
|
|
6869
|
-
])], 64)) : ($(),
|
|
6870
|
-
r.value && s.value ? ($(),
|
|
6871
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
6864
|
+
s.value ? ($(), V("p", dp, "可选择其他模型重试:")) : ce("", !0)
|
|
6865
|
+
])], 64)) : e.errorType === _e(Zt).AI_RESPONSE_ERROR ? ($(), V(ve, { key: 2 }, [v[8] || (v[8] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应错误", -1)), _("div", fp, [
|
|
6866
|
+
v[7] || (v[7] = _("p", null, "AI 模型返回了意外的响应:", -1)),
|
|
6867
|
+
_("div", hp, Ce(e.errorMessage || "未知错误"), 1),
|
|
6868
|
+
s.value ? ($(), V("p", pp, "可选择其他模型重试:")) : ce("", !0)
|
|
6869
|
+
])], 64)) : ($(), V(ve, { key: 3 }, [v[9] || (v[9] = _("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)), _("div", vp, [e.errorMessage ? ($(), V("p", gp, Ce(e.errorMessage), 1)) : ($(), V("p", mp, "连接失败,请重试")), s.value ? ($(), V("p", _p, "可选择模型重试:")) : ce("", !0)])], 64)),
|
|
6870
|
+
r.value && s.value ? ($(), V("div", yp, [_("div", bp, [no(_("select", {
|
|
6871
|
+
"onUpdate:modelValue": v[0] || (v[0] = (y) => o.value = y),
|
|
6872
6872
|
class: "native-select",
|
|
6873
6873
|
disabled: e.retrying
|
|
6874
|
-
}, [($(!0),
|
|
6874
|
+
}, [($(!0), V(ve, null, Bn(l.value, (y, g) => ($(), V("optgroup", {
|
|
6875
6875
|
key: g,
|
|
6876
6876
|
label: c(g)
|
|
6877
|
-
}, [($(!0),
|
|
6878
|
-
key: u(
|
|
6879
|
-
value: u(
|
|
6880
|
-
}, Ce(
|
|
6877
|
+
}, [($(!0), V(ve, null, Bn(y, (O) => ($(), V("option", {
|
|
6878
|
+
key: u(O),
|
|
6879
|
+
value: u(O)
|
|
6880
|
+
}, Ce(O.name || O.modelID), 9, wp))), 128))], 8, Ep))), 128))], 8, Sp), [[Ic, o.value]]), v[10] || (v[10] = _("span", { class: "select-arrow" }, [_("svg", {
|
|
6881
6881
|
viewBox: "0 0 24 24",
|
|
6882
6882
|
width: "16",
|
|
6883
6883
|
height: "16",
|
|
6884
6884
|
fill: "none",
|
|
6885
6885
|
stroke: "currentColor",
|
|
6886
6886
|
"stroke-width": "2"
|
|
6887
|
-
}, [
|
|
6887
|
+
}, [_("path", {
|
|
6888
6888
|
d: "M6 9l6 6 6-6",
|
|
6889
6889
|
"stroke-linecap": "round",
|
|
6890
6890
|
"stroke-linejoin": "round"
|
|
6891
|
-
})])], -1))]),
|
|
6891
|
+
})])], -1))]), _("button", {
|
|
6892
6892
|
class: "retry-btn",
|
|
6893
6893
|
disabled: e.retrying,
|
|
6894
6894
|
onClick: f
|
|
6895
|
-
}, Ce(e.retrying ? "连接中..." : "重试连接"), 9, Tp)])) : ($(),
|
|
6895
|
+
}, Ce(e.retrying ? "连接中..." : "重试连接"), 9, Tp)])) : ($(), V("div", Cp, [_("button", {
|
|
6896
6896
|
class: "opencode-chrome-warmup-failed-btn primary",
|
|
6897
6897
|
disabled: e.retrying,
|
|
6898
|
-
onClick: v[1] || (v[1] = (
|
|
6898
|
+
onClick: v[1] || (v[1] = (y) => f())
|
|
6899
6899
|
}, Ce(e.retrying ? "连接中..." : "重试连接"), 9, xp)]))
|
|
6900
6900
|
]));
|
|
6901
6901
|
}
|
|
@@ -6907,45 +6907,45 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6907
6907
|
__name: "App",
|
|
6908
6908
|
props: { config: {} },
|
|
6909
6909
|
setup(e) {
|
|
6910
|
-
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:
|
|
6910
|
+
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: O = "", serviceInstanceId: b = "" } = t.config, P = Bt("OpenCode"), F = Bt("App"), S = c, H = /* @__PURE__ */ L(g?.width ?? 500), U = y === "extension", N = y === "extension-selector", j = q(() => O ? `http://127.0.0.1:${O}` : ""), B = (M) => j.value ? `${j.value}${M}` : M, Y = {
|
|
6911
6911
|
onSelectModeChange: null,
|
|
6912
6912
|
broadcastTheme: null,
|
|
6913
6913
|
notifySelectionResult: null,
|
|
6914
6914
|
notifySelectModeChange: null
|
|
6915
|
-
}, le = q(() => `http://${v}:${p}`), fe = (
|
|
6916
|
-
s.value?.showNotification?.(
|
|
6915
|
+
}, le = q(() => `http://${v}:${p}`), fe = (M, ie) => {
|
|
6916
|
+
s.value?.showNotification?.(M, {
|
|
6917
6917
|
...ie,
|
|
6918
6918
|
mode: U ? "widget" : ie?.mode
|
|
6919
6919
|
});
|
|
6920
|
-
}, { serviceStatus: I, currentTask: X, chromeMcpFailed: Q, chromeMcpErrorType: G, chromeMcpErrorMessage: ee, loadingText: Le, updateStatusFromTask: Je, setStarting: De } = ep(), { selectedElements: $e, removeElement: Fe, clearElements: ct } = Qh(
|
|
6920
|
+
}, { serviceStatus: I, currentTask: X, chromeMcpFailed: Q, chromeMcpErrorType: G, chromeMcpErrorMessage: ee, loadingText: Le, updateStatusFromTask: Je, setStarting: De } = ep(), { selectedElements: $e, removeElement: Fe, clearElements: ct } = Qh(b), { theme: ut, sendThemeToIframe: mt } = Zh(S, s), { sessions: Ze, loadingSessionList: st, currentSessionId: Re, iframeSrc: He, iframeLoading: me, loadSessions: Qe, createSession: lt, deleteSession: d, selectSession: h, updateSessionInfo: m } = Jh({
|
|
6921
6921
|
showNotification: fe,
|
|
6922
|
-
viteBaseUrl:
|
|
6923
|
-
}), { updateContext: T } = U ? np(I, $e,
|
|
6924
|
-
viteBaseUrl:
|
|
6925
|
-
onStatusSync: (
|
|
6926
|
-
if (F.debug(`SSE STATUS_SYNC: ${JSON.stringify(
|
|
6927
|
-
F.debug(`SSE 重连后服务仍在启动中(${
|
|
6922
|
+
viteBaseUrl: j.value
|
|
6923
|
+
}), { updateContext: T } = U ? np(I, $e, j.value, b) : tp(I, $e, j.value), E = Kh({
|
|
6924
|
+
viteBaseUrl: j.value,
|
|
6925
|
+
onStatusSync: (M) => {
|
|
6926
|
+
if (F.debug(`SSE STATUS_SYNC: ${JSON.stringify(M)} currentStatus: ${I.value}`), k && 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") {
|
|
6927
|
+
F.debug(`SSE 重连后服务仍在启动中(${M.task}),重置 status 为 starting`), X.value = M.task, I.value = "starting", k = !1;
|
|
6928
6928
|
return;
|
|
6929
6929
|
}
|
|
6930
|
-
|
|
6930
|
+
k = !1, M.isStarted !== void 0 && M.isStarted && I.value === "idle" && De(), M.task && Je(M.task, M.errorType, M.errorMessage);
|
|
6931
6931
|
},
|
|
6932
|
-
onTaskUpdate: (
|
|
6933
|
-
F.debug(`SSE TASK_UPDATE: ${JSON.stringify(
|
|
6932
|
+
onTaskUpdate: (M) => {
|
|
6933
|
+
F.debug(`SSE TASK_UPDATE: ${JSON.stringify(M)} currentStatus: ${I.value}`), Je(M.task, M.errorType, M.errorMessage);
|
|
6934
6934
|
},
|
|
6935
6935
|
onClearElements: () => ct(),
|
|
6936
6936
|
onConnected: () => T(!0)
|
|
6937
6937
|
});
|
|
6938
|
-
let w = !1,
|
|
6939
|
-
Me(E.isConnected, (
|
|
6940
|
-
!
|
|
6938
|
+
let w = !1, k = !1;
|
|
6939
|
+
Me(E.isConnected, (M, ie) => {
|
|
6940
|
+
!M && ie && b ? (w = !0, F.debug(`SSE 断开,通知服务下线: ${b}`), chrome.runtime.sendMessage({
|
|
6941
6941
|
type: Nt.SERVICE_GONE,
|
|
6942
|
-
serviceInstanceId:
|
|
6942
|
+
serviceInstanceId: b
|
|
6943
6943
|
}).catch(() => {
|
|
6944
|
-
})) :
|
|
6944
|
+
})) : M && !ie && w && b && (w = !1, k = !0, F.debug(`SSE 重连,通知服务上线: ${b}`), chrome.runtime.sendMessage({
|
|
6945
6945
|
type: Nt.SERVICE_APPEARED,
|
|
6946
6946
|
proxyPort: p,
|
|
6947
|
-
vitePort:
|
|
6948
|
-
serviceInstanceId:
|
|
6947
|
+
vitePort: O,
|
|
6948
|
+
serviceInstanceId: b
|
|
6949
6949
|
}).catch(() => {
|
|
6950
6950
|
}));
|
|
6951
6951
|
});
|
|
@@ -6953,46 +6953,46 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
6953
6953
|
proxyBaseUrl: le.value,
|
|
6954
6954
|
currentSessionId: Re,
|
|
6955
6955
|
onConnected: () => {
|
|
6956
|
-
|
|
6956
|
+
P.debug("Session SSE connected");
|
|
6957
6957
|
},
|
|
6958
|
-
onSessionUpdate: (
|
|
6959
|
-
m(
|
|
6958
|
+
onSessionUpdate: (M) => {
|
|
6959
|
+
m(M);
|
|
6960
6960
|
}
|
|
6961
|
-
}), R = A.hasAnyThinking, C = A.sessionStates, z = q(() => I.value === "starting"), D = q(() => I.value === "starting" || me.value),
|
|
6961
|
+
}), R = A.hasAnyThinking, C = A.sessionStates, z = q(() => I.value === "starting"), D = q(() => I.value === "starting" || me.value), W = q(() => I.value === "starting" ? Le.value : "加载会话..."), K = async (M) => {
|
|
6962
6962
|
l.value = !0;
|
|
6963
6963
|
try {
|
|
6964
|
-
const ie = await (await fetch(
|
|
6964
|
+
const ie = await (await fetch(B(dr), {
|
|
6965
6965
|
method: "POST",
|
|
6966
6966
|
headers: { "Content-Type": "application/json" },
|
|
6967
|
-
body:
|
|
6967
|
+
body: M ? JSON.stringify(M) : ""
|
|
6968
6968
|
})).json();
|
|
6969
6969
|
ie.success ? (Q.value = !1, G.value = void 0, ee.value = void 0, I.value = "ready", fe("Chrome DevTools MCP 连接成功")) : (G.value = ie.errorType, ee.value = ie.error, ie.errorType === "AI_TIMEOUT" ? fe("AI 响应超时,请检查 OpenCode AI 模型配置") : ie.errorType === "AI_RESPONSE_ERROR" ? fe("AI 响应错误,请检查 OpenCode AI 模型配置") : ie.errorType === "CHROME_NOT_CONNECTED" ? fe("Chrome 远程调试未开启,请按照提示操作") : fe(ie.error || "重试失败,请确认 Chrome 远程调试已开启"));
|
|
6970
6970
|
} catch (ie) {
|
|
6971
|
-
|
|
6971
|
+
P.error("Retry warmup failed:", { error: ie }), fe("重试失败,请稍后再试");
|
|
6972
6972
|
} finally {
|
|
6973
6973
|
l.value = !1;
|
|
6974
6974
|
}
|
|
6975
6975
|
}, Z = async () => {
|
|
6976
6976
|
try {
|
|
6977
|
-
const
|
|
6978
|
-
|
|
6979
|
-
} catch (
|
|
6980
|
-
|
|
6977
|
+
const M = await (await fetch(B(dr), { method: "GET" })).json();
|
|
6978
|
+
M.success && M.models && (a.value = M.models);
|
|
6979
|
+
} catch (M) {
|
|
6980
|
+
P.error("Failed to fetch available models:", { error: M }), a.value = [];
|
|
6981
6981
|
}
|
|
6982
6982
|
}, re = async () => {
|
|
6983
6983
|
if (I.value !== "idle") return !0;
|
|
6984
6984
|
try {
|
|
6985
|
-
const
|
|
6985
|
+
const M = await (await fetch(B(Uc))).json();
|
|
6986
6986
|
if (I.value !== "idle")
|
|
6987
6987
|
return F.debug(`[ensureServicesStarted] fetch 完成但 serviceStatus 已变为 ${I.value},跳过启动`), !0;
|
|
6988
|
-
if (
|
|
6988
|
+
if (M.success)
|
|
6989
6989
|
return De(), E.connect(), !0;
|
|
6990
6990
|
} catch {
|
|
6991
6991
|
}
|
|
6992
6992
|
return !1;
|
|
6993
6993
|
};
|
|
6994
|
-
Mr(f, (
|
|
6995
|
-
|
|
6994
|
+
Mr(f, (M) => {
|
|
6995
|
+
M.preventDefault(), Be(!n.value);
|
|
6996
6996
|
});
|
|
6997
6997
|
const ne = () => {
|
|
6998
6998
|
if (U) {
|
|
@@ -7001,27 +7001,27 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
7001
7001
|
}
|
|
7002
7002
|
window.__VUE_INSPECTOR__ ? dt(!i.value) : fe("Vue Inspector 未加载,无法使用元素选择功能");
|
|
7003
7003
|
};
|
|
7004
|
-
U || Mr("ctrl+p", (
|
|
7005
|
-
|
|
7006
|
-
}), Me(I, (
|
|
7007
|
-
|
|
7008
|
-
}), Me(Q, (
|
|
7009
|
-
|
|
7004
|
+
U || Mr("ctrl+p", (M) => {
|
|
7005
|
+
M.preventDefault(), ne();
|
|
7006
|
+
}), Me(I, (M, ie) => {
|
|
7007
|
+
M !== "idle" && ie === "idle" && (E.connect(), A.connect()), M === "ready" && ie !== "ready" && (F.debug("服务就绪,加载会话列表"), Qe());
|
|
7008
|
+
}), Me(Q, (M) => {
|
|
7009
|
+
M && Z();
|
|
7010
7010
|
});
|
|
7011
|
-
const he = (
|
|
7012
|
-
|
|
7011
|
+
const he = (M) => {
|
|
7012
|
+
M.data?.type === be.READY && mt(), M.data?.type === be.KEYDOWN && (M.data.key === "Escape" && i.value && dt(!1), M.data.ctrlKey && M.data.key.toLowerCase() === "p" && ne());
|
|
7013
7013
|
}, ae = () => {
|
|
7014
7014
|
i.value && Y.onSelectModeChange?.(!1);
|
|
7015
7015
|
};
|
|
7016
7016
|
Xe(() => {
|
|
7017
|
-
F.debug(`onMounted, sid=${
|
|
7017
|
+
F.debug(`onMounted, sid=${b}, serviceStatus=${I.value}, config: ${JSON.stringify(t.config)}`), I.value === "ready" ? (F.debug("onMounted: ready 分支,直接加载会话"), Qe(), E.connect(), A.connect(), T(!0)) : I.value === "idle" && (U ? (F.debug("onMounted: idle 分支(扩展模式),先 setStarting 显示蒙层"), De(), E.connect()) : (F.debug("onMounted: idle 分支(非扩展模式),直接加载会话"), Qe(), E.connect())), u && I.value === "ready" && setTimeout(() => {
|
|
7018
7018
|
n.value = !0;
|
|
7019
7019
|
}, 1e3), window.addEventListener("message", he), document.addEventListener("visibilitychange", ae), window.addEventListener("pagehide", ae);
|
|
7020
7020
|
}), Ke(() => {
|
|
7021
7021
|
window.removeEventListener("message", he), document.removeEventListener("visibilitychange", ae), window.removeEventListener("pagehide", ae), ae();
|
|
7022
7022
|
});
|
|
7023
|
-
const Be = async (
|
|
7024
|
-
if (I.value === "idle" &&
|
|
7023
|
+
const Be = async (M) => {
|
|
7024
|
+
if (I.value === "idle" && M) {
|
|
7025
7025
|
r.value = !0;
|
|
7026
7026
|
const ie = await re();
|
|
7027
7027
|
if (r.value = !1, !ie) {
|
|
@@ -7029,53 +7029,53 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
7029
7029
|
return;
|
|
7030
7030
|
}
|
|
7031
7031
|
}
|
|
7032
|
-
n.value =
|
|
7033
|
-
}, Te = async (
|
|
7034
|
-
if (
|
|
7035
|
-
Y.notifySelectionResult?.(
|
|
7032
|
+
n.value = M, M && T(), M && (me.value = !1);
|
|
7033
|
+
}, Te = async (M, ie, Kn) => {
|
|
7034
|
+
if (N) {
|
|
7035
|
+
Y.notifySelectionResult?.(M), fe("元素已选中", { mode: "page" });
|
|
7036
7036
|
return;
|
|
7037
7037
|
}
|
|
7038
7038
|
const Gn = {
|
|
7039
|
-
...
|
|
7039
|
+
...M,
|
|
7040
7040
|
previewPageUrl: U && ie ? ie : window.location.href,
|
|
7041
7041
|
previewPageTitle: U && Kn ? Kn : document.title
|
|
7042
7042
|
};
|
|
7043
7043
|
s.value?.sendMessageToIframe(be.INSERT_FILE_PART, { element: Gn }), fe("节点已添加到对话框", { mode: "page" });
|
|
7044
7044
|
}, _t = () => {
|
|
7045
7045
|
ct(), T(!0), fe("已清除所有选中元素");
|
|
7046
|
-
}, dt = (
|
|
7047
|
-
if (i.value ===
|
|
7048
|
-
i.value =
|
|
7046
|
+
}, dt = (M) => {
|
|
7047
|
+
if (i.value === M) return;
|
|
7048
|
+
i.value = M, U && Y.onSelectModeChange?.(M), s.value?.sendMessageToIframe(be.SELECT_MODE_CHANGE, { selectMode: M });
|
|
7049
7049
|
const ie = s.value?.isSplitMode;
|
|
7050
|
-
|
|
7050
|
+
M && !ie && n.value && (n.value = !1), !M && !n.value && (n.value = !0), N && Y.notifySelectModeChange?.(M);
|
|
7051
7051
|
};
|
|
7052
7052
|
if (U) {
|
|
7053
|
-
const
|
|
7053
|
+
const M = ip({
|
|
7054
7054
|
selectMode: i,
|
|
7055
|
-
serviceInstanceId:
|
|
7055
|
+
serviceInstanceId: b,
|
|
7056
7056
|
onElementSelected: Te,
|
|
7057
7057
|
onThemeChange: (ie) => {
|
|
7058
7058
|
ut.value = ie, mt();
|
|
7059
7059
|
}
|
|
7060
7060
|
});
|
|
7061
|
-
Y.onSelectModeChange =
|
|
7061
|
+
Y.onSelectModeChange = M.onSelectModeChange, Y.broadcastTheme = M.broadcastTheme;
|
|
7062
7062
|
}
|
|
7063
|
-
if (
|
|
7064
|
-
const
|
|
7065
|
-
Y.notifySelectionResult =
|
|
7063
|
+
if (N) {
|
|
7064
|
+
const M = op({ onSelectModeChange: dt });
|
|
7065
|
+
Y.notifySelectionResult = M.notifySelectionResult, Y.notifySelectModeChange = M.notifySelectModeChange;
|
|
7066
7066
|
}
|
|
7067
|
-
const Ie = (
|
|
7068
|
-
o.value =
|
|
7069
|
-
}, je = (
|
|
7070
|
-
ut.value =
|
|
7071
|
-
}, et = (
|
|
7072
|
-
|
|
7073
|
-
}, Ge = ({ index:
|
|
7074
|
-
Fe(
|
|
7067
|
+
const Ie = (M) => {
|
|
7068
|
+
o.value = M;
|
|
7069
|
+
}, je = (M) => {
|
|
7070
|
+
ut.value = M, U && Y.broadcastTheme?.(M);
|
|
7071
|
+
}, et = (M) => {
|
|
7072
|
+
H.value = M;
|
|
7073
|
+
}, Ge = ({ index: M }) => {
|
|
7074
|
+
Fe(M), T(!0);
|
|
7075
7075
|
}, mn = () => {
|
|
7076
7076
|
me.value = !1;
|
|
7077
7077
|
};
|
|
7078
|
-
return (
|
|
7078
|
+
return (M, ie) => ($(), xt(_e(Wh), {
|
|
7079
7079
|
ref_key: "widgetRef",
|
|
7080
7080
|
ref: s,
|
|
7081
7081
|
theme: _e(ut),
|
|
@@ -7093,9 +7093,9 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
7093
7093
|
"session-key": "id",
|
|
7094
7094
|
"hotkey-label": _e(f),
|
|
7095
7095
|
thinking: _e(R),
|
|
7096
|
-
"display-mode": _e(
|
|
7096
|
+
"display-mode": _e(y),
|
|
7097
7097
|
"split-mode": _e(g),
|
|
7098
|
-
"split-panel-width":
|
|
7098
|
+
"split-panel-width": H.value,
|
|
7099
7099
|
"onUpdate:open": Be,
|
|
7100
7100
|
"onUpdate:selectMode": dt,
|
|
7101
7101
|
"onUpdate:sessionListCollapsed": Ie,
|
|
@@ -7111,7 +7111,7 @@ var rp = { class: "opencode-custom-loading" }, sp = { class: "opencode-loading-t
|
|
|
7111
7111
|
onEmptyAction: _e(lt),
|
|
7112
7112
|
onFrameLoaded: mn
|
|
7113
7113
|
}, {
|
|
7114
|
-
loading: Se(() => [Oe(ap, { "loading-text":
|
|
7114
|
+
loading: Se(() => [Oe(ap, { "loading-text": W.value }, null, 8, ["loading-text"])]),
|
|
7115
7115
|
error: Se(() => [_e(Q) ? ($(), xt(Mp, {
|
|
7116
7116
|
key: 0,
|
|
7117
7117
|
retrying: l.value,
|