MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / getContainingKnownRoot

Function getContainingKnownRoot

src/index.ts:241–244  ·  view source on GitHub ↗
(rootPath: string)

Source from the content-addressed store, hash-verified

239}
240
241function getContainingKnownRoot(rootPath: string): string | undefined {
242 const orderedRoots = getKnownRootPaths().sort((a, b) => b.length - a.length);
243 return orderedRoots.find((knownRootPath) => isPathWithin(knownRootPath, rootPath));
244}
245
246function classifyProjectSource(rootPath: string): ProjectDescriptor['source'] {
247 const rootKey = normalizeRootKey(rootPath);

Callers 7

classifyProjectSourceFunction · 0.85
formatProjectLabelFunction · 0.85
getRelativeProjectPathFunction · 0.85
listProjectDescriptorsFunction · 0.85

Calls 2

getKnownRootPathsFunction · 0.85
isPathWithinFunction · 0.85

Tested by

no test coverage detected