Skip to content

Commit b227e84

Browse files
authored
add backward compatibility for url handling (#252457)
1 parent 4040ecd commit b227e84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,13 @@ export class McpWorkbenchService extends Disposable implements IMcpWorkbenchServ
352352

353353
try {
354354
const { name, inputs, ...config } = parsed;
355+
const galleryServer = await this.mcpGalleryService.getMcpServer(name);
355356
if (config && Object.keys(config).length > 0) {
356357
if (config.type === undefined) {
357358
(<Mutable<IMcpServerConfiguration>>config).type = (<IMcpStdioServerConfiguration>parsed).command ? 'stdio' : 'http';
358359
}
359-
this.open(this.instantiationService.createInstance(McpWorkbenchServer, undefined, undefined, { name, config, inputs }));
360+
this.open(this.instantiationService.createInstance(McpWorkbenchServer, undefined, galleryServer, galleryServer ? undefined : { name, config, inputs }));
360361
} else {
361-
const galleryServer = await this.mcpGalleryService.getMcpServer(name);
362362
if (!galleryServer) {
363363
throw new Error(`MCP server '${name}' not found in gallery`);
364364
}

0 commit comments

Comments
 (0)