Skip to content

Commit b364238

Browse files
author
Loïc Mangeonjean
committed
fix: remove check that prevents ai-chat to be open by default is web-only envs
1 parent 614aba6 commit b364238

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= <loic@coderpad.io>
3+
Date: Thu, 18 Jun 2026 14:22:52 +0200
4+
Subject: [PATCH] fix: remove useless check that prevents ai-assist from being
5+
open by default on web mode
6+
7+
---
8+
src/vs/workbench/browser/layout.ts | 9 ++-------
9+
1 file changed, 2 insertions(+), 7 deletions(-)
10+
11+
diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts
12+
index 6c141511d50..c1086090eeb 100644
13+
--- a/src/vs/workbench/browser/layout.ts
14+
+++ b/src/vs/workbench/browser/layout.ts
15+
@@ -695,7 +695,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
16+
private initLayoutState(lifecycleService: ILifecycleService, fileService: IFileService): void {
17+
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)
18+
19+
- this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService, this.environmentService);
20+
+ this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService);
21+
this.stateModel.load({
22+
mainContainerDimension: this._mainContainerDimension,
23+
resetLayout: Boolean(this.layoutOptions?.resetLayout)
24+
@@ -2881,8 +2881,7 @@ class LayoutStateModel extends Disposable {
25+
constructor(
26+
private readonly storageService: IStorageService,
27+
private readonly configurationService: IConfigurationService,
28+
- private readonly contextService: IWorkspaceContextService,
29+
- private readonly environmentService: IBrowserWorkbenchEnvironmentService,
30+
+ private readonly contextService: IWorkspaceContextService
31+
) {
32+
super();
33+
34+
@@ -2953,10 +2952,6 @@ class LayoutStateModel extends Disposable {
35+
LayoutStateKeys.SIDEBAR_HIDDEN.defaultValue = workbenchState === WorkbenchState.EMPTY || auxiliaryBarForceMaximized === true;
36+
LayoutStateKeys.AUXILIARYBAR_SIZE.defaultValue = auxiliaryBarForceMaximized ? Math.max(300, mainContainerDimension.width / 2) : Math.min(300, mainContainerDimension.width / 4);
37+
LayoutStateKeys.AUXILIARYBAR_HIDDEN.defaultValue = (() => {
38+
- if (isWeb && !this.environmentService.remoteAuthority) {
39+
- return true; // not required in web if unsupported
40+
- }
41+
-
42+
if (auxiliaryBarForceMaximized === true) {
43+
return false; // forced to be visible
44+
}

0 commit comments

Comments
 (0)