@@ -29,7 +29,7 @@ import { DropDownAction, InstallAction, InstallingLabelAction, ManageMcpServerAc
2929import { PublisherWidget , StarredWidget , McpServerIconWidget , McpServerHoverWidget , McpServerScopeBadgeWidget } from './mcpServerWidgets.js' ;
3030import { ActionRunner , IAction , Separator } from '../../../../base/common/actions.js' ;
3131import { IActionViewItemOptions } from '../../../../base/browser/ui/actionbar/actionViewItems.js' ;
32- import { IAllowedMcpServersService , IMcpGalleryService } from '../../../../platform/mcp/common/mcpManagement.js' ;
32+ import { IAllowedMcpServersService } from '../../../../platform/mcp/common/mcpManagement.js' ;
3333import { URI } from '../../../../base/common/uri.js' ;
3434import { ThemeIcon } from '../../../../base/common/themables.js' ;
3535import { IProductService } from '../../../../platform/product/common/productService.js' ;
@@ -49,6 +49,7 @@ import { HoverPosition } from '../../../../base/browser/ui/hover/hoverWidget.js'
4949import { IWorkbenchLayoutService , Position } from '../../../services/layout/browser/layoutService.js' ;
5050import { mcpServerIcon } from './mcpServerIcons.js' ;
5151import { IPagedRenderer } from '../../../../base/browser/ui/list/listPaging.js' ;
52+ import { IMcpGalleryManifestService , McpGalleryManifestStatus } from '../../../../platform/mcp/common/mcpGalleryManifest.js' ;
5253
5354export interface McpServerListViewOptions {
5455 showWelcomeOnEmpty ?: boolean ;
@@ -82,7 +83,7 @@ export class McpServersListView extends AbstractExtensionsListView<IWorkbenchMcp
8283 @IViewDescriptorService viewDescriptorService : IViewDescriptorService ,
8384 @IOpenerService openerService : IOpenerService ,
8485 @IMcpWorkbenchService private readonly mcpWorkbenchService : IMcpWorkbenchService ,
85- @IMcpGalleryService private readonly mcpGalleryService : IMcpGalleryService ,
86+ @IMcpGalleryManifestService protected readonly mcpGalleryManifestService : IMcpGalleryManifestService ,
8687 @IProductService private readonly productService : IProductService ,
8788 @IWorkbenchLayoutService private readonly layoutService : IWorkbenchLayoutService ,
8889 ) {
@@ -186,7 +187,8 @@ export class McpServersListView extends AbstractExtensionsListView<IWorkbenchMcp
186187 }
187188
188189 this . input = await this . query ( query . trim ( ) ) ;
189- this . input . showWelcomeContent = ! this . mcpGalleryService . isEnabled ( ) && this . input . model . length === 0 && ! ! this . mpcViewOptions . showWelcomeOnEmpty ;
190+
191+ this . input . showWelcomeContent = ! ! this . mpcViewOptions . showWelcomeOnEmpty && this . mcpGalleryManifestService . mcpGalleryManifestStatus === McpGalleryManifestStatus . Unavailable && this . input . model . length === 0 ;
190192 this . renderInput ( ) ;
191193
192194 if ( this . input . onDidChangeModel ) {
@@ -195,7 +197,7 @@ export class McpServersListView extends AbstractExtensionsListView<IWorkbenchMcp
195197 return ;
196198 }
197199 this . input . model = model ;
198- this . input . showWelcomeContent = ! this . mcpGalleryService . isEnabled ( ) && this . input . model . length === 0 && ! ! this . mpcViewOptions . showWelcomeOnEmpty ;
200+ this . input . showWelcomeContent = ! ! this . mpcViewOptions . showWelcomeOnEmpty && this . mcpGalleryManifestService . mcpGalleryManifestStatus === McpGalleryManifestStatus . Unavailable && this . input . model . length === 0 ;
199201 this . renderInput ( ) ;
200202 } ) ) ;
201203 }
@@ -419,6 +421,12 @@ class McpServerRenderer implements IPagedRenderer<IWorkbenchMcpServer, IMcpServe
419421
420422
421423export class DefaultBrowseMcpServersView extends McpServersListView {
424+
425+ protected override renderBody ( container : HTMLElement ) : void {
426+ super . renderBody ( container ) ;
427+ this . _register ( this . mcpGalleryManifestService . onDidChangeMcpGalleryManifest ( ( ) => this . show ( ) ) ) ;
428+ }
429+
422430 override async show ( ) : Promise < IPagedModel < IWorkbenchMcpServer > > {
423431 return super . show ( '@mcp' ) ;
424432 }
0 commit comments