Skip to content

add error if tag contains onexp and experiment property is not set #257112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename
  • Loading branch information
sandy081 committed Jul 21, 2025
commit bbd176dd78aca92cc6261533362f78071691fe34
10 changes: 5 additions & 5 deletions src/vs/editor/common/config/editorConfigurationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const editorConfiguration: IConfigurationNode = {
markdownDescription: nls.localize('editor.experimental.treeSitterTelemetry', "Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.experimental.preferTreeSitter.css': {
Expand All @@ -126,7 +126,7 @@ const editorConfiguration: IConfigurationNode = {
markdownDescription: nls.localize('editor.experimental.preferTreeSitter.css', "Controls whether tree sitter parsing should be turned on for css. This will take precedence over `editor.experimental.treeSitterTelemetry` for css."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.experimental.preferTreeSitter.typescript': {
Expand All @@ -135,7 +135,7 @@ const editorConfiguration: IConfigurationNode = {
markdownDescription: nls.localize('editor.experimental.preferTreeSitter.typescript', "Controls whether tree sitter parsing should be turned on for typescript. This will take precedence over `editor.experimental.treeSitterTelemetry` for typescript."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.experimental.preferTreeSitter.ini': {
Expand All @@ -144,7 +144,7 @@ const editorConfiguration: IConfigurationNode = {
markdownDescription: nls.localize('editor.experimental.preferTreeSitter.ini', "Controls whether tree sitter parsing should be turned on for ini. This will take precedence over `editor.experimental.treeSitterTelemetry` for ini."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.experimental.preferTreeSitter.regex': {
Expand All @@ -153,7 +153,7 @@ const editorConfiguration: IConfigurationNode = {
markdownDescription: nls.localize('editor.experimental.preferTreeSitter.regex', "Controls whether tree sitter parsing should be turned on for regex. This will take precedence over `editor.experimental.treeSitterTelemetry` for regex."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.language.brackets': {
Expand Down
6 changes: 3 additions & 3 deletions src/vs/editor/common/config/editorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4471,7 +4471,7 @@ class InlineEditorSuggest extends BaseEditorOption<EditorOption.inlineSuggest, I
tags: ['experimental'],
description: nls.localize('inlineSuggest.suppressInlineSuggestions', "Suppresses inline completions for specified extension IDs -- comma separated."),
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.inlineSuggest.experimental.triggerCommandOnProviderChange': {
Expand All @@ -4480,7 +4480,7 @@ class InlineEditorSuggest extends BaseEditorOption<EditorOption.inlineSuggest, I
tags: ['experimental'],
description: nls.localize('inlineSuggest.triggerCommandOnProviderChange', "Controls whether to trigger a command when the inline suggestion provider changes."),
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'editor.inlineSuggest.fontFamily': {
Expand Down Expand Up @@ -6335,7 +6335,7 @@ export const EditorOptions = {
{
description: nls.localize('quickSuggestionsDelay', "Controls the delay in milliseconds after which quick suggestions will show up."),
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
}
)),
Expand Down
8 changes: 5 additions & 3 deletions src/vs/platform/configuration/common/configurationRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,11 @@ export interface IConfigurationPropertySchema extends IJSONSchema {
*/
experiment?: {
/**
* Whether to automatically update the setting default value when the experiment value changes.
* The mode of the experiment.
* - `startup`: The setting value is updated to the experiment value only on startup.
* - `auto`: The setting value is updated to the experiment value automatically (whenever the experiment value changes).
*/
allowAutoUpdate: boolean;
mode: 'startup' | 'auto';

/**
* The name of the experiment. By default, this is `config.${settingId}`
Expand Down Expand Up @@ -679,7 +681,7 @@ class ConfigurationRegistry extends Disposable implements IConfigurationRegistry
}
} else if (property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {
console.error(`Invalid tag 'onExP' found for property '${key}'. Please use 'experiment' property instead.`);
property.experiment = { allowAutoUpdate: false };
property.experiment = { mode: 'startup' };
}

const excluded = properties[key].hasOwnProperty('included') && !properties[key].included;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/configurationExtensionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
}
if (propertyConfiguration.tags?.some(tag => tag.toLowerCase() === 'onexp')) {
propertyConfiguration.experiment = {
allowAutoUpdate: false
mode: 'startup'
};
}
seenProperties.add(key);
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/workbench.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
'enum': ['hidden', 'visibleInWorkspace', 'visible', 'maximizedInWorkspace', 'maximized'],
'default': 'hidden',
'experiment': {
allowAutoUpdate: false
mode: 'startup'
},
'description': localize('secondarySideBarDefaultVisibility', "Controls the default visibility of the secondary side bar in workspaces or empty windows opened for the first time."),
'enumDescriptions': [
Expand Down Expand Up @@ -630,7 +630,7 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
'description': localize('settings.showAISearchToggle', "Controls whether the AI search results toggle is shown in the search bar in the Settings editor after doing a search and once AI search results are available."),
'tags': ['experimental'],
'experiment': {
allowAutoUpdate: false
mode: 'startup'
}
},
'workbench.hover.delay': {
Expand Down
10 changes: 5 additions & 5 deletions src/vs/workbench/contrib/chat/browser/chat.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ configurationRegistry.registerConfiguration({
default: 'inline',
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'chat.emptyChatState.enabled': {
Expand All @@ -272,7 +272,7 @@ configurationRegistry.registerConfiguration({
description: nls.localize('chat.emptyChatState', "Shows a modified empty chat state with hints in the input placeholder text."),
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
'chat.checkpoints.enabled': {
Expand Down Expand Up @@ -329,7 +329,7 @@ configurationRegistry.registerConfiguration({
description: nls.localize('chat.edits2Enabled', "Enable the new Edits mode that is based on tool-calling. When this is enabled, models that don't support tool-calling are unavailable for Edits mode."),
default: true,
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
[ChatConfiguration.ExtensionToolsEnabled]: {
Expand All @@ -347,7 +347,7 @@ configurationRegistry.registerConfiguration({
description: nls.localize('chat.agent.enabled.description', "Enable agent mode for {0}. When this is enabled, agent mode can be activated via the dropdown in the view.", 'Copilot Chat'),
default: true,
experiment: {
allowAutoUpdate: false
mode: 'startup'
},
policy: {
name: 'ChatAgentMode',
Expand Down Expand Up @@ -512,7 +512,7 @@ configurationRegistry.registerConfiguration({
default: 'default',
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ configurationRegistry.registerConfiguration({
default: false,
tags: ['experimental'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
[EDIT_TELEMETRY_SHOW_STATUS_BAR]: {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/inlineChat/common/inlineChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
type: 'boolean',
tags: ['preview'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
[InlineChatConfigKeys.HideOnRequest]: {
Expand All @@ -74,7 +74,7 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
type: 'boolean',
tags: ['preview'],
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Registry.as<IConfigurationRegistry>(ConfigExt.Configuration).registerConfigurati
tags: ['experimental'],
markdownDescription: localize('experimental.rendererProfiling', "When enabled, slow renderers are automatically profiled."),
experiment: {
allowAutoUpdate: false
mode: 'startup'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ class ConfigurationDefaultOverridesContribution extends Disposable implements IW
continue;
}
this.processedExperimentalSettings.add(property);
if (schema.experiment.allowAutoUpdate) {
if (schema.experiment.mode === 'auto') {
this.autoRefetchExperimentalSettings.add(property);
}
try {
Expand Down
Loading