MCPcopy Index your code
hub / github.com/anus-dev/ANUS / BuiltinCommandLoader

Class BuiltinCommandLoader

packages/cli/src/services/BuiltinCommandLoader.ts:43–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 * of the ANUS application.
42 */
43export class BuiltinCommandLoader implements ICommandLoader {
44 constructor(private config: Config | null) {}
45
46 /**
47 * Gathers all raw built-in command definitions, injects dependencies where
48 * needed (e.g., config) and filters out any that are not available.
49 *
50 * @param _signal An AbortSignal (unused for this synchronous loader).
51 * @returns A promise that resolves to an array of `SlashCommand` objects.
52 */
53 async loadCommands(_signal: AbortSignal): Promise<SlashCommand[]> {
54 const allDefinitions: Array<SlashCommand | null> = [
55 aboutCommand,
56 authCommand,
57 bugCommand,
58 chatCommand,
59 clearCommand,
60 compressCommand,
61 copyCommand,
62 corgiCommand,
63 docsCommand,
64 directoryCommand,
65 editorCommand,
66 extensionsCommand,
67 helpCommand,
68 ideCommand(this.config),
69 initCommand,
70 mcpCommand,
71 memoryCommand,
72 privacyCommand,
73 quitCommand,
74 restoreCommand(this.config),
75 statsCommand,
76 themeCommand,
77 toolsCommand,
78 settingsCommand,
79 vimCommand,
80 setupGithubCommand,
81 terminalSetupCommand,
82 ];
83
84 return allDefinitions.filter((cmd): cmd is SlashCommand => cmd !== null);
85 }
86}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected