fix(core): use patch tool name in duplicate errors

This commit is contained in:
Aiden Cline 2026-08-31 16:29:37 -05:00
parent eef759d9c7
commit 1e3afd7398
2 changed files with 2 additions and 2 deletions

View file

@ -132,7 +132,7 @@ export const Plugin = {
const target = yield* resolveTarget(hunk.path)
if (prepared.some((change) => change.target.absolute === target.absolute)) {
return yield* new ToolFailure({
message: `apply_patch verification failed: invalid patch: multiple operations target ${target.absolute}`,
message: `patch verification failed: invalid patch: multiple operations target ${target.absolute}`,
})
}
if (hunk.type === "add") {

View file

@ -347,7 +347,7 @@ describe("PatchTool", () => {
status: "error",
error: {
type: "tool.execution",
message: `apply_patch verification failed: invalid patch: multiple operations target ${target}`,
message: `patch verification failed: invalid patch: multiple operations target ${target}`,
},
})
expect(yield* Effect.promise(() => fs.readFile(target, "utf8"))).toBe("before\n")