mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-17 11:23:27 +00:00
Fix broken docs links and MCP plugin docs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4215785a-7e6e-49c5-abaa-c39b0793a11e
This commit is contained in:
@@ -618,8 +618,11 @@ function generatePluginsData(gitDates, resourceIndex = {}) {
|
||||
const mcpItems = [];
|
||||
if (data.mcpServers) {
|
||||
let mcpServersObj = null;
|
||||
let mcpConfigPath = relPath;
|
||||
if (typeof data.mcpServers === "string") {
|
||||
const mcpJsonPath = path.join(pluginDir, data.mcpServers.replace(/^\.\//, ""));
|
||||
const manifestMcpPath = data.mcpServers.replace(/^\.\//, "");
|
||||
mcpConfigPath = manifestMcpPath ? `${relPath}/${manifestMcpPath}` : relPath;
|
||||
const mcpJsonPath = path.join(pluginDir, manifestMcpPath);
|
||||
if (fs.existsSync(mcpJsonPath)) {
|
||||
try {
|
||||
const mcpJson = JSON.parse(fs.readFileSync(mcpJsonPath, "utf-8"));
|
||||
@@ -633,7 +636,7 @@ function generatePluginsData(gitDates, resourceIndex = {}) {
|
||||
}
|
||||
if (mcpServersObj) {
|
||||
for (const serverName of Object.keys(mcpServersObj)) {
|
||||
mcpItems.push({ kind: "mcp", path: serverName, title: serverName });
|
||||
mcpItems.push({ kind: "mcp", path: mcpConfigPath, title: serverName });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user