Turn-off file extension recommendations (#10431)

This commit is contained in:
Karl Burtram
2020-05-15 11:05:24 -07:00
committed by GitHub
parent b519d51052
commit 1d1e21b579

View File

@@ -230,6 +230,11 @@ export class FileBasedRecommendations extends ExtensionRecommendations {
} }
private async promptRecommendedExtensionForFileExtension(fileExtension: string, installed: ILocalExtension[]): Promise<void> { private async promptRecommendedExtensionForFileExtension(fileExtension: string, installed: ILocalExtension[]): Promise<void> {
// {{SQL CARBON EDIT}} - Turn off file extension-based extensions until we have a scenario that requires this. The queryGallery isn't working correctly in ADS now.
let enableRecommendation: boolean = false;
if (!enableRecommendation) {
return;
} else {
const fileExtensionSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.GLOBAL, '[]')); const fileExtensionSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.GLOBAL, '[]'));
if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) { if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) {
return; return;
@@ -280,6 +285,7 @@ export class FileBasedRecommendations extends ExtensionRecommendations {
} }
); );
} }
}
private filterInstalled(recommendationsToSuggest: string[], installed: ILocalExtension[]): string[] { private filterInstalled(recommendationsToSuggest: string[], installed: ILocalExtension[]): string[] {
const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set<string>()); const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set<string>());