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

some fixes #204636

Merged
merged 1 commit into from
Feb 7, 2024
Merged

some fixes #204636

Show file tree
Hide file tree
Changes from all commits
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
8 changes: 1 addition & 7 deletions src/vs/workbench/contrib/chat/browser/chat.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,8 @@ class ChatFeatureMarkdowneRenderer extends Disposable implements IExtensionFeatu

shouldRender(manifest: IExtensionManifest): boolean {
const extensionId = new ExtensionIdentifier(getExtensionId(manifest.publisher, manifest.name));
if (!this.extensionFeaturesManagementService.isEnabled(extensionId, CHAT_FEATURE_ID)) {
return true;
}
const accessData = this.extensionFeaturesManagementService.getAccessData(extensionId, CHAT_FEATURE_ID);
if (accessData?.totalCount) {
return true;
}
return false;
return !!accessData;
}

render(manifest: IExtensionManifest): IRenderedData<IMarkdownString> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export interface IExtensionFeatureDescriptor {
readonly access: {
readonly canToggle?: boolean;
readonly requireUserConsent?: boolean;
readonly default?: boolean;
readonly extensionsList?: IStringDictionary<boolean>;
};
readonly renderer: SyncDescriptor<IExtensionFeatureRenderer>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ExtensionFeaturesManagementService extends Disposable implements IExtensio
if (isBoolean(defaultExtensionAccess)) {
return defaultExtensionAccess;
}
return !!feature.access.default;
return !feature.access.requireUserConsent;
}

setEnablement(extension: ExtensionIdentifier, featureId: string, enabled: boolean): void {
Expand Down