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

Method queryPathTokenOverlap

src/core/search.ts:481–487  ·  view source on GitHub ↗
(filePath: string, query: string)

Source from the content-addressed store, hash-verified

479 }
480
481 private queryPathTokenOverlap(filePath: string, query: string): number {
482 const queryTerms = new Set(this.normalizeQueryTerms(query));
483 if (queryTerms.size === 0) return 0;
484
485 const pathTerms = this.normalizeQueryTerms(filePath.replace(/\\/g, '/'));
486 return pathTerms.reduce((count, term) => (queryTerms.has(term) ? count + 1 : count), 0);
487 }
488
489 private isLikelyWiringOrFlowQuery(query: string): boolean {
490 return /\b(route|router|routing|navigate|navigation|redirect|auth|authentication|login|provider|register|config|configuration|interceptor|middleware)\b/i.test(

Callers 1

scoreAndSortResultsMethod · 0.95

Calls 2

normalizeQueryTermsMethod · 0.95
hasMethod · 0.80

Tested by

no test coverage detected