Expand description
The text the LLM sees, plus the line numbers that text legitimately covers.
The format exists to solve one problem: line-number provenance. If the
model is handed a bare diff it must infer file line numbers from the @@
header, which it does unreliably; every finding then points at the wrong
code and looks perfectly plausible. So the payload states each line’s real
file line number explicitly in the gutter, and the caller keeps the set of
numbers that were actually shown. The analyzer drops any finding whose line
is not in that set, because such a finding is about code the model was never
shown.
The numbering itself is not implemented here: it comes from
Hunk::numbered_lines, which is the single home of the rule that a
removed line does not consume a line number.
Structs§
- Payload
- A rendered payload plus the file line numbers it legitimately covers.
Constants§
- PAYLOAD_
MAX_ BYTES - The largest payload drep will send to the model, in bytes.
Functions§
- render
- Render every hunk belonging to one file into a single payload.