MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / visit

Function visit

packages/web/src/features/tools/listTree.ts:221–226  ·  view source on GitHub ↗
(node: FileTreeNode, currentPath: string)

Source from the content-addressed store, hash-verified

219 const nodeIndex = new Map<string, FileTreeNode>();
220
221 const visit = (node: FileTreeNode, currentPath: string) => {
222 nodeIndex.set(currentPath, node);
223 for (const child of node.children) {
224 visit(child, joinTreePath(currentPath, child.name));
225 }
226 };
227
228 visit(root, '');
229 return nodeIndex;

Callers 4

buildTreeNodeIndexFunction · 0.85
annotateCodeBlocksFunction · 0.85
remarkPreserveHtmlFunction · 0.85
remarkTocExtractorFunction · 0.85

Calls 1

joinTreePathFunction · 0.85

Tested by

no test coverage detected