@pstdio/workbench 0.7.1 → 0.8.0
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 +1 -1
- package/dist/extensions.d.ts +325 -40
- package/dist/extensions.js +1812 -1439
- package/dist/extensions.js.map +1 -1
- package/dist/index.d.ts +193 -13
- package/dist/index.js +2429 -2014
- package/dist/index.js.map +1 -1
- package/dist/layout-types-DMoZz38-.js.map +1 -1
- package/dist/react.d.ts +178 -10
- package/dist/react.js +2008 -1917
- package/dist/react.js.map +1 -1
- package/dist/storage.d.ts +6 -2
- package/dist/testing.d.ts +167 -8
- package/dist/webview-runtime.js +1 -1
- package/dist/webview-runtime.js.map +1 -1
- package/dist/{workbench-built-ins-BncLJfQA.js → workbench-built-ins-BCJ6-fIM.js} +464 -466
- package/dist/workbench-built-ins-BCJ6-fIM.js.map +1 -0
- package/dist/workbench-menu-paths-D-e7iscN.js +43 -0
- package/dist/workbench-menu-paths-D-e7iscN.js.map +1 -0
- package/dist/workflow-status-settings-DLiu9FZ0.js +144 -0
- package/dist/workflow-status-settings-DLiu9FZ0.js.map +1 -0
- package/package.json +4 -4
- package/dist/icon-B9XolQG8.js +0 -35
- package/dist/icon-B9XolQG8.js.map +0 -1
- package/dist/workbench-built-ins-BncLJfQA.js.map +0 -1
- package/dist/workbench-menu-paths-Bb0ICxeG.js +0 -20
- package/dist/workbench-menu-paths-Bb0ICxeG.js.map +0 -1
package/dist/extensions.js
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { host as
|
|
4
|
-
import { F as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { W as
|
|
8
|
-
import { isLocalizedString as
|
|
9
|
-
import { w as
|
|
10
|
-
const
|
|
11
|
-
const [t,
|
|
1
|
+
import { jsxs as Ee, jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as R, useState as Pe, useEffect as Q, createElement as K } from "react";
|
|
3
|
+
import { host as yt } from "rimless";
|
|
4
|
+
import { F as we } from "./file-section-navigation-CfYqVObc.js";
|
|
5
|
+
import { i as vt, c as Ae, w as kt } from "./workbench-menu-paths-D-e7iscN.js";
|
|
6
|
+
import { r as Le, d as Ie } from "./composition-resolver-types-CWykPyEK.js";
|
|
7
|
+
import { W as Y, a as Rt } from "./workflow-status-settings-DLiu9FZ0.js";
|
|
8
|
+
import { isLocalizedString as Ct, matchesResourceWhen as xt } from "@pstdio/sdk/extensions";
|
|
9
|
+
import { w as Et } from "./layout-types-DMoZz38-.js";
|
|
10
|
+
const ye = 1, Pt = ["commands.execute", "resource.open", "notification.show", "notification.action", "notification.resolve", "notification.dismiss", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "terminal.session", "files.upload", "files.list", "files.delete"], Ue = ["host.dispatchKeyboardEvent"], At = [...Pt, ...Ue], St = new Set(At), _e = (e) => St.has(e), Tt = (e) => {
|
|
11
|
+
const [t, n] = e.split("@"), r = n === void 0 ? ye : Number(n);
|
|
12
12
|
return {
|
|
13
13
|
capability: e,
|
|
14
14
|
name: t ?? "",
|
|
15
|
-
version:
|
|
15
|
+
version: r
|
|
16
16
|
};
|
|
17
|
-
},
|
|
17
|
+
}, ne = (e) => ({
|
|
18
18
|
capability: e,
|
|
19
19
|
code: "unsupported_webview_capability",
|
|
20
20
|
message: `Unsupported webview capability: ${e}`,
|
|
21
21
|
severity: "error"
|
|
22
|
-
}),
|
|
22
|
+
}), jt = (e, t, n) => ({
|
|
23
23
|
capability: e,
|
|
24
24
|
code: "unsupported_webview_capability_version",
|
|
25
|
-
message: `Unsupported webview capability version: ${t}@${
|
|
25
|
+
message: `Unsupported webview capability version: ${t}@${n.toString()} (supported: ${ye.toString()})`,
|
|
26
26
|
severity: "error"
|
|
27
|
-
}),
|
|
27
|
+
}), Wt = (e) => ({
|
|
28
28
|
capability: e,
|
|
29
29
|
code: "undeclared_webview_capability",
|
|
30
30
|
message: `Webview did not declare host capability: ${e}`,
|
|
31
31
|
severity: "error"
|
|
32
|
-
}),
|
|
33
|
-
const
|
|
34
|
-
for (const
|
|
35
|
-
t[
|
|
36
|
-
for (const
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
|
|
32
|
+
}), Mt = (e, t = {}) => {
|
|
33
|
+
const n = [], r = /* @__PURE__ */ new Set();
|
|
34
|
+
for (const s of Ue)
|
|
35
|
+
t[s] && r.add(s);
|
|
36
|
+
for (const s of e ?? []) {
|
|
37
|
+
const o = Tt(s);
|
|
38
|
+
if (!_e(o.name)) {
|
|
39
|
+
n.push(ne(s));
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
43
|
-
|
|
42
|
+
if (o.version !== ye) {
|
|
43
|
+
n.push(jt(s, o.name, o.version));
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
if (!t[
|
|
47
|
-
|
|
46
|
+
if (!t[o.name]) {
|
|
47
|
+
n.push(ne(s));
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
r.add(o.name);
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
|
-
allowed:
|
|
54
|
-
diagnostics:
|
|
53
|
+
allowed: r,
|
|
54
|
+
diagnostics: n
|
|
55
55
|
};
|
|
56
|
-
},
|
|
56
|
+
}, Ot = (e) => {
|
|
57
57
|
const {
|
|
58
58
|
allowed: t,
|
|
59
|
-
diagnostics:
|
|
60
|
-
} =
|
|
61
|
-
e.onDiagnostic?.(
|
|
59
|
+
diagnostics: n
|
|
60
|
+
} = Mt(e.declaredCapabilities, e.capabilities), r = (s) => {
|
|
61
|
+
e.onDiagnostic?.(s);
|
|
62
62
|
};
|
|
63
63
|
return {
|
|
64
|
-
diagnostics:
|
|
65
|
-
async call(
|
|
66
|
-
if (!
|
|
67
|
-
const i =
|
|
68
|
-
throw
|
|
64
|
+
diagnostics: n,
|
|
65
|
+
async call(s) {
|
|
66
|
+
if (!_e(s.method)) {
|
|
67
|
+
const i = ne(s.method);
|
|
68
|
+
throw r(i), new Error(i.message);
|
|
69
69
|
}
|
|
70
|
-
if (!t.has(
|
|
71
|
-
const i =
|
|
72
|
-
throw
|
|
70
|
+
if (!t.has(s.method)) {
|
|
71
|
+
const i = Wt(s.method);
|
|
72
|
+
throw r(i), new Error(i.message);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
76
|
-
const i =
|
|
77
|
-
throw
|
|
74
|
+
const o = e.capabilities[s.method];
|
|
75
|
+
if (!o) {
|
|
76
|
+
const i = ne(s.method);
|
|
77
|
+
throw r(i), new Error(i.message);
|
|
78
78
|
}
|
|
79
|
-
return await s
|
|
79
|
+
return await o(s.params);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
},
|
|
82
|
+
}, Ht = (e) => typeof e == "object" && e !== null, Se = (e) => {
|
|
83
83
|
try {
|
|
84
84
|
const t = JSON.stringify(e);
|
|
85
85
|
if (typeof t == "string" && t.length > 0) return t;
|
|
@@ -90,7 +90,7 @@ const ce = 1, ct = ["commands.execute", "resource.open", "notification.show", "n
|
|
|
90
90
|
} catch {
|
|
91
91
|
return "Unknown error";
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, Kt = (e) => {
|
|
94
94
|
if (e instanceof Error) return {
|
|
95
95
|
message: e.message,
|
|
96
96
|
stack: e.stack
|
|
@@ -98,50 +98,50 @@ const ce = 1, ct = ["commands.execute", "resource.open", "notification.show", "n
|
|
|
98
98
|
if (typeof e == "string") return {
|
|
99
99
|
message: e
|
|
100
100
|
};
|
|
101
|
-
if (
|
|
102
|
-
const t = typeof e.message == "string" ? e.message : null,
|
|
103
|
-
return t ?
|
|
101
|
+
if (Ht(e)) {
|
|
102
|
+
const t = typeof e.message == "string" ? e.message : null, n = typeof e.stack == "string" ? e.stack : void 0;
|
|
103
|
+
return t ? n ? {
|
|
104
104
|
message: t,
|
|
105
|
-
stack:
|
|
105
|
+
stack: n
|
|
106
106
|
} : {
|
|
107
107
|
message: t
|
|
108
108
|
} : {
|
|
109
|
-
message:
|
|
109
|
+
message: Se(e)
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
return e == null ? {
|
|
113
113
|
message: "Unknown error"
|
|
114
114
|
} : {
|
|
115
|
-
message:
|
|
115
|
+
message: Se(e)
|
|
116
116
|
};
|
|
117
|
-
},
|
|
117
|
+
}, de = () => {
|
|
118
118
|
if (typeof document > "u") return {};
|
|
119
119
|
const e = getComputedStyle(document.documentElement), t = {};
|
|
120
|
-
for (let
|
|
121
|
-
const
|
|
122
|
-
|
|
120
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
121
|
+
const r = e.item(n);
|
|
122
|
+
r.startsWith("--chakra-") && (t[r] = e.getPropertyValue(r).trim());
|
|
123
123
|
}
|
|
124
124
|
return t;
|
|
125
|
-
},
|
|
125
|
+
}, ce = (e) => {
|
|
126
126
|
if (typeof document > "u") return e;
|
|
127
127
|
const t = document.documentElement.getAttribute("data-theme");
|
|
128
128
|
if (t === "dark" || t === "light") return t;
|
|
129
|
-
const
|
|
130
|
-
return
|
|
131
|
-
},
|
|
129
|
+
const n = document.documentElement.getAttribute("data-color-mode");
|
|
130
|
+
return n === "dark" || n === "light" ? n : e;
|
|
131
|
+
}, $t = {
|
|
132
132
|
border: 0,
|
|
133
133
|
display: "block",
|
|
134
134
|
flex: "1 1 0%",
|
|
135
135
|
height: "100%",
|
|
136
136
|
minHeight: 0,
|
|
137
137
|
width: "100%"
|
|
138
|
-
},
|
|
138
|
+
}, Vt = {
|
|
139
139
|
display: "flex",
|
|
140
140
|
height: "100%",
|
|
141
141
|
minHeight: 0,
|
|
142
142
|
position: "relative",
|
|
143
143
|
width: "100%"
|
|
144
|
-
},
|
|
144
|
+
}, Dt = {
|
|
145
145
|
alignItems: "center",
|
|
146
146
|
background: "rgba(255, 255, 255, 0.92)",
|
|
147
147
|
color: "#7a1f12",
|
|
@@ -152,160 +152,160 @@ const ce = 1, ct = ["commands.execute", "resource.open", "notification.show", "n
|
|
|
152
152
|
position: "absolute",
|
|
153
153
|
textAlign: "center",
|
|
154
154
|
zIndex: 1
|
|
155
|
-
},
|
|
155
|
+
}, Bt = "allow-scripts allow-forms allow-popups", Ft = (e) => {
|
|
156
156
|
const {
|
|
157
157
|
view: t,
|
|
158
|
-
props:
|
|
159
|
-
theme:
|
|
160
|
-
capabilities:
|
|
161
|
-
hostEvents:
|
|
158
|
+
props: n,
|
|
159
|
+
theme: r,
|
|
160
|
+
capabilities: s,
|
|
161
|
+
hostEvents: o,
|
|
162
162
|
onReady: i,
|
|
163
163
|
onError: a,
|
|
164
164
|
onDiagnostics: d,
|
|
165
|
-
title:
|
|
166
|
-
} = e, w =
|
|
167
|
-
return
|
|
165
|
+
title: u
|
|
166
|
+
} = e, w = R(null), l = R(null), m = R(!1), c = R(null), f = R(n), h = R(r), C = R(s), j = R(o), _ = R(t.webview.capabilities), q = R(i), W = R(a), b = R(d), [y, E] = Pe(null), [x, A] = Pe(0);
|
|
167
|
+
return f.current = n, h.current = r, C.current = s, j.current = o, _.current = t.webview.capabilities, q.current = i, W.current = a, b.current = d, Q(() => {
|
|
168
168
|
const g = w.current;
|
|
169
169
|
if (!g) return;
|
|
170
|
-
const
|
|
171
|
-
|
|
170
|
+
const M = () => {
|
|
171
|
+
m.current && A((k) => k + 1);
|
|
172
172
|
};
|
|
173
|
-
g.addEventListener("load",
|
|
174
|
-
const
|
|
173
|
+
g.addEventListener("load", M);
|
|
174
|
+
const O = () => g.removeEventListener("load", M), z = `${x}
|
|
175
175
|
${t.webview.runtimeUrl}
|
|
176
176
|
${t.webview.moduleUrl}`;
|
|
177
|
-
if (c.current ===
|
|
178
|
-
c.current =
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
},
|
|
182
|
-
capabilities:
|
|
183
|
-
declaredCapabilities:
|
|
184
|
-
onDiagnostic: (
|
|
177
|
+
if (c.current === z) return O;
|
|
178
|
+
c.current = z;
|
|
179
|
+
const gt = t.webview.styles, ht = t.webview.moduleUrl, Ce = (k) => {
|
|
180
|
+
k.length > 0 && b.current?.(k);
|
|
181
|
+
}, xe = () => Ot({
|
|
182
|
+
capabilities: C.current ?? {},
|
|
183
|
+
declaredCapabilities: _.current,
|
|
184
|
+
onDiagnostic: (k) => Ce([k])
|
|
185
185
|
});
|
|
186
|
-
|
|
187
|
-
const
|
|
186
|
+
Ce(xe().diagnostics);
|
|
187
|
+
const wt = {
|
|
188
188
|
ready: () => {
|
|
189
189
|
},
|
|
190
|
-
runtimeError: (
|
|
191
|
-
|
|
190
|
+
runtimeError: (k) => {
|
|
191
|
+
E(k.message), W.current?.(k);
|
|
192
192
|
},
|
|
193
|
-
call: async (
|
|
193
|
+
call: async (k) => await xe().call(k)
|
|
194
194
|
};
|
|
195
195
|
return (() => {
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
g.contentWindow?.location.replace(t.webview.runtimeUrl),
|
|
199
|
-
const
|
|
200
|
-
l.current =
|
|
201
|
-
moduleUrl:
|
|
202
|
-
styles:
|
|
203
|
-
props:
|
|
204
|
-
theme:
|
|
205
|
-
themeVariables:
|
|
196
|
+
m.current = !1, l.current = null;
|
|
197
|
+
const k = yt.connect(g, wt);
|
|
198
|
+
g.contentWindow?.location.replace(t.webview.runtimeUrl), k.then(async (ae) => {
|
|
199
|
+
const H = ae.remote;
|
|
200
|
+
l.current = H, j.current?.bind((It) => H.hostEvent?.(It)), await H.init({
|
|
201
|
+
moduleUrl: ht,
|
|
202
|
+
styles: gt,
|
|
203
|
+
props: f.current,
|
|
204
|
+
theme: ce(h.current),
|
|
205
|
+
themeVariables: de(),
|
|
206
206
|
extensionId: t.extensionId
|
|
207
|
-
}),
|
|
208
|
-
}).catch((
|
|
209
|
-
const
|
|
210
|
-
|
|
207
|
+
}), m.current = !0, E(null), q.current?.();
|
|
208
|
+
}).catch((ae) => {
|
|
209
|
+
const H = Kt(ae);
|
|
210
|
+
E(H.message), W.current?.(H);
|
|
211
211
|
});
|
|
212
|
-
})(),
|
|
213
|
-
}, [
|
|
212
|
+
})(), O;
|
|
213
|
+
}, [x, t.extensionId, t.webview.runtimeUrl, t.webview.moduleUrl, t.webview.styles]), Q(() => {
|
|
214
214
|
const g = l.current;
|
|
215
|
-
if (!(!g || !
|
|
216
|
-
return
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
props:
|
|
215
|
+
if (!(!g || !o))
|
|
216
|
+
return o.bind((M) => g.hostEvent?.(M)), () => o.unbind();
|
|
217
|
+
}, [o]), Q(() => {
|
|
218
|
+
m.current && l.current?.propsUpdate({
|
|
219
|
+
props: n
|
|
220
220
|
});
|
|
221
|
-
}, [
|
|
222
|
-
|
|
223
|
-
theme:
|
|
224
|
-
variables:
|
|
221
|
+
}, [n]), Q(() => {
|
|
222
|
+
m.current && l.current?.themeUpdate({
|
|
223
|
+
theme: ce(r),
|
|
224
|
+
variables: de()
|
|
225
225
|
});
|
|
226
|
-
}, [
|
|
226
|
+
}, [r]), Q(() => {
|
|
227
227
|
if (typeof window > "u" || typeof MutationObserver > "u") return;
|
|
228
228
|
let g = null;
|
|
229
|
-
const
|
|
229
|
+
const M = () => {
|
|
230
230
|
g !== null && cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
231
|
-
g = null,
|
|
232
|
-
theme:
|
|
233
|
-
variables:
|
|
231
|
+
g = null, m.current && l.current?.themeUpdate({
|
|
232
|
+
theme: ce(h.current),
|
|
233
|
+
variables: de()
|
|
234
234
|
});
|
|
235
235
|
});
|
|
236
|
-
},
|
|
236
|
+
}, O = new MutationObserver(M), z = {
|
|
237
237
|
attributeFilter: ["class", "data-color-mode", "data-theme", "style"],
|
|
238
238
|
attributes: !0
|
|
239
239
|
};
|
|
240
|
-
return
|
|
241
|
-
|
|
240
|
+
return O.observe(document.documentElement, z), O.observe(document.body, z), () => {
|
|
241
|
+
O.disconnect(), g !== null && cancelAnimationFrame(g);
|
|
242
242
|
};
|
|
243
|
-
}, []), /* @__PURE__ */
|
|
244
|
-
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
243
|
+
}, []), /* @__PURE__ */ Ee("div", { style: Vt, children: [
|
|
244
|
+
y ? /* @__PURE__ */ G("div", { role: "alert", style: Dt, children: /* @__PURE__ */ Ee("div", { children: [
|
|
245
|
+
/* @__PURE__ */ G("strong", { children: "Extension view failed to load." }),
|
|
246
|
+
/* @__PURE__ */ G("div", { children: y })
|
|
247
247
|
] }) }) : null,
|
|
248
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ G(
|
|
249
249
|
"iframe",
|
|
250
250
|
{
|
|
251
251
|
ref: w,
|
|
252
|
-
title:
|
|
252
|
+
title: u ?? t.label,
|
|
253
253
|
allow: "fullscreen",
|
|
254
254
|
allowFullScreen: !0,
|
|
255
|
-
sandbox:
|
|
255
|
+
sandbox: Bt,
|
|
256
256
|
style: {
|
|
257
|
-
|
|
258
|
-
colorScheme:
|
|
257
|
+
...$t,
|
|
258
|
+
colorScheme: r
|
|
259
259
|
},
|
|
260
260
|
onLoad: () => {
|
|
261
|
-
|
|
261
|
+
m.current && A((g) => g + 1);
|
|
262
262
|
},
|
|
263
263
|
onError: () => {
|
|
264
264
|
const g = `Failed to load extension runtime at ${t.webview.runtimeUrl}`;
|
|
265
|
-
|
|
265
|
+
E(g), W.current?.({
|
|
266
266
|
message: g
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
x
|
|
271
271
|
)
|
|
272
272
|
] });
|
|
273
|
-
},
|
|
273
|
+
}, Nt = () => {
|
|
274
274
|
let e = null;
|
|
275
|
-
const t = [],
|
|
275
|
+
const t = [], n = /* @__PURE__ */ new Set();
|
|
276
276
|
return {
|
|
277
|
-
emit(
|
|
278
|
-
e ? e(
|
|
277
|
+
emit(r) {
|
|
278
|
+
e ? e(r) : t.push(r);
|
|
279
279
|
},
|
|
280
|
-
bind(
|
|
281
|
-
for (e =
|
|
280
|
+
bind(r) {
|
|
281
|
+
for (e = r; t.length > 0; ) r(t.shift());
|
|
282
282
|
},
|
|
283
|
-
onDisconnect(
|
|
284
|
-
return
|
|
283
|
+
onDisconnect(r) {
|
|
284
|
+
return n.add(r), () => n.delete(r);
|
|
285
285
|
},
|
|
286
286
|
unbind() {
|
|
287
287
|
e = null;
|
|
288
|
-
for (const
|
|
288
|
+
for (const r of n) r();
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
|
-
},
|
|
291
|
+
}, Lt = "terminal.session", Ut = (e) => {
|
|
292
292
|
const {
|
|
293
293
|
terminal: t,
|
|
294
|
-
hostEvents:
|
|
295
|
-
} = e,
|
|
296
|
-
|
|
297
|
-
scope:
|
|
298
|
-
payload:
|
|
294
|
+
hostEvents: n
|
|
295
|
+
} = e, r = (s) => {
|
|
296
|
+
n.emit({
|
|
297
|
+
scope: Lt,
|
|
298
|
+
payload: s
|
|
299
299
|
});
|
|
300
300
|
};
|
|
301
|
-
return async (
|
|
302
|
-
const
|
|
303
|
-
switch (
|
|
301
|
+
return async (s) => {
|
|
302
|
+
const o = s;
|
|
303
|
+
switch (o.operation) {
|
|
304
304
|
case "open": {
|
|
305
305
|
const {
|
|
306
306
|
sessionId: i
|
|
307
307
|
} = await t.open({
|
|
308
|
-
request:
|
|
308
|
+
request: o.request
|
|
309
309
|
});
|
|
310
310
|
return {
|
|
311
311
|
operation: "open",
|
|
@@ -314,25 +314,25 @@ ${t.webview.moduleUrl}`;
|
|
|
314
314
|
}
|
|
315
315
|
case "write":
|
|
316
316
|
return t.write({
|
|
317
|
-
sessionId:
|
|
318
|
-
data:
|
|
317
|
+
sessionId: o.sessionId,
|
|
318
|
+
data: o.data
|
|
319
319
|
}), {
|
|
320
320
|
operation: "write",
|
|
321
321
|
accepted: !0
|
|
322
322
|
};
|
|
323
323
|
case "resize":
|
|
324
324
|
return t.resize({
|
|
325
|
-
sessionId:
|
|
326
|
-
cols:
|
|
327
|
-
rows:
|
|
325
|
+
sessionId: o.sessionId,
|
|
326
|
+
cols: o.cols,
|
|
327
|
+
rows: o.rows
|
|
328
328
|
}), {
|
|
329
329
|
operation: "resize",
|
|
330
330
|
accepted: !0
|
|
331
331
|
};
|
|
332
332
|
case "kill":
|
|
333
333
|
return await t.kill({
|
|
334
|
-
sessionId:
|
|
335
|
-
signal:
|
|
334
|
+
sessionId: o.sessionId,
|
|
335
|
+
signal: o.signal
|
|
336
336
|
}), {
|
|
337
337
|
operation: "kill",
|
|
338
338
|
accepted: !0
|
|
@@ -340,35 +340,35 @@ ${t.webview.moduleUrl}`;
|
|
|
340
340
|
case "subscribe": {
|
|
341
341
|
const {
|
|
342
342
|
sessionId: i
|
|
343
|
-
} =
|
|
343
|
+
} = o;
|
|
344
344
|
let a = () => {
|
|
345
345
|
}, d = () => {
|
|
346
|
-
},
|
|
346
|
+
}, u = !1;
|
|
347
347
|
const w = () => {
|
|
348
|
-
|
|
348
|
+
u || (u = !0, a(), d());
|
|
349
349
|
};
|
|
350
350
|
return a = t.subscribe(i, {
|
|
351
|
-
onData: (l) =>
|
|
351
|
+
onData: (l) => r({
|
|
352
352
|
sessionId: i,
|
|
353
353
|
kind: "data",
|
|
354
354
|
chunk: l
|
|
355
355
|
}),
|
|
356
356
|
onExit: (l) => {
|
|
357
|
-
|
|
357
|
+
r({
|
|
358
358
|
sessionId: i,
|
|
359
359
|
kind: "exit",
|
|
360
360
|
code: l.code,
|
|
361
361
|
signal: l.signal
|
|
362
362
|
}), w();
|
|
363
363
|
}
|
|
364
|
-
}), d =
|
|
364
|
+
}), d = n.onDisconnect(w), {
|
|
365
365
|
operation: "subscribe",
|
|
366
366
|
accepted: !0
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
|
-
},
|
|
371
|
+
}, _t = (e) => {
|
|
372
372
|
if (typeof document > "u") return;
|
|
373
373
|
const t = new KeyboardEvent("keydown", {
|
|
374
374
|
...e,
|
|
@@ -376,78 +376,78 @@ ${t.webview.moduleUrl}`;
|
|
|
376
376
|
cancelable: !0
|
|
377
377
|
});
|
|
378
378
|
document.dispatchEvent(t);
|
|
379
|
-
},
|
|
379
|
+
}, qe = (e) => !e?.strategy || e.strategy === "persistent" ? {} : {
|
|
380
380
|
replaceActive: !0
|
|
381
|
-
},
|
|
381
|
+
}, ze = (e) => ({
|
|
382
382
|
"commands.execute": (t) => {
|
|
383
|
-
const
|
|
384
|
-
return e.workbench.commands.executeCommand(
|
|
383
|
+
const n = t;
|
|
384
|
+
return e.workbench.commands.executeCommand(n.commandId, n.params);
|
|
385
385
|
},
|
|
386
386
|
"resource.open": (t) => {
|
|
387
|
-
const
|
|
388
|
-
if (!
|
|
389
|
-
return e.workbench.resources.openResource(
|
|
387
|
+
const n = t;
|
|
388
|
+
if (!n.resource) throw new Error("resource.open requires a resource.");
|
|
389
|
+
return e.workbench.resources.openResource(n.resource, qe(n.input));
|
|
390
390
|
},
|
|
391
391
|
"notification.show": (t) => {
|
|
392
|
-
const
|
|
392
|
+
const n = t;
|
|
393
393
|
return e.workbench.notifications.show({
|
|
394
|
-
level:
|
|
395
|
-
message:
|
|
396
|
-
title:
|
|
394
|
+
level: n.level,
|
|
395
|
+
message: n.message,
|
|
396
|
+
title: n.title
|
|
397
397
|
});
|
|
398
398
|
},
|
|
399
399
|
"preferences.get": (t) => {
|
|
400
|
-
const
|
|
401
|
-
return e.workbench.preferences.getValue(
|
|
400
|
+
const n = t;
|
|
401
|
+
return e.workbench.preferences.getValue(n.name, n.scope);
|
|
402
402
|
},
|
|
403
403
|
"preferences.set": (t) => {
|
|
404
|
-
const
|
|
405
|
-
return e.workbench.preferences.setValue(
|
|
404
|
+
const n = t;
|
|
405
|
+
return e.workbench.preferences.setValue(n.name, n.value, n.scope ?? {
|
|
406
406
|
scope: "user"
|
|
407
407
|
}), {
|
|
408
|
-
name:
|
|
409
|
-
value:
|
|
408
|
+
name: n.name,
|
|
409
|
+
value: n.value
|
|
410
410
|
};
|
|
411
411
|
},
|
|
412
|
-
"host.dispatchKeyboardEvent": (t) => (e.dispatchKeyboardEvent ??
|
|
412
|
+
"host.dispatchKeyboardEvent": (t) => (e.dispatchKeyboardEvent ?? _t)(t),
|
|
413
413
|
...e.hostEvents ? {
|
|
414
|
-
"terminal.session":
|
|
414
|
+
"terminal.session": Ut({
|
|
415
415
|
terminal: e.workbench.terminal,
|
|
416
416
|
hostEvents: e.hostEvents
|
|
417
417
|
})
|
|
418
418
|
} : {}
|
|
419
|
-
}),
|
|
420
|
-
for (const
|
|
421
|
-
console.warn(`[workbench.webview:${e}] ${
|
|
422
|
-
},
|
|
419
|
+
}), qt = (e, t) => {
|
|
420
|
+
for (const n of t)
|
|
421
|
+
console.warn(`[workbench.webview:${e}] ${n.code}/${n.capability}: ${n.message}`);
|
|
422
|
+
}, zt = (e, t) => {
|
|
423
423
|
console.error(`[workbench.webview:${e}] runtime error: ${t}`);
|
|
424
|
-
},
|
|
424
|
+
}, se = "webview:bridge", Qt = (e) => {
|
|
425
425
|
if (typeof e != "object" || e === null || Array.isArray(e)) return !1;
|
|
426
426
|
const t = e;
|
|
427
427
|
return typeof t.runtimeUrl == "string" && typeof t.moduleUrl == "string";
|
|
428
|
-
},
|
|
428
|
+
}, Gt = ({
|
|
429
429
|
placement: e
|
|
430
430
|
}) => ({
|
|
431
431
|
placement: e,
|
|
432
432
|
resource: e.resource
|
|
433
|
-
}),
|
|
434
|
-
let
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
-
let
|
|
438
|
-
return
|
|
439
|
-
},
|
|
433
|
+
}), Qe = () => "light", Te = /* @__PURE__ */ new WeakMap(), Ge = (e, t) => {
|
|
434
|
+
let n = Te.get(e);
|
|
435
|
+
n || (n = /* @__PURE__ */ new Map(), Te.set(e, n));
|
|
436
|
+
const r = t.instanceId;
|
|
437
|
+
let s = n.get(r);
|
|
438
|
+
return s || (s = Nt(), n.set(r, s)), s;
|
|
439
|
+
}, Ye = (e) => {
|
|
440
440
|
const {
|
|
441
441
|
context: t,
|
|
442
|
-
createHostCapabilities:
|
|
443
|
-
createProps:
|
|
444
|
-
createTheme:
|
|
445
|
-
ownerId:
|
|
442
|
+
createHostCapabilities: n,
|
|
443
|
+
createProps: r,
|
|
444
|
+
createTheme: s = Qe,
|
|
445
|
+
ownerId: o,
|
|
446
446
|
title: i,
|
|
447
447
|
webview: a
|
|
448
448
|
} = e;
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
extensionId:
|
|
449
|
+
return /* @__PURE__ */ G(Ft, { view: {
|
|
450
|
+
extensionId: o ?? "workbench",
|
|
451
451
|
id: t.webviewId,
|
|
452
452
|
label: a.title ?? i,
|
|
453
453
|
webview: {
|
|
@@ -456,69 +456,104 @@ ${t.webview.moduleUrl}`;
|
|
|
456
456
|
runtimeUrl: a.runtimeUrl,
|
|
457
457
|
styles: a.styles ?? []
|
|
458
458
|
}
|
|
459
|
-
}, props:
|
|
460
|
-
},
|
|
459
|
+
}, props: r(t), theme: s(t), capabilities: n(t), hostEvents: t.hostEvents, onDiagnostics: (d) => qt(t.webviewId, d), onError: (d) => zt(t.webviewId, d.message) });
|
|
460
|
+
}, Yt = (e, t, n, r) => {
|
|
461
461
|
const {
|
|
462
|
-
workbench:
|
|
463
|
-
panel:
|
|
462
|
+
workbench: s,
|
|
463
|
+
panel: o,
|
|
464
464
|
instance: i
|
|
465
|
-
} = e, a =
|
|
466
|
-
return a ?
|
|
465
|
+
} = e, a = Qt(o.config) ? o.config : null;
|
|
466
|
+
return a ? Ye({
|
|
467
467
|
context: {
|
|
468
|
-
workbench:
|
|
468
|
+
workbench: s,
|
|
469
469
|
webviewId: i.panelId,
|
|
470
470
|
placement: i,
|
|
471
|
-
hostEvents:
|
|
471
|
+
hostEvents: Ge(s, i)
|
|
472
472
|
},
|
|
473
473
|
createHostCapabilities: t,
|
|
474
|
-
createProps:
|
|
475
|
-
createTheme:
|
|
476
|
-
ownerId: "ownerId" in
|
|
477
|
-
title:
|
|
474
|
+
createProps: n,
|
|
475
|
+
createTheme: r,
|
|
476
|
+
ownerId: "ownerId" in o ? o.ownerId : void 0,
|
|
477
|
+
title: o.title,
|
|
478
478
|
webview: a
|
|
479
479
|
}) : null;
|
|
480
|
-
},
|
|
481
|
-
const t = e.createHostCapabilities ??
|
|
480
|
+
}, Xt = (e = {}) => {
|
|
481
|
+
const t = e.createHostCapabilities ?? ze, n = e.createProps ?? Gt, r = e.createTheme ?? Qe;
|
|
482
482
|
return {
|
|
483
|
-
id:
|
|
484
|
-
render: (
|
|
483
|
+
id: se,
|
|
484
|
+
render: (s) => Yt(s, t, n, r)
|
|
485
485
|
};
|
|
486
|
-
},
|
|
486
|
+
}, Jt = (e, t) => ({
|
|
487
|
+
extensionId: "pstdio",
|
|
488
|
+
kind: e,
|
|
489
|
+
id: t
|
|
490
|
+
}), le = (e, t, n) => ({
|
|
491
|
+
id: e,
|
|
492
|
+
ref: Jt("resource-kind", e),
|
|
493
|
+
surface: "primary",
|
|
494
|
+
label: t,
|
|
495
|
+
menuSlots: n
|
|
496
|
+
}), ue = [{
|
|
497
|
+
id: "headerPrimary",
|
|
498
|
+
placement: "header-primary",
|
|
499
|
+
access: "public"
|
|
500
|
+
}, {
|
|
501
|
+
id: "headerOverflow",
|
|
502
|
+
placement: "header-overflow",
|
|
503
|
+
access: "public"
|
|
504
|
+
}], me = {
|
|
505
|
+
project: le("project", "Extension", ue),
|
|
506
|
+
session: le("session", "Session", ue),
|
|
507
|
+
workspace: le("workspace", "Workspace", ue)
|
|
508
|
+
}, $ = {
|
|
509
|
+
project: me.project.ref,
|
|
510
|
+
session: me.session.ref,
|
|
511
|
+
workspace: me.workspace.ref
|
|
512
|
+
}, je = (e) => ({
|
|
513
|
+
...e,
|
|
514
|
+
kind: "command"
|
|
515
|
+
});
|
|
516
|
+
Object.assign(je, {
|
|
517
|
+
forExtension: (e) => (t) => je({
|
|
518
|
+
extensionId: `${e.publisher}.${e.name}`,
|
|
519
|
+
id: t
|
|
520
|
+
})
|
|
521
|
+
});
|
|
522
|
+
const Zt = (e) => ({
|
|
523
|
+
...e,
|
|
524
|
+
kind: "event"
|
|
525
|
+
}), re = (e, t) => ({
|
|
487
526
|
id: e,
|
|
488
527
|
kind: t.kind,
|
|
489
528
|
label: t.label,
|
|
490
529
|
description: t.description,
|
|
491
530
|
metadata: t.metadata
|
|
531
|
+
}), I = (e) => Zt({
|
|
532
|
+
extensionId: "pstdio",
|
|
533
|
+
id: e
|
|
534
|
+
}), V = (e, t) => re(`${e.id}.${t}`, {
|
|
535
|
+
kind: "menu"
|
|
492
536
|
});
|
|
493
|
-
|
|
537
|
+
re("project.sidenav", {
|
|
494
538
|
kind: "panel"
|
|
495
|
-
}),
|
|
496
|
-
kind: "menu"
|
|
497
|
-
}), C("project.headerOverflow", {
|
|
498
|
-
kind: "menu"
|
|
499
|
-
}), C("project.settingsPanels", {
|
|
539
|
+
}), V($.project, "headerPrimary"), V($.project, "headerOverflow"), re("project.settingsPanels", {
|
|
500
540
|
kind: "settings"
|
|
501
541
|
});
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}), C("session.headerOverflow", {
|
|
505
|
-
kind: "menu"
|
|
506
|
-
}), C("session.transcriptActions", {
|
|
507
|
-
kind: "menu"
|
|
508
|
-
});
|
|
509
|
-
C("workspace.headerPrimary", {
|
|
510
|
-
kind: "menu"
|
|
511
|
-
}), C("workspace.headerOverflow", {
|
|
512
|
-
kind: "menu"
|
|
513
|
-
}), C("workspace.sidenav", {
|
|
542
|
+
V($.session, "headerPrimary"), V($.session, "headerOverflow");
|
|
543
|
+
V($.workspace, "headerPrimary"), V($.workspace, "headerOverflow"), re("workspace.sidenav", {
|
|
514
544
|
kind: "panel"
|
|
515
545
|
});
|
|
516
|
-
|
|
546
|
+
I("project.opened");
|
|
547
|
+
I("session.started"), I("session.resumed"), I("session.awaitingInput"), I("session.succeeded"), I("session.failed"), I("session.completed");
|
|
548
|
+
I("workspace.created"), I("workspace.provision"), I("workspace.ready"), I("workspace.archived"), I("workspace.deleted");
|
|
549
|
+
I("worktree.removed");
|
|
550
|
+
I("git.committed"), I("git.rebased"), I("git.merged"), I("git.conflicted");
|
|
551
|
+
const en = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e.$l10n == "string", p = (e, t = "") => e === void 0 ? t : en(e) ? e.default ?? e.$l10n : e, ie = (e) => {
|
|
517
552
|
const t = e;
|
|
518
553
|
if (!t?.outcome) return e;
|
|
519
554
|
if (t.outcome.status === "success") return t.outcome.value;
|
|
520
555
|
throw new Error(t.outcome.reason ?? t.outcome.error?.message ?? "Extension command failed.");
|
|
521
|
-
},
|
|
556
|
+
}, D = (e) => {
|
|
522
557
|
if (e)
|
|
523
558
|
return {
|
|
524
559
|
type: e.kind,
|
|
@@ -526,8 +561,8 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
526
561
|
label: e.label,
|
|
527
562
|
metadata: e.metadata
|
|
528
563
|
};
|
|
529
|
-
},
|
|
530
|
-
const t = e.icon,
|
|
564
|
+
}, J = (e) => {
|
|
565
|
+
const t = e.icon, n = e.projectId ? {
|
|
531
566
|
...e.metadata,
|
|
532
567
|
projectId: e.projectId
|
|
533
568
|
} : e.metadata;
|
|
@@ -537,340 +572,386 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
537
572
|
id: e.id,
|
|
538
573
|
label: e.label,
|
|
539
574
|
icon: typeof t == "string" ? t : void 0,
|
|
540
|
-
metadata:
|
|
575
|
+
metadata: n
|
|
541
576
|
};
|
|
542
|
-
},
|
|
577
|
+
}, B = (e) => ({
|
|
543
578
|
id: e.id,
|
|
544
579
|
kind: e.kind,
|
|
545
580
|
context: {
|
|
546
581
|
projectId: e.projectId,
|
|
547
582
|
...e.context ?? {}
|
|
548
583
|
}
|
|
549
|
-
}),
|
|
550
|
-
|
|
584
|
+
}), tn = (e) => typeof e == "object" && e !== null && !Array.isArray(e), nn = (e) => {
|
|
585
|
+
if (!(!tn(e) || e.deleted !== !0))
|
|
586
|
+
return typeof e.id == "string" ? e.id : void 0;
|
|
587
|
+
}, rn = async (e, t, n) => {
|
|
588
|
+
if (!t || nn(n) !== (t.id ?? t.uri) || (e.workbench.navigator.forgetResource(t.uri), e.workbench.getPrimaryResource()?.uri !== t.uri)) return;
|
|
589
|
+
const r = e.workbench.resources.walkHierarchy(t).at(-2);
|
|
590
|
+
if (r) {
|
|
591
|
+
if (vt(r)) {
|
|
592
|
+
await e.workbench.views.openView(r.viewId, {
|
|
593
|
+
strategy: {
|
|
594
|
+
kind: "replace-active"
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
await e.workbench.resources.openResource(r, {
|
|
600
|
+
replaceActive: !0
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
}, P = async (e, t, n = {}) => {
|
|
604
|
+
const r = D(n.resource), s = await e.executeCommand(t, {
|
|
551
605
|
projectId: e.projectId,
|
|
552
|
-
...
|
|
553
|
-
params:
|
|
606
|
+
...n.params ? {
|
|
607
|
+
params: n.params
|
|
554
608
|
} : {},
|
|
555
|
-
...
|
|
556
|
-
resource:
|
|
609
|
+
...r ? {
|
|
610
|
+
resource: r
|
|
557
611
|
} : {},
|
|
558
|
-
...
|
|
559
|
-
slot:
|
|
612
|
+
...n.slot ? {
|
|
613
|
+
slot: n.slot
|
|
560
614
|
} : {},
|
|
561
615
|
source: "dashboard",
|
|
562
|
-
...
|
|
563
|
-
metadata:
|
|
616
|
+
...n.metadata ? {
|
|
617
|
+
metadata: n.metadata
|
|
564
618
|
} : {}
|
|
565
|
-
});
|
|
566
|
-
return
|
|
567
|
-
},
|
|
568
|
-
if (!
|
|
619
|
+
}), o = ie(s);
|
|
620
|
+
return await rn(e, n.resource, o), o;
|
|
621
|
+
}, S = (e) => !!(e && typeof e == "object" && !Array.isArray(e)), Xe = (e, t) => S(e) && e.kind === t && typeof e.id == "string", on = (e) => S(e) && typeof e.type == "string" && typeof e.id == "string", sn = (e) => {
|
|
622
|
+
if (!on(e.resource)) return !1;
|
|
569
623
|
if (e.input === void 0) return !0;
|
|
570
|
-
if (!
|
|
624
|
+
if (!S(e.input)) return !1;
|
|
571
625
|
const t = e.input.strategy;
|
|
572
626
|
return t === void 0 || t === "persistent" || t === "replace-active";
|
|
573
|
-
},
|
|
574
|
-
if (
|
|
627
|
+
}, an = (e) => {
|
|
628
|
+
if (!Xe(e.view, "view")) return !1;
|
|
575
629
|
if (e.input === void 0) return !0;
|
|
576
|
-
if (!
|
|
577
|
-
const t = e.input.strategy
|
|
578
|
-
return
|
|
579
|
-
},
|
|
630
|
+
if (!S(e.input)) return !1;
|
|
631
|
+
const t = e.input.strategy;
|
|
632
|
+
return t === void 0 || t === "persistent" || t === "preview" || t === "replace-active" || t === "replace-invoking";
|
|
633
|
+
}, We = (e) => S(e) ? e.kind === "resource" ? sn(e) : e.kind === "view" ? an(e) : e.kind === "href" ? typeof e.href == "string" : e.kind === "command" && S(e.target) && Xe(e.target.command, "command") && (e.target.params === void 0 || S(e.target.params)) : !1, dn = (e) => We(e) ? !0 : S(e) && e.kind === "compound" && Array.isArray(e.targets) && e.targets.length > 0 && e.targets.every(We), cn = (e, t) => !e || e === "persistent" ? {} : {
|
|
580
634
|
replaceActive: !0
|
|
581
|
-
},
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
if (!r) return n;
|
|
586
|
-
if (r === "persistent" || r === "preview" || r === "replace-active")
|
|
635
|
+
}, ln = (e, t) => {
|
|
636
|
+
const n = e?.strategy;
|
|
637
|
+
if (!n) return {};
|
|
638
|
+
if (n === "persistent" || n === "preview" || n === "replace-active")
|
|
587
639
|
return {
|
|
588
|
-
...n,
|
|
589
640
|
strategy: {
|
|
590
|
-
kind:
|
|
641
|
+
kind: n
|
|
591
642
|
}
|
|
592
643
|
};
|
|
593
644
|
if (!t) throw new Error("replace-invoking requires a live source placement.");
|
|
594
645
|
return {
|
|
595
|
-
...n,
|
|
596
646
|
strategy: {
|
|
597
647
|
kind: "replace-panel",
|
|
598
648
|
instanceId: t.instanceId
|
|
599
649
|
}
|
|
600
650
|
};
|
|
601
|
-
},
|
|
602
|
-
const
|
|
603
|
-
|
|
651
|
+
}, un = (e, t) => {
|
|
652
|
+
const n = t.commandTargetOf?.(e);
|
|
653
|
+
if (n) return n;
|
|
654
|
+
const r = e.target.command, s = r.extensionId ?? t.extensionId;
|
|
655
|
+
return {
|
|
604
656
|
kind: "command",
|
|
605
|
-
commandId: t.commandIdOf?.(
|
|
606
|
-
args: e.params
|
|
657
|
+
commandId: t.commandIdOf?.(r) ?? (s && s !== "pstdio" ? `${s}.command.${r.id}` : r.id),
|
|
658
|
+
args: e.target.params
|
|
607
659
|
};
|
|
608
|
-
},
|
|
660
|
+
}, mn = (e, t) => {
|
|
661
|
+
const n = e.view.extensionId ?? t;
|
|
662
|
+
return n ? `${n}.view.${e.view.id}` : e.view.id;
|
|
663
|
+
}, Z = (e, t = {}) => {
|
|
609
664
|
if (e.kind === "resource") {
|
|
610
665
|
if (e.section && !t.resourceOf)
|
|
611
666
|
throw new Error("Resource targets with a section need a resourceOf translator that encodes the section.");
|
|
612
667
|
return {
|
|
613
668
|
kind: "resource",
|
|
614
|
-
resource: t.resourceOf ? t.resourceOf(e.resource, e) :
|
|
615
|
-
input:
|
|
669
|
+
resource: t.resourceOf ? t.resourceOf(e.resource, e) : J(e.resource),
|
|
670
|
+
input: cn(e.input?.strategy, t.sourcePlacement)
|
|
616
671
|
};
|
|
617
672
|
}
|
|
618
|
-
return e.kind === "
|
|
619
|
-
kind: "
|
|
620
|
-
|
|
621
|
-
input:
|
|
622
|
-
} : e.kind === "command" ?
|
|
673
|
+
return e.kind === "view" ? {
|
|
674
|
+
kind: "view",
|
|
675
|
+
viewId: mn(e, t.extensionId),
|
|
676
|
+
input: ln(e.input, t.sourcePlacement)
|
|
677
|
+
} : e.kind === "command" ? un(e, t) : e.kind === "href" ? e : {
|
|
623
678
|
kind: "compound",
|
|
624
|
-
targets: e.targets.map((
|
|
679
|
+
targets: e.targets.map((n) => Z(n, t))
|
|
625
680
|
};
|
|
626
|
-
},
|
|
681
|
+
}, Je = (e, t = {}) => {
|
|
627
682
|
if (e != null) {
|
|
628
|
-
if (!
|
|
629
|
-
return
|
|
683
|
+
if (!dn(e)) throw new Error("Renderer callback returned an invalid navigation target.");
|
|
684
|
+
return Z(e, t);
|
|
630
685
|
}
|
|
631
|
-
},
|
|
686
|
+
}, pn = (e) => typeof e == "object" && e !== null && !Array.isArray(e), fn = (e, t) => `${e.extensionId ?? t}.command.${e.id}`, bn = async (e, t, n) => {
|
|
632
687
|
const {
|
|
633
|
-
target:
|
|
634
|
-
} =
|
|
635
|
-
if (
|
|
636
|
-
await P(e,
|
|
637
|
-
params:
|
|
688
|
+
target: r
|
|
689
|
+
} = n;
|
|
690
|
+
if (r.kind === "command") {
|
|
691
|
+
await P(e, fn(r.target.command, t.extensionId), {
|
|
692
|
+
params: r.target.params
|
|
638
693
|
}), e.workbench.commandPaletteResources.refresh();
|
|
639
694
|
return;
|
|
640
695
|
}
|
|
641
|
-
await e.workbench.navigation.openTarget(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
696
|
+
await e.workbench.navigation.openTarget(Z(r, {
|
|
697
|
+
extensionId: t.extensionId,
|
|
698
|
+
resourceOf: (s, o) => {
|
|
699
|
+
const i = J(s);
|
|
700
|
+
return o.section ? {
|
|
645
701
|
...i,
|
|
646
702
|
metadata: {
|
|
647
703
|
...i.metadata,
|
|
648
|
-
[
|
|
704
|
+
[we]: {
|
|
649
705
|
treeId: t.id,
|
|
650
|
-
targetNodeId:
|
|
651
|
-
anchors:
|
|
706
|
+
targetNodeId: n.id,
|
|
707
|
+
anchors: o.section.anchors
|
|
652
708
|
}
|
|
653
709
|
}
|
|
654
710
|
} : i;
|
|
655
711
|
}
|
|
656
712
|
}));
|
|
657
|
-
},
|
|
658
|
-
id: `${t.id}:${
|
|
659
|
-
label:
|
|
660
|
-
description:
|
|
661
|
-
icon:
|
|
662
|
-
keywords:
|
|
663
|
-
group:
|
|
664
|
-
activate: () =>
|
|
665
|
-
}),
|
|
666
|
-
const
|
|
667
|
-
for (const
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
id:
|
|
671
|
-
title:
|
|
672
|
-
refreshEventIds:
|
|
713
|
+
}, gn = (e, t, n, r) => ({
|
|
714
|
+
id: `${t.id}:${r.id}`,
|
|
715
|
+
label: r.label,
|
|
716
|
+
description: r.description,
|
|
717
|
+
icon: r.icon,
|
|
718
|
+
keywords: r.keywords,
|
|
719
|
+
group: n,
|
|
720
|
+
activate: () => bn(e, t, r)
|
|
721
|
+
}), hn = (e, t) => {
|
|
722
|
+
const n = [];
|
|
723
|
+
for (const r of t) {
|
|
724
|
+
const s = p(r.title, r.id);
|
|
725
|
+
n.push(e.workbench.commandPaletteResources.registerProvider({
|
|
726
|
+
id: r.id,
|
|
727
|
+
title: s,
|
|
728
|
+
refreshEventIds: r.refreshEventIds,
|
|
673
729
|
query: async ({
|
|
674
|
-
query:
|
|
730
|
+
query: o,
|
|
675
731
|
limit: i
|
|
676
732
|
}) => {
|
|
677
|
-
const a = e.workbench.getActiveResource(), d = await P(e,
|
|
733
|
+
const a = e.workbench.getActiveResource(), d = await P(e, r.queryHandlerId, {
|
|
678
734
|
params: {
|
|
679
735
|
projectId: e.projectId,
|
|
680
736
|
modeId: e.workbench.modes.getActiveModeId(),
|
|
681
|
-
activeResource:
|
|
682
|
-
providerId:
|
|
683
|
-
query:
|
|
737
|
+
activeResource: D(a),
|
|
738
|
+
providerId: r.id,
|
|
739
|
+
query: o,
|
|
684
740
|
limit: i
|
|
685
741
|
}
|
|
686
742
|
});
|
|
687
|
-
return
|
|
743
|
+
return pn(d) ? (d.items ?? []).map((u) => gn(e, r, s, u)) : [];
|
|
688
744
|
}
|
|
689
745
|
}));
|
|
690
746
|
}
|
|
691
747
|
return {
|
|
692
748
|
dispose() {
|
|
693
|
-
for (let
|
|
749
|
+
for (let r = n.length - 1; r >= 0; r -= 1) n[r]?.dispose();
|
|
694
750
|
}
|
|
695
751
|
};
|
|
696
|
-
},
|
|
697
|
-
for:
|
|
698
|
-
...
|
|
752
|
+
}, wn = (e) => e ? (Array.isArray(e) ? e : [e]).map(({
|
|
753
|
+
for: n,
|
|
754
|
+
...r
|
|
699
755
|
}) => ({
|
|
700
|
-
...
|
|
701
|
-
resourceKind:
|
|
702
|
-
})) : [],
|
|
703
|
-
const e = [], t = [],
|
|
704
|
-
const a =
|
|
705
|
-
a >= 0 &&
|
|
756
|
+
...r,
|
|
757
|
+
resourceKind: n
|
|
758
|
+
})) : [], In = () => {
|
|
759
|
+
const e = [], t = [], n = [], r = /* @__PURE__ */ new Map(), s = (o, i) => Ae(() => {
|
|
760
|
+
const a = o.indexOf(i);
|
|
761
|
+
a >= 0 && o.splice(a, 1);
|
|
706
762
|
});
|
|
707
763
|
return {
|
|
708
|
-
registerResourceKind(
|
|
709
|
-
return e.push(
|
|
764
|
+
registerResourceKind(o) {
|
|
765
|
+
return e.push(o), s(e, o);
|
|
710
766
|
},
|
|
711
|
-
registerPanelCapability(
|
|
712
|
-
return t.push(
|
|
767
|
+
registerPanelCapability(o) {
|
|
768
|
+
return t.push(o), s(t, o);
|
|
713
769
|
},
|
|
714
|
-
registerResourcePanel(
|
|
715
|
-
return
|
|
770
|
+
registerResourcePanel(o) {
|
|
771
|
+
return n.push(o), s(n, o);
|
|
716
772
|
},
|
|
717
|
-
registerModeComposition(
|
|
718
|
-
return
|
|
719
|
-
|
|
773
|
+
registerModeComposition(o) {
|
|
774
|
+
return r.set(o.id, o), Ae(() => {
|
|
775
|
+
r.get(o.id) === o && r.delete(o.id);
|
|
720
776
|
});
|
|
721
777
|
},
|
|
722
778
|
getComposition: () => ({
|
|
723
779
|
resourceKinds: [...e],
|
|
724
780
|
panels: [...t],
|
|
725
|
-
resourcePanels: [...
|
|
781
|
+
resourcePanels: [...n]
|
|
726
782
|
}),
|
|
727
|
-
getModeComposition: (
|
|
783
|
+
getModeComposition: (o) => r.get(o)
|
|
728
784
|
};
|
|
729
|
-
},
|
|
730
|
-
const
|
|
731
|
-
for (const
|
|
732
|
-
const
|
|
733
|
-
r
|
|
734
|
-
order:
|
|
785
|
+
}, Ze = (e, t) => {
|
|
786
|
+
const n = {};
|
|
787
|
+
for (const r of Ie) {
|
|
788
|
+
const s = e.regions[r], o = s.widgets.filter((a) => t.has(a.contributionId)).map((a) => a.contributionId), i = s.widgets.find((a) => a.widgetId === s.activeWidgetId);
|
|
789
|
+
n[r] = {
|
|
790
|
+
order: o,
|
|
735
791
|
activePanelId: i && t.has(i.contributionId) ? i.contributionId : void 0
|
|
736
792
|
};
|
|
737
793
|
}
|
|
738
794
|
return {
|
|
739
|
-
regions:
|
|
795
|
+
regions: n
|
|
740
796
|
};
|
|
741
|
-
},
|
|
797
|
+
}, yn = (e) => {
|
|
742
798
|
const t = e.registry.getModeComposition(e.modeId);
|
|
743
799
|
if (!t) return [];
|
|
744
|
-
const
|
|
745
|
-
return
|
|
800
|
+
const n = e.registry.getComposition(), r = new Set(n.panels.map((s) => s.id));
|
|
801
|
+
return Le({
|
|
746
802
|
context: {
|
|
747
803
|
modeId: e.modeId,
|
|
748
804
|
resourceKind: e.resourceKind
|
|
749
805
|
},
|
|
750
806
|
mode: t,
|
|
751
|
-
composition:
|
|
752
|
-
persisted:
|
|
807
|
+
composition: n,
|
|
808
|
+
persisted: Ze(e.layout, r)
|
|
753
809
|
}).addablePanels;
|
|
754
|
-
},
|
|
755
|
-
const
|
|
810
|
+
}, Me = (e) => e === "main" ? "location" : "sub-panel", vn = (e, t) => {
|
|
811
|
+
const n = e.layout.getLayout(), r = Ie.find((d) => n.regions[d].widgets.some((u) => u.contributionId === t.panelId)), s = () => e.layout.openWidget(t.panelId, {
|
|
756
812
|
region: t.region,
|
|
757
813
|
closable: !t.required,
|
|
758
814
|
pinned: t.pinned,
|
|
759
|
-
role:
|
|
815
|
+
role: Me(t.region)
|
|
760
816
|
});
|
|
761
|
-
if (!
|
|
762
|
-
(t.origin === "persisted" || t.origin === "default" || t.required) &&
|
|
817
|
+
if (!r) {
|
|
818
|
+
(t.origin === "persisted" || t.origin === "default" || t.required) && s();
|
|
763
819
|
return;
|
|
764
820
|
}
|
|
765
|
-
if (!t.allowedRegions.includes(
|
|
766
|
-
|
|
821
|
+
if (!t.allowedRegions.includes(r)) {
|
|
822
|
+
s();
|
|
767
823
|
return;
|
|
768
824
|
}
|
|
769
|
-
const
|
|
770
|
-
if (!
|
|
771
|
-
const i =
|
|
772
|
-
((
|
|
825
|
+
const o = n.regions[r].widgets.find((d) => d.contributionId === t.panelId);
|
|
826
|
+
if (!o) return;
|
|
827
|
+
const i = Me(r), a = !t.required;
|
|
828
|
+
((o.closable ?? !0) !== a || o.pinned !== t.pinned || o.role !== i) && e.layout.updateWidgetPlacement(o.widgetId, {
|
|
773
829
|
closable: a,
|
|
774
830
|
pinned: t.pinned,
|
|
775
831
|
role: i
|
|
776
832
|
});
|
|
777
|
-
},
|
|
778
|
-
for (const [
|
|
779
|
-
if (!
|
|
780
|
-
const
|
|
781
|
-
|
|
833
|
+
}, kn = (e, t) => {
|
|
834
|
+
for (const [n, r] of t) {
|
|
835
|
+
if (!r) continue;
|
|
836
|
+
const s = e.layout.getLayout().regions[n];
|
|
837
|
+
s.activeWidgetId !== r && s.widgets.some((o) => o.widgetId === r) && e.layout.setRegionActiveWidget(n, r);
|
|
782
838
|
}
|
|
783
|
-
},
|
|
784
|
-
const
|
|
785
|
-
if (!
|
|
786
|
-
e.notifications.dismiss(
|
|
839
|
+
}, Rn = (e, t, n) => {
|
|
840
|
+
const r = Cn(t);
|
|
841
|
+
if (!n.requiredFallback) {
|
|
842
|
+
e.notifications.dismiss(r);
|
|
787
843
|
return;
|
|
788
844
|
}
|
|
789
|
-
const
|
|
790
|
-
e.layout.getLayout().regions.main.widgets.some((i) => i.contributionId ===
|
|
845
|
+
const s = n.requiredFallback.panelId;
|
|
846
|
+
e.layout.getLayout().regions.main.widgets.some((i) => i.contributionId === s) || e.layout.openWidget(s, {
|
|
791
847
|
region: "main",
|
|
792
848
|
pinned: !0,
|
|
793
849
|
role: "location"
|
|
794
850
|
}), e.notifications.show({
|
|
795
|
-
id:
|
|
851
|
+
id: r,
|
|
796
852
|
level: "error",
|
|
797
853
|
title: "A required panel could not be placed",
|
|
798
|
-
message:
|
|
854
|
+
message: n.diagnostics.map((i) => i.message).join(" ")
|
|
799
855
|
});
|
|
800
|
-
},
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
803
|
-
const
|
|
856
|
+
}, Cn = (e) => `workbench.composition.required.${e}`, xn = (e, t) => {
|
|
857
|
+
const n = t.registry.getModeComposition(t.modeId);
|
|
858
|
+
if (!n) return;
|
|
859
|
+
const r = t.registry.getComposition(), s = new Set(r.panels.map((u) => u.id)), o = e.layout.getLayout(), i = t.seeding ? void 0 : Ze(o, s), a = Le({
|
|
804
860
|
context: {
|
|
805
861
|
modeId: t.modeId,
|
|
806
862
|
resourceKind: t.resourceKind
|
|
807
863
|
},
|
|
808
|
-
mode:
|
|
809
|
-
composition:
|
|
864
|
+
mode: n,
|
|
865
|
+
composition: r,
|
|
810
866
|
persisted: i
|
|
811
|
-
}), d = new Map(
|
|
812
|
-
for (const
|
|
813
|
-
return
|
|
814
|
-
},
|
|
815
|
-
title:
|
|
867
|
+
}), d = new Map(Ie.map((u) => [u, e.layout.getLayout().regions[u].activeWidgetId]));
|
|
868
|
+
for (const u of a.placements) vn(e, u);
|
|
869
|
+
return kn(e, d), e.layout.reconcilePanelMenus(), Rn(e, t.modeId, a), a;
|
|
870
|
+
}, ve = (e) => ({
|
|
871
|
+
title: p(e.title) || void 0,
|
|
816
872
|
runtimeUrl: e.runtimeUrl,
|
|
817
873
|
moduleUrl: e.moduleUrl,
|
|
818
874
|
styles: e.styles,
|
|
819
875
|
capabilities: e.capabilities
|
|
820
|
-
}),
|
|
876
|
+
}), F = (e, t) => e?.({
|
|
877
|
+
id: t.id,
|
|
878
|
+
title: p(t.title, t.id),
|
|
879
|
+
icon: t.icon
|
|
880
|
+
}), En = (e = 0) => ({
|
|
821
881
|
priority: -e
|
|
822
|
-
}),
|
|
823
|
-
const
|
|
824
|
-
if (
|
|
825
|
-
const
|
|
826
|
-
return
|
|
827
|
-
},
|
|
882
|
+
}), Pn = (e, t) => {
|
|
883
|
+
const n = e.show ? Array.isArray(e.show) ? e.show : [e.show] : [];
|
|
884
|
+
if (n.some((s) => s.for === void 0)) return;
|
|
885
|
+
const r = [...n.flatMap((s) => s.for ? [s.for] : []), ...(t ?? []).filter((s) => s.panel === e.id).map((s) => s.resourceKind)].filter((s, o, i) => i.indexOf(s) === o);
|
|
886
|
+
return r.length > 0 ? r : void 0;
|
|
887
|
+
}, An = (e) => (e.show ? Array.isArray(e.show) ? e.show : [e.show] : [])[0]?.region ?? "main", N = (e) => ({
|
|
828
888
|
id: e.panel.id,
|
|
829
|
-
title:
|
|
889
|
+
title: p(e.panel.title, e.panel.id),
|
|
830
890
|
icon: e.panel.icon,
|
|
831
|
-
region:
|
|
891
|
+
region: An(e.panel),
|
|
832
892
|
rendererId: e.rendererId,
|
|
833
893
|
singleton: !0,
|
|
834
|
-
resourceKinds:
|
|
835
|
-
panelMenus:
|
|
894
|
+
resourceKinds: Pn(e.panel, e.resourcePanels),
|
|
895
|
+
panelMenus: jn(e.panel.panelMenus, e.menuDeclarationOffset),
|
|
836
896
|
config: e.config,
|
|
837
|
-
...
|
|
838
|
-
}),
|
|
897
|
+
...En(e.declarationIndex)
|
|
898
|
+
}), L = (e) => {
|
|
839
899
|
const t = [];
|
|
840
|
-
let
|
|
841
|
-
for (const
|
|
842
|
-
t.push(
|
|
900
|
+
let n = 0;
|
|
901
|
+
for (const r of e)
|
|
902
|
+
t.push(n), n += r.panelMenus?.length ?? 0;
|
|
843
903
|
return t;
|
|
844
|
-
},
|
|
845
|
-
const t = e.renderer?.id ?? (e.webview ?
|
|
904
|
+
}, Sn = (e) => {
|
|
905
|
+
const t = e.renderer?.id ?? (e.webview ? se : void 0);
|
|
846
906
|
if (!t) throw new Error(`Panel Menu has no renderer: ${e.id}`);
|
|
847
907
|
return t;
|
|
848
|
-
},
|
|
908
|
+
}, Tn = {
|
|
849
909
|
first: 1e6,
|
|
850
910
|
default: 0,
|
|
851
911
|
last: -1e6
|
|
852
|
-
},
|
|
853
|
-
id:
|
|
854
|
-
title:
|
|
855
|
-
side:
|
|
856
|
-
rendererId:
|
|
857
|
-
config:
|
|
858
|
-
priority:
|
|
859
|
-
})),
|
|
860
|
-
const
|
|
912
|
+
}, jn = (e, t = 0) => e?.map((n, r) => ({
|
|
913
|
+
id: n.id,
|
|
914
|
+
title: p(n.title, n.id),
|
|
915
|
+
side: n.side,
|
|
916
|
+
rendererId: Sn(n),
|
|
917
|
+
config: n.webview ? ve(n.webview) : void 0,
|
|
918
|
+
priority: Tn[n.placement ?? "default"] - (t + r)
|
|
919
|
+
})), U = (e) => {
|
|
920
|
+
const t = e.workbench.layout.registerPanel(e.contribution);
|
|
921
|
+
let n;
|
|
922
|
+
try {
|
|
923
|
+
n = e.workbench.views.registerView({
|
|
924
|
+
id: e.contribution.id,
|
|
925
|
+
panelId: e.contribution.id,
|
|
926
|
+
title: e.contribution.title,
|
|
927
|
+
icon: e.contribution.icon,
|
|
928
|
+
path: e.path,
|
|
929
|
+
aliases: e.aliases,
|
|
930
|
+
resolveInput: e.resolveInput
|
|
931
|
+
});
|
|
932
|
+
} catch (r) {
|
|
933
|
+
throw t.dispose(), r;
|
|
934
|
+
}
|
|
935
|
+
return {
|
|
936
|
+
dispose() {
|
|
937
|
+
n.dispose(), t.dispose();
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}, ee = (e, t) => e.renderer?.kind === t ? e.renderer.id : void 0, pe = (e, t = "") => p(e, t), Wn = (e) => !!e && typeof e == "object" && !Array.isArray(e), Mn = (e, t, n) => {
|
|
941
|
+
const r = B({
|
|
861
942
|
id: t.id,
|
|
862
943
|
kind: "renderer",
|
|
863
944
|
projectId: e.projectId,
|
|
864
945
|
context: {
|
|
865
946
|
controlsRendererId: t.id
|
|
866
947
|
}
|
|
867
|
-
}),
|
|
948
|
+
}), s = (o, i, a) => o ? P(e, o, {
|
|
868
949
|
params: {
|
|
869
950
|
renderer: {
|
|
870
951
|
rendererId: t.id,
|
|
871
952
|
projectId: e.projectId,
|
|
872
953
|
...a ? {
|
|
873
|
-
resource:
|
|
954
|
+
resource: D(a)
|
|
874
955
|
} : {},
|
|
875
956
|
invocation: {
|
|
876
957
|
placement: "visible"
|
|
@@ -879,93 +960,96 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
879
960
|
...i
|
|
880
961
|
},
|
|
881
962
|
resource: a,
|
|
882
|
-
slot:
|
|
963
|
+
slot: r,
|
|
883
964
|
metadata: {
|
|
884
965
|
controlsRendererId: t.id
|
|
885
966
|
}
|
|
886
967
|
}) : Promise.resolve(void 0);
|
|
887
968
|
return e.workbench.renderers.registerControlsRenderer({
|
|
888
969
|
id: t.id,
|
|
889
|
-
title:
|
|
890
|
-
emptyTitle:
|
|
891
|
-
emptyDescription:
|
|
970
|
+
title: pe(t.title, t.id),
|
|
971
|
+
emptyTitle: pe(t.emptyTitle, ""),
|
|
972
|
+
emptyDescription: pe(t.emptyDescription, ""),
|
|
892
973
|
defaultValues: t.defaultValues,
|
|
893
|
-
executeQuery: async (
|
|
894
|
-
const i = await
|
|
895
|
-
return
|
|
974
|
+
executeQuery: async (o) => {
|
|
975
|
+
const i = await s(t.queryHandlerId, {}, o ?? n.resolveResource?.(t));
|
|
976
|
+
return Wn(i) ? i : {};
|
|
896
977
|
},
|
|
897
978
|
updateValue: t.valueChangeHandlerId ? ({
|
|
898
|
-
controlId:
|
|
979
|
+
controlId: o,
|
|
899
980
|
value: i,
|
|
900
981
|
values: a,
|
|
901
982
|
resource: d
|
|
902
|
-
}) =>
|
|
903
|
-
controlId:
|
|
983
|
+
}) => s(t.valueChangeHandlerId, {
|
|
984
|
+
controlId: o,
|
|
904
985
|
value: i,
|
|
905
986
|
values: a
|
|
906
987
|
}, d).then(() => {
|
|
907
988
|
}) : void 0,
|
|
908
989
|
apply: t.applyHandlerId ? ({
|
|
909
|
-
values:
|
|
990
|
+
values: o,
|
|
910
991
|
resource: i
|
|
911
|
-
}) =>
|
|
912
|
-
values:
|
|
992
|
+
}) => s(t.applyHandlerId, {
|
|
993
|
+
values: o
|
|
913
994
|
}, i).then(() => {
|
|
914
995
|
}) : void 0,
|
|
915
996
|
reset: t.resetHandlerId ? ({
|
|
916
|
-
controlIds:
|
|
997
|
+
controlIds: o,
|
|
917
998
|
resource: i
|
|
918
|
-
}) =>
|
|
919
|
-
controlIds:
|
|
999
|
+
}) => s(t.resetHandlerId, {
|
|
1000
|
+
controlIds: o
|
|
920
1001
|
}, i).then(() => {
|
|
921
1002
|
}) : void 0
|
|
922
1003
|
});
|
|
923
|
-
},
|
|
924
|
-
const
|
|
925
|
-
if (
|
|
926
|
-
return
|
|
1004
|
+
}, On = (e, t, n, r, s, o) => {
|
|
1005
|
+
const i = ee(t, "controls");
|
|
1006
|
+
if (i)
|
|
1007
|
+
return U({
|
|
927
1008
|
workbench: e.workbench,
|
|
928
|
-
|
|
1009
|
+
path: t.path,
|
|
1010
|
+
aliases: t.aliases,
|
|
1011
|
+
resolveInput: F(o.resolveViewInput, t),
|
|
1012
|
+
contribution: N({
|
|
929
1013
|
panel: t,
|
|
930
|
-
rendererId:
|
|
931
|
-
declarationIndex:
|
|
932
|
-
menuDeclarationOffset:
|
|
933
|
-
resourcePanels:
|
|
1014
|
+
rendererId: i,
|
|
1015
|
+
declarationIndex: n,
|
|
1016
|
+
menuDeclarationOffset: r,
|
|
1017
|
+
resourcePanels: s
|
|
934
1018
|
})
|
|
935
1019
|
});
|
|
936
|
-
},
|
|
937
|
-
const
|
|
938
|
-
for (const a of t)
|
|
939
|
-
const i =
|
|
940
|
-
return
|
|
941
|
-
const
|
|
942
|
-
|
|
1020
|
+
}, Hn = (e, t, n, r = {}, s = []) => {
|
|
1021
|
+
const o = [];
|
|
1022
|
+
for (const a of t) o.push(Mn(e, a, r));
|
|
1023
|
+
const i = L(n);
|
|
1024
|
+
return n.forEach((a, d) => {
|
|
1025
|
+
const u = On(e, a, d, i[d], s, r);
|
|
1026
|
+
u && o.push(u);
|
|
943
1027
|
}), {
|
|
944
1028
|
dispose() {
|
|
945
|
-
for (let a =
|
|
1029
|
+
for (let a = o.length - 1; a >= 0; a -= 1) o[a]?.dispose();
|
|
946
1030
|
}
|
|
947
1031
|
};
|
|
948
|
-
},
|
|
1032
|
+
}, T = (e, t = "") => p(e, t), Oe = (e) => ({
|
|
949
1033
|
...e,
|
|
950
|
-
label:
|
|
951
|
-
description: e.description ?
|
|
952
|
-
icon: e.icon ?
|
|
1034
|
+
label: T(e.label, e.id),
|
|
1035
|
+
description: e.description ? T(e.description) : void 0,
|
|
1036
|
+
icon: e.icon ? K(Y, {
|
|
953
1037
|
name: e.icon,
|
|
954
1038
|
size: 14
|
|
955
1039
|
}) : void 0
|
|
956
|
-
}),
|
|
1040
|
+
}), Kn = (e) => !!(e && typeof e == "object" && Array.isArray(e.rows)), $n = (e) => ({
|
|
957
1041
|
id: e.id,
|
|
958
1042
|
values: e.values,
|
|
959
|
-
resource: e.resource ?
|
|
960
|
-
}),
|
|
961
|
-
const
|
|
1043
|
+
resource: e.resource ? J(e.resource) : void 0
|
|
1044
|
+
}), Vn = (e, t) => {
|
|
1045
|
+
const n = /* @__PURE__ */ new WeakMap(), r = B({
|
|
962
1046
|
id: t.id,
|
|
963
1047
|
kind: "dataTableRenderer",
|
|
964
1048
|
projectId: e.projectId,
|
|
965
1049
|
context: {
|
|
966
1050
|
dataTableRendererId: t.id
|
|
967
1051
|
}
|
|
968
|
-
}),
|
|
1052
|
+
}), s = (o, i, a, d) => P(e, o, {
|
|
969
1053
|
params: {
|
|
970
1054
|
renderer: {
|
|
971
1055
|
rendererId: t.id,
|
|
@@ -974,7 +1058,7 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
974
1058
|
modeId: d
|
|
975
1059
|
} : {},
|
|
976
1060
|
...a ? {
|
|
977
|
-
resource:
|
|
1061
|
+
resource: D(a)
|
|
978
1062
|
} : {},
|
|
979
1063
|
invocation: {
|
|
980
1064
|
placement: "visible"
|
|
@@ -983,221 +1067,226 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
983
1067
|
...i
|
|
984
1068
|
},
|
|
985
1069
|
resource: a,
|
|
986
|
-
slot:
|
|
1070
|
+
slot: r,
|
|
987
1071
|
metadata: {
|
|
988
1072
|
dataTableRendererId: t.id
|
|
989
1073
|
}
|
|
990
1074
|
});
|
|
991
1075
|
return e.workbench.renderers.registerDataTableRenderer({
|
|
992
1076
|
id: t.id,
|
|
993
|
-
title:
|
|
1077
|
+
title: T(t.title, t.id),
|
|
994
1078
|
resourceKind: t.resourceKind,
|
|
995
|
-
columns: t.columns?.map(
|
|
1079
|
+
columns: t.columns?.map(Oe),
|
|
996
1080
|
initialPageSize: t.initialPageSize,
|
|
997
1081
|
pageSizeOptions: t.pageSizeOptions,
|
|
998
1082
|
selectionMode: t.selectionMode,
|
|
999
|
-
selectionActions: t.selectionActions?.map((
|
|
1000
|
-
id:
|
|
1001
|
-
label:
|
|
1002
|
-
icon:
|
|
1003
|
-
name:
|
|
1083
|
+
selectionActions: t.selectionActions?.map((o) => ({
|
|
1084
|
+
id: o.id,
|
|
1085
|
+
label: T(o.label, o.id),
|
|
1086
|
+
icon: o.icon ? K(Y, {
|
|
1087
|
+
name: o.icon,
|
|
1004
1088
|
size: 16
|
|
1005
1089
|
}) : void 0,
|
|
1006
|
-
destructive:
|
|
1007
|
-
run: (i) => o
|
|
1090
|
+
destructive: o.destructive,
|
|
1091
|
+
run: (i) => s(o.commandId, {
|
|
1008
1092
|
rowIds: i.map((a) => a.id)
|
|
1009
1093
|
}).then(() => {
|
|
1010
1094
|
})
|
|
1011
1095
|
})),
|
|
1012
|
-
emptyTitle: t.emptyTitle ?
|
|
1013
|
-
emptyDescription: t.emptyDescription ?
|
|
1096
|
+
emptyTitle: t.emptyTitle ? T(t.emptyTitle) : void 0,
|
|
1097
|
+
emptyDescription: t.emptyDescription ? T(t.emptyDescription) : void 0,
|
|
1014
1098
|
executeQuery: async ({
|
|
1015
|
-
resource:
|
|
1099
|
+
resource: o,
|
|
1016
1100
|
modeId: i
|
|
1017
1101
|
}) => {
|
|
1018
|
-
const a = await
|
|
1019
|
-
return
|
|
1020
|
-
rows: a.rows.map((
|
|
1021
|
-
const w =
|
|
1022
|
-
return
|
|
1102
|
+
const a = await s(t.queryHandlerId, {}, o, i);
|
|
1103
|
+
return Kn(a) ? {
|
|
1104
|
+
rows: a.rows.map((u) => {
|
|
1105
|
+
const w = $n(u);
|
|
1106
|
+
return n.set(w, u), w;
|
|
1023
1107
|
}),
|
|
1024
|
-
columns: a.columns?.map(
|
|
1108
|
+
columns: a.columns?.map(Oe)
|
|
1025
1109
|
} : {
|
|
1026
1110
|
rows: []
|
|
1027
1111
|
};
|
|
1028
1112
|
},
|
|
1029
|
-
rowActions: t.rowActions?.map((
|
|
1030
|
-
id:
|
|
1031
|
-
label:
|
|
1032
|
-
icon:
|
|
1033
|
-
name:
|
|
1113
|
+
rowActions: t.rowActions?.map((o) => ({
|
|
1114
|
+
id: o.id,
|
|
1115
|
+
label: T(o.label, o.id),
|
|
1116
|
+
icon: o.icon ? K(Y, {
|
|
1117
|
+
name: o.icon,
|
|
1034
1118
|
size: 16
|
|
1035
1119
|
}) : void 0,
|
|
1036
|
-
destructive:
|
|
1120
|
+
destructive: o.destructive,
|
|
1037
1121
|
run: async (i) => {
|
|
1038
|
-
await o
|
|
1122
|
+
await s(o.commandId, {
|
|
1039
1123
|
rowId: i.id
|
|
1040
1124
|
}, i.resource), e.workbench.renderers.refreshDataTableRenderer(t.id);
|
|
1041
1125
|
}
|
|
1042
1126
|
})),
|
|
1043
|
-
onRowActivate: t.rowActivationHandlerId ? async (
|
|
1044
|
-
const i = await
|
|
1045
|
-
row:
|
|
1046
|
-
},
|
|
1127
|
+
onRowActivate: t.rowActivationHandlerId ? async (o) => {
|
|
1128
|
+
const i = await s(t.rowActivationHandlerId, {
|
|
1129
|
+
row: n.get(o) ?? o
|
|
1130
|
+
}, o.resource), a = Je(i, {
|
|
1131
|
+
extensionId: t.extensionId
|
|
1132
|
+
});
|
|
1047
1133
|
a && await e.workbench.navigation.openTarget(a);
|
|
1048
1134
|
} : void 0
|
|
1049
1135
|
});
|
|
1050
|
-
},
|
|
1051
|
-
const
|
|
1052
|
-
if (
|
|
1053
|
-
return
|
|
1136
|
+
}, Dn = (e, t, n, r, s, o) => {
|
|
1137
|
+
const i = ee(t, "dataTable");
|
|
1138
|
+
if (i)
|
|
1139
|
+
return U({
|
|
1054
1140
|
workbench: e.workbench,
|
|
1055
|
-
|
|
1141
|
+
path: t.path,
|
|
1142
|
+
aliases: t.aliases,
|
|
1143
|
+
resolveInput: F(o, t),
|
|
1144
|
+
contribution: N({
|
|
1056
1145
|
panel: t,
|
|
1057
|
-
rendererId:
|
|
1058
|
-
declarationIndex:
|
|
1059
|
-
menuDeclarationOffset:
|
|
1060
|
-
resourcePanels:
|
|
1146
|
+
rendererId: i,
|
|
1147
|
+
declarationIndex: n,
|
|
1148
|
+
menuDeclarationOffset: r,
|
|
1149
|
+
resourcePanels: s
|
|
1061
1150
|
})
|
|
1062
1151
|
});
|
|
1063
|
-
},
|
|
1064
|
-
const o = t.map((
|
|
1065
|
-
return
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1152
|
+
}, Bn = (e, t, n, r = [], s) => {
|
|
1153
|
+
const o = t.map((a) => Vn(e, a)), i = L(n);
|
|
1154
|
+
return n.forEach((a, d) => {
|
|
1155
|
+
const u = Dn(e, a, d, i[d], r, s);
|
|
1156
|
+
u && o.push(u);
|
|
1068
1157
|
}), {
|
|
1069
1158
|
dispose() {
|
|
1070
|
-
for (let
|
|
1159
|
+
for (let a = o.length - 1; a >= 0; a -= 1) o[a]?.dispose();
|
|
1071
1160
|
}
|
|
1072
1161
|
};
|
|
1073
|
-
},
|
|
1162
|
+
}, Fn = {
|
|
1074
1163
|
first: 0,
|
|
1075
1164
|
default: 1,
|
|
1076
1165
|
last: 2
|
|
1077
|
-
},
|
|
1166
|
+
}, Do = {
|
|
1078
1167
|
commands: [],
|
|
1079
1168
|
commandPaletteContributions: [],
|
|
1080
1169
|
diagnostics: [],
|
|
1081
1170
|
extensions: [],
|
|
1082
1171
|
menuContributions: [],
|
|
1083
1172
|
modes: [],
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1173
|
+
views: [],
|
|
1174
|
+
viewMenus: [],
|
|
1175
|
+
placements: [],
|
|
1176
|
+
resourceKinds: [],
|
|
1177
|
+
resourceViews: [],
|
|
1178
|
+
navigationItems: [],
|
|
1179
|
+
statusBarItems: [],
|
|
1180
|
+
statuses: [],
|
|
1089
1181
|
settingsPanels: [],
|
|
1090
|
-
settingsDefinitions: []
|
|
1091
|
-
|
|
1092
|
-
panels: []
|
|
1093
|
-
}, gr = (e) => `workbench.extension.menu.${e.id}`, wr = (e) => `workbench.extension.palette.${e.id}`, Ne = (e, t) => hr[e.placement ?? "default"] * 1e3 + t, Ue = (e) => e === void 0 ? "" : it(e) ? e.default ?? e.$l10n : e, Ir = (e) => {
|
|
1182
|
+
settingsDefinitions: []
|
|
1183
|
+
}, Nn = (e) => `workbench.extension.menu.${e.id}`, Ln = (e) => `workbench.extension.palette.${e.id}`, et = (e, t) => Fn[e.placement ?? "default"] * 1e3 + t, tt = (e) => e === void 0 ? "" : Ct(e) ? e.default ?? e.$l10n : e, Un = (e) => {
|
|
1094
1184
|
const {
|
|
1095
1185
|
commandId: t,
|
|
1096
|
-
contribution:
|
|
1097
|
-
index:
|
|
1098
|
-
resolveString:
|
|
1099
|
-
slot:
|
|
1186
|
+
contribution: n,
|
|
1187
|
+
index: r,
|
|
1188
|
+
resolveString: s,
|
|
1189
|
+
slot: o,
|
|
1100
1190
|
when: i
|
|
1101
1191
|
} = e;
|
|
1102
1192
|
return {
|
|
1103
1193
|
commandId: t,
|
|
1104
|
-
sourceCommandId:
|
|
1105
|
-
label:
|
|
1106
|
-
icon:
|
|
1107
|
-
group:
|
|
1108
|
-
args:
|
|
1109
|
-
overflowLabel:
|
|
1110
|
-
order:
|
|
1194
|
+
sourceCommandId: n.commandId,
|
|
1195
|
+
label: s(n.label, n.extensionId),
|
|
1196
|
+
icon: n.icon,
|
|
1197
|
+
group: o.group ?? n.group,
|
|
1198
|
+
args: n.params,
|
|
1199
|
+
overflowLabel: o.overflowLabel,
|
|
1200
|
+
order: et(n, r),
|
|
1111
1201
|
when: i
|
|
1112
1202
|
};
|
|
1113
|
-
},
|
|
1203
|
+
}, _n = (e) => {
|
|
1114
1204
|
const {
|
|
1115
1205
|
commandId: t,
|
|
1116
|
-
contribution:
|
|
1117
|
-
index:
|
|
1118
|
-
resolveString:
|
|
1206
|
+
contribution: n,
|
|
1207
|
+
index: r,
|
|
1208
|
+
resolveString: s
|
|
1119
1209
|
} = e;
|
|
1120
1210
|
return {
|
|
1121
1211
|
commandId: t,
|
|
1122
|
-
label:
|
|
1123
|
-
icon:
|
|
1124
|
-
group:
|
|
1125
|
-
args:
|
|
1126
|
-
order:
|
|
1212
|
+
label: s(n.label, n.extensionId),
|
|
1213
|
+
icon: n.icon,
|
|
1214
|
+
group: n.group,
|
|
1215
|
+
args: n.params,
|
|
1216
|
+
order: et(n, r)
|
|
1127
1217
|
};
|
|
1128
|
-
},
|
|
1218
|
+
}, qn = (e) => {
|
|
1129
1219
|
const {
|
|
1130
|
-
createCommandId: t =
|
|
1131
|
-
createWhenExpression:
|
|
1132
|
-
menuSlotsById:
|
|
1133
|
-
menuTargetsById:
|
|
1134
|
-
metadata:
|
|
1135
|
-
resolveString: i =
|
|
1136
|
-
} = e, a = [];
|
|
1137
|
-
return
|
|
1138
|
-
const
|
|
1139
|
-
if (!
|
|
1140
|
-
|
|
1220
|
+
createCommandId: t = Nn,
|
|
1221
|
+
createWhenExpression: n,
|
|
1222
|
+
menuSlotsById: r,
|
|
1223
|
+
menuTargetsById: s,
|
|
1224
|
+
metadata: o,
|
|
1225
|
+
resolveString: i = tt
|
|
1226
|
+
} = e, a = [], d = [];
|
|
1227
|
+
return o.menuContributions.forEach((u, w) => {
|
|
1228
|
+
const l = u.target ? s?.get(u.target) : r.get(u.slotId);
|
|
1229
|
+
if (!l) {
|
|
1230
|
+
d.push({
|
|
1231
|
+
contribution: u,
|
|
1232
|
+
targetId: u.target ?? u.slotId
|
|
1233
|
+
});
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
const m = t(u), c = o.commands.find((f) => f.id === u.commandId);
|
|
1141
1237
|
a.push({
|
|
1142
1238
|
command: {
|
|
1143
|
-
id:
|
|
1144
|
-
label: i(
|
|
1145
|
-
category:
|
|
1146
|
-
description:
|
|
1147
|
-
icon:
|
|
1148
|
-
params:
|
|
1239
|
+
id: m,
|
|
1240
|
+
label: i(u.label, u.extensionId),
|
|
1241
|
+
category: u.group,
|
|
1242
|
+
description: c ? i(c.description, c.extensionId) : void 0,
|
|
1243
|
+
icon: u.icon,
|
|
1244
|
+
params: c?.params
|
|
1149
1245
|
},
|
|
1150
|
-
contribution:
|
|
1151
|
-
menuItem:
|
|
1152
|
-
commandId:
|
|
1153
|
-
contribution:
|
|
1154
|
-
index:
|
|
1246
|
+
contribution: u,
|
|
1247
|
+
menuItem: Un({
|
|
1248
|
+
commandId: m,
|
|
1249
|
+
contribution: u,
|
|
1250
|
+
index: w,
|
|
1155
1251
|
resolveString: i,
|
|
1156
|
-
slot:
|
|
1157
|
-
when:
|
|
1252
|
+
slot: l,
|
|
1253
|
+
when: n?.(u)
|
|
1158
1254
|
}),
|
|
1159
|
-
menuPath:
|
|
1160
|
-
targetCommandId:
|
|
1255
|
+
menuPath: l.menuPath,
|
|
1256
|
+
targetCommandId: u.commandId
|
|
1161
1257
|
});
|
|
1162
|
-
}),
|
|
1163
|
-
|
|
1258
|
+
}), {
|
|
1259
|
+
registrations: a,
|
|
1260
|
+
unresolved: d
|
|
1261
|
+
};
|
|
1262
|
+
}, zn = (e) => {
|
|
1164
1263
|
const {
|
|
1165
|
-
createCommandId: t =
|
|
1166
|
-
metadata:
|
|
1167
|
-
resolveString:
|
|
1168
|
-
} = e,
|
|
1169
|
-
return (
|
|
1170
|
-
const a = t(
|
|
1171
|
-
|
|
1264
|
+
createCommandId: t = Ln,
|
|
1265
|
+
metadata: n,
|
|
1266
|
+
resolveString: r = tt
|
|
1267
|
+
} = e, s = [];
|
|
1268
|
+
return (n.commandPaletteContributions ?? []).forEach((o, i) => {
|
|
1269
|
+
const a = t(o), d = n.commands.find((u) => u.id === o.commandId);
|
|
1270
|
+
s.push({
|
|
1172
1271
|
command: {
|
|
1173
1272
|
id: a,
|
|
1174
|
-
label:
|
|
1175
|
-
category:
|
|
1176
|
-
description: d ?
|
|
1177
|
-
icon:
|
|
1273
|
+
label: r(o.label, o.extensionId),
|
|
1274
|
+
category: o.group,
|
|
1275
|
+
description: d ? r(d.description, d.extensionId) : void 0,
|
|
1276
|
+
icon: o.icon,
|
|
1178
1277
|
params: d?.params
|
|
1179
1278
|
},
|
|
1180
|
-
contribution:
|
|
1181
|
-
menuItem:
|
|
1279
|
+
contribution: o,
|
|
1280
|
+
menuItem: _n({
|
|
1182
1281
|
commandId: a,
|
|
1183
|
-
contribution:
|
|
1282
|
+
contribution: o,
|
|
1184
1283
|
index: i,
|
|
1185
|
-
resolveString:
|
|
1284
|
+
resolveString: r
|
|
1186
1285
|
}),
|
|
1187
|
-
targetCommandId:
|
|
1286
|
+
targetCommandId: o.commandId
|
|
1188
1287
|
});
|
|
1189
|
-
}),
|
|
1190
|
-
},
|
|
1191
|
-
const {
|
|
1192
|
-
createResource: t,
|
|
1193
|
-
metadata: r
|
|
1194
|
-
} = e;
|
|
1195
|
-
return r ? r.routes.map((n) => ({
|
|
1196
|
-
resource: t({
|
|
1197
|
-
route: n
|
|
1198
|
-
})
|
|
1199
|
-
})) : [];
|
|
1200
|
-
}, Rr = (e) => {
|
|
1288
|
+
}), s;
|
|
1289
|
+
}, Qn = (e) => {
|
|
1201
1290
|
if (e)
|
|
1202
1291
|
return {
|
|
1203
1292
|
type: e.kind,
|
|
@@ -1205,7 +1294,7 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1205
1294
|
label: e.label,
|
|
1206
1295
|
metadata: e.metadata
|
|
1207
1296
|
};
|
|
1208
|
-
},
|
|
1297
|
+
}, Gn = (e) => ({
|
|
1209
1298
|
id: e.rendererId,
|
|
1210
1299
|
kind: "renderer",
|
|
1211
1300
|
context: {
|
|
@@ -1215,8 +1304,8 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1215
1304
|
resourceId: e.resource.id
|
|
1216
1305
|
} : {}
|
|
1217
1306
|
}
|
|
1218
|
-
}),
|
|
1219
|
-
const i =
|
|
1307
|
+
}), He = async (e, t, n, r, s = {}, o) => {
|
|
1308
|
+
const i = Qn(r), a = await e.executeCommand(n, {
|
|
1220
1309
|
projectId: e.projectId,
|
|
1221
1310
|
params: {
|
|
1222
1311
|
renderer: {
|
|
@@ -1229,235 +1318,279 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1229
1318
|
placement: "visible"
|
|
1230
1319
|
}
|
|
1231
1320
|
},
|
|
1232
|
-
...
|
|
1321
|
+
...s
|
|
1233
1322
|
},
|
|
1234
1323
|
resource: i,
|
|
1235
|
-
slot:
|
|
1324
|
+
slot: Gn({
|
|
1236
1325
|
projectId: e.projectId,
|
|
1237
1326
|
rendererId: t,
|
|
1238
1327
|
resource: i
|
|
1239
1328
|
}),
|
|
1240
1329
|
source: "dashboard",
|
|
1241
|
-
...
|
|
1242
|
-
metadata:
|
|
1330
|
+
...o ? {
|
|
1331
|
+
metadata: o
|
|
1243
1332
|
} : {}
|
|
1244
1333
|
});
|
|
1245
|
-
return
|
|
1246
|
-
},
|
|
1334
|
+
return ie(a);
|
|
1335
|
+
}, nt = (e) => {
|
|
1247
1336
|
if (!e || typeof e != "object") return;
|
|
1248
1337
|
const t = e.revision;
|
|
1249
1338
|
return typeof t == "string" ? t : void 0;
|
|
1250
|
-
},
|
|
1251
|
-
const
|
|
1252
|
-
if (!
|
|
1253
|
-
const
|
|
1254
|
-
if (typeof
|
|
1339
|
+
}, Bo = (e, t) => {
|
|
1340
|
+
const n = e.metadata, r = n?.fileRendererOrigin;
|
|
1341
|
+
if (!r || typeof r != "object") return;
|
|
1342
|
+
const s = r;
|
|
1343
|
+
if (typeof s.rendererId != "string" || typeof s.instanceId != "string" || typeof s.operationId != "string")
|
|
1255
1344
|
return;
|
|
1256
|
-
const
|
|
1345
|
+
const o = n?.fileRendererResourceUri, i = nt(t.outcome.value);
|
|
1257
1346
|
return {
|
|
1258
1347
|
origin: {
|
|
1259
|
-
rendererId:
|
|
1260
|
-
instanceId:
|
|
1261
|
-
operationId:
|
|
1348
|
+
rendererId: s.rendererId,
|
|
1349
|
+
instanceId: s.instanceId,
|
|
1350
|
+
operationId: s.operationId
|
|
1262
1351
|
},
|
|
1263
|
-
...typeof
|
|
1264
|
-
resourceUri:
|
|
1352
|
+
...typeof o == "string" ? {
|
|
1353
|
+
resourceUri: o
|
|
1265
1354
|
} : {},
|
|
1266
1355
|
...i ? {
|
|
1267
1356
|
revision: i
|
|
1268
1357
|
} : {}
|
|
1269
1358
|
};
|
|
1270
|
-
},
|
|
1359
|
+
}, Yn = (e, t) => e.workbench.renderers.registerFileRenderer({
|
|
1271
1360
|
id: t.id,
|
|
1272
|
-
title:
|
|
1361
|
+
title: p(t.title, t.id),
|
|
1273
1362
|
resourceKind: t.resourceKind,
|
|
1274
|
-
load: async (
|
|
1275
|
-
save: t.saveHandlerId ? async (
|
|
1276
|
-
const
|
|
1277
|
-
content:
|
|
1363
|
+
load: async (n) => await He(e, t.id, t.loadHandlerId, n) ?? {},
|
|
1364
|
+
save: t.saveHandlerId ? async (n, r, s) => {
|
|
1365
|
+
const o = await He(e, t.id, t.saveHandlerId, n, {
|
|
1366
|
+
content: r
|
|
1278
1367
|
}, {
|
|
1279
|
-
...
|
|
1280
|
-
fileRendererOrigin:
|
|
1368
|
+
...s ? {
|
|
1369
|
+
fileRendererOrigin: s
|
|
1281
1370
|
} : {},
|
|
1282
|
-
...
|
|
1283
|
-
fileRendererResourceUri:
|
|
1371
|
+
...n?.uri ? {
|
|
1372
|
+
fileRendererResourceUri: n.uri
|
|
1284
1373
|
} : {}
|
|
1285
|
-
}), i =
|
|
1374
|
+
}), i = nt(o);
|
|
1286
1375
|
return i ? {
|
|
1287
1376
|
revision: i
|
|
1288
1377
|
} : void 0;
|
|
1289
1378
|
} : void 0
|
|
1290
|
-
}),
|
|
1291
|
-
const
|
|
1292
|
-
if (
|
|
1293
|
-
return
|
|
1379
|
+
}), Xn = (e, t, n, r) => {
|
|
1380
|
+
const s = ee(t, "file");
|
|
1381
|
+
if (s)
|
|
1382
|
+
return U({
|
|
1294
1383
|
workbench: e.workbench,
|
|
1295
|
-
|
|
1384
|
+
path: t.path,
|
|
1385
|
+
aliases: t.aliases,
|
|
1386
|
+
resolveInput: F(e.resolveViewInput, t),
|
|
1387
|
+
contribution: N({
|
|
1296
1388
|
panel: t,
|
|
1297
|
-
rendererId:
|
|
1298
|
-
declarationIndex:
|
|
1299
|
-
menuDeclarationOffset:
|
|
1389
|
+
rendererId: s,
|
|
1390
|
+
declarationIndex: n,
|
|
1391
|
+
menuDeclarationOffset: r,
|
|
1300
1392
|
resourcePanels: e.metadata.resourcePanels
|
|
1301
1393
|
})
|
|
1302
1394
|
});
|
|
1303
|
-
},
|
|
1395
|
+
}, Jn = (e) => {
|
|
1304
1396
|
const t = [];
|
|
1305
|
-
for (const
|
|
1306
|
-
t.push(
|
|
1307
|
-
const
|
|
1308
|
-
return e.metadata.panels.forEach((
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1397
|
+
for (const r of e.metadata.fileRenderers ?? [])
|
|
1398
|
+
t.push(Yn(e, r));
|
|
1399
|
+
const n = L(e.metadata.panels);
|
|
1400
|
+
return e.metadata.panels.forEach((r, s) => {
|
|
1401
|
+
const o = Xn(e, r, s, n[s]);
|
|
1402
|
+
o && t.push(o);
|
|
1311
1403
|
}), {
|
|
1312
1404
|
dispose() {
|
|
1313
|
-
for (let
|
|
1405
|
+
for (let r = t.length - 1; r >= 0; r -= 1) t[r]?.dispose();
|
|
1314
1406
|
}
|
|
1315
1407
|
};
|
|
1316
|
-
},
|
|
1317
|
-
const
|
|
1408
|
+
}, Zn = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ke = (e, t, n, r, s) => (t ?? []).map((o) => {
|
|
1409
|
+
const i = {
|
|
1318
1410
|
...o,
|
|
1319
|
-
label:
|
|
1320
|
-
type: o.type.kind === "
|
|
1411
|
+
label: n(o.label, o.id),
|
|
1412
|
+
type: o.type.kind === "status" ? {
|
|
1413
|
+
kind: "enum",
|
|
1414
|
+
options: s(o.type.statuses)
|
|
1415
|
+
} : o.type.kind === "enum" || o.type.kind === "enum-multi" ? {
|
|
1321
1416
|
...o.type,
|
|
1322
|
-
options: Array.isArray(o.type.options) ? o.type.options.map((
|
|
1323
|
-
...
|
|
1324
|
-
label:
|
|
1417
|
+
options: Array.isArray(o.type.options) ? o.type.options.map((a) => ({
|
|
1418
|
+
...a,
|
|
1419
|
+
label: n(a.label, a.value)
|
|
1325
1420
|
})) : o.type.options
|
|
1326
1421
|
} : o.type
|
|
1327
1422
|
};
|
|
1328
|
-
return
|
|
1329
|
-
}),
|
|
1330
|
-
let o =
|
|
1331
|
-
const
|
|
1423
|
+
return r(e, i);
|
|
1424
|
+
}), er = (e, t, n, r, s = () => []) => {
|
|
1425
|
+
let o = Ke(e, t, n, r, s);
|
|
1426
|
+
const i = /* @__PURE__ */ new Set();
|
|
1332
1427
|
return {
|
|
1333
1428
|
source: {
|
|
1334
1429
|
getSnapshot: () => o,
|
|
1335
|
-
subscribe: (
|
|
1430
|
+
subscribe: (a) => (i.add(a), () => i.delete(a))
|
|
1336
1431
|
},
|
|
1337
|
-
set(
|
|
1338
|
-
o =
|
|
1339
|
-
for (const
|
|
1432
|
+
set(a) {
|
|
1433
|
+
o = Ke(e, a, n, r, s);
|
|
1434
|
+
for (const d of i) d();
|
|
1340
1435
|
}
|
|
1341
1436
|
};
|
|
1342
|
-
},
|
|
1437
|
+
}, tr = (e) => !!(e && typeof e == "object" && typeof e.kind == "string"), nr = (e) => !!(e && typeof e == "object" && typeof e.type == "string" && typeof e.id == "string"), rr = (e, t) => `pstdio://extension-resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}`, rt = (e, t) => {
|
|
1343
1438
|
const {
|
|
1344
|
-
resource:
|
|
1439
|
+
resource: n
|
|
1345
1440
|
} = t;
|
|
1346
|
-
if (
|
|
1347
|
-
if (
|
|
1348
|
-
},
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
1441
|
+
if (tr(n)) return n;
|
|
1442
|
+
if (nr(n)) return J(n);
|
|
1443
|
+
}, or = (e, t) => {
|
|
1444
|
+
const n = rt(e, t);
|
|
1445
|
+
if (n) return n;
|
|
1351
1446
|
if (e.resourceKind)
|
|
1352
1447
|
return {
|
|
1353
1448
|
kind: e.resourceKind,
|
|
1354
|
-
uri:
|
|
1449
|
+
uri: rr(e.resourceKind, t.id),
|
|
1355
1450
|
id: t.id,
|
|
1356
1451
|
label: t.title
|
|
1357
1452
|
};
|
|
1358
|
-
},
|
|
1359
|
-
const
|
|
1360
|
-
return
|
|
1361
|
-
...
|
|
1362
|
-
resource:
|
|
1453
|
+
}, $e = (e, t) => {
|
|
1454
|
+
const n = e, r = t(n);
|
|
1455
|
+
return r === void 0 ? n : {
|
|
1456
|
+
...n,
|
|
1457
|
+
resource: r
|
|
1363
1458
|
};
|
|
1364
|
-
},
|
|
1365
|
-
if (!
|
|
1366
|
-
const
|
|
1459
|
+
}, ot = (...e) => Object.assign({}, ...e.filter((t) => !!t)), sr = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, ir = (e) => Object.keys(e ?? {}).length > 0, ar = /* @__PURE__ */ new Set(["text", "longtext", "markdown", "number", "boolean", "select", "multi-select", "files"]), dr = (e, t, n) => {
|
|
1460
|
+
if (!ar.has(t.type)) return;
|
|
1461
|
+
const r = "options" in t && Array.isArray(t.options) ? t.options : [], s = t;
|
|
1367
1462
|
return {
|
|
1368
1463
|
id: e,
|
|
1369
|
-
label:
|
|
1370
|
-
description: t.description === void 0 ? void 0 :
|
|
1371
|
-
placeholder:
|
|
1464
|
+
label: n(t.label, e),
|
|
1465
|
+
description: t.description === void 0 ? void 0 : n(t.description),
|
|
1466
|
+
placeholder: s.placeholder === void 0 ? void 0 : n(s.placeholder),
|
|
1372
1467
|
type: t.type,
|
|
1373
1468
|
required: t.required === !0,
|
|
1374
1469
|
defaultValue: t.defaultValue,
|
|
1375
|
-
options: t.type === "select" || t.type === "multi-select" ?
|
|
1376
|
-
value:
|
|
1377
|
-
label:
|
|
1378
|
-
icon:
|
|
1470
|
+
options: t.type === "select" || t.type === "multi-select" ? r.map((o) => ({
|
|
1471
|
+
value: o.value,
|
|
1472
|
+
label: n(o.label, o.value),
|
|
1473
|
+
icon: o.icon
|
|
1379
1474
|
})) : void 0,
|
|
1380
|
-
multiple: t.type === "files" ?
|
|
1381
|
-
accept: t.type === "files" && typeof
|
|
1475
|
+
multiple: t.type === "files" ? s.multiple !== !1 : void 0,
|
|
1476
|
+
accept: t.type === "files" && typeof s.accept == "string" ? s.accept : void 0
|
|
1382
1477
|
};
|
|
1383
|
-
},
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1386
|
-
}),
|
|
1478
|
+
}, cr = (e, t) => Object.entries(e.createRow?.params ?? {}).flatMap(([n, r]) => {
|
|
1479
|
+
const s = dr(n, r, t);
|
|
1480
|
+
return s ? [s] : [];
|
|
1481
|
+
}), lr = (e, t) => B({
|
|
1387
1482
|
id: t.id,
|
|
1388
1483
|
kind: "kanbanRenderer",
|
|
1389
1484
|
projectId: e.projectId,
|
|
1390
1485
|
context: {
|
|
1391
1486
|
kanbanRendererId: t.id
|
|
1392
1487
|
}
|
|
1393
|
-
}),
|
|
1394
|
-
const
|
|
1395
|
-
return P(e,
|
|
1488
|
+
}), X = (e, t, n, r, s) => {
|
|
1489
|
+
const o = s ?? e.workbench.getPrimaryResource();
|
|
1490
|
+
return P(e, n, {
|
|
1396
1491
|
params: {
|
|
1397
1492
|
renderer: {
|
|
1398
1493
|
rendererId: t.id,
|
|
1399
1494
|
projectId: e.projectId,
|
|
1400
|
-
...
|
|
1401
|
-
resource:
|
|
1495
|
+
...o ? {
|
|
1496
|
+
resource: D(o)
|
|
1402
1497
|
} : {},
|
|
1403
1498
|
invocation: {
|
|
1404
1499
|
placement: "visible"
|
|
1405
1500
|
}
|
|
1406
1501
|
},
|
|
1407
|
-
...
|
|
1502
|
+
...r
|
|
1408
1503
|
},
|
|
1409
|
-
resource:
|
|
1410
|
-
slot:
|
|
1504
|
+
resource: o,
|
|
1505
|
+
slot: lr(e, t),
|
|
1411
1506
|
metadata: {
|
|
1412
1507
|
kanbanRendererId: t.id
|
|
1413
1508
|
}
|
|
1414
1509
|
});
|
|
1415
|
-
},
|
|
1416
|
-
const
|
|
1510
|
+
}, st = (e, t) => `workbench.extension.kanbanRenderer.${e.id}.rowAction.${t.id}`, ur = (e, t, n) => (t.rowActions ?? []).map((r) => {
|
|
1511
|
+
const s = e.workbench.commands.getCommand(r.commandId)?.command;
|
|
1417
1512
|
return e.workbench.commands.registerCommand({
|
|
1418
|
-
id:
|
|
1419
|
-
label: r
|
|
1420
|
-
icon:
|
|
1421
|
-
params:
|
|
1513
|
+
id: st(t, r),
|
|
1514
|
+
label: n(r.label, r.id),
|
|
1515
|
+
icon: r.icon,
|
|
1516
|
+
params: s?.params
|
|
1422
1517
|
}, {
|
|
1423
|
-
execute: (
|
|
1518
|
+
execute: (o, i) => X(e, t, r.commandId, ot(sr(o)), i?.resource)
|
|
1424
1519
|
});
|
|
1425
|
-
}),
|
|
1426
|
-
const i =
|
|
1427
|
-
rowId:
|
|
1428
|
-
},
|
|
1429
|
-
resource:
|
|
1430
|
-
} : void 0, w =
|
|
1431
|
-
return a &&
|
|
1520
|
+
}), mr = (e, t, n, r, s, o) => {
|
|
1521
|
+
const i = st(t, n), a = e.workbench.commands.getCommand(i), d = {
|
|
1522
|
+
rowId: r.id
|
|
1523
|
+
}, u = s ? {
|
|
1524
|
+
resource: s
|
|
1525
|
+
} : void 0, w = o(n.label, n.id);
|
|
1526
|
+
return a && ir(a.command.params) ? (e.workbench.commandPalette.requestParams({
|
|
1432
1527
|
record: a,
|
|
1433
1528
|
label: w,
|
|
1434
1529
|
args: d,
|
|
1435
|
-
context:
|
|
1436
|
-
}), Promise.resolve()) : a ? e.workbench.commands.executeCommand(a.command.id, d,
|
|
1437
|
-
}) :
|
|
1530
|
+
context: u
|
|
1531
|
+
}), Promise.resolve()) : a ? e.workbench.commands.executeCommand(a.command.id, d, u).then(() => {
|
|
1532
|
+
}) : X(e, t, n.commandId, d, s).then(() => {
|
|
1438
1533
|
});
|
|
1439
|
-
},
|
|
1534
|
+
}, pr = (e) => (n) => K(Y, {
|
|
1440
1535
|
name: e ?? "MoreHorizontal",
|
|
1441
|
-
...
|
|
1442
|
-
}),
|
|
1536
|
+
...n
|
|
1537
|
+
}), fr = (e, t) => ({
|
|
1443
1538
|
color: e?.color,
|
|
1444
1539
|
canDragIn: e?.canDragIn,
|
|
1445
1540
|
canDragOut: e?.canDragOut,
|
|
1446
1541
|
canCreate: e?.canCreate,
|
|
1447
|
-
actions: e?.actions?.map((
|
|
1448
|
-
id:
|
|
1449
|
-
label: t(
|
|
1450
|
-
icon:
|
|
1542
|
+
actions: e?.actions?.map((n) => ({
|
|
1543
|
+
id: n.id,
|
|
1544
|
+
label: t(n.label, n.id),
|
|
1545
|
+
icon: pr(n.icon)
|
|
1451
1546
|
}))
|
|
1452
|
-
}),
|
|
1547
|
+
}), it = (e, t) => `${t.extensionId ?? e.extensionId}.status.${t.id}`, br = (e, t) => {
|
|
1548
|
+
const n = /* @__PURE__ */ new Map();
|
|
1549
|
+
return (r) => {
|
|
1550
|
+
const s = it(t, r), o = n.get(s);
|
|
1551
|
+
if (o) return o;
|
|
1552
|
+
const i = {
|
|
1553
|
+
getSnapshot: () => (e.workbench.statuses.getStatuses(s) ?? []).map((a) => ({
|
|
1554
|
+
value: a.id,
|
|
1555
|
+
label: a.label,
|
|
1556
|
+
color: a.color,
|
|
1557
|
+
icon: a.icon
|
|
1558
|
+
})),
|
|
1559
|
+
subscribe: (a) => e.workbench.statuses.store.subscribeSelector((d) => d.values[s], a)
|
|
1560
|
+
};
|
|
1561
|
+
return n.set(s, i), e.workbench.statuses.load(s).catch(() => {
|
|
1562
|
+
}), i;
|
|
1563
|
+
};
|
|
1564
|
+
}, gr = (e, t, n, r) => {
|
|
1565
|
+
for (const s of n ?? []) {
|
|
1566
|
+
if (s.type.kind !== "status") continue;
|
|
1567
|
+
const o = it(t, s.type.statuses), i = e.workbench.statuses.getStatuses(o)?.find((d) => d.id === r);
|
|
1568
|
+
if (!i) continue;
|
|
1569
|
+
const a = e.workbench.statuses.getStatusSet(o);
|
|
1570
|
+
return {
|
|
1571
|
+
color: i.color,
|
|
1572
|
+
canCreate: i.board?.canCreate,
|
|
1573
|
+
canDragIn: i.board?.canDragIn,
|
|
1574
|
+
canDragOut: i.board?.canDragOut,
|
|
1575
|
+
actions: i.board?.actions?.flatMap((d) => {
|
|
1576
|
+
const u = a?.actions?.find((w) => w.id === d);
|
|
1577
|
+
return u ? [{
|
|
1578
|
+
id: u.id,
|
|
1579
|
+
label: u.label,
|
|
1580
|
+
icon: u.icon
|
|
1581
|
+
}] : [];
|
|
1582
|
+
})
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
}, hr = (e) => e ? K(Y, {
|
|
1453
1586
|
name: e,
|
|
1454
1587
|
size: 16
|
|
1455
|
-
}) : void 0,
|
|
1588
|
+
}) : void 0, wr = (e, t) => {
|
|
1456
1589
|
if (e.createRow)
|
|
1457
1590
|
return {
|
|
1458
1591
|
title: t(e.createRow.title, "Create row"),
|
|
1459
1592
|
submitLabel: t(e.createRow.submitLabel, "Create"),
|
|
1460
|
-
fields:
|
|
1593
|
+
fields: cr(e, t),
|
|
1461
1594
|
labels: {
|
|
1462
1595
|
cancel: t(e.createRow.labels?.cancel, "Cancel"),
|
|
1463
1596
|
properties: t(e.createRow.labels?.properties, "Properties"),
|
|
@@ -1465,69 +1598,72 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1465
1598
|
removeFile: t(e.createRow.labels?.removeFile, "Remove file")
|
|
1466
1599
|
}
|
|
1467
1600
|
};
|
|
1468
|
-
},
|
|
1601
|
+
}, Ir = (e, t, n, r, s) => {
|
|
1469
1602
|
if (t.rowActivationHandlerId)
|
|
1470
|
-
return async (
|
|
1471
|
-
const i =
|
|
1472
|
-
row: o
|
|
1473
|
-
}, i), d =
|
|
1474
|
-
|
|
1603
|
+
return async (o) => {
|
|
1604
|
+
const i = r(t, o), a = await X(e, t, t.rowActivationHandlerId, {
|
|
1605
|
+
row: s(o)
|
|
1606
|
+
}, i), d = Je(a, {
|
|
1607
|
+
extensionId: t.extensionId,
|
|
1608
|
+
resourceOf: n.resolveNavigationResource ? (u) => n.resolveNavigationResource(t, u) : void 0
|
|
1475
1609
|
});
|
|
1476
1610
|
d && await e.workbench.navigation.openTarget(d);
|
|
1477
1611
|
};
|
|
1478
|
-
if (
|
|
1479
|
-
return (
|
|
1612
|
+
if (n.onRowClick)
|
|
1613
|
+
return (o) => n.onRowClick?.({
|
|
1480
1614
|
record: t,
|
|
1481
|
-
row:
|
|
1482
|
-
resource:
|
|
1615
|
+
row: o,
|
|
1616
|
+
resource: r(t, o)
|
|
1483
1617
|
});
|
|
1484
|
-
},
|
|
1485
|
-
const
|
|
1486
|
-
if (
|
|
1487
|
-
return async (
|
|
1488
|
-
const
|
|
1489
|
-
[
|
|
1490
|
-
} : void 0,
|
|
1491
|
-
[
|
|
1492
|
-
} : void 0), i = await
|
|
1618
|
+
}, yr = (e, t, n) => {
|
|
1619
|
+
const r = e.createRow;
|
|
1620
|
+
if (r)
|
|
1621
|
+
return async (s) => {
|
|
1622
|
+
const o = ot(s.values, r.columnParam ? {
|
|
1623
|
+
[r.columnParam]: s.columnId
|
|
1624
|
+
} : void 0, r.attributesParam ? {
|
|
1625
|
+
[r.attributesParam]: s.attributeValues
|
|
1626
|
+
} : void 0), i = await n(e, r.commandId, o);
|
|
1493
1627
|
await t.onAfterCreate?.({
|
|
1494
1628
|
record: e,
|
|
1495
1629
|
created: i,
|
|
1496
|
-
submission:
|
|
1630
|
+
submission: s
|
|
1497
1631
|
});
|
|
1498
1632
|
};
|
|
1499
|
-
},
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
return (i) =>
|
|
1503
|
-
const d =
|
|
1633
|
+
}, vr = (e, t, n, r, s) => {
|
|
1634
|
+
const o = t.rowActions;
|
|
1635
|
+
if (o?.length)
|
|
1636
|
+
return (i) => o.map((a) => {
|
|
1637
|
+
const d = s(t, i), u = () => mr(e, t, a, i, d, r);
|
|
1504
1638
|
return {
|
|
1505
1639
|
key: a.id,
|
|
1506
|
-
label:
|
|
1640
|
+
label: r(a.label, a.id),
|
|
1507
1641
|
commandId: a.commandId,
|
|
1508
|
-
icon:
|
|
1509
|
-
onClick: () =>
|
|
1642
|
+
icon: hr(a.icon),
|
|
1643
|
+
onClick: () => n.executeRowAction ? n.executeRowAction({
|
|
1510
1644
|
record: t,
|
|
1511
1645
|
action: a,
|
|
1512
1646
|
row: i,
|
|
1513
1647
|
resource: d,
|
|
1514
|
-
runDefault:
|
|
1515
|
-
}) :
|
|
1648
|
+
runDefault: u
|
|
1649
|
+
}) : u()
|
|
1516
1650
|
};
|
|
1517
1651
|
});
|
|
1518
|
-
},
|
|
1519
|
-
const
|
|
1520
|
-
}), l = (c,
|
|
1652
|
+
}, kr = (e, t, n = {}, r = [], s = []) => {
|
|
1653
|
+
const o = [], i = n.resolveLabel ?? ((c, f) => p(c, f)), a = n.decorateAttribute ?? ((c, f) => f), d = n.resolveRowResource ?? rt, u = n.resolveRowActionResource ?? or, w = n.onAfterMutation ?? (() => {
|
|
1654
|
+
}), l = (c, f, h) => X(e, c, f, h).then((C) => (w(c), C));
|
|
1521
1655
|
for (const c of t) {
|
|
1522
|
-
const
|
|
1523
|
-
let
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1656
|
+
const f = br(e, c), h = er(c, c.attributes, i, a, f);
|
|
1657
|
+
let C = c.attributes;
|
|
1658
|
+
const j = /* @__PURE__ */ new WeakMap();
|
|
1659
|
+
let _;
|
|
1660
|
+
const q = (b) => d(c, b), W = (b) => j.get(b) ?? b;
|
|
1661
|
+
o.push(...ur(e, c, i)), o.push(e.workbench.renderers.registerKanbanRenderer({
|
|
1526
1662
|
id: c.id,
|
|
1527
1663
|
title: i(c.title, c.id),
|
|
1528
1664
|
resourceKind: c.resourceKind,
|
|
1529
1665
|
storageScope: e.projectId,
|
|
1530
|
-
attributes:
|
|
1666
|
+
attributes: h.source,
|
|
1531
1667
|
defaultSettings: c.defaultSettings,
|
|
1532
1668
|
defaultFilters: c.defaultFilters,
|
|
1533
1669
|
defaultViews: c.defaultViews?.map((b) => ({
|
|
@@ -1538,106 +1674,118 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1538
1674
|
emptyTitle: i(c.emptyTitle, ""),
|
|
1539
1675
|
emptyDescription: i(c.emptyDescription, ""),
|
|
1540
1676
|
hideToolbar: c.hideToolbar,
|
|
1541
|
-
createRow:
|
|
1542
|
-
getBoardColumnConfig: (b) =>
|
|
1543
|
-
onRowActivate:
|
|
1677
|
+
createRow: wr(c, i),
|
|
1678
|
+
getBoardColumnConfig: (b) => fr(_?.[b] ?? gr(e, c, C, b), i),
|
|
1679
|
+
onRowActivate: Ir(e, c, n, d, W),
|
|
1544
1680
|
executeQuery: async (b) => {
|
|
1545
|
-
const
|
|
1681
|
+
const y = await X(e, c, c.queryHandlerId, {
|
|
1546
1682
|
settings: b.settings,
|
|
1547
1683
|
filters: b.filters
|
|
1548
1684
|
});
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1685
|
+
if (Array.isArray(y))
|
|
1686
|
+
return y.map((x) => {
|
|
1687
|
+
const A = $e(x, q);
|
|
1688
|
+
return j.set(A, x), A;
|
|
1689
|
+
});
|
|
1690
|
+
if (!Zn(y)) return [];
|
|
1691
|
+
const E = y.attributes ?? C;
|
|
1692
|
+
if (y.boardColumnConfigs && E?.some((x) => x.type.kind === "status"))
|
|
1693
|
+
throw new Error(`Status-backed Kanban renderer "${c.id}" cannot return boardColumnConfigs`);
|
|
1694
|
+
return C = E, h.set(E), _ = y.boardColumnConfigs, (y.rows ?? []).map((x) => {
|
|
1695
|
+
const A = $e(x, q);
|
|
1696
|
+
return j.set(A, x), A;
|
|
1697
|
+
});
|
|
1556
1698
|
},
|
|
1557
|
-
onAttributeChange: c.attributeChangeHandlerId ? (b,
|
|
1699
|
+
onAttributeChange: c.attributeChangeHandlerId ? (b, y, E) => l(c, c.attributeChangeHandlerId, {
|
|
1558
1700
|
rowId: b,
|
|
1559
|
-
attributeId:
|
|
1560
|
-
value:
|
|
1701
|
+
attributeId: y,
|
|
1702
|
+
value: E
|
|
1561
1703
|
}).then(() => {
|
|
1562
1704
|
}) : void 0,
|
|
1563
|
-
onReorder: c.reorderHandlerId ? (b,
|
|
1705
|
+
onReorder: c.reorderHandlerId ? (b, y) => l(c, c.reorderHandlerId, {
|
|
1564
1706
|
rowId: b,
|
|
1565
|
-
beforeRowId:
|
|
1707
|
+
beforeRowId: y
|
|
1566
1708
|
}).then(() => {
|
|
1567
1709
|
}) : void 0,
|
|
1568
|
-
onCreateRow:
|
|
1569
|
-
onColumnAction: c.columnActionHandlerId ? async (b,
|
|
1710
|
+
onCreateRow: yr(c, n, l),
|
|
1711
|
+
onColumnAction: c.columnActionHandlerId ? async (b, y) => {
|
|
1570
1712
|
await l(c, c.columnActionHandlerId, {
|
|
1571
1713
|
columnId: b,
|
|
1572
|
-
actionId:
|
|
1714
|
+
actionId: y
|
|
1573
1715
|
});
|
|
1574
1716
|
} : void 0,
|
|
1575
|
-
getRowContextMenuActions:
|
|
1717
|
+
getRowContextMenuActions: vr(e, c, n, i, u)
|
|
1576
1718
|
}));
|
|
1577
1719
|
}
|
|
1578
|
-
const
|
|
1579
|
-
return
|
|
1580
|
-
const h =
|
|
1581
|
-
h &&
|
|
1720
|
+
const m = L(r);
|
|
1721
|
+
return r.forEach((c, f) => {
|
|
1722
|
+
const h = ee(c, "kanban");
|
|
1723
|
+
h && o.push(U({
|
|
1582
1724
|
workbench: e.workbench,
|
|
1583
|
-
|
|
1725
|
+
path: c.path,
|
|
1726
|
+
aliases: c.aliases,
|
|
1727
|
+
resolveInput: F(n.resolveViewInput, c),
|
|
1728
|
+
contribution: N({
|
|
1584
1729
|
panel: c,
|
|
1585
1730
|
rendererId: h,
|
|
1586
|
-
declarationIndex:
|
|
1587
|
-
menuDeclarationOffset:
|
|
1588
|
-
resourcePanels:
|
|
1731
|
+
declarationIndex: f,
|
|
1732
|
+
menuDeclarationOffset: m[f],
|
|
1733
|
+
resourcePanels: s
|
|
1589
1734
|
})
|
|
1590
1735
|
}));
|
|
1591
1736
|
}), {
|
|
1592
1737
|
dispose() {
|
|
1593
|
-
for (let c =
|
|
1738
|
+
for (let c = o.length - 1; c >= 0; c -= 1) o[c]?.dispose();
|
|
1594
1739
|
}
|
|
1595
1740
|
};
|
|
1596
|
-
},
|
|
1741
|
+
}, Rr = (e, t) => {
|
|
1597
1742
|
if (e)
|
|
1598
|
-
return Object.fromEntries(Object.entries(e).map(([
|
|
1599
|
-
...
|
|
1600
|
-
label:
|
|
1601
|
-
description:
|
|
1743
|
+
return Object.fromEntries(Object.entries(e).map(([n, r]) => [n, {
|
|
1744
|
+
...r,
|
|
1745
|
+
label: r.label === void 0 ? void 0 : t(r.label, n),
|
|
1746
|
+
description: r.description === void 0 ? void 0 : t(r.description)
|
|
1602
1747
|
}]));
|
|
1603
|
-
},
|
|
1748
|
+
}, Cr = (e, t) => e.panels.flatMap((n) => [n, ...n.panelMenus ?? []]).filter((n) => n.renderer?.kind === "tree" && n.renderer.id === t.id), at = (e, t) => t.viewId ? e.find((n) => n.id === t.viewId) : e.length === 1 ? e[0] : void 0, xr = async (e) => {
|
|
1604
1749
|
const {
|
|
1605
1750
|
ctx: t,
|
|
1606
|
-
getHostTreeHeaderNodes:
|
|
1607
|
-
record:
|
|
1608
|
-
treeViews:
|
|
1609
|
-
} = e,
|
|
1610
|
-
return !
|
|
1751
|
+
getHostTreeHeaderNodes: n,
|
|
1752
|
+
record: r,
|
|
1753
|
+
treeViews: s
|
|
1754
|
+
} = e, o = at(s, t);
|
|
1755
|
+
return !o || !("hostTreeHeader" in o) || o.hostTreeHeader !== "default" ? [] : await n?.({
|
|
1611
1756
|
ctx: t,
|
|
1612
|
-
record:
|
|
1613
|
-
panel:
|
|
1757
|
+
record: r,
|
|
1758
|
+
panel: o
|
|
1614
1759
|
}) ?? [];
|
|
1615
|
-
},
|
|
1760
|
+
}, Er = async (e) => {
|
|
1616
1761
|
const {
|
|
1617
1762
|
ctx: t,
|
|
1618
|
-
getHostTreeFooterNodes:
|
|
1619
|
-
record:
|
|
1620
|
-
treeViews:
|
|
1621
|
-
} = e,
|
|
1622
|
-
return !
|
|
1763
|
+
getHostTreeFooterNodes: n,
|
|
1764
|
+
record: r,
|
|
1765
|
+
treeViews: s
|
|
1766
|
+
} = e, o = at(s, t);
|
|
1767
|
+
return !o || !("hostTreeFooter" in o) || o.hostTreeFooter !== "default" ? [] : await n?.({
|
|
1623
1768
|
ctx: t,
|
|
1624
|
-
record:
|
|
1625
|
-
panel:
|
|
1769
|
+
record: r,
|
|
1770
|
+
panel: o
|
|
1626
1771
|
}) ?? [];
|
|
1627
|
-
},
|
|
1628
|
-
const
|
|
1629
|
-
if (
|
|
1630
|
-
return
|
|
1772
|
+
}, Pr = (e, t, n, r) => {
|
|
1773
|
+
const s = ee(t, "tree");
|
|
1774
|
+
if (s)
|
|
1775
|
+
return U({
|
|
1631
1776
|
workbench: e.workbench,
|
|
1632
|
-
|
|
1777
|
+
path: t.path,
|
|
1778
|
+
aliases: t.aliases,
|
|
1779
|
+
resolveInput: F(e.resolveViewInput, t),
|
|
1780
|
+
contribution: N({
|
|
1633
1781
|
panel: t,
|
|
1634
|
-
rendererId:
|
|
1635
|
-
declarationIndex:
|
|
1636
|
-
menuDeclarationOffset:
|
|
1782
|
+
rendererId: s,
|
|
1783
|
+
declarationIndex: n,
|
|
1784
|
+
menuDeclarationOffset: r,
|
|
1637
1785
|
resourcePanels: e.resourcePanels
|
|
1638
1786
|
})
|
|
1639
1787
|
});
|
|
1640
|
-
},
|
|
1788
|
+
}, ge = (e) => {
|
|
1641
1789
|
if (e)
|
|
1642
1790
|
return {
|
|
1643
1791
|
type: e.kind,
|
|
@@ -1645,16 +1793,16 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1645
1793
|
label: e.label,
|
|
1646
1794
|
metadata: e.metadata
|
|
1647
1795
|
};
|
|
1648
|
-
},
|
|
1796
|
+
}, Ar = (e, t) => ({
|
|
1649
1797
|
kind: e.type,
|
|
1650
1798
|
uri: `pstdio://extension-resource/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}`,
|
|
1651
1799
|
id: e.id,
|
|
1652
1800
|
label: e.label,
|
|
1653
1801
|
metadata: t ? {
|
|
1654
1802
|
...e.metadata,
|
|
1655
|
-
[
|
|
1803
|
+
[we]: t
|
|
1656
1804
|
} : e.metadata
|
|
1657
|
-
}),
|
|
1805
|
+
}), dt = (e) => ({
|
|
1658
1806
|
id: e.treeId,
|
|
1659
1807
|
kind: "renderer",
|
|
1660
1808
|
context: {
|
|
@@ -1668,68 +1816,68 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1668
1816
|
resourceId: e.resource.id
|
|
1669
1817
|
} : {}
|
|
1670
1818
|
}
|
|
1671
|
-
}),
|
|
1672
|
-
const
|
|
1819
|
+
}), fe = (e, t, n, r) => {
|
|
1820
|
+
const s = ge(n.resource), o = e.workbench.modes.getActiveModeId();
|
|
1673
1821
|
return {
|
|
1674
1822
|
renderer: {
|
|
1675
1823
|
rendererId: t.id,
|
|
1676
1824
|
projectId: e.projectId,
|
|
1677
|
-
...s ? {
|
|
1678
|
-
modeId: s
|
|
1679
|
-
} : {},
|
|
1680
1825
|
...o ? {
|
|
1681
|
-
|
|
1826
|
+
modeId: o
|
|
1827
|
+
} : {},
|
|
1828
|
+
...s ? {
|
|
1829
|
+
resource: s
|
|
1682
1830
|
} : {},
|
|
1683
1831
|
invocation: {
|
|
1684
1832
|
placement: "visible"
|
|
1685
1833
|
}
|
|
1686
1834
|
},
|
|
1687
1835
|
state: e.workbench.renderers.getTreeState(t.id),
|
|
1688
|
-
...
|
|
1689
|
-
filter:
|
|
1836
|
+
...n.filter ? {
|
|
1837
|
+
filter: n.filter
|
|
1690
1838
|
} : {},
|
|
1691
|
-
...
|
|
1692
|
-
node:
|
|
1839
|
+
...r ? {
|
|
1840
|
+
node: r
|
|
1693
1841
|
} : {}
|
|
1694
1842
|
};
|
|
1695
|
-
},
|
|
1696
|
-
const
|
|
1843
|
+
}, be = async (e, t, n, r) => {
|
|
1844
|
+
const s = r.renderer, o = s?.resource, i = await e.executeCommand(n, {
|
|
1697
1845
|
projectId: e.projectId,
|
|
1698
|
-
params:
|
|
1699
|
-
resource:
|
|
1700
|
-
slot:
|
|
1701
|
-
modeId:
|
|
1846
|
+
params: r,
|
|
1847
|
+
resource: o,
|
|
1848
|
+
slot: dt({
|
|
1849
|
+
modeId: s?.modeId,
|
|
1702
1850
|
projectId: e.projectId,
|
|
1703
|
-
resource:
|
|
1851
|
+
resource: o,
|
|
1704
1852
|
treeId: t.id
|
|
1705
1853
|
}),
|
|
1706
1854
|
source: "dashboard"
|
|
1707
1855
|
});
|
|
1708
|
-
return
|
|
1709
|
-
},
|
|
1710
|
-
const
|
|
1711
|
-
...
|
|
1856
|
+
return ie(i);
|
|
1857
|
+
}, ct = async (e, t, n, r, s) => {
|
|
1858
|
+
const o = e.workbench.modes.getActiveModeId(), i = {
|
|
1859
|
+
...r ?? {},
|
|
1712
1860
|
renderer: {
|
|
1713
1861
|
rendererId: t.id,
|
|
1714
1862
|
projectId: e.projectId,
|
|
1715
|
-
...s ? {
|
|
1716
|
-
modeId: s
|
|
1717
|
-
} : {},
|
|
1718
1863
|
...o ? {
|
|
1719
|
-
|
|
1864
|
+
modeId: o
|
|
1865
|
+
} : {},
|
|
1866
|
+
...s ? {
|
|
1867
|
+
resource: s
|
|
1720
1868
|
} : {},
|
|
1721
1869
|
invocation: {
|
|
1722
1870
|
placement: "visible"
|
|
1723
1871
|
}
|
|
1724
1872
|
}
|
|
1725
|
-
}, a = await e.executeCommand(
|
|
1873
|
+
}, a = await e.executeCommand(n, {
|
|
1726
1874
|
projectId: e.projectId,
|
|
1727
1875
|
params: i,
|
|
1728
|
-
resource:
|
|
1729
|
-
slot:
|
|
1730
|
-
modeId:
|
|
1876
|
+
resource: s,
|
|
1877
|
+
slot: dt({
|
|
1878
|
+
modeId: o,
|
|
1731
1879
|
projectId: e.projectId,
|
|
1732
|
-
resource:
|
|
1880
|
+
resource: s,
|
|
1733
1881
|
treeId: t.id
|
|
1734
1882
|
}),
|
|
1735
1883
|
source: "dashboard",
|
|
@@ -1737,754 +1885,979 @@ const Mt = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
|
|
|
1737
1885
|
treeId: t.id
|
|
1738
1886
|
}
|
|
1739
1887
|
});
|
|
1740
|
-
return
|
|
1741
|
-
},
|
|
1742
|
-
const
|
|
1888
|
+
return ie(a);
|
|
1889
|
+
}, Sr = (e, t) => e && typeof e == "object" && !Array.isArray(e) ? e : t, Ve = (e) => e && !Array.isArray(e) ? e : void 0, Tr = (e, t) => {
|
|
1890
|
+
const n = /* @__PURE__ */ new WeakMap(), r = `workbench.extensionTreeRenderer.${t.id}.command`, s = (l, m) => {
|
|
1743
1891
|
const c = e.resolveNodeResource?.(l);
|
|
1744
|
-
return c ?
|
|
1892
|
+
return c ? m ? {
|
|
1745
1893
|
...c,
|
|
1746
1894
|
metadata: {
|
|
1747
1895
|
...c.metadata,
|
|
1748
|
-
[
|
|
1896
|
+
[we]: m
|
|
1749
1897
|
}
|
|
1750
|
-
} : c :
|
|
1751
|
-
},
|
|
1898
|
+
} : c : Ar(l, m);
|
|
1899
|
+
}, o = (l) => {
|
|
1752
1900
|
if (l.emptyState)
|
|
1753
1901
|
return {
|
|
1754
|
-
title:
|
|
1755
|
-
description:
|
|
1902
|
+
title: p(l.emptyState.title),
|
|
1903
|
+
description: p(l.emptyState.description),
|
|
1756
1904
|
icon: l.emptyState.icon
|
|
1757
1905
|
};
|
|
1758
|
-
}, i = (l,
|
|
1906
|
+
}, i = (l, m, c) => l ? Z(l, {
|
|
1759
1907
|
commandTargetOf: (h) => ({
|
|
1760
1908
|
kind: "command",
|
|
1761
|
-
commandId:
|
|
1909
|
+
commandId: r,
|
|
1762
1910
|
args: {
|
|
1763
|
-
commandId:
|
|
1764
|
-
nodeId:
|
|
1765
|
-
params: h.params,
|
|
1766
|
-
resource:
|
|
1911
|
+
commandId: `${h.target.command.extensionId ?? t.extensionId}.command.${h.target.command.id}`,
|
|
1912
|
+
nodeId: m.id,
|
|
1913
|
+
params: h.target.params,
|
|
1914
|
+
resource: m.resource ?? ge(c.resource),
|
|
1767
1915
|
treeId: t.id
|
|
1768
1916
|
}
|
|
1769
1917
|
}),
|
|
1770
|
-
|
|
1918
|
+
extensionId: t.extensionId,
|
|
1919
|
+
resourceOf: (h, C) => s(h, C.section ? {
|
|
1771
1920
|
treeId: t.id,
|
|
1772
|
-
targetNodeId:
|
|
1773
|
-
anchors:
|
|
1921
|
+
targetNodeId: m.id,
|
|
1922
|
+
anchors: C.section.anchors
|
|
1774
1923
|
} : void 0)
|
|
1775
|
-
}) : void 0, a = (l,
|
|
1776
|
-
const
|
|
1924
|
+
}) : void 0, a = (l, m, c) => {
|
|
1925
|
+
const f = l.command ? `${l.command.extensionId ?? t.extensionId}.command.${l.command.id}` : void 0;
|
|
1777
1926
|
return {
|
|
1778
1927
|
id: l.id,
|
|
1779
|
-
label:
|
|
1928
|
+
label: p(l.label),
|
|
1780
1929
|
icon: l.icon,
|
|
1781
|
-
args:
|
|
1782
|
-
params:
|
|
1930
|
+
args: Ve(l.params),
|
|
1931
|
+
params: Rr(l.input, p),
|
|
1783
1932
|
submitLabel: l.submitLabel,
|
|
1784
1933
|
when: l.when,
|
|
1785
1934
|
disabled: l.disabled,
|
|
1786
1935
|
// Actions mutate tree data (create/delete/...), so refresh afterwards. Plain
|
|
1787
1936
|
// node-target navigation runs through the runner command and must not refetch.
|
|
1788
|
-
run:
|
|
1789
|
-
await
|
|
1937
|
+
run: f ? async (h) => {
|
|
1938
|
+
await ct(e, t, f, Sr(h, Ve(l.params)), m?.resource ?? ge(c.resource)), e.workbench.renderers.refresh(t.id);
|
|
1790
1939
|
} : void 0
|
|
1791
1940
|
};
|
|
1792
|
-
}, d = (l,
|
|
1941
|
+
}, d = (l, m) => {
|
|
1793
1942
|
const c = {
|
|
1794
1943
|
id: l.id,
|
|
1795
|
-
label:
|
|
1944
|
+
label: p(l.label),
|
|
1796
1945
|
icon: l.icon,
|
|
1797
1946
|
iconColor: l.iconColor,
|
|
1798
1947
|
iconTooltip: l.iconTooltip,
|
|
1799
|
-
resource: l.resource ?
|
|
1800
|
-
target: i(l.target, l,
|
|
1948
|
+
resource: l.resource ? s(l.resource) : void 0,
|
|
1949
|
+
target: i(l.target, l, m),
|
|
1801
1950
|
rowVariant: l.rowVariant,
|
|
1802
|
-
actions: l.actions?.map((
|
|
1803
|
-
contextMenuActions: l.contextMenuActions?.map((
|
|
1951
|
+
actions: l.actions?.map((f) => a(f, l, m)),
|
|
1952
|
+
contextMenuActions: l.contextMenuActions?.map((f) => a(f, l, m)),
|
|
1804
1953
|
collapsible: l.collapsible,
|
|
1805
1954
|
disabled: l.disabled,
|
|
1806
|
-
children: l.children?.map((
|
|
1955
|
+
children: l.children?.map((f) => d(f, m)),
|
|
1807
1956
|
description: l.description,
|
|
1808
1957
|
contextValue: l.contextValue,
|
|
1809
1958
|
hiddenByDefault: l.hiddenByDefault,
|
|
1810
1959
|
canHide: l.canHide
|
|
1811
1960
|
};
|
|
1812
|
-
return
|
|
1961
|
+
return n.set(c, l), c;
|
|
1813
1962
|
};
|
|
1814
1963
|
return {
|
|
1815
|
-
mapNodes: (l,
|
|
1816
|
-
mapSections: (l,
|
|
1964
|
+
mapNodes: (l, m) => l.map((c) => d(c, m)),
|
|
1965
|
+
mapSections: (l, m) => l.map((c) => ({
|
|
1817
1966
|
id: c.id,
|
|
1818
|
-
label:
|
|
1819
|
-
actions: c.actions?.map((
|
|
1967
|
+
label: p(c.label),
|
|
1968
|
+
actions: c.actions?.map((f) => a(f, void 0, m)),
|
|
1820
1969
|
collapsible: c.collapsible,
|
|
1821
|
-
emptyState:
|
|
1822
|
-
nodes: c.nodes.map((
|
|
1970
|
+
emptyState: o(c),
|
|
1971
|
+
nodes: c.nodes.map((f) => d(f, m)),
|
|
1823
1972
|
hiddenByDefault: c.hiddenByDefault,
|
|
1824
1973
|
canHide: c.canHide
|
|
1825
1974
|
})),
|
|
1826
|
-
originalNodes:
|
|
1827
|
-
runnerCommandId:
|
|
1975
|
+
originalNodes: n,
|
|
1976
|
+
runnerCommandId: r
|
|
1828
1977
|
};
|
|
1829
|
-
},
|
|
1978
|
+
}, jr = (e) => Array.isArray(e) && e.every((t) => t && typeof t == "object" && "nodes" in t), De = (e) => Array.isArray(e) && e.every((t) => t && typeof t == "object" && "id" in t), lt = (e) => {
|
|
1830
1979
|
for (const t of e) {
|
|
1831
1980
|
if (t.selected) return t.id;
|
|
1832
|
-
const
|
|
1833
|
-
if (
|
|
1981
|
+
const n = lt(t.children ?? []);
|
|
1982
|
+
if (n) return n;
|
|
1834
1983
|
}
|
|
1835
|
-
},
|
|
1984
|
+
}, Wr = (e) => {
|
|
1836
1985
|
for (const t of e) {
|
|
1837
|
-
const
|
|
1838
|
-
if (
|
|
1986
|
+
const n = lt(t.nodes);
|
|
1987
|
+
if (n) return n;
|
|
1839
1988
|
}
|
|
1840
|
-
},
|
|
1841
|
-
const
|
|
1842
|
-
id:
|
|
1843
|
-
label: `${
|
|
1989
|
+
}, Mr = (e, t) => {
|
|
1990
|
+
const n = Tr(e, t), r = Cr(e.metadata, t), s = e.workbench.commands.registerCommand({
|
|
1991
|
+
id: n.runnerCommandId,
|
|
1992
|
+
label: `${p(t.title, t.id)} tree command`
|
|
1844
1993
|
}, {
|
|
1845
1994
|
execute: async (i) => {
|
|
1846
1995
|
const a = i;
|
|
1847
1996
|
a.nodeId && e.workbench.renderers.setSelectedNode(t.id, a.nodeId);
|
|
1848
|
-
const d = await
|
|
1849
|
-
for (const
|
|
1850
|
-
e.workbench.renderers.refreshFileRenderer(
|
|
1997
|
+
const d = await ct(e, t, a.commandId, a.params, a.resource);
|
|
1998
|
+
for (const u of e.workbench.renderers.listFileRenderers())
|
|
1999
|
+
e.workbench.renderers.refreshFileRenderer(u.id);
|
|
1851
2000
|
return d;
|
|
1852
2001
|
}
|
|
1853
|
-
}),
|
|
2002
|
+
}), o = e.workbench.renderers.registerTreeRenderer({
|
|
1854
2003
|
id: t.id,
|
|
1855
|
-
title:
|
|
2004
|
+
title: p(t.title, t.id),
|
|
1856
2005
|
icon: t.icon,
|
|
1857
2006
|
searchable: t.searchable,
|
|
1858
|
-
searchPlaceholder:
|
|
2007
|
+
searchPlaceholder: p(t.searchPlaceholder, "Search files"),
|
|
1859
2008
|
defaultExpandedNodeIds: t.defaultExpandedNodeIds,
|
|
1860
2009
|
defaultExpandedSectionIds: t.defaultExpandedSectionIds,
|
|
1861
|
-
getHeader: (i) =>
|
|
2010
|
+
getHeader: (i) => xr({
|
|
1862
2011
|
ctx: i,
|
|
1863
2012
|
getHostTreeHeaderNodes: e.getHostTreeHeaderNodes,
|
|
1864
2013
|
record: t,
|
|
1865
|
-
treeViews:
|
|
2014
|
+
treeViews: r
|
|
1866
2015
|
}),
|
|
1867
2016
|
getBody: async (i) => {
|
|
1868
|
-
const a = await
|
|
1869
|
-
if (!
|
|
1870
|
-
const d =
|
|
1871
|
-
return d && e.workbench.renderers.setSelectedNode(t.id, d),
|
|
2017
|
+
const a = await be(e, t, t.bodyHandlerId, fe(e, t, i));
|
|
2018
|
+
if (!jr(a)) return [];
|
|
2019
|
+
const d = Wr(a);
|
|
2020
|
+
return d && e.workbench.renderers.setSelectedNode(t.id, d), n.mapSections(a, i);
|
|
1872
2021
|
},
|
|
1873
2022
|
getFooter: async (i) => {
|
|
1874
|
-
const a = await
|
|
2023
|
+
const a = await Er({
|
|
1875
2024
|
ctx: i,
|
|
1876
2025
|
getHostTreeFooterNodes: e.getHostTreeFooterNodes,
|
|
1877
2026
|
record: t,
|
|
1878
|
-
treeViews:
|
|
2027
|
+
treeViews: r
|
|
1879
2028
|
});
|
|
1880
2029
|
if (!t.footerHandlerId) return a;
|
|
1881
|
-
const d = await
|
|
1882
|
-
return [...
|
|
2030
|
+
const d = await be(e, t, t.footerHandlerId, fe(e, t, i));
|
|
2031
|
+
return [...De(d) ? n.mapNodes(d, i) : [], ...a];
|
|
1883
2032
|
},
|
|
1884
2033
|
getChildren: async (i, a) => {
|
|
1885
2034
|
if (!t.childrenHandlerId) return i.children ?? [];
|
|
1886
|
-
const d =
|
|
1887
|
-
return
|
|
2035
|
+
const d = n.originalNodes.get(i) ?? i, u = await be(e, t, t.childrenHandlerId, fe(e, t, a, d));
|
|
2036
|
+
return De(u) ? n.mapNodes(u, a) : [];
|
|
1888
2037
|
}
|
|
1889
2038
|
});
|
|
1890
2039
|
return {
|
|
1891
2040
|
dispose() {
|
|
1892
|
-
|
|
2041
|
+
o.dispose(), s.dispose();
|
|
1893
2042
|
}
|
|
1894
2043
|
};
|
|
1895
|
-
},
|
|
2044
|
+
}, Or = (e) => {
|
|
1896
2045
|
const t = [];
|
|
1897
|
-
for (const
|
|
1898
|
-
t.push(
|
|
1899
|
-
const
|
|
1900
|
-
return e.metadata.panels.forEach((
|
|
1901
|
-
const
|
|
2046
|
+
for (const r of e.metadata.treeRenderers ?? [])
|
|
2047
|
+
t.push(Mr(e, r));
|
|
2048
|
+
const n = L(e.metadata.panels);
|
|
2049
|
+
return e.metadata.panels.forEach((r, s) => {
|
|
2050
|
+
const o = Pr({
|
|
1902
2051
|
workbench: e.workbench,
|
|
1903
|
-
resourcePanels: e.metadata.resourcePanels
|
|
1904
|
-
|
|
1905
|
-
|
|
2052
|
+
resourcePanels: e.metadata.resourcePanels,
|
|
2053
|
+
resolveViewInput: e.resolveViewInput
|
|
2054
|
+
}, r, s, n[s]);
|
|
2055
|
+
o && t.push(o);
|
|
1906
2056
|
}), {
|
|
1907
2057
|
dispose() {
|
|
1908
|
-
for (let
|
|
2058
|
+
for (let r = t.length - 1; r >= 0; r -= 1) t[r]?.dispose();
|
|
1909
2059
|
}
|
|
1910
2060
|
};
|
|
1911
|
-
},
|
|
1912
|
-
...Oe({
|
|
1913
|
-
workbench: t.workbench,
|
|
1914
|
-
hostEvents: t.hostEvents
|
|
1915
|
-
}),
|
|
1916
|
-
// Extension guests speak the SDK resource shape (`type`); normalize to the
|
|
1917
|
-
// workbench shape (`kind` + synthesized uri) the resource registry expects,
|
|
1918
|
-
// mirroring how commands.execute and tree targets normalize their resources.
|
|
1919
|
-
"resource.open": (n) => {
|
|
1920
|
-
const o = n;
|
|
1921
|
-
if (!o.resource) throw new Error("resource.open requires a resource.");
|
|
1922
|
-
return t.workbench.resources.openResource(_(o.resource), Me(o.input));
|
|
1923
|
-
},
|
|
1924
|
-
"commands.execute": async (n) => {
|
|
1925
|
-
const o = n, s = o.resource ?? H(t.placement.resource);
|
|
1926
|
-
return e.executeCommand(o.commandId, {
|
|
1927
|
-
projectId: e.projectId,
|
|
1928
|
-
...o.params ? {
|
|
1929
|
-
params: o.params
|
|
1930
|
-
} : {},
|
|
1931
|
-
...s ? {
|
|
1932
|
-
resource: s
|
|
1933
|
-
} : {},
|
|
1934
|
-
slot: M({
|
|
1935
|
-
id: t.webviewId,
|
|
1936
|
-
kind: e.slotKind,
|
|
1937
|
-
projectId: e.projectId,
|
|
1938
|
-
context: {
|
|
1939
|
-
panelId: t.webviewId
|
|
1940
|
-
}
|
|
1941
|
-
}),
|
|
1942
|
-
source: "dashboard"
|
|
1943
|
-
});
|
|
1944
|
-
},
|
|
1945
|
-
...e.files ? {
|
|
1946
|
-
"files.upload": e.files.upload,
|
|
1947
|
-
"files.list": e.files.list,
|
|
1948
|
-
"files.delete": e.files.delete
|
|
1949
|
-
} : {}
|
|
1950
|
-
}), Xe = (e, t) => ({
|
|
1951
|
-
kind: t,
|
|
1952
|
-
uri: `workbench://extension-route/${encodeURIComponent(e.id)}`,
|
|
2061
|
+
}, Hr = (e) => e.includes("main.right") ? "secondary" : (e.includes("main.left"), "sidenav"), Kr = (e, t) => (e.order ?? 0) - (t.order ?? 0) || e.id.localeCompare(t.id), $r = (e) => ({
|
|
1953
2062
|
id: e.id,
|
|
1954
|
-
label:
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
kind: e.routeResourceKind,
|
|
1965
|
-
label: "Extension route",
|
|
1966
|
-
icon: "Component"
|
|
1967
|
-
}));
|
|
1968
|
-
for (const r of e.metadata.routes)
|
|
1969
|
-
t.push(e.workbench.layout.registerPanel({
|
|
1970
|
-
id: r.id,
|
|
1971
|
-
title: f(r.label, r.id),
|
|
1972
|
-
region: "main",
|
|
1973
|
-
rendererId: S,
|
|
1974
|
-
singleton: !0,
|
|
1975
|
-
config: q(r.webview)
|
|
1976
|
-
}));
|
|
1977
|
-
return t.push(e.workbench.resources.registerProvider({
|
|
1978
|
-
id: "workbench.extension.routes",
|
|
1979
|
-
kind: e.routeResourceKind,
|
|
1980
|
-
list: () => e.metadata.routes.map((r) => ({
|
|
1981
|
-
resource: Xe(r, e.routeResourceKind)
|
|
1982
|
-
}))
|
|
1983
|
-
}), e.workbench.resources.registerPresenter({
|
|
1984
|
-
id: "workbench.extension.routes",
|
|
1985
|
-
canOpen: (r) => r.kind === e.routeResourceKind && !!Ae(e.metadata, r),
|
|
1986
|
-
open: (r, n) => {
|
|
1987
|
-
const o = Ae(e.metadata, r);
|
|
1988
|
-
return e.workbench.layout.openPanel(o.id, {
|
|
1989
|
-
strategy: n.replaceActive ? {
|
|
1990
|
-
kind: "replace-active"
|
|
1991
|
-
} : {
|
|
1992
|
-
kind: "persistent"
|
|
1993
|
-
},
|
|
1994
|
-
title: f(o.label, o.id)
|
|
1995
|
-
});
|
|
1996
|
-
}
|
|
1997
|
-
})), t;
|
|
1998
|
-
}, un = {
|
|
1999
|
-
"workbench.left.tree": "sidenav",
|
|
2000
|
-
"workbench.main.left.tree": "main-left-menu",
|
|
2001
|
-
"workbench.main.right.tree": "main-right-menu"
|
|
2002
|
-
}, fn = (e) => e ? un[e] ?? "sidenav" : "sidenav", pn = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, bn = (e, t) => {
|
|
2003
|
-
if (t.action.kind === "panel") return {
|
|
2004
|
-
kind: "panel",
|
|
2005
|
-
panelId: t.action.panelId
|
|
2006
|
-
};
|
|
2007
|
-
const r = t.action;
|
|
2008
|
-
if (r.kind === "route") {
|
|
2009
|
-
const n = e.metadata.routes.find((o) => o.id === r.route);
|
|
2010
|
-
return n ? {
|
|
2011
|
-
kind: "resource",
|
|
2012
|
-
resource: Xe(n, e.routeResourceKind)
|
|
2013
|
-
} : void 0;
|
|
2063
|
+
label: p(e.label, e.id),
|
|
2064
|
+
icon: e.icon,
|
|
2065
|
+
target: Z(e.action, {
|
|
2066
|
+
extensionId: e.extensionId
|
|
2067
|
+
})
|
|
2068
|
+
}), Vr = (e) => {
|
|
2069
|
+
const t = /* @__PURE__ */ new Map();
|
|
2070
|
+
for (const n of e) {
|
|
2071
|
+
const r = n.group ?? "Extensions";
|
|
2072
|
+
t.set(r, [...t.get(r) ?? [], n]);
|
|
2014
2073
|
}
|
|
2015
|
-
return
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
id:
|
|
2025
|
-
label: r.resource.label ?? f(t.label, t.id),
|
|
2026
|
-
icon: t.icon,
|
|
2027
|
-
metadata: r.resource.metadata
|
|
2028
|
-
}
|
|
2029
|
-
} : {
|
|
2030
|
-
kind: "command",
|
|
2031
|
-
commandId: `workbench.extension.href.${t.id}`,
|
|
2032
|
-
args: {
|
|
2033
|
-
href: r.href
|
|
2034
|
-
}
|
|
2035
|
-
};
|
|
2036
|
-
}, hn = (e) => {
|
|
2037
|
-
const t = e.metadata.treeItems ?? [];
|
|
2038
|
-
if (t.length === 0) return [];
|
|
2039
|
-
const r = [], n = /* @__PURE__ */ new Map();
|
|
2040
|
-
for (const o of t) n.set(o.target, [...n.get(o.target) ?? [], o]);
|
|
2041
|
-
for (const [o, s] of n) {
|
|
2042
|
-
const i = `workbench.extension.treeItems.${o}`;
|
|
2043
|
-
r.push(e.workbench.renderers.registerTreeRenderer({
|
|
2044
|
-
id: i,
|
|
2074
|
+
return t;
|
|
2075
|
+
}, Dr = (e) => {
|
|
2076
|
+
if (e.metadata.navigationItems.length === 0) return [];
|
|
2077
|
+
const t = [], n = /* @__PURE__ */ new Map();
|
|
2078
|
+
for (const r of e.metadata.navigationItems)
|
|
2079
|
+
n.set(r.slot.id, [...n.get(r.slot.id) ?? [], r]);
|
|
2080
|
+
for (const [r, s] of n) {
|
|
2081
|
+
const o = `workbench.extension.navigation.${r}`, i = Vr([...s].sort(Kr));
|
|
2082
|
+
t.push(e.workbench.renderers.registerTreeRenderer({
|
|
2083
|
+
id: o,
|
|
2045
2084
|
title: "Extensions",
|
|
2046
2085
|
getChildren: (a) => a.children ?? [],
|
|
2047
|
-
getBody: () => [{
|
|
2048
|
-
id:
|
|
2049
|
-
label:
|
|
2050
|
-
nodes:
|
|
2051
|
-
|
|
2052
|
-
label: f(a.label, a.id),
|
|
2053
|
-
icon: a.icon,
|
|
2054
|
-
target: bn(e, a)
|
|
2055
|
-
}))
|
|
2056
|
-
}]
|
|
2086
|
+
getBody: () => [...i].map(([a, d]) => ({
|
|
2087
|
+
id: a,
|
|
2088
|
+
label: a,
|
|
2089
|
+
nodes: d.map($r)
|
|
2090
|
+
}))
|
|
2057
2091
|
}), e.workbench.layout.registerPanel({
|
|
2058
|
-
id:
|
|
2092
|
+
id: o,
|
|
2059
2093
|
title: "Extensions",
|
|
2060
|
-
region:
|
|
2061
|
-
rendererId:
|
|
2094
|
+
region: Hr(r),
|
|
2095
|
+
rendererId: o,
|
|
2062
2096
|
singleton: !0
|
|
2063
2097
|
}));
|
|
2064
2098
|
}
|
|
2065
|
-
for (const o of t.filter((s) => s.action.kind === "href")) {
|
|
2066
|
-
const s = o.action;
|
|
2067
|
-
s.kind === "href" && r.push(e.workbench.commands.registerCommand({
|
|
2068
|
-
id: `workbench.extension.href.${o.id}`,
|
|
2069
|
-
label: f(o.label, o.id)
|
|
2070
|
-
}, {
|
|
2071
|
-
execute: (i) => e.openHref?.(pn(i)?.href ?? s.href)
|
|
2072
|
-
}));
|
|
2073
|
-
}
|
|
2074
|
-
return r;
|
|
2075
|
-
}, xe = "extension-route", gn = "extensions", wn = (e) => {
|
|
2076
|
-
for (let t = e.length - 1; t >= 0; t -= 1) e[t]?.dispose();
|
|
2077
|
-
}, le = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, In = (e) => e === void 0 ? void 0 : e, yn = (e) => e === "global" ? "user" : "project", vn = (e, t) => t ? (r) => ({
|
|
2078
|
-
...e(r),
|
|
2079
|
-
...t(r)
|
|
2080
|
-
}) : e, Je = (e, t) => {
|
|
2081
|
-
const r = e.createWebviewHostCapabilities ?? ln({
|
|
2082
|
-
executeCommand: e.executeCommand,
|
|
2083
|
-
files: e.webviewFiles,
|
|
2084
|
-
projectId: e.projectId,
|
|
2085
|
-
slotKind: t
|
|
2086
|
-
});
|
|
2087
|
-
return vn(r, e.createWebviewHostCapabilityOverrides);
|
|
2088
|
-
}, kn = (e, t) => {
|
|
2089
|
-
e.workbench.renderers.getRenderer(S) || t.push(e.workbench.renderers.registerRenderer(Ht({
|
|
2090
|
-
createHostCapabilities: Je(e, "panel"),
|
|
2091
|
-
createProps: e.createWebviewProps,
|
|
2092
|
-
createTheme: e.createWebviewTheme
|
|
2093
|
-
})));
|
|
2094
|
-
}, Rn = (e, t) => t.commands.map((r) => e.workbench.commands.registerCommand({
|
|
2095
|
-
id: r.id,
|
|
2096
|
-
label: f(r.title, r.id),
|
|
2097
|
-
description: f(r.description),
|
|
2098
|
-
params: r.params
|
|
2099
|
-
}, {
|
|
2100
|
-
execute: (n, o) => P(e, r.id, {
|
|
2101
|
-
params: le(n),
|
|
2102
|
-
resource: o?.resource
|
|
2103
|
-
})
|
|
2104
|
-
})), Ze = (e, t) => t?.resource ?? e.workbench.getPrimaryResource(), Cn = (e, t) => e.menuSlotsById ? vr({
|
|
2105
|
-
metadata: e.metadata,
|
|
2106
|
-
menuSlotsById: e.menuSlotsById,
|
|
2107
|
-
menuTargetsById: e.menuTargetsById,
|
|
2108
|
-
createWhenExpression: e.createMenuWhenExpression
|
|
2109
|
-
}).flatMap((n) => [e.workbench.commands.registerCommand(n.command, {
|
|
2110
|
-
execute: (o, s) => P(t, n.targetCommandId, {
|
|
2111
|
-
params: {
|
|
2112
|
-
...n.contribution.params ?? {},
|
|
2113
|
-
...le(o) ?? {}
|
|
2114
|
-
},
|
|
2115
|
-
resource: Ze(e, s),
|
|
2116
|
-
slot: M({
|
|
2117
|
-
id: n.contribution.slotId,
|
|
2118
|
-
kind: "menu",
|
|
2119
|
-
projectId: e.projectId,
|
|
2120
|
-
context: {
|
|
2121
|
-
panelId: n.contribution.id
|
|
2122
|
-
}
|
|
2123
|
-
})
|
|
2124
|
-
})
|
|
2125
|
-
}), e.workbench.layout.registerMenuItem(n.menuPath, n.menuItem)]) : [], En = (e, t) => kr({
|
|
2126
|
-
metadata: e.metadata
|
|
2127
|
-
}).flatMap((n) => [e.workbench.commands.registerCommand(n.command, {
|
|
2128
|
-
execute: (o, s) => P(t, n.targetCommandId, {
|
|
2129
|
-
params: {
|
|
2130
|
-
...n.contribution.params ?? {},
|
|
2131
|
-
...le(o) ?? {}
|
|
2132
|
-
},
|
|
2133
|
-
resource: Ze(e, s),
|
|
2134
|
-
slot: M({
|
|
2135
|
-
id: "workbench.commandPalette",
|
|
2136
|
-
kind: "menu",
|
|
2137
|
-
projectId: e.projectId,
|
|
2138
|
-
context: {
|
|
2139
|
-
panelId: n.contribution.id
|
|
2140
|
-
}
|
|
2141
|
-
})
|
|
2142
|
-
}),
|
|
2143
|
-
isVisible: () => at(n.contribution.when, e.workbench.getPrimaryResource()?.kind)
|
|
2144
|
-
}), e.workbench.layout.registerMenuItem(st, n.menuItem)]), Pn = (e) => {
|
|
2145
|
-
const t = K(e.metadata.panels);
|
|
2146
|
-
return e.metadata.panels.flatMap((r, n) => r.webview ? [D({
|
|
2147
|
-
workbench: e.workbench,
|
|
2148
|
-
contribution: O({
|
|
2149
|
-
panel: r,
|
|
2150
|
-
rendererId: S,
|
|
2151
|
-
declarationIndex: n,
|
|
2152
|
-
menuDeclarationOffset: t[n],
|
|
2153
|
-
resourcePanels: e.metadata.resourcePanels,
|
|
2154
|
-
config: q(r.webview)
|
|
2155
|
-
})
|
|
2156
|
-
})] : []);
|
|
2157
|
-
}, An = (e) => {
|
|
2158
|
-
const t = [];
|
|
2159
|
-
for (const [r, n] of (e.metadata.statusItems ?? []).entries()) {
|
|
2160
|
-
if (!n.webview) continue;
|
|
2161
|
-
t.push(e.workbench.layout.registerWidget({
|
|
2162
|
-
id: n.id,
|
|
2163
|
-
title: f(n.title, n.id),
|
|
2164
|
-
region: "status",
|
|
2165
|
-
rendererId: S,
|
|
2166
|
-
closable: !1,
|
|
2167
|
-
priority: -r,
|
|
2168
|
-
config: q(n.webview)
|
|
2169
|
-
}));
|
|
2170
|
-
const o = () => {
|
|
2171
|
-
const i = n.when?.mode;
|
|
2172
|
-
if (!i) return !0;
|
|
2173
|
-
const a = e.workbench.modes.getActiveModeId() ?? "";
|
|
2174
|
-
return Array.isArray(i) ? i.includes(a) : i === a;
|
|
2175
|
-
}, s = () => {
|
|
2176
|
-
const i = e.workbench.layout.getLayout().regions.status.widgets.find((a) => a.contributionId === n.id);
|
|
2177
|
-
o() && !i ? e.workbench.layout.openWidget(n.id, {
|
|
2178
|
-
region: "status"
|
|
2179
|
-
}) : !o() && i && e.workbench.layout.removeWidgetPlacement(i.widgetId);
|
|
2180
|
-
};
|
|
2181
|
-
s(), t.push(e.workbench.modes.onDidChangeActive(s));
|
|
2182
|
-
}
|
|
2183
2099
|
return t;
|
|
2184
|
-
},
|
|
2185
|
-
const t = [], r = e.settingsSectionId ?? gn;
|
|
2186
|
-
e.workbench.settings.getSection(r) || t.push(e.workbench.settings.registerSection({
|
|
2187
|
-
id: r,
|
|
2188
|
-
title: e.settingsSectionTitle ?? "Extensions"
|
|
2189
|
-
}));
|
|
2190
|
-
const n = Object.fromEntries((e.metadata.settingsDefinitions ?? []).map((o) => [o.key, {
|
|
2191
|
-
type: o.type,
|
|
2192
|
-
scope: yn(o.scope),
|
|
2193
|
-
default: In(o.default),
|
|
2194
|
-
enum: o.enum,
|
|
2195
|
-
description: f(o.description)
|
|
2196
|
-
}]));
|
|
2197
|
-
Object.keys(n).length > 0 && t.push(e.workbench.preferences.registerSchema({
|
|
2198
|
-
properties: n
|
|
2199
|
-
}));
|
|
2200
|
-
for (const o of e.metadata.settingsPanels)
|
|
2201
|
-
t.push(e.workbench.settings.registerPanel({
|
|
2202
|
-
id: o.id,
|
|
2203
|
-
title: f(o.title, o.id),
|
|
2204
|
-
kind: "custom",
|
|
2205
|
-
section: r,
|
|
2206
|
-
scope: o.scope,
|
|
2207
|
-
render: (s) => $e({
|
|
2208
|
-
context: {
|
|
2209
|
-
workbench: s.workbench,
|
|
2210
|
-
webviewId: o.id,
|
|
2211
|
-
placement: {
|
|
2212
|
-
...s.instance,
|
|
2213
|
-
panelId: o.id
|
|
2214
|
-
},
|
|
2215
|
-
hostEvents: De(s.workbench, s.instance)
|
|
2216
|
-
},
|
|
2217
|
-
createHostCapabilities: Je(e, "settings"),
|
|
2218
|
-
createProps: e.createWebviewProps ?? (({
|
|
2219
|
-
placement: i
|
|
2220
|
-
}) => ({
|
|
2221
|
-
placement: i,
|
|
2222
|
-
resource: i.resource
|
|
2223
|
-
})),
|
|
2224
|
-
createTheme: e.createWebviewTheme,
|
|
2225
|
-
ownerId: o.extensionId,
|
|
2226
|
-
title: f(o.title, o.id),
|
|
2227
|
-
webview: q(o.webview)
|
|
2228
|
-
})
|
|
2229
|
-
}));
|
|
2230
|
-
return t;
|
|
2231
|
-
}, Tn = (e) => {
|
|
2100
|
+
}, Br = (e) => {
|
|
2232
2101
|
const t = /* @__PURE__ */ new Map();
|
|
2233
|
-
for (const
|
|
2234
|
-
t.set(
|
|
2235
|
-
surface:
|
|
2236
|
-
extensionId:
|
|
2237
|
-
label:
|
|
2238
|
-
icon:
|
|
2102
|
+
for (const n of e.resourceKinds ?? [])
|
|
2103
|
+
t.set(n.id, {
|
|
2104
|
+
surface: n.surface,
|
|
2105
|
+
extensionId: n.extensionId,
|
|
2106
|
+
label: n.label ? p(n.label, n.id) : void 0,
|
|
2107
|
+
icon: n.icon
|
|
2239
2108
|
});
|
|
2240
|
-
for (const
|
|
2241
|
-
|
|
2109
|
+
for (const n of e.kanbanRenderers ?? [])
|
|
2110
|
+
n.resourceKind && !t.has(n.resourceKind) && t.set(n.resourceKind, {
|
|
2242
2111
|
surface: "primary"
|
|
2243
2112
|
});
|
|
2244
2113
|
return t;
|
|
2245
|
-
},
|
|
2246
|
-
const
|
|
2114
|
+
}, Fr = (e, t, n) => {
|
|
2115
|
+
const s = (e.resourcePanels ?? []).filter((i) => i.resourceKind === t).flatMap((i) => {
|
|
2247
2116
|
const a = e.panels.find((d) => d.id === i.panel);
|
|
2248
2117
|
return a ? [{
|
|
2249
2118
|
edge: i,
|
|
2250
2119
|
panel: a
|
|
2251
2120
|
}] : [];
|
|
2252
|
-
}),
|
|
2121
|
+
}), o = new Set(s.map(({
|
|
2253
2122
|
panel: i
|
|
2254
2123
|
}) => i.id));
|
|
2255
2124
|
for (const i of e.panels) {
|
|
2256
|
-
if (
|
|
2257
|
-
const d = (i.show ? Array.isArray(i.show) ? i.show : [i.show] : []).find((
|
|
2258
|
-
d &&
|
|
2125
|
+
if (o.has(i.id) || i.extensionId !== n) continue;
|
|
2126
|
+
const d = (i.show ? Array.isArray(i.show) ? i.show : [i.show] : []).find((u) => u.for === t);
|
|
2127
|
+
d && s.push({
|
|
2259
2128
|
panel: i,
|
|
2260
2129
|
placement: d
|
|
2261
2130
|
});
|
|
2262
2131
|
}
|
|
2263
|
-
return
|
|
2264
|
-
},
|
|
2265
|
-
const
|
|
2266
|
-
return ["sidenav", "main", "secondary", "side"].find((
|
|
2267
|
-
},
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2132
|
+
return s;
|
|
2133
|
+
}, Be = (e, t) => {
|
|
2134
|
+
const n = e.workbench.layout.getLayout();
|
|
2135
|
+
return ["sidenav", "main", "secondary", "side"].find((s) => n.regions[s].widgets.some((o) => o.contributionId === t));
|
|
2136
|
+
}, Nr = (e, t, n) => {
|
|
2137
|
+
e.prepareResource?.(n);
|
|
2138
|
+
const r = t.map(({
|
|
2139
|
+
panel: o
|
|
2140
|
+
}) => e.workbench.layout.openPanel(o.id, {
|
|
2141
|
+
region: Be(e, o.id),
|
|
2142
|
+
resource: n,
|
|
2143
|
+
title: n.label ?? n.id ?? n.uri,
|
|
2274
2144
|
strategy: {
|
|
2275
2145
|
kind: "persistent"
|
|
2276
2146
|
}
|
|
2277
|
-
}))
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2147
|
+
}));
|
|
2148
|
+
e.workbench.sidePanel.getMode() === "closed" && t.some(({
|
|
2149
|
+
panel: o
|
|
2150
|
+
}) => Be(e, o.id) === "side") && e.workbench.sidePanel.setMode("attached");
|
|
2151
|
+
const s = t.findIndex((o) => o.edge?.slot === "primary" || o.placement?.region === "main");
|
|
2152
|
+
return r[s >= 0 ? s : 0];
|
|
2153
|
+
}, Lr = (e, t, n) => {
|
|
2154
|
+
const r = [];
|
|
2155
|
+
e.workbench.resources.getKind(t) || r.push(e.workbench.resources.registerKind({
|
|
2282
2156
|
kind: t,
|
|
2283
|
-
label:
|
|
2284
|
-
icon:
|
|
2285
|
-
surface:
|
|
2157
|
+
label: n.label ?? t,
|
|
2158
|
+
icon: n.icon ?? "FileText",
|
|
2159
|
+
surface: n.surface
|
|
2286
2160
|
}));
|
|
2287
|
-
const
|
|
2288
|
-
return
|
|
2161
|
+
const s = Fr(e.metadata, t, n.extensionId);
|
|
2162
|
+
return s.length === 0 || r.push(e.workbench.resources.registerPresenter({
|
|
2289
2163
|
id: `workbench.extension.resource.${t}`,
|
|
2290
|
-
canOpen: (
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
slots: n.slots
|
|
2164
|
+
canOpen: (o) => o.kind === t,
|
|
2165
|
+
open: (o) => Nr(e, s, o)
|
|
2166
|
+
})), r;
|
|
2167
|
+
}, Ur = (e) => [...Br(e.metadata)].flatMap(([t, n]) => Lr(e, t, n)), _r = (e) => {
|
|
2168
|
+
const t = In(), n = [];
|
|
2169
|
+
for (const r of e.metadata.resourceKinds ?? [])
|
|
2170
|
+
n.push(t.registerResourceKind({
|
|
2171
|
+
id: r.id,
|
|
2172
|
+
extensionId: r.extensionId,
|
|
2173
|
+
surface: r.surface,
|
|
2174
|
+
slots: r.slots
|
|
2302
2175
|
}));
|
|
2303
|
-
for (const
|
|
2304
|
-
|
|
2305
|
-
id:
|
|
2306
|
-
extensionId:
|
|
2307
|
-
title:
|
|
2308
|
-
icon:
|
|
2309
|
-
show:
|
|
2176
|
+
for (const r of e.metadata.panels)
|
|
2177
|
+
n.push(t.registerPanelCapability({
|
|
2178
|
+
id: r.id,
|
|
2179
|
+
extensionId: r.extensionId,
|
|
2180
|
+
title: p(r.title, r.id),
|
|
2181
|
+
icon: r.icon,
|
|
2182
|
+
show: wn(r.show)
|
|
2310
2183
|
}));
|
|
2311
|
-
for (const
|
|
2312
|
-
|
|
2313
|
-
id:
|
|
2314
|
-
extensionId:
|
|
2315
|
-
resourceKind:
|
|
2316
|
-
panel:
|
|
2317
|
-
slot:
|
|
2184
|
+
for (const r of e.metadata.resourcePanels ?? [])
|
|
2185
|
+
n.push(t.registerResourcePanel({
|
|
2186
|
+
id: r.id,
|
|
2187
|
+
extensionId: r.extensionId,
|
|
2188
|
+
resourceKind: r.resourceKind,
|
|
2189
|
+
panel: r.panel,
|
|
2190
|
+
slot: r.slot
|
|
2318
2191
|
}));
|
|
2319
|
-
for (const
|
|
2320
|
-
|
|
2321
|
-
id:
|
|
2322
|
-
extensionId:
|
|
2323
|
-
resources:
|
|
2324
|
-
modePanels:
|
|
2192
|
+
for (const r of e.metadata.modes)
|
|
2193
|
+
n.push(t.registerModeComposition({
|
|
2194
|
+
id: r.modeId,
|
|
2195
|
+
extensionId: r.extensionId,
|
|
2196
|
+
resources: r.resources,
|
|
2197
|
+
modePanels: r.modePanels
|
|
2325
2198
|
}));
|
|
2326
2199
|
return {
|
|
2327
2200
|
registry: t,
|
|
2328
|
-
disposables:
|
|
2201
|
+
disposables: n
|
|
2329
2202
|
};
|
|
2330
|
-
},
|
|
2203
|
+
}, Fe = (e, t) => `pstdio://extension-resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}`, qr = (e, t) => {
|
|
2331
2204
|
if (t)
|
|
2332
2205
|
return "commandId" in t ? async () => {
|
|
2333
|
-
const
|
|
2206
|
+
const n = await e.executeCommand(t.commandId, {
|
|
2334
2207
|
projectId: e.projectId
|
|
2335
2208
|
});
|
|
2336
|
-
if (!(!
|
|
2209
|
+
if (!(!n || typeof n.type != "string" || typeof n.id != "string"))
|
|
2337
2210
|
return {
|
|
2338
|
-
kind:
|
|
2339
|
-
uri:
|
|
2340
|
-
id:
|
|
2341
|
-
label:
|
|
2211
|
+
kind: n.type,
|
|
2212
|
+
uri: Fe(n.type, n.id),
|
|
2213
|
+
id: n.id,
|
|
2214
|
+
label: n.label
|
|
2342
2215
|
};
|
|
2343
2216
|
} : {
|
|
2344
2217
|
kind: t.type,
|
|
2345
|
-
uri:
|
|
2218
|
+
uri: Fe(t.type, t.id),
|
|
2346
2219
|
id: t.id,
|
|
2347
2220
|
label: t.label
|
|
2348
2221
|
};
|
|
2349
|
-
},
|
|
2350
|
-
const
|
|
2351
|
-
|
|
2352
|
-
layout:
|
|
2353
|
-
notifications:
|
|
2222
|
+
}, zr = (e, t) => e.metadata.modes.map((n) => {
|
|
2223
|
+
const r = (s, o) => {
|
|
2224
|
+
xn({
|
|
2225
|
+
layout: s.layout,
|
|
2226
|
+
notifications: s.notifications
|
|
2354
2227
|
}, {
|
|
2355
2228
|
registry: t,
|
|
2356
|
-
modeId:
|
|
2357
|
-
resourceKind:
|
|
2358
|
-
seeding:
|
|
2359
|
-
}),
|
|
2229
|
+
modeId: n.modeId,
|
|
2230
|
+
resourceKind: s.navigator.getSelectedResource()?.kind,
|
|
2231
|
+
seeding: o
|
|
2232
|
+
}), s.layout.getLayout().regions.side.widgets.length > 0 && s.shell.setSidePanelPresentation("attached");
|
|
2360
2233
|
};
|
|
2361
2234
|
return e.workbench.modes.registerMode({
|
|
2362
|
-
id:
|
|
2363
|
-
label:
|
|
2364
|
-
panels:
|
|
2365
|
-
resourceKinds: Object.keys(
|
|
2366
|
-
defaultResource:
|
|
2235
|
+
id: n.modeId,
|
|
2236
|
+
label: p(n.label, n.modeId),
|
|
2237
|
+
panels: n.panelRegions,
|
|
2238
|
+
resourceKinds: Object.keys(n.resources ?? {}),
|
|
2239
|
+
defaultResource: qr(e, n.defaultResource),
|
|
2367
2240
|
listAddablePanels: ({
|
|
2368
|
-
layout:
|
|
2369
|
-
resource:
|
|
2370
|
-
}) =>
|
|
2241
|
+
layout: s,
|
|
2242
|
+
resource: o
|
|
2243
|
+
}) => yn({
|
|
2371
2244
|
registry: t,
|
|
2372
|
-
modeId:
|
|
2373
|
-
layout:
|
|
2374
|
-
resourceKind:
|
|
2375
|
-
}).filter((i) =>
|
|
2245
|
+
modeId: n.modeId,
|
|
2246
|
+
layout: s,
|
|
2247
|
+
resourceKind: o?.kind
|
|
2248
|
+
}).filter((i) => Et.includes(i.region)),
|
|
2376
2249
|
activate: () => {
|
|
2377
2250
|
},
|
|
2378
|
-
seed: (
|
|
2379
|
-
reconcile: (
|
|
2251
|
+
seed: (s) => r(s, !0),
|
|
2252
|
+
reconcile: (s) => r(s, !1)
|
|
2380
2253
|
});
|
|
2381
|
-
}),
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
}
|
|
2254
|
+
}), Qr = () => {
|
|
2255
|
+
if (typeof navigator > "u") return;
|
|
2256
|
+
const e = `${navigator.platform} ${navigator.userAgent}`.toLowerCase();
|
|
2257
|
+
if (e.includes("mac")) return "mac";
|
|
2258
|
+
if (e.includes("win")) return "win";
|
|
2259
|
+
if (e.includes("linux")) return "linux";
|
|
2260
|
+
}, Gr = (e, t = Qr()) => (t ? e.platformOverrides?.[t] : void 0) ?? e.key, Yr = (e) => e.bindings.map((t) => e.workbench.keybindings.registerKeybinding({
|
|
2261
|
+
commandId: t.commandId,
|
|
2262
|
+
keybinding: Gr(t),
|
|
2263
|
+
when: e.createWhenExpression?.(t.when),
|
|
2264
|
+
args: t.args
|
|
2265
|
+
})), v = (e) => e.extensionId === "pstdio" ? e.id : `${e.extensionId}.${e.kind}.${e.id}`, oe = (e) => e.extensionId === "pstdio" ? e.id : `${e.extensionId}.command.${e.id}`, ut = (e) => {
|
|
2266
|
+
if (!e) return;
|
|
2267
|
+
const t = (n) => {
|
|
2268
|
+
if (n)
|
|
2269
|
+
return Array.isArray(n) ? n.map(v) : v(n);
|
|
2398
2270
|
};
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2271
|
+
return {
|
|
2272
|
+
mode: t(e.mode),
|
|
2273
|
+
source: e.source,
|
|
2274
|
+
viewId: t(e.view),
|
|
2275
|
+
resourceType: e.resourceType?.map((n) => n.id),
|
|
2276
|
+
metadata: e.metadata
|
|
2277
|
+
};
|
|
2278
|
+
}, Fo = ut, te = (e, t) => e.resourceViews.find((n) => v(n.view) === t)?.resourceKind.id, Xr = (e, t) => {
|
|
2279
|
+
const n = e.placements.flatMap((o) => o.item.kind === "view" && v(o.item.view) === t ? [{
|
|
2280
|
+
region: o.region,
|
|
2281
|
+
allowedRegions: o.movableTo,
|
|
2282
|
+
required: o.required
|
|
2283
|
+
}] : []), s = e.resourceViews.filter((o) => v(o.view) === t).flatMap((o) => e.placements.flatMap((i) => i.item.kind === "resource-slot" && i.item.slot.id === o.slot.id && i.item.slot.resourceKind.id === o.resourceKind.id ? [{
|
|
2284
|
+
for: o.resourceKind.id,
|
|
2285
|
+
region: i.region,
|
|
2286
|
+
allowedRegions: i.movableTo,
|
|
2287
|
+
required: i.required
|
|
2288
|
+
}] : []));
|
|
2289
|
+
return [...n, ...s];
|
|
2290
|
+
}, mt = (e) => e.body.kind === "webview" ? {
|
|
2291
|
+
webview: e.body.webview
|
|
2292
|
+
} : {
|
|
2293
|
+
renderer: {
|
|
2294
|
+
kind: e.body.kind,
|
|
2295
|
+
id: e.id
|
|
2296
|
+
}
|
|
2297
|
+
}, Jr = (e, t) => e.viewMenus.flatMap((n) => {
|
|
2298
|
+
if (v(n.owner) !== t.id) return [];
|
|
2299
|
+
const r = e.views.find((s) => s.id === v(n.view));
|
|
2300
|
+
return r ? [{
|
|
2301
|
+
id: n.id,
|
|
2302
|
+
extensionId: n.extensionId,
|
|
2303
|
+
ownerPanelId: t.id,
|
|
2304
|
+
title: r.title,
|
|
2305
|
+
side: n.side,
|
|
2306
|
+
group: n.group,
|
|
2307
|
+
placement: n.placement,
|
|
2308
|
+
hostTreeHeader: n.hostTreeHeader,
|
|
2309
|
+
hostTreeFooter: n.hostTreeFooter,
|
|
2310
|
+
...mt(r)
|
|
2311
|
+
}] : [];
|
|
2312
|
+
}), Zr = (e) => e.views.map((t) => {
|
|
2313
|
+
const n = Xr(e, t.id), r = Jr(e, t);
|
|
2314
|
+
return {
|
|
2315
|
+
id: t.id,
|
|
2316
|
+
extensionId: t.extensionId,
|
|
2317
|
+
title: t.title,
|
|
2318
|
+
path: t.path,
|
|
2319
|
+
icon: t.icon,
|
|
2320
|
+
show: n.length === 0 ? void 0 : n.length === 1 ? n[0] : n,
|
|
2321
|
+
panelMenus: r.length > 0 ? r : void 0,
|
|
2322
|
+
...mt(t)
|
|
2323
|
+
};
|
|
2324
|
+
}), he = (e) => e?.map(({
|
|
2325
|
+
command: t,
|
|
2326
|
+
...n
|
|
2327
|
+
}) => ({
|
|
2328
|
+
...n,
|
|
2329
|
+
commandId: oe(t)
|
|
2330
|
+
})), eo = (e) => e.views.flatMap((t) => {
|
|
2331
|
+
const n = t.body;
|
|
2332
|
+
return n.kind !== "kanban" ? [] : [{
|
|
2333
|
+
...n,
|
|
2334
|
+
id: t.id,
|
|
2335
|
+
extensionId: t.extensionId,
|
|
2336
|
+
title: t.title,
|
|
2337
|
+
icon: t.icon,
|
|
2338
|
+
resourceKind: te(e, t.id),
|
|
2339
|
+
createRow: n.createRow ? {
|
|
2340
|
+
title: n.createRow.title,
|
|
2341
|
+
submitLabel: n.createRow.submitLabel,
|
|
2342
|
+
columnParam: n.createRow.columnParam,
|
|
2343
|
+
params: n.createRow.params,
|
|
2344
|
+
attributesParam: n.createRow.attributesParam,
|
|
2345
|
+
labels: n.createRow.labels,
|
|
2346
|
+
commandId: oe(n.createRow.command),
|
|
2347
|
+
attachments: n.createRow.attachments ? {
|
|
2348
|
+
resourceParam: n.createRow.attachments.resourceParam,
|
|
2349
|
+
fileParam: n.createRow.attachments.fileParam,
|
|
2350
|
+
commandId: oe(n.createRow.attachments.command)
|
|
2351
|
+
} : void 0
|
|
2352
|
+
} : void 0,
|
|
2353
|
+
rowActions: he(n.rowActions)
|
|
2354
|
+
}];
|
|
2355
|
+
}), to = (e) => e.views.flatMap((t) => {
|
|
2356
|
+
const n = t.body;
|
|
2357
|
+
return n.kind !== "dataTable" ? [] : [{
|
|
2358
|
+
...n,
|
|
2359
|
+
id: t.id,
|
|
2360
|
+
extensionId: t.extensionId,
|
|
2361
|
+
title: t.title,
|
|
2362
|
+
icon: t.icon,
|
|
2363
|
+
resourceKind: te(e, t.id),
|
|
2364
|
+
selectionActions: he(n.selectionActions),
|
|
2365
|
+
rowActions: he(n.rowActions)
|
|
2366
|
+
}];
|
|
2367
|
+
}), no = (e) => e.views.flatMap((t) => t.body.kind === "tree" ? [{
|
|
2368
|
+
...t.body,
|
|
2369
|
+
id: t.id,
|
|
2370
|
+
extensionId: t.extensionId,
|
|
2371
|
+
title: t.title,
|
|
2372
|
+
icon: t.icon,
|
|
2373
|
+
resourceKind: te(e, t.id)
|
|
2374
|
+
}] : []), ro = (e) => e.views.flatMap((t) => t.body.kind === "file" ? [{
|
|
2375
|
+
...t.body,
|
|
2376
|
+
id: t.id,
|
|
2377
|
+
extensionId: t.extensionId,
|
|
2378
|
+
title: t.title,
|
|
2379
|
+
icon: t.icon,
|
|
2380
|
+
resourceKind: te(e, t.id)
|
|
2381
|
+
}] : []), oo = (e) => e.views.flatMap((t) => t.body.kind === "controls" ? [{
|
|
2382
|
+
...t.body,
|
|
2383
|
+
id: t.id,
|
|
2384
|
+
extensionId: t.extensionId,
|
|
2385
|
+
title: t.title,
|
|
2386
|
+
icon: t.icon,
|
|
2387
|
+
resourceKind: te(e, t.id)
|
|
2388
|
+
}] : []), so = (e) => e.modes.map((t) => {
|
|
2389
|
+
const n = e.placements.filter((i) => v(i.mode) === t.id), r = [...new Set(n.flatMap((i) => [i.region, ...i.movableTo ?? []]))].filter((i) => i !== "sidenav"), s = Object.fromEntries(n.flatMap((i) => i.item.kind === "view" ? [[v(i.item.view), {
|
|
2390
|
+
region: i.region,
|
|
2391
|
+
allowedRegions: i.movableTo,
|
|
2392
|
+
required: i.required,
|
|
2393
|
+
defaultOpen: i.required ? !0 : i.defaultOpen
|
|
2394
|
+
}]] : [])), o = Object.fromEntries(e.resourceKinds.flatMap((i) => {
|
|
2395
|
+
const a = Object.fromEntries(n.flatMap((d) => d.item.kind === "resource-slot" && d.item.slot.resourceKind.id === i.id ? [[d.item.slot.id, {
|
|
2396
|
+
region: d.region,
|
|
2397
|
+
allowedRegions: d.movableTo,
|
|
2398
|
+
required: d.required,
|
|
2399
|
+
defaultOpen: d.required ? !0 : d.defaultOpen
|
|
2400
|
+
}]] : []));
|
|
2401
|
+
return Object.keys(a).length > 0 ? [[i.id, {
|
|
2402
|
+
slots: a
|
|
2403
|
+
}]] : [];
|
|
2404
|
+
}));
|
|
2405
|
+
return {
|
|
2406
|
+
id: t.id,
|
|
2407
|
+
extensionId: t.extensionId,
|
|
2408
|
+
modeId: t.id,
|
|
2409
|
+
label: t.label,
|
|
2410
|
+
icon: t.icon,
|
|
2411
|
+
panelRegions: r.length > 0 ? r : void 0,
|
|
2412
|
+
resources: o,
|
|
2413
|
+
modePanels: s
|
|
2414
|
+
};
|
|
2415
|
+
}), io = (e) => {
|
|
2416
|
+
const t = Zr(e);
|
|
2417
|
+
return {
|
|
2418
|
+
extensions: e.extensions,
|
|
2419
|
+
commands: e.commands,
|
|
2420
|
+
menuContributions: e.menuContributions,
|
|
2421
|
+
commandPaletteContributions: e.commandPaletteContributions,
|
|
2422
|
+
modes: so(e),
|
|
2423
|
+
panels: t,
|
|
2424
|
+
resourceKinds: e.resourceKinds.map((n) => ({
|
|
2425
|
+
id: n.id,
|
|
2426
|
+
extensionId: n.extensionId,
|
|
2427
|
+
surface: n.surface,
|
|
2428
|
+
label: n.label,
|
|
2429
|
+
icon: n.icon,
|
|
2430
|
+
slots: Object.fromEntries((n.slots ?? []).map((r) => [r.id, {
|
|
2431
|
+
cardinality: r.cardinality,
|
|
2432
|
+
external: r.access === "public"
|
|
2433
|
+
}])),
|
|
2434
|
+
menuSlots: Object.fromEntries((n.menuSlots ?? []).map((r) => [r.id, {
|
|
2435
|
+
placement: r.placement,
|
|
2436
|
+
label: r.label,
|
|
2437
|
+
external: r.access === "public",
|
|
2438
|
+
order: r.order
|
|
2439
|
+
}]))
|
|
2440
|
+
})),
|
|
2441
|
+
resourcePanels: e.resourceViews.map((n) => ({
|
|
2442
|
+
id: n.id,
|
|
2443
|
+
extensionId: n.extensionId,
|
|
2444
|
+
resourceKind: n.resourceKind.id,
|
|
2445
|
+
panel: v(n.view),
|
|
2446
|
+
slot: n.slot.id
|
|
2447
|
+
})),
|
|
2448
|
+
resourceHierarchyProviders: (e.resourceHierarchyProviders ?? []).map((n) => ({
|
|
2449
|
+
id: n.id,
|
|
2450
|
+
extensionId: n.extensionId,
|
|
2451
|
+
resourceKind: n.resourceKind.id
|
|
2452
|
+
})),
|
|
2453
|
+
routes: [],
|
|
2454
|
+
treeItems: [],
|
|
2455
|
+
activityItems: (e.activityItems ?? []).map((n) => ({
|
|
2456
|
+
id: n.id,
|
|
2457
|
+
extensionId: n.extensionId,
|
|
2458
|
+
title: n.title,
|
|
2459
|
+
icon: n.icon,
|
|
2460
|
+
modes: n.modes.map(v),
|
|
2461
|
+
placement: n.placement,
|
|
2462
|
+
commandId: oe(n.command),
|
|
2463
|
+
params: n.params
|
|
2464
|
+
})),
|
|
2465
|
+
settingsSections: e.settingsSections ?? [],
|
|
2466
|
+
settingsPanels: e.settingsPanels.flatMap((n) => {
|
|
2467
|
+
const r = e.views.find((s) => s.id === v(n.view));
|
|
2468
|
+
return !r || r.body.kind !== "webview" ? [] : [{
|
|
2469
|
+
id: n.id,
|
|
2470
|
+
extensionId: n.extensionId,
|
|
2471
|
+
slotId: n.slot.id,
|
|
2472
|
+
scope: n.slot.id.includes("global") ? "global" : "project",
|
|
2473
|
+
title: r.title,
|
|
2474
|
+
icon: r.icon,
|
|
2475
|
+
section: n.section ? v(n.section) : void 0,
|
|
2476
|
+
webview: r.body.webview
|
|
2477
|
+
}];
|
|
2478
|
+
}),
|
|
2479
|
+
kanbanRenderers: eo(e),
|
|
2480
|
+
dataTableRenderers: to(e),
|
|
2481
|
+
commandPaletteResources: e.commandPaletteResources ?? [],
|
|
2482
|
+
treeRenderers: no(e),
|
|
2483
|
+
fileRenderers: ro(e),
|
|
2484
|
+
controlsRenderers: oo(e),
|
|
2485
|
+
keybindings: e.keybindings ?? [],
|
|
2486
|
+
settingsDefinitions: e.settingsDefinitions ?? [],
|
|
2487
|
+
statuses: e.statuses,
|
|
2488
|
+
statusBarItems: e.statusBarItems.map((n) => ({
|
|
2489
|
+
id: n.id,
|
|
2490
|
+
extensionId: n.extensionId,
|
|
2491
|
+
viewId: v(n.view),
|
|
2492
|
+
slot: n.slot.id.endsWith("leading") ? "leading" : "trailing",
|
|
2493
|
+
order: n.order,
|
|
2494
|
+
when: ut(n.when)
|
|
2495
|
+
})),
|
|
2496
|
+
diagnostics: e.diagnostics
|
|
2497
|
+
};
|
|
2498
|
+
}, ao = (e, t, n = {}) => {
|
|
2499
|
+
t.kind === "tree" && e.renderers.refresh(t.id), t.kind === "file" && e.renderers.refreshFileRenderer(t.id, n), t.kind === "controls" && e.renderers.refreshControlsRenderer(t.id), t.kind === "dataTable" && e.renderers.refreshDataTableRenderer(t.id), t.kind === "kanban" && e.renderers.refreshKanbanRenderer(t.id);
|
|
2500
|
+
}, co = (e) => {
|
|
2501
|
+
const t = /* @__PURE__ */ new Map(), n = (r, s) => {
|
|
2502
|
+
for (const o of new Set(s.refreshEventIds ?? [])) {
|
|
2503
|
+
const i = t.get(o) ?? [];
|
|
2504
|
+
i.some((a) => a.kind === r && a.id === s.id) || i.push({
|
|
2505
|
+
id: s.id,
|
|
2506
|
+
kind: r
|
|
2507
|
+
}), t.set(o, i);
|
|
2409
2508
|
}
|
|
2410
2509
|
};
|
|
2411
|
-
for (const
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2510
|
+
for (const r of e.views)
|
|
2511
|
+
r.body.kind !== "webview" && n(r.body.kind, {
|
|
2512
|
+
id: r.id,
|
|
2513
|
+
refreshEventIds: r.body.refreshEventIds
|
|
2514
|
+
});
|
|
2416
2515
|
return t;
|
|
2417
|
-
},
|
|
2418
|
-
const t =
|
|
2419
|
-
return e.subscribe((
|
|
2516
|
+
}, lo = (e) => {
|
|
2517
|
+
const t = co(e.metadata);
|
|
2518
|
+
return e.subscribe((n) => {
|
|
2420
2519
|
const {
|
|
2421
|
-
id:
|
|
2422
|
-
...
|
|
2423
|
-
} =
|
|
2424
|
-
for (const
|
|
2520
|
+
id: r,
|
|
2521
|
+
...s
|
|
2522
|
+
} = n;
|
|
2523
|
+
for (const o of t.get(r) ?? []) ao(e.workbench, o, s);
|
|
2425
2524
|
});
|
|
2426
|
-
},
|
|
2525
|
+
}, uo = (e, t) => e.layout.listPanelInstances().find((n) => n.panelId === t), mo = (e, t) => {
|
|
2427
2526
|
if (t)
|
|
2428
2527
|
try {
|
|
2429
2528
|
e.layout.activatePanel(t);
|
|
2430
2529
|
} catch {
|
|
2431
2530
|
}
|
|
2432
|
-
},
|
|
2433
|
-
const
|
|
2434
|
-
for (const
|
|
2435
|
-
if (
|
|
2436
|
-
const
|
|
2437
|
-
|
|
2438
|
-
resource:
|
|
2439
|
-
title:
|
|
2531
|
+
}, No = (e, t) => {
|
|
2532
|
+
const n = e.layout.getLayout().activeWidgetId;
|
|
2533
|
+
for (const r of t.views) {
|
|
2534
|
+
if (r.body.kind !== "webview") continue;
|
|
2535
|
+
const s = uo(e, r.id);
|
|
2536
|
+
s && e.layout.openPanel(r.id, {
|
|
2537
|
+
resource: s.resource,
|
|
2538
|
+
title: p(r.title, s.title),
|
|
2440
2539
|
strategy: {
|
|
2441
2540
|
kind: "replace-panel",
|
|
2442
|
-
instanceId:
|
|
2541
|
+
instanceId: s.instanceId
|
|
2443
2542
|
}
|
|
2444
2543
|
});
|
|
2445
2544
|
}
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2545
|
+
mo(e, n);
|
|
2546
|
+
}, po = (e) => (t) => ({
|
|
2547
|
+
...ze({
|
|
2548
|
+
workbench: t.workbench,
|
|
2549
|
+
hostEvents: t.hostEvents
|
|
2550
|
+
}),
|
|
2551
|
+
// Extension guests speak the SDK resource shape (`type`); normalize to the
|
|
2552
|
+
// workbench shape (`kind` + synthesized uri) the resource registry expects,
|
|
2553
|
+
// mirroring how commands.execute and tree targets normalize their resources.
|
|
2554
|
+
"resource.open": (r) => {
|
|
2555
|
+
const s = r;
|
|
2556
|
+
if (!s.resource) throw new Error("resource.open requires a resource.");
|
|
2557
|
+
return t.workbench.resources.openResource(J(s.resource), qe(s.input));
|
|
2558
|
+
},
|
|
2559
|
+
"commands.execute": async (r) => {
|
|
2560
|
+
const s = r, o = s.resource ?? D(t.placement.resource);
|
|
2561
|
+
return e.executeCommand(s.commandId, {
|
|
2562
|
+
projectId: e.projectId,
|
|
2563
|
+
...s.params ? {
|
|
2564
|
+
params: s.params
|
|
2565
|
+
} : {},
|
|
2566
|
+
...o ? {
|
|
2567
|
+
resource: o
|
|
2568
|
+
} : {},
|
|
2569
|
+
slot: B({
|
|
2570
|
+
id: t.webviewId,
|
|
2571
|
+
kind: e.slotKind,
|
|
2572
|
+
projectId: e.projectId,
|
|
2573
|
+
context: {
|
|
2574
|
+
panelId: t.webviewId
|
|
2575
|
+
}
|
|
2576
|
+
}),
|
|
2577
|
+
source: "dashboard"
|
|
2456
2578
|
});
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2579
|
+
},
|
|
2580
|
+
...e.files ? {
|
|
2581
|
+
"files.upload": e.files.upload,
|
|
2582
|
+
"files.list": e.files.list,
|
|
2583
|
+
"files.delete": e.files.delete
|
|
2584
|
+
} : {}
|
|
2585
|
+
}), pt = "extensions", fo = 1e3, bo = 25, go = (e) => e === void 0 ? void 0 : e, ho = (e) => e === "global" ? "user" : "project", wo = (e, t) => t ? (n) => ({
|
|
2586
|
+
...e(n),
|
|
2587
|
+
...t(n)
|
|
2588
|
+
}) : e, ft = (e, t) => {
|
|
2589
|
+
const n = e.createWebviewHostCapabilities ?? po({
|
|
2590
|
+
executeCommand: e.executeCommand,
|
|
2591
|
+
files: e.webviewFiles,
|
|
2592
|
+
projectId: e.projectId,
|
|
2593
|
+
slotKind: t
|
|
2594
|
+
});
|
|
2595
|
+
return wo(n, e.createWebviewHostCapabilityOverrides);
|
|
2596
|
+
}, Io = (e) => e.workbench.renderers.getRenderer(se) ? [] : [e.workbench.renderers.registerRenderer(Xt({
|
|
2597
|
+
createHostCapabilities: ft(e, "panel"),
|
|
2598
|
+
createProps: e.createWebviewProps,
|
|
2599
|
+
createTheme: e.createWebviewTheme
|
|
2600
|
+
}))], yo = (e) => {
|
|
2601
|
+
const t = L(e.metadata.panels);
|
|
2602
|
+
return e.metadata.panels.flatMap((n, r) => n.webview ? [U({
|
|
2603
|
+
workbench: e.workbench,
|
|
2604
|
+
path: n.path,
|
|
2605
|
+
aliases: n.aliases,
|
|
2606
|
+
resolveInput: F(e.resolveViewInput, n),
|
|
2607
|
+
contribution: N({
|
|
2608
|
+
panel: n,
|
|
2609
|
+
rendererId: se,
|
|
2610
|
+
declarationIndex: r,
|
|
2611
|
+
menuDeclarationOffset: t[r],
|
|
2612
|
+
resourcePanels: e.metadata.resourcePanels,
|
|
2613
|
+
config: ve(n.webview)
|
|
2614
|
+
})
|
|
2615
|
+
})] : []);
|
|
2616
|
+
}, Ne = (e) => {
|
|
2617
|
+
if (!e || typeof e != "object" || !("statuses" in e) || !Array.isArray(e.statuses))
|
|
2618
|
+
throw new Error("Status provider returned an invalid response");
|
|
2619
|
+
return e.statuses;
|
|
2620
|
+
}, vo = (e, t) => {
|
|
2621
|
+
const n = e.metadata.statuses ?? [];
|
|
2622
|
+
if (n.length === 0) return [];
|
|
2623
|
+
const r = n.map((s, o) => e.workbench.statuses.registerStatusSet({
|
|
2624
|
+
id: s.id,
|
|
2625
|
+
title: p(s.title, s.id),
|
|
2626
|
+
actions: s.actions?.map((i) => ({
|
|
2627
|
+
id: i.id,
|
|
2628
|
+
label: p(i.label, i.id),
|
|
2629
|
+
icon: i.icon
|
|
2630
|
+
})),
|
|
2631
|
+
query: async () => Ne(await P(t, s.queryHandlerId, {
|
|
2632
|
+
params: {}
|
|
2633
|
+
})),
|
|
2634
|
+
save: s.saveHandlerId ? async (i) => Ne(await P(t, s.saveHandlerId, {
|
|
2635
|
+
params: {
|
|
2636
|
+
statuses: i
|
|
2637
|
+
}
|
|
2638
|
+
})) : void 0
|
|
2639
|
+
}, {
|
|
2640
|
+
ownerId: s.extensionId,
|
|
2641
|
+
priority: -o
|
|
2642
|
+
}));
|
|
2643
|
+
return r.push(e.workbench.settings.registerPanel({
|
|
2644
|
+
id: "workbench.statuses",
|
|
2645
|
+
title: "Statuses",
|
|
2646
|
+
icon: "list-checks",
|
|
2647
|
+
kind: "custom",
|
|
2648
|
+
order: bo,
|
|
2649
|
+
section: e.settingsSectionId ?? pt,
|
|
2650
|
+
scope: "project",
|
|
2651
|
+
render: () => K(Rt, {
|
|
2652
|
+
workbench: e.workbench
|
|
2653
|
+
})
|
|
2654
|
+
})), r;
|
|
2655
|
+
}, ko = (e) => {
|
|
2656
|
+
const t = [], n = e.settingsSectionId ?? pt;
|
|
2657
|
+
e.workbench.settings.getSection(n) || t.push(e.workbench.settings.registerSection({
|
|
2658
|
+
id: n,
|
|
2659
|
+
title: e.settingsSectionTitle ?? "Extensions"
|
|
2660
|
+
}));
|
|
2661
|
+
const r = [...e.metadata.settingsSections].sort((i, a) => (i.order ?? 0) - (a.order ?? 0) || i.extensionId.localeCompare(a.extensionId) || i.id.localeCompare(a.id));
|
|
2662
|
+
for (const i of r)
|
|
2663
|
+
t.push(e.workbench.settings.registerSection({
|
|
2664
|
+
id: i.id,
|
|
2665
|
+
title: p(i.title, i.id),
|
|
2666
|
+
order: i.order,
|
|
2667
|
+
scope: i.scope
|
|
2668
|
+
}));
|
|
2669
|
+
const s = Object.fromEntries((e.metadata.settingsDefinitions ?? []).map((i) => [i.key, {
|
|
2670
|
+
type: i.type,
|
|
2671
|
+
scope: ho(i.scope),
|
|
2672
|
+
default: go(i.default),
|
|
2673
|
+
enum: i.enum,
|
|
2674
|
+
description: p(i.description)
|
|
2675
|
+
}]));
|
|
2676
|
+
Object.keys(s).length > 0 && t.push(e.workbench.preferences.registerSchema({
|
|
2677
|
+
properties: s
|
|
2678
|
+
}));
|
|
2679
|
+
const o = [...e.metadata.settingsPanels].sort((i, a) => i.extensionId.localeCompare(a.extensionId) || i.id.localeCompare(a.id));
|
|
2680
|
+
for (const [i, a] of o.entries())
|
|
2681
|
+
t.push(e.workbench.settings.registerPanel({
|
|
2682
|
+
id: a.id,
|
|
2683
|
+
title: p(a.title, a.id),
|
|
2684
|
+
icon: a.icon,
|
|
2685
|
+
kind: "custom",
|
|
2686
|
+
order: fo + i,
|
|
2687
|
+
section: a.section ?? n,
|
|
2688
|
+
scope: a.scope,
|
|
2689
|
+
render: (d) => Ye({
|
|
2690
|
+
context: {
|
|
2691
|
+
workbench: d.workbench,
|
|
2692
|
+
webviewId: a.id,
|
|
2693
|
+
placement: {
|
|
2694
|
+
...d.instance,
|
|
2695
|
+
panelId: a.id
|
|
2696
|
+
},
|
|
2697
|
+
hostEvents: Ge(d.workbench, d.instance)
|
|
2698
|
+
},
|
|
2699
|
+
createHostCapabilities: ft(e, "settings"),
|
|
2700
|
+
createProps: e.createWebviewProps ?? (({
|
|
2701
|
+
placement: u
|
|
2702
|
+
}) => ({
|
|
2703
|
+
placement: u,
|
|
2704
|
+
resource: u.resource
|
|
2705
|
+
})),
|
|
2706
|
+
createTheme: e.createWebviewTheme,
|
|
2707
|
+
ownerId: a.extensionId,
|
|
2708
|
+
title: p(a.title, a.id),
|
|
2709
|
+
webview: ve(a.webview)
|
|
2710
|
+
})
|
|
2711
|
+
}));
|
|
2712
|
+
return t;
|
|
2713
|
+
}, Ro = (e) => {
|
|
2714
|
+
for (let t = e.length - 1; t >= 0; t -= 1) e[t]?.dispose();
|
|
2715
|
+
}, ke = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, Re = (e, t, n, r, s) => e.prepareCommandArgs?.(t, n, r, s) ?? n, Co = (e, t) => t.commands.map((n) => e.workbench.commands.registerCommand({
|
|
2716
|
+
id: n.id,
|
|
2717
|
+
label: p(n.title, n.id),
|
|
2718
|
+
description: p(n.description),
|
|
2719
|
+
params: n.params
|
|
2720
|
+
}, {
|
|
2721
|
+
prepareArgs: (r, s, o) => Re(e, n.id, r, s, o),
|
|
2722
|
+
execute: (r, s) => P(e, n.id, {
|
|
2723
|
+
params: ke(r),
|
|
2724
|
+
resource: s?.resource
|
|
2725
|
+
})
|
|
2726
|
+
})), bt = (e, t) => t?.resource ?? e.workbench.getPrimaryResource(), xo = (e, t) => {
|
|
2727
|
+
if (!e.menuSlotsById) return [];
|
|
2728
|
+
const {
|
|
2729
|
+
registrations: n
|
|
2730
|
+
} = qn({
|
|
2731
|
+
metadata: e.metadata,
|
|
2732
|
+
menuSlotsById: e.menuSlotsById,
|
|
2733
|
+
menuTargetsById: e.menuTargetsById,
|
|
2734
|
+
createWhenExpression: e.createMenuWhenExpression
|
|
2735
|
+
}), r = n.map(({
|
|
2736
|
+
menuItem: o,
|
|
2737
|
+
menuPath: i,
|
|
2738
|
+
...a
|
|
2739
|
+
}) => ({
|
|
2740
|
+
...a,
|
|
2741
|
+
menuItems: [{
|
|
2742
|
+
menuItem: o,
|
|
2743
|
+
menuPath: i
|
|
2744
|
+
}]
|
|
2745
|
+
}));
|
|
2746
|
+
return (e.menuRegistrations ?? r).flatMap((o) => [e.workbench.commands.registerCommand(o.command, {
|
|
2747
|
+
prepareArgs: (i, a, d) => Re(t, o.targetCommandId, i, a, d),
|
|
2748
|
+
execute: (i, a) => P(t, o.targetCommandId, {
|
|
2749
|
+
params: {
|
|
2750
|
+
...o.contribution.params ?? {},
|
|
2751
|
+
...ke(i) ?? {}
|
|
2752
|
+
},
|
|
2753
|
+
resource: bt(e, a),
|
|
2754
|
+
slot: B({
|
|
2755
|
+
id: o.contribution.slotId,
|
|
2756
|
+
kind: "menu",
|
|
2757
|
+
projectId: e.projectId,
|
|
2758
|
+
context: {
|
|
2759
|
+
panelId: o.contribution.id
|
|
2760
|
+
}
|
|
2761
|
+
})
|
|
2762
|
+
})
|
|
2763
|
+
}), ...o.menuItems.map(({
|
|
2764
|
+
menuPath: i,
|
|
2765
|
+
menuItem: a
|
|
2766
|
+
}) => e.workbench.layout.registerMenuItem(i, a))]);
|
|
2767
|
+
}, Eo = (e, t) => zn({
|
|
2768
|
+
metadata: e.metadata
|
|
2769
|
+
}).flatMap((r) => [e.workbench.commands.registerCommand(r.command, {
|
|
2770
|
+
prepareArgs: (s, o, i) => Re(t, r.targetCommandId, s, o, i),
|
|
2771
|
+
execute: (s, o) => P(t, r.targetCommandId, {
|
|
2772
|
+
params: {
|
|
2773
|
+
...r.contribution.params ?? {},
|
|
2774
|
+
...ke(s) ?? {}
|
|
2775
|
+
},
|
|
2776
|
+
resource: bt(e, o),
|
|
2777
|
+
slot: B({
|
|
2778
|
+
id: "workbench.commandPalette",
|
|
2779
|
+
kind: "menu",
|
|
2780
|
+
projectId: e.projectId,
|
|
2781
|
+
context: {
|
|
2782
|
+
panelId: r.contribution.id
|
|
2783
|
+
}
|
|
2784
|
+
})
|
|
2785
|
+
}),
|
|
2786
|
+
isVisible: () => xt(r.contribution.when, e.workbench.getPrimaryResource()?.kind)
|
|
2787
|
+
}), e.workbench.layout.registerMenuItem(kt, r.menuItem)]), Po = (e, t) => {
|
|
2788
|
+
const n = t?.mode;
|
|
2789
|
+
if (!n) return !0;
|
|
2790
|
+
const r = e.workbench.modes.getActiveModeId() ?? "";
|
|
2791
|
+
return Array.isArray(n) ? n.includes(r) : n === r;
|
|
2792
|
+
}, Ao = (e) => (e.metadata.statusBarItems ?? []).map((t) => e.workbench.statusBar.registerItem({
|
|
2793
|
+
id: t.id,
|
|
2794
|
+
viewId: t.viewId,
|
|
2795
|
+
slot: t.slot,
|
|
2796
|
+
order: t.order,
|
|
2797
|
+
isVisible: () => Po(e, t.when)
|
|
2798
|
+
})), Lo = (e) => {
|
|
2799
|
+
const t = {
|
|
2800
|
+
...e,
|
|
2801
|
+
metadata: io(e.metadata)
|
|
2802
|
+
}, n = [], r = t;
|
|
2803
|
+
n.push(...Io(t)), n.push(...Co(r, t.metadata)), n.push(...Yr({
|
|
2804
|
+
bindings: t.metadata.keybindings,
|
|
2805
|
+
createWhenExpression: t.createKeybindingWhenExpression,
|
|
2806
|
+
workbench: t.workbench
|
|
2807
|
+
})), n.push(...xo(t, r)), n.push(...Eo(t, r)), n.push(Or({
|
|
2808
|
+
...t,
|
|
2809
|
+
resolveNodeResource: t.resolveTreeNodeResource
|
|
2810
|
+
})), n.push(Jn(t)), n.push(Hn(r, t.metadata.controlsRenderers ?? [], t.metadata.panels, {
|
|
2811
|
+
resolveViewInput: t.resolveViewInput
|
|
2812
|
+
}, t.metadata.resourcePanels)), n.push(...yo(t)), n.push(...ko(t)), n.push(...vo(t, r)), n.push(kr(r, t.metadata.kanbanRenderers ?? [], {
|
|
2813
|
+
...t.kanbanAdapter,
|
|
2814
|
+
resolveViewInput: t.resolveViewInput
|
|
2815
|
+
}, t.metadata.panels, t.metadata.resourcePanels)), n.push(Bn(r, t.metadata.dataTableRenderers ?? [], t.metadata.panels, t.metadata.resourcePanels, t.resolveViewInput)), n.push(hn(r, t.metadata.commandPaletteResources ?? [])), n.push(...Dr({
|
|
2816
|
+
metadata: e.metadata,
|
|
2817
|
+
workbench: e.workbench
|
|
2818
|
+
})), e.subscribeRefreshEvents && n.push(lo({
|
|
2819
|
+
metadata: e.metadata,
|
|
2820
|
+
subscribe: e.subscribeRefreshEvents,
|
|
2821
|
+
workbench: e.workbench
|
|
2822
|
+
})), n.push(...Ao(t)), n.push(...Ur(t));
|
|
2823
|
+
const s = _r(t);
|
|
2824
|
+
return n.push(...s.disposables), n.push(...zr(t, s.registry)), {
|
|
2825
|
+
dispose() {
|
|
2826
|
+
Ro(n);
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2459
2829
|
};
|
|
2460
2830
|
export {
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2831
|
+
se as BRIDGE_WEBVIEW_RENDERER_ID,
|
|
2832
|
+
zn as buildWorkbenchExtensionCommandPaletteRegistrations,
|
|
2833
|
+
qn as buildWorkbenchExtensionMenuRegistrations,
|
|
2834
|
+
Cn as compositionRequiredNotificationId,
|
|
2835
|
+
Xt as createBridgeWebviewRenderer,
|
|
2836
|
+
Ut as createTerminalSessionCapability,
|
|
2837
|
+
In as createWorkbenchCompositionRegistry,
|
|
2838
|
+
ze as createWorkbenchWebviewHostCapabilities,
|
|
2839
|
+
Do as emptyWorkbenchExtensionMetadata,
|
|
2840
|
+
Bo as fileRendererRefreshEnvelopeFromCommand,
|
|
2841
|
+
dn as isExtensionNavigationTarget,
|
|
2842
|
+
yn as listCompositionAddablePanels,
|
|
2843
|
+
L as panelMenuDeclarationOffsets,
|
|
2844
|
+
xn as reconcileCompositionLayout,
|
|
2845
|
+
No as refreshOpenWorkbenchExtensionWebviews,
|
|
2846
|
+
ao as refreshWorkbenchExtensionRenderer,
|
|
2847
|
+
hn as registerWorkbenchExtensionCommandPaletteResources,
|
|
2848
|
+
Lo as registerWorkbenchExtensionContributions,
|
|
2849
|
+
Hn as registerWorkbenchExtensionControlsRenderers,
|
|
2850
|
+
Bn as registerWorkbenchExtensionDataTableRenderers,
|
|
2851
|
+
Jn as registerWorkbenchExtensionFileRenderers,
|
|
2852
|
+
kr as registerWorkbenchExtensionKanbanRenderers,
|
|
2853
|
+
U as registerWorkbenchExtensionPanel,
|
|
2854
|
+
lo as registerWorkbenchExtensionRendererRefreshEvents,
|
|
2855
|
+
Or as registerWorkbenchExtensionTreeRenderers,
|
|
2856
|
+
Ye as renderBridgeWebviewFrame,
|
|
2857
|
+
wn as toPanelPlacements,
|
|
2858
|
+
N as toWorkbenchCompositionPanelContribution,
|
|
2859
|
+
Z as toWorkbenchNavigationTarget,
|
|
2860
|
+
Je as toWorkbenchNavigationTargetResult,
|
|
2861
|
+
Fo as toWorkbenchWhenExpression
|
|
2489
2862
|
};
|
|
2490
2863
|
//# sourceMappingURL=extensions.js.map
|