Skip to content
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

Remove slow task provider warning #90081

Merged
merged 2 commits into from Feb 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
Expand Up @@ -1354,34 +1354,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer

private async provideTasksWithWarning(provider: ITaskProvider, type: string, validTypes: IStringDictionary<boolean>): Promise<TaskSet> {
return new Promise<TaskSet>(async (resolve, reject) => {
let isDone = false;
provider.provideTasks(validTypes).then((value) => {
isDone = true;
resolve(value);
}, (e) => {
isDone = true;
reject(e);
});
let settingValue: boolean | string[] = this.configurationService.getValue('task.slowProviderWarning');
if ((settingValue === true) || (Types.isStringArray(settingValue) && (settingValue.indexOf(type) < 0))) {
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', 'off') };
const dontShow: IPromptChoice = {
label: nls.localize('TaskSystem.slowProvider.dontShow', "Don't warn again for {0} tasks", type), run: () => {
if (!Types.isStringArray(settingValue)) {
settingValue = [];
}
settingValue.push(type);
return this.configurationService.updateValue('task.slowProviderWarning', settingValue);
}
};
this.notificationService.prompt(Severity.Warning, nls.localize('TaskSystem.slowProvider', "The {0} task provider is slow. The extension that provides {0} tasks may provide a setting to disable it, or you can disable all tasks providers", type),
[settings, disableAll, dontShow]);
}
}, 4000);
}
});
}

Expand Down