提交 6a871015 编写于 作者: A Alex Ross

Make task.autoDetect be 'on' 'off' instead of boolean

Fixes #63841
上级 d9cffa3f
......@@ -728,7 +728,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
private isProvideTasksEnabled(): boolean {
const settingValue = this.configurationService.getValue('task.autoDetect');
return settingValue === true;
return settingValue === 'on';
}
private isProblemMatcherPromptEnabled(type?: string): boolean {
......@@ -1341,7 +1341,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
setTimeout(() => {
if (!isDone) {
const settings: IPromptChoice = { label: nls.localize('TaskSystem.slowProvider.settings', "Settings"), run: () => this.preferencesService.openSettings(false, undefined) };
const disableAll: IPromptChoice = { label: nls.localize('TaskSystem.slowProvider.disableAll', "Disable All"), run: () => this.configurationService.updateValue('task.autoDetect', false) };
const disableAll: IPromptChoice = { label: nls.localize('TaskSystem.slowProvider.disableAll', "Disable All"), run: () => this.configurationService.updateValue('task.autoDetect', 'off') };
const dontShow: IPromptChoice = {
label: nls.localize('TaskSystem.slowProvider.dontShow', "Don't warn again for {0} tasks", type), run: () => {
if (!Types.isStringArray(settingValue)) {
......
......@@ -336,8 +336,9 @@ configurationRegistry.registerConfiguration({
},
'task.autoDetect': {
markdownDescription: nls.localize('task.autoDetect', "Controls enablement of `provideTasks` for all task provider extension. If the Tasks: Run Task command is slow, disabling auto detect for task providers may help. Individual extensions my provide settings to disabled auto detection."),
type: 'boolean',
default: true
type: 'string',
enum: ['on', 'off'],
default: 'on'
},
'task.slowProviderWarning': {
markdownDescription: nls.localize('task.slowProviderWarning', "Configures whether a warning is shown when a provider is slow"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册