Skip to content

Commit 2ba48a3

Browse files
authored
Merge branch 'main' into feat/new-diff
2 parents 3c8f43a + 4ab7999 commit 2ba48a3

File tree

13 files changed

+44
-18
lines changed

13 files changed

+44
-18
lines changed

.github/workflows/require-checklist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
steps:
1414
- uses: mheap/require-checklist-action@v2
1515
with:
16-
requireChecklist: false
16+
requireChecklist: true
1717
skipDescriptionRegex: .*\(optional\).*
1818
skipDescriptionRegexFlags: i

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [18.3.1](https://github.com/olimorris/codecompanion.nvim/compare/v18.3.0...v18.3.1) (2025-12-28)
4+
5+
6+
### Bug Fixes
7+
8+
* **adapters:** increase timeout for env var cmds ([#2601](https://github.com/olimorris/codecompanion.nvim/issues/2601)) ([c265e25](https://github.com/olimorris/codecompanion.nvim/commit/c265e25786ca0f2d1a07b4ceaa120ecbafcc5204)), closes [#2594](https://github.com/olimorris/codecompanion.nvim/issues/2594)
9+
* **chat:** remove images from title prompt ([#2586](https://github.com/olimorris/codecompanion.nvim/issues/2586)) ([274b2c6](https://github.com/olimorris/codecompanion.nvim/commit/274b2c69ea17d7f417999b132d81d63eb2cdb73f))
10+
311
## [18.3.0](https://github.com/olimorris/codecompanion.nvim/compare/v18.2.1...v18.3.0) (2025-12-22)
412

513

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Thank you to the following people:
2020

2121
<p align="center">
22-
<!-- sponsors --><a href="https://github.com/unicell"><img src="https:&#x2F;&#x2F;github.com&#x2F;unicell.png" width="60px" alt="User avatar: Qiu Yu" /></a><a href="https://github.com/adam-e-trepanier"><img src="https:&#x2F;&#x2F;github.com&#x2F;adam-e-trepanier.png" width="60px" alt="User avatar: Adam Trepanier" /></a><a href="https://github.com/jfgordon2"><img src="https:&#x2F;&#x2F;github.com&#x2F;jfgordon2.png" width="60px" alt="User avatar: Jeff Gordon" /></a><a href="https://github.com/prettymuchbryce"><img src="https:&#x2F;&#x2F;github.com&#x2F;prettymuchbryce.png" width="60px" alt="User avatar: Bryce Neal" /></a><a href="https://github.com/pratyushmittal"><img src="https:&#x2F;&#x2F;github.com&#x2F;pratyushmittal.png" width="60px" alt="User avatar: Pratyush Mittal" /></a><a href="https://github.com/JuanCrg90"><img src="https:&#x2F;&#x2F;github.com&#x2F;JuanCrg90.png" width="60px" alt="User avatar: Juan Carlos Ruiz" /></a><a href="https://github.com/Alexander-Garcia"><img src="https:&#x2F;&#x2F;github.com&#x2F;Alexander-Garcia.png" width="60px" alt="User avatar: Alexander Garcia" /></a><a href="https://github.com/LumenYoung"><img src="https:&#x2F;&#x2F;github.com&#x2F;LumenYoung.png" width="60px" alt="User avatar: Lumen Yang" /></a><a href="https://github.com/JPFrancoia"><img src="https:&#x2F;&#x2F;github.com&#x2F;JPFrancoia.png" width="60px" alt="User avatar: JPFrancoia" /></a><a href="https://github.com/jinzhongjia"><img src="https:&#x2F;&#x2F;github.com&#x2F;jinzhongjia.png" width="60px" alt="User avatar: jinzhongjia" /></a><a href="https://github.com/mrjones2014"><img src="https:&#x2F;&#x2F;github.com&#x2F;mrjones2014.png" width="60px" alt="User avatar: Mat" /></a><a href="https://github.com/Jahn16"><img src="https:&#x2F;&#x2F;github.com&#x2F;Jahn16.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/pixlmint"><img src="https:&#x2F;&#x2F;github.com&#x2F;pixlmint.png" width="60px" alt="User avatar: Christian Gröber" /></a><!-- sponsors -->
22+
<!-- sponsors --><a href="https://github.com/unicell"><img src="https:&#x2F;&#x2F;github.com&#x2F;unicell.png" width="60px" alt="User avatar: Qiu Yu" /></a><a href="https://github.com/adam-e-trepanier"><img src="https:&#x2F;&#x2F;github.com&#x2F;adam-e-trepanier.png" width="60px" alt="User avatar: Adam Trepanier" /></a><a href="https://github.com/jfgordon2"><img src="https:&#x2F;&#x2F;github.com&#x2F;jfgordon2.png" width="60px" alt="User avatar: Jeff Gordon" /></a><a href="https://github.com/prettymuchbryce"><img src="https:&#x2F;&#x2F;github.com&#x2F;prettymuchbryce.png" width="60px" alt="User avatar: Bryce Neal" /></a><a href="https://github.com/pratyushmittal"><img src="https:&#x2F;&#x2F;github.com&#x2F;pratyushmittal.png" width="60px" alt="User avatar: Pratyush Mittal" /></a><a href="https://github.com/JuanCrg90"><img src="https:&#x2F;&#x2F;github.com&#x2F;JuanCrg90.png" width="60px" alt="User avatar: Juan Carlos Ruiz" /></a><a href="https://github.com/Alexander-Garcia"><img src="https:&#x2F;&#x2F;github.com&#x2F;Alexander-Garcia.png" width="60px" alt="User avatar: Alexander Garcia" /></a><a href="https://github.com/LumenYoung"><img src="https:&#x2F;&#x2F;github.com&#x2F;LumenYoung.png" width="60px" alt="User avatar: Lumen Yang" /></a><a href="https://github.com/JPFrancoia"><img src="https:&#x2F;&#x2F;github.com&#x2F;JPFrancoia.png" width="60px" alt="User avatar: JPFrancoia" /></a><a href="https://github.com/pixlmint"><img src="https:&#x2F;&#x2F;github.com&#x2F;pixlmint.png" width="60px" alt="User avatar: Christian Gröber" /></a><!-- sponsors -->
2323
</p>
2424

2525
<p align="center">If <i>you</i> love CodeCompanion and use it in your workflow, please consider <a href="https://github.com/sponsors/olimorris">sponsoring me</a></p>

doc/configuration/adapters-acp.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ description: Learn how to configure ACP adapters like Claude Code, Gemini CLI an
66

77
This section contains configuration which is specific to Agent Client Protocol (ACP) adapters only. There is a lot of shared functionality between ACP and [http](/configuration/adapters-http) adapters. Therefore it's recommended you read the two pages together.
88

9+
## Changing an Adapter
10+
11+
You can select an ACP adapter to be the default for all chat interactions:
12+
13+
```lua
14+
require("codecompanion").setup({
15+
interactions = {
16+
chat = {
17+
adapter = "gemini_cli",
18+
},
19+
},
20+
}),
21+
```
22+
923
## Changing Adapter Settings
1024

1125
To change any of the default settings for an ACP adapter, you can extend it in your CodeCompanion setup. For example, to change the timeout and authentication method for the Gemini CLI adapter, you can do the following:

doc/configuration/rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ require("codecompanion").setup({
254254

255255
Parsers allow CodeCompanion to transform rules, affecting how they are shared in the chat buffer. This is particularly useful if you reference files in your rules. Currently, the plugin has two in-built parsers:
256256

257-
- `claude` - which will import files into the chat buffer in the same way Claude Code [does](https://docs.anthropic.com/en/docs/claude-code/memory#claude-md-imports). Note, this requires rules to be `markdown` files
257+
- `claude` - which will import files into the chat buffer in the same way Claude Code [does](https://code.claude.com/docs/en/memory#claude-md-imports). Note, this requires rules to be `markdown` files
258258
- `CodeCompanion` - parses rules in the same ways as `claude` but allows for a system prompts to be extracted via a H2 "System Prompt" header
259259
- `none` - a blank parser which can be used to overwrite parsers that have been set on the default rules groups
260260

lua/codecompanion/acp/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
local METHODS = require("codecompanion.acp.methods")
2222
local PromptBuilder = require("codecompanion.acp.prompt_builder")
2323
local adapter_utils = require("codecompanion.utils.adapters")
24+
local config = require("codecompanion.config")
2425
local log = require("codecompanion.utils.log")
2526

2627
local TIMEOUTS = {
@@ -348,7 +349,7 @@ end
348349
---@return CodeCompanion.ACPAdapter
349350
function Connection:prepare_adapter()
350351
local adapter = vim.deepcopy(self.adapter)
351-
adapter = adapter_utils.get_env_vars(adapter)
352+
adapter = adapter_utils.get_env_vars(adapter, { timeout = config.adapters.opts.cmd_timeout })
352353
adapter.parameters = adapter_utils.set_env_vars(adapter, adapter.parameters)
353354
adapter.defaults.auth_method = adapter_utils.set_env_vars(adapter, adapter.defaults.auth_method)
354355
adapter.defaults.mcpServers = adapter_utils.set_env_vars(adapter, adapter.defaults.mcpServers)

lua/codecompanion/adapters/http/ollama/get_models.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function M.choices(self, opts)
126126
log:error("Could not resolve Ollama adapter in the `choices` function")
127127
return {}
128128
end
129-
adapter_utils.get_env_vars(adapter)
129+
adapter_utils.get_env_vars(adapter, { timeout = config.adapters.opts.cmd_timeout })
130130
local url = adapter.env_replaced.url
131131
local is_uninitialised = _cached_models[url] == nil
132132

lua/codecompanion/adapters/http/openai_compatible.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ local function get_models(self, opts)
4040
return {}
4141
end
4242

43-
adapter_utils.get_env_vars(adapter)
43+
adapter_utils.get_env_vars(adapter, { timeout = config.adapters.opts.cmd_timeout })
4444
local url = adapter.env_replaced.url .. adapter.env_replaced.models_endpoint
4545

4646
local headers = {

lua/codecompanion/config.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ local defaults = {
4848
show_presets = true,
4949
},
5050
},
51+
opts = {
52+
cmd_timeout = 10e3, -- Timeout for commands that resolve env variables (milliseconds)
53+
},
5154
},
5255
constants = constants,
5356
interactions = {

lua/codecompanion/http.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function Client:send_sync(payload, opts)
181181
return nil, { message = "Failed to setup adapter", stderr = "setup=false" }
182182
end
183183

184-
adapter = adapter_utils.get_env_vars(adapter)
184+
adapter = adapter_utils.get_env_vars(adapter, { timeout = config.adapters.opts.cmd_timeout })
185185

186186
local body = self.methods.encode(
187187
vim.tbl_extend(
@@ -307,7 +307,7 @@ function Client:request(payload, actions, opts)
307307
return log:error("Failed to setup adapter")
308308
end
309309

310-
adapter = adapter_utils.get_env_vars(adapter)
310+
adapter = adapter_utils.get_env_vars(adapter, { timeout = config.adapters.opts.cmd_timeout })
311311

312312
local body = self.methods.encode(
313313
vim.tbl_extend(

0 commit comments

Comments
 (0)