@insforge/install 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +33 -1
- package/dist/utils.js +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
writeConfig(config, argv.client);
|
|
226
|
-
} else if (argv.client === "cline" || argv.client === "roocode" || argv.client === "trae") {
|
|
226
|
+
} else if (argv.client === "cline" || argv.client === "roocode" || argv.client === "trae" || argv.client === "qoder") {
|
|
227
227
|
if (!config.mcpServers) config.mcpServers = {};
|
|
228
228
|
config.mcpServers[name] = {
|
|
229
229
|
command: "npx",
|
|
@@ -234,6 +234,38 @@ import {
|
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
236
|
writeConfig(config, argv.client);
|
|
237
|
+
} else if (argv.client === "copilot") {
|
|
238
|
+
// Copilot uses "servers" instead of "mcpServers"
|
|
239
|
+
const fs = await import('fs');
|
|
240
|
+
const vscodeDir = path.join(process.cwd(), '.vscode');
|
|
241
|
+
const mcpConfigPath = path.join(vscodeDir, 'mcp.json');
|
|
242
|
+
|
|
243
|
+
if (!fs.existsSync(vscodeDir)) {
|
|
244
|
+
fs.mkdirSync(vscodeDir, { recursive: true });
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let copilotConfig = { servers: {} };
|
|
248
|
+
if (fs.existsSync(mcpConfigPath)) {
|
|
249
|
+
try {
|
|
250
|
+
copilotConfig = JSON.parse(fs.readFileSync(mcpConfigPath, 'utf8'));
|
|
251
|
+
if (!copilotConfig.servers) copilotConfig.servers = {};
|
|
252
|
+
} catch (error) {
|
|
253
|
+
logger.warn(`Could not parse existing mcp.json: ${error.message}`);
|
|
254
|
+
copilotConfig = { servers: {} };
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
copilotConfig.servers[name] = {
|
|
259
|
+
command: "npx",
|
|
260
|
+
args: ["-y", mcpVersion],
|
|
261
|
+
env: {
|
|
262
|
+
API_KEY: envVars.API_KEY,
|
|
263
|
+
API_BASE_URL: envVars.API_BASE_URL
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
fs.writeFileSync(mcpConfigPath, JSON.stringify(copilotConfig, null, 2));
|
|
268
|
+
logger.info(`Configured Copilot MCP at: ${mcpConfigPath}`);
|
|
237
269
|
}
|
|
238
270
|
|
|
239
271
|
// Fetch instructions documentation and save to appropriate files
|
package/dist/utils.js
CHANGED
|
@@ -56,6 +56,14 @@ var clientPaths = {
|
|
|
56
56
|
codex: {
|
|
57
57
|
type: "file",
|
|
58
58
|
path: path.join(homeDir, ".codex", "mcp_config.json")
|
|
59
|
+
},
|
|
60
|
+
copilot: {
|
|
61
|
+
type: "file",
|
|
62
|
+
path: path.join(process.cwd(), ".vscode", "mcp.json")
|
|
63
|
+
},
|
|
64
|
+
qoder: {
|
|
65
|
+
type: "file",
|
|
66
|
+
path: path.join(baseDir, "Qoder", "SharedClientCache", "mcp.json")
|
|
59
67
|
}
|
|
60
68
|
};
|
|
61
69
|
var clientNames = Object.keys(clientPaths);
|