* True when file content is one of `readFileRecord`'s non-text placeholders * (binary, unparseable, or over the inline read cap) — these carry no searchable * content, so grepping them should report the placeholder instead.
(content: string, totalLines: number)
| 43 | * content, so grepping them should report the placeholder instead. |
| 44 | */ |
| 45 | function isNonGreppablePlaceholder(content: string, totalLines: number): boolean { |
| 46 | if (totalLines !== 1) return false |
| 47 | return /^\[(File too large|Image too large|Document too large|Could not parse|Binary file|Compiled artifact too large)/.test( |
| 48 | content.trim() |
| 49 | ) |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Run a single-file content grep over an already-resolved file read result, |