Skip to content

Commit a894bc2

Browse files
committed
wip
1 parent ec6f364 commit a894bc2

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

doc/codecompanion.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*codecompanion.txt* For NVIM v0.11 Last change: 2026 March 28
1+
*codecompanion.txt* For NVIM v0.11 Last change: 2026 April 04
22

33
==============================================================================
44
Table of Contents *codecompanion-table-of-contents*
@@ -79,7 +79,7 @@ FEATURES *codecompanion-welcome-features*
7979
- Copilot Chat <https://github.com/features/copilot> meets Zed AI <https://zed.dev/blog/zed-ai>, in Neovim
8080
- Integrates Neovim with LLMs and Agents in the CLI
8181
- Support for LLMs from Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI out of the box (or bring your own!)
82-
- Support for Agent Client Protocol <https://agentclientprotocol.com/overview/introduction>, enabling coding with agents like Augment Code <https://docs.augmentcode.com/cli/overview>, Cagent <https://github.com/docker/cagent> from Docker, Claude Code <https://docs.anthropic.com/en/docs/claude-code/overview>, Codex <https://openai.com/codex>, Copilot CLI <https://github.com/features/copilot/cli>, Gemini CLI <https://github.com/google-gemini/gemini-cli>, Goose <https://block.github.io/goose/>, Cursor CLI <https://cursor.com/docs/cli/overview>, Kimi CLI <https://github.com/MoonshotAI/kimi-cli>, Kiro <https://kiro.dev/cli/>, Mistral Vibe <https://github.com/mistralai/mistral-vibe> and OpenCode <https://opencode.ai>
82+
- Support for Agent Client Protocol <https://agentclientprotocol.com/overview/introduction>, enabling coding with agents like Augment Code <https://docs.augmentcode.com/cli/overview>, Cagent <https://github.com/docker/cagent> from Docker, Claude Code <https://docs.anthropic.com/en/docs/claude-code/overview>, Cline CLI <https://docs.cline.bot/home>, Codex <https://openai.com/codex>, Copilot CLI <https://github.com/features/copilot/cli>, Gemini CLI <https://github.com/google-gemini/gemini-cli>, Goose <https://block.github.io/goose/>, Cursor CLI <https://cursor.com/docs/cli/overview>, Kimi CLI <https://github.com/MoonshotAI/kimi-cli>, Kiro <https://kiro.dev/cli/>, Mistral Vibe <https://github.com/mistralai/mistral-vibe> and OpenCode <https://opencode.ai>
8383
- User contributed and supported |codecompanion-configuration-adapters-http-community-adapters|
8484
- Support for |codecompanion-model-context-protocol|
8585
- |codecompanion-usage-inline.html|, code creation and refactoring
@@ -114,6 +114,7 @@ agents. Out of the box, the plugin supports:
114114
- Augment Code (`auggie_cli`) - Requires an API key
115115
- Cagent (`cagent`)
116116
- Claude Code (`claude_code`) - Requires an API key or a Claude Pro subscription
117+
- Cline CLI (`cline_cli`)
117118
- Codex (`codex`) - Requires an API key
118119
- Copilot (`copilot`) - Requires a token which is created via `:Copilot setup` in Copilot.vim <https://github.com/github/copilot.vim>
119120
- Gemini CLI (`gemini_cli`) - Requires an API key or a Gemini Pro subscription
@@ -1264,6 +1265,16 @@ AN API KEY
12641265
<
12651266

12661267

1268+
SETUP: CLINE CLI ~
1269+
1270+
To use Cline CLI <https://cline.bot/cli> within CodeCompanion, you’ll need to
1271+
take the following steps:
1272+
1273+
1. Install <https://docs.cline.bot/getting-started/installing-cline#cli> Cline CLI.
1274+
2. Authenticate by running `cline auth`.
1275+
3. Select the `cline_cli` adapter in your chat buffer
1276+
1277+
12671278
SETUP: CODEX ~
12681279

12691280
To use OpenAI’s Codex <https://openai.com/codex/>, install an ACP-compatible
@@ -5366,7 +5377,9 @@ LIST OF EVENTS ~
53665377

53675378
The events that are fired from within the plugin are:
53685379

5380+
- `CodeCompanionACPConnected` - Fired after the ACP connection is authenticated and ready to use
53695381
- `CodeCompanionACPSessionPre` - Fired after ACP authentication completes but before a new session is established; allows subscribers to modify the connection (e.g. inject MCP servers) synchronously
5382+
- `CodeCompanionACPSessionPost` - Fired after a new ACP session has been established
53705383
- `CodeCompanionChatACPModeChanged` - Fired after the ACP mode has been changed in the chat
53715384
- `CodeCompanionACPChatRestored` - Fired after an ACP session has been restored
53725385
- `CodeCompanionChatCreated` - Fired after a chat has been created for the first time

doc/usage/events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ In order to enable a tighter integration between CodeCompanion and your Neovim c
1010

1111
The events that are fired from within the plugin are:
1212

13+
- `CodeCompanionACPConnected` - Fired after the ACP connection is authenticated and ready to use
1314
- `CodeCompanionACPSessionPre` - Fired after ACP authentication completes but before a new session is established; allows subscribers to modify the connection (e.g. inject MCP servers) synchronously
15+
- `CodeCompanionACPSessionPost` - Fired after a new ACP session has been established
1416
- `CodeCompanionChatACPModeChanged` - Fired after the ACP mode has been changed in the chat
1517
- `CodeCompanionACPChatRestored` - Fired after an ACP session has been restored
1618
- `CodeCompanionChatCreated` - Fired after a chat has been created for the first time

lua/codecompanion/acp/init.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ function Connection:connect_and_initialize()
185185
self:apply_default_model()
186186
self:apply_default_mode()
187187

188+
utils.fire("ACPSessionPost", {
189+
session_id = self.session_id,
190+
})
191+
188192
return self
189193
end
190194

@@ -259,6 +263,10 @@ function Connection:ensure_session()
259263
self:apply_default_model()
260264
self:apply_default_mode()
261265

266+
utils.fire("ACPSessionPost", {
267+
session_id = self.session_id,
268+
})
269+
262270
return true
263271
end
264272

lua/codecompanion/interactions/chat/acp/handler.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local config = require("codecompanion.config")
22
local formatter = require("codecompanion.interactions.chat.acp.formatters")
33
local log = require("codecompanion.utils.log")
4+
local utils = require("codecompanion.utils")
45
local watch = require("codecompanion.interactions.shared.watch")
56

67
---@class CodeCompanion.Chat.ACPHandler
@@ -80,6 +81,8 @@ function ACPHandler:ensure_connection()
8081

8182
watch.enable()
8283

84+
utils.fire("ACPConnected", { bufnr = self.chat.bufnr })
85+
8386
return true
8487
end
8588

0 commit comments

Comments
 (0)