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

Method isDefinitionHeavyResult

src/core/search.ts:501–513  ·  view source on GitHub ↗
(chunk: CodeChunk)

Source from the content-addressed store, hash-verified

499 }
500
501 private isDefinitionHeavyResult(chunk: CodeChunk): boolean {
502 const normalizedPath = chunk.filePath.toLowerCase().replace(/\\/g, '/');
503 const componentType = (chunk.componentType || '').toLowerCase();
504
505 if (['type', 'interface', 'enum', 'constant'].includes(componentType)) return true;
506
507 return (
508 normalizedPath.includes('/models/') ||
509 normalizedPath.includes('/interfaces/') ||
510 normalizedPath.includes('/types/') ||
511 normalizedPath.includes('/constants')
512 );
513 }
514
515 private scoreAndSortResults(
516 query: string,

Callers 1

scoreAndSortResultsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected