Enhance search result merging and Svelte component extraction

Changes search result deduplication to use max scores across channels instead of first-seen prioritization, adds template component usage extraction for Svelte files, exempts exact matches from single-term score dampening, prioritizes structural edges in graph traversal, and increases explore tool node budget while including edge source locations in file clustering.
This commit is contained in:
Colby McHenry
2026-04-08 17:27:35 -05:00
parent 88fa716418
commit 19532a81a5
4 changed files with 111 additions and 16 deletions
+7 -1
View File
@@ -81,8 +81,14 @@ export class GraphTraverser {
continue;
}
// Get adjacent edges
// Get adjacent edges, prioritizing structural edges (contains, calls)
// over reference edges so BFS discovers internal structure before
// fanning out to external references (e.g., component usages in templates).
const adjacentEdges = this.getAdjacentEdges(node.id, opts.direction, opts.edgeKinds);
adjacentEdges.sort((a, b) => {
const priority = (e: Edge) => e.kind === 'contains' ? 0 : e.kind === 'calls' ? 1 : 2;
return priority(a) - priority(b);
});
for (const adjEdge of adjacentEdges) {
// Determine next node: for 'both' direction, edges can be either