vite-plugin-opencode-assistant 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/client/App.vue.js +7 -12
- package/es/core/proxy-server.js +1 -1
- package/es/core/service.d.ts +1 -1
- package/es/core/service.js +6 -4
- package/es/endpoints/index.d.ts +2 -0
- package/es/endpoints/index.js +3 -0
- package/es/endpoints/logs.d.ts +11 -0
- package/es/endpoints/logs.js +107 -0
- package/es/index.js +8 -4
- package/lib/client/App.vue.js +7 -12
- package/lib/client.js +205 -209
- package/lib/core/proxy-server.js +1 -1
- package/lib/core/service.d.ts +1 -1
- package/lib/core/service.js +6 -4
- package/lib/endpoints/index.d.ts +2 -0
- package/lib/endpoints/index.js +4 -0
- package/lib/endpoints/logs.d.ts +11 -0
- package/lib/endpoints/logs.js +129 -0
- package/lib/index.js +5 -2
- package/package.json +4 -4
package/lib/client.js
CHANGED
|
@@ -1056,15 +1056,15 @@ function ur(e, t = !1, n = Pt) {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
function fr(e, t, n = ce) {
|
|
1059
|
-
const { immediate: s, deep: o, once: i, scheduler: l, augmentJob: r, call: a } = n, u = (
|
|
1059
|
+
const { immediate: s, deep: o, once: i, scheduler: l, augmentJob: r, call: a } = n, u = (y) => o ? y : /* @__PURE__ */ je(y) || o === !1 || o === 0 ? _t(y, 1) : _t(y);
|
|
1060
1060
|
let c, d, p, _, x = !1, S = !1;
|
|
1061
|
-
if (/* @__PURE__ */ Te(e) ? (d = () => e.value, x = /* @__PURE__ */ je(e)) : /* @__PURE__ */ Ft(e) ? (d = () => u(e), x = !0) : U(e) ? (S = !0, x = e.some((
|
|
1062
|
-
if (/* @__PURE__ */ Te(
|
|
1063
|
-
return
|
|
1064
|
-
if (/* @__PURE__ */ Ft(
|
|
1065
|
-
return u(
|
|
1066
|
-
if (ne(
|
|
1067
|
-
return a ? a(
|
|
1061
|
+
if (/* @__PURE__ */ Te(e) ? (d = () => e.value, x = /* @__PURE__ */ je(e)) : /* @__PURE__ */ Ft(e) ? (d = () => u(e), x = !0) : U(e) ? (S = !0, x = e.some((y) => /* @__PURE__ */ Ft(y) || /* @__PURE__ */ je(y)), d = () => e.map((y) => {
|
|
1062
|
+
if (/* @__PURE__ */ Te(y))
|
|
1063
|
+
return y.value;
|
|
1064
|
+
if (/* @__PURE__ */ Ft(y))
|
|
1065
|
+
return u(y);
|
|
1066
|
+
if (ne(y))
|
|
1067
|
+
return a ? a(y, 2) : y();
|
|
1068
1068
|
})) : ne(e) ? t ? d = a ? () => a(e, 2) : e : d = () => {
|
|
1069
1069
|
if (p) {
|
|
1070
1070
|
Ct();
|
|
@@ -1074,29 +1074,29 @@ function fr(e, t, n = ce) {
|
|
|
1074
1074
|
xt();
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
const
|
|
1077
|
+
const y = Pt;
|
|
1078
1078
|
Pt = c;
|
|
1079
1079
|
try {
|
|
1080
1080
|
return a ? a(e, 3, [_]) : e(_);
|
|
1081
1081
|
} finally {
|
|
1082
|
-
Pt =
|
|
1082
|
+
Pt = y;
|
|
1083
1083
|
}
|
|
1084
1084
|
} : d = Et, t && o) {
|
|
1085
|
-
const
|
|
1086
|
-
d = () => _t(
|
|
1085
|
+
const y = d, B = o === !0 ? 1 / 0 : o;
|
|
1086
|
+
d = () => _t(y(), B);
|
|
1087
1087
|
}
|
|
1088
1088
|
const D = Nl(), L = () => {
|
|
1089
1089
|
c.stop(), D && D.active && jo(D.effects, c);
|
|
1090
1090
|
};
|
|
1091
1091
|
if (i && t) {
|
|
1092
|
-
const
|
|
1092
|
+
const y = t;
|
|
1093
1093
|
t = (...B) => {
|
|
1094
|
-
|
|
1094
|
+
y(...B), L();
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
1097
|
let C = S ? new Array(e.length).fill(En) : En;
|
|
1098
|
-
const $ = (
|
|
1099
|
-
if (!(!(c.flags & 1) || !c.dirty && !
|
|
1098
|
+
const $ = (y) => {
|
|
1099
|
+
if (!(!(c.flags & 1) || !c.dirty && !y))
|
|
1100
1100
|
if (t) {
|
|
1101
1101
|
const B = c.run();
|
|
1102
1102
|
if (o || x || (S ? B.some((k, N) => ut(k, C[N])) : ut(B, C))) {
|
|
@@ -1121,13 +1121,13 @@ function fr(e, t, n = ce) {
|
|
|
1121
1121
|
} else
|
|
1122
1122
|
c.run();
|
|
1123
1123
|
};
|
|
1124
|
-
return r && r($), c = new Go(d), c.scheduler = l ? () => l($, !1) : $, _ = (
|
|
1125
|
-
const
|
|
1126
|
-
if (
|
|
1124
|
+
return r && r($), c = new Go(d), c.scheduler = l ? () => l($, !1) : $, _ = (y) => ur(y, !1, c), p = c.onStop = () => {
|
|
1125
|
+
const y = Dn.get(c);
|
|
1126
|
+
if (y) {
|
|
1127
1127
|
if (a)
|
|
1128
|
-
a(
|
|
1128
|
+
a(y, 4);
|
|
1129
1129
|
else
|
|
1130
|
-
for (const B of
|
|
1130
|
+
for (const B of y) B();
|
|
1131
1131
|
Dn.delete(c);
|
|
1132
1132
|
}
|
|
1133
1133
|
}, t ? s ? $(!0) : C = c.run() : l ? l($.bind(null, !0), !0) : c.run(), L.pause = c.pause.bind(c), L.resume = c.resume.bind(c), L.stop = L, L;
|
|
@@ -1411,12 +1411,12 @@ const Dt = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ Symbol("_vte"), _
|
|
|
1411
1411
|
r,
|
|
1412
1412
|
a
|
|
1413
1413
|
);
|
|
1414
|
-
},
|
|
1414
|
+
}, y = (k = t) => {
|
|
1415
1415
|
const N = Nt(k.props), R = k.target = _s(k.props, x), Q = ys(R, k, S, _);
|
|
1416
1416
|
R && (l !== "svg" && to(R) ? l = "svg" : l !== "mathml" && no(R) && (l = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(R), N || ($(k, R, Q), on(k, !1)));
|
|
1417
1417
|
}, B = (k) => {
|
|
1418
1418
|
const N = () => {
|
|
1419
|
-
Dt.get(k) === N && (Dt.delete(k), Nt(k.props) && ($(k, n, k.anchor), on(k, !0)),
|
|
1419
|
+
Dt.get(k) === N && (Dt.delete(k), Nt(k.props) && ($(k, n, k.anchor), on(k, !0)), y(k));
|
|
1420
1420
|
};
|
|
1421
1421
|
Dt.set(k, N), Oe(N, i);
|
|
1422
1422
|
};
|
|
@@ -1426,7 +1426,7 @@ const Dt = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ Symbol("_vte"), _
|
|
|
1426
1426
|
B(t);
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
|
-
L && ($(t, n, N), on(t, !0)),
|
|
1429
|
+
L && ($(t, n, N), on(t, !0)), y();
|
|
1430
1430
|
} else {
|
|
1431
1431
|
t.el = e.el;
|
|
1432
1432
|
const k = t.anchor = e.anchor, N = Dt.get(e);
|
|
@@ -2001,11 +2001,11 @@ function io(e) {
|
|
|
2001
2001
|
let L, C;
|
|
2002
2002
|
try {
|
|
2003
2003
|
if (n.shapeFlag & 4) {
|
|
2004
|
-
const
|
|
2004
|
+
const y = o || s, B = y;
|
|
2005
2005
|
L = ct(
|
|
2006
2006
|
u.call(
|
|
2007
2007
|
B,
|
|
2008
|
-
|
|
2008
|
+
y,
|
|
2009
2009
|
c,
|
|
2010
2010
|
d,
|
|
2011
2011
|
_,
|
|
@@ -2014,24 +2014,24 @@ function io(e) {
|
|
|
2014
2014
|
)
|
|
2015
2015
|
), C = r;
|
|
2016
2016
|
} else {
|
|
2017
|
-
const
|
|
2017
|
+
const y = t;
|
|
2018
2018
|
L = ct(
|
|
2019
|
-
|
|
2019
|
+
y.length > 1 ? y(
|
|
2020
2020
|
d,
|
|
2021
2021
|
{ attrs: r, slots: l, emit: a }
|
|
2022
|
-
) :
|
|
2022
|
+
) : y(
|
|
2023
2023
|
d,
|
|
2024
2024
|
null
|
|
2025
2025
|
)
|
|
2026
2026
|
), C = t.props ? r : Lr(r);
|
|
2027
2027
|
}
|
|
2028
|
-
} catch (
|
|
2029
|
-
dn.length = 0, zn(
|
|
2028
|
+
} catch (y) {
|
|
2029
|
+
dn.length = 0, zn(y, e, 1), L = Se(St);
|
|
2030
2030
|
}
|
|
2031
2031
|
let $ = L;
|
|
2032
2032
|
if (C && S !== !1) {
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2033
|
+
const y = Object.keys(C), { shapeFlag: B } = $;
|
|
2034
|
+
y.length && B & 7 && (i && y.some(Hn) && (C = Fr(
|
|
2035
2035
|
C,
|
|
2036
2036
|
i
|
|
2037
2037
|
)), $ = zt($, C, !1, !0));
|
|
@@ -2418,7 +2418,7 @@ function zr(e, t) {
|
|
|
2418
2418
|
for (; f && f !== h; )
|
|
2419
2419
|
T = p(f), s(f, m, E), f = T;
|
|
2420
2420
|
s(h, m, E);
|
|
2421
|
-
},
|
|
2421
|
+
}, y = ({ el: f, anchor: h }) => {
|
|
2422
2422
|
let m;
|
|
2423
2423
|
for (; f && f !== h; )
|
|
2424
2424
|
m = p(f), o(f), f = m;
|
|
@@ -3066,7 +3066,7 @@ function zr(e, t) {
|
|
|
3066
3066
|
return;
|
|
3067
3067
|
}
|
|
3068
3068
|
if (h === fn) {
|
|
3069
|
-
|
|
3069
|
+
y(f);
|
|
3070
3070
|
return;
|
|
3071
3071
|
}
|
|
3072
3072
|
const w = () => {
|
|
@@ -3203,7 +3203,7 @@ function Ri(e) {
|
|
|
3203
3203
|
}
|
|
3204
3204
|
function z(e, t, n, s, o, i) {
|
|
3205
3205
|
return Ri(
|
|
3206
|
-
|
|
3206
|
+
b(
|
|
3207
3207
|
e,
|
|
3208
3208
|
t,
|
|
3209
3209
|
n,
|
|
@@ -3237,7 +3237,7 @@ const Li = ({ key: e }) => e ?? null, An = ({
|
|
|
3237
3237
|
ref_key: t,
|
|
3238
3238
|
ref_for: n
|
|
3239
3239
|
}) => (typeof e == "number" && (e = "" + e), e != null ? ye(e) || /* @__PURE__ */ Te(e) || ne(e) ? { i: Ce, r: e, k: t, f: !!n } : e : null);
|
|
3240
|
-
function
|
|
3240
|
+
function b(e, t = null, n = null, s = 0, o = null, i = e === fe ? 0 : 1, l = !1, r = !1) {
|
|
3241
3241
|
const a = {
|
|
3242
3242
|
__v_isVNode: !0,
|
|
3243
3243
|
__v_skip: !0,
|
|
@@ -3294,7 +3294,7 @@ function Zr(e, t = null, n = null, s = 0, o = null, i = !1) {
|
|
|
3294
3294
|
r && !ye(r) && (t.class = Me(r)), re(a) && (/* @__PURE__ */ qn(a) && !U(a) && (a = et({}, a)), t.style = Rt(a));
|
|
3295
3295
|
}
|
|
3296
3296
|
const l = ye(e) ? 1 : Ni(e) ? 128 : _r(e) ? 64 : re(e) ? 4 : ne(e) ? 2 : 0;
|
|
3297
|
-
return
|
|
3297
|
+
return b(
|
|
3298
3298
|
e,
|
|
3299
3299
|
t,
|
|
3300
3300
|
n,
|
|
@@ -4048,18 +4048,18 @@ const zi = /* @__PURE__ */ tt({
|
|
|
4048
4048
|
}), Va = { class: "opencode-iframe-container" }, Wa = { class: "opencode-empty-state-text" }, Ka = ["src"];
|
|
4049
4049
|
function Ua(e, t, n, s, o, i) {
|
|
4050
4050
|
return W(), z("div", Va, [
|
|
4051
|
-
|
|
4051
|
+
b(
|
|
4052
4052
|
"div",
|
|
4053
4053
|
{
|
|
4054
4054
|
class: Me(["opencode-empty-state-overlay", { visible: s.showEmptyState }])
|
|
4055
4055
|
},
|
|
4056
4056
|
[
|
|
4057
4057
|
he(e.$slots, "empty-state", {}, () => [
|
|
4058
|
-
t[1] || (t[1] =
|
|
4058
|
+
t[1] || (t[1] = b(
|
|
4059
4059
|
"div",
|
|
4060
4060
|
{ class: "opencode-empty-state-icon" },
|
|
4061
4061
|
[
|
|
4062
|
-
|
|
4062
|
+
b("svg", {
|
|
4063
4063
|
viewBox: "0 0 24 24",
|
|
4064
4064
|
width: "48",
|
|
4065
4065
|
height: "48",
|
|
@@ -4068,7 +4068,7 @@ function Ua(e, t, n, s, o, i) {
|
|
|
4068
4068
|
"stroke-width": "1.5",
|
|
4069
4069
|
"aria-hidden": "true"
|
|
4070
4070
|
}, [
|
|
4071
|
-
|
|
4071
|
+
b("path", {
|
|
4072
4072
|
"stroke-linecap": "round",
|
|
4073
4073
|
"stroke-linejoin": "round",
|
|
4074
4074
|
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"
|
|
@@ -4078,14 +4078,14 @@ function Ua(e, t, n, s, o, i) {
|
|
|
4078
4078
|
-1
|
|
4079
4079
|
/* CACHED */
|
|
4080
4080
|
)),
|
|
4081
|
-
|
|
4081
|
+
b(
|
|
4082
4082
|
"div",
|
|
4083
4083
|
Wa,
|
|
4084
4084
|
we(s.emptyStateText),
|
|
4085
4085
|
1
|
|
4086
4086
|
/* TEXT */
|
|
4087
4087
|
),
|
|
4088
|
-
|
|
4088
|
+
b(
|
|
4089
4089
|
"button",
|
|
4090
4090
|
{
|
|
4091
4091
|
class: "opencode-empty-state-btn",
|
|
@@ -4101,21 +4101,21 @@ function Ua(e, t, n, s, o, i) {
|
|
|
4101
4101
|
2
|
|
4102
4102
|
/* CLASS */
|
|
4103
4103
|
),
|
|
4104
|
-
|
|
4104
|
+
b(
|
|
4105
4105
|
"div",
|
|
4106
4106
|
{
|
|
4107
4107
|
class: Me(["opencode-loading-overlay", { visible: s.frameLoading }])
|
|
4108
4108
|
},
|
|
4109
4109
|
[
|
|
4110
4110
|
he(e.$slots, "loading", {}, () => [
|
|
4111
|
-
t[2] || (t[2] =
|
|
4111
|
+
t[2] || (t[2] = b(
|
|
4112
4112
|
"div",
|
|
4113
4113
|
{ class: "opencode-loading-spinner" },
|
|
4114
4114
|
null,
|
|
4115
4115
|
-1
|
|
4116
4116
|
/* CACHED */
|
|
4117
4117
|
)),
|
|
4118
|
-
t[3] || (t[3] =
|
|
4118
|
+
t[3] || (t[3] = b(
|
|
4119
4119
|
"div",
|
|
4120
4120
|
{ class: "opencode-loading-text" },
|
|
4121
4121
|
"加载中...",
|
|
@@ -4127,7 +4127,7 @@ function Ua(e, t, n, s, o, i) {
|
|
|
4127
4127
|
2
|
|
4128
4128
|
/* CLASS */
|
|
4129
4129
|
),
|
|
4130
|
-
|
|
4130
|
+
b(
|
|
4131
4131
|
"div",
|
|
4132
4132
|
{
|
|
4133
4133
|
class: Me(["opencode-error-overlay", { visible: s.showError }])
|
|
@@ -4139,7 +4139,7 @@ function Ua(e, t, n, s, o, i) {
|
|
|
4139
4139
|
/* CLASS */
|
|
4140
4140
|
),
|
|
4141
4141
|
he(e.$slots, "content", {}, () => [
|
|
4142
|
-
|
|
4142
|
+
b("iframe", {
|
|
4143
4143
|
ref: "iframeRef",
|
|
4144
4144
|
class: "opencode-iframe",
|
|
4145
4145
|
src: s.iframeSrc,
|
|
@@ -4230,8 +4230,8 @@ const Yi = /* @__PURE__ */ tt({
|
|
|
4230
4230
|
};
|
|
4231
4231
|
function rc(e, t, n, s, o, i) {
|
|
4232
4232
|
return W(), z("div", za, [
|
|
4233
|
-
|
|
4234
|
-
|
|
4233
|
+
b("div", Ya, [
|
|
4234
|
+
b("button", {
|
|
4235
4235
|
class: Me(["opencode-header-btn session-toggle", { active: !s.sessionListCollapsed }]),
|
|
4236
4236
|
type: "button",
|
|
4237
4237
|
title: s.sessionListTitle,
|
|
@@ -4240,7 +4240,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4240
4240
|
onClick: t[0] || (t[0] = (...l) => s.handleToggleSessionList && s.handleToggleSessionList(...l))
|
|
4241
4241
|
}, [
|
|
4242
4242
|
he(e.$slots, "session-toggle-icon", {}, () => [
|
|
4243
|
-
t[6] || (t[6] =
|
|
4243
|
+
t[6] || (t[6] = b(
|
|
4244
4244
|
"svg",
|
|
4245
4245
|
{
|
|
4246
4246
|
viewBox: "0 0 24 24",
|
|
@@ -4252,7 +4252,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4252
4252
|
"aria-hidden": "true"
|
|
4253
4253
|
},
|
|
4254
4254
|
[
|
|
4255
|
-
|
|
4255
|
+
b("path", {
|
|
4256
4256
|
d: "M4 6h16M4 12h16M4 18h16",
|
|
4257
4257
|
"stroke-linecap": "round"
|
|
4258
4258
|
})
|
|
@@ -4262,7 +4262,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4262
4262
|
))
|
|
4263
4263
|
])
|
|
4264
4264
|
], 10, Xa),
|
|
4265
|
-
|
|
4265
|
+
b("button", {
|
|
4266
4266
|
class: Me(["opencode-header-btn select-btn", { active: s.selectMode }]),
|
|
4267
4267
|
type: "button",
|
|
4268
4268
|
title: "选择页面元素 (Ctrl+P)",
|
|
@@ -4272,7 +4272,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4272
4272
|
onClick: t[1] || (t[1] = (...l) => s.handleToggleSelectMode && s.handleToggleSelectMode(...l))
|
|
4273
4273
|
}, [
|
|
4274
4274
|
he(e.$slots, "select-icon", {}, () => [
|
|
4275
|
-
t[7] || (t[7] =
|
|
4275
|
+
t[7] || (t[7] = b(
|
|
4276
4276
|
"svg",
|
|
4277
4277
|
{
|
|
4278
4278
|
viewBox: "0 0 1024 1024",
|
|
@@ -4281,11 +4281,11 @@ function rc(e, t, n, s, o, i) {
|
|
|
4281
4281
|
"aria-hidden": "true"
|
|
4282
4282
|
},
|
|
4283
4283
|
[
|
|
4284
|
-
|
|
4284
|
+
b("path", {
|
|
4285
4285
|
fill: "currentColor",
|
|
4286
4286
|
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"
|
|
4287
4287
|
}),
|
|
4288
|
-
|
|
4288
|
+
b("path", {
|
|
4289
4289
|
fill: "currentColor",
|
|
4290
4290
|
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"
|
|
4291
4291
|
})
|
|
@@ -4295,7 +4295,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4295
4295
|
))
|
|
4296
4296
|
])
|
|
4297
4297
|
], 10, Ga),
|
|
4298
|
-
|
|
4298
|
+
b("button", {
|
|
4299
4299
|
class: "opencode-header-btn theme-btn",
|
|
4300
4300
|
type: "button",
|
|
4301
4301
|
title: s.themeIconTitle,
|
|
@@ -4306,7 +4306,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4306
4306
|
s.theme === "light" ? (W(), z("svg", Za, [...t[8] || (t[8] = [
|
|
4307
4307
|
uo('<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)
|
|
4308
4308
|
])])) : s.theme === "dark" ? (W(), z("svg", Qa, [...t[9] || (t[9] = [
|
|
4309
|
-
|
|
4309
|
+
b(
|
|
4310
4310
|
"path",
|
|
4311
4311
|
{ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" },
|
|
4312
4312
|
null,
|
|
@@ -4319,15 +4319,15 @@ function rc(e, t, n, s, o, i) {
|
|
|
4319
4319
|
])
|
|
4320
4320
|
], 8, Ja)
|
|
4321
4321
|
]),
|
|
4322
|
-
|
|
4322
|
+
b(
|
|
4323
4323
|
"span",
|
|
4324
4324
|
tc,
|
|
4325
4325
|
we(s.title),
|
|
4326
4326
|
1
|
|
4327
4327
|
/* TEXT */
|
|
4328
4328
|
),
|
|
4329
|
-
|
|
4330
|
-
|
|
4329
|
+
b("div", nc, [
|
|
4330
|
+
b("button", {
|
|
4331
4331
|
class: "opencode-header-btn prompt-dock",
|
|
4332
4332
|
type: "button",
|
|
4333
4333
|
title: s.promptDockVisible ? "隐藏对话框" : "显示对话框",
|
|
@@ -4336,7 +4336,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4336
4336
|
onClick: t[3] || (t[3] = (...l) => s.handleTogglePromptDock && s.handleTogglePromptDock(...l))
|
|
4337
4337
|
}, [
|
|
4338
4338
|
he(e.$slots, "prompt-dock-icon", {}, () => [
|
|
4339
|
-
t[11] || (t[11] =
|
|
4339
|
+
t[11] || (t[11] = b(
|
|
4340
4340
|
"svg",
|
|
4341
4341
|
{
|
|
4342
4342
|
viewBox: "0 0 24 24",
|
|
@@ -4348,14 +4348,14 @@ function rc(e, t, n, s, o, i) {
|
|
|
4348
4348
|
"aria-hidden": "true"
|
|
4349
4349
|
},
|
|
4350
4350
|
[
|
|
4351
|
-
|
|
4351
|
+
b("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
4352
4352
|
],
|
|
4353
4353
|
-1
|
|
4354
4354
|
/* CACHED */
|
|
4355
4355
|
))
|
|
4356
4356
|
])
|
|
4357
4357
|
], 8, sc),
|
|
4358
|
-
|
|
4358
|
+
b("button", {
|
|
4359
4359
|
class: "opencode-header-btn minimize",
|
|
4360
4360
|
type: "button",
|
|
4361
4361
|
title: s.minimized ? "展开" : "最小化",
|
|
@@ -4365,7 +4365,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4365
4365
|
}, [
|
|
4366
4366
|
he(e.$slots, "minimize-icon", {}, () => [
|
|
4367
4367
|
s.minimized ? (W(), z("svg", ic, [...t[12] || (t[12] = [
|
|
4368
|
-
|
|
4368
|
+
b(
|
|
4369
4369
|
"path",
|
|
4370
4370
|
{ 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" },
|
|
4371
4371
|
null,
|
|
@@ -4373,7 +4373,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4373
4373
|
/* CACHED */
|
|
4374
4374
|
)
|
|
4375
4375
|
])])) : (W(), z("svg", lc, [...t[13] || (t[13] = [
|
|
4376
|
-
|
|
4376
|
+
b(
|
|
4377
4377
|
"path",
|
|
4378
4378
|
{ 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" },
|
|
4379
4379
|
null,
|
|
@@ -4383,7 +4383,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4383
4383
|
])]))
|
|
4384
4384
|
])
|
|
4385
4385
|
], 8, oc),
|
|
4386
|
-
|
|
4386
|
+
b("button", {
|
|
4387
4387
|
class: "opencode-header-btn close",
|
|
4388
4388
|
type: "button",
|
|
4389
4389
|
title: "关闭",
|
|
@@ -4391,7 +4391,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4391
4391
|
onClick: t[5] || (t[5] = (...l) => s.handleClose && s.handleClose(...l))
|
|
4392
4392
|
}, [
|
|
4393
4393
|
he(e.$slots, "close-icon", {}, () => [
|
|
4394
|
-
t[14] || (t[14] =
|
|
4394
|
+
t[14] || (t[14] = b(
|
|
4395
4395
|
"svg",
|
|
4396
4396
|
{
|
|
4397
4397
|
viewBox: "0 0 24 24",
|
|
@@ -4403,7 +4403,7 @@ function rc(e, t, n, s, o, i) {
|
|
|
4403
4403
|
"aria-hidden": "true"
|
|
4404
4404
|
},
|
|
4405
4405
|
[
|
|
4406
|
-
|
|
4406
|
+
b("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4407
4407
|
],
|
|
4408
4408
|
-1
|
|
4409
4409
|
/* CACHED */
|
|
@@ -4430,14 +4430,14 @@ function uc(e, t, n, s, o, i) {
|
|
|
4430
4430
|
class: Me(["opencode-select-mode-hint", { visible: s.visible }])
|
|
4431
4431
|
},
|
|
4432
4432
|
[
|
|
4433
|
-
t[0] || (t[0] =
|
|
4433
|
+
t[0] || (t[0] = b(
|
|
4434
4434
|
"span",
|
|
4435
4435
|
null,
|
|
4436
4436
|
"🎯 选择模式已开启 - 点击元素进行选择",
|
|
4437
4437
|
-1
|
|
4438
4438
|
/* CACHED */
|
|
4439
4439
|
)),
|
|
4440
|
-
|
|
4440
|
+
b(
|
|
4441
4441
|
"span",
|
|
4442
4442
|
cc,
|
|
4443
4443
|
we(s.shortcutLabel),
|
|
@@ -4476,17 +4476,17 @@ function _c(e, t, n, s, o, i) {
|
|
|
4476
4476
|
class: Me(["opencode-right-toolbar", { collapsed: s.items.length === 0 }])
|
|
4477
4477
|
},
|
|
4478
4478
|
[
|
|
4479
|
-
t[1] || (t[1] =
|
|
4479
|
+
t[1] || (t[1] = b(
|
|
4480
4480
|
"div",
|
|
4481
4481
|
{ class: "opencode-selected-nodes-header" },
|
|
4482
4482
|
[
|
|
4483
|
-
|
|
4484
|
-
|
|
4483
|
+
b("div", { class: "opencode-selected-nodes-title" }, "已选节点"),
|
|
4484
|
+
b("div", { class: "opencode-selected-nodes-desc" }, "选中的节点会在对话时一起发送给助手")
|
|
4485
4485
|
],
|
|
4486
4486
|
-1
|
|
4487
4487
|
/* CACHED */
|
|
4488
4488
|
)),
|
|
4489
|
-
|
|
4489
|
+
b("div", dc, [
|
|
4490
4490
|
(W(!0), z(
|
|
4491
4491
|
fe,
|
|
4492
4492
|
null,
|
|
@@ -4496,15 +4496,15 @@ function _c(e, t, n, s, o, i) {
|
|
|
4496
4496
|
role: "listitem",
|
|
4497
4497
|
onClick: (a) => s.handleClickSelectedNode(l)
|
|
4498
4498
|
}, [
|
|
4499
|
-
|
|
4500
|
-
|
|
4499
|
+
b("div", pc, [
|
|
4500
|
+
b(
|
|
4501
4501
|
"span",
|
|
4502
4502
|
gc,
|
|
4503
4503
|
we(l.description),
|
|
4504
4504
|
1
|
|
4505
4505
|
/* TEXT */
|
|
4506
4506
|
),
|
|
4507
|
-
|
|
4507
|
+
b(
|
|
4508
4508
|
"span",
|
|
4509
4509
|
mc,
|
|
4510
4510
|
we(l.panelFileText),
|
|
@@ -4512,7 +4512,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4512
4512
|
/* TEXT */
|
|
4513
4513
|
)
|
|
4514
4514
|
]),
|
|
4515
|
-
|
|
4515
|
+
b("button", {
|
|
4516
4516
|
class: "opencode-node-remove",
|
|
4517
4517
|
type: "button",
|
|
4518
4518
|
"aria-label": `移除元素: ${l.description}`,
|
|
@@ -4600,12 +4600,12 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4600
4600
|
{ key: 1 },
|
|
4601
4601
|
[
|
|
4602
4602
|
qe(" Header Skeleton "),
|
|
4603
|
-
t[2] || (t[2] =
|
|
4603
|
+
t[2] || (t[2] = b(
|
|
4604
4604
|
"div",
|
|
4605
4605
|
{ class: "opencode-session-header-skeleton visible" },
|
|
4606
4606
|
[
|
|
4607
|
-
|
|
4608
|
-
|
|
4607
|
+
b("div", { class: "opencode-skeleton-header-title" }),
|
|
4608
|
+
b("div", { class: "opencode-skeleton-header-btn" })
|
|
4609
4609
|
],
|
|
4610
4610
|
-1
|
|
4611
4611
|
/* CACHED */
|
|
@@ -4614,14 +4614,14 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4614
4614
|
2112
|
|
4615
4615
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
4616
4616
|
)) : (W(), z("div", bc, [
|
|
4617
|
-
t[1] || (t[1] =
|
|
4617
|
+
t[1] || (t[1] = b(
|
|
4618
4618
|
"span",
|
|
4619
4619
|
{ id: "opencode-session-list-title" },
|
|
4620
4620
|
"会话列表",
|
|
4621
4621
|
-1
|
|
4622
4622
|
/* CACHED */
|
|
4623
4623
|
)),
|
|
4624
|
-
|
|
4624
|
+
b("button", {
|
|
4625
4625
|
class: "opencode-new-session-btn",
|
|
4626
4626
|
type: "button",
|
|
4627
4627
|
title: "新建会话",
|
|
@@ -4634,18 +4634,18 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4634
4634
|
(W(), z(
|
|
4635
4635
|
fe,
|
|
4636
4636
|
null,
|
|
4637
|
-
bs(5, (l) =>
|
|
4637
|
+
bs(5, (l) => b("div", {
|
|
4638
4638
|
key: `skeleton-${l}`,
|
|
4639
4639
|
class: "opencode-skeleton-item"
|
|
4640
4640
|
}, [...t[3] || (t[3] = [
|
|
4641
|
-
|
|
4641
|
+
b(
|
|
4642
4642
|
"div",
|
|
4643
4643
|
{ class: "opencode-skeleton-title" },
|
|
4644
4644
|
null,
|
|
4645
4645
|
-1
|
|
4646
4646
|
/* CACHED */
|
|
4647
4647
|
),
|
|
4648
|
-
|
|
4648
|
+
b(
|
|
4649
4649
|
"div",
|
|
4650
4650
|
{ class: "opencode-skeleton-meta" },
|
|
4651
4651
|
null,
|
|
@@ -4661,9 +4661,9 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4661
4661
|
{ key: 3 },
|
|
4662
4662
|
[
|
|
4663
4663
|
qe(" Content "),
|
|
4664
|
-
|
|
4664
|
+
b("div", wc, [
|
|
4665
4665
|
s.loadingSessionList ? (W(), z("div", Tc, [...t[4] || (t[4] = [
|
|
4666
|
-
|
|
4666
|
+
b(
|
|
4667
4667
|
"div",
|
|
4668
4668
|
{ class: "opencode-loading-spinner small" },
|
|
4669
4669
|
null,
|
|
@@ -4681,8 +4681,8 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4681
4681
|
"aria-selected": l.active,
|
|
4682
4682
|
onClick: (r) => s.handleSelectSession(l)
|
|
4683
4683
|
}, [
|
|
4684
|
-
|
|
4685
|
-
|
|
4684
|
+
b("div", Cc, [
|
|
4685
|
+
b("div", xc, [
|
|
4686
4686
|
s.isSessionThinking(l.id) ? (W(), z("span", Ac)) : qe("v-if", !0),
|
|
4687
4687
|
Ws(
|
|
4688
4688
|
" " + we(l.title),
|
|
@@ -4690,14 +4690,14 @@ function Mc(e, t, n, s, o, i) {
|
|
|
4690
4690
|
/* TEXT */
|
|
4691
4691
|
)
|
|
4692
4692
|
]),
|
|
4693
|
-
|
|
4693
|
+
b("button", {
|
|
4694
4694
|
class: "opencode-session-delete-btn",
|
|
4695
4695
|
type: "button",
|
|
4696
4696
|
"aria-label": `删除会话: ${l.title}`,
|
|
4697
4697
|
onClick: Wi((r) => s.handleDeleteSession(l), ["stop"])
|
|
4698
4698
|
}, " × ", 8, Oc)
|
|
4699
4699
|
]),
|
|
4700
|
-
|
|
4700
|
+
b(
|
|
4701
4701
|
"div",
|
|
4702
4702
|
Ic,
|
|
4703
4703
|
we(l.meta),
|
|
@@ -4804,7 +4804,7 @@ const Zi = /* @__PURE__ */ tt($c(Fc({}, {
|
|
|
4804
4804
|
const De = { x: l.value.x, y: l.value.y };
|
|
4805
4805
|
o("update:offset", De), o("offset-change", De);
|
|
4806
4806
|
}
|
|
4807
|
-
},
|
|
4807
|
+
}, y = {
|
|
4808
4808
|
startX: /* @__PURE__ */ F(0),
|
|
4809
4809
|
startY: /* @__PURE__ */ F(0),
|
|
4810
4810
|
deltaX: /* @__PURE__ */ F(0),
|
|
@@ -4824,17 +4824,17 @@ const Zi = /* @__PURE__ */ tt($c(Fc({}, {
|
|
|
4824
4824
|
};
|
|
4825
4825
|
let B = 0, k = 0;
|
|
4826
4826
|
const N = (P) => {
|
|
4827
|
-
|
|
4827
|
+
y.start(P), S.value = !0, B = l.value.x, k = l.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in P || (window.addEventListener("mousemove", R, { passive: !1 }), window.addEventListener("mouseup", Q));
|
|
4828
4828
|
}, R = (P) => {
|
|
4829
4829
|
P.cancelable && P.preventDefault();
|
|
4830
|
-
const G =
|
|
4831
|
-
if (
|
|
4830
|
+
const G = y.isTap.value;
|
|
4831
|
+
if (y.move(P), G && !y.isTap.value && o("drag-start"), s.axis !== "lock" && !y.isTap.value) {
|
|
4832
4832
|
if (s.axis === "x" || s.axis === "xy") {
|
|
4833
|
-
let K = B +
|
|
4833
|
+
let K = B + y.deltaX.value;
|
|
4834
4834
|
K < p.value.left && (K = p.value.left), K > p.value.right && (K = p.value.right), l.value.x = K;
|
|
4835
4835
|
}
|
|
4836
4836
|
if (s.axis === "y" || s.axis === "xy") {
|
|
4837
|
-
let K = k +
|
|
4837
|
+
let K = k + y.deltaY.value;
|
|
4838
4838
|
K < p.value.top && (K = p.value.top), K > p.value.bottom && (K = p.value.bottom), l.value.y = K;
|
|
4839
4839
|
}
|
|
4840
4840
|
const ae = { x: l.value.x, y: l.value.y };
|
|
@@ -4842,18 +4842,18 @@ const Zi = /* @__PURE__ */ tt($c(Fc({}, {
|
|
|
4842
4842
|
}
|
|
4843
4843
|
}, Q = (P) => {
|
|
4844
4844
|
S.value = !1, document.body.classList.remove("floating-bubble-dragging"), P && !("touches" in P) && P.type === "mouseup" && (window.removeEventListener("mousemove", R), window.removeEventListener("mouseup", Q)), requestAnimationFrame(() => {
|
|
4845
|
-
if (s.magnetic === "x" && !
|
|
4845
|
+
if (s.magnetic === "x" && !y.isTap.value) {
|
|
4846
4846
|
const G = l.value.x + l.value.width / 2, ae = c.value / 2;
|
|
4847
4847
|
L.value = G < ae ? "left" : "right";
|
|
4848
4848
|
}
|
|
4849
|
-
if (x(), !
|
|
4849
|
+
if (x(), !y.isTap.value) {
|
|
4850
4850
|
o("drag-end");
|
|
4851
4851
|
const G = { x: l.value.x, y: l.value.y };
|
|
4852
4852
|
o("update:offset", G), (B !== G.x || k !== G.y) && o("offset-change", G);
|
|
4853
4853
|
}
|
|
4854
4854
|
});
|
|
4855
4855
|
}, X = (P) => {
|
|
4856
|
-
|
|
4856
|
+
y.isTap.value ? o("click", P) : P.stopPropagation();
|
|
4857
4857
|
}, ue = () => {
|
|
4858
4858
|
typeof window < "u" && (c.value = window.innerWidth, d.value = window.innerHeight);
|
|
4859
4859
|
};
|
|
@@ -4872,7 +4872,7 @@ const Zi = /* @__PURE__ */ tt($c(Fc({}, {
|
|
|
4872
4872
|
), t({
|
|
4873
4873
|
offset: Y(() => ({ x: l.value.x, y: l.value.y }))
|
|
4874
4874
|
});
|
|
4875
|
-
const pe = { props: s, emit: o, rootRef: i, state: l, isObject: r, gapX: a, gapY: u, windowWidth: c, windowHeight: d, boundary: p, closest: _, applyMagnetic: x, dragging: S, initialized: D, magneticSide: L, rootStyle: C, updateState: $, touch:
|
|
4875
|
+
const pe = { props: s, emit: o, rootRef: i, state: l, isObject: r, gapX: a, gapY: u, windowWidth: c, windowHeight: d, boundary: p, closest: _, applyMagnetic: x, dragging: S, initialized: D, magneticSide: L, rootStyle: C, updateState: $, touch: y, get prevX() {
|
|
4876
4876
|
return B;
|
|
4877
4877
|
}, set prevX(P) {
|
|
4878
4878
|
B = P;
|
|
@@ -4886,7 +4886,7 @@ const Zi = /* @__PURE__ */ tt($c(Fc({}, {
|
|
|
4886
4886
|
}));
|
|
4887
4887
|
function Bc(e, t, n, s, o, i) {
|
|
4888
4888
|
return W(), At(Si, { to: n.teleport }, [
|
|
4889
|
-
|
|
4889
|
+
b(
|
|
4890
4890
|
"div",
|
|
4891
4891
|
{
|
|
4892
4892
|
ref: "rootRef",
|
|
@@ -4947,7 +4947,7 @@ function Vc(e, t, n, s, o, i) {
|
|
|
4947
4947
|
onDragEnd: t[2] || (t[2] = (l) => s.emit("drag-end"))
|
|
4948
4948
|
}, {
|
|
4949
4949
|
default: Fe(() => [
|
|
4950
|
-
|
|
4950
|
+
b("button", {
|
|
4951
4951
|
class: Me(["opencode-button", { active: s.active, thinking: s.thinking, "opencode-theme-dark": s.resolvedTheme === "dark" }]),
|
|
4952
4952
|
type: "button",
|
|
4953
4953
|
"aria-expanded": s.open,
|
|
@@ -4955,7 +4955,7 @@ function Vc(e, t, n, s, o, i) {
|
|
|
4955
4955
|
title: `AI 助手 (${s.hotkeyLabel})`
|
|
4956
4956
|
}, [
|
|
4957
4957
|
he(e.$slots, "default", {}, () => [
|
|
4958
|
-
t[3] || (t[3] =
|
|
4958
|
+
t[3] || (t[3] = b(
|
|
4959
4959
|
"svg",
|
|
4960
4960
|
{
|
|
4961
4961
|
t: "1775402599580",
|
|
@@ -4969,35 +4969,35 @@ function Vc(e, t, n, s, o, i) {
|
|
|
4969
4969
|
height: "100%"
|
|
4970
4970
|
},
|
|
4971
4971
|
[
|
|
4972
|
-
|
|
4973
|
-
|
|
4972
|
+
b("defs", null, [
|
|
4973
|
+
b("linearGradient", {
|
|
4974
4974
|
id: "opencode-logo-gradient",
|
|
4975
4975
|
x1: "0%",
|
|
4976
4976
|
y1: "0%",
|
|
4977
4977
|
x2: "100%",
|
|
4978
4978
|
y2: "100%"
|
|
4979
4979
|
}, [
|
|
4980
|
-
|
|
4980
|
+
b("stop", {
|
|
4981
4981
|
offset: "0%",
|
|
4982
4982
|
style: { "stop-color": "#667eea" }
|
|
4983
4983
|
}),
|
|
4984
|
-
|
|
4984
|
+
b("stop", {
|
|
4985
4985
|
offset: "100%",
|
|
4986
4986
|
style: { "stop-color": "#764ba2" }
|
|
4987
4987
|
})
|
|
4988
4988
|
])
|
|
4989
4989
|
]),
|
|
4990
|
-
|
|
4990
|
+
b("path", {
|
|
4991
4991
|
d: "M512 981.33H85.34c-15.85 0-30.38-8.77-37.77-22.81a42.624 42.624 0 0 1 2.6-44.02L135 791.08C75.25 710.5 42.67 612.6 42.67 512 42.67 253.21 253.21 42.67 512 42.67S981.34 253.21 981.34 512 770.8 981.33 512 981.33zM166.44 896H512c211.73 0 384-172.27 384-384S723.73 128 512 128 128 300.27 128 512c0 91.29 32.83 179.9 92.46 249.46 12.58 14.69 13.73 36 2.77 51.94L166.44 896z",
|
|
4992
4992
|
fill: "url(#opencode-logo-gradient)",
|
|
4993
4993
|
"p-id": "5391"
|
|
4994
4994
|
}),
|
|
4995
|
-
|
|
4995
|
+
b("path", {
|
|
4996
4996
|
d: "M384 448m-64 0a64 64 0 1 0 128 0 64 64 0 1 0 -128 0Z",
|
|
4997
4997
|
fill: "url(#opencode-logo-gradient)",
|
|
4998
4998
|
"p-id": "5392"
|
|
4999
4999
|
}),
|
|
5000
|
-
|
|
5000
|
+
b("path", {
|
|
5001
5001
|
d: "M640 448m-64 0a64 64 0 1 0 128 0 64 64 0 1 0 -128 0Z",
|
|
5002
5002
|
fill: "url(#opencode-logo-gradient)",
|
|
5003
5003
|
"p-id": "5393"
|
|
@@ -5902,7 +5902,7 @@ function uf(e) {
|
|
|
5902
5902
|
}), s = /* @__PURE__ */ F(!1), o = /* @__PURE__ */ F({ top: "0px", left: "0px" }), i = /* @__PURE__ */ F({ description: "", fileInfo: "" }), l = 500;
|
|
5903
5903
|
let r = null, a = null, u = { file: null, line: null, column: null }, c = "#3b82f6", d = "rgba(59, 130, 246, 0.1)", p = "", _ = "";
|
|
5904
5904
|
function x(C) {
|
|
5905
|
-
var $,
|
|
5905
|
+
var $, y;
|
|
5906
5906
|
if (!e.selectMode.value) return;
|
|
5907
5907
|
const B = window.__VUE_INSPECTOR__, k = document.querySelector(".opencode-element-highlight"), N = document.querySelector(".opencode-element-tooltip");
|
|
5908
5908
|
k && (k.style.pointerEvents = "none"), N && (N.style.pointerEvents = "none");
|
|
@@ -5915,7 +5915,7 @@ function uf(e) {
|
|
|
5915
5915
|
Q && (R = xn(C.clientX, C.clientY, Q) || Q, pe && pe.file ? X = {
|
|
5916
5916
|
file: pe.file,
|
|
5917
5917
|
line: ($ = pe.line) != null ? $ : null,
|
|
5918
|
-
column: (
|
|
5918
|
+
column: (y = pe.column) != null ? y : null
|
|
5919
5919
|
} : X = No(Q, B));
|
|
5920
5920
|
}
|
|
5921
5921
|
R || (R = xn(C.clientX, C.clientY, null)), R && !X.file && (X = As(R) || X);
|
|
@@ -5966,16 +5966,17 @@ function uf(e) {
|
|
|
5966
5966
|
const C = window.__VUE_INSPECTOR__;
|
|
5967
5967
|
if (!C || C.__opencode_hooked) return;
|
|
5968
5968
|
const $ = C.handleClick.bind(C);
|
|
5969
|
-
C.handleClick = function(
|
|
5969
|
+
C.handleClick = function(y) {
|
|
5970
5970
|
var B, k;
|
|
5971
5971
|
if (e.selectMode.value) {
|
|
5972
|
+
y.preventDefault(), y.stopPropagation();
|
|
5972
5973
|
let N = null, R = { file: null, line: null, column: null };
|
|
5973
|
-
const { targetNode: Q, params: X } = C.getTargetNode(
|
|
5974
|
-
if (Q && (N = xn(
|
|
5974
|
+
const { targetNode: Q, params: X } = C.getTargetNode(y);
|
|
5975
|
+
if (Q && (N = xn(y.clientX, y.clientY, Q) || Q, X && X.file ? R = {
|
|
5975
5976
|
file: X.file,
|
|
5976
5977
|
line: (B = X.line) != null ? B : null,
|
|
5977
5978
|
column: (k = X.column) != null ? k : null
|
|
5978
|
-
} : N && (R = No(N, C))), N || (N = xn(
|
|
5979
|
+
} : N && (R = No(N, C))), N || (N = xn(y.clientX, y.clientY, null)), N && !R.file && (R = As(N) || R), N) {
|
|
5979
5980
|
const ue = of(N), pe = Po(N), P = {
|
|
5980
5981
|
filePath: R.file,
|
|
5981
5982
|
line: R.line,
|
|
@@ -5987,7 +5988,7 @@ function uf(e) {
|
|
|
5987
5988
|
}
|
|
5988
5989
|
return;
|
|
5989
5990
|
}
|
|
5990
|
-
return $.call(C,
|
|
5991
|
+
return $.call(C, y);
|
|
5991
5992
|
}, C.__opencode_hooked = !0;
|
|
5992
5993
|
}
|
|
5993
5994
|
function L(C) {
|
|
@@ -6118,7 +6119,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6118
6119
|
}, L = /* @__PURE__ */ F(null), C = /* @__PURE__ */ F(null), $ = (A, be) => {
|
|
6119
6120
|
var le;
|
|
6120
6121
|
(le = L.value) == null || le.sendMessageToIframe(A, be);
|
|
6121
|
-
},
|
|
6122
|
+
}, y = /* @__PURE__ */ F(s.sessionListCollapsed), B = /* @__PURE__ */ F(!1), k = /* @__PURE__ */ F(!0), N = /* @__PURE__ */ F(!0), R = /* @__PURE__ */ F(!1), Q = () => {
|
|
6122
6123
|
R.value && ($("prompt-dock-visibility-change", { visible: k.value }), $("minimize-state-change", { minimized: B.value }));
|
|
6123
6124
|
}, X = () => {
|
|
6124
6125
|
o("frame-loaded"), R.value = !0, Q();
|
|
@@ -6130,7 +6131,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6130
6131
|
}), ft(
|
|
6131
6132
|
() => s.sessionListCollapsed,
|
|
6132
6133
|
(A) => {
|
|
6133
|
-
|
|
6134
|
+
y.value = A;
|
|
6134
6135
|
}
|
|
6135
6136
|
);
|
|
6136
6137
|
const {
|
|
@@ -6149,7 +6150,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6149
6150
|
open: /* @__PURE__ */ te(s, "open"),
|
|
6150
6151
|
selectMode: /* @__PURE__ */ te(s, "selectMode"),
|
|
6151
6152
|
iframeSrc: /* @__PURE__ */ te(s, "iframeSrc"),
|
|
6152
|
-
sessionListCollapsed:
|
|
6153
|
+
sessionListCollapsed: y,
|
|
6153
6154
|
onToggle: (A) => {
|
|
6154
6155
|
o("update:open", A), o("toggle", A);
|
|
6155
6156
|
},
|
|
@@ -6160,7 +6161,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6160
6161
|
o("update:open", !1), o("close");
|
|
6161
6162
|
},
|
|
6162
6163
|
onToggleSessionList: (A) => {
|
|
6163
|
-
|
|
6164
|
+
y.value = A, o("update:sessionListCollapsed", A), o("toggle-session-list", A);
|
|
6164
6165
|
},
|
|
6165
6166
|
onEmptyAction: () => {
|
|
6166
6167
|
o("empty-action");
|
|
@@ -6215,7 +6216,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6215
6216
|
promptDockVisible: k,
|
|
6216
6217
|
bubbleOffset: w,
|
|
6217
6218
|
theme: /* @__PURE__ */ te(s, "theme"),
|
|
6218
|
-
sessionListCollapsed:
|
|
6219
|
+
sessionListCollapsed: y,
|
|
6219
6220
|
onRestore: (A) => {
|
|
6220
6221
|
if (A.open !== void 0 && A.open !== s.open && (o("update:open", A.open), o("toggle", A.open)), A.minimized !== void 0 && (B.value = A.minimized), A.bubbleOffset !== void 0) {
|
|
6221
6222
|
const ve = window.innerWidth - 44 - 10, ot = window.innerHeight - 44 - 10;
|
|
@@ -6224,7 +6225,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6224
6225
|
y: Math.max(10, Math.min(A.bubbleOffset.y, ot))
|
|
6225
6226
|
};
|
|
6226
6227
|
}
|
|
6227
|
-
A.theme !== void 0 && A.theme !== s.theme && (o("update:theme", A.theme), o("toggle-theme", A.theme)), A.sessionListCollapsed !== void 0 && A.sessionListCollapsed !== s.sessionListCollapsed && (
|
|
6228
|
+
A.theme !== void 0 && A.theme !== s.theme && (o("update:theme", A.theme), o("toggle-theme", A.theme)), A.sessionListCollapsed !== void 0 && A.sessionListCollapsed !== s.sessionListCollapsed && (y.value = A.sessionListCollapsed, o("update:sessionListCollapsed", A.sessionListCollapsed)), A.promptDockVisible !== void 0 ? k.value = A.promptDockVisible : B.value && (k.value = !1), hi(() => {
|
|
6228
6229
|
Q(), setTimeout(() => {
|
|
6229
6230
|
N.value = !1;
|
|
6230
6231
|
}, 50);
|
|
@@ -6296,7 +6297,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6296
6297
|
selectShortcutLabel: /* @__PURE__ */ te(s, "selectShortcutLabel"),
|
|
6297
6298
|
selectMode: /* @__PURE__ */ te(s, "selectMode"),
|
|
6298
6299
|
selectEnabled: /* @__PURE__ */ te(s, "selectEnabled"),
|
|
6299
|
-
sessionListCollapsed:
|
|
6300
|
+
sessionListCollapsed: y,
|
|
6300
6301
|
sessionKey: /* @__PURE__ */ te(s, "sessionKey"),
|
|
6301
6302
|
frameLoading: /* @__PURE__ */ te(s, "frameLoading"),
|
|
6302
6303
|
loadingSessionList: /* @__PURE__ */ te(s, "loadingSessionList"),
|
|
@@ -6347,7 +6348,7 @@ const vl = /* @__PURE__ */ tt(bf(yf({}, {
|
|
|
6347
6348
|
return _;
|
|
6348
6349
|
}, set dialogResolve(A) {
|
|
6349
6350
|
_ = A;
|
|
6350
|
-
}, showConfirmDialog: x, handleDialogConfirm: S, handleDialogCancel: D, frameRef: L, triggerRef: C, sendMessageToIframe: $, localSessionListCollapsed:
|
|
6351
|
+
}, showConfirmDialog: x, handleDialogConfirm: S, handleDialogCancel: D, frameRef: L, triggerRef: C, sendMessageToIframe: $, localSessionListCollapsed: y, minimized: B, promptDockVisible: k, isRestoring: N, iframeLoaded: R, syncStateToIframe: Q, handleFrameLoaded: X, buttonActive: ue, containerClasses: pe, iframeSource: P, sessionListTitle: G, resolvedTheme: ae, handleClose: K, handleEmptyAction: xe, handleToggle: Ae, handleToggleSessionList: ze, handleToggleTheme: Ve, sessionItems: De, handleCreateSession: me, handleDeleteSession: Pe, handleSelectSession: Ne, bubbleVisible: dt, hasSelectedElements: Re, selectedElementItems: We, handleClearSelectedNodes: Ye, handleClickSelectedNode: Ot, handleRemoveSelectedNode: st, handleToggleSelectMode: Gt, highlightVisible: f, highlightStyle: h, tooltipVisible: m, tooltipStyle: E, tooltipContent: T, bubbleOffset: w, handleToggleMinimize: I, handleTogglePromptDock: O, windowWidth: g, windowHeight: v, handleWindowResize: H, bubbleQuadrant: M, isBubbleOnRightSide: j, chatPositionStyle: V, handleBubbleOffsetChange: q, chatAnimationOrigin: J, isDragging: ee, get wasOpenBeforeDrag() {
|
|
6351
6352
|
return ie;
|
|
6352
6353
|
}, set wasOpenBeforeDrag(A) {
|
|
6353
6354
|
ie = A;
|
|
@@ -6399,7 +6400,7 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6399
6400
|
1536
|
|
6400
6401
|
/* NEED_PATCH, DYNAMIC_SLOTS */
|
|
6401
6402
|
),
|
|
6402
|
-
ss(
|
|
6403
|
+
ss(b(
|
|
6403
6404
|
"div",
|
|
6404
6405
|
{
|
|
6405
6406
|
class: Me(["opencode-chat", { open: n.open, minimized: s.minimized, dragging: s.isDragging, "no-transition": s.isRestoring }]),
|
|
@@ -6445,11 +6446,11 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6445
6446
|
1
|
|
6446
6447
|
/* TEXT */
|
|
6447
6448
|
)) : qe("v-if", !0),
|
|
6448
|
-
|
|
6449
|
+
b("div", wf, [
|
|
6449
6450
|
Se(s.SessionList, null, {
|
|
6450
6451
|
empty: Fe(() => [
|
|
6451
6452
|
he(e.$slots, "sessions-empty", {}, () => [
|
|
6452
|
-
t[0] || (t[0] =
|
|
6453
|
+
t[0] || (t[0] = b(
|
|
6453
6454
|
"div",
|
|
6454
6455
|
{ class: "opencode-session-empty" },
|
|
6455
6456
|
"暂无会话",
|
|
@@ -6509,7 +6510,7 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6509
6510
|
[rs, !n.selectMode]
|
|
6510
6511
|
]),
|
|
6511
6512
|
Se(s.SelectHint),
|
|
6512
|
-
ss(
|
|
6513
|
+
ss(b(
|
|
6513
6514
|
"div",
|
|
6514
6515
|
{
|
|
6515
6516
|
class: "opencode-element-highlight",
|
|
@@ -6521,21 +6522,21 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6521
6522
|
), [
|
|
6522
6523
|
[rs, s.highlightVisible]
|
|
6523
6524
|
]),
|
|
6524
|
-
ss(
|
|
6525
|
+
ss(b(
|
|
6525
6526
|
"div",
|
|
6526
6527
|
{
|
|
6527
6528
|
class: "opencode-element-tooltip",
|
|
6528
6529
|
style: Rt(s.tooltipStyle)
|
|
6529
6530
|
},
|
|
6530
6531
|
[
|
|
6531
|
-
|
|
6532
|
+
b(
|
|
6532
6533
|
"div",
|
|
6533
6534
|
Tf,
|
|
6534
6535
|
we(s.tooltipContent.description),
|
|
6535
6536
|
1
|
|
6536
6537
|
/* TEXT */
|
|
6537
6538
|
),
|
|
6538
|
-
|
|
6539
|
+
b(
|
|
6539
6540
|
"div",
|
|
6540
6541
|
Ef,
|
|
6541
6542
|
we(s.tooltipContent.fileInfo),
|
|
@@ -6549,9 +6550,9 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6549
6550
|
[rs, s.tooltipVisible]
|
|
6550
6551
|
]),
|
|
6551
6552
|
s.dialogVisible ? (W(), z("div", Cf, [
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6553
|
+
b("div", xf, [
|
|
6554
|
+
b("div", Af, [
|
|
6555
|
+
b(
|
|
6555
6556
|
"div",
|
|
6556
6557
|
Of,
|
|
6557
6558
|
we(s.dialogMessage),
|
|
@@ -6559,12 +6560,12 @@ function Mf(e, t, n, s, o, i) {
|
|
|
6559
6560
|
/* TEXT */
|
|
6560
6561
|
)
|
|
6561
6562
|
]),
|
|
6562
|
-
|
|
6563
|
-
|
|
6563
|
+
b("div", { class: "opencode-dialog-actions" }, [
|
|
6564
|
+
b("button", {
|
|
6564
6565
|
class: "opencode-dialog-btn cancel",
|
|
6565
6566
|
onClick: s.handleDialogCancel
|
|
6566
6567
|
}, "取消"),
|
|
6567
|
-
|
|
6568
|
+
b("button", {
|
|
6568
6569
|
class: "opencode-dialog-btn confirm",
|
|
6569
6570
|
onClick: s.handleDialogConfirm
|
|
6570
6571
|
}, "确认")
|
|
@@ -6650,10 +6651,10 @@ function _l(e) {
|
|
|
6650
6651
|
const $ = new Error(`SSE connection error: ${t}`);
|
|
6651
6652
|
if (a?.($), p.value < o) {
|
|
6652
6653
|
p.value++;
|
|
6653
|
-
const
|
|
6654
|
+
const y = i * p.value;
|
|
6654
6655
|
setTimeout(() => {
|
|
6655
6656
|
s?.value !== !1 && !c.value && x();
|
|
6656
|
-
},
|
|
6657
|
+
}, y);
|
|
6657
6658
|
} else C && r?.();
|
|
6658
6659
|
};
|
|
6659
6660
|
} catch (C) {
|
|
@@ -6661,10 +6662,10 @@ function _l(e) {
|
|
|
6661
6662
|
const $ = C instanceof Error ? C : new Error(String(C));
|
|
6662
6663
|
if (a?.($), p.value < o) {
|
|
6663
6664
|
p.value++;
|
|
6664
|
-
const
|
|
6665
|
+
const y = i * p.value;
|
|
6665
6666
|
setTimeout(() => {
|
|
6666
6667
|
c.value || x();
|
|
6667
|
-
},
|
|
6668
|
+
}, y);
|
|
6668
6669
|
}
|
|
6669
6670
|
}
|
|
6670
6671
|
}
|
|
@@ -6748,19 +6749,19 @@ function $f(e) {
|
|
|
6748
6749
|
}
|
|
6749
6750
|
function Bf(e) {
|
|
6750
6751
|
const { proxyBaseUrl: t, currentSessionId: n, enabled: s, onConnected: o, onSessionUpdate: i } = e, l = /* @__PURE__ */ F({});
|
|
6751
|
-
function r(
|
|
6752
|
-
return
|
|
6752
|
+
function r(y) {
|
|
6753
|
+
return y?.role === "assistant" && typeof y?.time?.completed != "number";
|
|
6753
6754
|
}
|
|
6754
|
-
function a(
|
|
6755
|
-
const B = l.value[
|
|
6756
|
-
l.value[
|
|
6755
|
+
function a(y) {
|
|
6756
|
+
const B = l.value[y], k = B?.hasPending || B?.statusType !== "idle";
|
|
6757
|
+
l.value[y] = {
|
|
6757
6758
|
thinking: k,
|
|
6758
6759
|
statusType: B?.statusType || "idle",
|
|
6759
6760
|
hasPending: B?.hasPending || !1
|
|
6760
6761
|
};
|
|
6761
6762
|
}
|
|
6762
|
-
function u(
|
|
6763
|
-
const B =
|
|
6763
|
+
function u(y) {
|
|
6764
|
+
const B = y.type, k = y.properties;
|
|
6764
6765
|
switch (B) {
|
|
6765
6766
|
case "session.updated": {
|
|
6766
6767
|
const N = k.info;
|
|
@@ -6820,26 +6821,26 @@ function Bf(e) {
|
|
|
6820
6821
|
onEvent: u,
|
|
6821
6822
|
onConnected: o
|
|
6822
6823
|
}), d = Y(() => {
|
|
6823
|
-
const
|
|
6824
|
-
return
|
|
6824
|
+
const y = n.value;
|
|
6825
|
+
return y ? l.value[y]?.thinking ?? !1 : !1;
|
|
6825
6826
|
}), p = Y(() => {
|
|
6826
|
-
const
|
|
6827
|
-
return
|
|
6828
|
-
}), _ = Y(() => Object.values(l.value).some((
|
|
6829
|
-
function S(
|
|
6830
|
-
delete l.value[
|
|
6827
|
+
const y = n.value;
|
|
6828
|
+
return y && l.value[y] || null;
|
|
6829
|
+
}), _ = Y(() => Object.values(l.value).some((y) => y.thinking)), x = Y(() => Object.values(l.value).filter((y) => y.thinking).length);
|
|
6830
|
+
function S(y) {
|
|
6831
|
+
delete l.value[y];
|
|
6831
6832
|
}
|
|
6832
6833
|
function D() {
|
|
6833
6834
|
l.value = {};
|
|
6834
6835
|
}
|
|
6835
|
-
function L(
|
|
6836
|
-
return l.value[
|
|
6836
|
+
function L(y) {
|
|
6837
|
+
return l.value[y];
|
|
6837
6838
|
}
|
|
6838
|
-
function C(
|
|
6839
|
-
return l.value[
|
|
6839
|
+
function C(y) {
|
|
6840
|
+
return l.value[y]?.thinking ?? !1;
|
|
6840
6841
|
}
|
|
6841
|
-
function $(
|
|
6842
|
-
return
|
|
6842
|
+
function $(y) {
|
|
6843
|
+
return y.reduce(
|
|
6843
6844
|
(B, k) => (B[k] = C(k), B),
|
|
6844
6845
|
{}
|
|
6845
6846
|
);
|
|
@@ -7032,8 +7033,8 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7032
7033
|
},
|
|
7033
7034
|
setup(e) {
|
|
7034
7035
|
return (t, n) => (W(), z("div", Uf, [
|
|
7035
|
-
n[0] || (n[0] =
|
|
7036
|
-
|
|
7036
|
+
n[0] || (n[0] = b("div", { class: "opencode-loading-spinner" }, null, -1)),
|
|
7037
|
+
b("div", qf, we(e.loadingText), 1)
|
|
7037
7038
|
]));
|
|
7038
7039
|
}
|
|
7039
7040
|
}), Yf = { class: "opencode-chrome-warmup-failed" }, Xf = { class: "opencode-chrome-warmup-failed-text" }, Gf = { class: "opencode-chrome-warmup-error-details" }, Jf = { class: "opencode-chrome-warmup-failed-text" }, Zf = { key: 0 }, Qf = { key: 1 }, ed = { class: "opencode-chrome-warmup-failed-actions" }, td = ["disabled"], nd = /* @__PURE__ */ tt({
|
|
@@ -7047,8 +7048,8 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7047
7048
|
setup(e, { emit: t }) {
|
|
7048
7049
|
const n = t;
|
|
7049
7050
|
return (s, o) => (W(), z("div", Yf, [
|
|
7050
|
-
o[9] || (o[9] =
|
|
7051
|
-
|
|
7051
|
+
o[9] || (o[9] = b("div", { class: "opencode-chrome-warmup-failed-icon" }, [
|
|
7052
|
+
b("svg", {
|
|
7052
7053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7053
7054
|
fill: "none",
|
|
7054
7055
|
viewBox: "0 0 24 24",
|
|
@@ -7057,7 +7058,7 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7057
7058
|
stroke: "currentColor",
|
|
7058
7059
|
"stroke-width": "1.5"
|
|
7059
7060
|
}, [
|
|
7060
|
-
|
|
7061
|
+
b("path", {
|
|
7061
7062
|
"stroke-linecap": "round",
|
|
7062
7063
|
"stroke-linejoin": "round",
|
|
7063
7064
|
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"
|
|
@@ -7065,45 +7066,45 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7065
7066
|
])
|
|
7066
7067
|
], -1)),
|
|
7067
7068
|
e.errorType === de(In).CHROME_NOT_CONNECTED ? (W(), z(fe, { key: 0 }, [
|
|
7068
|
-
o[1] || (o[1] =
|
|
7069
|
-
o[2] || (o[2] =
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7069
|
+
o[1] || (o[1] = b("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)),
|
|
7070
|
+
o[2] || (o[2] = b("div", { class: "opencode-chrome-warmup-failed-text" }, [
|
|
7071
|
+
b("p", null, "请按以下步骤开启 Chrome 远程调试:"),
|
|
7072
|
+
b("ol", { class: "opencode-chrome-warmup-steps" }, [
|
|
7073
|
+
b("li", null, [
|
|
7073
7074
|
Ws(" 在 Chrome 地址栏输入 "),
|
|
7074
|
-
|
|
7075
|
+
b("code", { class: "opencode-chrome-warmup-code" }, "chrome://inspect/#remote-debugging")
|
|
7075
7076
|
]),
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7077
|
+
b("li", null, "勾选 'Allow remote debugging for this browser instance' 选项"),
|
|
7078
|
+
b("li", null, "重新启动浏览器"),
|
|
7079
|
+
b("li", null, "完成后点击下方按钮重试")
|
|
7079
7080
|
])
|
|
7080
7081
|
], -1))
|
|
7081
7082
|
], 64)) : e.errorType === de(In).AI_TIMEOUT ? (W(), z(fe, { key: 1 }, [
|
|
7082
|
-
o[3] || (o[3] =
|
|
7083
|
-
o[4] || (o[4] =
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7083
|
+
o[3] || (o[3] = b("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应超时", -1)),
|
|
7084
|
+
o[4] || (o[4] = b("div", { class: "opencode-chrome-warmup-failed-text" }, [
|
|
7085
|
+
b("p", null, "AI 模型响应超时,可能的原因:"),
|
|
7086
|
+
b("ol", { class: "opencode-chrome-warmup-steps" }, [
|
|
7087
|
+
b("li", null, "OpenCode AI 模型未正确配置"),
|
|
7088
|
+
b("li", null, "AI 模型服务不可用或响应缓慢"),
|
|
7089
|
+
b("li", null, "网络连接问题")
|
|
7089
7090
|
]),
|
|
7090
|
-
|
|
7091
|
+
b("p", { style: { "margin-top": "12px", "font-weight": "500" } }, "请检查 OpenCode 配置文件中的 AI 模型设置")
|
|
7091
7092
|
], -1))
|
|
7092
7093
|
], 64)) : e.errorType === de(In).AI_RESPONSE_ERROR ? (W(), z(fe, { key: 2 }, [
|
|
7093
|
-
o[7] || (o[7] =
|
|
7094
|
-
|
|
7095
|
-
o[5] || (o[5] =
|
|
7096
|
-
|
|
7097
|
-
o[6] || (o[6] =
|
|
7094
|
+
o[7] || (o[7] = b("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应错误", -1)),
|
|
7095
|
+
b("div", Xf, [
|
|
7096
|
+
o[5] || (o[5] = b("p", null, "AI 模型返回了意外的响应:", -1)),
|
|
7097
|
+
b("div", Gf, we(e.errorMessage || "未知错误"), 1),
|
|
7098
|
+
o[6] || (o[6] = b("p", { style: { "margin-top": "12px" } }, "请检查 OpenCode AI 模型配置是否正确", -1))
|
|
7098
7099
|
])
|
|
7099
7100
|
], 64)) : (W(), z(fe, { key: 3 }, [
|
|
7100
|
-
o[8] || (o[8] =
|
|
7101
|
-
|
|
7101
|
+
o[8] || (o[8] = b("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)),
|
|
7102
|
+
b("div", Jf, [
|
|
7102
7103
|
e.errorMessage ? (W(), z("p", Zf, we(e.errorMessage), 1)) : (W(), z("p", Qf, "连接失败,请重试"))
|
|
7103
7104
|
])
|
|
7104
7105
|
], 64)),
|
|
7105
|
-
|
|
7106
|
-
|
|
7106
|
+
b("div", ed, [
|
|
7107
|
+
b("button", {
|
|
7107
7108
|
class: "opencode-chrome-warmup-failed-btn primary",
|
|
7108
7109
|
disabled: e.retrying,
|
|
7109
7110
|
onClick: o[0] || (o[0] = (i) => n("retry"))
|
|
@@ -7135,17 +7136,10 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7135
7136
|
chromeMcpFailed: L,
|
|
7136
7137
|
chromeMcpErrorType: C,
|
|
7137
7138
|
chromeMcpErrorMessage: $,
|
|
7138
|
-
loadingText:
|
|
7139
|
+
loadingText: y,
|
|
7139
7140
|
updateStatusFromTask: B,
|
|
7140
7141
|
setStarting: k
|
|
7141
|
-
} = Wf(), {
|
|
7142
|
-
selectedElements: N,
|
|
7143
|
-
removeElement: R,
|
|
7144
|
-
clearElements: Q
|
|
7145
|
-
} = Vf(), {
|
|
7146
|
-
theme: X,
|
|
7147
|
-
sendThemeToIframe: ue
|
|
7148
|
-
} = Hf(_, l), {
|
|
7142
|
+
} = Wf(), { selectedElements: N, removeElement: R, clearElements: Q } = Vf(), { theme: X, sendThemeToIframe: ue } = Hf(_, l), {
|
|
7149
7143
|
sessions: pe,
|
|
7150
7144
|
loadingSessionList: P,
|
|
7151
7145
|
currentSessionId: G,
|
|
@@ -7174,7 +7168,7 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7174
7168
|
onSessionUpdate: (g) => {
|
|
7175
7169
|
De(g);
|
|
7176
7170
|
}
|
|
7177
|
-
}), dt = Ne.hasAnyThinking, Re = Ne.sessionStates, We = Y(() => D.value === "starting"), Ye = Y(() => D.value === "starting" || K.value), Ot = Y(() => D.value === "starting" ?
|
|
7171
|
+
}), dt = Ne.hasAnyThinking, Re = Ne.sessionStates, We = Y(() => D.value === "starting"), Ye = Y(() => D.value === "starting" || K.value), Ot = Y(() => D.value === "starting" ? y.value : "加载会话..."), st = async () => {
|
|
7178
7172
|
r.value = !0;
|
|
7179
7173
|
try {
|
|
7180
7174
|
const v = await (await fetch("/__opencode_warmup__", { method: "POST" })).json();
|
|
@@ -7200,7 +7194,7 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7200
7194
|
}), ft(D, (g, v) => {
|
|
7201
7195
|
g !== "idle" && v === "idle" && (Pe.connect(), Ne.connect());
|
|
7202
7196
|
}), nt(() => {
|
|
7203
|
-
D.value
|
|
7197
|
+
D.value === "ready" && (xe(), Pe.connect(), Ne.connect(), me(!0)), u && D.value === "ready" && setTimeout(() => {
|
|
7204
7198
|
n.value = !0;
|
|
7205
7199
|
}, 1e3);
|
|
7206
7200
|
const g = (v) => {
|
|
@@ -7224,7 +7218,9 @@ const Uf = { class: "opencode-custom-loading" }, qf = { class: "opencode-loading
|
|
|
7224
7218
|
previewPageUrl: window.location.href,
|
|
7225
7219
|
previewPageTitle: document.title
|
|
7226
7220
|
};
|
|
7227
|
-
l.value?.sendMessageToIframe("OPENCODE_INSERT_FILE_PART", {
|
|
7221
|
+
l.value?.sendMessageToIframe("OPENCODE_INSERT_FILE_PART", {
|
|
7222
|
+
element: v
|
|
7223
|
+
}), S("节点已添加到对话框", { mode: "page" });
|
|
7228
7224
|
}, m = () => {
|
|
7229
7225
|
Q(), me(!0), S("已清除所有选中元素");
|
|
7230
7226
|
}, E = (g) => {
|