Problem
_stream_search_results renders each record as:
snippet = record.text[:120].replace("\n", " ")
This is a 120-char hard truncation with newlines squished — no match highlighting, no context window, no amber accent. Meanwhile grep --style=pretty uses extract_search_snippet (match-centered 5-line window), highlight_search_spans (warm amber on match spans), and format_relative_time (relative timestamps).
Expected
Search output should reuse the pretty rendering infrastructure. Each result should show a match-centered snippet with highlighted terms and a dim provenance line — the same visual language as grep --style=pretty.
Files
src/agentgrep/cli/render.py — _stream_search_results record formatting
- Reuse:
extract_search_snippet, highlight_search_spans, format_relative_time, format_grep_record_pretty (or adapt)
Problem
_stream_search_resultsrenders each record as:This is a 120-char hard truncation with newlines squished — no match highlighting, no context window, no amber accent. Meanwhile
grep --style=prettyusesextract_search_snippet(match-centered 5-line window),highlight_search_spans(warm amber on match spans), andformat_relative_time(relative timestamps).Expected
Search output should reuse the pretty rendering infrastructure. Each result should show a match-centered snippet with highlighted terms and a dim provenance line — the same visual language as
grep --style=pretty.Files
src/agentgrep/cli/render.py—_stream_search_resultsrecord formattingextract_search_snippet,highlight_search_spans,format_relative_time,format_grep_record_pretty(or adapt)