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

Method isCompositionRootFile

src/core/search.ts:466–479  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

464 }
465
466 private isCompositionRootFile(filePath: string): boolean {
467 const normalized = filePath.toLowerCase().replace(/\\/g, '/');
468 const base = path.basename(normalized);
469
470 if (/^(main|index|bootstrap|startup)\./.test(base)) return true;
471
472 return (
473 normalized.includes('/routes') ||
474 normalized.includes('/routing') ||
475 normalized.includes('/router') ||
476 normalized.includes('/config') ||
477 normalized.includes('/providers')
478 );
479 }
480
481 private queryPathTokenOverlap(filePath: string, query: string): number {
482 const queryTerms = new Set(this.normalizeQueryTerms(query));

Callers 1

scoreAndSortResultsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected