M2.3: find in files backend

crates/search: parallel ignore walk + grep-searcher with the project's
ignore rules (vendor searched as library, node_modules and .git skipped),
literal or regex, case, whole word, include/exclude globs, binary and
> 8 MiB skips, match cap, cancel token, buffer overlay.

Engine: search.find returns {searchId} at once and runs off the lock;
pump_vfs drains results into searchResults (one per file, at most 500
per pump) and searchDone; search.cancel. Testkit: generated search tree.
Tests: library unit and property tests, engine tests, TCP control test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-16 22:03:17 +02:00
parent a6b2fd1300
commit 172693c8dd
21 changed files with 2231 additions and 5 deletions

View file

@ -35,6 +35,8 @@ pub struct State {
pub engine_commands: BTreeSet<&'static str>,
/// UI commands the frontend registered (`ui.registerCommands`), by id.
pub ui_commands: BTreeMap<String, UiCommand>,
/// Running searches (`search.find`).
pub searches: crate::cmd::search::Searches,
/// Number of notifications emitted, for their ids.
notifications: u64,
/// Events queued for the host, oldest first.