You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user breaches the context window, the conversation **ends** and it
@@ -619,7 +619,7 @@ IN THE CHAT BUFFER ~
619
619
620
620
621
621
[!NOTE] CodeCompanion enables context management by default
622
-
If you’re using the `openai_responses` or `anthropic` adapters, then
622
+
If you're using the `openai_responses` or `anthropic` adapters, then
623
623
CodeCompanion will use their native server-side compaction capabilities. Please
624
624
see their respective documentation here
625
625
<https://developers.openai.com/api/docs/guides/compaction> and here
@@ -801,9 +801,8 @@ CURRENT LIMITATIONS *codecompanion-acp-current-limitations*
801
801
doesn't advertise terminal capabilities to agents.
802
802
- **Agent Plan Rendering**: Plan
803
803
<https://agentclientprotocol.com/protocol/agent-plan> updates from agents are
804
-
received and logged, but they’re not currently rendered in the chat buffer
805
-
UI.
806
-
- **Audio Content**: Audio can’t be sent or received
804
+
received and logged, but they're not currently rendered in the chat buffer UI.
805
+
- **Audio Content**: Audio can't be sent or received
807
806
808
807
809
808
SEE ALSO *codecompanion-acp-see-also*
@@ -900,7 +899,7 @@ information on how to do this.
900
899
901
900
ADAPTERS
902
901
903
-
- For the Claude Code adapter to work, you’ll need to ensure you have Zed’s claude-agent-acp <https://github.com/zed-industries/claude-agent-acp> adapter installed. This has been renamed from `claude-code-acp` in recent weeks (#2779 <https://github.com/olimorris/codecompanion.nvim/pull/2779>)
902
+
- For the Claude Code adapter to work, you'll need to ensure you have Zed's claude-agent-acp <https://github.com/zed-industries/claude-agent-acp> adapter installed. This has been renamed from `claude-code-acp` in recent weeks (#2779 <https://github.com/olimorris/codecompanion.nvim/pull/2779>)
904
903
905
904
906
905
CONFIG
@@ -928,14 +927,14 @@ PROMPT LIBRARY
928
927
929
928
CONFIG
930
929
931
-
- The biggest change in this release is the renaming of `strategies` to `interactions`. This will only be a breaking change if you specifically reference `codecompanion.strategies` in your configuration. If you do, you’ll need to change it to `codecompanion.interactions` (#2485 <https://github.com/olimorris/codecompanion.nvim/pull/2485>)
932
-
- Previously, built-in slash commands and tools were stored in `/catalog` folders which have now been renamed to `/builtin`. If you reference these in your configuration you’ll need to update the paths accordingly (#2482 <https://github.com/olimorris/codecompanion.nvim/pull/2482>)
930
+
- The biggest change in this release is the renaming of `strategies` to `interactions`. This will only be a breaking change if you specifically reference `codecompanion.strategies` in your configuration. If you do, you'll need to change it to `codecompanion.interactions` (#2485 <https://github.com/olimorris/codecompanion.nvim/pull/2485>)
931
+
- Previously, built-in slash commands and tools were stored in `/catalog` folders which have now been renamed to `/builtin`. If you reference these in your configuration you'll need to update the paths accordingly (#2482 <https://github.com/olimorris/codecompanion.nvim/pull/2482>)
933
932
- Workspaces have now been removed from the plugin. Please use |codecompanion-configuration-rules| instead.
934
933
935
934
936
935
ADAPTERS
937
936
938
-
- If you have a custom adapter, you’ll need to rename `condition` to be `enabled` on any schema items (#2439 <https://github.com/olimorris/codecompanion.nvim/pull/2439/commits/cb14c7bac869346e2d12b775c4bf258606add569>):
937
+
- If you have a custom adapter, you'll need to rename `condition` to be `enabled` on any schema items (#2439 <https://github.com/olimorris/codecompanion.nvim/pull/2439/commits/cb14c7bac869346e2d12b775c4bf258606add569>):
939
938
940
939
>lua
941
940
return {
@@ -964,12 +963,12 @@ CHAT
964
963
entire buffer is sent to the LLM with each request (#2444 <https://github.com/olimorris/codecompanion.nvim/pull/2444>)
965
964
—
966
965
- Passing an adapter as an argument to `:CodeCompanionChat` is now done with `:CodeCompanionChat adapter=<adapter_name>` (#2437 <https://github.com/olimorris/codecompanion.nvim/pull/2437>)
967
-
- If your chat buffer system prompt is still stored at `opts.system_prompt` you’ll need to change it to `interactions.chat.opts.system_prompt` (#2484 <https://github.com/olimorris/codecompanion.nvim/pull/2484>)
966
+
- If your chat buffer system prompt is still stored at `opts.system_prompt` you'll need to change it to `interactions.chat.opts.system_prompt` (#2484 <https://github.com/olimorris/codecompanion.nvim/pull/2484>)
968
967
969
968
970
969
PROMPT LIBRARY
971
970
972
-
If you have any prompts defined in your config, you’ll need to:
971
+
If you have any prompts defined in your config, you'll need to:
973
972
974
973
- Rename `opts.short_name` to `opts.alias` for each item in order to allow you to call them with `require("codecompanion").prompt("my_prompt")` or as slash commands in the chat buffer (#2471 <https://github.com/olimorris/codecompanion.nvim/pull/2471>).
975
974
@@ -1003,12 +1002,12 @@ If you have any prompts defined in your config, you’ll need to:
1003
1002
},
1004
1003
<
1005
1004
1006
-
- If you don’t wish to display any of the built-in prompt library items, you’ll need to change `display.action_palette.show_default_prompt_library` to `display.action_palette.show_preset_prompts` (#2499 <https://github.com/olimorris/codecompanion.nvim/pull/2499>)
1005
+
- If you don't wish to display any of the built-in prompt library items, you'll need to change `display.action_palette.show_default_prompt_library` to `display.action_palette.show_preset_prompts` (#2499 <https://github.com/olimorris/codecompanion.nvim/pull/2499>)
1007
1006
1008
1007
1009
1008
TOOLS
1010
1009
1011
-
If you have any tools in your config, you’ll need to rename:
1010
+
If you have any tools in your config, you'll need to rename:
1012
1011
1013
1012
- `requires_approval` to `require_approval_before` (#2439 <https://github.com/olimorris/codecompanion.nvim/pull/2439/commits/cb14c7bac869346e2d12b775c4bf258606add569>)
1014
1013
- `user_confirmation` to `require_confirmation_after` (#2450 <https://github.com/olimorris/codecompanion.nvim/pull/2450>)
@@ -1503,8 +1502,8 @@ connect you to an agent.
1503
1502
The configuration for both types of adapters is exactly the same, however they
1504
1503
sit within their own tables (`adapters.http.*` and `adapters.acp.*`) and have
1505
1504
different options available. HTTP adapters use `models` to allow users to
1506
-
select the specific LLM they’d like to interact with. ACP adapters use
1507
-
`commands` to allow users to customize their interaction with agents (e.g.�
1505
+
select the specific LLM they'd like to interact with. ACP adapters use
1506
+
`commands` to allow users to customize their interaction with agents (e.g.
1508
1507
enabling `yolo` mode). As there is a lot of shared functionality between the
1509
1508
two adapters, it is recommend that you read this page alongside the ACP one.
1510
1509
@@ -1588,8 +1587,8 @@ selection UI), you can set the `show_model_choices` option to `false`:
1588
1587
<
1589
1588
1590
1589
With `show_model_choices = false`, the default model (as defined in the
1591
-
adapter’s schema) will be automatically selected when changing adapters, and
1592
-
no model selection will be shown to the user.
1590
+
adapter's schema) will be automatically selected when changing adapters, and no
1591
+
model selection will be shown to the user.
1593
1592
1594
1593
1595
1594
ENVIRONMENT VARIABLES ~
@@ -1605,7 +1604,7 @@ the adapter's URL, headers, parameters and other fields at runtime.
Supported `env` value types: - **Plain environment variable name (string)**: if
1607
1606
the value is the name of an environment variable that has already been set
1608
-
(e.g.�`"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. -
1607
+
(e.g. `"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. -
1609
1608
**Command (string prefixed with cmd:)**: any value that starts with `cmd:` will
1610
1609
be executed via the shell. Example: `"cmd:op read
1611
1610
op://personal/Gemini/credential --no-newline"`. - **Function**: you can provide
@@ -2134,7 +2133,7 @@ stack:
2134
2133
CONTEXT MANAGEMENT ~
2135
2134
2136
2135
CodeCompanion can manage context in the chat buffer to try and prevent
2137
-
breaching the LLM’s context window. It can be enabled with:
2136
+
breaching the LLM's context window. It can be enabled with:
2138
2137
2139
2138
2140
2139
CodeCompanion makes use of a trigger, a threshold at which the context
@@ -3559,7 +3558,7 @@ The fastest way to copy an LLM's code output is with `gy`. This will yank the
3559
3558
nearest codeblock.
3560
3559
3561
3560
3562
-
APPLYING AN LLM�S EDITS TO A BUFFER OR FILE ~
3561
+
APPLYING AN LLM'S EDITS TO A BUFFER OR FILE ~
3563
3562
3564
3563
The |codecompanion-usage-chat-buffer-agents-tools-files| tool, combined with
3565
3564
the |codecompanion-usage-chat-buffer-editor-context.html-buffer| editor context
@@ -3649,8 +3648,12 @@ and LLM's responses. The plugin is turn-based, meaning that the user sends a
3649
3648
response which is then followed by the LLM's. The user's responses are parsed
3650
3649
by treesitter and sent via an adapter to an LLM for a response which is then
3651
3650
streamed back into the buffer. A response is sent to the LLM by pressing `<CR>`
3652
-
or `<C-s>`. This can of course be changed as per the |codecompanion--keymaps|
3653
-
section.
3651
+
or `<C-s>` in normal mode or `<C-CR>` in insert mode. This can of course be
3652
+
changed as per the |codecompanion--keymaps| section.
3653
+
3654
+
New in `v19.12.0`, you can send a message to the LLM whilst it's executing tool
3655
+
calls with the `btw` keymap which is triggered with `gm`. When safe to do so,
3656
+
CodeCompanion will send the message to the LLM.
3654
3657
3655
3658
3656
3659
CHANGING ADAPTER AND MODEL ~
@@ -3796,22 +3799,23 @@ available to the user in normal mode are:
3796
3799
- `close`: `<C-c>` to close the chat buffer
3797
3800
- `stop`: `q` to stop the current request
3798
3801
- `change_adapter`: `ga` to change the adapter for the current chat
3802
+
- `clear`: `gx` to clear the chat buffer's contents
3803
+
- `copilot_stats`: `gS` to show copilot usage stats
3804
+
- `btw`: `gm` type a message to the LLM whilst it's streaming
3799
3805
- `buffer_sync_all`: `gba` to sync the entire buffer on every turn
3800
3806
- `buffer_sync_diff`: `gbd` to sync only a buffers diff on every turn
3801
3807
- `codeblock`: `gc` to insert a codeblock in the chat buffer
3802
3808
- `debug`: `gd` to view/debug the chat buffer's contents
3803
3809
- `fold_code`: `gf` to fold any codeblocks in the chat buffer
3804
-
- `rules`: `gM` to clear all rules from the chat buffer
3810
+
- `goto_file_under_cursor`: `gR` to go to the file under cursor
3811
+
- `next_chat`: `}` to move to the next chat
3812
+
- `next_header`: `]]` to move to the next header
3813
+
- `previous_chat`: `{` to move to the previous chat
3814
+
- `previous_header`: `[[` to move to the previous header
3805
3815
- `regenerate`: `gr` to regenerate the last response
3806
-
- `goto_file_under_cursor`: `gR` to go to the file under cursor. If the file is already opened, it'll jump to the existing window. Otherwise, it'll be opened in a new tab.
3816
+
- `rules`: `gM` to clear all rules from the chat buffer
3807
3817
- `system_prompt`: `gs` to toggle the system prompt on/off
3808
-
- `copilot_stats`: `gS` to show copilot usage stats
3809
-
- `clear`: `gx` to clear the chat buffer's contents
3810
3818
- `yank_code`: `gy` to yank the last codeblock in the chat buffer
3811
-
- `previous_header`: `[[` to move to the previous header
3812
-
- `next_header`: `]]` to move to the next header
3813
-
- `previous_chat`: `{` to move to the previous chat
3814
-
- `next_chat`: `}` to move to the next chat
3815
3819
3816
3820
3817
3821
MESSAGES ~
@@ -4431,7 +4435,7 @@ message to the LLM.
4431
4435
4432
4436
[!IMPORTANT] With the exception of `#{buffer}` and `#{buffers}`, editor context
4433
4437
captures a point-in-time snapshot when your message is sent. If the underlying
4434
-
data changes (e.g.� new diagnostics, a different quickfix list), simply use the
4438
+
data changes (e.g. new diagnostics, a different quickfix list), simply use the
4435
4439
context again in a new message to share the latest state.
4436
4440
4437
4441
#BUFFER ~
@@ -5207,7 +5211,7 @@ LIST OF EVENTS ~
5207
5211
The events that are fired from within the plugin are:
5208
5212
5209
5213
- `CodeCompanionACPConnected` - Fired after the ACP connection is authenticated and ready to use
5210
-
- `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
5214
+
- `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
5211
5215
- `CodeCompanionACPSessionPost` - Fired after a new ACP session has been established
5212
5216
- `CodeCompanionChatACPModeChanged` - Fired after the ACP mode has been changed in the chat
5213
5217
- `CodeCompanionACPChatRestored` - Fired after an ACP session has been restored
@@ -5220,7 +5224,7 @@ The events that are fired from within the plugin are:
5220
5224
- `CodeCompanionChatCompacting` - Fired after the chat begins compacting messages to reduce token usage
5221
5225
- `CodeCompanionChatStopped` - Fired after a chat has been stopped
5222
5226
- `CodeCompanionChatCleared` - Fired after a chat has been cleared
5223
-
- `CodeCompanionChatRestored` - Fired after a chat has been restored to an editable state (e.g.when `on_before_submit` prevents submission)
5227
+
- `CodeCompanionChatRestored` - Fired after a chat has been restored to an editable state (e.g.when `on_before_submit` prevents submission)
5224
5228
- `CodeCompanionChatAdapter` - Fired after the adapter has been set in the chat
5225
5229
- `CodeCompanionChatModel` - Fired after the model has been set in the chat
5226
5230
- `CodeCompanionCLICreated` - Fired after a CLI buffer has been created for the first time
@@ -5710,7 +5714,7 @@ These handlers manage tool/function calling:
5710
5714
as a great reference to understand how they're working with the output of the
The chat buffer uses markdown as its syntax and `H2` headers separate the user and LLM's responses. The plugin is turn-based, meaning that the user sends a response which is then followed by the LLM's. The user's responses are parsed by treesitter and sent via an adapter to an LLM for a response which is then streamed back into the buffer. A response is sent to the LLM by pressing `<CR>` or `<C-s>`. This can of course be changed as per the [keymaps](#keymaps) section.
26
+
The chat buffer uses markdown as its syntax and `H2` headers separate the user and LLM's responses. The plugin is turn-based, meaning that the user sends a response which is then followed by the LLM's. The user's responses are parsed by treesitter and sent via an adapter to an LLM for a response which is then streamed back into the buffer. A response is sent to the LLM by pressing `<CR>` or `<C-s>` in normal mode or `<C-CR>` in insert mode. This can of course be changed as per the [keymaps](#keymaps) section.
27
+
28
+
New in `v19.12.0`, you can send a message to the LLM whilst it's executing tool calls with the `btw` keymap which is triggered with `gm`. When safe to do so, CodeCompanion will send the message to the LLM.
27
29
28
30
## Changing Adapter and Model
29
31
@@ -126,23 +128,25 @@ The plugin has a host of keymaps available in the chat buffer. The keymaps avail
126
128
-`send`: `<CR>|<C-s>` to send a message to the LLM
127
129
-`close`: `<C-c>` to close the chat buffer
128
130
-`stop`: `q` to stop the current request
131
+
129
132
-`change_adapter`: `ga` to change the adapter for the current chat
133
+
-`clear`: `gx` to clear the chat buffer’s contents
134
+
-`copilot_stats`: `gS` to show copilot usage stats
135
+
-`btw`: `gm` type a message to the LLM whilst it's streaming
130
136
-`buffer_sync_all`: `gba` to sync the entire buffer on every turn
131
137
-`buffer_sync_diff`: `gbd` to sync only a buffers diff on every turn
132
138
-`codeblock`: `gc` to insert a codeblock in the chat buffer
133
139
-`debug`: `gd` to view/debug the chat buffer’s contents
134
140
-`fold_code`: `gf` to fold any codeblocks in the chat buffer
135
-
-`rules`: `gM` to clear all rules from the chat buffer
141
+
-`goto_file_under_cursor`: `gR` to go to the file under cursor
142
+
-`next_chat`: `}` to move to the next chat
143
+
-`next_header`: `]]` to move to the next header
144
+
-`previous_chat`: `{` to move to the previous chat
145
+
-`previous_header`: `[[` to move to the previous header
136
146
-`regenerate`: `gr` to regenerate the last response
137
-
-`goto_file_under_cursor`: `gR` to go to the file under cursor. If the file is already opened, it’ll jump to the existing window. Otherwise, it’ll be opened in a new tab.
147
+
-`rules`: `gM` to clear all rules from the chat buffer
138
148
-`system_prompt`: `gs` to toggle the system prompt on/off
139
-
-`copilot_stats`: `gS` to show copilot usage stats
140
-
-`clear`: `gx` to clear the chat buffer’s contents
141
149
-`yank_code`: `gy` to yank the last codeblock in the chat buffer
142
-
-`previous_header`: `[[` to move to the previous header
143
-
-`next_header`: `]]` to move to the next header
144
-
-`previous_chat`: `{` to move to the previous chat
0 commit comments