fix(core): authorize patch move destinations (#38133)

This commit is contained in:
Aiden Cline 2026-07-21 12:18:23 -05:00 committed by GitHub
commit dbfbb13ccc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 58 additions and 4 deletions

View file

@ -189,6 +189,7 @@ export const Plugin = {
catch: (error) => new ToolFailure({ message: `patch verification failed: ${String(error)}` }),
})
const moveTarget = hunk.movePath ? resolveTarget(location, hunk.movePath) : undefined
if (moveTarget) targets.push(moveTarget)
if (moveTarget?.externalDirectory) {
yield* permission.assert({
action: "external_directory",