Skip to content

Commit ff0d98b

Browse files
authored
Allow the canonical package name and version to be sent back from the install flow (microsoft#259081)
1 parent 95edd19 commit ff0d98b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ const enum AddConfigurationCopilotCommand {
8585
StartFlow = 'github.copilot.chat.mcp.setup.flow',
8686
}
8787

88-
type ValidatePackageResult = { state: 'ok'; publisher: string } | { state: 'error'; error: string };
88+
type ValidatePackageResult =
89+
{ state: 'ok'; publisher: string; name?: string; version?: string }
90+
| { state: 'error'; error: string };
8991

9092
type AddServerData = {
9193
packageType: string;
@@ -319,7 +321,11 @@ export class McpAddConfigurationCommand {
319321
loadingQuickPick.title = result?.error || 'Unknown error loading package';
320322
loadingQuickPick.items = [{ id: LoadAction.Retry, label: localize('mcp.error.retry', 'Try a different package') }, { id: LoadAction.Cancel, label: localize('cancel', 'Cancel') }];
321323
} else {
322-
loadingQuickPick.title = localize('mcp.confirmPublish', 'Install {0} from {1}?', packageName, result.publisher);
324+
loadingQuickPick.title = localize(
325+
'mcp.confirmPublish', 'Install {0}{1} from {2}?',
326+
result.name ?? packageName,
327+
result.version ? `@${result.version}` : '',
328+
result.publisher);
323329
loadingQuickPick.items = [
324330
{ id: LoadAction.Allow, label: localize('allow', "Allow") },
325331
{ id: LoadAction.Cancel, label: localize('cancel', 'Cancel') }

0 commit comments

Comments
 (0)