@codingame/monaco-vscode-workspace-trust-service-override 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/platform/workspace/common/workspaceTrust.js +3 -6
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +161 -282
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +159 -346
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +5 -12
- package/workspaceTrust.d.ts +0 -5
|
@@ -49,6 +49,7 @@ import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/commo
|
|
|
49
49
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
50
50
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
51
51
|
|
|
52
|
+
const _moduleId = "vs/workbench/contrib/workspace/browser/workspace.contribution";
|
|
52
53
|
const BANNER_RESTRICTED_MODE = 'workbench.banner.restrictedMode';
|
|
53
54
|
const STARTUP_PROMPT_SHOWN_KEY = 'workspace.trust.startupPrompt.shown';
|
|
54
55
|
const BANNER_RESTRICTED_MODE_DISMISSED_KEY = 'workbench.banner.restrictedMode.dismissed';
|
|
@@ -62,12 +63,12 @@ let WorkspaceTrustContextKeys = class WorkspaceTrustContextKeys extends Disposab
|
|
|
62
63
|
this._register(workspaceTrustManagementService.onDidChangeTrust(trusted => this._ctxWorkspaceTrustState.set(trusted)));
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
|
-
WorkspaceTrustContextKeys = ( __decorate([
|
|
66
|
-
( __param(0, IContextKeyService)),
|
|
67
|
-
( __param(1, IWorkspaceTrustEnablementService)),
|
|
68
|
-
( __param(2, IWorkspaceTrustManagementService))
|
|
69
|
-
], WorkspaceTrustContextKeys));
|
|
70
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspaceTrustContextKeys, 3 );
|
|
66
|
+
WorkspaceTrustContextKeys = ( (__decorate([
|
|
67
|
+
( (__param(0, IContextKeyService))),
|
|
68
|
+
( (__param(1, IWorkspaceTrustEnablementService))),
|
|
69
|
+
( (__param(2, IWorkspaceTrustManagementService)))
|
|
70
|
+
], WorkspaceTrustContextKeys)));
|
|
71
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustContextKeys, 3 );
|
|
71
72
|
let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Disposable {
|
|
72
73
|
static { this.ID = 'workbench.contrib.workspaceTrustRequestHandler'; }
|
|
73
74
|
constructor(dialogService, commandService, workspaceContextService, workspaceTrustManagementService, workspaceTrustRequestService) {
|
|
@@ -88,49 +89,33 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
88
89
|
const markdownDetails = [
|
|
89
90
|
this.workspaceContextService.getWorkbenchState() !== 1 ?
|
|
90
91
|
( localizeWithPath(
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
_moduleId,
|
|
93
|
+
0,
|
|
93
94
|
"You are trying to open untrusted files in a workspace which is trusted."
|
|
94
95
|
)) :
|
|
95
96
|
( localizeWithPath(
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
_moduleId,
|
|
98
|
+
1,
|
|
98
99
|
"You are trying to open untrusted files in a window which is trusted."
|
|
99
100
|
)),
|
|
100
101
|
( localizeWithPath(
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
_moduleId,
|
|
103
|
+
2,
|
|
103
104
|
"If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
104
105
|
))
|
|
105
106
|
];
|
|
106
107
|
await this.dialogService.prompt({
|
|
107
108
|
type: Severity$1.Info,
|
|
108
109
|
message: this.workspaceContextService.getWorkbenchState() !== 1 ?
|
|
109
|
-
( localizeWithPath(
|
|
110
|
-
|
|
111
|
-
'openLooseFileWorkspaceMesssage',
|
|
112
|
-
"Do you want to allow untrusted files in this workspace?"
|
|
113
|
-
)) :
|
|
114
|
-
( localizeWithPath(
|
|
115
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
116
|
-
'openLooseFileWindowMesssage',
|
|
117
|
-
"Do you want to allow untrusted files in this window?"
|
|
118
|
-
)),
|
|
110
|
+
( localizeWithPath(_moduleId, 3, "Do you want to allow untrusted files in this workspace?")) :
|
|
111
|
+
( localizeWithPath(_moduleId, 4, "Do you want to allow untrusted files in this window?")),
|
|
119
112
|
buttons: [
|
|
120
113
|
{
|
|
121
|
-
label: ( localizeWithPath(
|
|
122
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
123
|
-
{ key: 'open', comment: ['&& denotes a mnemonic'] },
|
|
124
|
-
"&&Open"
|
|
125
|
-
)),
|
|
114
|
+
label: ( localizeWithPath(_moduleId, 5, "&&Open")),
|
|
126
115
|
run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(1 , !!checkboxChecked)
|
|
127
116
|
},
|
|
128
117
|
{
|
|
129
|
-
label: ( localizeWithPath(
|
|
130
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
131
|
-
{ key: 'newWindow', comment: ['&& denotes a mnemonic'] },
|
|
132
|
-
"Open in &&Restricted Mode"
|
|
133
|
-
)),
|
|
118
|
+
label: ( localizeWithPath(_moduleId, 6, "Open in &&Restricted Mode")),
|
|
134
119
|
run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(2 , !!checkboxChecked)
|
|
135
120
|
}
|
|
136
121
|
],
|
|
@@ -138,60 +123,32 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
138
123
|
run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(3 )
|
|
139
124
|
},
|
|
140
125
|
checkbox: {
|
|
141
|
-
label: ( localizeWithPath(
|
|
142
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
143
|
-
'openLooseFileWorkspaceCheckbox',
|
|
144
|
-
"Remember my decision for all workspaces"
|
|
145
|
-
)),
|
|
126
|
+
label: ( localizeWithPath(_moduleId, 7, "Remember my decision for all workspaces")),
|
|
146
127
|
checked: false
|
|
147
128
|
},
|
|
148
129
|
custom: {
|
|
149
130
|
icon: Codicon.shield,
|
|
150
|
-
markdownDetails: ( markdownDetails.map(md => { return { markdown: ( new MarkdownString(md)) }; }))
|
|
131
|
+
markdownDetails: ( (markdownDetails.map(md => { return { markdown: ( (new MarkdownString(md))) }; })))
|
|
151
132
|
}
|
|
152
133
|
});
|
|
153
134
|
}));
|
|
154
135
|
this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async (requestOptions) => {
|
|
155
136
|
await this.workspaceTrustManagementService.workspaceResolved;
|
|
156
137
|
const message = this.useWorkspaceLanguage ?
|
|
157
|
-
( localizeWithPath(
|
|
158
|
-
|
|
159
|
-
'workspaceTrust',
|
|
160
|
-
"Do you trust the authors of the files in this workspace?"
|
|
161
|
-
)) :
|
|
162
|
-
( localizeWithPath(
|
|
163
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
164
|
-
'folderTrust',
|
|
165
|
-
"Do you trust the authors of the files in this folder?"
|
|
166
|
-
));
|
|
138
|
+
( localizeWithPath(_moduleId, 8, "Do you trust the authors of the files in this workspace?")) :
|
|
139
|
+
( localizeWithPath(_moduleId, 9, "Do you trust the authors of the files in this folder?"));
|
|
167
140
|
const defaultDetails = ( localizeWithPath(
|
|
168
|
-
|
|
169
|
-
|
|
141
|
+
_moduleId,
|
|
142
|
+
10,
|
|
170
143
|
"A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open."
|
|
171
144
|
));
|
|
172
145
|
const details = requestOptions?.message ?? defaultDetails;
|
|
173
146
|
const buttons = requestOptions?.buttons ?? [
|
|
174
|
-
{ label: this.useWorkspaceLanguage ? ( localizeWithPath(
|
|
175
|
-
|
|
176
|
-
{ key: 'grantWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] },
|
|
177
|
-
"&&Trust Workspace & Continue"
|
|
178
|
-
)) : ( localizeWithPath(
|
|
179
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
180
|
-
{ key: 'grantFolderTrustButton', comment: ['&& denotes a mnemonic'] },
|
|
181
|
-
"&&Trust Folder & Continue"
|
|
182
|
-
)), type: 'ContinueWithTrust' },
|
|
183
|
-
{ label: ( localizeWithPath(
|
|
184
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
185
|
-
{ key: 'manageWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] },
|
|
186
|
-
"&&Manage"
|
|
187
|
-
)), type: 'Manage' }
|
|
147
|
+
{ label: this.useWorkspaceLanguage ? ( localizeWithPath(_moduleId, 11, "&&Trust Workspace & Continue")) : ( localizeWithPath(_moduleId, 12, "&&Trust Folder & Continue")), type: 'ContinueWithTrust' },
|
|
148
|
+
{ label: ( localizeWithPath(_moduleId, 13, "&&Manage")), type: 'Manage' }
|
|
188
149
|
];
|
|
189
|
-
if (!( buttons.some(b => b.type === 'Cancel'))) {
|
|
190
|
-
buttons.push({ label: ( localizeWithPath(
|
|
191
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
192
|
-
'cancelWorkspaceTrustButton',
|
|
193
|
-
"Cancel"
|
|
194
|
-
)), type: 'Cancel' });
|
|
150
|
+
if (!( (buttons.some(b => b.type === 'Cancel')))) {
|
|
151
|
+
buttons.push({ label: ( localizeWithPath(_moduleId, 14, "Cancel")), type: 'Cancel' });
|
|
195
152
|
}
|
|
196
153
|
const { result } = await this.dialogService.prompt({
|
|
197
154
|
type: Severity$1.Info,
|
|
@@ -199,20 +156,20 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
199
156
|
custom: {
|
|
200
157
|
icon: Codicon.shield,
|
|
201
158
|
markdownDetails: [
|
|
202
|
-
{ markdown: ( new MarkdownString(details)) },
|
|
203
|
-
{ markdown: ( new MarkdownString(( localizeWithPath(
|
|
204
|
-
|
|
205
|
-
|
|
159
|
+
{ markdown: ( (new MarkdownString(details))) },
|
|
160
|
+
{ markdown: ( (new MarkdownString(( localizeWithPath(
|
|
161
|
+
_moduleId,
|
|
162
|
+
15,
|
|
206
163
|
"If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
207
|
-
)))) }
|
|
164
|
+
))))) }
|
|
208
165
|
]
|
|
209
166
|
},
|
|
210
|
-
buttons: ( buttons.filter(b => b.type !== 'Cancel').map(button => {
|
|
167
|
+
buttons: ( (buttons.filter(b => b.type !== 'Cancel').map(button => {
|
|
211
168
|
return {
|
|
212
169
|
label: button.label,
|
|
213
170
|
run: () => button.type
|
|
214
171
|
};
|
|
215
|
-
})),
|
|
172
|
+
}))),
|
|
216
173
|
cancelButton: (() => {
|
|
217
174
|
const cancelButton = buttons.find(b => b.type === 'Cancel');
|
|
218
175
|
if (!cancelButton) {
|
|
@@ -242,13 +199,13 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
242
199
|
}));
|
|
243
200
|
}
|
|
244
201
|
};
|
|
245
|
-
WorkspaceTrustRequestHandler = ( __decorate([
|
|
246
|
-
( __param(0, IDialogService)),
|
|
247
|
-
( __param(1, ICommandService)),
|
|
248
|
-
( __param(2, IWorkspaceContextService)),
|
|
249
|
-
( __param(3, IWorkspaceTrustManagementService)),
|
|
250
|
-
( __param(4, IWorkspaceTrustRequestService))
|
|
251
|
-
], WorkspaceTrustRequestHandler));
|
|
202
|
+
WorkspaceTrustRequestHandler = ( (__decorate([
|
|
203
|
+
( (__param(0, IDialogService))),
|
|
204
|
+
( (__param(1, ICommandService))),
|
|
205
|
+
( (__param(2, IWorkspaceContextService))),
|
|
206
|
+
( (__param(3, IWorkspaceTrustManagementService))),
|
|
207
|
+
( (__param(4, IWorkspaceTrustRequestService)))
|
|
208
|
+
], WorkspaceTrustRequestHandler)));
|
|
252
209
|
let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
253
210
|
constructor(dialogService, workspaceContextService, workspaceTrustEnablementService, workspaceTrustManagementService, configurationService, statusbarService, storageService, workspaceTrustRequestService, bannerService, labelService, hostService, productService, remoteAgentService, environmentService, fileService) {
|
|
254
211
|
super();
|
|
@@ -268,7 +225,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
268
225
|
this.environmentService = environmentService;
|
|
269
226
|
this.fileService = fileService;
|
|
270
227
|
this.entryId = `status.workspaceTrust`;
|
|
271
|
-
this.statusbarEntryAccessor = this._register(( new MutableDisposable()));
|
|
228
|
+
this.statusbarEntryAccessor = this._register(( (new MutableDisposable())));
|
|
272
229
|
(async () => {
|
|
273
230
|
await this.workspaceTrustManagementService.workspaceTrustInitialized;
|
|
274
231
|
if (this.workspaceTrustEnablementService.isWorkspaceTrustEnabled()) {
|
|
@@ -299,28 +256,20 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
299
256
|
const addWorkspaceFolder = async (e) => {
|
|
300
257
|
const trusted = this.workspaceTrustManagementService.isWorkspaceTrusted();
|
|
301
258
|
if (trusted && (e.changes.added.length || e.changes.changed.length)) {
|
|
302
|
-
const addedFoldersTrustInfo = await Promise.all(( e.changes.added.map(folder => this.workspaceTrustManagementService.getUriTrustInfo(folder.uri))));
|
|
303
|
-
if (!( addedFoldersTrustInfo.map(info => info.trusted)).every(trusted => trusted)) {
|
|
259
|
+
const addedFoldersTrustInfo = await Promise.all(( (e.changes.added.map(folder => this.workspaceTrustManagementService.getUriTrustInfo(folder.uri)))));
|
|
260
|
+
if (!( (addedFoldersTrustInfo.map(info => info.trusted))).every(trusted => trusted)) {
|
|
304
261
|
const { confirmed } = await this.dialogService.confirm({
|
|
305
262
|
type: Severity$1.Info,
|
|
306
|
-
message: ( localizeWithPath(
|
|
307
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
308
|
-
'addWorkspaceFolderMessage',
|
|
309
|
-
"Do you trust the authors of the files in this folder?"
|
|
310
|
-
)),
|
|
263
|
+
message: ( localizeWithPath(_moduleId, 16, "Do you trust the authors of the files in this folder?")),
|
|
311
264
|
detail: ( localizeWithPath(
|
|
312
|
-
|
|
313
|
-
|
|
265
|
+
_moduleId,
|
|
266
|
+
17,
|
|
314
267
|
"You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"
|
|
315
268
|
)),
|
|
316
|
-
cancelButton: ( localizeWithPath(
|
|
317
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
318
|
-
'no',
|
|
319
|
-
'No'
|
|
320
|
-
)),
|
|
269
|
+
cancelButton: ( localizeWithPath(_moduleId, 18, 'No')),
|
|
321
270
|
custom: { icon: Codicon.shield }
|
|
322
271
|
});
|
|
323
|
-
await this.workspaceTrustManagementService.setUrisTrust(( addedFoldersTrustInfo.map(i => i.uri)), confirmed);
|
|
272
|
+
await this.workspaceTrustManagementService.setUrisTrust(( (addedFoldersTrustInfo.map(i => i.uri))), confirmed);
|
|
324
273
|
}
|
|
325
274
|
}
|
|
326
275
|
};
|
|
@@ -345,16 +294,8 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
345
294
|
console.warn('AI generated workspace trust dialog contents not available.');
|
|
346
295
|
}
|
|
347
296
|
const title = titleString ?? (this.useWorkspaceLanguage ?
|
|
348
|
-
( localizeWithPath(
|
|
349
|
-
|
|
350
|
-
'workspaceTrust',
|
|
351
|
-
"Do you trust the authors of the files in this workspace?"
|
|
352
|
-
)) :
|
|
353
|
-
( localizeWithPath(
|
|
354
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
355
|
-
'folderTrust',
|
|
356
|
-
"Do you trust the authors of the files in this folder?"
|
|
357
|
-
)));
|
|
297
|
+
( localizeWithPath(_moduleId, 8, "Do you trust the authors of the files in this workspace?")) :
|
|
298
|
+
( localizeWithPath(_moduleId, 9, "Do you trust the authors of the files in this folder?")));
|
|
358
299
|
let checkboxText;
|
|
359
300
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
|
|
360
301
|
const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
|
|
@@ -362,53 +303,29 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
362
303
|
if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
|
|
363
304
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
364
305
|
checkboxText = ( localizeWithPath(
|
|
365
|
-
|
|
366
|
-
|
|
306
|
+
_moduleId,
|
|
307
|
+
19,
|
|
367
308
|
"Trust the authors of all files in the parent folder '{0}'",
|
|
368
309
|
name
|
|
369
310
|
));
|
|
370
311
|
}
|
|
371
|
-
this.doShowModal(title, { label: trustOption ?? ( localizeWithPath(
|
|
372
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
373
|
-
{ key: 'trustOption', comment: ['&& denotes a mnemonic'] },
|
|
374
|
-
"&&Yes, I trust the authors"
|
|
375
|
-
)), sublabel: isSingleFolderWorkspace ? ( localizeWithPath(
|
|
376
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
377
|
-
'trustFolderOptionDescription',
|
|
378
|
-
"Trust folder and enable all features"
|
|
379
|
-
)) : ( localizeWithPath(
|
|
380
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
381
|
-
'trustWorkspaceOptionDescription',
|
|
382
|
-
"Trust workspace and enable all features"
|
|
383
|
-
)) }, { label: dontTrustOption ?? ( localizeWithPath(
|
|
384
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
385
|
-
{ key: 'dontTrustOption', comment: ['&& denotes a mnemonic'] },
|
|
386
|
-
"&&No, I don't trust the authors"
|
|
387
|
-
)), sublabel: isSingleFolderWorkspace ? ( localizeWithPath(
|
|
388
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
389
|
-
'dontTrustFolderOptionDescription',
|
|
390
|
-
"Browse folder in restricted mode"
|
|
391
|
-
)) : ( localizeWithPath(
|
|
392
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
393
|
-
'dontTrustWorkspaceOptionDescription',
|
|
394
|
-
"Browse workspace in restricted mode"
|
|
395
|
-
)) }, [
|
|
312
|
+
this.doShowModal(title, { label: trustOption ?? ( localizeWithPath(_moduleId, 20, "&&Yes, I trust the authors")), sublabel: isSingleFolderWorkspace ? ( localizeWithPath(_moduleId, 21, "Trust folder and enable all features")) : ( localizeWithPath(_moduleId, 22, "Trust workspace and enable all features")) }, { label: dontTrustOption ?? ( localizeWithPath(_moduleId, 23, "&&No, I don't trust the authors")), sublabel: isSingleFolderWorkspace ? ( localizeWithPath(_moduleId, 24, "Browse folder in restricted mode")) : ( localizeWithPath(_moduleId, 25, "Browse workspace in restricted mode")) }, [
|
|
396
313
|
!isSingleFolderWorkspace ?
|
|
397
314
|
( localizeWithPath(
|
|
398
|
-
|
|
399
|
-
|
|
315
|
+
_moduleId,
|
|
316
|
+
26,
|
|
400
317
|
"{0} provides features that may automatically execute files in this workspace.",
|
|
401
318
|
this.productService.nameShort
|
|
402
319
|
)) :
|
|
403
320
|
( localizeWithPath(
|
|
404
|
-
|
|
405
|
-
|
|
321
|
+
_moduleId,
|
|
322
|
+
27,
|
|
406
323
|
"{0} provides features that may automatically execute files in this folder.",
|
|
407
324
|
this.productService.nameShort
|
|
408
325
|
)),
|
|
409
326
|
learnMoreString ?? ( localizeWithPath(
|
|
410
|
-
|
|
411
|
-
|
|
327
|
+
_moduleId,
|
|
328
|
+
28,
|
|
412
329
|
"If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
413
330
|
)),
|
|
414
331
|
!isEmptyWindow ?
|
|
@@ -462,7 +379,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
462
379
|
],
|
|
463
380
|
disableCloseAction: true,
|
|
464
381
|
icon: Codicon.shield,
|
|
465
|
-
markdownDetails: ( markdownStrings.map(md => { return { markdown: ( new MarkdownString(md)) }; }))
|
|
382
|
+
markdownDetails: ( (markdownStrings.map(md => { return { markdown: ( (new MarkdownString(md))) }; })))
|
|
466
383
|
}
|
|
467
384
|
});
|
|
468
385
|
this.storageService.store(STARTUP_PROMPT_SHOWN_KEY, true, 1 , 1 );
|
|
@@ -505,8 +422,8 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
505
422
|
if (result) {
|
|
506
423
|
try {
|
|
507
424
|
const content = await this.fileService.readFile(aiGeneratedWorkspaces);
|
|
508
|
-
const workspaces = JSON.parse(( content.value.toString()));
|
|
509
|
-
if (workspaces.indexOf(( this.workspaceContextService.getWorkspace().folders[0].uri.toString())) > -1) {
|
|
425
|
+
const workspaces = JSON.parse(( (content.value.toString())));
|
|
426
|
+
if (workspaces.indexOf(( (this.workspaceContextService.getWorkspace().folders[0].uri.toString()))) > -1) {
|
|
510
427
|
return true;
|
|
511
428
|
}
|
|
512
429
|
}
|
|
@@ -526,19 +443,11 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
526
443
|
}
|
|
527
444
|
const actions = [
|
|
528
445
|
{
|
|
529
|
-
label: ( localizeWithPath(
|
|
530
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
531
|
-
'restrictedModeBannerManage',
|
|
532
|
-
"Manage"
|
|
533
|
-
)),
|
|
446
|
+
label: ( localizeWithPath(_moduleId, 29, "Manage")),
|
|
534
447
|
href: 'command:' + MANAGE_TRUST_COMMAND_ID
|
|
535
448
|
},
|
|
536
449
|
{
|
|
537
|
-
label: ( localizeWithPath(
|
|
538
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
539
|
-
'restrictedModeBannerLearnMore',
|
|
540
|
-
"Learn More"
|
|
541
|
-
)),
|
|
450
|
+
label: ( localizeWithPath(_moduleId, 30, "Learn More")),
|
|
542
451
|
href: 'https://aka.ms/vscode-workspace-trust'
|
|
543
452
|
}
|
|
544
453
|
];
|
|
@@ -559,20 +468,20 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
559
468
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
560
469
|
case 1 :
|
|
561
470
|
return ( localizeWithPath(
|
|
562
|
-
|
|
563
|
-
|
|
471
|
+
_moduleId,
|
|
472
|
+
31,
|
|
564
473
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."
|
|
565
474
|
));
|
|
566
475
|
case 2 :
|
|
567
476
|
return ( localizeWithPath(
|
|
568
|
-
|
|
569
|
-
|
|
477
|
+
_moduleId,
|
|
478
|
+
32,
|
|
570
479
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."
|
|
571
480
|
));
|
|
572
481
|
case 3 :
|
|
573
482
|
return ( localizeWithPath(
|
|
574
|
-
|
|
575
|
-
|
|
483
|
+
_moduleId,
|
|
484
|
+
33,
|
|
576
485
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."
|
|
577
486
|
));
|
|
578
487
|
}
|
|
@@ -581,20 +490,20 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
581
490
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
582
491
|
case 1 :
|
|
583
492
|
return ( localizeWithPath(
|
|
584
|
-
|
|
585
|
-
|
|
493
|
+
_moduleId,
|
|
494
|
+
34,
|
|
586
495
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features."
|
|
587
496
|
));
|
|
588
497
|
case 2 :
|
|
589
498
|
return ( localizeWithPath(
|
|
590
|
-
|
|
591
|
-
|
|
499
|
+
_moduleId,
|
|
500
|
+
35,
|
|
592
501
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."
|
|
593
502
|
));
|
|
594
503
|
case 3 :
|
|
595
504
|
return ( localizeWithPath(
|
|
596
|
-
|
|
597
|
-
|
|
505
|
+
_moduleId,
|
|
506
|
+
36,
|
|
598
507
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."
|
|
599
508
|
));
|
|
600
509
|
}
|
|
@@ -612,20 +521,16 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
612
521
|
let toolTip;
|
|
613
522
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
614
523
|
case 1 : {
|
|
615
|
-
ariaLabel = trusted ? ( localizeWithPath(
|
|
616
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
617
|
-
'status.ariaTrustedWindow',
|
|
618
|
-
"This window is trusted."
|
|
619
|
-
)) :
|
|
524
|
+
ariaLabel = trusted ? ( localizeWithPath(_moduleId, 37, "This window is trusted.")) :
|
|
620
525
|
( localizeWithPath(
|
|
621
|
-
|
|
622
|
-
|
|
526
|
+
_moduleId,
|
|
527
|
+
38,
|
|
623
528
|
"Restricted Mode: Some features are disabled because this window is not trusted."
|
|
624
529
|
));
|
|
625
530
|
toolTip = trusted ? ariaLabel : {
|
|
626
531
|
value: ( localizeWithPath(
|
|
627
|
-
|
|
628
|
-
|
|
532
|
+
_moduleId,
|
|
533
|
+
39,
|
|
629
534
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
|
|
630
535
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
631
536
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -636,20 +541,16 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
636
541
|
break;
|
|
637
542
|
}
|
|
638
543
|
case 2 : {
|
|
639
|
-
ariaLabel = trusted ? ( localizeWithPath(
|
|
640
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
641
|
-
'status.ariaTrustedFolder',
|
|
642
|
-
"This folder is trusted."
|
|
643
|
-
)) :
|
|
544
|
+
ariaLabel = trusted ? ( localizeWithPath(_moduleId, 40, "This folder is trusted.")) :
|
|
644
545
|
( localizeWithPath(
|
|
645
|
-
|
|
646
|
-
|
|
546
|
+
_moduleId,
|
|
547
|
+
41,
|
|
647
548
|
"Restricted Mode: Some features are disabled because this folder is not trusted."
|
|
648
549
|
));
|
|
649
550
|
toolTip = trusted ? ariaLabel : {
|
|
650
551
|
value: ( localizeWithPath(
|
|
651
|
-
|
|
652
|
-
|
|
552
|
+
_moduleId,
|
|
553
|
+
42,
|
|
653
554
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
|
|
654
555
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
655
556
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -660,20 +561,16 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
660
561
|
break;
|
|
661
562
|
}
|
|
662
563
|
case 3 : {
|
|
663
|
-
ariaLabel = trusted ? ( localizeWithPath(
|
|
664
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
665
|
-
'status.ariaTrustedWorkspace',
|
|
666
|
-
"This workspace is trusted."
|
|
667
|
-
)) :
|
|
564
|
+
ariaLabel = trusted ? ( localizeWithPath(_moduleId, 43, "This workspace is trusted.")) :
|
|
668
565
|
( localizeWithPath(
|
|
669
|
-
|
|
670
|
-
|
|
566
|
+
_moduleId,
|
|
567
|
+
44,
|
|
671
568
|
"Restricted Mode: Some features are disabled because this workspace is not trusted."
|
|
672
569
|
));
|
|
673
570
|
toolTip = trusted ? ariaLabel : {
|
|
674
571
|
value: ( localizeWithPath(
|
|
675
|
-
|
|
676
|
-
|
|
572
|
+
_moduleId,
|
|
573
|
+
45,
|
|
677
574
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
|
|
678
575
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
679
576
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -685,11 +582,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
685
582
|
}
|
|
686
583
|
}
|
|
687
584
|
return {
|
|
688
|
-
name: ( localizeWithPath(
|
|
689
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
690
|
-
'status.WorkspaceTrust',
|
|
691
|
-
"Workspace Trust"
|
|
692
|
-
)),
|
|
585
|
+
name: ( localizeWithPath(_moduleId, 46, "Workspace Trust")),
|
|
693
586
|
text: trusted ? `$(shield)` : `$(shield) ${text}`,
|
|
694
587
|
ariaLabel: ariaLabel,
|
|
695
588
|
tooltip: toolTip,
|
|
@@ -708,25 +601,25 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
708
601
|
}
|
|
709
602
|
}
|
|
710
603
|
};
|
|
711
|
-
WorkspaceTrustUXHandler = ( __decorate([
|
|
712
|
-
( __param(0, IDialogService)),
|
|
713
|
-
( __param(1, IWorkspaceContextService)),
|
|
714
|
-
( __param(2, IWorkspaceTrustEnablementService)),
|
|
715
|
-
( __param(3, IWorkspaceTrustManagementService)),
|
|
716
|
-
( __param(4, IConfigurationService)),
|
|
717
|
-
( __param(5, IStatusbarService)),
|
|
718
|
-
( __param(6, IStorageService)),
|
|
719
|
-
( __param(7, IWorkspaceTrustRequestService)),
|
|
720
|
-
( __param(8, IBannerService)),
|
|
721
|
-
( __param(9, ILabelService)),
|
|
722
|
-
( __param(10, IHostService)),
|
|
723
|
-
( __param(11, IProductService)),
|
|
724
|
-
( __param(12, IRemoteAgentService)),
|
|
725
|
-
( __param(13, IEnvironmentService)),
|
|
726
|
-
( __param(14, IFileService))
|
|
727
|
-
], WorkspaceTrustUXHandler));
|
|
604
|
+
WorkspaceTrustUXHandler = ( (__decorate([
|
|
605
|
+
( (__param(0, IDialogService))),
|
|
606
|
+
( (__param(1, IWorkspaceContextService))),
|
|
607
|
+
( (__param(2, IWorkspaceTrustEnablementService))),
|
|
608
|
+
( (__param(3, IWorkspaceTrustManagementService))),
|
|
609
|
+
( (__param(4, IConfigurationService))),
|
|
610
|
+
( (__param(5, IStatusbarService))),
|
|
611
|
+
( (__param(6, IStorageService))),
|
|
612
|
+
( (__param(7, IWorkspaceTrustRequestService))),
|
|
613
|
+
( (__param(8, IBannerService))),
|
|
614
|
+
( (__param(9, ILabelService))),
|
|
615
|
+
( (__param(10, IHostService))),
|
|
616
|
+
( (__param(11, IProductService))),
|
|
617
|
+
( (__param(12, IRemoteAgentService))),
|
|
618
|
+
( (__param(13, IEnvironmentService))),
|
|
619
|
+
( (__param(14, IFileService)))
|
|
620
|
+
], WorkspaceTrustUXHandler)));
|
|
728
621
|
registerWorkbenchContribution2(WorkspaceTrustRequestHandler.ID, WorkspaceTrustRequestHandler, 2 );
|
|
729
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspaceTrustUXHandler, 3 );
|
|
622
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustUXHandler, 3 );
|
|
730
623
|
class WorkspaceTrustEditorInputSerializer {
|
|
731
624
|
canSerialize(editorInput) {
|
|
732
625
|
return true;
|
|
@@ -738,31 +631,22 @@ class WorkspaceTrustEditorInputSerializer {
|
|
|
738
631
|
return instantiationService.createInstance(WorkspaceTrustEditorInput);
|
|
739
632
|
}
|
|
740
633
|
}
|
|
741
|
-
( Registry.as(EditorExtensions.EditorFactory))
|
|
634
|
+
( (Registry.as(EditorExtensions.EditorFactory)))
|
|
742
635
|
.registerEditorSerializer(WorkspaceTrustEditorInput.ID, WorkspaceTrustEditorInputSerializer);
|
|
743
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localizeWithPath(
|
|
744
|
-
|
|
745
|
-
'workspaceTrustEditor',
|
|
746
|
-
"Workspace Trust Editor"
|
|
747
|
-
))), [
|
|
748
|
-
( new SyncDescriptor(WorkspaceTrustEditorInput))
|
|
636
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localizeWithPath(_moduleId, 47, "Workspace Trust Editor"))), [
|
|
637
|
+
( (new SyncDescriptor(WorkspaceTrustEditorInput)))
|
|
749
638
|
]);
|
|
750
639
|
const CONFIGURE_TRUST_COMMAND_ID = 'workbench.trust.configure';
|
|
751
|
-
const WORKSPACES_CATEGORY = ( localize2WithPath(
|
|
752
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
753
|
-
'workspacesCategory',
|
|
754
|
-
'Workspaces'
|
|
755
|
-
));
|
|
640
|
+
const WORKSPACES_CATEGORY = ( localize2WithPath(_moduleId, 48, 'Workspaces'));
|
|
756
641
|
registerAction2(class extends Action2 {
|
|
757
642
|
constructor() {
|
|
758
643
|
super({
|
|
759
644
|
id: CONFIGURE_TRUST_COMMAND_ID,
|
|
760
|
-
title: ( localize2WithPath(
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
)),
|
|
765
|
-
precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
|
|
645
|
+
title: ( localize2WithPath(_moduleId, 49, "Configure Workspace Trust Settings")),
|
|
646
|
+
precondition: ( (ContextKeyExpr.and(
|
|
647
|
+
WorkspaceTrustContext.IsEnabled,
|
|
648
|
+
(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
|
|
649
|
+
))),
|
|
766
650
|
category: WORKSPACES_CATEGORY,
|
|
767
651
|
f1: true
|
|
768
652
|
});
|
|
@@ -775,12 +659,11 @@ registerAction2(class extends Action2 {
|
|
|
775
659
|
constructor() {
|
|
776
660
|
super({
|
|
777
661
|
id: MANAGE_TRUST_COMMAND_ID,
|
|
778
|
-
title: ( localize2WithPath(
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
)),
|
|
783
|
-
precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
|
|
662
|
+
title: ( localize2WithPath(_moduleId, 50, "Manage Workspace Trust")),
|
|
663
|
+
precondition: ( (ContextKeyExpr.and(
|
|
664
|
+
WorkspaceTrustContext.IsEnabled,
|
|
665
|
+
(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
|
|
666
|
+
))),
|
|
784
667
|
category: WORKSPACES_CATEGORY,
|
|
785
668
|
f1: true,
|
|
786
669
|
});
|
|
@@ -793,7 +676,7 @@ registerAction2(class extends Action2 {
|
|
|
793
676
|
return;
|
|
794
677
|
}
|
|
795
678
|
});
|
|
796
|
-
( Registry.as(Extensions$1.Configuration))
|
|
679
|
+
( (Registry.as(Extensions$1.Configuration)))
|
|
797
680
|
.registerConfiguration({
|
|
798
681
|
...securityConfigurationNodeBase,
|
|
799
682
|
properties: {
|
|
@@ -801,8 +684,8 @@ registerAction2(class extends Action2 {
|
|
|
801
684
|
type: 'boolean',
|
|
802
685
|
default: true,
|
|
803
686
|
description: ( localizeWithPath(
|
|
804
|
-
|
|
805
|
-
|
|
687
|
+
_moduleId,
|
|
688
|
+
51,
|
|
806
689
|
"Controls whether or not Workspace Trust is enabled within VS Code."
|
|
807
690
|
)),
|
|
808
691
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
@@ -812,8 +695,8 @@ registerAction2(class extends Action2 {
|
|
|
812
695
|
type: 'string',
|
|
813
696
|
default: 'once',
|
|
814
697
|
description: ( localizeWithPath(
|
|
815
|
-
|
|
816
|
-
|
|
698
|
+
_moduleId,
|
|
699
|
+
52,
|
|
817
700
|
"Controls when the startup prompt to trust a workspace is shown."
|
|
818
701
|
)),
|
|
819
702
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
@@ -821,18 +704,18 @@ registerAction2(class extends Action2 {
|
|
|
821
704
|
enum: ['always', 'once', 'never'],
|
|
822
705
|
enumDescriptions: [
|
|
823
706
|
( localizeWithPath(
|
|
824
|
-
|
|
825
|
-
|
|
707
|
+
_moduleId,
|
|
708
|
+
53,
|
|
826
709
|
"Ask for trust every time an untrusted workspace is opened."
|
|
827
710
|
)),
|
|
828
711
|
( localizeWithPath(
|
|
829
|
-
|
|
830
|
-
|
|
712
|
+
_moduleId,
|
|
713
|
+
54,
|
|
831
714
|
"Ask for trust the first time an untrusted workspace is opened."
|
|
832
715
|
)),
|
|
833
716
|
( localizeWithPath(
|
|
834
|
-
|
|
835
|
-
|
|
717
|
+
_moduleId,
|
|
718
|
+
55,
|
|
836
719
|
"Do not ask for trust when an untrusted workspace is opened."
|
|
837
720
|
)),
|
|
838
721
|
]
|
|
@@ -840,28 +723,24 @@ registerAction2(class extends Action2 {
|
|
|
840
723
|
[WORKSPACE_TRUST_BANNER]: {
|
|
841
724
|
type: 'string',
|
|
842
725
|
default: 'untilDismissed',
|
|
843
|
-
description: ( localizeWithPath(
|
|
844
|
-
'vs/workbench/contrib/workspace/browser/workspace.contribution',
|
|
845
|
-
'workspace.trust.banner.description',
|
|
846
|
-
"Controls when the restricted mode banner is shown."
|
|
847
|
-
)),
|
|
726
|
+
description: ( localizeWithPath(_moduleId, 56, "Controls when the restricted mode banner is shown.")),
|
|
848
727
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
849
728
|
scope: 1 ,
|
|
850
729
|
enum: ['always', 'untilDismissed', 'never'],
|
|
851
730
|
enumDescriptions: [
|
|
852
731
|
( localizeWithPath(
|
|
853
|
-
|
|
854
|
-
|
|
732
|
+
_moduleId,
|
|
733
|
+
57,
|
|
855
734
|
"Show the banner every time an untrusted workspace is open."
|
|
856
735
|
)),
|
|
857
736
|
( localizeWithPath(
|
|
858
|
-
|
|
859
|
-
|
|
737
|
+
_moduleId,
|
|
738
|
+
58,
|
|
860
739
|
"Show the banner when an untrusted workspace is opened until dismissed."
|
|
861
740
|
)),
|
|
862
741
|
( localizeWithPath(
|
|
863
|
-
|
|
864
|
-
|
|
742
|
+
_moduleId,
|
|
743
|
+
59,
|
|
865
744
|
"Do not show the banner when an untrusted workspace is open."
|
|
866
745
|
)),
|
|
867
746
|
]
|
|
@@ -870,8 +749,8 @@ registerAction2(class extends Action2 {
|
|
|
870
749
|
type: 'string',
|
|
871
750
|
default: 'prompt',
|
|
872
751
|
markdownDescription: ( localizeWithPath(
|
|
873
|
-
|
|
874
|
-
|
|
752
|
+
_moduleId,
|
|
753
|
+
60,
|
|
875
754
|
"Controls how to handle opening untrusted files in a trusted workspace. This setting also applies to opening files in an empty window which is trusted via `#{0}#`.",
|
|
876
755
|
WORKSPACE_TRUST_EMPTY_WINDOW
|
|
877
756
|
)),
|
|
@@ -880,18 +759,18 @@ registerAction2(class extends Action2 {
|
|
|
880
759
|
enum: ['prompt', 'open', 'newWindow'],
|
|
881
760
|
enumDescriptions: [
|
|
882
761
|
( localizeWithPath(
|
|
883
|
-
|
|
884
|
-
|
|
762
|
+
_moduleId,
|
|
763
|
+
61,
|
|
885
764
|
"Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."
|
|
886
765
|
)),
|
|
887
766
|
( localizeWithPath(
|
|
888
|
-
|
|
889
|
-
|
|
767
|
+
_moduleId,
|
|
768
|
+
62,
|
|
890
769
|
"Always allow untrusted files to be introduced to a trusted workspace without prompting."
|
|
891
770
|
)),
|
|
892
771
|
( localizeWithPath(
|
|
893
|
-
|
|
894
|
-
|
|
772
|
+
_moduleId,
|
|
773
|
+
63,
|
|
895
774
|
"Always open untrusted files in a separate window in restricted mode without prompting."
|
|
896
775
|
)),
|
|
897
776
|
]
|
|
@@ -900,8 +779,8 @@ registerAction2(class extends Action2 {
|
|
|
900
779
|
type: 'boolean',
|
|
901
780
|
default: true,
|
|
902
781
|
markdownDescription: ( localizeWithPath(
|
|
903
|
-
|
|
904
|
-
|
|
782
|
+
_moduleId,
|
|
783
|
+
64,
|
|
905
784
|
"Controls whether or not the empty window is trusted by default within VS Code. When used with `#{0}#`, you can enable the full functionality of VS Code without prompting in an empty window.",
|
|
906
785
|
WORKSPACE_TRUST_UNTRUSTED_FILES
|
|
907
786
|
)),
|
|
@@ -968,14 +847,14 @@ let WorkspaceTrustTelemetryContribution = class WorkspaceTrustTelemetryContribut
|
|
|
968
847
|
}
|
|
969
848
|
}
|
|
970
849
|
};
|
|
971
|
-
WorkspaceTrustTelemetryContribution = ( __decorate([
|
|
972
|
-
( __param(0, IWorkbenchEnvironmentService)),
|
|
973
|
-
( __param(1, ITelemetryService)),
|
|
974
|
-
( __param(2, IWorkspaceContextService)),
|
|
975
|
-
( __param(3, IWorkspaceTrustEnablementService)),
|
|
976
|
-
( __param(4, IWorkspaceTrustManagementService))
|
|
977
|
-
], WorkspaceTrustTelemetryContribution));
|
|
978
|
-
( Registry.as(Extensions.Workbench))
|
|
850
|
+
WorkspaceTrustTelemetryContribution = ( (__decorate([
|
|
851
|
+
( (__param(0, IWorkbenchEnvironmentService))),
|
|
852
|
+
( (__param(1, ITelemetryService))),
|
|
853
|
+
( (__param(2, IWorkspaceContextService))),
|
|
854
|
+
( (__param(3, IWorkspaceTrustEnablementService))),
|
|
855
|
+
( (__param(4, IWorkspaceTrustManagementService)))
|
|
856
|
+
], WorkspaceTrustTelemetryContribution)));
|
|
857
|
+
( (Registry.as(Extensions.Workbench)))
|
|
979
858
|
.registerWorkbenchContribution(WorkspaceTrustTelemetryContribution, 3 );
|
|
980
859
|
|
|
981
860
|
export { WorkspaceTrustContextKeys, WorkspaceTrustRequestHandler, WorkspaceTrustUXHandler };
|