@codingame/monaco-vscode-configuration-service-override 26.2.1 → 27.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-configuration-service-override",
3
- "version": "26.2.1",
3
+ "version": "27.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - configuration service-override",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "26.2.1",
19
- "@codingame/monaco-vscode-files-service-override": "26.2.1"
18
+ "@codingame/monaco-vscode-api": "27.0.0",
19
+ "@codingame/monaco-vscode-files-service-override": "27.0.0"
20
20
  },
21
21
  "main": "index.js",
22
22
  "module": "index.js",
@@ -27,28 +27,28 @@ const configurationEntrySchema = {
27
27
  properties: {
28
28
  title: {
29
29
  description: ( localize(
30
- 2629,
30
+ 2669,
31
31
  "A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading."
32
32
  )),
33
33
  type: "string"
34
34
  },
35
35
  order: {
36
36
  description: ( localize(
37
- 2630,
37
+ 2670,
38
38
  "When specified, gives the order of this category of settings relative to other categories."
39
39
  )),
40
40
  type: "integer"
41
41
  },
42
42
  properties: {
43
- description: ( localize(2631, "Description of the configuration properties.")),
43
+ description: ( localize(2671, "Description of the configuration properties.")),
44
44
  type: "object",
45
45
  propertyNames: {
46
46
  pattern: "\\S+",
47
- patternErrorMessage: ( localize(2632, "Property should not be empty."))
47
+ patternErrorMessage: ( localize(2672, "Property should not be empty."))
48
48
  },
49
49
  additionalProperties: {
50
50
  anyOf: [{
51
- title: ( localize(2633, "Schema of the configuration property.")),
51
+ title: ( localize(2673, "Schema of the configuration property.")),
52
52
  $ref: "http://json-schema.org/draft-07/schema#"
53
53
  }, {
54
54
  type: "object",
@@ -64,24 +64,24 @@ const configurationEntrySchema = {
64
64
  "machine-overridable"
65
65
  ],
66
66
  default: "window",
67
- enumDescriptions: [( localize(2634, "Configuration that can be configured only in the user settings.")), ( localize(
68
- 2635,
67
+ enumDescriptions: [( localize(2674, "Configuration that can be configured only in the user settings.")), ( localize(
68
+ 2675,
69
69
  "Configuration that can be configured only in the user settings or only in the remote settings."
70
70
  )), ( localize(
71
- 2636,
71
+ 2676,
72
72
  "Configuration that can be configured in the user, remote or workspace settings."
73
73
  )), ( localize(
74
- 2637,
74
+ 2677,
75
75
  "Configuration that can be configured in the user, remote, workspace or folder settings."
76
76
  )), ( localize(
77
- 2638,
77
+ 2678,
78
78
  "Resource configuration that can be configured in language specific settings."
79
79
  )), ( localize(
80
- 2639,
80
+ 2679,
81
81
  "Machine configuration that can be configured also in workspace or folder settings."
82
82
  ))],
83
83
  markdownDescription: ( localize(
84
- 2640,
84
+ 2680,
85
85
  "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
86
86
  ))
87
87
  },
@@ -90,14 +90,14 @@ const configurationEntrySchema = {
90
90
  items: {
91
91
  type: "string"
92
92
  },
93
- description: ( localize(2641, "Descriptions for enum values"))
93
+ description: ( localize(2681, "Descriptions for enum values"))
94
94
  },
95
95
  markdownEnumDescriptions: {
96
96
  type: "array",
97
97
  items: {
98
98
  type: "string"
99
99
  },
100
- description: ( localize(2642, "Descriptions for enum values in the markdown format."))
100
+ description: ( localize(2682, "Descriptions for enum values in the markdown format."))
101
101
  },
102
102
  enumItemLabels: {
103
103
  type: "array",
@@ -105,53 +105,63 @@ const configurationEntrySchema = {
105
105
  type: "string"
106
106
  },
107
107
  markdownDescription: ( localize(
108
- 2643,
108
+ 2683,
109
109
  "Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.",
110
110
  "`enum`"
111
111
  ))
112
112
  },
113
113
  markdownDescription: {
114
114
  type: "string",
115
- description: ( localize(2644, "The description in the markdown format."))
115
+ description: ( localize(2684, "The description in the markdown format."))
116
116
  },
117
117
  deprecationMessage: {
118
118
  type: "string",
119
119
  description: ( localize(
120
- 2645,
120
+ 2685,
121
121
  "If set, the property is marked as deprecated and the given message is shown as an explanation."
122
122
  ))
123
123
  },
124
124
  markdownDeprecationMessage: {
125
125
  type: "string",
126
126
  description: ( localize(
127
- 2646,
127
+ 2686,
128
128
  "If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format."
129
129
  ))
130
130
  },
131
131
  editPresentation: {
132
132
  type: "string",
133
133
  enum: ["singlelineText", "multilineText"],
134
- enumDescriptions: [( localize(2647, "The value will be shown in an inputbox.")), ( localize(2648, "The value will be shown in a textarea."))],
134
+ enumDescriptions: [( localize(2687, "The value will be shown in an inputbox.")), ( localize(2688, "The value will be shown in a textarea."))],
135
135
  default: "singlelineText",
136
136
  description: ( localize(
137
- 2649,
137
+ 2689,
138
138
  "When specified, controls the presentation format of the string setting."
139
139
  ))
140
140
  },
141
141
  order: {
142
142
  type: "integer",
143
143
  description: ( localize(
144
- 2650,
144
+ 2690,
145
145
  "When specified, gives the order of this setting relative to other settings within the same category. Settings with an order property will be placed before settings without this property set."
146
146
  ))
147
147
  },
148
148
  ignoreSync: {
149
149
  type: "boolean",
150
150
  description: ( localize(
151
- 2651,
151
+ 2691,
152
152
  "When enabled, Settings Sync will not sync the user value of this configuration by default."
153
153
  ))
154
154
  },
155
+ keywords: {
156
+ type: "array",
157
+ items: {
158
+ type: "string"
159
+ },
160
+ description: ( localize(
161
+ 2692,
162
+ "A list of keywords that help users find this setting in the Settings editor. These are not shown to the user."
163
+ ))
164
+ },
155
165
  tags: {
156
166
  type: "array",
157
167
  items: {
@@ -163,20 +173,20 @@ const configurationEntrySchema = {
163
173
  "telemetry",
164
174
  "usesOnlineServices"
165
175
  ],
166
- enumDescriptions: [( localize(2652, "Accessibility settings")), ( localize(
167
- 2653,
176
+ enumDescriptions: [( localize(2693, "Accessibility settings")), ( localize(
177
+ 2694,
168
178
  "Advanced settings are hidden by default in the Settings editor unless the user chooses to show advanced settings."
169
179
  )), ( localize(
170
- 2654,
180
+ 2695,
171
181
  "Experimental settings are subject to change and may be removed in future releases."
172
182
  )), ( localize(
173
- 2655,
183
+ 2696,
174
184
  "Preview settings can be used to try out new features before they are finalized."
175
- )), ( localize(2656, "Telemetry settings")), ( localize(2657, "Settings that use online services"))]
185
+ )), ( localize(2697, "Telemetry settings")), ( localize(2698, "Settings that use online services"))]
176
186
  },
177
187
  additionalItems: true,
178
188
  markdownDescription: ( localize(
179
- 2658,
189
+ 2699,
180
190
  "A list of tags under which to place the setting. The tag can then be searched up in the Settings editor. For example, specifying the `experimental` tag allows one to find the setting by searching `@tag:experimental`."
181
191
  ))
182
192
  }
@@ -235,7 +245,7 @@ defaultConfigurationExtPoint.setHandler((
235
245
  const registeredPropertyScheme = registeredProperties[key];
236
246
  if (registeredPropertyScheme?.disallowConfigurationDefault) {
237
247
  extension.collector.warn(( localize(
238
- 2659,
248
+ 2700,
239
249
  "Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
240
250
  key
241
251
  )));
@@ -245,7 +255,7 @@ defaultConfigurationExtPoint.setHandler((
245
255
  if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
246
256
  if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
247
257
  extension.collector.warn(( localize(
248
- 2660,
258
+ 2701,
249
259
  "Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
250
260
  key
251
261
  )));
@@ -269,7 +279,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
269
279
  extensionPoint: "configuration",
270
280
  deps: [defaultConfigurationExtPoint],
271
281
  jsonSchema: {
272
- description: ( localize(2661, "Contributes configuration settings.")),
282
+ description: ( localize(2702, "Contributes configuration settings.")),
273
283
  oneOf: [configurationEntrySchema, {
274
284
  type: "array",
275
285
  items: configurationEntrySchema
@@ -298,7 +308,7 @@ configurationExtPoint.setHandler((
298
308
  function handleConfiguration(node, extension) {
299
309
  const configuration = deepClone(node);
300
310
  if (configuration.title && (typeof configuration.title !== "string")) {
301
- extension.collector.error(( localize(2662, "'configuration.title' must be a string")));
311
+ extension.collector.error(( localize(2703, "'configuration.title' must be a string")));
302
312
  }
303
313
  validateProperties(configuration, extension);
304
314
  configuration.id = node.id || extension.description.identifier.value;
@@ -315,7 +325,7 @@ configurationExtPoint.setHandler((
315
325
  const extensionConfigurationPolicy = product.extensionConfigurationPolicy;
316
326
  if (properties) {
317
327
  if (typeof properties !== "object") {
318
- extension.collector.error(( localize(2663, "'configuration.properties' must be an object")));
328
+ extension.collector.error(( localize(2704, "'configuration.properties' must be an object")));
319
329
  configuration.properties = {};
320
330
  }
321
331
  for (const key in properties) {
@@ -328,12 +338,12 @@ configurationExtPoint.setHandler((
328
338
  }
329
339
  if (( seenProperties.has(key)) && !( EXTENSION_UNIFICATION_EXTENSION_IDS.has(extension.description.identifier.value.toLowerCase()))) {
330
340
  delete properties[key];
331
- extension.collector.warn(( localize(2664, "Cannot register '{0}'. This property is already registered.", key)));
341
+ extension.collector.warn(( localize(2705, "Cannot register '{0}'. This property is already registered.", key)));
332
342
  continue;
333
343
  }
334
344
  if (!isObject(propertyConfiguration)) {
335
345
  delete properties[key];
336
- extension.collector.error(( localize(2665, "configuration.properties property '{0}' must be an object", key)));
346
+ extension.collector.error(( localize(2706, "configuration.properties property '{0}' must be an object", key)));
337
347
  continue;
338
348
  }
339
349
  if (extensionConfigurationPolicy?.[key]) {
@@ -351,7 +361,7 @@ configurationExtPoint.setHandler((
351
361
  const subNodes = configuration.allOf;
352
362
  if (subNodes) {
353
363
  extension.collector.error(( localize(
354
- 2666,
364
+ 2707,
355
365
  "'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
356
366
  )));
357
367
  for (const node of subNodes) {
@@ -391,7 +401,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
391
401
  "folders": {
392
402
  minItems: 0,
393
403
  uniqueItems: true,
394
- description: ( localize(2667, "List of folders to be loaded in the workspace.")),
404
+ description: ( localize(2708, "List of folders to be loaded in the workspace.")),
395
405
  items: {
396
406
  type: "object",
397
407
  defaultSnippets: [{
@@ -404,13 +414,13 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
404
414
  path: {
405
415
  type: "string",
406
416
  description: ( localize(
407
- 2668,
417
+ 2709,
408
418
  "A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
409
419
  ))
410
420
  },
411
421
  name: {
412
422
  type: "string",
413
- description: ( localize(2669, "An optional name for the folder. "))
423
+ description: ( localize(2710, "An optional name for the folder. "))
414
424
  }
415
425
  },
416
426
  required: ["path"]
@@ -418,11 +428,11 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
418
428
  properties: {
419
429
  uri: {
420
430
  type: "string",
421
- description: ( localize(2670, "URI of the folder"))
431
+ description: ( localize(2711, "URI of the folder"))
422
432
  },
423
433
  name: {
424
434
  type: "string",
425
- description: ( localize(2669, "An optional name for the folder. "))
435
+ description: ( localize(2710, "An optional name for the folder. "))
426
436
  }
427
437
  },
428
438
  required: ["uri"]
@@ -432,7 +442,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
432
442
  "settings": {
433
443
  type: "object",
434
444
  default: {},
435
- description: ( localize(2671, "Workspace settings")),
445
+ description: ( localize(2712, "Workspace settings")),
436
446
  $ref: workspaceSettingsSchemaId
437
447
  },
438
448
  "launch": {
@@ -441,7 +451,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
441
451
  configurations: [],
442
452
  compounds: []
443
453
  },
444
- description: ( localize(2672, "Workspace launch configurations")),
454
+ description: ( localize(2713, "Workspace launch configurations")),
445
455
  $ref: launchSchemaId
446
456
  },
447
457
  "tasks": {
@@ -450,7 +460,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
450
460
  version: "2.0.0",
451
461
  tasks: []
452
462
  },
453
- description: ( localize(2673, "Workspace task configurations")),
463
+ description: ( localize(2714, "Workspace task configurations")),
454
464
  $ref: tasksSchemaId
455
465
  },
456
466
  "mcp": {
@@ -464,27 +474,27 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
464
474
  }
465
475
  }
466
476
  },
467
- description: ( localize(2674, "Model Context Protocol server configurations")),
477
+ description: ( localize(2715, "Model Context Protocol server configurations")),
468
478
  $ref: mcpSchemaId
469
479
  },
470
480
  "extensions": {
471
481
  type: "object",
472
482
  default: {},
473
- description: ( localize(2675, "Workspace extensions")),
483
+ description: ( localize(2716, "Workspace extensions")),
474
484
  $ref: "vscode://schemas/extensions"
475
485
  },
476
486
  "remoteAuthority": {
477
487
  type: "string",
478
488
  doNotSuggest: true,
479
- description: ( localize(2676, "The remote server where the workspace is located."))
489
+ description: ( localize(2717, "The remote server where the workspace is located."))
480
490
  },
481
491
  "transient": {
482
492
  type: "boolean",
483
493
  doNotSuggest: true,
484
- description: ( localize(2677, "A transient workspace will disappear when restarting or reloading."))
494
+ description: ( localize(2718, "A transient workspace will disappear when restarting or reloading."))
485
495
  }
486
496
  },
487
- errorMessage: ( localize(2678, "Unknown workspace configuration property"))
497
+ errorMessage: ( localize(2719, "Unknown workspace configuration property"))
488
498
  });
489
499
  class SettingsTableRenderer extends Disposable {
490
500
  constructor() {
@@ -498,7 +508,7 @@ class SettingsTableRenderer extends Disposable {
498
508
  const configuration = manifest.contributes?.configuration ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration] : [];
499
509
  const properties = getAllConfigurationProperties(configuration);
500
510
  const contrib = properties ? ( Object.keys(properties)) : [];
501
- const headers = [( localize(2679, "ID")), ( localize(2680, "Description")), ( localize(2681, "Default"))];
511
+ const headers = [( localize(2720, "ID")), ( localize(2721, "Description")), ( localize(2722, "Default"))];
502
512
  const rows = ( contrib.sort((a, b) => a.localeCompare(b)).map(key => {
503
513
  return [( new MarkdownString()).appendMarkdown(`\`${key}\``), properties[key].markdownDescription ? ( new MarkdownString(properties[key].markdownDescription, false)) : properties[key].description ?? "", ( new MarkdownString()).appendCodeblock("json", JSON.stringify(
504
514
  isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default,
@@ -517,7 +527,7 @@ class SettingsTableRenderer extends Disposable {
517
527
  }
518
528
  ( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
519
529
  id: "configuration",
520
- label: ( localize(2682, "Settings")),
530
+ label: ( localize(2723, "Settings")),
521
531
  access: {
522
532
  canToggle: false
523
533
  },
@@ -533,7 +543,7 @@ class ConfigurationDefaultsTableRenderer extends Disposable {
533
543
  }
534
544
  render(manifest) {
535
545
  const configurationDefaults = manifest.contributes?.configurationDefaults ?? {};
536
- const headers = [( localize(2683, "Languages")), ( localize(2684, "Setting")), ( localize(2685, "Override Value"))];
546
+ const headers = [( localize(2724, "Languages")), ( localize(2725, "Setting")), ( localize(2726, "Override Value"))];
537
547
  const rows = [];
538
548
  for (const key of ( Object.keys(configurationDefaults)).sort((a, b) => a.localeCompare(b))) {
539
549
  const value = configurationDefaults[key];
@@ -566,7 +576,7 @@ class ConfigurationDefaultsTableRenderer extends Disposable {
566
576
  }
567
577
  ( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
568
578
  id: "configurationDefaults",
569
- label: ( localize(2686, "Settings Default Overrides")),
579
+ label: ( localize(2727, "Settings Default Overrides")),
570
580
  access: {
571
581
  canToggle: false
572
582
  },
@@ -62,12 +62,12 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
62
62
  if (workspaces.length === 1) {
63
63
  const workspaceFile = workspaces[0];
64
64
  this.notificationService.prompt(Severity.Info, ( localize(
65
- 14150,
65
+ 15077,
66
66
  "This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
67
67
  workspaceFile,
68
68
  "https://go.microsoft.com/fwlink/?linkid=2025315"
69
69
  )), [{
70
- label: ( localize(14151, "Open Workspace")),
70
+ label: ( localize(15078, "Open Workspace")),
71
71
  run: () => this.hostService.openWindow([{
72
72
  workspaceUri: joinPath(folder, workspaceFile)
73
73
  }])
@@ -78,16 +78,16 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
78
78
  }
79
79
  else if (workspaces.length > 1) {
80
80
  this.notificationService.prompt(Severity.Info, ( localize(
81
- 14152,
81
+ 15079,
82
82
  "This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
83
83
  "https://go.microsoft.com/fwlink/?linkid=2025315"
84
84
  )), [{
85
- label: ( localize(14153, "Select Workspace")),
85
+ label: ( localize(15080, "Select Workspace")),
86
86
  run: () => {
87
87
  this.quickInputService.pick(( workspaces.map(workspace => ({
88
88
  label: workspace
89
89
  }))), {
90
- placeHolder: ( localize(14154, "Select a workspace to open"))
90
+ placeHolder: ( localize(15081, "Select a workspace to open"))
91
91
  }).then(pick => {
92
92
  if (pick) {
93
93
  this.hostService.openWindow([{
@@ -109,7 +109,7 @@ registerAction2(class extends Action2 {
109
109
  constructor() {
110
110
  super({
111
111
  id: "workbench.action.openWorkspaceFromEditor",
112
- title: ( localize2(14151, "Open Workspace")),
112
+ title: ( localize2(15078, "Open Workspace")),
113
113
  f1: false,
114
114
  menu: {
115
115
  id: MenuId.EditorContent,
@@ -124,7 +124,7 @@ registerAction2(class extends Action2 {
124
124
  if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
125
125
  const workspaceConfiguration = contextService.getWorkspace().configuration;
126
126
  if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
127
- notificationService.info(( localize(14155, "This workspace is already open.")));
127
+ notificationService.info(( localize(15082, "This workspace is already open.")));
128
128
  return;
129
129
  }
130
130
  }
@@ -21,7 +21,6 @@ declare class Workspace extends BaseWorkspace {
21
21
  initialized: boolean;
22
22
  }
23
23
  export declare class WorkspaceService extends Disposable implements IWorkbenchConfigurationService, IWorkspaceContextService {
24
- private readonly environmentService;
25
24
  private readonly userDataProfileService;
26
25
  private readonly userDataProfilesService;
27
26
  private readonly fileService;
@@ -16,7 +16,7 @@ import { NullPolicyConfiguration, PolicyConfiguration } from '@codingame/monaco-
16
16
  import { Configuration } from '../common/configurationModels.js';
17
17
  import { LOCAL_MACHINE_SCOPES, LOCAL_MACHINE_PROFILE_SCOPES, PROFILE_SCOPES, APPLICATION_SCOPES, APPLY_ALL_PROFILES_SETTING, FOLDER_CONFIG_FOLDER_NAME, defaultSettingsSchemaId, userSettingsSchemaId, profileSettingsSchemaId, machineSettingsSchemaId, workspaceSettingsSchemaId, folderSettingsSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
18
18
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
19
- import { Extensions, keyFromOverrideIdentifiers, ConfigurationScope, allSettings, applicationSettings, windowSettings, resourceSettings, machineSettings, machineOverridableSettings, applicationMachineSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId, configurationDefaultsSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
19
+ import { Extensions, keyFromOverrideIdentifiers, ConfigurationScope, allSettings, applicationSettings, windowSettings, resourceSettings, machineSettings, machineOverridableSettings, applicationMachineSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId, configurationDefaultsSchemaId, isConfigurationDefaultSourceEquals } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
20
20
  import { isStoredWorkspaceFolder, toWorkspaceFolders, getStoredWorkspaceFolder } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces';
21
21
  import { EditableConfigurationTarget, ConfigurationEditing } from '../common/configurationEditing.js';
22
22
  import { DefaultConfiguration, UserConfiguration, RemoteUserConfiguration, WorkspaceConfiguration, ApplicationConfiguration, FolderConfiguration } from './configuration.js';
@@ -71,7 +71,6 @@ class WorkspaceService extends Disposable {
71
71
  policyService
72
72
  ) {
73
73
  super();
74
- this.environmentService = environmentService;
75
74
  this.userDataProfileService = userDataProfileService;
76
75
  this.userDataProfilesService = userDataProfilesService;
77
76
  this.fileService = fileService;
@@ -489,14 +488,12 @@ class WorkspaceService extends Disposable {
489
488
  this.uriIdentityService.extUri
490
489
  );
491
490
  const workspaceId = workspaceIdentifier.id;
492
- const isAgentSessionsWorkspace = this.uriIdentityService.extUri.isEqual(workspaceConfigPath, this.environmentService.agentSessionsWorkspace);
493
491
  const workspace = ( new Workspace(
494
492
  workspaceId,
495
493
  workspaceFolders,
496
494
  this.workspaceConfiguration.isTransient(),
497
495
  workspaceConfigPath,
498
- uri => this.uriIdentityService.extUri.ignorePathCasing(uri),
499
- isAgentSessionsWorkspace
496
+ uri => this.uriIdentityService.extUri.ignorePathCasing(uri)
500
497
  ));
501
498
  workspace.initialized = this.workspaceConfiguration.initialized;
502
499
  return workspace;
@@ -1324,7 +1321,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1324
1321
  } : workspaceSettingsSchema;
1325
1322
  const configDefaultsSchema = {
1326
1323
  type: "object",
1327
- description: ( localize(14334, "Contribute defaults for configurations")),
1324
+ description: ( localize(15262, "Contribute defaults for configurations")),
1328
1325
  properties: Object.assign(
1329
1326
  {},
1330
1327
  this.filterDefaultOverridableProperties(machineOverridableSettings.properties),
@@ -1427,11 +1424,18 @@ let ConfigurationDefaultOverridesContribution = class ConfigurationDefaultOverri
1427
1424
  async processExperimentalSettings(properties, autoRefetch) {
1428
1425
  const overrides = {};
1429
1426
  const allProperties = this.configurationRegistry.getConfigurationProperties();
1427
+ const defaultConfigurationsPreventingExperimentOverrides = this.configurationRegistry.getRegisteredDefaultConfigurations().filter(configuration => configuration.preventExperimentOverride);
1430
1428
  for (const property of properties) {
1431
1429
  const schema = allProperties[property];
1432
1430
  if (!schema?.experiment) {
1433
1431
  continue;
1434
1432
  }
1433
+ const defaultValueSource = schema.defaultValueSource && !(schema.defaultValueSource instanceof Map) ? schema.defaultValueSource : undefined;
1434
+ if (defaultValueSource && ( defaultConfigurationsPreventingExperimentOverrides.some(
1435
+ configuration => isConfigurationDefaultSourceEquals(configuration.source, defaultValueSource) && configuration.overrides?.[property] !== undefined
1436
+ ))) {
1437
+ continue;
1438
+ }
1435
1439
  if (!autoRefetch && ( this.processedExperimentalSettings.has(property))) {
1436
1440
  continue;
1437
1441
  }
@@ -1467,7 +1471,7 @@ configurationRegistry.registerConfiguration({
1467
1471
  properties: {
1468
1472
  [APPLY_ALL_PROFILES_SETTING]: {
1469
1473
  "type": "array",
1470
- description: ( localize(14335, "Configure settings to be applied for all profiles.")),
1474
+ description: ( localize(15263, "Configure settings to be applied for all profiles.")),
1471
1475
  "default": [],
1472
1476
  "scope": ConfigurationScope.APPLICATION,
1473
1477
  additionalProperties: true,
@@ -163,7 +163,7 @@ let ConfigurationEditing = class ConfigurationEditing {
163
163
  );
164
164
  }
165
165
  throw ( new ConfigurationEditingError(( localize(
166
- 14336,
166
+ 15264,
167
167
  "Error while writing to {0}. {1}",
168
168
  this.stringifyTarget(operation.target),
169
169
  error.message
@@ -244,7 +244,7 @@ let ConfigurationEditing = class ConfigurationEditing {
244
244
  }
245
245
  }
246
246
  onInvalidConfigurationError(error, operation) {
247
- const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(14337, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(14338, "Open Launch Configuration")) : operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY ? ( localize(14339, "Open MCP Configuration")) : null;
247
+ const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(15265, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(15266, "Open Launch Configuration")) : operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY ? ( localize(15267, "Open MCP Configuration")) : null;
248
248
  if (openStandAloneConfigurationActionLabel) {
249
249
  this.notificationService.prompt(Severity.Error, error.message, [{
250
250
  label: openStandAloneConfigurationActionLabel,
@@ -252,16 +252,16 @@ let ConfigurationEditing = class ConfigurationEditing {
252
252
  }]);
253
253
  } else {
254
254
  this.notificationService.prompt(Severity.Error, error.message, [{
255
- label: ( localize(14340, "Open Settings")),
255
+ label: ( localize(15268, "Open Settings")),
256
256
  run: () => this.openSettings(operation)
257
257
  }]);
258
258
  }
259
259
  }
260
260
  onConfigurationFileDirtyError(error, operation, scopes) {
261
- const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(14337, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(14338, "Open Launch Configuration")) : null;
261
+ const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(15265, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(15266, "Open Launch Configuration")) : null;
262
262
  if (openStandAloneConfigurationActionLabel) {
263
263
  this.notificationService.prompt(Severity.Error, error.message, [{
264
- label: ( localize(14341, "Save and Retry")),
264
+ label: ( localize(15269, "Save and Retry")),
265
265
  run: () => {
266
266
  const key = operation.key ? `${operation.workspaceStandAloneConfigurationKey}.${operation.key}` : operation.workspaceStandAloneConfigurationKey;
267
267
  this.writeConfiguration(operation.target, {
@@ -278,7 +278,7 @@ let ConfigurationEditing = class ConfigurationEditing {
278
278
  }]);
279
279
  } else {
280
280
  this.notificationService.prompt(Severity.Error, error.message, [{
281
- label: ( localize(14341, "Save and Retry")),
281
+ label: ( localize(15269, "Save and Retry")),
282
282
  run: () => this.writeConfiguration(operation.target, {
283
283
  key: operation.key,
284
284
  value: operation.value
@@ -287,7 +287,7 @@ let ConfigurationEditing = class ConfigurationEditing {
287
287
  scopes
288
288
  })
289
289
  }, {
290
- label: ( localize(14340, "Open Settings")),
290
+ label: ( localize(15268, "Open Settings")),
291
291
  run: () => this.openSettings(operation)
292
292
  }]);
293
293
  }
@@ -335,61 +335,61 @@ let ConfigurationEditing = class ConfigurationEditing {
335
335
  switch (error) {
336
336
  case ConfigurationEditingErrorCode.ERROR_POLICY_CONFIGURATION:
337
337
  return localize(
338
- 14342,
338
+ 15270,
339
339
  "Unable to write {0} because it is configured in system policy.",
340
340
  operation.key
341
341
  );
342
342
  case ConfigurationEditingErrorCode.ERROR_UNKNOWN_KEY:
343
343
  return localize(
344
- 14343,
344
+ 15271,
345
345
  "Unable to write to {0} because {1} is not a registered configuration.",
346
346
  this.stringifyTarget(target),
347
347
  operation.key
348
348
  );
349
349
  case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION:
350
350
  return localize(
351
- 14344,
351
+ 15272,
352
352
  "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
353
353
  operation.key
354
354
  );
355
355
  case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE:
356
356
  return localize(
357
- 14345,
357
+ 15273,
358
358
  "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
359
359
  operation.key
360
360
  );
361
361
  case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_CONFIGURATION:
362
362
  return localize(
363
- 14346,
363
+ 15274,
364
364
  "Unable to write to Folder Settings because {0} does not support the folder resource scope.",
365
365
  operation.key
366
366
  );
367
367
  case ConfigurationEditingErrorCode.ERROR_INVALID_USER_TARGET:
368
368
  return localize(
369
- 14347,
369
+ 15275,
370
370
  "Unable to write to User Settings because {0} does not support for global scope.",
371
371
  operation.key
372
372
  );
373
373
  case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_TARGET:
374
374
  return localize(
375
- 14348,
375
+ 15276,
376
376
  "Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.",
377
377
  operation.key
378
378
  );
379
379
  case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_TARGET:
380
380
  return localize(
381
- 14349,
381
+ 15277,
382
382
  "Unable to write to Folder Settings because no resource is provided."
383
383
  );
384
384
  case ConfigurationEditingErrorCode.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION:
385
385
  return localize(
386
- 14350,
386
+ 15278,
387
387
  "Unable to write to Language Settings because {0} is not a resource language setting.",
388
388
  operation.key
389
389
  );
390
390
  case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED:
391
391
  return localize(
392
- 14351,
392
+ 15279,
393
393
  "Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.",
394
394
  this.stringifyTarget(target)
395
395
  );
@@ -397,36 +397,36 @@ let ConfigurationEditing = class ConfigurationEditing {
397
397
  {
398
398
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
399
399
  return localize(
400
- 14352,
400
+ 15280,
401
401
  "Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again."
402
402
  );
403
403
  }
404
404
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
405
405
  return localize(
406
- 14353,
406
+ 15281,
407
407
  "Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again."
408
408
  );
409
409
  }
410
410
  if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
411
411
  return localize(
412
- 14354,
412
+ 15282,
413
413
  "Unable to write into the MCP configuration file. Please open it to correct errors/warnings in it and try again."
414
414
  );
415
415
  }
416
416
  switch (target) {
417
417
  case EditableConfigurationTarget.USER_LOCAL:
418
418
  return localize(
419
- 14355,
419
+ 15283,
420
420
  "Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again."
421
421
  );
422
422
  case EditableConfigurationTarget.USER_REMOTE:
423
423
  return localize(
424
- 14356,
424
+ 15284,
425
425
  "Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again."
426
426
  );
427
427
  case EditableConfigurationTarget.WORKSPACE:
428
428
  return localize(
429
- 14357,
429
+ 15285,
430
430
  "Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again."
431
431
  );
432
432
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
@@ -439,7 +439,7 @@ let ConfigurationEditing = class ConfigurationEditing {
439
439
  }
440
440
  }
441
441
  return localize(
442
- 14358,
442
+ 15286,
443
443
  "Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.",
444
444
  workspaceFolderName
445
445
  );
@@ -452,36 +452,36 @@ let ConfigurationEditing = class ConfigurationEditing {
452
452
  {
453
453
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
454
454
  return localize(
455
- 14359,
455
+ 15287,
456
456
  "Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again."
457
457
  );
458
458
  }
459
459
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
460
460
  return localize(
461
- 14360,
461
+ 15288,
462
462
  "Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again."
463
463
  );
464
464
  }
465
465
  if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
466
466
  return localize(
467
- 14361,
467
+ 15289,
468
468
  "Unable to write into MCP configuration file because the file has unsaved changes. Please save it first and then try again."
469
469
  );
470
470
  }
471
471
  switch (target) {
472
472
  case EditableConfigurationTarget.USER_LOCAL:
473
473
  return localize(
474
- 14362,
474
+ 15290,
475
475
  "Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again."
476
476
  );
477
477
  case EditableConfigurationTarget.USER_REMOTE:
478
478
  return localize(
479
- 14363,
479
+ 15291,
480
480
  "Unable to write into remote user settings because the file has unsaved changes. Please save the remote user settings file first and then try again."
481
481
  );
482
482
  case EditableConfigurationTarget.WORKSPACE:
483
483
  return localize(
484
- 14364,
484
+ 15292,
485
485
  "Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again."
486
486
  );
487
487
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
@@ -494,7 +494,7 @@ let ConfigurationEditing = class ConfigurationEditing {
494
494
  }
495
495
  }
496
496
  return localize(
497
- 14365,
497
+ 15293,
498
498
  "Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.",
499
499
  workspaceFolderName
500
500
  );
@@ -506,47 +506,47 @@ let ConfigurationEditing = class ConfigurationEditing {
506
506
  case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE:
507
507
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
508
508
  return localize(
509
- 14366,
509
+ 15294,
510
510
  "Unable to write into tasks configuration file because the content of the file is newer."
511
511
  );
512
512
  }
513
513
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
514
514
  return localize(
515
- 14367,
515
+ 15295,
516
516
  "Unable to write into launch configuration file because the content of the file is newer."
517
517
  );
518
518
  }
519
519
  if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
520
520
  return localize(
521
- 14368,
521
+ 15296,
522
522
  "Unable to write into MCP configuration file because the content of the file is newer."
523
523
  );
524
524
  }
525
525
  switch (target) {
526
526
  case EditableConfigurationTarget.USER_LOCAL:
527
527
  return localize(
528
- 14369,
528
+ 15297,
529
529
  "Unable to write into user settings because the content of the file is newer."
530
530
  );
531
531
  case EditableConfigurationTarget.USER_REMOTE:
532
532
  return localize(
533
- 14370,
533
+ 15298,
534
534
  "Unable to write into remote user settings because the content of the file is newer."
535
535
  );
536
536
  case EditableConfigurationTarget.WORKSPACE:
537
537
  return localize(
538
- 14371,
538
+ 15299,
539
539
  "Unable to write into workspace settings because the content of the file is newer."
540
540
  );
541
541
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
542
542
  return localize(
543
- 14372,
543
+ 15300,
544
544
  "Unable to write into folder settings because the content of the file is newer."
545
545
  );
546
546
  }
547
547
  case ConfigurationEditingErrorCode.ERROR_INTERNAL:
548
548
  return localize(
549
- 14373,
549
+ 15301,
550
550
  "Unable to write to {0} because of an internal error.",
551
551
  this.stringifyTarget(target)
552
552
  );
@@ -555,13 +555,13 @@ let ConfigurationEditing = class ConfigurationEditing {
555
555
  stringifyTarget(target) {
556
556
  switch (target) {
557
557
  case EditableConfigurationTarget.USER_LOCAL:
558
- return localize(14374, "User Settings");
558
+ return localize(15302, "User Settings");
559
559
  case EditableConfigurationTarget.USER_REMOTE:
560
- return localize(14375, "Remote User Settings");
560
+ return localize(15303, "Remote User Settings");
561
561
  case EditableConfigurationTarget.WORKSPACE:
562
- return localize(14376, "Workspace Settings");
562
+ return localize(15304, "Workspace Settings");
563
563
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
564
- return localize(14377, "Folder Settings");
564
+ return localize(15305, "Folder Settings");
565
565
  default:
566
566
  return "";
567
567
  }
@@ -134,7 +134,10 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
134
134
  }
135
135
  async resolveWithInteractionReplace(folder, config, section, variables, target) {
136
136
  const parsed = ConfigurationResolverExpression.parse(config);
137
- await this.resolveWithInteraction(folder, parsed, section, variables, target);
137
+ const resolved = await this.resolveWithInteraction(folder, parsed, section, variables, target);
138
+ if (resolved === undefined) {
139
+ return undefined;
140
+ }
138
141
  return parsed.toObject();
139
142
  }
140
143
  async resolveWithInteraction(folder, config, section, variableToCommandMap, target) {
@@ -147,7 +150,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
147
150
  if (!isUndefinedOrNull(value)) {
148
151
  if (typeof value !== "string") {
149
152
  throw ( new VariableError(VariableKind.Command, ( localize(
150
- 14379,
153
+ 15307,
151
154
  "Cannot substitute command variable '{0}' because command did not return a result of type string.",
152
155
  commandId
153
156
  ))));
@@ -247,7 +250,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
247
250
  async showUserInput(section, variable, inputInfos, variableToCommandMap) {
248
251
  if (!inputInfos) {
249
252
  throw ( new VariableError(VariableKind.Input, ( localize(
250
- 14380,
253
+ 15308,
251
254
  "Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
252
255
  variable,
253
256
  "inputs"
@@ -257,7 +260,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
257
260
  if (info) {
258
261
  const missingAttribute = attrName => {
259
262
  throw ( new VariableError(VariableKind.Input, ( localize(
260
- 14381,
263
+ 15309,
261
264
  "Input variable '{0}' is of type '{1}' and must include '{2}'.",
262
265
  variable,
263
266
  info.type,
@@ -315,7 +318,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
315
318
  };
316
319
  const topValue = variableToCommandMap?.[`input:${variable}`] ?? previousPickedValue ?? info.default;
317
320
  if (value === info.default) {
318
- item.description = ( localize(14382, "(Default)"));
321
+ item.description = ( localize(15310, "(Default)"));
319
322
  picks.unshift(item);
320
323
  } else if (value === topValue) {
321
324
  picks.unshift(item);
@@ -353,7 +356,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
353
356
  };
354
357
  }
355
358
  throw ( new VariableError(VariableKind.Input, ( localize(
356
- 14383,
359
+ 15311,
357
360
  "Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.",
358
361
  variable,
359
362
  info.command
@@ -362,14 +365,14 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
362
365
  }
363
366
  default:
364
367
  throw ( new VariableError(VariableKind.Input, ( localize(
365
- 14384,
368
+ 15312,
366
369
  "Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.",
367
370
  variable
368
371
  ))));
369
372
  }
370
373
  }
371
374
  throw ( new VariableError(VariableKind.Input, ( localize(
372
- 14385,
375
+ 15313,
373
376
  "Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
374
377
  variable
375
378
  ))));
@@ -1,6 +1,7 @@
1
+ import { IDidEnterWorkspaceEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceEditing";
1
2
  import { IWorkspaceEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service";
2
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
- import { IWorkspaceIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
4
+ import { IAnyWorkspaceIdentifier, IWorkspaceIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
4
5
  import { IJSONEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/jsonEditing.service";
5
6
  import { IWorkspaceFolderCreationData, IEnterWorkspaceResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces";
6
7
  import { IWorkspacesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces.service";
@@ -19,6 +20,16 @@ import { IWorkbenchConfigurationService } from "@codingame/monaco-vscode-api/vsc
19
20
  import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
20
21
  import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
21
22
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
23
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
24
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
25
+ export declare class DidEnterWorkspaceEvent implements IDidEnterWorkspaceEvent {
26
+ readonly oldWorkspace: IAnyWorkspaceIdentifier;
27
+ readonly newWorkspace: IAnyWorkspaceIdentifier;
28
+ private readonly promises;
29
+ constructor(oldWorkspace: IAnyWorkspaceIdentifier, newWorkspace: IAnyWorkspaceIdentifier);
30
+ join(promise: Promise<void>): void;
31
+ wait(): Promise<void>;
32
+ }
22
33
  export declare abstract class AbstractWorkspaceEditingService extends Disposable implements IWorkspaceEditingService {
23
34
  private readonly jsonEditingService;
24
35
  protected readonly contextService: WorkspaceService;
@@ -36,8 +47,11 @@ export declare abstract class AbstractWorkspaceEditingService extends Disposable
36
47
  private readonly workspaceTrustManagementService;
37
48
  private readonly userDataProfilesService;
38
49
  private readonly userDataProfileService;
50
+ protected readonly logService: ILogService;
39
51
  readonly _serviceBrand: undefined;
40
- constructor(jsonEditingService: IJSONEditingService, contextService: WorkspaceService, configurationService: IWorkbenchConfigurationService, notificationService: INotificationService, commandService: ICommandService, fileService: IFileService, textFileService: ITextFileService, workspacesService: IWorkspacesService, environmentService: IWorkbenchEnvironmentService, fileDialogService: IFileDialogService, dialogService: IDialogService, hostService: IHostService, uriIdentityService: IUriIdentityService, workspaceTrustManagementService: IWorkspaceTrustManagementService, userDataProfilesService: IUserDataProfilesService, userDataProfileService: IUserDataProfileService);
52
+ private readonly _onDidEnterWorkspace;
53
+ readonly onDidEnterWorkspace: Event<IDidEnterWorkspaceEvent>;
54
+ constructor(jsonEditingService: IJSONEditingService, contextService: WorkspaceService, configurationService: IWorkbenchConfigurationService, notificationService: INotificationService, commandService: ICommandService, fileService: IFileService, textFileService: ITextFileService, workspacesService: IWorkspacesService, environmentService: IWorkbenchEnvironmentService, fileDialogService: IFileDialogService, dialogService: IDialogService, hostService: IHostService, uriIdentityService: IUriIdentityService, workspaceTrustManagementService: IWorkspaceTrustManagementService, userDataProfilesService: IUserDataProfilesService, userDataProfileService: IUserDataProfileService, logService: ILogService);
41
55
  pickNewWorkspacePath(): Promise<URI | undefined>;
42
56
  private getNewWorkspaceName;
43
57
  updateFolders(index: number, deleteCount?: number, foldersToAddCandidates?: IWorkspaceFolderCreationData[], donotNotifyError?: boolean): Promise<void>;
@@ -55,6 +69,7 @@ export declare abstract class AbstractWorkspaceEditingService extends Disposable
55
69
  private onInvalidWorkspaceConfigurationFileError;
56
70
  private askToOpenWorkspaceConfigurationFile;
57
71
  abstract enterWorkspace(workspaceUri: URI): Promise<void>;
72
+ protected fireDidEnterWorkspace(oldWorkspace: IAnyWorkspaceIdentifier, newWorkspace: IAnyWorkspaceIdentifier): Promise<void>;
58
73
  protected doEnterWorkspace(workspaceUri: URI): Promise<IEnterWorkspaceResult | undefined>;
59
74
  private migrateWorkspaceSettings;
60
75
  copyWorkspaceSettings(toWorkspace: IWorkspaceIdentifier): Promise<void>;
@@ -27,8 +27,24 @@ import { IWorkbenchConfigurationService } from '@codingame/monaco-vscode-api/vsc
27
27
  import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
28
28
  import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
29
29
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
30
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
31
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
32
+ import { Promises } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
30
33
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
31
34
 
35
+ class DidEnterWorkspaceEvent {
36
+ constructor(oldWorkspace, newWorkspace) {
37
+ this.oldWorkspace = oldWorkspace;
38
+ this.newWorkspace = newWorkspace;
39
+ this.promises = [];
40
+ }
41
+ join(promise) {
42
+ this.promises.push(promise);
43
+ }
44
+ async wait() {
45
+ await Promises.settled(this.promises);
46
+ }
47
+ }
32
48
  let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService extends Disposable {
33
49
  constructor(
34
50
  jsonEditingService,
@@ -46,7 +62,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
46
62
  uriIdentityService,
47
63
  workspaceTrustManagementService,
48
64
  userDataProfilesService,
49
- userDataProfileService
65
+ userDataProfileService,
66
+ logService
50
67
  ) {
51
68
  super();
52
69
  this.jsonEditingService = jsonEditingService;
@@ -65,6 +82,9 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
65
82
  this.workspaceTrustManagementService = workspaceTrustManagementService;
66
83
  this.userDataProfilesService = userDataProfilesService;
67
84
  this.userDataProfileService = userDataProfileService;
85
+ this.logService = logService;
86
+ this._onDidEnterWorkspace = this._register(( new Emitter()));
87
+ this.onDidEnterWorkspace = this._onDidEnterWorkspace.event;
68
88
  }
69
89
  async pickNewWorkspacePath() {
70
90
  const availableFileSystems = [Schemas.file];
@@ -72,8 +92,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
72
92
  availableFileSystems.unshift(Schemas.vscodeRemote);
73
93
  }
74
94
  let workspacePath = await this.fileDialogService.showSaveDialog({
75
- saveLabel: ( localize(15248, "Save")),
76
- title: ( localize(15249, "Save Workspace")),
95
+ saveLabel: ( localize(16175, "Save")),
96
+ title: ( localize(16176, "Save Workspace")),
77
97
  filters: WORKSPACE_FILTER,
78
98
  defaultUri: joinPath(
79
99
  await this.fileDialogService.defaultWorkspacePath(),
@@ -303,17 +323,29 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
303
323
  }
304
324
  onInvalidWorkspaceConfigurationFileError() {
305
325
  const message = ( localize(
306
- 15250,
326
+ 16177,
307
327
  "Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
308
328
  ));
309
329
  this.askToOpenWorkspaceConfigurationFile(message);
310
330
  }
311
331
  askToOpenWorkspaceConfigurationFile(message) {
312
332
  this.notificationService.prompt(Severity.Error, message, [{
313
- label: ( localize(15251, "Open Workspace Configuration")),
333
+ label: ( localize(16178, "Open Workspace Configuration")),
314
334
  run: () => this.commandService.executeCommand("workbench.action.openWorkspaceConfigFile")
315
335
  }]);
316
336
  }
337
+ async fireDidEnterWorkspace(oldWorkspace, newWorkspace) {
338
+ const event = ( new DidEnterWorkspaceEvent(oldWorkspace, newWorkspace));
339
+ this._onDidEnterWorkspace.fire(event);
340
+ try {
341
+ await event.wait();
342
+ } catch (error) {
343
+ this.logService.error(
344
+ "Error while waiting for participants of onDidEnterWorkspace to join:",
345
+ error
346
+ );
347
+ }
348
+ }
317
349
  async doEnterWorkspace(workspaceUri) {
318
350
  if (this.environmentService.extensionTestsLocationURI) {
319
351
  throw ( new Error("Entering a new workspace is not possible in tests."));
@@ -360,6 +392,6 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
360
392
  return undefined;
361
393
  }
362
394
  };
363
- AbstractWorkspaceEditingService = ( __decorate([( __param(0, IJSONEditingService)), ( __param(1, IWorkspaceContextService)), ( __param(2, IWorkbenchConfigurationService)), ( __param(3, INotificationService)), ( __param(4, ICommandService)), ( __param(5, IFileService)), ( __param(6, ITextFileService)), ( __param(7, IWorkspacesService)), ( __param(8, IWorkbenchEnvironmentService)), ( __param(9, IFileDialogService)), ( __param(10, IDialogService)), ( __param(11, IHostService)), ( __param(12, IUriIdentityService)), ( __param(13, IWorkspaceTrustManagementService)), ( __param(14, IUserDataProfilesService)), ( __param(15, IUserDataProfileService))], AbstractWorkspaceEditingService));
395
+ AbstractWorkspaceEditingService = ( __decorate([( __param(0, IJSONEditingService)), ( __param(1, IWorkspaceContextService)), ( __param(2, IWorkbenchConfigurationService)), ( __param(3, INotificationService)), ( __param(4, ICommandService)), ( __param(5, IFileService)), ( __param(6, ITextFileService)), ( __param(7, IWorkspacesService)), ( __param(8, IWorkbenchEnvironmentService)), ( __param(9, IFileDialogService)), ( __param(10, IDialogService)), ( __param(11, IHostService)), ( __param(12, IUriIdentityService)), ( __param(13, IWorkspaceTrustManagementService)), ( __param(14, IUserDataProfilesService)), ( __param(15, IUserDataProfileService)), ( __param(16, ILogService))], AbstractWorkspaceEditingService));
364
396
 
365
- export { AbstractWorkspaceEditingService };
397
+ export { AbstractWorkspaceEditingService, DidEnterWorkspaceEvent };