MCPcopy Create free account
hub / github.com/echoVic/blade-code / calculateRelevance

Method calculateRelevance

src/context/ContextManager.ts:473–484  ·  view source on GitHub ↗
(query: string, topics: string[])

Source from the content-addressed store, hash-verified

471 }
472
473 private calculateRelevance(query: string, topics: string[]): number {
474 const queryLower = query.toLowerCase();
475 let score = 0;
476
477 for (const topic of topics) {
478 if (queryLower.includes(topic.toLowerCase()) || topic.toLowerCase().includes(queryLower)) {
479 score += 1;
480 }
481 }
482
483 return score;
484 }
485}

Callers 1

searchSessionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected