@codingame/monaco-vscode-workspace-trust-service-override 9.0.2 → 10.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-workspace-trust-service-override",
3
- "version": "9.0.2",
3
+ "version": "10.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@9.0.2"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.0"
30
30
  }
31
31
  }
@@ -4,21 +4,18 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
4
4
  import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
5
5
  import { localize, localize2 } from 'vscode/vscode/vs/nls';
6
6
  import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
7
- import { Extensions as Extensions$1, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
7
+ import { Extensions as Extensions$1 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
8
8
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
9
9
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
10
10
  import 'vscode/vscode/vs/platform/notification/common/notification';
11
11
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
12
- import { WorkspaceTrustUriResponse } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust';
13
12
  import { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust.service';
14
- import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
15
- import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
13
+ import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
16
14
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
17
15
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
18
16
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
19
17
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
20
18
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
21
- import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
22
19
  import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
23
20
  import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
24
21
  import { shieldIcon, WorkspaceTrustEditor } from './workspaceTrustEditor.js';
@@ -26,12 +23,11 @@ import { WorkspaceTrustEditorInput } from '../../../services/workspaces/browser/
26
23
  import { WORKSPACE_TRUST_STARTUP_PROMPT, WORKSPACE_TRUST_BANNER, WORKSPACE_TRUST_ENABLED, WORKSPACE_TRUST_UNTRUSTED_FILES, WORKSPACE_TRUST_EMPTY_WINDOW } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceTrust';
27
24
  import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
28
25
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
29
- import { isSingleFolderWorkspaceIdentifier, toWorkspaceIdentifier, WorkbenchState, isEmptyWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
26
+ import { isSingleFolderWorkspaceIdentifier, toWorkspaceIdentifier, isEmptyWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
30
27
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
31
28
  import { resolve, dirname as dirname$1 } from 'vscode/vscode/vs/base/common/path';
32
29
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
33
30
  import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
34
- import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
35
31
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
36
32
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
37
33
  import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/browser/bannerService.service';
@@ -40,7 +36,6 @@ import { LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID } from 'vscode/vscode/
40
36
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
41
37
  import { WORKSPACE_TRUST_SETTING_TAG } from 'vscode/vscode/vs/workbench/contrib/preferences/common/preferences';
42
38
  import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
43
- import { Verbosity } from 'vscode/vscode/vs/platform/label/common/label';
44
39
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
45
40
  import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
46
41
  import { WorkspaceTrustContext, MANAGE_TRUST_COMMAND_ID } from 'vscode/vscode/vs/workbench/contrib/workspace/common/workspace';
@@ -71,7 +66,7 @@ WorkspaceTrustContextKeys = ( (__decorate([
71
66
  ( (__param(1, IWorkspaceTrustEnablementService))),
72
67
  ( (__param(2, IWorkspaceTrustManagementService)))
73
68
  ], WorkspaceTrustContextKeys)));
74
- ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustContextKeys, LifecyclePhase.Restored);
69
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustContextKeys, 3 );
75
70
  let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Disposable {
76
71
  static { this.ID = 'workbench.contrib.workspaceTrustRequestHandler'; }
77
72
  constructor(dialogService, commandService, workspaceContextService, workspaceTrustManagementService, workspaceTrustRequestService) {
@@ -90,40 +85,40 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
90
85
  this._register(this.workspaceTrustRequestService.onDidInitiateOpenFilesTrustRequest(async () => {
91
86
  await this.workspaceTrustManagementService.workspaceResolved;
92
87
  const markdownDetails = [
93
- this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ?
88
+ this.workspaceContextService.getWorkbenchState() !== 1 ?
94
89
  ( localize(
95
- 3185,
90
+ 3224,
96
91
  "You are trying to open untrusted files in a workspace which is trusted."
97
92
  )) :
98
93
  ( localize(
99
- 3186,
94
+ 3225,
100
95
  "You are trying to open untrusted files in a window which is trusted."
101
96
  )),
102
97
  ( localize(
103
- 3187,
98
+ 3226,
104
99
  "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."
105
100
  ))
106
101
  ];
107
102
  await this.dialogService.prompt({
108
103
  type: Severity$1.Info,
109
- message: this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ?
110
- ( localize(3188, "Do you want to allow untrusted files in this workspace?")) :
111
- ( localize(3189, "Do you want to allow untrusted files in this window?")),
104
+ message: this.workspaceContextService.getWorkbenchState() !== 1 ?
105
+ ( localize(3227, "Do you want to allow untrusted files in this workspace?")) :
106
+ ( localize(3228, "Do you want to allow untrusted files in this window?")),
112
107
  buttons: [
113
108
  {
114
- label: ( localize(3190, "&&Open")),
115
- run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(WorkspaceTrustUriResponse.Open, !!checkboxChecked)
109
+ label: ( localize(3229, "&&Open")),
110
+ run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(1 , !!checkboxChecked)
116
111
  },
117
112
  {
118
- label: ( localize(3191, "Open in &&Restricted Mode")),
119
- run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(WorkspaceTrustUriResponse.OpenInNewWindow, !!checkboxChecked)
113
+ label: ( localize(3230, "Open in &&Restricted Mode")),
114
+ run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(2 , !!checkboxChecked)
120
115
  }
121
116
  ],
122
117
  cancelButton: {
123
- run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(WorkspaceTrustUriResponse.Cancel)
118
+ run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(3 )
124
119
  },
125
120
  checkbox: {
126
- label: ( localize(3192, "Remember my decision for all workspaces")),
121
+ label: ( localize(3231, "Remember my decision for all workspaces")),
127
122
  checked: false
128
123
  },
129
124
  custom: {
@@ -135,19 +130,19 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
135
130
  this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async (requestOptions) => {
136
131
  await this.workspaceTrustManagementService.workspaceResolved;
137
132
  const message = this.useWorkspaceLanguage ?
138
- ( localize(3193, "Do you trust the authors of the files in this workspace?")) :
139
- ( localize(3194, "Do you trust the authors of the files in this folder?"));
133
+ ( localize(3232, "Do you trust the authors of the files in this workspace?")) :
134
+ ( localize(3233, "Do you trust the authors of the files in this folder?"));
140
135
  const defaultDetails = ( localize(
141
- 3195,
136
+ 3234,
142
137
  "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."
143
138
  ));
144
139
  const details = requestOptions?.message ?? defaultDetails;
145
140
  const buttons = requestOptions?.buttons ?? [
146
- { label: this.useWorkspaceLanguage ? ( localize(3196, "&&Trust Workspace & Continue")) : ( localize(3197, "&&Trust Folder & Continue")), type: 'ContinueWithTrust' },
147
- { label: ( localize(3198, "&&Manage")), type: 'Manage' }
141
+ { label: this.useWorkspaceLanguage ? ( localize(3235, "&&Trust Workspace & Continue")) : ( localize(3236, "&&Trust Folder & Continue")), type: 'ContinueWithTrust' },
142
+ { label: ( localize(3237, "&&Manage")), type: 'Manage' }
148
143
  ];
149
144
  if (!( (buttons.some(b => b.type === 'Cancel')))) {
150
- buttons.push({ label: ( localize(3199, "Cancel")), type: 'Cancel' });
145
+ buttons.push({ label: ( localize(3238, "Cancel")), type: 'Cancel' });
151
146
  }
152
147
  const { result } = await this.dialogService.prompt({
153
148
  type: Severity$1.Info,
@@ -157,7 +152,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
157
152
  markdownDetails: [
158
153
  { markdown: ( (new MarkdownString(details))) },
159
154
  { markdown: ( (new MarkdownString(( localize(
160
- 3200,
155
+ 3239,
161
156
  "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."
162
157
  ))))) }
163
158
  ]
@@ -258,12 +253,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
258
253
  if (!( (addedFoldersTrustInfo.map(info => info.trusted))).every(trusted => trusted)) {
259
254
  const { confirmed } = await this.dialogService.confirm({
260
255
  type: Severity$1.Info,
261
- message: ( localize(3201, "Do you trust the authors of the files in this folder?")),
256
+ message: ( localize(3240, "Do you trust the authors of the files in this folder?")),
262
257
  detail: ( localize(
263
- 3202,
258
+ 3241,
264
259
  "You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"
265
260
  )),
266
- cancelButton: ( localize(3203, 'No')),
261
+ cancelButton: ( localize(3242, 'No')),
267
262
  custom: { icon: Codicon.shield }
268
263
  });
269
264
  await this.workspaceTrustManagementService.setUrisTrust(( (addedFoldersTrustInfo.map(i => i.uri))), confirmed);
@@ -291,34 +286,34 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
291
286
  console.warn('AI generated workspace trust dialog contents not available.');
292
287
  }
293
288
  const title = titleString ?? (this.useWorkspaceLanguage ?
294
- ( localize(3193, "Do you trust the authors of the files in this workspace?")) :
295
- ( localize(3194, "Do you trust the authors of the files in this folder?")));
289
+ ( localize(3232, "Do you trust the authors of the files in this workspace?")) :
290
+ ( localize(3233, "Do you trust the authors of the files in this folder?")));
296
291
  let checkboxText;
297
292
  const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
298
293
  const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
299
294
  const isEmptyWindow = isEmptyWorkspaceIdentifier(workspaceIdentifier);
300
295
  if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
301
296
  const name = basename(dirname(workspaceIdentifier.uri));
302
- checkboxText = ( localize(3204, "Trust the authors of all files in the parent folder '{0}'", name));
297
+ checkboxText = ( localize(3243, "Trust the authors of all files in the parent folder '{0}'", name));
303
298
  }
304
- this.doShowModal(title, { label: trustOption ?? ( localize(3205, "&&Yes, I trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(3206, "Trust folder and enable all features")) : ( localize(3207, "Trust workspace and enable all features")) }, { label: dontTrustOption ?? ( localize(3208, "&&No, I don't trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(3209, "Browse folder in restricted mode")) : ( localize(3210, "Browse workspace in restricted mode")) }, [
299
+ this.doShowModal(title, { label: trustOption ?? ( localize(3244, "&&Yes, I trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(3245, "Trust folder and enable all features")) : ( localize(3246, "Trust workspace and enable all features")) }, { label: dontTrustOption ?? ( localize(3247, "&&No, I don't trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(3248, "Browse folder in restricted mode")) : ( localize(3249, "Browse workspace in restricted mode")) }, [
305
300
  !isSingleFolderWorkspace ?
306
301
  ( localize(
307
- 3211,
302
+ 3250,
308
303
  "{0} provides features that may automatically execute files in this workspace.",
309
304
  this.productService.nameShort
310
305
  )) :
311
306
  ( localize(
312
- 3212,
307
+ 3251,
313
308
  "{0} provides features that may automatically execute files in this folder.",
314
309
  this.productService.nameShort
315
310
  )),
316
311
  learnMoreString ?? ( localize(
317
- 3213,
312
+ 3252,
318
313
  "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."
319
314
  )),
320
315
  !isEmptyWindow ?
321
- `\`${this.labelService.getWorkspaceLabel(workspaceIdentifier, { verbose: Verbosity.LONG })}\`` : '',
316
+ `\`${this.labelService.getWorkspaceLabel(workspaceIdentifier, { verbose: 2 })}\`` : '',
322
317
  ], checkboxText);
323
318
  }));
324
319
  }
@@ -371,7 +366,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
371
366
  markdownDetails: ( (markdownStrings.map(md => { return { markdown: ( (new MarkdownString(md))) }; })))
372
367
  }
373
368
  });
374
- this.storageService.store(STARTUP_PROMPT_SHOWN_KEY, true, StorageScope.WORKSPACE, StorageTarget.MACHINE);
369
+ this.storageService.store(STARTUP_PROMPT_SHOWN_KEY, true, 1 , 1 );
375
370
  }
376
371
  async showModalOnStart() {
377
372
  if (this.workspaceTrustManagementService.isWorkspaceTrusted()) {
@@ -385,7 +380,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
385
380
  this.updateWorkbenchIndicators(false);
386
381
  return;
387
382
  }
388
- if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY) {
383
+ if (this.workspaceContextService.getWorkbenchState() === 1 ) {
389
384
  this.updateWorkbenchIndicators(false);
390
385
  return;
391
386
  }
@@ -393,7 +388,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
393
388
  this.updateWorkbenchIndicators(false);
394
389
  return;
395
390
  }
396
- if (this.startupPromptSetting === 'once' && this.storageService.getBoolean(STARTUP_PROMPT_SHOWN_KEY, StorageScope.WORKSPACE, false)) {
391
+ if (this.startupPromptSetting === 'once' && this.storageService.getBoolean(STARTUP_PROMPT_SHOWN_KEY, 1 , false)) {
397
392
  this.updateWorkbenchIndicators(false);
398
393
  return;
399
394
  }
@@ -423,7 +418,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
423
418
  });
424
419
  }
425
420
  getBannerItem(restrictedMode) {
426
- const dismissedRestricted = this.storageService.getBoolean(BANNER_RESTRICTED_MODE_DISMISSED_KEY, StorageScope.WORKSPACE, false);
421
+ const dismissedRestricted = this.storageService.getBoolean(BANNER_RESTRICTED_MODE_DISMISSED_KEY, 1 , false);
427
422
  if (this.bannerSetting === 'never') {
428
423
  return undefined;
429
424
  }
@@ -432,11 +427,11 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
432
427
  }
433
428
  const actions = [
434
429
  {
435
- label: ( localize(3214, "Manage")),
430
+ label: ( localize(3253, "Manage")),
436
431
  href: 'command:' + MANAGE_TRUST_COMMAND_ID
437
432
  },
438
433
  {
439
- label: ( localize(3215, "Learn More")),
434
+ label: ( localize(3254, "Learn More")),
440
435
  href: 'https://aka.ms/vscode-workspace-trust'
441
436
  }
442
437
  ];
@@ -448,45 +443,45 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
448
443
  actions,
449
444
  onClose: () => {
450
445
  if (restrictedMode) {
451
- this.storageService.store(BANNER_RESTRICTED_MODE_DISMISSED_KEY, true, StorageScope.WORKSPACE, StorageTarget.MACHINE);
446
+ this.storageService.store(BANNER_RESTRICTED_MODE_DISMISSED_KEY, true, 1 , 1 );
452
447
  }
453
448
  }
454
449
  };
455
450
  }
456
451
  getBannerItemAriaLabels() {
457
452
  switch (this.workspaceContextService.getWorkbenchState()) {
458
- case WorkbenchState.EMPTY:
453
+ case 1 :
459
454
  return ( localize(
460
- 3216,
455
+ 3255,
461
456
  "Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."
462
457
  ));
463
- case WorkbenchState.FOLDER:
458
+ case 2 :
464
459
  return ( localize(
465
- 3217,
460
+ 3256,
466
461
  "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."
467
462
  ));
468
- case WorkbenchState.WORKSPACE:
463
+ case 3 :
469
464
  return ( localize(
470
- 3218,
465
+ 3257,
471
466
  "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."
472
467
  ));
473
468
  }
474
469
  }
475
470
  getBannerItemMessages() {
476
471
  switch (this.workspaceContextService.getWorkbenchState()) {
477
- case WorkbenchState.EMPTY:
472
+ case 1 :
478
473
  return ( localize(
479
- 3219,
474
+ 3258,
480
475
  "Restricted Mode is intended for safe code browsing. Trust this window to enable all features."
481
476
  ));
482
- case WorkbenchState.FOLDER:
477
+ case 2 :
483
478
  return ( localize(
484
- 3220,
479
+ 3259,
485
480
  "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."
486
481
  ));
487
- case WorkbenchState.WORKSPACE:
482
+ case 3 :
488
483
  return ( localize(
489
- 3221,
484
+ 3260,
490
485
  "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."
491
486
  ));
492
487
  }
@@ -502,14 +497,14 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
502
497
  let ariaLabel = '';
503
498
  let toolTip;
504
499
  switch (this.workspaceContextService.getWorkbenchState()) {
505
- case WorkbenchState.EMPTY: {
500
+ case 1 : {
506
501
  ariaLabel = ( localize(
507
- 3222,
502
+ 3261,
508
503
  "Restricted Mode: Some features are disabled because this window is not trusted."
509
504
  ));
510
505
  toolTip = {
511
506
  value: ( localize(
512
- 3223,
507
+ 3262,
513
508
  "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
514
509
  `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
515
510
  `command:${MANAGE_TRUST_COMMAND_ID}`
@@ -519,14 +514,14 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
519
514
  };
520
515
  break;
521
516
  }
522
- case WorkbenchState.FOLDER: {
517
+ case 2 : {
523
518
  ariaLabel = ( localize(
524
- 3224,
519
+ 3263,
525
520
  "Restricted Mode: Some features are disabled because this folder is not trusted."
526
521
  ));
527
522
  toolTip = {
528
523
  value: ( localize(
529
- 3225,
524
+ 3264,
530
525
  "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
531
526
  `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
532
527
  `command:${MANAGE_TRUST_COMMAND_ID}`
@@ -536,14 +531,14 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
536
531
  };
537
532
  break;
538
533
  }
539
- case WorkbenchState.WORKSPACE: {
534
+ case 3 : {
540
535
  ariaLabel = ( localize(
541
- 3226,
536
+ 3265,
542
537
  "Restricted Mode: Some features are disabled because this workspace is not trusted."
543
538
  ));
544
539
  toolTip = {
545
540
  value: ( localize(
546
- 3227,
541
+ 3266,
547
542
  "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
548
543
  `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
549
544
  `command:${MANAGE_TRUST_COMMAND_ID}`
@@ -555,8 +550,8 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
555
550
  }
556
551
  }
557
552
  return {
558
- name: ( localize(3228, "Workspace Trust")),
559
- text: `$(shield) ${( localize(3229, "Restricted Mode"))}`,
553
+ name: ( localize(3267, "Workspace Trust")),
554
+ text: `$(shield) ${( localize(3268, "Restricted Mode"))}`,
560
555
  ariaLabel: ariaLabel,
561
556
  tooltip: toolTip,
562
557
  command: MANAGE_TRUST_COMMAND_ID,
@@ -570,7 +565,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
570
565
  }
571
566
  if (!trusted && !this.statusbarEntryAccessor.value) {
572
567
  const entry = this.getRestrictedModeStatusbarEntry();
573
- this.statusbarEntryAccessor.value = this.statusbarService.addEntry(entry, this.entryId, StatusbarAlignment.LEFT, 0.99 * Number.MAX_VALUE );
568
+ this.statusbarEntryAccessor.value = this.statusbarService.addEntry(entry, this.entryId, 0 , 0.99 * Number.MAX_VALUE );
574
569
  }
575
570
  }
576
571
  };
@@ -591,8 +586,8 @@ WorkspaceTrustUXHandler = ( (__decorate([
591
586
  ( (__param(13, IEnvironmentService))),
592
587
  ( (__param(14, IFileService)))
593
588
  ], WorkspaceTrustUXHandler)));
594
- registerWorkbenchContribution2(WorkspaceTrustRequestHandler.ID, WorkspaceTrustRequestHandler, WorkbenchPhase.BlockRestore);
595
- ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustUXHandler, LifecyclePhase.Restored);
589
+ registerWorkbenchContribution2(WorkspaceTrustRequestHandler.ID, WorkspaceTrustRequestHandler, 2 );
590
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspaceTrustUXHandler, 3 );
596
591
  class WorkspaceTrustEditorInputSerializer {
597
592
  canSerialize(editorInput) {
598
593
  return true;
@@ -606,16 +601,16 @@ class WorkspaceTrustEditorInputSerializer {
606
601
  }
607
602
  ( (Registry.as(EditorExtensions.EditorFactory)))
608
603
  .registerEditorSerializer(WorkspaceTrustEditorInput.ID, WorkspaceTrustEditorInputSerializer);
609
- ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(3230, "Workspace Trust Editor"))), [
604
+ ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(3269, "Workspace Trust Editor"))), [
610
605
  ( (new SyncDescriptor(WorkspaceTrustEditorInput)))
611
606
  ]);
612
607
  const CONFIGURE_TRUST_COMMAND_ID = 'workbench.trust.configure';
613
- const WORKSPACES_CATEGORY = ( localize2(3231, 'Workspaces'));
608
+ const WORKSPACES_CATEGORY = ( localize2(3270, 'Workspaces'));
614
609
  registerAction2(class extends Action2 {
615
610
  constructor() {
616
611
  super({
617
612
  id: CONFIGURE_TRUST_COMMAND_ID,
618
- title: ( localize2(3232, "Configure Workspace Trust Settings")),
613
+ title: ( localize2(3271, "Configure Workspace Trust Settings")),
619
614
  precondition: ( (ContextKeyExpr.and(
620
615
  WorkspaceTrustContext.IsEnabled,
621
616
  (ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
@@ -632,7 +627,7 @@ registerAction2(class extends Action2 {
632
627
  constructor() {
633
628
  super({
634
629
  id: MANAGE_TRUST_COMMAND_ID,
635
- title: ( localize2(3233, "Manage Workspace Trust")),
630
+ title: ( localize2(3272, "Manage Workspace Trust")),
636
631
  precondition: ( (ContextKeyExpr.and(
637
632
  WorkspaceTrustContext.IsEnabled,
638
633
  (ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
@@ -656,61 +651,61 @@ registerAction2(class extends Action2 {
656
651
  [WORKSPACE_TRUST_ENABLED]: {
657
652
  type: 'boolean',
658
653
  default: true,
659
- description: ( localize(3234, "Controls whether or not Workspace Trust is enabled within VS Code.")),
654
+ description: ( localize(3273, "Controls whether or not Workspace Trust is enabled within VS Code.")),
660
655
  tags: [WORKSPACE_TRUST_SETTING_TAG],
661
- scope: ConfigurationScope.APPLICATION,
656
+ scope: 1 ,
662
657
  },
663
658
  [WORKSPACE_TRUST_STARTUP_PROMPT]: {
664
659
  type: 'string',
665
660
  default: 'once',
666
- description: ( localize(3235, "Controls when the startup prompt to trust a workspace is shown.")),
661
+ description: ( localize(3274, "Controls when the startup prompt to trust a workspace is shown.")),
667
662
  tags: [WORKSPACE_TRUST_SETTING_TAG],
668
- scope: ConfigurationScope.APPLICATION,
663
+ scope: 1 ,
669
664
  enum: ['always', 'once', 'never'],
670
665
  enumDescriptions: [
671
- ( localize(3236, "Ask for trust every time an untrusted workspace is opened.")),
672
- ( localize(3237, "Ask for trust the first time an untrusted workspace is opened.")),
673
- ( localize(3238, "Do not ask for trust when an untrusted workspace is opened.")),
666
+ ( localize(3275, "Ask for trust every time an untrusted workspace is opened.")),
667
+ ( localize(3276, "Ask for trust the first time an untrusted workspace is opened.")),
668
+ ( localize(3277, "Do not ask for trust when an untrusted workspace is opened.")),
674
669
  ]
675
670
  },
676
671
  [WORKSPACE_TRUST_BANNER]: {
677
672
  type: 'string',
678
673
  default: 'untilDismissed',
679
- description: ( localize(3239, "Controls when the restricted mode banner is shown.")),
674
+ description: ( localize(3278, "Controls when the restricted mode banner is shown.")),
680
675
  tags: [WORKSPACE_TRUST_SETTING_TAG],
681
- scope: ConfigurationScope.APPLICATION,
676
+ scope: 1 ,
682
677
  enum: ['always', 'untilDismissed', 'never'],
683
678
  enumDescriptions: [
684
- ( localize(3240, "Show the banner every time an untrusted workspace is open.")),
679
+ ( localize(3279, "Show the banner every time an untrusted workspace is open.")),
685
680
  ( localize(
686
- 3241,
681
+ 3280,
687
682
  "Show the banner when an untrusted workspace is opened until dismissed."
688
683
  )),
689
- ( localize(3242, "Do not show the banner when an untrusted workspace is open.")),
684
+ ( localize(3281, "Do not show the banner when an untrusted workspace is open.")),
690
685
  ]
691
686
  },
692
687
  [WORKSPACE_TRUST_UNTRUSTED_FILES]: {
693
688
  type: 'string',
694
689
  default: 'prompt',
695
690
  markdownDescription: ( localize(
696
- 3243,
691
+ 3282,
697
692
  "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}#`.",
698
693
  WORKSPACE_TRUST_EMPTY_WINDOW
699
694
  )),
700
695
  tags: [WORKSPACE_TRUST_SETTING_TAG],
701
- scope: ConfigurationScope.APPLICATION,
696
+ scope: 1 ,
702
697
  enum: ['prompt', 'open', 'newWindow'],
703
698
  enumDescriptions: [
704
699
  ( localize(
705
- 3244,
700
+ 3283,
706
701
  "Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."
707
702
  )),
708
703
  ( localize(
709
- 3245,
704
+ 3284,
710
705
  "Always allow untrusted files to be introduced to a trusted workspace without prompting."
711
706
  )),
712
707
  ( localize(
713
- 3246,
708
+ 3285,
714
709
  "Always open untrusted files in a separate window in restricted mode without prompting."
715
710
  )),
716
711
  ]
@@ -719,12 +714,12 @@ registerAction2(class extends Action2 {
719
714
  type: 'boolean',
720
715
  default: true,
721
716
  markdownDescription: ( localize(
722
- 3247,
717
+ 3286,
723
718
  "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.",
724
719
  WORKSPACE_TRUST_UNTRUSTED_FILES
725
720
  )),
726
721
  tags: [WORKSPACE_TRUST_SETTING_TAG],
727
- scope: ConfigurationScope.APPLICATION
722
+ scope: 1
728
723
  }
729
724
  }
730
725
  });
@@ -794,6 +789,6 @@ WorkspaceTrustTelemetryContribution = ( (__decorate([
794
789
  ( (__param(4, IWorkspaceTrustManagementService)))
795
790
  ], WorkspaceTrustTelemetryContribution)));
796
791
  ( (Registry.as(Extensions.Workbench)))
797
- .registerWorkbenchContribution(WorkspaceTrustTelemetryContribution, LifecyclePhase.Restored);
792
+ .registerWorkbenchContribution(WorkspaceTrustTelemetryContribution, 3 );
798
793
 
799
794
  export { WorkspaceTrustContextKeys, WorkspaceTrustRequestHandler, WorkspaceTrustUXHandler };
@@ -2,21 +2,19 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { $, addDisposableListener, EventType, EventHelper, addStandardDisposableListener, clearNode, append, isAncestorOfActiveElement } from 'vscode/vscode/vs/base/browser/dom';
3
3
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
4
4
  import { ButtonBar } from 'vscode/vscode/vs/base/browser/ui/button/button';
5
- import { MessageType, InputBox } from 'vscode/vscode/vs/base/browser/ui/inputbox/inputBox';
5
+ import { InputBox } from 'vscode/vscode/vs/base/browser/ui/inputbox/inputBox';
6
6
  import { DomScrollableElement } from 'vscode/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
7
7
  import { Action } from 'vscode/vscode/vs/base/common/actions';
8
8
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
9
9
  import { debounce } from 'vscode/vscode/vs/base/common/decorators';
10
10
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
11
- import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
12
11
  import { normalizeDriveLetter } from 'vscode/vscode/vs/base/common/labels';
13
12
  import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
14
13
  import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
15
14
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
16
- import { ScrollbarVisibility } from 'vscode/vscode/vs/base/common/scrollable';
17
15
  import { URI } from 'vscode/vscode/vs/base/common/uri';
18
16
  import { localize } from 'vscode/vscode/vs/nls';
19
- import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
17
+ import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
20
18
  import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
21
19
  import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
22
20
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
@@ -38,7 +36,7 @@ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
38
36
  import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
39
37
  import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
40
38
  import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
41
- import { WorkbenchState, toWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
39
+ import { toWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
42
40
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
43
41
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
44
42
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
@@ -51,7 +49,6 @@ import { IWorkbenchConfigurationService } from 'vscode/vscode/vs/workbench/servi
51
49
  import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
52
50
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
53
51
  import { getExtensionDependencies } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
54
- import { EnablementState } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
55
52
  import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
56
53
  import { posix, win32 } from 'vscode/vscode/vs/base/common/path';
57
54
  import { hasDriveLetter, toSlashes } from 'vscode/vscode/vs/base/common/extpath';
@@ -64,12 +61,12 @@ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/
64
61
  import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
65
62
 
66
63
  var TrustedUriActionsColumnRenderer_1, TrustedUriPathColumnRenderer_1, TrustedUriHostColumnRenderer_1, WorkspaceTrustEditor_1;
67
- const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(7559, 'Icon for workspace trust ion the banner.')));
68
- const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(7560, 'Icon for the checkmark in the workspace trust editor.')));
69
- const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(7561, 'Icon for the cross in the workspace trust editor.')));
70
- const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(7562, 'Icon for the pick folder icon in the workspace trust editor.')));
71
- const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(7563, 'Icon for the edit folder icon in the workspace trust editor.')));
72
- const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(7564, 'Icon for the remove folder icon in the workspace trust editor.')));
64
+ const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(7614, 'Icon for workspace trust ion the banner.')));
65
+ const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(7615, 'Icon for the checkmark in the workspace trust editor.')));
66
+ const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(7616, 'Icon for the cross in the workspace trust editor.')));
67
+ const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(7617, 'Icon for the pick folder icon in the workspace trust editor.')));
68
+ const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(7618, 'Icon for the edit folder icon in the workspace trust editor.')));
69
+ const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(7619, 'Icon for the remove folder icon in the workspace trust editor.')));
73
70
  let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
74
71
  constructor(container, instantiationService, workspaceService, workspaceTrustManagementService, uriService, labelService, fileDialogService) {
75
72
  super();
@@ -93,14 +90,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
93
90
  const addButtonBarElement = container.appendChild($('.trusted-uris-button-bar'));
94
91
  this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( (new TrustedUriTableVirtualDelegate())), [
95
92
  {
96
- label: ( localize(7565, "Host")),
93
+ label: ( localize(7620, "Host")),
97
94
  tooltip: '',
98
95
  weight: 1,
99
96
  templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
100
97
  project(row) { return row; }
101
98
  },
102
99
  {
103
- label: ( localize(7566, "Path")),
100
+ label: ( localize(7621, "Path")),
104
101
  tooltip: '',
105
102
  weight: 8,
106
103
  templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
@@ -128,16 +125,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
128
125
  getAriaLabel: (item) => {
129
126
  const hostLabel = getHostLabel(this.labelService, item);
130
127
  if (hostLabel === undefined || hostLabel.length === 0) {
131
- return ( localize(7567, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
128
+ return ( localize(7622, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
132
129
  }
133
130
  return ( localize(
134
- 7568,
131
+ 7623,
135
132
  "{0} on {1}, trusted",
136
133
  this.labelService.getUriLabel(item.uri),
137
134
  hostLabel
138
135
  ));
139
136
  },
140
- getWidgetAriaLabel: () => ( localize(7569, "Trusted Folders & Workspaces"))
137
+ getWidgetAriaLabel: () => ( localize(7624, "Trusted Folders & Workspaces"))
141
138
  },
142
139
  identityProvider: {
143
140
  getId(element) {
@@ -153,16 +150,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
153
150
  }
154
151
  }));
155
152
  const buttonBar = this._register(( (new ButtonBar(addButtonBarElement))));
156
- const addButton = this._register(buttonBar.addButton({ title: ( localize(7570, "Add Folder")), ...defaultButtonStyles }));
157
- addButton.label = ( localize(7570, "Add Folder"));
153
+ const addButton = this._register(buttonBar.addButton({ title: ( localize(7625, "Add Folder")), ...defaultButtonStyles }));
154
+ addButton.label = ( localize(7625, "Add Folder"));
158
155
  this._register(addButton.onDidClick(async () => {
159
156
  const uri = await this.fileDialogService.showOpenDialog({
160
157
  canSelectFiles: false,
161
158
  canSelectFolders: true,
162
159
  canSelectMany: false,
163
160
  defaultUri: this.currentWorkspaceUri,
164
- openLabel: ( localize(7571, "Trust Folder")),
165
- title: ( localize(7572, "Select Folder To Trust"))
161
+ openLabel: ( localize(7626, "Trust Folder")),
162
+ title: ( localize(7627, "Select Folder To Trust"))
166
163
  });
167
164
  if (uri) {
168
165
  this.workspaceTrustManagementService.setUrisTrust(uri, true);
@@ -243,10 +240,10 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
243
240
  this.container.classList.toggle('empty', entries.length === 0);
244
241
  this.descriptionElement.innerText = entries.length ?
245
242
  ( localize(
246
- 7573,
243
+ 7628,
247
244
  "You trust the following folders, their subfolders, and workspace files."
248
245
  )) :
249
- ( localize(7574, "You haven't trusted any folders or workspace files yet."));
246
+ ( localize(7629, "You haven't trusted any folders or workspace files yet."));
250
247
  this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
251
248
  this.layout();
252
249
  }
@@ -258,9 +255,9 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
258
255
  const segments = path.split(posix.sep).filter(s => s.length);
259
256
  if (segments.length === 0 && path.startsWith(posix.sep)) {
260
257
  return {
261
- type: MessageType.WARNING,
258
+ type: 2 ,
262
259
  content: ( localize(
263
- 7575,
260
+ 7630,
264
261
  "You will trust all repositories on {0}.",
265
262
  getHostLabel(this.labelService, item)
266
263
  ))
@@ -268,9 +265,9 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
268
265
  }
269
266
  if (segments.length === 1) {
270
267
  return {
271
- type: MessageType.WARNING,
268
+ type: 2 ,
272
269
  content: ( localize(
273
- 7576,
270
+ 7631,
274
271
  "You will trust all repositories and forks under '{0}' on {1}.",
275
272
  segments[0],
276
273
  getHostLabel(this.labelService, item)
@@ -279,8 +276,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
279
276
  }
280
277
  if (segments.length > 2) {
281
278
  return {
282
- type: MessageType.ERROR,
283
- content: ( localize(7577, "You cannot trust individual folders within a repository.", path))
279
+ type: 3 ,
280
+ content: ( localize(7632, "You cannot trust individual folders within a repository.", path))
284
281
  };
285
282
  }
286
283
  }
@@ -321,8 +318,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
321
318
  canSelectFolders: true,
322
319
  canSelectMany: false,
323
320
  defaultUri: item.uri,
324
- openLabel: ( localize(7571, "Trust Folder")),
325
- title: ( localize(7572, "Select Folder To Trust"))
321
+ openLabel: ( localize(7626, "Trust Folder")),
322
+ title: ( localize(7627, "Select Folder To Trust"))
326
323
  });
327
324
  if (uri) {
328
325
  this.acceptEdit(item, uri[0]);
@@ -389,7 +386,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
389
386
  class: ThemeIcon.asClassName(editIcon),
390
387
  enabled: true,
391
388
  id: 'editTrustedUri',
392
- tooltip: ( localize(7578, "Edit Path")),
389
+ tooltip: ( localize(7633, "Edit Path")),
393
390
  run: () => {
394
391
  this.table.edit(item, false);
395
392
  }
@@ -401,7 +398,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
401
398
  class: ThemeIcon.asClassName(folderPickerIcon),
402
399
  enabled: true,
403
400
  id: 'pickerTrustedUri',
404
- tooltip: ( localize(7579, "Open File Picker")),
401
+ tooltip: ( localize(7634, "Open File Picker")),
405
402
  run: () => {
406
403
  this.table.edit(item, true);
407
404
  }
@@ -413,7 +410,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
413
410
  class: ThemeIcon.asClassName(removeIcon),
414
411
  enabled: true,
415
412
  id: 'deleteTrustedUri',
416
- tooltip: ( localize(7580, "Delete Path")),
413
+ tooltip: ( localize(7635, "Delete Path")),
417
414
  run: async () => {
418
415
  await this.table.delete(item);
419
416
  }
@@ -487,11 +484,11 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
487
484
  };
488
485
  templateData.renderDisposables.add(addStandardDisposableListener(templateData.pathInput.inputElement, EventType.KEY_DOWN, e => {
489
486
  let handled = false;
490
- if (e.equals(KeyCode.Enter)) {
487
+ if (e.equals(3 )) {
491
488
  accept();
492
489
  handled = true;
493
490
  }
494
- else if (e.equals(KeyCode.Escape)) {
491
+ else if (e.equals(9 )) {
495
492
  reject();
496
493
  handled = true;
497
494
  }
@@ -530,7 +527,7 @@ TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( (__decorate([
530
527
  ( (__param(1, IContextViewService)))
531
528
  ], TrustedUriPathColumnRenderer)));
532
529
  function getHostLabel(labelService, item) {
533
- return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(7581, "Local"));
530
+ return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(7636, "Local"));
534
531
  }
535
532
  let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
536
533
  static { TrustedUriHostColumnRenderer_1 = this; }
@@ -591,8 +588,8 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
591
588
  this.createHeaderElement(this.rootElement);
592
589
  const scrollableContent = $('.workspace-trust-editor-body');
593
590
  this.bodyScrollBar = this._register(( (new DomScrollableElement(scrollableContent, {
594
- horizontal: ScrollbarVisibility.Hidden,
595
- vertical: ScrollbarVisibility.Auto,
591
+ horizontal: 2 ,
592
+ vertical: 1 ,
596
593
  }))));
597
594
  append(this.rootElement, this.bodyScrollBar.getDomNode());
598
595
  this.createAffectedFeaturesElement(scrollableContent);
@@ -603,16 +600,16 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
603
600
  this.rootElement.style.setProperty('--workspace-trust-x-color', asCssVariable(editorErrorForeground));
604
601
  this._register(addDisposableListener(this.rootElement, EventType.KEY_DOWN, e => {
605
602
  const event = ( (new StandardKeyboardEvent(e)));
606
- if (event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow)) {
603
+ if (event.equals(16 ) || event.equals(18 )) {
607
604
  const navOrder = [this.headerContainer, this.trustedContainer, this.untrustedContainer, this.configurationContainer];
608
605
  const currentIndex = navOrder.findIndex(element => {
609
606
  return isAncestorOfActiveElement(element);
610
607
  });
611
608
  let newIndex = currentIndex;
612
- if (event.equals(KeyCode.DownArrow)) {
609
+ if (event.equals(18 )) {
613
610
  newIndex++;
614
611
  }
615
- else if (event.equals(KeyCode.UpArrow)) {
612
+ else if (event.equals(16 )) {
616
613
  newIndex = Math.max(0, newIndex);
617
614
  newIndex--;
618
615
  }
@@ -620,15 +617,15 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
620
617
  newIndex %= navOrder.length;
621
618
  navOrder[newIndex].focus();
622
619
  }
623
- else if (event.equals(KeyCode.Escape)) {
620
+ else if (event.equals(9 )) {
624
621
  this.rootElement.focus();
625
622
  }
626
- else if (event.equals(KeyMod.CtrlCmd | KeyCode.Enter)) {
623
+ else if (event.equals(2048 | 3 )) {
627
624
  if (this.workspaceTrustManagementService.canSetWorkspaceTrust()) {
628
625
  this.workspaceTrustManagementService.setWorkspaceTrust(!this.workspaceTrustManagementService.isWorkspaceTrusted());
629
626
  }
630
627
  }
631
- else if (event.equals(KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter)) {
628
+ else if (event.equals(2048 | 1024 | 3 )) {
632
629
  if (this.workspaceTrustManagementService.canSetParentFolderTrust()) {
633
630
  this.workspaceTrustManagementService.setParentFolderTrust(true);
634
631
  }
@@ -663,18 +660,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
663
660
  getHeaderTitleText(trusted) {
664
661
  if (trusted) {
665
662
  if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
666
- return ( localize(7582, "This window is trusted"));
663
+ return ( localize(7637, "This window is trusted"));
667
664
  }
668
665
  switch (this.workspaceService.getWorkbenchState()) {
669
- case WorkbenchState.EMPTY:
670
- return ( localize(7583, "You trust this window"));
671
- case WorkbenchState.FOLDER:
672
- return ( localize(7584, "You trust this folder"));
673
- case WorkbenchState.WORKSPACE:
674
- return ( localize(7585, "You trust this workspace"));
666
+ case 1 :
667
+ return ( localize(7638, "You trust this window"));
668
+ case 2 :
669
+ return ( localize(7639, "You trust this folder"));
670
+ case 3 :
671
+ return ( localize(7640, "You trust this workspace"));
675
672
  }
676
673
  }
677
- return ( localize(7586, "You are in Restricted Mode"));
674
+ return ( localize(7641, "You are in Restricted Mode"));
678
675
  }
679
676
  getHeaderTitleIconClassNames(trusted) {
680
677
  return ThemeIcon.asClassNameArray(shieldIcon);
@@ -683,38 +680,38 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
683
680
  let title = '';
684
681
  let subTitle = '';
685
682
  switch (this.workspaceService.getWorkbenchState()) {
686
- case WorkbenchState.EMPTY: {
687
- title = trusted ? ( localize(7587, "In a Trusted Window")) : ( localize(7588, "In Restricted Mode"));
683
+ case 1 : {
684
+ title = trusted ? ( localize(7642, "In a Trusted Window")) : ( localize(7643, "In Restricted Mode"));
688
685
  subTitle = trusted ? ( localize(
689
- 7589,
686
+ 7644,
690
687
  "You trust the authors of the files in the current window. All features are enabled:"
691
688
  )) :
692
689
  ( localize(
693
- 7590,
690
+ 7645,
694
691
  "You do not trust the authors of the files in the current window. The following features are disabled:"
695
692
  ));
696
693
  break;
697
694
  }
698
- case WorkbenchState.FOLDER: {
699
- title = trusted ? ( localize(7591, "In a Trusted Folder")) : ( localize(7588, "In Restricted Mode"));
695
+ case 2 : {
696
+ title = trusted ? ( localize(7646, "In a Trusted Folder")) : ( localize(7643, "In Restricted Mode"));
700
697
  subTitle = trusted ? ( localize(
701
- 7592,
698
+ 7647,
702
699
  "You trust the authors of the files in the current folder. All features are enabled:"
703
700
  )) :
704
701
  ( localize(
705
- 7593,
702
+ 7648,
706
703
  "You do not trust the authors of the files in the current folder. The following features are disabled:"
707
704
  ));
708
705
  break;
709
706
  }
710
- case WorkbenchState.WORKSPACE: {
711
- title = trusted ? ( localize(7594, "In a Trusted Workspace")) : ( localize(7588, "In Restricted Mode"));
707
+ case 3 : {
708
+ title = trusted ? ( localize(7649, "In a Trusted Workspace")) : ( localize(7643, "In Restricted Mode"));
712
709
  subTitle = trusted ? ( localize(
713
- 7595,
710
+ 7650,
714
711
  "You trust the authors of the files in the current workspace. All features are enabled:"
715
712
  )) :
716
713
  ( localize(
717
- 7596,
714
+ 7651,
718
715
  "You do not trust the authors of the files in the current workspace. The following features are disabled:"
719
716
  ));
720
717
  break;
@@ -738,17 +735,17 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
738
735
  const headerDescriptionText = append(this.headerDescription, $('div'));
739
736
  headerDescriptionText.innerText = isWorkspaceTrusted ?
740
737
  ( localize(
741
- 7597,
738
+ 7652,
742
739
  "All features are enabled because trust has been granted to the workspace."
743
740
  )) :
744
741
  ( localize(
745
- 7598,
742
+ 7653,
746
743
  "{0} is in a restricted mode intended for safe code browsing.",
747
744
  this.productService.nameShort
748
745
  ));
749
746
  const headerDescriptionActions = append(this.headerDescription, $('div'));
750
747
  const headerDescriptionActionsText = ( localize(
751
- 7599,
748
+ 7654,
752
749
  "[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
753
750
  `command:workbench.trust.configure`
754
751
  ));
@@ -761,12 +758,12 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
761
758
  }
762
759
  }
763
760
  this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
764
- this.rootElement.setAttribute('aria-label', `${( localize(7600, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
761
+ this.rootElement.setAttribute('aria-label', `${( localize(7655, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
765
762
  const restrictedSettings = this.configurationService.restrictedSettings;
766
763
  const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
767
764
  const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
768
765
  const property = configurationRegistry.getConfigurationProperties()[key];
769
- if (property.scope === ConfigurationScope.APPLICATION || property.scope === ConfigurationScope.MACHINE) {
766
+ if (property.scope === 1 || property.scope === 2 ) {
770
767
  return false;
771
768
  }
772
769
  if (property.deprecationMessage || property.markdownDeprecationMessage) {
@@ -796,8 +793,8 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
796
793
  const localExtensions = ( (this.extensionWorkbenchService.local.filter(ext => ext.local).map(ext => ext.local)));
797
794
  for (const extension of localExtensions) {
798
795
  const enablementState = this.extensionEnablementService.getEnablementState(extension);
799
- if (enablementState !== EnablementState.EnabledGlobally && enablementState !== EnablementState.EnabledWorkspace &&
800
- enablementState !== EnablementState.DisabledByTrustRequirement && enablementState !== EnablementState.DisabledByExtensionDependency) {
796
+ if (enablementState !== 9 && enablementState !== 10 &&
797
+ enablementState !== 0 && enablementState !== 6 ) {
801
798
  continue;
802
799
  }
803
800
  if (inVirtualWorkspace && this.extensionManifestPropertiesService.getExtensionVirtualWorkspaceSupportType(extension.manifest) === false) {
@@ -826,7 +823,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
826
823
  createConfigurationElement(parent) {
827
824
  this.configurationContainer = append(parent, $('.workspace-trust-settings', { tabIndex: '0' }));
828
825
  const configurationTitle = append(this.configurationContainer, $('.workspace-trusted-folders-title'));
829
- configurationTitle.innerText = ( localize(7569, "Trusted Folders & Workspaces"));
826
+ configurationTitle.innerText = ( localize(7624, "Trusted Folders & Workspaces"));
830
827
  this.workspaceTrustedUrisTable = this._register(this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer));
831
828
  }
832
829
  createAffectedFeaturesElement(parent) {
@@ -839,43 +836,43 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
839
836
  clearNode(this.untrustedContainer);
840
837
  const [trustedTitle, trustedSubTitle] = this.getFeaturesHeaderText(true);
841
838
  this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
842
- const trustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ?
839
+ const trustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
843
840
  [
844
- ( localize(7601, "Tasks are allowed to run")),
845
- ( localize(7602, "Debugging is enabled")),
846
- ( localize(7603, "All enabled extensions are activated"))
841
+ ( localize(7656, "Tasks are allowed to run")),
842
+ ( localize(7657, "Debugging is enabled")),
843
+ ( localize(7658, "All enabled extensions are activated"))
847
844
  ] :
848
845
  [
849
- ( localize(7601, "Tasks are allowed to run")),
850
- ( localize(7602, "Debugging is enabled")),
851
- ( localize(7604, "All workspace settings are applied")),
852
- ( localize(7603, "All enabled extensions are activated"))
846
+ ( localize(7656, "Tasks are allowed to run")),
847
+ ( localize(7657, "Debugging is enabled")),
848
+ ( localize(7659, "All workspace settings are applied")),
849
+ ( localize(7658, "All enabled extensions are activated"))
853
850
  ];
854
851
  this.renderLimitationsListElement(this.trustedContainer, trustedContainerItems, ThemeIcon.asClassNameArray(checkListIcon));
855
852
  const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
856
853
  this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
857
- const untrustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ?
854
+ const untrustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
858
855
  [
859
- ( localize(7605, "Tasks are not allowed to run")),
860
- ( localize(7606, "Debugging is disabled")),
856
+ ( localize(7660, "Tasks are not allowed to run")),
857
+ ( localize(7661, "Debugging is disabled")),
861
858
  fixBadLocalizedLinks(( localize(
862
- 7607,
859
+ 7662,
863
860
  "[{0} extensions]({1}) are disabled or have limited functionality",
864
861
  numExtensions,
865
862
  `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
866
863
  )))
867
864
  ] :
868
865
  [
869
- ( localize(7605, "Tasks are not allowed to run")),
870
- ( localize(7606, "Debugging is disabled")),
866
+ ( localize(7660, "Tasks are not allowed to run")),
867
+ ( localize(7661, "Debugging is disabled")),
871
868
  fixBadLocalizedLinks(numSettings ? ( localize(
872
- 7608,
869
+ 7663,
873
870
  "[{0} workspace settings]({1}) are not applied",
874
871
  numSettings,
875
872
  'command:settings.filterUntrusted'
876
- )) : ( localize(7609, "Workspace settings requiring trust are not applied"))),
873
+ )) : ( localize(7664, "Workspace settings requiring trust are not applied"))),
877
874
  fixBadLocalizedLinks(( localize(
878
- 7607,
875
+ 7662,
879
876
  "[{0} extensions]({1}) are disabled or have limited functionality",
880
877
  numExtensions,
881
878
  `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
@@ -905,7 +902,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
905
902
  button.label = action.label;
906
903
  button.enabled = enabled !== undefined ? enabled : action.enabled;
907
904
  button.description = keybinding.getLabel();
908
- button.element.ariaLabel = action.label + ', ' + ( localize(7610, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
905
+ button.element.ariaLabel = action.label + ', ' + ( localize(7665, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
909
906
  this.rerenderDisposables.add(button.onDidClick(e => {
910
907
  if (e) {
911
908
  EventHelper.stop(e, true);
@@ -915,7 +912,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
915
912
  }
916
913
  }
917
914
  addTrustButtonToElement(parent) {
918
- const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(7611, "Trust")), undefined, true, async () => {
915
+ const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(7666, "Trust")), undefined, true, async () => {
919
916
  await this.workspaceTrustManagementService.setWorkspaceTrust(true);
920
917
  })));
921
918
  const trustActions = [{ action: trustAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0] }];
@@ -924,11 +921,11 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
924
921
  const name = basename(dirname(workspaceIdentifier.uri));
925
922
  const trustMessageElement = append(parent, $('.trust-message-box'));
926
923
  trustMessageElement.innerText = ( localize(
927
- 7612,
924
+ 7667,
928
925
  "Trust the authors of all files in the current folder or its parent '{0}'.",
929
926
  name
930
927
  ));
931
- const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(7613, "Trust Parent")), undefined, true, async () => {
928
+ const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(7668, "Trust Parent")), undefined, true, async () => {
932
929
  await this.workspaceTrustManagementService.setParentFolderTrust(true);
933
930
  })));
934
931
  trustActions.push({ action: trustParentAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Shift+Enter' : 'Ctrl+Shift+Enter')[0] });
@@ -937,28 +934,28 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
937
934
  }
938
935
  addDontTrustButtonToElement(parent) {
939
936
  this.createButtonRow(parent, [{
940
- action: ( (new Action('workspace.trust.button.action.deny', ( localize(7614, "Don't Trust")), undefined, true, async () => {
937
+ action: ( (new Action('workspace.trust.button.action.deny', ( localize(7669, "Don't Trust")), undefined, true, async () => {
941
938
  await this.workspaceTrustManagementService.setWorkspaceTrust(false);
942
939
  }))),
943
940
  keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0]
944
941
  }]);
945
942
  }
946
943
  addTrustedTextToElement(parent) {
947
- if (this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY) {
944
+ if (this.workspaceService.getWorkbenchState() === 1 ) {
948
945
  return;
949
946
  }
950
947
  const textElement = append(parent, $('.workspace-trust-untrusted-description'));
951
948
  if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
952
- textElement.innerText = this.workspaceService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(
953
- 7615,
949
+ textElement.innerText = this.workspaceService.getWorkbenchState() === 3 ? ( localize(
950
+ 7670,
954
951
  "This workspace is trusted via the bolded entries in the trusted folders below."
955
952
  )) : ( localize(
956
- 7616,
953
+ 7671,
957
954
  "This folder is trusted via the bolded entries in the the trusted folders below."
958
955
  ));
959
956
  }
960
957
  else {
961
- textElement.innerText = ( localize(7617, "This window is trusted by nature of the workspace that is opened."));
958
+ textElement.innerText = ( localize(7672, "This window is trusted by nature of the workspace that is opened."));
962
959
  }
963
960
  }
964
961
  renderLimitationsHeaderElement(parent, headerText, subtitleText) {
@@ -3,10 +3,9 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
3
3
  import { URI } from 'vscode/vscode/vs/base/common/uri';
4
4
  import { localize } from 'vscode/vscode/vs/nls';
5
5
  import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
6
- import { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
7
6
  import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
8
7
 
9
- const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(7618, 'Icon of the workspace trust editor label.')));
8
+ const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(7673, 'Icon of the workspace trust editor label.')));
10
9
  class WorkspaceTrustEditorInput extends EditorInput {
11
10
  constructor() {
12
11
  super(...arguments);
@@ -17,7 +16,7 @@ class WorkspaceTrustEditorInput extends EditorInput {
17
16
  }
18
17
  static { this.ID = 'workbench.input.workspaceTrust'; }
19
18
  get capabilities() {
20
- return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton;
19
+ return 2 | 8 ;
21
20
  }
22
21
  get typeId() {
23
22
  return WorkspaceTrustEditorInput.ID;
@@ -26,7 +25,7 @@ class WorkspaceTrustEditorInput extends EditorInput {
26
25
  return super.matches(otherInput) || otherInput instanceof WorkspaceTrustEditorInput;
27
26
  }
28
27
  getName() {
29
- return ( localize(7619, "Workspace Trust"));
28
+ return ( localize(7674, "Workspace Trust"));
30
29
  }
31
30
  getIcon() {
32
31
  return WorkspaceTrustEditorIcon;