fix(codex): let plugin remove take the same spec plugin add and list use

This commit is contained in:
2026-09-08 21:37:41 +07:00
parent 56bf5bbf4d
commit 4d4449866b
2 changed files with 11 additions and 4 deletions
+6 -3
View File
@@ -239,9 +239,12 @@ async function pluginAdd(spec) {
return serialize(() => runCodex(["plugin", "add", s]));
}
async function pluginRemove(name) {
const n = assertName(name);
return serialize(() => runCodex(["plugin", "remove", n]));
async function pluginRemove(spec) {
// A spec, not a bare name: `plugin add` accepts `<name>@<marketplace>`, so
// `plugin remove` has to accept back what `plugin list` hands out.
// cc-plugin-cli.js validates every plugin verb the same way.
const s = assertPluginSpec(spec);
return serialize(() => runCodex(["plugin", "remove", s]));
}
// ── Marketplaces ───────────────────────────────────────────────────────