diff --git a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts index f334bfc59fa..cc1983fb53b 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts @@ -338,8 +338,7 @@ Registry.as(ExtensionFeaturesExtensions.ExtensionFea label: nls.localize('chat', "Chat"), description: nls.localize('chatFeatureDescription', "Allows the extension to make requests to the Large Language Model (LLM)."), access: { - canToggle: true, - requireUserConsent: true, + canToggle: false, }, renderer: new SyncDescriptor(ChatFeatureMarkdowneRenderer), }); diff --git a/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.ts b/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.ts index 460eaafc515..fe6bee617fb 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.ts @@ -104,19 +104,20 @@ class ExtensionFeaturesManagementService extends Disposable implements IExtensio } if (featureState.disabled === undefined) { - const extensionDescription = this.extensionService.extensions.find(e => ExtensionIdentifier.equals(e.identifier, extension)); - const confirmationResult = await this.dialogService.confirm({ - title: localize('accessExtensionFeature', "Access '{0}' Feature", feature.label), - message: localize('accessExtensionFeatureMessage', "'{0}' extension would like to access the '{1}' feature.", extensionDescription?.displayName ?? extension.value, feature.label), - detail: justification ?? feature.description, - custom: true, - primaryButton: localize('allow', "Allow"), - cancelButton: localize('disallow', "Don't Allow"), - }); - this.setEnablement(extension, featureId, confirmationResult.confirmed); - if (!confirmationResult.confirmed) { - return false; + let enabled = true; + if (feature.access.requireUserConsent) { + const extensionDescription = this.extensionService.extensions.find(e => ExtensionIdentifier.equals(e.identifier, extension)); + const confirmationResult = await this.dialogService.confirm({ + title: localize('accessExtensionFeature', "Access '{0}' Feature", feature.label), + message: localize('accessExtensionFeatureMessage', "'{0}' extension would like to access the '{1}' feature.", extensionDescription?.displayName ?? extension.value, feature.label), + detail: justification ?? feature.description, + custom: true, + primaryButton: localize('allow', "Allow"), + cancelButton: localize('disallow', "Don't Allow"), + }); + enabled = confirmationResult.confirmed; } + this.setEnablement(extension, featureId, enabled); } featureState.accessData.current = {