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

Function renderEntries

packages/web/src/features/tools/listTree.ts:169–179  ·  view source on GitHub ↗
(parentPath: string)

Source from the content-addressed store, hash-verified

167 }
168
169 function renderEntries(parentPath: string) {
170 const children = childrenByPath.get(parentPath) ?? [];
171 for (const entry of children) {
172 const indent = ' '.repeat(entry.depth);
173 const label = entry.type === 'tree' ? `${entry.name}/` : entry.name;
174 outputLines.push(`${indent}${label}`);
175 if (entry.type === 'tree') {
176 renderEntries(entry.path);
177 }
178 }
179 }
180
181 renderEntries(normalizedPath);
182

Callers 1

listTree.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected