@codingame/monaco-vscode-configuration-service-override 36.2.7 → 37.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 +3 -3
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +98 -74
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +7 -7
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +22 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +71 -15
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +43 -43
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +7 -7
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.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": "
|
|
19
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "37.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -5,7 +5,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
5
5
|
import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
6
6
|
import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, EXTENSION_UNIFICATION_EXTENSION_IDS, parseScope, getAllConfigurationProperties, getDefaultValue, overrideIdentifiersFromKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
7
7
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
8
|
-
import {
|
|
8
|
+
import { tasksSchemaId, launchSchemaId, workspaceSettingsSchemaId, mcpSchemaId, MCP_CONFIGURATION_KEY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
|
|
9
9
|
import { isObject, hasKey, isUndefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
10
|
import { ExtensionIdentifierMap } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
11
11
|
import { Extensions as Extensions$2 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
@@ -28,28 +28,28 @@ const configurationEntrySchema = {
|
|
|
28
28
|
properties: {
|
|
29
29
|
title: {
|
|
30
30
|
description: ( localize(
|
|
31
|
-
|
|
31
|
+
3065,
|
|
32
32
|
"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."
|
|
33
33
|
)),
|
|
34
34
|
type: "string"
|
|
35
35
|
},
|
|
36
36
|
order: {
|
|
37
37
|
description: ( localize(
|
|
38
|
-
|
|
38
|
+
3066,
|
|
39
39
|
"When specified, gives the order of this category of settings relative to other categories."
|
|
40
40
|
)),
|
|
41
41
|
type: "integer"
|
|
42
42
|
},
|
|
43
43
|
properties: {
|
|
44
|
-
description: ( localize(
|
|
44
|
+
description: ( localize(3067, "Description of the configuration properties.")),
|
|
45
45
|
type: "object",
|
|
46
46
|
propertyNames: {
|
|
47
47
|
pattern: "\\S+",
|
|
48
|
-
patternErrorMessage: ( localize(
|
|
48
|
+
patternErrorMessage: ( localize(3068, "Property should not be empty."))
|
|
49
49
|
},
|
|
50
50
|
additionalProperties: {
|
|
51
51
|
anyOf: [{
|
|
52
|
-
title: ( localize(
|
|
52
|
+
title: ( localize(3069, "Schema of the configuration property.")),
|
|
53
53
|
$ref: "http://json-schema.org/draft-07/schema#"
|
|
54
54
|
}, {
|
|
55
55
|
type: "object",
|
|
@@ -65,24 +65,24 @@ const configurationEntrySchema = {
|
|
|
65
65
|
"machine-overridable"
|
|
66
66
|
],
|
|
67
67
|
default: "window",
|
|
68
|
-
enumDescriptions: [( localize(
|
|
69
|
-
|
|
68
|
+
enumDescriptions: [( localize(3070, "Configuration that can be configured only in the user settings.")), ( localize(
|
|
69
|
+
3071,
|
|
70
70
|
"Configuration that can be configured only in the user settings or only in the remote settings."
|
|
71
71
|
)), ( localize(
|
|
72
|
-
|
|
72
|
+
3072,
|
|
73
73
|
"Configuration that can be configured in the user, remote or workspace settings."
|
|
74
74
|
)), ( localize(
|
|
75
|
-
|
|
75
|
+
3073,
|
|
76
76
|
"Configuration that can be configured in the user, remote, workspace or folder settings."
|
|
77
77
|
)), ( localize(
|
|
78
|
-
|
|
78
|
+
3074,
|
|
79
79
|
"Resource configuration that can be configured in language specific settings."
|
|
80
80
|
)), ( localize(
|
|
81
|
-
|
|
81
|
+
3075,
|
|
82
82
|
"Machine configuration that can be configured also in workspace or folder settings."
|
|
83
83
|
))],
|
|
84
84
|
markdownDescription: ( localize(
|
|
85
|
-
|
|
85
|
+
3076,
|
|
86
86
|
"Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
|
|
87
87
|
))
|
|
88
88
|
},
|
|
@@ -91,14 +91,14 @@ const configurationEntrySchema = {
|
|
|
91
91
|
items: {
|
|
92
92
|
type: "string"
|
|
93
93
|
},
|
|
94
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(3077, "Descriptions for enum values"))
|
|
95
95
|
},
|
|
96
96
|
markdownEnumDescriptions: {
|
|
97
97
|
type: "array",
|
|
98
98
|
items: {
|
|
99
99
|
type: "string"
|
|
100
100
|
},
|
|
101
|
-
description: ( localize(
|
|
101
|
+
description: ( localize(3078, "Descriptions for enum values in the markdown format."))
|
|
102
102
|
},
|
|
103
103
|
enumItemLabels: {
|
|
104
104
|
type: "array",
|
|
@@ -106,50 +106,60 @@ const configurationEntrySchema = {
|
|
|
106
106
|
type: "string"
|
|
107
107
|
},
|
|
108
108
|
markdownDescription: ( localize(
|
|
109
|
-
|
|
109
|
+
3079,
|
|
110
110
|
"Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.",
|
|
111
111
|
"`enum`"
|
|
112
112
|
))
|
|
113
113
|
},
|
|
114
114
|
markdownDescription: {
|
|
115
115
|
type: "string",
|
|
116
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(3080, "The description in the markdown format."))
|
|
117
117
|
},
|
|
118
118
|
deprecationMessage: {
|
|
119
119
|
type: "string",
|
|
120
120
|
description: ( localize(
|
|
121
|
-
|
|
121
|
+
3081,
|
|
122
122
|
"If set, the property is marked as deprecated and the given message is shown as an explanation."
|
|
123
123
|
))
|
|
124
124
|
},
|
|
125
125
|
markdownDeprecationMessage: {
|
|
126
126
|
type: "string",
|
|
127
127
|
description: ( localize(
|
|
128
|
-
|
|
128
|
+
3082,
|
|
129
129
|
"If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format."
|
|
130
130
|
))
|
|
131
131
|
},
|
|
132
|
+
deprecationMessageSeverity: {
|
|
133
|
+
type: "string",
|
|
134
|
+
enum: ["warning", "info"],
|
|
135
|
+
enumDescriptions: [( localize(
|
|
136
|
+
3083,
|
|
137
|
+
"Shows the deprecation message using the standard warning treatment."
|
|
138
|
+
)), ( localize(3084, "Shows the deprecation message using an informational treatment."))],
|
|
139
|
+
default: "warning",
|
|
140
|
+
description: ( localize(3085, "Controls the severity used to display the deprecation message."))
|
|
141
|
+
},
|
|
132
142
|
editPresentation: {
|
|
133
143
|
type: "string",
|
|
134
144
|
enum: ["singlelineText", "multilineText"],
|
|
135
|
-
enumDescriptions: [( localize(
|
|
145
|
+
enumDescriptions: [( localize(3086, "The value will be shown in an inputbox.")), ( localize(3087, "The value will be shown in a textarea."))],
|
|
136
146
|
default: "singlelineText",
|
|
137
147
|
description: ( localize(
|
|
138
|
-
|
|
148
|
+
3088,
|
|
139
149
|
"When specified, controls the presentation format of the string setting."
|
|
140
150
|
))
|
|
141
151
|
},
|
|
142
152
|
order: {
|
|
143
153
|
type: "integer",
|
|
144
154
|
description: ( localize(
|
|
145
|
-
|
|
155
|
+
3089,
|
|
146
156
|
"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."
|
|
147
157
|
))
|
|
148
158
|
},
|
|
149
159
|
ignoreSync: {
|
|
150
160
|
type: "boolean",
|
|
151
161
|
description: ( localize(
|
|
152
|
-
|
|
162
|
+
3090,
|
|
153
163
|
"When enabled, Settings Sync will not sync the user value of this configuration by default."
|
|
154
164
|
))
|
|
155
165
|
},
|
|
@@ -159,7 +169,7 @@ const configurationEntrySchema = {
|
|
|
159
169
|
type: "string"
|
|
160
170
|
},
|
|
161
171
|
description: ( localize(
|
|
162
|
-
|
|
172
|
+
3091,
|
|
163
173
|
"A list of keywords that help users find this setting in the Settings editor. These are not shown to the user."
|
|
164
174
|
))
|
|
165
175
|
},
|
|
@@ -174,37 +184,37 @@ const configurationEntrySchema = {
|
|
|
174
184
|
"telemetry",
|
|
175
185
|
"usesOnlineServices"
|
|
176
186
|
],
|
|
177
|
-
enumDescriptions: [( localize(
|
|
178
|
-
|
|
187
|
+
enumDescriptions: [( localize(3092, "Accessibility settings")), ( localize(
|
|
188
|
+
3093,
|
|
179
189
|
"Advanced settings are hidden by default in the Settings editor unless the user chooses to show advanced settings."
|
|
180
190
|
)), ( localize(
|
|
181
|
-
|
|
191
|
+
3094,
|
|
182
192
|
"Experimental settings are subject to change and may be removed in future releases."
|
|
183
193
|
)), ( localize(
|
|
184
|
-
|
|
194
|
+
3095,
|
|
185
195
|
"Preview settings can be used to try out new features before they are finalized."
|
|
186
|
-
)), ( localize(
|
|
196
|
+
)), ( localize(3096, "Telemetry settings")), ( localize(3097, "Settings that use online services"))]
|
|
187
197
|
},
|
|
188
198
|
additionalItems: true,
|
|
189
199
|
markdownDescription: ( localize(
|
|
190
|
-
|
|
200
|
+
3098,
|
|
191
201
|
"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`."
|
|
192
202
|
))
|
|
193
203
|
},
|
|
194
204
|
agentsWindow: {
|
|
195
205
|
type: "object",
|
|
196
206
|
markdownDescription: ( localize(
|
|
197
|
-
|
|
207
|
+
3099,
|
|
198
208
|
"Configuration overrides for the Agents window. Allows specifying a different default value and read-only behavior for this setting when running in the Agents window.\n\n**Note**: This is a proposed API. To use it, extensions must include `agentsWindowConfiguration` in their `enabledApiProposals`."
|
|
199
209
|
)),
|
|
200
210
|
properties: {
|
|
201
211
|
"default": {
|
|
202
|
-
description: ( localize(
|
|
212
|
+
description: ( localize(3100, "The default value for this setting in the Agents window."))
|
|
203
213
|
},
|
|
204
214
|
readOnly: {
|
|
205
215
|
type: "boolean",
|
|
206
216
|
description: ( localize(
|
|
207
|
-
|
|
217
|
+
3101,
|
|
208
218
|
"When true, this setting cannot be changed by the user in the Agents window."
|
|
209
219
|
)),
|
|
210
220
|
default: false
|
|
@@ -267,7 +277,7 @@ defaultConfigurationExtPoint.setHandler((
|
|
|
267
277
|
const registeredPropertyScheme = registeredProperties[key];
|
|
268
278
|
if (registeredPropertyScheme?.disallowConfigurationDefault) {
|
|
269
279
|
extension.collector.warn(( localize(
|
|
270
|
-
|
|
280
|
+
3102,
|
|
271
281
|
"Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
|
|
272
282
|
key
|
|
273
283
|
)));
|
|
@@ -277,7 +287,7 @@ defaultConfigurationExtPoint.setHandler((
|
|
|
277
287
|
if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
278
288
|
if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
|
|
279
289
|
extension.collector.warn(( localize(
|
|
280
|
-
|
|
290
|
+
3103,
|
|
281
291
|
"Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
|
|
282
292
|
key
|
|
283
293
|
)));
|
|
@@ -301,7 +311,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
301
311
|
extensionPoint: "configuration",
|
|
302
312
|
deps: [defaultConfigurationExtPoint],
|
|
303
313
|
jsonSchema: {
|
|
304
|
-
description: ( localize(
|
|
314
|
+
description: ( localize(3104, "Contributes configuration settings.")),
|
|
305
315
|
oneOf: [configurationEntrySchema, {
|
|
306
316
|
type: "array",
|
|
307
317
|
items: configurationEntrySchema
|
|
@@ -330,7 +340,7 @@ configurationExtPoint.setHandler((
|
|
|
330
340
|
function handleConfiguration(node, extension) {
|
|
331
341
|
const configuration = deepClone(node);
|
|
332
342
|
if (configuration.title && (typeof configuration.title !== "string")) {
|
|
333
|
-
extension.collector.error(( localize(
|
|
343
|
+
extension.collector.error(( localize(3105, "'configuration.title' must be a string")));
|
|
334
344
|
}
|
|
335
345
|
validateProperties(configuration, extension);
|
|
336
346
|
configuration.id = node.id || extension.description.identifier.value;
|
|
@@ -347,7 +357,7 @@ configurationExtPoint.setHandler((
|
|
|
347
357
|
const extensionConfigurationPolicy = product.extensionConfigurationPolicy;
|
|
348
358
|
if (properties) {
|
|
349
359
|
if (typeof properties !== "object") {
|
|
350
|
-
extension.collector.error(( localize(
|
|
360
|
+
extension.collector.error(( localize(3106, "'configuration.properties' must be an object")));
|
|
351
361
|
configuration.properties = {};
|
|
352
362
|
}
|
|
353
363
|
for (const key in properties) {
|
|
@@ -360,12 +370,12 @@ configurationExtPoint.setHandler((
|
|
|
360
370
|
}
|
|
361
371
|
if (( seenProperties.has(key)) && !( EXTENSION_UNIFICATION_EXTENSION_IDS.has(extension.description.identifier.value.toLowerCase()))) {
|
|
362
372
|
delete properties[key];
|
|
363
|
-
extension.collector.warn(( localize(
|
|
373
|
+
extension.collector.warn(( localize(3107, "Cannot register '{0}'. This property is already registered.", key)));
|
|
364
374
|
continue;
|
|
365
375
|
}
|
|
366
376
|
if (!isObject(propertyConfiguration)) {
|
|
367
377
|
delete properties[key];
|
|
368
|
-
extension.collector.error(( localize(
|
|
378
|
+
extension.collector.error(( localize(3108, "configuration.properties property '{0}' must be an object", key)));
|
|
369
379
|
continue;
|
|
370
380
|
}
|
|
371
381
|
const policyEntry = extensionConfigurationPolicy?.[key];
|
|
@@ -383,15 +393,24 @@ configurationExtPoint.setHandler((
|
|
|
383
393
|
mode: "startup"
|
|
384
394
|
};
|
|
385
395
|
}
|
|
386
|
-
if (propertyConfiguration.agentsWindow && !isProposedApiEnabled(extension.description)) {
|
|
396
|
+
if (propertyConfiguration.agentsWindow && !isProposedApiEnabled(extension.description, "agentsWindowConfiguration")) {
|
|
387
397
|
extension.collector.error(( localize(
|
|
388
|
-
|
|
398
|
+
3109,
|
|
389
399
|
"Extension '{0}' CANNOT use 'agentsWindow' property on configuration '{1}' without enabling the 'agentsWindowConfiguration' API proposal.",
|
|
390
400
|
extension.description.identifier.value,
|
|
391
401
|
key
|
|
392
402
|
)));
|
|
393
403
|
delete propertyConfiguration.agentsWindow;
|
|
394
404
|
}
|
|
405
|
+
if (propertyConfiguration.agentHost) {
|
|
406
|
+
extension.collector.error(( localize(
|
|
407
|
+
3110,
|
|
408
|
+
"Extension '{0}' CANNOT use the 'agentHost' property on configuration '{1}'.",
|
|
409
|
+
extension.description.identifier.value,
|
|
410
|
+
key
|
|
411
|
+
)));
|
|
412
|
+
delete propertyConfiguration.agentHost;
|
|
413
|
+
}
|
|
395
414
|
seenProperties.add(key);
|
|
396
415
|
propertyConfiguration.scope = propertyConfiguration.scope ? parseScope(( propertyConfiguration.scope.toString())) : ConfigurationScope.WINDOW;
|
|
397
416
|
}
|
|
@@ -399,7 +418,7 @@ configurationExtPoint.setHandler((
|
|
|
399
418
|
const subNodes = configuration.allOf;
|
|
400
419
|
if (subNodes) {
|
|
401
420
|
extension.collector.error(( localize(
|
|
402
|
-
|
|
421
|
+
3111,
|
|
403
422
|
"'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
|
|
404
423
|
)));
|
|
405
424
|
for (const node of subNodes) {
|
|
@@ -439,7 +458,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
439
458
|
"folders": {
|
|
440
459
|
minItems: 0,
|
|
441
460
|
uniqueItems: true,
|
|
442
|
-
description: ( localize(
|
|
461
|
+
description: ( localize(3112, "List of folders to be loaded in the workspace.")),
|
|
443
462
|
items: {
|
|
444
463
|
type: "object",
|
|
445
464
|
defaultSnippets: [{
|
|
@@ -452,13 +471,13 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
452
471
|
path: {
|
|
453
472
|
type: "string",
|
|
454
473
|
description: ( localize(
|
|
455
|
-
|
|
474
|
+
3113,
|
|
456
475
|
"A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
|
|
457
476
|
))
|
|
458
477
|
},
|
|
459
478
|
name: {
|
|
460
479
|
type: "string",
|
|
461
|
-
description: ( localize(
|
|
480
|
+
description: ( localize(3114, "An optional name for the folder. "))
|
|
462
481
|
}
|
|
463
482
|
},
|
|
464
483
|
required: ["path"]
|
|
@@ -466,11 +485,11 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
466
485
|
properties: {
|
|
467
486
|
uri: {
|
|
468
487
|
type: "string",
|
|
469
|
-
description: ( localize(
|
|
488
|
+
description: ( localize(3115, "URI of the folder"))
|
|
470
489
|
},
|
|
471
490
|
name: {
|
|
472
491
|
type: "string",
|
|
473
|
-
description: ( localize(
|
|
492
|
+
description: ( localize(3114, "An optional name for the folder. "))
|
|
474
493
|
}
|
|
475
494
|
},
|
|
476
495
|
required: ["uri"]
|
|
@@ -480,8 +499,27 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
480
499
|
"settings": {
|
|
481
500
|
type: "object",
|
|
482
501
|
default: {},
|
|
483
|
-
description: ( localize(
|
|
484
|
-
|
|
502
|
+
description: ( localize(3116, "Workspace settings")),
|
|
503
|
+
allOf: [{
|
|
504
|
+
$ref: workspaceSettingsSchemaId
|
|
505
|
+
}, {
|
|
506
|
+
properties: {
|
|
507
|
+
[MCP_CONFIGURATION_KEY]: {
|
|
508
|
+
type: "object",
|
|
509
|
+
default: {
|
|
510
|
+
inputs: [],
|
|
511
|
+
servers: {
|
|
512
|
+
"mcp-server-time": {
|
|
513
|
+
command: "uvx",
|
|
514
|
+
args: ["mcp_server_time", "--local-timezone=America/Los_Angeles"]
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
description: ( localize(3117, "Model Context Protocol server configurations")),
|
|
519
|
+
$ref: mcpSchemaId
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}]
|
|
485
523
|
},
|
|
486
524
|
"launch": {
|
|
487
525
|
type: "object",
|
|
@@ -489,7 +527,7 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
489
527
|
configurations: [],
|
|
490
528
|
compounds: []
|
|
491
529
|
},
|
|
492
|
-
description: ( localize(
|
|
530
|
+
description: ( localize(3118, "Workspace launch configurations")),
|
|
493
531
|
$ref: launchSchemaId
|
|
494
532
|
},
|
|
495
533
|
"tasks": {
|
|
@@ -498,41 +536,27 @@ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
|
|
|
498
536
|
version: "2.0.0",
|
|
499
537
|
tasks: []
|
|
500
538
|
},
|
|
501
|
-
description: ( localize(
|
|
539
|
+
description: ( localize(3119, "Workspace task configurations")),
|
|
502
540
|
$ref: tasksSchemaId
|
|
503
541
|
},
|
|
504
|
-
"mcp": {
|
|
505
|
-
type: "object",
|
|
506
|
-
default: {
|
|
507
|
-
inputs: [],
|
|
508
|
-
servers: {
|
|
509
|
-
"mcp-server-time": {
|
|
510
|
-
command: "uvx",
|
|
511
|
-
args: ["mcp_server_time", "--local-timezone=America/Los_Angeles"]
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
description: ( localize(2922, "Model Context Protocol server configurations")),
|
|
516
|
-
$ref: mcpSchemaId
|
|
517
|
-
},
|
|
518
542
|
"extensions": {
|
|
519
543
|
type: "object",
|
|
520
544
|
default: {},
|
|
521
|
-
description: ( localize(
|
|
545
|
+
description: ( localize(3120, "Workspace extensions")),
|
|
522
546
|
$ref: "vscode://schemas/extensions"
|
|
523
547
|
},
|
|
524
548
|
"remoteAuthority": {
|
|
525
549
|
type: "string",
|
|
526
550
|
doNotSuggest: true,
|
|
527
|
-
description: ( localize(
|
|
551
|
+
description: ( localize(3121, "The remote server where the workspace is located."))
|
|
528
552
|
},
|
|
529
553
|
"transient": {
|
|
530
554
|
type: "boolean",
|
|
531
555
|
doNotSuggest: true,
|
|
532
|
-
description: ( localize(
|
|
556
|
+
description: ( localize(3122, "A transient workspace will disappear when restarting or reloading."))
|
|
533
557
|
}
|
|
534
558
|
},
|
|
535
|
-
errorMessage: ( localize(
|
|
559
|
+
errorMessage: ( localize(3123, "Unknown workspace configuration property"))
|
|
536
560
|
});
|
|
537
561
|
class SettingsTableRenderer extends Disposable {
|
|
538
562
|
constructor() {
|
|
@@ -546,7 +570,7 @@ class SettingsTableRenderer extends Disposable {
|
|
|
546
570
|
const configuration = manifest.contributes?.configuration ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration] : [];
|
|
547
571
|
const properties = getAllConfigurationProperties(configuration);
|
|
548
572
|
const contrib = properties ? ( Object.keys(properties)) : [];
|
|
549
|
-
const headers = [( localize(
|
|
573
|
+
const headers = [( localize(3124, "ID")), ( localize(3125, "Description")), ( localize(3126, "Default"))];
|
|
550
574
|
const rows = ( contrib.sort((a, b) => a.localeCompare(b)).map(key => {
|
|
551
575
|
return [( new MarkdownString()).appendMarkdown(`\`${key}\``), properties[key].markdownDescription ? ( new MarkdownString(properties[key].markdownDescription, false)) : properties[key].description ?? "", ( new MarkdownString()).appendCodeblock("json", JSON.stringify(
|
|
552
576
|
isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default,
|
|
@@ -565,7 +589,7 @@ class SettingsTableRenderer extends Disposable {
|
|
|
565
589
|
}
|
|
566
590
|
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
567
591
|
id: "configuration",
|
|
568
|
-
label: ( localize(
|
|
592
|
+
label: ( localize(3127, "Settings")),
|
|
569
593
|
access: {
|
|
570
594
|
canToggle: false
|
|
571
595
|
},
|
|
@@ -581,7 +605,7 @@ class ConfigurationDefaultsTableRenderer extends Disposable {
|
|
|
581
605
|
}
|
|
582
606
|
render(manifest) {
|
|
583
607
|
const configurationDefaults = manifest.contributes?.configurationDefaults ?? {};
|
|
584
|
-
const headers = [( localize(
|
|
608
|
+
const headers = [( localize(3128, "Languages")), ( localize(3129, "Setting")), ( localize(3130, "Override Value"))];
|
|
585
609
|
const rows = [];
|
|
586
610
|
for (const key of ( Object.keys(configurationDefaults)).sort((a, b) => a.localeCompare(b))) {
|
|
587
611
|
const value = configurationDefaults[key];
|
|
@@ -614,7 +638,7 @@ class ConfigurationDefaultsTableRenderer extends Disposable {
|
|
|
614
638
|
}
|
|
615
639
|
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
616
640
|
id: "configurationDefaults",
|
|
617
|
-
label: ( localize(
|
|
641
|
+
label: ( localize(3131, "Settings Default Overrides")),
|
|
618
642
|
access: {
|
|
619
643
|
canToggle: false
|
|
620
644
|
},
|
|
@@ -63,12 +63,12 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
63
63
|
if (workspaces.length === 1) {
|
|
64
64
|
const workspaceFile = workspaces[0];
|
|
65
65
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
66
|
-
|
|
66
|
+
18947,
|
|
67
67
|
"This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
|
|
68
68
|
workspaceFile,
|
|
69
69
|
"https://go.microsoft.com/fwlink/?linkid=2025315"
|
|
70
70
|
)), [{
|
|
71
|
-
label: ( localize(
|
|
71
|
+
label: ( localize(18948, "Open Workspace")),
|
|
72
72
|
run: () => this.hostService.openWindow([{
|
|
73
73
|
workspaceUri: joinPath(folder, workspaceFile)
|
|
74
74
|
}])
|
|
@@ -79,16 +79,16 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
79
79
|
}
|
|
80
80
|
else if (workspaces.length > 1) {
|
|
81
81
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
82
|
-
|
|
82
|
+
18949,
|
|
83
83
|
"This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
|
|
84
84
|
"https://go.microsoft.com/fwlink/?linkid=2025315"
|
|
85
85
|
)), [{
|
|
86
|
-
label: ( localize(
|
|
86
|
+
label: ( localize(18950, "Select Workspace")),
|
|
87
87
|
run: () => {
|
|
88
88
|
this.quickInputService.pick(( workspaces.map(workspace => ({
|
|
89
89
|
label: workspace
|
|
90
90
|
}))), {
|
|
91
|
-
placeHolder: ( localize(
|
|
91
|
+
placeHolder: ( localize(18951, "Select a workspace to open"))
|
|
92
92
|
}).then(pick => {
|
|
93
93
|
if (pick) {
|
|
94
94
|
this.hostService.openWindow([{
|
|
@@ -110,7 +110,7 @@ registerAction2(class extends Action2 {
|
|
|
110
110
|
constructor() {
|
|
111
111
|
super({
|
|
112
112
|
id: "workbench.action.openWorkspaceFromEditor",
|
|
113
|
-
title: ( localize2(
|
|
113
|
+
title: ( localize2(18948, "Open Workspace")),
|
|
114
114
|
f1: false,
|
|
115
115
|
menu: {
|
|
116
116
|
id: MenuId.EditorContent,
|
|
@@ -125,7 +125,7 @@ registerAction2(class extends Action2 {
|
|
|
125
125
|
if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
126
126
|
const workspaceConfiguration = contextService.getWorkspace().configuration;
|
|
127
127
|
if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
|
|
128
|
-
notificationService.info(( localize(
|
|
128
|
+
notificationService.info(( localize(18952, "This workspace is already open.")));
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -11,8 +11,12 @@ import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-api/vscod
|
|
|
11
11
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
12
12
|
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
13
13
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
14
|
+
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
15
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
14
16
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
15
17
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
18
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
19
|
+
import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
16
20
|
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
17
21
|
import { IPolicyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/policy/common/policy.service";
|
|
18
22
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
@@ -156,4 +160,22 @@ export declare class WorkspaceService extends Disposable implements IWorkbenchCo
|
|
|
156
160
|
private triggerConfigurationChange;
|
|
157
161
|
private toEditableConfigurationTarget;
|
|
158
162
|
}
|
|
163
|
+
export declare class ConfigurationDefaultOverridesContribution extends Disposable implements IWorkbenchContribution {
|
|
164
|
+
private readonly workbenchAssignmentService;
|
|
165
|
+
private readonly extensionService;
|
|
166
|
+
private readonly configurationService;
|
|
167
|
+
private readonly environmentService;
|
|
168
|
+
private readonly logService;
|
|
169
|
+
static readonly ID = "workbench.contrib.configurationDefaultOverridesContribution";
|
|
170
|
+
private readonly processedExperimentalSettings;
|
|
171
|
+
private readonly autoExperimentalSettings;
|
|
172
|
+
private readonly pendingStartupExperimentalSettings;
|
|
173
|
+
private readonly registeredExperimentalDefaults;
|
|
174
|
+
private readonly configurationRegistry;
|
|
175
|
+
private readonly throttler;
|
|
176
|
+
constructor(workbenchAssignmentService: IWorkbenchAssignmentService, extensionService: IExtensionService, configurationService: WorkspaceService, environmentService: IWorkbenchEnvironmentService, logService: ILogService);
|
|
177
|
+
private updateDefaults;
|
|
178
|
+
private processExperimentalSettings;
|
|
179
|
+
private shouldOverride;
|
|
180
|
+
}
|
|
159
181
|
export {};
|
|
@@ -1334,7 +1334,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
|
|
|
1334
1334
|
} : workspaceSettingsSchema;
|
|
1335
1335
|
const configDefaultsSchema = {
|
|
1336
1336
|
type: "object",
|
|
1337
|
-
description: ( localize(
|
|
1337
|
+
description: ( localize(19152, "Contribute defaults for configurations")),
|
|
1338
1338
|
properties: Object.assign(
|
|
1339
1339
|
{},
|
|
1340
1340
|
this.filterDefaultOverridableProperties(machineOverridableSettings.properties),
|
|
@@ -1401,22 +1401,27 @@ let ConfigurationDefaultOverridesContribution = class ConfigurationDefaultOverri
|
|
|
1401
1401
|
workbenchAssignmentService,
|
|
1402
1402
|
extensionService,
|
|
1403
1403
|
configurationService,
|
|
1404
|
+
environmentService,
|
|
1404
1405
|
logService
|
|
1405
1406
|
) {
|
|
1406
1407
|
super();
|
|
1407
1408
|
this.workbenchAssignmentService = workbenchAssignmentService;
|
|
1408
1409
|
this.extensionService = extensionService;
|
|
1409
1410
|
this.configurationService = configurationService;
|
|
1411
|
+
this.environmentService = environmentService;
|
|
1410
1412
|
this.logService = logService;
|
|
1411
1413
|
this.processedExperimentalSettings = ( new Set());
|
|
1412
1414
|
this.autoExperimentalSettings = ( new Set());
|
|
1415
|
+
this.pendingStartupExperimentalSettings = ( new Set());
|
|
1416
|
+
this.registeredExperimentalDefaults = ( new Map());
|
|
1413
1417
|
this.configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
1414
1418
|
this.throttler = this._register(( new Throttler()));
|
|
1415
1419
|
this.throttler.queue(() => this.updateDefaults());
|
|
1416
1420
|
this._register(
|
|
1417
|
-
workbenchAssignmentService.onDidRefetchAssignments(() => this.throttler.queue(
|
|
1418
|
-
|
|
1419
|
-
|
|
1421
|
+
workbenchAssignmentService.onDidRefetchAssignments(() => this.throttler.queue(() => this.processExperimentalSettings([
|
|
1422
|
+
...this.autoExperimentalSettings,
|
|
1423
|
+
...this.pendingStartupExperimentalSettings
|
|
1424
|
+
], true)))
|
|
1420
1425
|
);
|
|
1421
1426
|
this._register(this.configurationRegistry.onDidUpdateConfiguration((
|
|
1422
1427
|
{
|
|
@@ -1435,42 +1440,93 @@ let ConfigurationDefaultOverridesContribution = class ConfigurationDefaultOverri
|
|
|
1435
1440
|
}
|
|
1436
1441
|
}
|
|
1437
1442
|
async processExperimentalSettings(properties, autoRefetch) {
|
|
1438
|
-
const
|
|
1443
|
+
const removedDefaults = [];
|
|
1444
|
+
const addedDefaults = [];
|
|
1439
1445
|
const allProperties = this.configurationRegistry.getConfigurationProperties();
|
|
1440
1446
|
const defaultConfigurationsPreventingExperimentOverrides = this.configurationRegistry.getRegisteredDefaultConfigurations().filter(configuration => configuration.preventExperimentOverride);
|
|
1441
1447
|
for (const property of properties) {
|
|
1442
1448
|
const schema = allProperties[property];
|
|
1443
1449
|
if (!schema?.experiment) {
|
|
1450
|
+
const registeredDefault = this.registeredExperimentalDefaults.get(property);
|
|
1451
|
+
if (registeredDefault) {
|
|
1452
|
+
this.registeredExperimentalDefaults.delete(property);
|
|
1453
|
+
removedDefaults.push(registeredDefault);
|
|
1454
|
+
}
|
|
1455
|
+
this.processedExperimentalSettings.delete(property);
|
|
1456
|
+
this.autoExperimentalSettings.delete(property);
|
|
1457
|
+
this.pendingStartupExperimentalSettings.delete(property);
|
|
1444
1458
|
continue;
|
|
1445
1459
|
}
|
|
1446
1460
|
const defaultValueSource = schema.defaultValueSource && !(schema.defaultValueSource instanceof Map) ? schema.defaultValueSource : undefined;
|
|
1447
1461
|
if (defaultValueSource && ( defaultConfigurationsPreventingExperimentOverrides.some(
|
|
1448
1462
|
configuration => isConfigurationDefaultSourceEquals(configuration.source, defaultValueSource) && configuration.overrides?.[property] !== undefined
|
|
1449
1463
|
))) {
|
|
1464
|
+
const registeredDefault = this.registeredExperimentalDefaults.get(property);
|
|
1465
|
+
if (registeredDefault) {
|
|
1466
|
+
this.registeredExperimentalDefaults.delete(property);
|
|
1467
|
+
removedDefaults.push(registeredDefault);
|
|
1468
|
+
}
|
|
1469
|
+
this.processedExperimentalSettings.delete(property);
|
|
1470
|
+
this.pendingStartupExperimentalSettings.delete(property);
|
|
1450
1471
|
continue;
|
|
1451
1472
|
}
|
|
1452
1473
|
if (!autoRefetch && ( this.processedExperimentalSettings.has(property))) {
|
|
1453
1474
|
continue;
|
|
1454
1475
|
}
|
|
1455
1476
|
this.processedExperimentalSettings.add(property);
|
|
1456
|
-
|
|
1477
|
+
const isAutoExperiment = schema.experiment.mode === "auto";
|
|
1478
|
+
if (isAutoExperiment) {
|
|
1457
1479
|
this.autoExperimentalSettings.add(property);
|
|
1458
1480
|
}
|
|
1459
1481
|
try {
|
|
1460
1482
|
const value = await this.workbenchAssignmentService.getTreatment(schema.experiment.name ?? `config.${property}`);
|
|
1461
|
-
if (!
|
|
1462
|
-
|
|
1483
|
+
if (!isAutoExperiment) {
|
|
1484
|
+
if (isUndefined(value)) {
|
|
1485
|
+
this.pendingStartupExperimentalSettings.add(property);
|
|
1486
|
+
} else {
|
|
1487
|
+
this.pendingStartupExperimentalSettings.delete(property);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
const registeredDefault = this.registeredExperimentalDefaults.get(property);
|
|
1491
|
+
if (registeredDefault && equals(registeredDefault.overrides[property], value)) {
|
|
1492
|
+
continue;
|
|
1493
|
+
}
|
|
1494
|
+
if (this.shouldOverride(value, schema)) {
|
|
1495
|
+
if (registeredDefault) {
|
|
1496
|
+
removedDefaults.push(registeredDefault);
|
|
1497
|
+
}
|
|
1498
|
+
const nextDefault = {
|
|
1499
|
+
overrides: {
|
|
1500
|
+
[property]: value
|
|
1501
|
+
},
|
|
1502
|
+
source: "experiments"
|
|
1503
|
+
};
|
|
1504
|
+
this.registeredExperimentalDefaults.set(property, nextDefault);
|
|
1505
|
+
addedDefaults.push(nextDefault);
|
|
1506
|
+
} else if (registeredDefault) {
|
|
1507
|
+
this.registeredExperimentalDefaults.delete(property);
|
|
1508
|
+
removedDefaults.push(registeredDefault);
|
|
1463
1509
|
}
|
|
1464
1510
|
} catch (error) {}
|
|
1465
1511
|
}
|
|
1466
|
-
if (
|
|
1467
|
-
this.configurationRegistry.
|
|
1468
|
-
|
|
1469
|
-
|
|
1512
|
+
if (removedDefaults.length || addedDefaults.length) {
|
|
1513
|
+
this.configurationRegistry.deltaConfiguration({
|
|
1514
|
+
removedDefaults: removedDefaults.length ? removedDefaults : undefined,
|
|
1515
|
+
addedDefaults: addedDefaults.length ? addedDefaults : undefined
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
shouldOverride(value, schema) {
|
|
1520
|
+
if (isUndefined(value)) {
|
|
1521
|
+
return false;
|
|
1522
|
+
}
|
|
1523
|
+
if (this.environmentService.isSessionsWindow && schema.agentsWindow?.default !== undefined) {
|
|
1524
|
+
return !equals(value, schema.agentsWindow?.default);
|
|
1470
1525
|
}
|
|
1526
|
+
return !equals(value, schema.default);
|
|
1471
1527
|
}
|
|
1472
1528
|
};
|
|
1473
|
-
ConfigurationDefaultOverridesContribution = ( __decorate([( __param(0, IWorkbenchAssignmentService)), ( __param(1, IExtensionService)), ( __param(2, IConfigurationService)), ( __param(3, ILogService))], ConfigurationDefaultOverridesContribution));
|
|
1529
|
+
ConfigurationDefaultOverridesContribution = ( __decorate([( __param(0, IWorkbenchAssignmentService)), ( __param(1, IExtensionService)), ( __param(2, IConfigurationService)), ( __param(3, IWorkbenchEnvironmentService)), ( __param(4, ILogService))], ConfigurationDefaultOverridesContribution));
|
|
1474
1530
|
const workbenchContributionsRegistry = ( Registry.as(Extensions$2.Workbench));
|
|
1475
1531
|
workbenchContributionsRegistry.registerWorkbenchContribution(RegisterConfigurationSchemasContribution, LifecyclePhase.Restored);
|
|
1476
1532
|
registerWorkbenchContribution2(
|
|
@@ -1484,7 +1540,7 @@ configurationRegistry.registerConfiguration({
|
|
|
1484
1540
|
properties: {
|
|
1485
1541
|
[APPLY_ALL_PROFILES_SETTING]: {
|
|
1486
1542
|
"type": "array",
|
|
1487
|
-
description: ( localize(
|
|
1543
|
+
description: ( localize(19153, "Configure settings to be applied for all profiles.")),
|
|
1488
1544
|
"default": [],
|
|
1489
1545
|
"scope": ConfigurationScope.APPLICATION,
|
|
1490
1546
|
additionalProperties: true,
|
|
@@ -1493,4 +1549,4 @@ configurationRegistry.registerConfiguration({
|
|
|
1493
1549
|
}
|
|
1494
1550
|
});
|
|
1495
1551
|
|
|
1496
|
-
export { WorkspaceService };
|
|
1552
|
+
export { ConfigurationDefaultOverridesContribution, WorkspaceService };
|
|
@@ -163,7 +163,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
165
|
throw ( new ConfigurationEditingError(( localize(
|
|
166
|
-
|
|
166
|
+
19154,
|
|
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(
|
|
247
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(19155, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(19156, "Open Launch Configuration")) : operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY ? ( localize(19157, "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(
|
|
255
|
+
label: ( localize(19158, "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(
|
|
261
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(19155, "Open Tasks Configuration")) : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(19156, "Open Launch Configuration")) : null;
|
|
262
262
|
if (openStandAloneConfigurationActionLabel) {
|
|
263
263
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
264
|
-
label: ( localize(
|
|
264
|
+
label: ( localize(19159, "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(
|
|
281
|
+
label: ( localize(19159, "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(
|
|
290
|
+
label: ( localize(19158, "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
|
-
|
|
338
|
+
19160,
|
|
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
|
-
|
|
344
|
+
19161,
|
|
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
|
-
|
|
351
|
+
19162,
|
|
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
|
-
|
|
357
|
+
19163,
|
|
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
|
-
|
|
363
|
+
19164,
|
|
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
|
-
|
|
369
|
+
19165,
|
|
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
|
-
|
|
375
|
+
19166,
|
|
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
|
-
|
|
381
|
+
19167,
|
|
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
|
-
|
|
386
|
+
19168,
|
|
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
|
-
|
|
392
|
+
19169,
|
|
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
|
-
|
|
400
|
+
19170,
|
|
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
|
-
|
|
406
|
+
19171,
|
|
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
|
-
|
|
412
|
+
19172,
|
|
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
|
-
|
|
419
|
+
19173,
|
|
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
|
-
|
|
424
|
+
19174,
|
|
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
|
-
|
|
429
|
+
19175,
|
|
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
|
-
|
|
442
|
+
19176,
|
|
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
|
-
|
|
455
|
+
19177,
|
|
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
|
-
|
|
461
|
+
19178,
|
|
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
|
-
|
|
467
|
+
19179,
|
|
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
|
-
|
|
474
|
+
19180,
|
|
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
|
-
|
|
479
|
+
19181,
|
|
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
|
-
|
|
484
|
+
19182,
|
|
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
|
-
|
|
497
|
+
19183,
|
|
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
|
-
|
|
509
|
+
19184,
|
|
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
|
-
|
|
515
|
+
19185,
|
|
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
|
-
|
|
521
|
+
19186,
|
|
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
|
-
|
|
528
|
+
19187,
|
|
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
|
-
|
|
533
|
+
19188,
|
|
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
|
-
|
|
538
|
+
19189,
|
|
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
|
-
|
|
543
|
+
19190,
|
|
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
|
-
|
|
549
|
+
19191,
|
|
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(
|
|
558
|
+
return localize(19192, "User Settings");
|
|
559
559
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
560
|
-
return localize(
|
|
560
|
+
return localize(19193, "Remote User Settings");
|
|
561
561
|
case EditableConfigurationTarget.WORKSPACE:
|
|
562
|
-
return localize(
|
|
562
|
+
return localize(19194, "Workspace Settings");
|
|
563
563
|
case EditableConfigurationTarget.WORKSPACE_FOLDER:
|
|
564
|
-
return localize(
|
|
564
|
+
return localize(19195, "Folder Settings");
|
|
565
565
|
default:
|
|
566
566
|
return "";
|
|
567
567
|
}
|
|
@@ -150,7 +150,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
150
150
|
if (!isUndefinedOrNull(value)) {
|
|
151
151
|
if (typeof value !== "string") {
|
|
152
152
|
throw ( new VariableError(VariableKind.Command, ( localize(
|
|
153
|
-
|
|
153
|
+
19197,
|
|
154
154
|
"Cannot substitute command variable '{0}' because command did not return a result of type string.",
|
|
155
155
|
commandId
|
|
156
156
|
))));
|
|
@@ -250,7 +250,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
250
250
|
async showUserInput(section, variable, inputInfos, variableToCommandMap) {
|
|
251
251
|
if (!inputInfos) {
|
|
252
252
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
253
|
-
|
|
253
|
+
19198,
|
|
254
254
|
"Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
|
|
255
255
|
variable,
|
|
256
256
|
"inputs"
|
|
@@ -260,7 +260,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
260
260
|
if (info) {
|
|
261
261
|
const missingAttribute = attrName => {
|
|
262
262
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
263
|
-
|
|
263
|
+
19199,
|
|
264
264
|
"Input variable '{0}' is of type '{1}' and must include '{2}'.",
|
|
265
265
|
variable,
|
|
266
266
|
info.type,
|
|
@@ -318,7 +318,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
318
318
|
};
|
|
319
319
|
const topValue = variableToCommandMap?.[`input:${variable}`] ?? previousPickedValue ?? info.default;
|
|
320
320
|
if (value === info.default) {
|
|
321
|
-
item.description = ( localize(
|
|
321
|
+
item.description = ( localize(19200, "(Default)"));
|
|
322
322
|
picks.unshift(item);
|
|
323
323
|
} else if (value === topValue) {
|
|
324
324
|
picks.unshift(item);
|
|
@@ -356,7 +356,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
359
|
-
|
|
359
|
+
19201,
|
|
360
360
|
"Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.",
|
|
361
361
|
variable,
|
|
362
362
|
info.command
|
|
@@ -365,14 +365,14 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
365
365
|
}
|
|
366
366
|
default:
|
|
367
367
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
368
|
-
|
|
368
|
+
19202,
|
|
369
369
|
"Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.",
|
|
370
370
|
variable
|
|
371
371
|
))));
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
375
|
-
|
|
375
|
+
19203,
|
|
376
376
|
"Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
|
|
377
377
|
variable
|
|
378
378
|
))));
|
package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js
CHANGED
|
@@ -92,8 +92,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
|
|
|
92
92
|
availableFileSystems.unshift(Schemas.vscodeRemote);
|
|
93
93
|
}
|
|
94
94
|
let workspacePath = await this.fileDialogService.showSaveDialog({
|
|
95
|
-
saveLabel: ( localize(
|
|
96
|
-
title: ( localize(
|
|
95
|
+
saveLabel: ( localize(20091, "Save")),
|
|
96
|
+
title: ( localize(20092, "Save Workspace")),
|
|
97
97
|
filters: WORKSPACE_FILTER,
|
|
98
98
|
defaultUri: joinPath(
|
|
99
99
|
await this.fileDialogService.defaultWorkspacePath(),
|
|
@@ -323,14 +323,14 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
|
|
|
323
323
|
}
|
|
324
324
|
onInvalidWorkspaceConfigurationFileError() {
|
|
325
325
|
const message = ( localize(
|
|
326
|
-
|
|
326
|
+
20093,
|
|
327
327
|
"Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
|
|
328
328
|
));
|
|
329
329
|
this.askToOpenWorkspaceConfigurationFile(message);
|
|
330
330
|
}
|
|
331
331
|
askToOpenWorkspaceConfigurationFile(message) {
|
|
332
332
|
this.notificationService.prompt(Severity.Error, message, [{
|
|
333
|
-
label: ( localize(
|
|
333
|
+
label: ( localize(20094, "Open Workspace Configuration")),
|
|
334
334
|
run: () => this.commandService.executeCommand("workbench.action.openWorkspaceConfigFile")
|
|
335
335
|
}]);
|
|
336
336
|
}
|