This commit is contained in:
Sandeep Somavarapu
2025-11-07 10:40:07 +01:00
committed by GitHub
parent 6250219c87
commit 4ce6f26ef7
2 changed files with 6 additions and 6 deletions
@@ -657,7 +657,7 @@ export class ResetMcpTrustCommand extends Action2 {
title: localize2('mcp.resetTrust', "Reset Trust"),
category,
f1: true,
precondition: McpContextKeys.toolsCount.greater(0),
precondition: ContextKeyExpr.and(McpContextKeys.toolsCount.greater(0), ChatContextKeys.Setup.hidden.negate()),
});
}
@@ -885,7 +885,7 @@ export class ShowInstalledMcpServersCommand extends Action2 {
id: McpCommandIds.ShowInstalled,
title: localize2('mcp.command.show.installed', "Show Installed Servers"),
category,
precondition: HasInstalledMcpServersContext,
precondition: ContextKeyExpr.and(HasInstalledMcpServersContext, ChatContextKeys.Setup.hidden.negate()),
f1: true,
});
}
@@ -1019,7 +1019,7 @@ export class McpBrowseResourcesCommand extends Action2 {
id: McpCommandIds.BrowseResources,
title: localize2('mcp.browseResources', "Browse Resources..."),
category,
precondition: McpContextKeys.serverCount.greater(0),
precondition: ContextKeyExpr.and(McpContextKeys.serverCount.greater(0), ChatContextKeys.Setup.hidden.negate()),
f1: true,
});
}
@@ -529,7 +529,7 @@ export class McpServersViewsContribution extends Disposable implements IWorkbenc
id: InstalledMcpServersViewId,
name: localize2('mcp-installed', "MCP Servers - Installed"),
ctorDescriptor: new SyncDescriptor(McpServersListView, [{}]),
when: ContextKeyExpr.and(DefaultViewsContext, HasInstalledMcpServersContext),
when: ContextKeyExpr.and(DefaultViewsContext, HasInstalledMcpServersContext, ChatContextKeys.Setup.hidden.negate()),
weight: 40,
order: 4,
canToggleVisibility: true
@@ -547,7 +547,7 @@ export class McpServersViewsContribution extends Disposable implements IWorkbenc
id: 'workbench.views.mcp.marketplace',
name: localize2('mcp', "MCP Servers"),
ctorDescriptor: new SyncDescriptor(McpServersListView, [{}]),
when: ContextKeyExpr.and(SearchMcpServersContext, McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available), ContextKeyExpr.or(ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`), ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`))),
when: ContextKeyExpr.and(SearchMcpServersContext, ChatContextKeys.Setup.hidden.negate(), McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available), ContextKeyExpr.or(ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`), ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`))),
},
{
id: 'workbench.views.mcp.default.welcomeView',
@@ -562,7 +562,7 @@ export class McpServersViewsContribution extends Disposable implements IWorkbenc
id: 'workbench.views.mcp.welcomeView',
name: localize2('mcp', "MCP Servers"),
ctorDescriptor: new SyncDescriptor(McpServersListView, [{ showWelcome: true }]),
when: ContextKeyExpr.and(SearchMcpServersContext, McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`).negate(), ProductQualityContext.isEqualTo('stable'), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`).negate()),
when: ContextKeyExpr.and(SearchMcpServersContext, ChatContextKeys.Setup.hidden.negate(), McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`).negate(), ProductQualityContext.isEqualTo('stable'), ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`).negate()),
}
], VIEW_CONTAINER);
}