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.
This commit is contained in:
Aaron Bockelie 2026-06-09 10:46:00 -05:00
parent 42ac8b361e
commit cda1b1b4a7

View file

@ -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.',