-
Couldn't load subscription status.
- Fork 0
Add OpenCode ACP adapter support to codecompanion configuration #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Eckii24 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot take care please
| opencode = function() | ||
| return require("codecompanion.adapters").extend("acp", { | ||
| name = "opencode", | ||
| url = "http://localhost:3210/acp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you even checked the existing implementations?
There is no URL. Also would make much sense. You have to invoke the introduces cli command 'opencode acp'
Try again...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 3cf5d12. Removed the url parameter and added commands to invoke opencode acp CLI command, following the same pattern as gemini_cli.
Co-authored-by: Eckii24 <[email protected]>
Fixed in commit 572cf8f. The OpenCode ACP adapter now correctly uses the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR adds support for OpenCode's ACP (Anthropic Computer Protocol) adapter to the codecompanion.nvim configuration, enabling integration with OpenCode as an AI provider.
Background
OpenCode recently added ACP support (see sst/opencode#2947), and codecompanion.nvim has native ACP adapter support in its adapters/acp module. This change connects the two to enable OpenCode as an available AI provider.
Changes
Added a new
acpadapter configuration in.config/nvim/lua/plugins/codecompanion.lua:Usage
To use the OpenCode adapter:
:CodeCompanionActionsThe adapter uses Claude 3.5 Sonnet (
claude-3-5-sonnet-20241022) as the default model and invokes theopencode acpCLI command, following the same pattern as other CLI-based ACP adapters like gemini_cli.Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.