@@ -24,7 +24,7 @@ import { VIEWLET_ID as EXPLORER } from '../../contrib/files/common/files.js';
2424import { VIEWLET_ID as REMOTE } from '../../contrib/remote/browser/remoteExplorer.js' ;
2525import { VIEWLET_ID as SCM } from '../../contrib/scm/common/scm.js' ;
2626import { WebviewViewPane } from '../../contrib/webviewView/browser/webviewViewPane.js' ;
27- import { isProposedApiEnabled } from '../../services/extensions/common/extensions.js' ;
27+ import { checkProposedApiEnabled , isProposedApiEnabled } from '../../services/extensions/common/extensions.js' ;
2828import { ExtensionMessageCollector , ExtensionsRegistry , IExtensionPoint , IExtensionPointUser } from '../../services/extensions/common/extensionsRegistry.js' ;
2929import { ILogService } from '../../../platform/log/common/log.js' ;
3030import { IExtensionFeatureTableRenderer , IRenderedData , ITableData , IRowData , IExtensionFeaturesRegistry , Extensions as ExtensionFeaturesRegistryExtensions } from '../../services/extensionManagement/common/extensionFeatures.js' ;
@@ -70,6 +70,11 @@ export const viewsContainersContribution: IJSONSchema = {
7070 description : localize ( 'views.container.panel' , "Contribute views containers to Panel" ) ,
7171 type : 'array' ,
7272 items : viewsContainerSchema
73+ } ,
74+ 'secondarySidebar' : {
75+ description : localize ( 'views.container.secondarySidebar' , "Contribute views containers to Secondary Side Bar" ) ,
76+ type : 'array' ,
77+ items : viewsContainerSchema
7378 }
7479 } ,
7580 additionalProperties : false
@@ -301,6 +306,8 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
301306 const viewContainersRegistry = Registry . as < IViewContainersRegistry > ( ViewContainerExtensions . ViewContainersRegistry ) ;
302307 let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry . all . filter ( v => ! ! v . extensionId && viewContainersRegistry . getViewContainerLocation ( v ) === ViewContainerLocation . Sidebar ) . length ;
303308 let panelOrder = 5 + viewContainersRegistry . all . filter ( v => ! ! v . extensionId && viewContainersRegistry . getViewContainerLocation ( v ) === ViewContainerLocation . Panel ) . length + 1 ;
309+ // offset by 100 because the chat view container used to have order 100 (now 1). Due to caching, we still need to account for the original order value
310+ let auxiliaryBarOrder = 100 + viewContainersRegistry . all . filter ( v => ! ! v . extensionId && viewContainersRegistry . getViewContainerLocation ( v ) === ViewContainerLocation . AuxiliaryBar ) . length + 1 ;
304311 for ( const { value, collector, description } of extensionPoints ) {
305312 Object . entries ( value ) . forEach ( ( [ key , value ] ) => {
306313 if ( ! this . isValidViewsContainer ( value , collector ) ) {
@@ -313,6 +320,10 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
313320 case 'panel' :
314321 panelOrder = this . registerCustomViewContainers ( value , description , panelOrder , existingViewContainers , ViewContainerLocation . Panel ) ;
315322 break ;
323+ case 'secondarySideBar' :
324+ checkProposedApiEnabled ( description , 'contribSecondarySideBar' ) ;
325+ auxiliaryBarOrder = this . registerCustomViewContainers ( value , description , auxiliaryBarOrder , existingViewContainers , ViewContainerLocation . AuxiliaryBar ) ;
326+ break ;
316327 }
317328 } ) ;
318329 }
0 commit comments