When a result is large it is stored behind a ref, and the ref replaces the content. Getting anything specific out of it then means one of two things: fetch the whole ref and read through it by hand, or re-run the work that produced it with an extra filter.
Filtering the ref in place does not work. Piping it into a filter, Ref(<id>) | Grep 'x', fails with unknown tool "Ref". The result is already computed and sitting in the ref, but it cannot be narrowed.
This bites hardest exactly when it matters most. A result becomes a ref because it is too large to read, which is the same moment searching within it becomes the thing you need. A wide Find or a broad Match produces the ref, and then there is no way to reach into it.
Guidance
A shape sketched earlier: let a ref act as a pipe source, so a stored result re-enters a pipe without re-running what produced it, for example Ref(<id>) | Match 'b.ts' or Ref(<id>) | Match 'TODO' before:2. For that to work, what a ref stores would need enough structure to re-enter a pipe, not only flattened text. Related to #388: the body a ref holds is what would be re-sourced.
When a result is large it is stored behind a ref, and the ref replaces the content. Getting anything specific out of it then means one of two things: fetch the whole ref and read through it by hand, or re-run the work that produced it with an extra filter.
Filtering the ref in place does not work. Piping it into a filter,
Ref(<id>) | Grep 'x', fails withunknown tool "Ref". The result is already computed and sitting in the ref, but it cannot be narrowed.This bites hardest exactly when it matters most. A result becomes a ref because it is too large to read, which is the same moment searching within it becomes the thing you need. A wide
Findor a broadMatchproduces the ref, and then there is no way to reach into it.Guidance
A shape sketched earlier: let a ref act as a pipe source, so a stored result re-enters a pipe without re-running what produced it, for example
Ref(<id>) | Match 'b.ts'orRef(<id>) | Match 'TODO' before:2. For that to work, what a ref stores would need enough structure to re-enter a pipe, not only flattened text. Related to #388: thebodya ref holds is what would be re-sourced.