fix: issue properly basing diffs when tagged on pr

This commit is contained in:
2026-05-31 03:01:36 -05:00
parent 93471c9408
commit f7d59cad03
2 changed files with 12 additions and 8 deletions
+4 -1
View File
@@ -490,7 +490,10 @@ export function CheckoutPrTool(ctx: ToolContext) {
`use the TOC line ranges as your checklist and read specific files from the diff. ` +
`for example, if the TOC says "src/foo.ts → lines 5-42", read lines 5-42 from diffPath. ` +
`review files selectively based on relevance. ` +
`to inspect the PR's changed files, use diffPath — do NOT run git diff commands. ` +
`IMPORTANT: to inspect the PR's changed files, read diffPath directly — ` +
`do NOT run git diff or git show. The PR base branch is '${pr.baseRef}', NOT necessarily 'main' — ` +
`if you must use git, use 'origin/${pr.baseRef}' as the base (e.g. git log origin/${pr.baseRef}..HEAD), ` +
`but prefer diffPath for all diff analysis. ` +
(incrementalDiffPath
? ` IMPORTANT: read incrementalDiffPath FIRST to understand what changed since last review, then use diffPath for full context.`
: "") +