Change:
On the latest Stable or Insiders, the Copilot setting button does not show up in the Settings editor when the Copilot extension is disabled or not installed. ! removed the dependency on the assignment/experimentation service incorrectly, and ended up making it so that the feature was only available in OSS aka from-source builds. The main branch fix is available in The candidate PR is available in . [x] Set up a candidate PR

Discussion:
import { Registry } from 'vs/platform/registry/common/platform'; import { defaultButtonStyles } from 'vs/platform/theme/browser/defaultStyles'; import { IProductService } from 'vs/platform/product/common/productService'; <del> import { IEnvironmentService } from 'vs/platform/environment/common/environment'; </del> import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands'; import { IEditorProgressService } from 'vs/platform/progress/common/progress';

@ILanguageService private readonly languageService: ILanguageService, @IExtensionManagementService extensionManagementService: IExtensionManagementService, @IProductService private readonly productService: IProductService, <del> @IEnvironmentService private readonly environmentService: IEnvironmentService, </del> @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, @IEditorProgressService private readonly editorProgressService: IEditorProgressService, ) {

} const additionalGroups: ISettingsGroup[] = []; <del> const toggleData = await getExperimentalExtensionToggleData(this.extensionGalleryService, this.environmentService, this.productService); </del> <ins> const toggleData = await getExperimentalExtensionToggleData(this.extensionGalleryService, this.productService); </ins> if (toggleData && groups.filter(g => g.extensionInfo).length) { for (const key in toggleData.settingsEditorRecommendedExtensions) { const extension = toggleData.recommendedExtensionsGalleryInfo[key];

import { IStringDictionary } from 'vs/base/common/collections'; import { IExtensionRecommendations } from 'vs/base/common/product'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; <del> import { IEnvironmentService } from 'vs/platform/environment/common/environment'; </del> import { IExtensionGalleryService, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IProductService } from 'vs/platform/product/common/productService';

let cachedExtensionToggleData: ExtensionToggleData | undefined; <del> export async function getExperimentalExtensionToggleData(extensionGalleryService: IExtensionGalleryService, environmentService: IEnvironmentService, productService: IProductService): Promise<ExtensionToggleData | undefined> { </del> <ins> export async function getExperimentalExtensionToggleData(extensionGalleryService: IExtensionGalleryService, productService: IProductService): Promise<ExtensionToggleData | undefined> { </ins> if (!ENABLE_EXTENSION_TOGGLE_SETTINGS) { return undefined; }

return cachedExtensionToggleData; } <del> if (!environmentService.isBuilt && productService.extensionRecommendations && productService.commonlyUsedSettings) { </del> <ins> if (productService.extensionRecommendations && productService.commonlyUsedSettings) { </ins> const settingsEditorRecommendedExtensions: IStringDictionary<IExtensionRecommendations> = {}; Object.keys(productService.extensionRecommendations).forEach(extensionId => { const extensionInfo = productService.extensionRecommendations![extensionId];