@@ -1812,6 +1812,7 @@ class SCMInputWidgetToolbar extends WorkbenchToolBar {
1812
1812
1813
1813
constructor (
1814
1814
container : HTMLElement ,
1815
+ input : ISCMInput ,
1815
1816
menuId : MenuId ,
1816
1817
options : IMenuWorkbenchToolBarOptions | undefined ,
1817
1818
@IMenuService menuService : IMenuService ,
@@ -1824,7 +1825,13 @@ class SCMInputWidgetToolbar extends WorkbenchToolBar {
1824
1825
) {
1825
1826
super ( container , { resetMenu : menuId , ...options } , menuService , contextKeyService , contextMenuService , keybindingService , telemetryService ) ;
1826
1827
1827
- const menu = this . _store . add ( menuService . createMenu ( menuId , contextKeyService , { emitEventsForSubmenuChanges : true } ) ) ;
1828
+ const contextKeyServiceWithOverlay = contextKeyService . createOverlay ( [
1829
+ [ 'scmProvider' , input . repository . provider . contextValue ] ,
1830
+ [ 'scmProviderRootUri' , input . repository . provider . rootUri ?. toString ( ) ] ,
1831
+ [ 'scmProviderHasRootUri' , ! ! input . repository . provider . rootUri ]
1832
+ ] ) ;
1833
+
1834
+ const menu = this . _store . add ( menuService . createMenu ( menuId , contextKeyServiceWithOverlay , { emitEventsForSubmenuChanges : true } ) ) ;
1828
1835
1829
1836
const cancelAction = new MenuItemAction ( {
1830
1837
id : SCMInputCommandId . CancelAction ,
@@ -2095,7 +2102,7 @@ class SCMInputWidget {
2095
2102
const actionRunner = instantiationService2 . createInstance ( SCMInputWidgetActionRunner , input ) ;
2096
2103
this . repositoryDisposables . add ( actionRunner ) ;
2097
2104
2098
- const toolbar : SCMInputWidgetToolbar = instantiationService2 . createInstance ( SCMInputWidgetToolbar , this . toolbarContainer , MenuId . SCMInputBox , {
2105
+ const toolbar : SCMInputWidgetToolbar = instantiationService2 . createInstance ( SCMInputWidgetToolbar , this . toolbarContainer , input , MenuId . SCMInputBox , {
2099
2106
actionRunner,
2100
2107
actionViewItemProvider : action => {
2101
2108
if ( action instanceof MenuItemAction && toolbar . dropdownActions . length > 1 ) {
0 commit comments