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

Function classifyProjectSource

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

Source from the content-addressed store, hash-verified

244}
245
246function classifyProjectSource(rootPath: string): ProjectDescriptor['source'] {
247 const rootKey = normalizeRootKey(rootPath);
248 if (knownRoots.has(rootKey)) {
249 return 'root';
250 }
251 return getContainingKnownRoot(rootPath) ? 'subdirectory' : 'ad_hoc';
252}
253
254function touchProject(rootPath: string): void {
255 projectAccessOrder.set(normalizeRootKey(rootPath), nextProjectAccessOrder++);

Callers 3

rememberProjectPathFunction · 0.85
buildProjectDescriptorFunction · 0.85
resolveProjectSelectorFunction · 0.85

Calls 3

normalizeRootKeyFunction · 0.85
getContainingKnownRootFunction · 0.85
hasMethod · 0.80

Tested by

no test coverage detected