Przeglądaj źródła

fix(ui): show file path in apply_patch request permission screen (#10079)

iltenahmet 1 miesiąc temu
rodzic
commit
3eaf6f3baf
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      packages/opencode/src/tool/apply_patch.ts

+ 3 - 1
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,
       },
     })