MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isCommandMetadata

Function isCommandMetadata

src/utils/suggestions/commandSuggestions.ts:86–94  ·  view source on GitHub ↗

* Type guard to check if a suggestion's metadata is a Command. * Commands have a name string and a type property.

(metadata: unknown)

Source from the content-addressed store, hash-verified

84 * Commands have a name string and a type property.
85 */
86function isCommandMetadata(metadata: unknown): metadata is Command {
87 return (
88 typeof metadata === 'object' &&
89 metadata !== null &&
90 'name' in metadata &&
91 typeof (metadata as { name: unknown }).name === 'string' &&
92 'type' in metadata
93 )
94}
95
96/**
97 * Represents a slash command found mid-input (not at the start)

Callers 2

getBestCommandMatchFunction · 0.85
applyCommandSuggestionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected