patchcord 0.3.43 → 0.3.44
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/bin/patchcord.mjs +16 -0
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -404,6 +404,22 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
404
404
|
} catch {}
|
|
405
405
|
}
|
|
406
406
|
} else if (isCodex) {
|
|
407
|
+
// Check global config for stale patchcord MCP — user may have run installer in ~ by mistake
|
|
408
|
+
const globalCodexConfig = join(HOME, ".codex", "config.toml");
|
|
409
|
+
if (existsSync(globalCodexConfig)) {
|
|
410
|
+
const globalContent = readFileSync(globalCodexConfig, "utf-8");
|
|
411
|
+
if (globalContent.includes("[mcp_servers.patchcord]")) {
|
|
412
|
+
console.log(`\n ${red}⚠ Patchcord is in your GLOBAL Codex config!${r}`);
|
|
413
|
+
console.log(` ${dim}${globalCodexConfig}${r}`);
|
|
414
|
+
console.log(` ${yellow}This overrides per-project config and causes conflicts.${r}`);
|
|
415
|
+
const cleanGlobal = (await ask(` ${dim}Remove patchcord from global config? (Y/n):${r} `)).trim().toLowerCase();
|
|
416
|
+
if (cleanGlobal !== "n" && cleanGlobal !== "no") {
|
|
417
|
+
const cleaned = globalContent.replace(/\[mcp_servers\.patchcord\][^\[]*/s, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
418
|
+
writeFileSync(globalCodexConfig, cleaned + "\n");
|
|
419
|
+
console.log(` ${green}✓${r} Removed from global config`);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
407
423
|
const configPath = join(cwd, ".codex", "config.toml");
|
|
408
424
|
if (existsSync(configPath)) {
|
|
409
425
|
const content = readFileSync(configPath, "utf-8");
|