Skip to content

Commit 6cfcc7e

Browse files
authored
support mcp gallery service url in product (microsoft#264344)
1 parent d0d5885 commit 6cfcc7e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/vs/base/common/product.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export interface IProductConfiguration {
112112
readonly accessSKUs?: string[];
113113
};
114114

115+
readonly mcpGallery?: {
116+
readonly serviceUrl: string;
117+
};
118+
115119
readonly extensionPublisherOrgs?: readonly string[];
116120
readonly trustedExtensionPublishers?: readonly string[];
117121

src/vs/platform/mcp/common/mcpGalleryManifestService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class McpGalleryManifestService extends Disposable implements IMcpGallery
1515
readonly onDidChangeMcpGalleryManifestStatus = Event.None;
1616

1717
get mcpGalleryManifestStatus(): McpGalleryManifestStatus {
18-
return !!this.productService.extensionsGallery?.mcpUrl ? McpGalleryManifestStatus.Available : McpGalleryManifestStatus.Unavailable;
18+
return !!this.productService.mcpGallery?.serviceUrl ? McpGalleryManifestStatus.Available : McpGalleryManifestStatus.Unavailable;
1919
}
2020

2121
constructor(
@@ -25,7 +25,10 @@ export class McpGalleryManifestService extends Disposable implements IMcpGallery
2525
}
2626

2727
async getMcpGalleryManifest(): Promise<IMcpGalleryManifest | null> {
28-
return null;
28+
if (!this.productService.mcpGallery) {
29+
return null;
30+
}
31+
return this.createMcpGalleryManifest(this.productService.mcpGallery.serviceUrl);
2932
}
3033

3134
protected createMcpGalleryManifest(url: string): IMcpGalleryManifest {

0 commit comments

Comments
 (0)