fix(tool/read): match permission patterns against worktree-relative path
Read permission checks now use the same worktree-relative path basis as edit/write/apply_patch, so configured patterns apply consistently.
This commit is contained in:
@@ -178,7 +178,7 @@ export const ReadTool = Tool.define(
|
||||
|
||||
yield* ctx.ask({
|
||||
permission: "read",
|
||||
patterns: [filepath],
|
||||
patterns: [path.relative(instance.worktree, filepath)],
|
||||
always: ["*"],
|
||||
metadata: {},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user