MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / priority

Function priority

graph-ui/src/search/semantic-search.ts:331–331  ·  view source on GitHub ↗
(entry: RankedHit)

Source from the content-addressed store, hash-verified

329 */
330export function compareRanked(a: RankedHit, b: RankedHit): number {
331 const priority = (entry: RankedHit) => entry.pathMatch === 'file' ? 2 : entry.pathMatch === 'symbol' ? 1 : 0;
332 return priority(b) - priority(a) || b.score - a.score
333 || b.fanIn - a.fanIn
334 || (a.hit.qualifiedName ?? a.hit.name).localeCompare(b.hit.qualifiedName ?? b.hit.name);

Callers 1

compareRankedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected