Files
jif dd90f160ed Prevent stale file search results from being labeled with a new query (#49946)
## Why

The asynchronous matcher can return results for the previous query while a new query is still running. Labeling those results with the latest query produces a mismatched search snapshot.

## What changed

Only report a file search snapshot when its pattern atoms match the currently requested pattern. Extract snapshot conversion into `snapshot::for_query`, which skips pending results from an older pattern.

## Testing

Add a regression test that changes the query from empty to `bet`, verifies that the old snapshot is withheld, and checks that the completed snapshot contains `beta.txt` with the expected match indices and counts.

GitOrigin-RevId: 01b62b822db69e15480d3233b66ec55c45646fad
2026-10-01 09:52:54 +00:00
..

codex_file_search

Fast fuzzy file search tool for Codex.

Uses https://crates.io/crates/ignore under the hood (which is what ripgrep uses) to traverse a directory (while honoring .gitignore, etc.) to produce the list of files to search and then uses https://crates.io/crates/nucleo-matcher to fuzzy-match the user supplied PATTERN against the corpus.