MCPcopy Create free account
hub / github.com/continuedev/continue / formatFileTree

Function formatFileTree

core/context/providers/FileTreeContextProvider.ts:16–28  ·  view source on GitHub ↗
(tree: Directory, indentation = "")

Source from the content-addressed store, hash-verified

14}
15
16function formatFileTree(tree: Directory, indentation = ""): string {
17 let result = "";
18 for (const file of tree.files) {
19 result += `${indentation}${file}\n`;
20 }
21
22 for (const directory of tree.directories) {
23 result += `${indentation}${directory.name}/\n`;
24 result += formatFileTree(directory, `${indentation} `);
25 }
26
27 return result;
28}
29
30class FileTreeContextProvider extends BaseContextProvider {
31 static description: ContextProviderDescription = {

Callers 1

getContextItemsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected