Skip to content

Commit 6bde1eb

Browse files
authored
Update prompt to demand git-formatted diffs (#17)
1 parent 9c41519 commit 6bde1eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/generate-pr-patch/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export async function run(): Promise<void> {
371371
return
372372
}
373373

374-
const trimmedDiff = diff[0].trim()
374+
const trimmedDiff = diff[0]?.trim() ?? ''
375375
let followupPr: FollowupPrResult | undefined
376376
let followupPrCreationError: string | undefined
377377
if (trimmedDiff) {

tensorzero/prompt.minijinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Comments about the failure.
4747
Command the user should run.
4848
</command>
4949

50-
* if the failure is due to an issue in the code, provide a unified diff patch that applies those fixes, in the exact Git patch format. Your diff will be applied with `git apply` to generate a new PR against the original PR branch. The diff should be wrapped in a block like this:
50+
* if the failure is due to an issue in the code, provide a unified diff patch that applies those fixes, in the exact Git patch format that `git diff` produces (for example `diff --git a/file b/file` headers followed by `---`/`+++` and context lines). Do **not** emit `*** Begin Patch`/`*** End Patch` markers or other apply_patch syntax. The diff should be wrapped in a block like this:
5151

5252
<diff>
5353
Verbatim diff that can be applied as a patch to the original PR branch.

0 commit comments

Comments
 (0)