- Add --threads=4 flag to all rg invocations (grep and glob) - Add global semaphore limiting concurrent rg processes to 2 - Reduce grep timeout from 300s to 60s (matches tool description) - Reduce max output from 10MB to 256KB (prevents excessive memory usage) - Add output_mode parameter (content/files_with_matches/count) - Add head_limit parameter for incremental result fetching Closes #2008 Ref: #674, #1722
13 lines
384 B
TypeScript
13 lines
384 B
TypeScript
export { resolveGrepCli, resolveGrepCliWithAutoInstall, type GrepBackend, DEFAULT_RG_THREADS } from "../grep/constants"
|
|
|
|
export const DEFAULT_TIMEOUT_MS = 60_000
|
|
export const DEFAULT_LIMIT = 100
|
|
export const DEFAULT_MAX_DEPTH = 20
|
|
export const DEFAULT_MAX_OUTPUT_BYTES = 10 * 1024 * 1024
|
|
|
|
export const RG_FILES_FLAGS = [
|
|
"--files",
|
|
"--color=never",
|
|
"--glob=!.git/*",
|
|
] as const
|