@@ -12,7 +12,7 @@ import { MenuId, IMenuService, MenuItemAction, MenuRegistry, registerAction2, Ac
12
12
import { IWorkbenchContribution } from 'vs/workbench/common/contributions' ;
13
13
import { StatusbarAlignment , IStatusbarService , IStatusbarEntryAccessor , IStatusbarEntry } from 'vs/workbench/services/statusbar/common/statusbar' ;
14
14
import { ILabelService } from 'vs/platform/label/common/label' ;
15
- import { IContextKeyService , RawContextKey } from 'vs/platform/contextkey/common/contextkey' ;
15
+ import { ContextKeyExpr , IContextKeyService , RawContextKey } from 'vs/platform/contextkey/common/contextkey' ;
16
16
import { ICommandService } from 'vs/platform/commands/common/commands' ;
17
17
import { Schemas } from 'vs/base/common/network' ;
18
18
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
@@ -34,6 +34,7 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
34
34
import { IExtensionsViewPaneContainer , LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID , VIEWLET_ID } from 'vs/workbench/contrib/extensions/common/extensions' ;
35
35
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation' ;
36
36
import { IMarkdownString } from 'vs/base/common/htmlContent' ;
37
+ import { RemoteNameContext , VirtualWorkspaceContext } from 'vs/workbench/browser/contextkeys' ;
37
38
38
39
39
40
type ActionGroup = [ string , Array < MenuItemAction | SubmenuItemAction > ] ;
@@ -120,7 +121,8 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
120
121
id : RemoteStatusIndicator . CLOSE_REMOTE_COMMAND_ID ,
121
122
category,
122
123
title : { value : nls . localize ( 'remote.close' , "Close Remote Connection" ) , original : 'Close Remote Connection' } ,
123
- f1 : true
124
+ f1 : true ,
125
+ precondition : ContextKeyExpr . or ( RemoteNameContext , VirtualWorkspaceContext )
124
126
} ) ;
125
127
}
126
128
run = ( ) => that . hostService . openWindow ( { forceReuseWindow : true , remoteAuthority : null } ) ;
0 commit comments