opencode icon indicating copy to clipboard operation
opencode copied to clipboard

use acp client tools if available

Open haoxiangliew opened this issue 2 months ago • 5 comments

Delegates file reads, edits, and writes to the ACP Client, if the ACP Client (such as Zed) supports these modifications.

Brings opencode acp more in-line with @zed-industries/claude-code-acp

  • Contributes to #216 :)
acp

haoxiangliew avatar Nov 06 '25 01:11 haoxiangliew

@haoxiangliew i was thinking about doing this, we should probably disable the opencode write tools then if the ACP provided ones are avialable no?

rekram1-node avatar Nov 06 '25 01:11 rekram1-node

to work with our tools & prompt I think we should just make the acp tools be called the exact same thing with the same prompts ideally.

I think you could import the existing tools, and override / copy from them so that you only change the execute portions

also you need to remember to keep the permissions system in place too

rekram1-node avatar Nov 06 '25 01:11 rekram1-node

to work with our tools & prompt I think we should just make the acp tools be called the exact same thing with the same prompts ideally.

I think you could import the existing tools, and override / copy from them so that you only change the execute portions

also you need to remember to keep the permissions system in place too

@rekram1-node

went thru a couple iterations on the design to get this done as cleanly as possible:

  • wanted to preserve the read,write,edit tools as-is instead of duplicating them across to acp
  • + no need to disable the native tools when using acp

lmk what u think :+1:

haoxiangliew avatar Nov 06 '25 05:11 haoxiangliew

left a couple comments here. Also I'm gonna merge dev into your branch there was a bug in one of the tests that causes CI to run for a longgg time

rekram1-node avatar Nov 06 '25 16:11 rekram1-node

I've mentioned it in discord and when I get the chance I can update this pr but we don't want to bleed the domains, the bash, edit, etc tools should not import anything ACP related at all.

ACP should be able to do all this entirely in its own domain just importing from the others and overriding things if necessary.

I think this requires a bit more work

rekram1-node avatar Nov 18 '25 06:11 rekram1-node