Skip to content

Commit 64a3304

Browse files
committed
Ensures mcp banners are not displayed when automatically registrable
1 parent edc43c1 commit 64a3304

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/plus/gk/utils/-webview/mcp.utils.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { getHostAppName } from '../../../../system/-webview/vscode';
55
import { satisfies } from '../../../../system/version';
66

77
export async function isMcpBannerEnabled(container: Container): Promise<boolean> {
8-
// Check if running on web
9-
if (isWeb) {
8+
// Check if running on web or automatically registrable
9+
if (isWeb || supportsMcpExtensionRegistration()) {
1010
return false;
1111
}
1212

@@ -26,5 +26,9 @@ export async function isMcpBannerEnabled(container: Container): Promise<boolean>
2626
}
2727

2828
export function supportsMcpExtensionRegistration(): boolean {
29+
if (isWeb) {
30+
return false;
31+
}
32+
2933
return satisfies(version, '>= 1.101.0') && lm.registerMcpServerDefinitionProvider != null;
3034
}

0 commit comments

Comments
 (0)