* Discovers project paths using .gitignore patterns when projectFiles is undefined. * This intentionally does not read every file into memory; large repositories can * contain generated or binary files that are expensive to retain before parsing.
(params: {
cwd: string
fs: CodebuffFileSystem
})
| 328 | * contain generated or binary files that are expensive to retain before parsing. |
| 329 | */ |
| 330 | async function discoverProjectPaths(params: { |
| 331 | cwd: string |
| 332 | fs: CodebuffFileSystem |
| 333 | }): Promise<{ fileTree: FileTreeNode[]; filePaths: string[] }> { |
| 334 | const { cwd, fs } = params |
| 335 | |
| 336 | const fileTree = await getProjectFileTree({ projectRoot: cwd, fs }) |
| 337 | const filePaths = getAllFilePaths(fileTree) |
| 338 | |
| 339 | return { fileTree, filePaths } |
| 340 | } |
| 341 | |
| 342 | /** |
| 343 | * Loads user knowledge files from the home directory. |
no test coverage detected