(options: RetrieveWithTraversalOptions)
| 132 | } |
| 133 | |
| 134 | export async function toolRetrieveWithTraversal(options: RetrieveWithTraversalOptions): Promise<string> { |
| 135 | const results = await retrieveWithTraversal(options.rootDir, options.startNodeId, options.maxDepth, options.edgeFilter); |
| 136 | if (results.length === 0) return `❌ Node not found: ${options.startNodeId}`; |
| 137 | |
| 138 | const sections = [`Traversal from: ${results[0].node.label} (depth limit: ${options.maxDepth ?? 2})\n`]; |
| 139 | for (const result of results) sections.push(formatTraversalResult(result)); |
| 140 | |
| 141 | return sections.join("\n"); |
| 142 | } |
no test coverage detected