MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getSubCommand

Function getSubCommand

packages/cli/src/ui/commands/memoryCommand.test.ts:37–45  ·  view source on GitHub ↗
(name: 'show' | 'add' | 'refresh')

Source from the content-addressed store, hash-verified

35 let mockContext: CommandContext;
36
37 const getSubCommand = (name: 'show' | 'add' | 'refresh'): SlashCommand => {
38 const subCommand = memoryCommand.subCommands?.find(
39 (cmd) => cmd.name === name,
40 );
41 if (!subCommand) {
42 throw new Error(`/memory ${name} command not found.`);
43 }
44 return subCommand;
45 };
46
47 describe('/memory show', () => {
48 let showCommand: SlashCommand;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected