fix: align docs with cli and provider surfaces

This commit is contained in:
Peter Steinberger
2026-04-23 06:38:31 +01:00
parent d3a8480093
commit 87c85c507a
17 changed files with 138 additions and 17 deletions

View File

@@ -29,6 +29,15 @@ describe("command-tree", () => {
expect(program.commands.map((command) => command.name())).toEqual(["beta"]);
});
it("removes by command alias", () => {
const program = new Command();
program.command("alpha").alias("a");
program.command("beta");
expect(removeCommandByName(program, "a")).toBe(true);
expect(program.commands.map((command) => command.name())).toEqual(["beta"]);
});
it("returns false when name does not exist", () => {
const program = new Command();
program.command("alpha");

View File

@@ -11,7 +11,9 @@ export function removeCommand(program: Command, command: Command): boolean {
}
export function removeCommandByName(program: Command, name: string): boolean {
const existing = program.commands.find((command) => command.name() === name);
const existing = program.commands.find(
(command) => command.name() === name || command.aliases().includes(name),
);
if (!existing) {
return false;
}

View File

@@ -130,7 +130,7 @@ const subCliCommandCatalog = defineCommandDescriptorCatalog([
},
{
name: "plugins",
description: "Manage OpenClaw plugins and extensions",
description: "Manage OpenClaw plugins",
hasSubcommands: true,
},
{