`_parse_rg` split ripgrep output on ":" positionally, so a Windows
absolute path like `C:\ws\a.py:12:def f()` parsed as file="C", line=0,
with the real line number swallowed into the matched text. Every grep
match on Windows (when `rg` is on PATH) came back corrupted.
Pass `--with-filename --null` so ripgrep always prints the path and
NUL-separates it from `line:text`, then split the path off on the NUL
byte — a byte that cannot appear in a path — before parsing. `--null`
defeats the drive-letter colon; `--with-filename` keeps the format
universal so a single-file target isn't silently dropped. Portable:
harmless on Linux/macOS, correct everywhere.
Adds a platform-independent regression test that feeds a NUL-delimited
drive-letter line through `_parse_rg` directly, since CI runs on Linux
without `rg` and never exercises this code path otherwise.
Closes#17
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.
Co-authored-by: Devika <devikaverma11@gmail.com>