@@ -2852,6 +2852,7 @@ class LayoutStateModel extends Disposable {
28522852 // - revisit this when/if the default value of workbench.secondarySideBar.defaultVisibility changes
28532853 // - revisit this when Chat is available in serverless web
28542854 // - drop the need to probe for chat.setupContext
2855+ // - drop the need to probe for chat.hideAIFeatures
28552856 // - drop the need to probe for view location of workbench.panel.chat.view.copilot
28562857 const configuration = this . configurationService . inspect ( WorkbenchLayoutSettings . AUXILIARYBAR_DEFAULT_VISIBILITY ) ;
28572858 if ( configuration . defaultValue !== 'hidden' && ! isConfigured ( configuration ) ) {
@@ -2860,7 +2861,7 @@ class LayoutStateModel extends Disposable {
28602861 }
28612862
28622863 const context = this . storageService . getObject < { hidden ?: boolean ; disabled ?: boolean ; installed ?: boolean } > ( 'chat.setupContext' , StorageScope . PROFILE ) ;
2863- if ( context && ( ( context . installed && context . disabled ) || ( ! context . installed && context . hidden ) ) ) {
2864+ if ( context && ( ( context . installed && context . disabled ) || ( ! context . installed && context . hidden ) || ( ! context . installed && this . configurationService . getValue ( 'chat.hideAIFeatures' ) === true ) ) ) {
28642865 return true ; // Chat view is hidden by user choice
28652866 }
28662867
@@ -2870,6 +2871,12 @@ class LayoutStateModel extends Disposable {
28702871 }
28712872 }
28722873
2874+ // New users: Show auxiliary bar even in empty workspaces
2875+ if ( this . storageService . isNew ( StorageScope . APPLICATION ) ) {
2876+ return false ;
2877+ }
2878+
2879+ // Existing users: respect visibility setting
28732880 switch ( this . configurationService . getValue ( WorkbenchLayoutSettings . AUXILIARYBAR_DEFAULT_VISIBILITY ) ) {
28742881 case 'maximized' :
28752882 case 'visible' :
@@ -2893,7 +2900,7 @@ class LayoutStateModel extends Disposable {
28932900 }
28942901
28952902 // Apply all overrides
2896- this . applyOverrides ( configuration ) ;
2903+ this . applyOverrides ( ) ;
28972904
28982905 // Register for runtime key changes
28992906 this . _register ( this . storageService . onDidChangeValue ( StorageScope . PROFILE , undefined , this . _store ) ( storageChangeEvent => {
@@ -2913,18 +2920,10 @@ class LayoutStateModel extends Disposable {
29132920 } ) ) ;
29142921 }
29152922
2916- private applyOverrides ( configuration : ILayoutStateLoadConfiguration ) : void {
2917-
2918- // Auxiliary bar: Showing for new users
2919- if (
2920- this . storageService . isNew ( StorageScope . APPLICATION ) &&
2921- this . contextService . getWorkbenchState ( ) === WorkbenchState . EMPTY
2922- ) {
2923- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN , false ) ;
2924- }
2923+ private applyOverrides ( ) : void {
29252924
2926- // Auxiliary bar: Based on setting for new workspaces
2927- else if ( this . isNew [ StorageScope . WORKSPACE ] ) {
2925+ // Auxiliary bar: Maximized setting ( new workspaces)
2926+ if ( this . isNew [ StorageScope . WORKSPACE ] ) {
29282927 const defaultAuxiliaryBarVisibility = this . configurationService . getValue ( WorkbenchLayoutSettings . AUXILIARYBAR_DEFAULT_VISIBILITY ) ;
29292928 if (
29302929 defaultAuxiliaryBarVisibility === 'maximized' ||
0 commit comments