( workspacePath: string, limit?: number, )
| 112 | } |
| 113 | |
| 114 | export async function executeRipgrepForFiles( |
| 115 | workspacePath: string, |
| 116 | limit?: number, |
| 117 | ): Promise<{ path: string; type: "file" | "folder"; label?: string }[]> { |
| 118 | // Get limit from configuration if not provided |
| 119 | const effectiveLimit = |
| 120 | limit ?? vscode.workspace.getConfiguration(Package.name).get<number>("maximumIndexedFilesForFileSearch", 10000) |
| 121 | |
| 122 | const args = [ |
| 123 | "--files", |
| 124 | "--follow", |
| 125 | "--hidden", |
| 126 | ...getRipgrepSearchOptions(), |
| 127 | "-g", |
| 128 | "!**/node_modules/**", |
| 129 | "-g", |
| 130 | "!**/.git/**", |
| 131 | "-g", |
| 132 | "!**/out/**", |
| 133 | "-g", |
| 134 | "!**/dist/**", |
| 135 | workspacePath, |
| 136 | ] |
| 137 | |
| 138 | return executeRipgrep({ args, workspacePath, limit: effectiveLimit }) |
| 139 | } |
| 140 | |
| 141 | export async function searchWorkspaceFiles( |
| 142 | query: string, |
no test coverage detected