@@ -2846,16 +2846,16 @@ class LayoutStateModel extends Disposable {
28462846 LayoutStateKeys . SIDEBAR_HIDDEN . defaultValue = workbenchState === WorkbenchState . EMPTY ;
28472847 LayoutStateKeys . AUXILIARYBAR_SIZE . defaultValue = Math . min ( 300 , mainContainerDimension . width / 4 ) ;
28482848 LayoutStateKeys . AUXILIARYBAR_HIDDEN . defaultValue = ( ( ) => {
2849-
2850- // TODO@bpasero : lots of hacks here to not force open the auxiliary sidebar
2851- // when no Chat view is present within:
2852- // - revisit this when/if the default value of workbench.secondarySideBar.defaultVisibility changes
2853- // - revisit this when Chat is available in serverless web
2854- // - drop the need to probe for chat.setupContext
2855- // - drop the need to probe for chat.hideAIFeatures
2856- // - drop the need to probe for view location of workbench.panel.chat.view.copilot
28572849 const configuration = this . configurationService . inspect ( WorkbenchLayoutSettings . AUXILIARYBAR_DEFAULT_VISIBILITY ) ;
28582850 if ( configuration . defaultValue !== 'hidden' && ! isConfigured ( configuration ) ) {
2851+
2852+ // TODO@bpasero : lots of hacks here to not force open the auxiliary sidebar
2853+ // when no Chat view is present within:
2854+ // - revisit this when Chat is available in serverless web
2855+ // - drop the need to probe for chat.setupContext
2856+ // - drop the need to probe for chat.hideAIFeatures
2857+ // - drop the need to probe for view location of workbench.panel.chat.view.copilot
2858+
28592859 if ( isWeb && ! this . environmentService . remoteAuthority ) {
28602860 return true ; // Chat view is not enabled
28612861 }
@@ -2872,20 +2872,23 @@ class LayoutStateModel extends Disposable {
28722872 }
28732873
28742874 // New users: Show auxiliary bar even in empty workspaces
2875- if ( this . storageService . isNew ( StorageScope . APPLICATION ) ) {
2875+ // but not if the user explicitly hides it
2876+ if (
2877+ this . storageService . isNew ( StorageScope . APPLICATION ) &&
2878+ configuration . value !== 'hidden'
2879+ ) {
28762880 return false ;
28772881 }
28782882
28792883 // Existing users: respect visibility setting
2880- switch ( this . configurationService . getValue ( WorkbenchLayoutSettings . AUXILIARYBAR_DEFAULT_VISIBILITY ) ) {
2881- case 'maximized' :
2882- case 'visible' :
2883- return false ;
2884+ switch ( configuration . value ) {
2885+ case 'hidden' :
2886+ return true ;
28842887 case 'visibleInWorkspace' :
28852888 case 'maximizedInWorkspace' :
28862889 return workbenchState === WorkbenchState . EMPTY ;
28872890 default :
2888- return true ;
2891+ return false ;
28892892 }
28902893 } ) ( ) ;
28912894 LayoutStateKeys . PANEL_SIZE . defaultValue = ( this . stateCache . get ( LayoutStateKeys . PANEL_POSITION . name ) ?? isHorizontal ( LayoutStateKeys . PANEL_POSITION . defaultValue ) ) ? mainContainerDimension . height / 3 : mainContainerDimension . width / 4 ;
0 commit comments