Make write and edit permissions consistent (#92)

Currently edit requires a permissions call and write does not. This
means that if clients want to allow users to approve `Write` calls they
need to add handling to `HandleFileWrite` but if they do that then edits
get _two_ permissions checks.

Alternatively we could remove the write tool from approved tools (which
would make more sense to me) but I'm assuming its there for a good
reason, if not happy to change to remove it instead!

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
This commit is contained in:
WhiskeyJack96
2025-10-15 01:34:49 -07:00
committed by GitHub
parent 75b44e945e
commit 7f5ebca3fb

View File

@@ -191,7 +191,6 @@ export class ClaudeAcpAgent implements Agent {
disallowedTools.push("Read");
}
if (this.clientCapabilities?.fs?.writeTextFile) {
allowedTools.push(toolNames.write);
disallowedTools.push("Write", "Edit");
}
if (this.clientCapabilities?.terminal) {