Skip to content

Commit dfa04c5

Browse files
authored
feat: /plugins as alias for /plugin (#84)
Both /plugin and /plugins now work identically. Tab completion includes both forms.
1 parent 616b4d1 commit dfa04c5

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

src/agent/commands.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,17 @@ const COMMANDS: readonly CommandEntry[] = Object.freeze([
483483
]);
484484

485485
/** Pre-computed completion strings for the readline completer. */
486-
export const COMPLETION_STRINGS: readonly string[] = COMMANDS.map(
487-
(c) => c.completion,
488-
);
486+
export const COMPLETION_STRINGS: readonly string[] = [
487+
...COMMANDS.map((c) => c.completion),
488+
// Aliases — /plugins is shorthand for /plugin
489+
"/plugins list",
490+
"/plugins info ",
491+
"/plugins enable ",
492+
"/plugins disable ",
493+
"/plugins approve ",
494+
"/plugins unapprove ",
495+
"/plugins audit ",
496+
];
489497

490498
/**
491499
* Render the full help text from the COMMANDS registry.

src/agent/slash-commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,9 @@ export async function handleSlashCommand(
812812
// ── Plugin Commands ──────────────────────────────────────
813813
//
814814
// All plugin operations live under /plugin <sub>.
815+
// /plugins is an alias for /plugin.
815816

817+
case "/plugins":
816818
case "/plugin": {
817819
const subCmd = parts[1]?.toLowerCase();
818820
// Plugin name sits at parts[2], args at parts[3]+.

0 commit comments

Comments
 (0)