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