MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / executeRipgrepForFiles

Function executeRipgrepForFiles

src/services/search/file-search.ts:114–139  ·  view source on GitHub ↗
(
	workspacePath: string,
	limit?: number,
)

Source from the content-addressed store, hash-verified

112}
113
114export 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
141export async function searchWorkspaceFiles(
142 query: string,

Callers 1

searchWorkspaceFilesFunction · 0.85

Calls 4

getRipgrepSearchOptionsFunction · 0.85
executeRipgrepFunction · 0.85
getMethod · 0.65
getConfigurationMethod · 0.65

Tested by

no test coverage detected