1153
}
1154
1156
>
pluginUri: URI,
1157
>
paths: readonly URI[],
1158
>
formatConfig: IPluginFormatConfig,
1159
>
fileService: IFileService,
1160
>
): Promise<readonly IMcpServerDefinition[]> {
1161
>
const merged = new Map<string, IMcpServerDefinition>();
1162
>
for (const mcpPath of paths) {
1163
>
if (formatConfig.format === PluginFormat.AgentPlugin && !await isResolvedWithin(pluginUri, mcpPath, fileService)) {
1164
continue;
1165
}
1167
>
for (const def of parseMcpServerDefinitionMap(mcpPath, json, pluginUri.fsPath, formatConfig)) {
1168
if (!merged.has(def.name)) {
1169
merged.set(def.name, def);
1170
}
1171
}
1173
>
return [...merged.values()].sort((a, b) => a.name.localeCompare(b.name));
1174
>
}
1175
1177
>
pluginUri: URI,
1178
>
paths: readonly URI[],
1179
>
format: IPluginFormatConfig,
1180
>
fileService: IFileService,
1181
>
): Promise<readonly IMcpServerDefinition[]> {
1182
>
return readMcpServers(pluginUri, paths, format, fileService);
1183
>
}
1184
1185
export function parseMcpServerDefinitionMap(