g1t/bench/reviewbench/agent/prompt-lib.mjs

8 lines441 bytesCodeBlame
1// The part of ../prompt.mjs the image needs, without the path to the Rust
2// source (the image only carries instructions.txt, generated from it).
3
4/** What production says about the pull request, then the instructions. */
5export function buildPrompt(pr, instructions) {
6 const about = [`Pull request #${pr.pr_number}: ${pr.title ?? ""}`, pr.body ?? ""].filter((part) => part.trim()).join("\n\n");
7 return `${about}\n\n${instructions}`;
8}