MCPcopy
hub / github.com/codeaashu/claude-code / sortForMatching

Function sortForMatching

src/utils/model/modelCapabilities.ts:54–58  ·  view source on GitHub ↗
(models: ModelCapability[])

Source from the content-addressed store, hash-verified

52
53// Longest-id-first so substring match prefers most specific; secondary key for stable isEqual
54function sortForMatching(models: ModelCapability[]): ModelCapability[] {
55 return [...models].sort(
56 (a, b) => b.id.length - a.id.length || a.id.localeCompare(b.id),
57 )
58}
59
60// Keyed on cache path so tests that set CLAUDE_CONFIG_DIR get a fresh read
61const loadCache = memoize(

Callers 1

refreshModelCapabilitiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected