MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / getResultHealth

Function getResultHealth

src/tools/search-codebase.ts:638–649  ·  view source on GitHub ↗
(
    filePath: string
  )

Source from the content-addressed store, hash-verified

636 }
637
638 function getResultHealth(
639 filePath: string
640 ): { level: 'low' | 'medium' | 'high'; reasons?: string[] } | undefined {
641 const fileHealth = healthByFile.get(normalizeHealthLookupKey(filePath, ctx.rootPath));
642 if (!fileHealth || fileHealth.level === 'low') {
643 return undefined;
644 }
645 return {
646 level: fileHealth.level,
647 ...(fileHealth.reasons.length > 0 && { reasons: fileHealth.reasons.slice(0, 2) })
648 };
649 }
650
651 function summarizeResultHealth(
652 resultPaths: string[]

Callers 1

handleFunction · 0.85

Calls 2

normalizeHealthLookupKeyFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected