@@ -24,7 +24,7 @@ import { VIEWLET_ID as EXPLORER } from '../../contrib/files/common/files.js';
24
24
import { VIEWLET_ID as REMOTE } from '../../contrib/remote/browser/remoteExplorer.js' ;
25
25
import { VIEWLET_ID as SCM } from '../../contrib/scm/common/scm.js' ;
26
26
import { 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' ;
28
28
import { ExtensionMessageCollector , ExtensionsRegistry , IExtensionPoint , IExtensionPointUser } from '../../services/extensions/common/extensionsRegistry.js' ;
29
29
import { ILogService } from '../../../platform/log/common/log.js' ;
30
30
import { IExtensionFeatureTableRenderer , IRenderedData , ITableData , IRowData , IExtensionFeaturesRegistry , Extensions as ExtensionFeaturesRegistryExtensions } from '../../services/extensionManagement/common/extensionFeatures.js' ;
@@ -70,6 +70,11 @@ export const viewsContainersContribution: IJSONSchema = {
70
70
description : localize ( 'views.container.panel' , "Contribute views containers to Panel" ) ,
71
71
type : 'array' ,
72
72
items : viewsContainerSchema
73
+ } ,
74
+ 'secondarySidebar' : {
75
+ description : localize ( 'views.container.secondarySidebar' , "Contribute views containers to Secondary Side Bar" ) ,
76
+ type : 'array' ,
77
+ items : viewsContainerSchema
73
78
}
74
79
} ,
75
80
additionalProperties : false
@@ -301,6 +306,8 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
301
306
const viewContainersRegistry = Registry . as < IViewContainersRegistry > ( ViewContainerExtensions . ViewContainersRegistry ) ;
302
307
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry . all . filter ( v => ! ! v . extensionId && viewContainersRegistry . getViewContainerLocation ( v ) === ViewContainerLocation . Sidebar ) . length ;
303
308
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 ;
304
311
for ( const { value, collector, description } of extensionPoints ) {
305
312
Object . entries ( value ) . forEach ( ( [ key , value ] ) => {
306
313
if ( ! this . isValidViewsContainer ( value , collector ) ) {
@@ -313,6 +320,10 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
313
320
case 'panel' :
314
321
panelOrder = this . registerCustomViewContainers ( value , description , panelOrder , existingViewContainers , ViewContainerLocation . Panel ) ;
315
322
break ;
323
+ case 'secondarySideBar' :
324
+ checkProposedApiEnabled ( description , 'contribSecondarySideBar' ) ;
325
+ auxiliaryBarOrder = this . registerCustomViewContainers ( value , description , auxiliaryBarOrder , existingViewContainers , ViewContainerLocation . AuxiliaryBar ) ;
326
+ break ;
316
327
}
317
328
} ) ;
318
329
}
0 commit comments