MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / defineCommand

Function defineCommand

cli/src/commands/command-registry.ts:125–135  ·  view source on GitHub ↗
(config: CommandConfig)

Source from the content-addressed store, hash-verified

123 * })
124 */
125export function defineCommand(config: CommandConfig): CommandDefinition {
126 return {
127 name: config.name,
128 aliases: config.aliases ?? [],
129 acceptsArgs: false,
130 handler: (params) => {
131 // Args are gracefully ignored for commands that don't accept them
132 return config.handler(params)
133 },
134 }
135}
136
137/**
138 * Factory for commands that accept arguments.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected