summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/opencode/src/tool/apply_patch.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/apply_patch.ts b/packages/opencode/src/tool/apply_patch.ts
index e848fc905..9883f20a2 100644
--- a/packages/opencode/src/tool/apply_patch.ts
+++ b/packages/opencode/src/tool/apply_patch.ts
@@ -159,11 +159,13 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
}
// Check permissions if needed
+ const relativePaths = fileChanges.map((c) => path.relative(Instance.worktree, c.filePath))
await ctx.ask({
permission: "edit",
- patterns: fileChanges.map((c) => path.relative(Instance.worktree, c.filePath)),
+ patterns: relativePaths,
always: ["*"],
metadata: {
+ filepath: relativePaths.join(", "),
diff: totalDiff,
},
})