chore: generate

This commit is contained in:
opencode-agent[bot]
2026-04-22 08:06:06 +00:00
committed by Aiden Cline
parent 8113a4360e
commit 894e638914
2 changed files with 9 additions and 10 deletions

View File

@@ -151,17 +151,15 @@ export const ApplyPatchTool = Tool.define(
}
case "delete": {
const source = yield* Bom
.readFile(afs, filePath)
.pipe(
Effect.catch((error) =>
Effect.fail(
new Error(
`apply_patch verification failed: ${error instanceof Error ? error.message : String(error)}`,
),
const source = yield* Bom.readFile(afs, filePath).pipe(
Effect.catch((error) =>
Effect.fail(
new Error(
`apply_patch verification failed: ${error instanceof Error ? error.message : String(error)}`,
),
),
)
),
)
const contentToDelete = source.text
const deleteDiff = trimDiff(createTwoFilesPatch(filePath, filePath, contentToDelete, ""))

View File

@@ -206,7 +206,8 @@ describe("tool.apply_patch freeform", () => {
const target = path.join(fixture.path, "example.cs")
await fs.writeFile(target, `${bom}using System;\n\nclass Test {}\n`, "utf-8")
const patchText = "*** Begin Patch\n*** Update File: example.cs\n@@\n class Test {}\n+class Next {}\n*** End Patch"
const patchText =
"*** Begin Patch\n*** Update File: example.cs\n@@\n class Test {}\n+class Next {}\n*** End Patch"
await execute({ patchText }, ctx)