feat(cli): port ACP to V2 (#37907)
This commit is contained in:
parent
8d80365ef4
commit
cf651bc41b
42 changed files with 6020 additions and 32 deletions
|
|
@ -8,7 +8,7 @@ import { Effect, Schema } from "effect"
|
|||
import path from "path"
|
||||
import { FSUtil } from "@opencode-ai/util/fs-util"
|
||||
import { Location } from "../location"
|
||||
import { Patch } from "../patch"
|
||||
import { Patch } from "@opencode-ai/util/patch"
|
||||
import { PermissionV2 } from "../permission"
|
||||
import { Tool } from "./tool"
|
||||
import DESCRIPTION from "./patch.txt"
|
||||
|
|
@ -186,8 +186,7 @@ export const Plugin = {
|
|||
const before = original.replace(/^\uFEFF/, "")
|
||||
const update = yield* Effect.try({
|
||||
try: () => Patch.derive(hunk.path, hunk.chunks, original),
|
||||
catch: (error) =>
|
||||
new ToolFailure({ message: `patch verification failed: ${String(error)}` }),
|
||||
catch: (error) => new ToolFailure({ message: `patch verification failed: ${String(error)}` }),
|
||||
})
|
||||
const moveTarget = hunk.movePath ? resolveTarget(location, hunk.movePath) : undefined
|
||||
if (moveTarget?.externalDirectory) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue