From 614aba619e214ac51f8d60a9cccc24681f068a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Jun 2026 14:30:04 +0200 Subject: [PATCH 1/4] fix: invalidate default configuration cache when given default configuration changes --- ...-configuration-scope-rely-on-the-has.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vscode-patches/0100-fix-make-default-configuration-scope-rely-on-the-has.patch diff --git a/vscode-patches/0100-fix-make-default-configuration-scope-rely-on-the-has.patch b/vscode-patches/0100-fix-make-default-configuration-scope-rely-on-the-has.patch new file mode 100644 index 00000000..3e9ac14e --- /dev/null +++ b/vscode-patches/0100-fix-make-default-configuration-scope-rely-on-the-has.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= +Date: Thu, 18 Jun 2026 14:21:14 +0200 +Subject: [PATCH] fix: make default configuration scope rely on the hash of the + default configuration + +so that if the default configuration changes, it's not completely ignored at first +--- + .../services/configuration/browser/configuration.ts | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/vs/workbench/services/configuration/browser/configuration.ts b/src/vs/workbench/services/configuration/browser/configuration.ts +index a83c04f4d13..0a9e654bf24 100644 +--- a/src/vs/workbench/services/configuration/browser/configuration.ts ++++ b/src/vs/workbench/services/configuration/browser/configuration.ts +@@ -45,8 +45,10 @@ export class DefaultConfiguration extends BaseDefaultConfiguration { + ) { + super(logService); + this.cacheKey = { type: 'defaults', key: `${cacheScope}-configurationDefaultsOverrides` }; +- if (environmentService.options?.configurationDefaults) { +- this.configurationRegistry.registerDefaultConfigurations([{ overrides: environmentService.options.configurationDefaults as IStringDictionary> }]); ++ const configurationDefaults = environmentService.options?.configurationDefaults; ++ if (configurationDefaults) { ++ this.configurationRegistry.registerDefaultConfigurations([{ overrides: configurationDefaults as IStringDictionary> }]); ++ this.cacheKey = { type: 'defaults', key: `${cacheScope}-${hash(configurationDefaults).toString(16)}-configurationDefaultsOverrides` }; + } + } + From b364238fa2488f2943e2bb949335f526af50b320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Jun 2026 14:30:33 +0200 Subject: [PATCH 2/4] fix: remove check that prevents ai-chat to be open by default is web-only envs --- ...ss-check-that-prevents-ai-assist-fro.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vscode-patches/0101-fix-remove-useless-check-that-prevents-ai-assist-fro.patch diff --git a/vscode-patches/0101-fix-remove-useless-check-that-prevents-ai-assist-fro.patch b/vscode-patches/0101-fix-remove-useless-check-that-prevents-ai-assist-fro.patch new file mode 100644 index 00000000..004f9204 --- /dev/null +++ b/vscode-patches/0101-fix-remove-useless-check-that-prevents-ai-assist-fro.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= +Date: Thu, 18 Jun 2026 14:22:52 +0200 +Subject: [PATCH] fix: remove useless check that prevents ai-assist from being + open by default on web mode + +--- + src/vs/workbench/browser/layout.ts | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts +index 6c141511d50..c1086090eeb 100644 +--- a/src/vs/workbench/browser/layout.ts ++++ b/src/vs/workbench/browser/layout.ts +@@ -695,7 +695,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi + private initLayoutState(lifecycleService: ILifecycleService, fileService: IFileService): void { + this._mainContainerDimension = getClientArea(this.parent, this.contextService.getWorkbenchState() === WorkbenchState.EMPTY ? DEFAULT_EMPTY_WINDOW_DIMENSIONS : DEFAULT_WORKSPACE_WINDOW_DIMENSIONS); // running with fallback to ensure no error is thrown (https://github.com/microsoft/vscode/issues/240242) + +- this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService, this.environmentService); ++ this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService); + this.stateModel.load({ + mainContainerDimension: this._mainContainerDimension, + resetLayout: Boolean(this.layoutOptions?.resetLayout) +@@ -2881,8 +2881,7 @@ class LayoutStateModel extends Disposable { + constructor( + private readonly storageService: IStorageService, + private readonly configurationService: IConfigurationService, +- private readonly contextService: IWorkspaceContextService, +- private readonly environmentService: IBrowserWorkbenchEnvironmentService, ++ private readonly contextService: IWorkspaceContextService + ) { + super(); + +@@ -2953,10 +2952,6 @@ class LayoutStateModel extends Disposable { + LayoutStateKeys.SIDEBAR_HIDDEN.defaultValue = workbenchState === WorkbenchState.EMPTY || auxiliaryBarForceMaximized === true; + LayoutStateKeys.AUXILIARYBAR_SIZE.defaultValue = auxiliaryBarForceMaximized ? Math.max(300, mainContainerDimension.width / 2) : Math.min(300, mainContainerDimension.width / 4); + LayoutStateKeys.AUXILIARYBAR_HIDDEN.defaultValue = (() => { +- if (isWeb && !this.environmentService.remoteAuthority) { +- return true; // not required in web if unsupported +- } +- + if (auxiliaryBarForceMaximized === true) { + return false; // forced to be visible + } From 4c892b31fd9cf4ddeba01b365e9c2d03a508bafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Jun 2026 14:30:51 +0200 Subject: [PATCH 3/4] fix: add missing export --- src/service-override/chat.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/service-override/chat.ts b/src/service-override/chat.ts index 7fe5f639..9de025fd 100644 --- a/src/service-override/chat.ts +++ b/src/service-override/chat.ts @@ -41,7 +41,10 @@ import { ILanguageModelIgnoredFilesService } from 'vs/workbench/contrib/chat/com import { IChatMarkdownAnchorService } from 'vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.service' import { ChatMarkdownAnchorService } from 'vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService' import { ChatEditingService } from 'vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl' -import { ChatEntitlementService } from 'vs/workbench/services/chat/common/chatEntitlementService' +import { + ChatEntitlementService, + ChatEntitlement +} from 'vs/workbench/services/chat/common/chatEntitlementService' import { PromptsService } from 'vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl' import { IChatEntitlementService } from 'vs/workbench/services/chat/common/chatEntitlementService.service' import { IPromptsService } from 'vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service' @@ -410,4 +413,4 @@ export default function getServiceOverride({ } } -export type { IDefaultAccount } +export { type IDefaultAccount, ChatEntitlement } From c28eaf5e38026b3468dd21ee15af88254dc3b738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Jun 2026 14:31:57 +0200 Subject: [PATCH 4/4] fix(demo): configure chat entitlement out of the box --- demo/src/setup.common.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/demo/src/setup.common.ts b/demo/src/setup.common.ts index e2cc0d00..a34eb8c2 100644 --- a/demo/src/setup.common.ts +++ b/demo/src/setup.common.ts @@ -52,7 +52,9 @@ import getWorkspaceTrustOverride from '@codingame/monaco-vscode-workspace-trust- import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override' import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override' import getTestingServiceOverride from '@codingame/monaco-vscode-testing-service-override' -import getChatServiceOverride from '@codingame/monaco-vscode-chat-service-override' +import getChatServiceOverride, { + ChatEntitlement +} from '@codingame/monaco-vscode-chat-service-override' import getNotebookServiceOverride from '@codingame/monaco-vscode-notebook-service-override' import getWelcomeServiceOverride from '@codingame/monaco-vscode-welcome-service-override' import getWalkThroughServiceOverride from '@codingame/monaco-vscode-walkthrough-service-override' @@ -433,7 +435,21 @@ export const commonServices: IEditorOverrideServices = { ...getLanguageDetectionWorkerServiceOverride(), ...getStorageServiceOverride({ fallbackOverride: { - 'workbench.activity.showAccounts': false + 'workbench.activity.showAccounts': false, + /** + * VSCode stores in its storage the chat setup state + * We need it to be configured out of the box, with is not supported by VSCode + * Except if we set the desired state in its storage directly, then it will work as if the user had set it up already + */ + 'chat.setupContext': { + entitlement: ChatEntitlement.Enterprise, + organisations: undefined, + sku: undefined, + copilotTrackingId: undefined, + registered: true, + completed: true, + installed: true + } } }), ...getRemoteAgentServiceOverride({ scanRemoteExtensions: true }),