reactive-vscode 0.3.1 → 0.3.2
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/README.md +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +382 -407
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,218 +1,210 @@
|
|
|
1
|
-
import { getCurrentScope as U, onScopeDispose as
|
|
1
|
+
import { getCurrentScope as U, onScopeDispose as L, effectScope as Y, shallowRef as g, computed as h, shallowReactive as $, toValue as a, watchEffect as b, watch as C, unref as I, ref as S, toRaw as ie, isRef as oe } from "@reactive-vscode/reactivity";
|
|
2
2
|
export * from "@reactive-vscode/reactivity";
|
|
3
|
-
import { workspace as
|
|
4
|
-
function
|
|
5
|
-
return U() ? (
|
|
3
|
+
import { workspace as T, commands as P, window as v, debug as q, extensions as W, chat as ae, comments as se, env as E, EventEmitter as G, tasks as k, Uri as re, languages as ce, ColorThemeKind as z, l10n as Q, lm as F } from "vscode";
|
|
4
|
+
function ue(e) {
|
|
5
|
+
return U() ? (L(e), !0) : !1;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function N(e, t) {
|
|
8
8
|
const n = /* @__PURE__ */ new Map();
|
|
9
9
|
return (...i) => {
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
return
|
|
10
|
+
const o = t(...i);
|
|
11
|
+
let r = n.get(o);
|
|
12
|
+
return r ? r.refCount++ : (r = {
|
|
13
13
|
data: e(...i),
|
|
14
14
|
refCount: 1
|
|
15
|
-
}, n.set(
|
|
16
|
-
--
|
|
17
|
-
}),
|
|
15
|
+
}, n.set(o, r)), ue(() => {
|
|
16
|
+
--r.refCount === 0 && n.delete(o);
|
|
17
|
+
}), r.data;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function w(e) {
|
|
21
21
|
let t = !1, n;
|
|
22
22
|
return () => (t || (n = Y(!0).run(e), t = !0), n);
|
|
23
23
|
}
|
|
24
24
|
const J = [];
|
|
25
|
-
function
|
|
25
|
+
function Se(e) {
|
|
26
26
|
J.push(e);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const y = g(null), M = Y();
|
|
29
29
|
function Ee(e) {
|
|
30
30
|
return {
|
|
31
|
-
activate: (t) => (
|
|
31
|
+
activate: (t) => (y.value = t, M.run(() => (X.map((n) => n(t)), e(t)))),
|
|
32
32
|
deactivate: () => {
|
|
33
|
-
J.map((t) => t()),
|
|
33
|
+
J.map((t) => t()), M.stop();
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
const X = [];
|
|
38
38
|
function Z(e) {
|
|
39
|
-
|
|
39
|
+
y.value ? e(y.value) : X.push(e);
|
|
40
40
|
}
|
|
41
41
|
function le(e, t, n) {
|
|
42
|
-
const i = !e,
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
get: () =>
|
|
42
|
+
const i = !e, o = T.getConfiguration(i ? void 0 : e, n);
|
|
43
|
+
function r(u, d) {
|
|
44
|
+
const l = g(d), m = h({
|
|
45
|
+
get: () => l.value,
|
|
46
46
|
set: (f) => {
|
|
47
|
-
|
|
47
|
+
l.value = f, o.update(u, f);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
return m.update = async (f,
|
|
51
|
-
await
|
|
50
|
+
return m.update = async (f, p, D) => {
|
|
51
|
+
await o.update(u, f, p, D), m.value = f;
|
|
52
52
|
}, m.set = (f) => {
|
|
53
|
-
|
|
53
|
+
l.value = f;
|
|
54
54
|
}, m;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
Object.keys(t).map((u) => [u,
|
|
56
|
+
const s = Object.fromEntries(
|
|
57
|
+
Object.keys(t).map((u) => [u, r(u, o.get(u))])
|
|
58
58
|
);
|
|
59
59
|
return Z(() => {
|
|
60
|
-
|
|
60
|
+
c(T.onDidChangeConfiguration(
|
|
61
61
|
i ? (u) => {
|
|
62
|
-
const d =
|
|
63
|
-
for (const
|
|
64
|
-
u.affectsConfiguration(
|
|
62
|
+
const d = T.getConfiguration();
|
|
63
|
+
for (const l in t)
|
|
64
|
+
u.affectsConfiguration(l) && s[l].set(d.get(l));
|
|
65
65
|
} : (u) => {
|
|
66
66
|
if (!u.affectsConfiguration(e))
|
|
67
67
|
return;
|
|
68
|
-
const d =
|
|
69
|
-
for (const
|
|
70
|
-
u.affectsConfiguration(`${e}.${
|
|
68
|
+
const d = T.getConfiguration(e);
|
|
69
|
+
for (const l in t)
|
|
70
|
+
u.affectsConfiguration(`${e}.${l}`) && s[l].set(d.get(l));
|
|
71
71
|
}
|
|
72
72
|
));
|
|
73
|
-
}),
|
|
73
|
+
}), s;
|
|
74
74
|
}
|
|
75
75
|
function ke(e, t, n) {
|
|
76
|
-
const i = le(e, t, n),
|
|
77
|
-
$update(
|
|
78
|
-
return i[
|
|
76
|
+
const i = le(e, t, n), o = {}, r = $({
|
|
77
|
+
$update(s, u, d, l) {
|
|
78
|
+
return i[s].update(u, d, l);
|
|
79
79
|
},
|
|
80
|
-
$set(
|
|
81
|
-
return i[
|
|
80
|
+
$set(s, u) {
|
|
81
|
+
return i[s].set(u);
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
for (const
|
|
85
|
-
const u =
|
|
86
|
-
let d = "",
|
|
87
|
-
for (const
|
|
88
|
-
d = d ? `${d}.${
|
|
89
|
-
const
|
|
90
|
-
if (m[
|
|
91
|
-
m = m[
|
|
84
|
+
for (const s in t) {
|
|
85
|
+
const u = s.split(".");
|
|
86
|
+
let d = "", l = o, m = r;
|
|
87
|
+
for (const p of u.slice(0, -1)) {
|
|
88
|
+
d = d ? `${d}.${p}` : p;
|
|
89
|
+
const D = l = l[p] ||= {};
|
|
90
|
+
if (m[p])
|
|
91
|
+
m = m[p];
|
|
92
92
|
else {
|
|
93
|
-
const
|
|
94
|
-
Object.defineProperty(m,
|
|
93
|
+
const H = $({});
|
|
94
|
+
Object.defineProperty(m, p, {
|
|
95
95
|
enumerable: !0,
|
|
96
96
|
get() {
|
|
97
|
-
return
|
|
97
|
+
return H;
|
|
98
98
|
},
|
|
99
99
|
set(ne) {
|
|
100
|
-
function
|
|
101
|
-
if (
|
|
102
|
-
for (const
|
|
103
|
-
|
|
100
|
+
function B(V, A, K) {
|
|
101
|
+
if (V)
|
|
102
|
+
for (const R in V)
|
|
103
|
+
B(V[R], A ? `${A}.${R}` : R, K?.[R]);
|
|
104
104
|
else
|
|
105
|
-
i[
|
|
105
|
+
i[A].value = K;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
B(D, d, ne);
|
|
108
108
|
}
|
|
109
|
-
}), m =
|
|
109
|
+
}), m = H;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
const f = u[u.length - 1];
|
|
113
|
-
|
|
113
|
+
l[f] = null, Object.defineProperty(m, f, {
|
|
114
114
|
enumerable: !0,
|
|
115
115
|
get() {
|
|
116
|
-
return i[
|
|
116
|
+
return i[s].value;
|
|
117
117
|
},
|
|
118
|
-
set(
|
|
119
|
-
i[
|
|
118
|
+
set(p) {
|
|
119
|
+
i[s].value = p;
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return r;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const n = g(null), i = [],
|
|
125
|
+
function ye(e, t) {
|
|
126
|
+
const n = g(null), i = [], o = (r) => (...s) => n.value ? n.value[r](...s) : (i.push([r, s]), null);
|
|
127
127
|
return Z(() => {
|
|
128
|
-
n.value =
|
|
129
|
-
for (const [
|
|
130
|
-
n.value[
|
|
128
|
+
n.value = be(e, t);
|
|
129
|
+
for (const [r, s] of i)
|
|
130
|
+
n.value[r](...s);
|
|
131
131
|
}), {
|
|
132
132
|
logger: n,
|
|
133
|
-
outputChannel: h(() =>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
clear: a("clear"),
|
|
144
|
-
show: a("show"),
|
|
145
|
-
hide: a("hide")
|
|
133
|
+
outputChannel: h(() => n.value?.outputChannel),
|
|
134
|
+
info: o("info"),
|
|
135
|
+
warn: o("warn"),
|
|
136
|
+
error: o("error"),
|
|
137
|
+
append: o("append"),
|
|
138
|
+
appendLine: o("appendLine"),
|
|
139
|
+
replace: o("replace"),
|
|
140
|
+
clear: o("clear"),
|
|
141
|
+
show: o("show"),
|
|
142
|
+
hide: o("hide")
|
|
146
143
|
};
|
|
147
144
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
145
|
+
function Re(e, ...t) {
|
|
146
|
+
return P.executeCommand(e, ...t);
|
|
150
147
|
}
|
|
151
148
|
function de(e, t = !1) {
|
|
152
|
-
const n =
|
|
149
|
+
const n = y.value;
|
|
153
150
|
if (!n && !t)
|
|
154
151
|
throw new Error("Cannot get absolute path because the extension is not activated yet");
|
|
155
|
-
return n
|
|
152
|
+
return n?.asAbsolutePath(e);
|
|
156
153
|
}
|
|
157
154
|
function Oe(e, t = !1) {
|
|
158
|
-
return h(() => de(
|
|
155
|
+
return h(() => de(a(e), t));
|
|
159
156
|
}
|
|
160
|
-
function
|
|
161
|
-
return (U() ??
|
|
157
|
+
function c(e) {
|
|
158
|
+
return (U() ?? M).cleanups.push(e.dispose.bind(e)), e;
|
|
162
159
|
}
|
|
163
|
-
const fe =
|
|
160
|
+
const fe = w(() => {
|
|
164
161
|
const e = g(v.activeColorTheme);
|
|
165
|
-
return
|
|
162
|
+
return c(v.onDidChangeActiveColorTheme((t) => {
|
|
166
163
|
e.value = t;
|
|
167
164
|
})), e;
|
|
168
|
-
}), Pe =
|
|
169
|
-
const e = g(
|
|
170
|
-
return
|
|
165
|
+
}), Pe = w(() => {
|
|
166
|
+
const e = g(q.activeDebugSession);
|
|
167
|
+
return c(q.onDidChangeActiveDebugSession((t) => {
|
|
171
168
|
e.value = t;
|
|
172
169
|
})), h(() => e.value);
|
|
173
|
-
}), ve =
|
|
170
|
+
}), ve = w(() => {
|
|
174
171
|
const e = g(v.activeTextEditor);
|
|
175
|
-
return
|
|
172
|
+
return c(v.onDidChangeActiveTextEditor((t) => {
|
|
176
173
|
e.value = t;
|
|
177
174
|
})), e;
|
|
178
175
|
});
|
|
179
176
|
function ge(e) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}), l(S.onDidChangeTextDocument((i) => {
|
|
186
|
-
i.document === o(e) && (t.value = i.document.getText());
|
|
177
|
+
const t = g(a(e)?.getText());
|
|
178
|
+
return b(() => {
|
|
179
|
+
t.value = a(e)?.getText();
|
|
180
|
+
}), c(T.onDidChangeTextDocument((n) => {
|
|
181
|
+
n.document === a(e) && (t.value = n.document.getText());
|
|
187
182
|
})), t;
|
|
188
183
|
}
|
|
189
184
|
function he(e, t, n, i = {}) {
|
|
190
185
|
const {
|
|
191
|
-
updateOn:
|
|
186
|
+
updateOn: o = ["effect", "documentChanged"]
|
|
192
187
|
} = i;
|
|
193
|
-
let
|
|
194
|
-
const
|
|
188
|
+
let r;
|
|
189
|
+
const s = h(
|
|
195
190
|
() => {
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
if ("key" in
|
|
199
|
-
return
|
|
200
|
-
const m = v.createTextEditorDecorationType(
|
|
201
|
-
return
|
|
191
|
+
r?.dispose(), r = void 0;
|
|
192
|
+
const l = a(t);
|
|
193
|
+
if ("key" in l)
|
|
194
|
+
return l;
|
|
195
|
+
const m = v.createTextEditorDecorationType(l);
|
|
196
|
+
return r = c(m), m;
|
|
202
197
|
}
|
|
203
198
|
), u = async () => {
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
typeof n == "function" ? await n(
|
|
199
|
+
const l = a(e);
|
|
200
|
+
l && l.setDecorations(
|
|
201
|
+
s.value,
|
|
202
|
+
typeof n == "function" ? await n(l) : a(n)
|
|
208
203
|
);
|
|
209
|
-
}, d =
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}) :
|
|
213
|
-
return a.includes("effect") ? w(async () => {
|
|
214
|
-
d == null || d.value, await u();
|
|
215
|
-
}) : d && D(d, u), {
|
|
204
|
+
}, d = o.includes("documentChanged") ? ge(() => a(e)?.document) : null;
|
|
205
|
+
return o.includes("effect") ? b(async () => {
|
|
206
|
+
d?.value, await u();
|
|
207
|
+
}) : d && C(d, u), {
|
|
216
208
|
/**
|
|
217
209
|
* Manually trigger the decoration update.
|
|
218
210
|
*/
|
|
@@ -223,213 +215,209 @@ function Ve(e, t, n = {}) {
|
|
|
223
215
|
const i = ve();
|
|
224
216
|
return he(i, e, t, n);
|
|
225
217
|
}
|
|
226
|
-
const Ae =
|
|
218
|
+
const Ae = w(() => {
|
|
227
219
|
const e = g(v.activeNotebookEditor);
|
|
228
|
-
return
|
|
220
|
+
return c(v.onDidChangeActiveNotebookEditor((t) => {
|
|
229
221
|
e.value = t;
|
|
230
222
|
})), e;
|
|
231
|
-
}), Ie =
|
|
223
|
+
}), Ie = w(() => {
|
|
232
224
|
const e = g(v.activeTerminal);
|
|
233
|
-
return
|
|
225
|
+
return c(v.onDidChangeActiveTerminal((t) => {
|
|
234
226
|
e.value = t;
|
|
235
227
|
})), e;
|
|
236
|
-
}), We =
|
|
237
|
-
const e = g(
|
|
238
|
-
return
|
|
239
|
-
e.value =
|
|
228
|
+
}), We = w(() => {
|
|
229
|
+
const e = g(W.all);
|
|
230
|
+
return c(W.onDidChange(() => {
|
|
231
|
+
e.value = W.all;
|
|
240
232
|
})), h(() => e.value);
|
|
241
233
|
});
|
|
242
|
-
function
|
|
243
|
-
const n = (i,
|
|
244
|
-
|
|
234
|
+
function x(e, t) {
|
|
235
|
+
const n = (i, o, r) => {
|
|
236
|
+
c(e(i, o, r));
|
|
245
237
|
};
|
|
246
|
-
return t
|
|
238
|
+
return t?.forEach((i) => n(i)), n;
|
|
247
239
|
}
|
|
248
240
|
function _(e, t, n) {
|
|
249
241
|
for (const i of n) {
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
e[i] = o
|
|
242
|
+
const o = t[i];
|
|
243
|
+
o !== void 0 && b(() => {
|
|
244
|
+
e[i] = a(o);
|
|
253
245
|
});
|
|
254
246
|
}
|
|
255
247
|
}
|
|
256
|
-
const
|
|
257
|
-
const i =
|
|
248
|
+
const Fe = N((e, t, n = {}) => {
|
|
249
|
+
const i = c(ae.createChatParticipant(e, I(t)));
|
|
258
250
|
return _(i, n, [
|
|
259
251
|
"iconPath"
|
|
260
|
-
]), n.followupProvider !== void 0 &&
|
|
261
|
-
i.followupProvider =
|
|
262
|
-
}),
|
|
263
|
-
i.requestHandler =
|
|
252
|
+
]), n.followupProvider !== void 0 && b(() => {
|
|
253
|
+
i.followupProvider = I(n.followupProvider);
|
|
254
|
+
}), b(() => {
|
|
255
|
+
i.requestHandler = I(t);
|
|
264
256
|
}), {
|
|
265
|
-
onDidReceiveFeedback:
|
|
257
|
+
onDidReceiveFeedback: x(i.onDidReceiveFeedback)
|
|
266
258
|
};
|
|
267
259
|
}, (e) => e);
|
|
268
260
|
function me(e, t) {
|
|
269
|
-
|
|
261
|
+
c(P.registerCommand(e, t));
|
|
270
262
|
}
|
|
271
|
-
function
|
|
263
|
+
function $e(e) {
|
|
272
264
|
for (const [t, n] of Object.entries(e))
|
|
273
265
|
n && me(t, n);
|
|
274
266
|
}
|
|
275
267
|
function Me(e, t) {
|
|
276
|
-
return
|
|
268
|
+
return c(se.createCommentController(e, t));
|
|
277
269
|
}
|
|
278
270
|
function ee(e) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}), l(v.onDidChangeTerminalState((i) => {
|
|
285
|
-
i === o(e) && (t.value = i.state);
|
|
271
|
+
const t = g(a(e)?.state);
|
|
272
|
+
return C(e, () => {
|
|
273
|
+
t.value = a(e)?.state;
|
|
274
|
+
}), c(v.onDidChangeTerminalState((n) => {
|
|
275
|
+
n === a(e) && (t.value = n.state);
|
|
286
276
|
})), h(() => t.value);
|
|
287
277
|
}
|
|
288
278
|
function Le(...e) {
|
|
289
|
-
const t =
|
|
279
|
+
const t = S(null);
|
|
290
280
|
function n() {
|
|
291
281
|
return !!t.value && t.value.exitStatus == null;
|
|
292
282
|
}
|
|
293
283
|
function i() {
|
|
294
284
|
return n() ? t.value : t.value = v.createTerminal(...e);
|
|
295
285
|
}
|
|
296
|
-
function
|
|
286
|
+
function o(u) {
|
|
297
287
|
i().sendText(u);
|
|
298
288
|
}
|
|
299
|
-
function
|
|
289
|
+
function r() {
|
|
300
290
|
i().show();
|
|
301
291
|
}
|
|
302
|
-
function
|
|
292
|
+
function s() {
|
|
303
293
|
n() && (t.value.sendText(""), t.value.dispose(), t.value = null);
|
|
304
294
|
}
|
|
305
|
-
return
|
|
295
|
+
return L(s), {
|
|
306
296
|
terminal: t,
|
|
307
297
|
getIsActive: n,
|
|
308
|
-
show:
|
|
309
|
-
sendText:
|
|
310
|
-
close:
|
|
298
|
+
show: r,
|
|
299
|
+
sendText: o,
|
|
300
|
+
close: s,
|
|
311
301
|
state: ee(t)
|
|
312
302
|
};
|
|
313
303
|
}
|
|
314
|
-
const Ne =
|
|
304
|
+
const Ne = w(() => {
|
|
315
305
|
const e = g(E.shell);
|
|
316
|
-
return
|
|
306
|
+
return c(E.onDidChangeShell((t) => {
|
|
317
307
|
e.value = t;
|
|
318
308
|
})), h(() => e.value);
|
|
319
309
|
});
|
|
320
|
-
function
|
|
321
|
-
const n = Array.isArray(e) ? e : t ?? [], i =
|
|
322
|
-
for (const
|
|
323
|
-
|
|
310
|
+
function O(e, t = []) {
|
|
311
|
+
const n = Array.isArray(e) ? e : t ?? [], i = c(Array.isArray(e) || e == null ? new G() : e), o = x(i.event, n);
|
|
312
|
+
for (const r of n)
|
|
313
|
+
o(r);
|
|
324
314
|
return {
|
|
325
315
|
event: i.event,
|
|
326
316
|
fire: i.fire.bind(i),
|
|
327
|
-
addListener:
|
|
317
|
+
addListener: o
|
|
328
318
|
};
|
|
329
319
|
}
|
|
330
320
|
async function je(e) {
|
|
331
|
-
const t =
|
|
321
|
+
const t = y.value.secrets, n = S(await t.get(e));
|
|
332
322
|
return n.set = async (i) => {
|
|
333
323
|
n.value = i, await t.store(e, i);
|
|
334
324
|
}, n.remove = async () => {
|
|
335
325
|
n.value = void 0, await t.delete(e);
|
|
336
|
-
},
|
|
326
|
+
}, c(t.onDidChange(async (i) => {
|
|
337
327
|
i.key === e && (n.value = await t.get(e));
|
|
338
|
-
})),
|
|
328
|
+
})), C(n, (i) => {
|
|
339
329
|
i === void 0 ? t.delete(e) : t.store(e, i);
|
|
340
330
|
}), n;
|
|
341
331
|
}
|
|
342
332
|
function He(e) {
|
|
343
|
-
return h(() => k.fetchTasks(
|
|
333
|
+
return h(() => k.fetchTasks(a(e)));
|
|
344
334
|
}
|
|
345
335
|
function Be(e) {
|
|
346
|
-
return h(() =>
|
|
336
|
+
return h(() => re.file(a(e)));
|
|
347
337
|
}
|
|
348
|
-
function
|
|
338
|
+
function Ke(e, t) {
|
|
349
339
|
const n = new G(), i = g();
|
|
350
|
-
|
|
351
|
-
i.value && n.fire(), i.value =
|
|
352
|
-
}),
|
|
340
|
+
b(() => {
|
|
341
|
+
i.value && n.fire(), i.value = a(t);
|
|
342
|
+
}), c(ce.registerFoldingRangeProvider(
|
|
353
343
|
e,
|
|
354
344
|
{
|
|
355
345
|
onDidChangeFoldingRanges: n.event,
|
|
356
|
-
provideFoldingRanges(
|
|
357
|
-
|
|
358
|
-
return (u = i.value) == null ? void 0 : u.call(i, a, s, r);
|
|
346
|
+
provideFoldingRanges(o, r, s) {
|
|
347
|
+
return i.value?.(o, r, s);
|
|
359
348
|
}
|
|
360
349
|
}
|
|
361
350
|
));
|
|
362
351
|
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
365
|
-
const f =
|
|
352
|
+
function qe(e, t, n, i) {
|
|
353
|
+
const o = $(/* @__PURE__ */ new Map()), r = O(), s = O(), u = O(), d = h(() => {
|
|
354
|
+
const f = a(e);
|
|
366
355
|
return Array.isArray(f) ? f : f instanceof Set ? Array.from(f) : [f];
|
|
367
356
|
});
|
|
368
|
-
function
|
|
357
|
+
function l() {
|
|
369
358
|
const f = d.value;
|
|
370
|
-
for (const [
|
|
371
|
-
f.includes(
|
|
372
|
-
for (const
|
|
373
|
-
if (!
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
359
|
+
for (const [p, D] of o)
|
|
360
|
+
f.includes(p) || (D.dispose(), o.delete(p));
|
|
361
|
+
for (const p of f)
|
|
362
|
+
if (!o.has(p)) {
|
|
363
|
+
const D = T.createFileSystemWatcher(
|
|
364
|
+
p,
|
|
365
|
+
a(t) || !1,
|
|
366
|
+
a(n) || !1,
|
|
367
|
+
a(i) || !1
|
|
379
368
|
);
|
|
380
|
-
|
|
369
|
+
D.onDidCreate(r.fire), D.onDidChange(s.fire), D.onDidDelete(u.fire), o.set(p, D);
|
|
381
370
|
}
|
|
382
371
|
}
|
|
383
372
|
function m() {
|
|
384
|
-
for (const f of
|
|
373
|
+
for (const f of o.values())
|
|
385
374
|
f.dispose();
|
|
386
|
-
|
|
375
|
+
o.clear();
|
|
387
376
|
}
|
|
388
|
-
return
|
|
377
|
+
return l(), C(d, l), C(
|
|
389
378
|
() => [
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
379
|
+
a(t),
|
|
380
|
+
a(n),
|
|
381
|
+
a(i)
|
|
393
382
|
],
|
|
394
383
|
() => {
|
|
395
|
-
m(),
|
|
384
|
+
m(), l();
|
|
396
385
|
}
|
|
397
|
-
),
|
|
398
|
-
watchers:
|
|
399
|
-
onDidCreate:
|
|
400
|
-
onDidChange:
|
|
386
|
+
), L(m), {
|
|
387
|
+
watchers: o,
|
|
388
|
+
onDidCreate: r.event,
|
|
389
|
+
onDidChange: s.event,
|
|
401
390
|
onDidDelete: u.event
|
|
402
391
|
};
|
|
403
392
|
}
|
|
404
|
-
const
|
|
393
|
+
const ze = w(() => {
|
|
405
394
|
const e = fe();
|
|
406
|
-
return h(() => e.value.kind ===
|
|
407
|
-
}), Qe =
|
|
395
|
+
return h(() => e.value.kind === z.Dark || e.value.kind === z.HighContrast);
|
|
396
|
+
}), Qe = w(() => {
|
|
408
397
|
const e = g(E.isTelemetryEnabled);
|
|
409
|
-
return
|
|
398
|
+
return c(E.onDidChangeTelemetryEnabled((t) => {
|
|
410
399
|
e.value = t;
|
|
411
400
|
})), h(() => e.value);
|
|
412
401
|
});
|
|
413
402
|
function Ue(e, ...t) {
|
|
414
|
-
return h(() => typeof t[0] == "object" ? Q.t(
|
|
403
|
+
return h(() => typeof t[0] == "object" ? Q.t(a(e), ie(t[0])) : Q.t(a(e), ...t.map(a)));
|
|
415
404
|
}
|
|
416
|
-
const Ye =
|
|
405
|
+
const Ye = w(() => {
|
|
417
406
|
const e = g(F.tools);
|
|
418
|
-
return
|
|
407
|
+
return c(F.onDidChangeChatModels(() => {
|
|
419
408
|
e.value = F.tools;
|
|
420
409
|
})), h(() => e.value);
|
|
421
410
|
});
|
|
422
|
-
function
|
|
423
|
-
return
|
|
411
|
+
function pe(e, t) {
|
|
412
|
+
return c(v.createOutputChannel(e, t));
|
|
424
413
|
}
|
|
425
414
|
function Ge(e) {
|
|
426
|
-
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"),
|
|
427
|
-
return `${n}-${i}-${
|
|
415
|
+
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0"), r = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0"), u = String(t.getSeconds()).padStart(2, "0"), d = String(t.getMilliseconds()).padStart(3, "0");
|
|
416
|
+
return `${n}-${i}-${o} ${r}:${s}:${u}.${d} [${e}] `;
|
|
428
417
|
}
|
|
429
|
-
function
|
|
430
|
-
const n = t.outputChannel ??
|
|
431
|
-
|
|
432
|
-
n.appendLine((((r = t.getPrefix) == null ? void 0 : r.call(t, a)) ?? "") + s.join(" "));
|
|
418
|
+
function be(e, t = {}) {
|
|
419
|
+
const n = t.outputChannel ?? pe(e, { log: !0 }), i = (o) => (...r) => {
|
|
420
|
+
n.appendLine((t.getPrefix?.(o) ?? "") + r.join(" "));
|
|
433
421
|
};
|
|
434
422
|
return {
|
|
435
423
|
outputChannel: n,
|
|
@@ -445,33 +433,31 @@ function we(e, t = {}) {
|
|
|
445
433
|
hide: n.hide.bind(n)
|
|
446
434
|
};
|
|
447
435
|
}
|
|
448
|
-
const Je =
|
|
436
|
+
const Je = w(() => {
|
|
449
437
|
const e = g(E.logLevel);
|
|
450
|
-
return
|
|
438
|
+
return c(E.onDidChangeLogLevel((t) => {
|
|
451
439
|
e.value = t;
|
|
452
440
|
})), h(() => e.value);
|
|
453
441
|
});
|
|
454
|
-
function
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}), l(v.onDidChangeNotebookEditorSelection((i) => {
|
|
461
|
-
i.notebookEditor === o(e) && (t.value = i.selections);
|
|
442
|
+
function we(e) {
|
|
443
|
+
const t = g(a(e)?.selections ?? []);
|
|
444
|
+
return C(e, () => {
|
|
445
|
+
t.value = a(e)?.selections ?? [];
|
|
446
|
+
}), c(v.onDidChangeNotebookEditorSelection((n) => {
|
|
447
|
+
n.notebookEditor === a(e) && (t.value = n.selections);
|
|
462
448
|
})), h({
|
|
463
449
|
get() {
|
|
464
450
|
return t.value;
|
|
465
451
|
},
|
|
466
|
-
set(
|
|
467
|
-
t.value =
|
|
468
|
-
const
|
|
469
|
-
|
|
452
|
+
set(n) {
|
|
453
|
+
t.value = n;
|
|
454
|
+
const i = a(e);
|
|
455
|
+
i && (i.selections = n);
|
|
470
456
|
}
|
|
471
457
|
});
|
|
472
458
|
}
|
|
473
459
|
function Xe(e) {
|
|
474
|
-
const t =
|
|
460
|
+
const t = we(e);
|
|
475
461
|
return h({
|
|
476
462
|
get() {
|
|
477
463
|
return t.value[0];
|
|
@@ -482,24 +468,22 @@ function Xe(e) {
|
|
|
482
468
|
});
|
|
483
469
|
}
|
|
484
470
|
function Ze(e) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}), l(v.onDidChangeNotebookEditorVisibleRanges((i) => {
|
|
491
|
-
i.notebookEditor === o(e) && (t.value = i.visibleRanges);
|
|
471
|
+
const t = g(a(e)?.visibleRanges ?? []);
|
|
472
|
+
return C(e, () => {
|
|
473
|
+
t.value = a(e)?.visibleRanges ?? [];
|
|
474
|
+
}), c(v.onDidChangeNotebookEditorVisibleRanges((n) => {
|
|
475
|
+
n.notebookEditor === a(e) && (t.value = n.visibleRanges);
|
|
492
476
|
})), h(() => t.value);
|
|
493
477
|
}
|
|
494
|
-
const _e =
|
|
478
|
+
const _e = w(() => {
|
|
495
479
|
const e = g(v.terminals);
|
|
496
480
|
function t() {
|
|
497
481
|
e.value = v.terminals;
|
|
498
482
|
}
|
|
499
|
-
return
|
|
483
|
+
return c(v.onDidOpenTerminal(t)), c(v.onDidCloseTerminal(t)), e;
|
|
500
484
|
});
|
|
501
485
|
function et(e = {}) {
|
|
502
|
-
const t =
|
|
486
|
+
const t = c(v.createQuickPick()), n = x(t.onDidChangeActive), i = x(t.onDidChangeSelection), o = x(t.onDidAccept), r = x(t.onDidHide), s = x(t.onDidTriggerButton), u = x(t.onDidChangeValue);
|
|
503
487
|
[
|
|
504
488
|
"items",
|
|
505
489
|
"buttons",
|
|
@@ -515,28 +499,28 @@ function et(e = {}) {
|
|
|
515
499
|
"matchOnDetail",
|
|
516
500
|
"keepScrollPosition"
|
|
517
501
|
].forEach((f) => {
|
|
518
|
-
e[f] &&
|
|
502
|
+
e[f] && b(() => t[f] = a(e[f]));
|
|
519
503
|
}), e.value && (t.value = e.value);
|
|
520
504
|
const d = g(t.value);
|
|
521
505
|
u((f) => d.value = f), e.activeItems && (t.activeItems = e.activeItems);
|
|
522
|
-
const
|
|
523
|
-
n((f) =>
|
|
506
|
+
const l = g(t.activeItems);
|
|
507
|
+
n((f) => l.value = f), e.selectedItems && (t.selectedItems = e.selectedItems);
|
|
524
508
|
const m = g(t.selectedItems);
|
|
525
509
|
return i((f) => m.value = f), {
|
|
526
510
|
...t,
|
|
527
511
|
onDidChangeActive: n,
|
|
528
512
|
onDidChangeSelection: i,
|
|
529
|
-
onDidAccept:
|
|
530
|
-
onDidHide:
|
|
531
|
-
onDidTriggerButton:
|
|
513
|
+
onDidAccept: o,
|
|
514
|
+
onDidHide: r,
|
|
515
|
+
onDidTriggerButton: s,
|
|
532
516
|
onDidChangeValue: u,
|
|
533
517
|
value: d,
|
|
534
|
-
activeItems:
|
|
518
|
+
activeItems: l,
|
|
535
519
|
selectedItems: m
|
|
536
520
|
};
|
|
537
521
|
}
|
|
538
522
|
function tt(e) {
|
|
539
|
-
const t =
|
|
523
|
+
const t = c(e.id ? v.createStatusBarItem(e.id, e.alignment, e.priority) : v.createStatusBarItem(e.alignment, e.priority));
|
|
540
524
|
return _(t, e, [
|
|
541
525
|
"name",
|
|
542
526
|
"text",
|
|
@@ -545,19 +529,19 @@ function tt(e) {
|
|
|
545
529
|
"backgroundColor",
|
|
546
530
|
"command",
|
|
547
531
|
"accessibilityInformation"
|
|
548
|
-
]), e.visible != null ?
|
|
549
|
-
|
|
532
|
+
]), e.visible != null ? b(() => {
|
|
533
|
+
a(e.visible) ? t.show() : t.hide();
|
|
550
534
|
}) : t.show(), t;
|
|
551
535
|
}
|
|
552
|
-
const nt =
|
|
536
|
+
const nt = w(() => {
|
|
553
537
|
const e = g(k.taskExecutions);
|
|
554
538
|
function t() {
|
|
555
539
|
e.value = k.taskExecutions;
|
|
556
540
|
}
|
|
557
|
-
return
|
|
541
|
+
return c(k.onDidStartTask(t)), c(k.onDidEndTask(t)), h(() => e.value);
|
|
558
542
|
});
|
|
559
543
|
function it(...e) {
|
|
560
|
-
const t =
|
|
544
|
+
const t = c(v.createTerminal(...e));
|
|
561
545
|
return {
|
|
562
546
|
terminal: t,
|
|
563
547
|
get name() {
|
|
@@ -581,35 +565,33 @@ function it(...e) {
|
|
|
581
565
|
state: ee(t)
|
|
582
566
|
};
|
|
583
567
|
}
|
|
584
|
-
function
|
|
585
|
-
|
|
568
|
+
function Ce(e, t) {
|
|
569
|
+
c(P.registerTextEditorCommand(e, t));
|
|
586
570
|
}
|
|
587
|
-
function
|
|
571
|
+
function ot(e) {
|
|
588
572
|
for (const [t, n] of Object.entries(e))
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
function
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
const s = o(e), r = o(t);
|
|
599
|
-
a.textEditor === s && (!r || r.includes(a.kind)) && (n.value = a.selections);
|
|
573
|
+
Ce(t, n);
|
|
574
|
+
}
|
|
575
|
+
function De(e, t) {
|
|
576
|
+
const n = g(a(e)?.selections ?? []);
|
|
577
|
+
return C(e, () => {
|
|
578
|
+
n.value = a(e)?.selections ?? [];
|
|
579
|
+
}), c(v.onDidChangeTextEditorSelection((i) => {
|
|
580
|
+
const o = a(e), r = a(t);
|
|
581
|
+
i.textEditor === o && (!r || r.includes(i.kind)) && (n.value = i.selections);
|
|
600
582
|
})), h({
|
|
601
583
|
get() {
|
|
602
584
|
return n.value;
|
|
603
585
|
},
|
|
604
|
-
set(
|
|
605
|
-
n.value =
|
|
606
|
-
const
|
|
607
|
-
|
|
586
|
+
set(i) {
|
|
587
|
+
n.value = i;
|
|
588
|
+
const o = a(e);
|
|
589
|
+
o && (o.selections = i);
|
|
608
590
|
}
|
|
609
591
|
});
|
|
610
592
|
}
|
|
611
|
-
function
|
|
612
|
-
const n =
|
|
593
|
+
function at(e, t) {
|
|
594
|
+
const n = De(e, t);
|
|
613
595
|
return h({
|
|
614
596
|
get() {
|
|
615
597
|
return n.value[0];
|
|
@@ -619,197 +601,190 @@ function rt(e, t) {
|
|
|
619
601
|
}
|
|
620
602
|
});
|
|
621
603
|
}
|
|
622
|
-
function
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}), l(v.onDidChangeTextEditorViewColumn((i) => {
|
|
629
|
-
i.textEditor === o(e) && (t.value = i.viewColumn);
|
|
604
|
+
function st(e) {
|
|
605
|
+
const t = g(a(e)?.viewColumn);
|
|
606
|
+
return C(e, () => {
|
|
607
|
+
t.value = a(e)?.viewColumn;
|
|
608
|
+
}), c(v.onDidChangeTextEditorViewColumn((n) => {
|
|
609
|
+
n.textEditor === a(e) && (t.value = n.viewColumn);
|
|
630
610
|
})), h(() => t.value);
|
|
631
611
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}), l(v.onDidChangeTextEditorVisibleRanges((i) => {
|
|
639
|
-
i.textEditor === o(e) && (t.value = i.visibleRanges);
|
|
612
|
+
function rt(e) {
|
|
613
|
+
const t = g(a(e)?.visibleRanges ?? []);
|
|
614
|
+
return C(e, () => {
|
|
615
|
+
t.value = a(e)?.visibleRanges ?? [];
|
|
616
|
+
}), c(v.onDidChangeTextEditorVisibleRanges((n) => {
|
|
617
|
+
n.textEditor === a(e) && (t.value = n.visibleRanges);
|
|
640
618
|
})), h(() => t.value);
|
|
641
619
|
}
|
|
642
620
|
function te(e, t) {
|
|
643
|
-
|
|
644
|
-
const n =
|
|
645
|
-
n && (n.badge =
|
|
621
|
+
b(() => {
|
|
622
|
+
const n = a(e);
|
|
623
|
+
n && (n.badge = a(t));
|
|
646
624
|
});
|
|
647
625
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
650
|
-
const n =
|
|
651
|
-
n && (n.title =
|
|
626
|
+
function j(e, t) {
|
|
627
|
+
b(() => {
|
|
628
|
+
const n = a(e);
|
|
629
|
+
n && (n.title = a(t));
|
|
652
630
|
});
|
|
653
631
|
}
|
|
654
|
-
const
|
|
632
|
+
const ct = N(
|
|
655
633
|
(e, t, n) => {
|
|
656
|
-
const i =
|
|
657
|
-
|
|
658
|
-
const
|
|
634
|
+
const i = O();
|
|
635
|
+
C(t, () => i.fire()), n?.watchSource && C(n.watchSource, () => i.fire());
|
|
636
|
+
const o = /* @__PURE__ */ new WeakMap(), r = c(v.createTreeView(e, {
|
|
659
637
|
...n,
|
|
660
638
|
treeDataProvider: {
|
|
661
639
|
...n,
|
|
662
640
|
onDidChangeTreeData: i.event,
|
|
663
|
-
getTreeItem(
|
|
664
|
-
return
|
|
641
|
+
getTreeItem(s) {
|
|
642
|
+
return s.treeItem;
|
|
665
643
|
},
|
|
666
|
-
async getChildren(
|
|
667
|
-
if (
|
|
668
|
-
const u = await
|
|
669
|
-
return u
|
|
644
|
+
async getChildren(s) {
|
|
645
|
+
if (s) {
|
|
646
|
+
const u = await s.children;
|
|
647
|
+
return u?.forEach((d) => o.set(d, s)), u;
|
|
670
648
|
}
|
|
671
|
-
return
|
|
649
|
+
return a(t);
|
|
672
650
|
},
|
|
673
|
-
getParent(
|
|
674
|
-
return
|
|
651
|
+
getParent(s) {
|
|
652
|
+
return o.get(s);
|
|
675
653
|
}
|
|
676
654
|
}
|
|
677
655
|
}));
|
|
678
|
-
return n
|
|
656
|
+
return n?.title && j(r, n.title), n?.badge && te(r, n.badge), r;
|
|
679
657
|
},
|
|
680
658
|
(e) => e
|
|
681
659
|
);
|
|
682
|
-
function
|
|
683
|
-
|
|
684
|
-
const t = x((i = o(e)) == null ? void 0 : i.visible);
|
|
660
|
+
function ut(e) {
|
|
661
|
+
const t = S(a(e)?.visible);
|
|
685
662
|
function n() {
|
|
686
|
-
|
|
687
|
-
t.value = (a = o(e)) == null ? void 0 : a.visible;
|
|
663
|
+
t.value = a(e)?.visible;
|
|
688
664
|
}
|
|
689
|
-
return
|
|
690
|
-
const
|
|
691
|
-
if (
|
|
692
|
-
const r =
|
|
693
|
-
|
|
665
|
+
return b((i) => {
|
|
666
|
+
const o = a(e);
|
|
667
|
+
if (o) {
|
|
668
|
+
const r = o.onDidChangeVisibility(n);
|
|
669
|
+
i(() => r.dispose());
|
|
694
670
|
}
|
|
695
|
-
}),
|
|
671
|
+
}), b(n), h(() => !!t.value);
|
|
696
672
|
}
|
|
697
|
-
const lt =
|
|
673
|
+
const lt = w(() => {
|
|
698
674
|
const e = g(v.visibleNotebookEditors);
|
|
699
|
-
return
|
|
675
|
+
return c(v.onDidChangeVisibleNotebookEditors((t) => {
|
|
700
676
|
e.value = t;
|
|
701
677
|
})), e;
|
|
702
|
-
}), dt =
|
|
678
|
+
}), dt = w(() => {
|
|
703
679
|
const e = g(v.visibleTextEditors);
|
|
704
|
-
return
|
|
680
|
+
return c(v.onDidChangeVisibleTextEditors((t) => {
|
|
705
681
|
e.value = t;
|
|
706
682
|
})), e;
|
|
707
683
|
});
|
|
708
684
|
function ft(e, t, n = !0) {
|
|
709
|
-
const i =
|
|
710
|
-
return
|
|
711
|
-
|
|
685
|
+
const i = oe(t) ? t : typeof t == "function" ? h(t) : S(t);
|
|
686
|
+
return b(() => {
|
|
687
|
+
a(n) && P.executeCommand("setContext", e, i.value);
|
|
712
688
|
}), i;
|
|
713
689
|
}
|
|
714
|
-
function vt(e, t, n, i,
|
|
715
|
-
const
|
|
690
|
+
function vt(e, t, n, i, o) {
|
|
691
|
+
const r = g(), s = c(v.createWebviewPanel(
|
|
716
692
|
e,
|
|
717
|
-
|
|
693
|
+
a(t),
|
|
718
694
|
i,
|
|
719
695
|
{
|
|
720
|
-
enableFindWidget:
|
|
721
|
-
retainContextWhenHidden:
|
|
722
|
-
...o
|
|
696
|
+
enableFindWidget: o?.enableFindWidget,
|
|
697
|
+
retainContextWhenHidden: o?.retainContextWhenHidden,
|
|
698
|
+
...a(o?.webviewOptions)
|
|
723
699
|
}
|
|
724
700
|
));
|
|
725
|
-
|
|
726
|
-
const u =
|
|
701
|
+
o?.onDidReceiveMessage && s.webview.onDidReceiveMessage(o.onDidReceiveMessage);
|
|
702
|
+
const u = S(0);
|
|
727
703
|
function d() {
|
|
728
704
|
u.value++;
|
|
729
705
|
}
|
|
730
|
-
if (
|
|
731
|
-
|
|
732
|
-
}),
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
706
|
+
if (b(() => {
|
|
707
|
+
s.webview.html = `${a(n)}<!--${u.value}-->`;
|
|
708
|
+
}), o?.webviewOptions) {
|
|
709
|
+
const p = o.webviewOptions;
|
|
710
|
+
b(() => {
|
|
711
|
+
s.webview.options = a(p);
|
|
736
712
|
});
|
|
737
713
|
}
|
|
738
|
-
|
|
739
|
-
function
|
|
740
|
-
return
|
|
714
|
+
j(s, t);
|
|
715
|
+
function l(p) {
|
|
716
|
+
return s.webview.postMessage(p);
|
|
741
717
|
}
|
|
742
|
-
const m =
|
|
743
|
-
return
|
|
744
|
-
m.value =
|
|
745
|
-
})), { panel:
|
|
718
|
+
const m = S(s.active), f = S(s.visible);
|
|
719
|
+
return c(s.onDidChangeViewState(() => {
|
|
720
|
+
m.value = s.active, f.value = s.visible;
|
|
721
|
+
})), { panel: s, context: r, active: m, visible: f, postMessage: l, forceRefresh: d };
|
|
746
722
|
}
|
|
747
|
-
const gt =
|
|
723
|
+
const gt = N(
|
|
748
724
|
(e, t, n) => {
|
|
749
|
-
const i = g(),
|
|
750
|
-
|
|
725
|
+
const i = g(), o = g();
|
|
726
|
+
c(v.registerWebviewViewProvider(
|
|
751
727
|
e,
|
|
752
728
|
{
|
|
753
|
-
resolveWebviewView(d,
|
|
754
|
-
i.value = d,
|
|
729
|
+
resolveWebviewView(d, l) {
|
|
730
|
+
i.value = d, o.value = l, n?.onDidReceiveMessage && d.webview.onDidReceiveMessage(n.onDidReceiveMessage);
|
|
755
731
|
}
|
|
756
732
|
},
|
|
757
733
|
{
|
|
758
734
|
webviewOptions: {
|
|
759
|
-
retainContextWhenHidden: n
|
|
735
|
+
retainContextWhenHidden: n?.retainContextWhenHidden
|
|
760
736
|
}
|
|
761
737
|
}
|
|
762
738
|
));
|
|
763
|
-
const
|
|
764
|
-
function
|
|
765
|
-
|
|
739
|
+
const r = S(0);
|
|
740
|
+
function s() {
|
|
741
|
+
r.value++;
|
|
766
742
|
}
|
|
767
|
-
if (
|
|
768
|
-
i.value && (i.value.webview.html = `${
|
|
769
|
-
}), n
|
|
743
|
+
if (b(() => {
|
|
744
|
+
i.value && (i.value.webview.html = `${a(t)}<!--${r.value}-->`);
|
|
745
|
+
}), n?.webviewOptions) {
|
|
770
746
|
const d = n.webviewOptions;
|
|
771
|
-
|
|
772
|
-
i.value && (i.value.webview.options =
|
|
747
|
+
b(() => {
|
|
748
|
+
i.value && (i.value.webview.options = a(d));
|
|
773
749
|
});
|
|
774
750
|
}
|
|
775
|
-
n
|
|
751
|
+
n?.title && j(i, n.title), n?.badge && te(i, n.badge);
|
|
776
752
|
function u(d) {
|
|
777
|
-
|
|
778
|
-
return (c = i.value) == null ? void 0 : c.webview.postMessage(d);
|
|
753
|
+
return i.value?.webview.postMessage(d);
|
|
779
754
|
}
|
|
780
|
-
return { view: i, context:
|
|
755
|
+
return { view: i, context: o, postMessage: u, forceRefresh: s };
|
|
781
756
|
},
|
|
782
757
|
(e) => e
|
|
783
|
-
), ht =
|
|
758
|
+
), ht = w(() => {
|
|
784
759
|
const e = g(v.state);
|
|
785
|
-
return
|
|
760
|
+
return c(v.onDidChangeWindowState((t) => {
|
|
786
761
|
e.value = t;
|
|
787
762
|
})), {
|
|
788
763
|
focused: h(() => e.value.focused),
|
|
789
764
|
active: h(() => e.value.active)
|
|
790
765
|
};
|
|
791
|
-
}), mt =
|
|
792
|
-
const e = g(
|
|
793
|
-
return
|
|
794
|
-
e.value =
|
|
766
|
+
}), mt = w(() => {
|
|
767
|
+
const e = g(T.workspaceFolders);
|
|
768
|
+
return c(T.onDidChangeWorkspaceFolders(() => {
|
|
769
|
+
e.value = T.workspaceFolders;
|
|
795
770
|
})), h(() => e.value);
|
|
796
771
|
});
|
|
797
772
|
export {
|
|
798
773
|
X as activateCbs,
|
|
799
|
-
|
|
800
|
-
|
|
774
|
+
N as createKeyedComposable,
|
|
775
|
+
w as createSingletonComposable,
|
|
801
776
|
J as deactivateCbs,
|
|
802
777
|
ke as defineConfigObject,
|
|
803
778
|
le as defineConfigs,
|
|
804
779
|
Ee as defineExtension,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
780
|
+
ye as defineLogger,
|
|
781
|
+
Re as executeCommand,
|
|
782
|
+
y as extensionContext,
|
|
783
|
+
M as extensionScope,
|
|
809
784
|
Ge as getDefaultLoggerPrefix,
|
|
810
785
|
Z as onActivate,
|
|
811
|
-
|
|
812
|
-
|
|
786
|
+
Se as onDeactivate,
|
|
787
|
+
ue as tryOnScopeDispose,
|
|
813
788
|
Oe as useAbsolutePath,
|
|
814
789
|
fe as useActiveColorTheme,
|
|
815
790
|
Pe as useActiveDebugSession,
|
|
@@ -818,49 +793,49 @@ export {
|
|
|
818
793
|
Ie as useActiveTerminal,
|
|
819
794
|
ve as useActiveTextEditor,
|
|
820
795
|
We as useAllExtensions,
|
|
821
|
-
|
|
796
|
+
Fe as useChatParticipant,
|
|
822
797
|
me as useCommand,
|
|
823
|
-
|
|
798
|
+
$e as useCommands,
|
|
824
799
|
Me as useCommentController,
|
|
825
800
|
Le as useControlledTerminal,
|
|
826
801
|
Ne as useDefaultShell,
|
|
827
|
-
|
|
802
|
+
c as useDisposable,
|
|
828
803
|
ge as useDocumentText,
|
|
829
804
|
he as useEditorDecorations,
|
|
830
|
-
|
|
831
|
-
|
|
805
|
+
x as useEvent,
|
|
806
|
+
O as useEventEmitter,
|
|
832
807
|
je as useExtensionSecret,
|
|
833
808
|
He as useFetchTasks,
|
|
834
809
|
Be as useFileUri,
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
810
|
+
Ke as useFoldingRangeProvider,
|
|
811
|
+
qe as useFsWatcher,
|
|
812
|
+
ze as useIsDarkTheme,
|
|
838
813
|
Qe as useIsTelemetryEnabled,
|
|
839
814
|
Ue as useL10nText,
|
|
840
815
|
Ye as useLmTools,
|
|
841
816
|
Je as useLogLevel,
|
|
842
|
-
|
|
817
|
+
be as useLogger,
|
|
843
818
|
Xe as useNotebookEditorSelection,
|
|
844
|
-
|
|
819
|
+
we as useNotebookEditorSelections,
|
|
845
820
|
Ze as useNotebookEditorVisibleRanges,
|
|
846
821
|
_e as useOpenedTerminals,
|
|
847
|
-
|
|
822
|
+
pe as useOutputChannel,
|
|
848
823
|
et as useQuickPick,
|
|
849
824
|
_ as useReactiveOptions,
|
|
850
825
|
tt as useStatusBarItem,
|
|
851
826
|
nt as useTaskExecutions,
|
|
852
827
|
it as useTerminal,
|
|
853
828
|
ee as useTerminalState,
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
829
|
+
Ce as useTextEditorCommand,
|
|
830
|
+
ot as useTextEditorCommands,
|
|
831
|
+
at as useTextEditorSelection,
|
|
832
|
+
De as useTextEditorSelections,
|
|
833
|
+
st as useTextEditorViewColumn,
|
|
834
|
+
rt as useTextEditorVisibleRanges,
|
|
835
|
+
ct as useTreeView,
|
|
861
836
|
te as useViewBadge,
|
|
862
|
-
|
|
863
|
-
|
|
837
|
+
j as useViewTitle,
|
|
838
|
+
ut as useViewVisibility,
|
|
864
839
|
lt as useVisibleNotebookEditors,
|
|
865
840
|
dt as useVisibleTextEditors,
|
|
866
841
|
ft as useVscodeContext,
|