Expand description
Native content search over a workspace tree.
This replaces the external ripgrep binary that VT Code used to download
and spawn. The engine walks the tree with the ignore crate (so
.gitignore, .ignore, .git/exclude, and .vtcodegitignore keep
applying), then scans each file’s bytes with the regex crate.
Two matching modes exist, mirroring ripgrep’s:
- Literal: the pattern is escaped and matched verbatim, so regex metacharacters in the pattern carry no meaning.
- Regex: the pattern is compiled as a regular expression.
Matching is line-oriented: a match is reported with the line that contains
it, the byte column of the match within that line, and the file-absolute
byte offsets of the match and of the line it sits on. That keeps the
result shape identical to ripgrep’s --json stream, which the tool layer
still consumes.
Structs§
- Line
Match - A single matching line within a file.
- Search
Request - Configuration for a content search.
Enums§
- Case
Sensitivity - Whether matching is case-sensitive.
- Match
Mode - How the search pattern should be interpreted.
- Search
Error - Errors that can occur while running a content search.
Functions§
- search
- Runs
requestagainst the tree and returns the matching lines.