refactor(tools): break glob->grep sibling-tool coupling
Hoist shared ripgrep CLI resolution helpers (resolveGrepCli, resolveGrepCliWithAutoInstall, GrepBackend, DEFAULT_RG_THREADS, ResolvedCli) out of src/tools/grep/constants.ts into src/shared/ripgrep-cli.ts so they no longer straddle two sibling tool directories. Before: src/tools/glob/constants.ts re-exported from src/tools/grep/constants.ts, violating the project's "tools should not import from sibling tools" rule enforced by .sisyphus/rules/modular-code-enforcement.md. After: both src/tools/glob/ and src/tools/grep/ consume the shared helpers from src/shared/ripgrep-cli.ts. src/tools/grep/constants.ts keeps only the grep-specific UI-exposed constants.
This commit is contained in:
@@ -3,13 +3,15 @@ import {
|
||||
resolveGrepCli,
|
||||
type ResolvedCli,
|
||||
type GrepBackend,
|
||||
DEFAULT_RG_THREADS,
|
||||
} from "../../shared/ripgrep-cli"
|
||||
import {
|
||||
DEFAULT_MAX_DEPTH,
|
||||
DEFAULT_MAX_FILESIZE,
|
||||
DEFAULT_MAX_COUNT,
|
||||
DEFAULT_MAX_COLUMNS,
|
||||
DEFAULT_TIMEOUT_MS,
|
||||
DEFAULT_MAX_OUTPUT_BYTES,
|
||||
DEFAULT_RG_THREADS,
|
||||
RG_SAFETY_FLAGS,
|
||||
GREP_SAFETY_FLAGS,
|
||||
} from "./constants"
|
||||
|
||||
Reference in New Issue
Block a user