MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / runLineSearch

Function runLineSearch

src/utils/ripgrep.ts:88–94  ·  view source on GitHub ↗
(cwd: string, opts: LineSearchOptions)

Source from the content-addressed store, hash-verified

86 * `stdout`. When ripgrep is unavailable, transparently uses the JS fallback.
87 */
88export async function runLineSearch(cwd: string, opts: LineSearchOptions): Promise<LineSearchResult> {
89 if (await hasRipgrep()) {
90 return runRipgrep(opts.rgArgs, opts.signal);
91 }
92 const stdout = await jsLineSearch(cwd, opts);
93 return { stdout, usedFallback: true };
94}
95
96function runRipgrep(rgArgs: string[], signal?: AbortSignal): Promise<LineSearchResult> {
97 return new Promise((resolve) => {

Callers 2

executeMethod · 0.85
executeMethod · 0.85

Calls 3

hasRipgrepFunction · 0.85
runRipgrepFunction · 0.85
jsLineSearchFunction · 0.85

Tested by

no test coverage detected