From cda1b1b4a7ed942de82c5000731e9a2679679f7e Mon Sep 17 00:00:00 2001 From: Aaron Bockelie Date: Tue, 9 Jun 2026 10:46:00 -0500 Subject: [PATCH] fix(graph): count filtered seed set in root-traverse message The '/' traverse summary reported Math.min(10, getFiles().length) using the unfiltered file count, while the traversal actually seeds from the .mcpignore-filtered set (graph-traversal.ts). With exclusions enabled this overcounted and leaked that hidden files exist via an inflated number. Count the same filtered set the seed logic uses. --- src/tools/graph-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/graph-search.ts b/src/tools/graph-search.ts index 97fe2a6..1715ff9 100644 --- a/src/tools/graph-search.ts +++ b/src/tools/graph-search.ts @@ -189,7 +189,7 @@ export class GraphSearchTool { edges: result.edges, graphStats: result.stats, message: params.sourcePath === '/' || params.sourcePath === '' - ? `Traversed from ${Math.min(10, this.app.vault.getFiles().length)} most recent files: Found ${result.stats.totalNodes} connected nodes within ${params.maxDepth} degrees` + ? `Traversed from ${Math.min(10, this.app.vault.getFiles().filter(f => !this.graphTraversal.isExcluded(f.path)).length)} most recent files: Found ${result.stats.totalNodes} connected nodes within ${params.maxDepth} degrees` : `Found ${result.stats.totalNodes} connected nodes within ${params.maxDepth} degrees of separation`, workflow: { message: 'Graph traversal complete. You can explore individual nodes or find paths between them.',