MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / requestedViewerCommand

Function requestedViewerCommand

src/bin/viewer-gate.ts:25–29  ·  view source on GitHub ↗
(args: readonly string[])

Source from the content-addressed store, hash-verified

23 * directly or through `help`, or null when they ask for something else.
24 */
25export function requestedViewerCommand(args: readonly string[]): string | null {
26 const positional = args.filter((arg) => !PROGRAM_FLAGS.has(arg));
27 const command = positional[0] === 'help' ? positional[1] : positional[0];
28 return command !== undefined && VIEWER_COMMANDS.has(command) ? command : null;
29}

Callers 2

codegraph.tsFile · 0.90

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected