Skip to content

Commit be08265

Browse files
committed
Merge branch 'main' into feat/gemini_reasoning
2 parents 3614e88 + e7762c6 commit be08265

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1765
-370
lines changed

CHANGELOG.md

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

3+
## [17.33.0](https://github.com/olimorris/codecompanion.nvim/compare/v17.32.0...v17.33.0) (2025-11-24)
4+
5+
6+
### Features
7+
8+
* **adapters:** add support for Gemini 3 in Copilot ([#2419](https://github.com/olimorris/codecompanion.nvim/issues/2419)) ([7686e3a](https://github.com/olimorris/codecompanion.nvim/commit/7686e3aa5edfc7ab03487239a9c1fa757e81cc97)), closes [#2413](https://github.com/olimorris/codecompanion.nvim/issues/2413)
9+
* **adapters:** add support for gemini-3 ([b7dc2b1](https://github.com/olimorris/codecompanion.nvim/commit/b7dc2b19371fa20913b4cc5f7867741b35d3467e))
10+
* **adapters:** add support for gemini-3 in the gemini adapter ([#2411](https://github.com/olimorris/codecompanion.nvim/issues/2411)) ([b7dc2b1](https://github.com/olimorris/codecompanion.nvim/commit/b7dc2b19371fa20913b4cc5f7867741b35d3467e))
11+
* **adapters:** copilot can dynamically set max tokens ([#2429](https://github.com/olimorris/codecompanion.nvim/issues/2429)) ([d348080](https://github.com/olimorris/codecompanion.nvim/commit/d348080e39d5f184a83cdd5a549ad6037be4172b))
12+
* **adapters:** show copilot multipliers and refactor changing adapters ([#2427](https://github.com/olimorris/codecompanion.nvim/issues/2427)) ([e400396](https://github.com/olimorris/codecompanion.nvim/commit/e40039647faf9eba740fa0656dceeb14fb91a725))
13+
* **adapters:** support extra fields in OpenAI adapter ([#2359](https://github.com/olimorris/codecompanion.nvim/issues/2359)) ([9cc2933](https://github.com/olimorris/codecompanion.nvim/commit/9cc2933a735a238c586c267e07f4992f039c1027))
14+
* **inline:** add keymap to stop request ([#2426](https://github.com/olimorris/codecompanion.nvim/issues/2426)) ([723ca0e](https://github.com/olimorris/codecompanion.nvim/commit/723ca0eaa13b0e4c87c30c1416f6ff81b87aeae4)), closes [#2420](https://github.com/olimorris/codecompanion.nvim/issues/2420)
15+
16+
17+
### Bug Fixes
18+
19+
* **acp:** show urls in tool output ([#2403](https://github.com/olimorris/codecompanion.nvim/issues/2403)) ([32dd2da](https://github.com/olimorris/codecompanion.nvim/commit/32dd2da2bc1b360676c32ef741d8d63052a8edbd))
20+
* **chat:** preserve prompt library system prompts ([#2433](https://github.com/olimorris/codecompanion.nvim/issues/2433)) ([ccfdc47](https://github.com/olimorris/codecompanion.nvim/commit/ccfdc473c375a926c47923bf251ce9fc0f817843))
21+
* **chat:** watched buffer diffs should have context id ([#2410](https://github.com/olimorris/codecompanion.nvim/issues/2410)) ([9b38615](https://github.com/olimorris/codecompanion.nvim/commit/9b38615913835c19c82c0296f53cdb1533dc5640))
22+
* **copilot:** handle "quota exceeded" error ([#2430](https://github.com/olimorris/codecompanion.nvim/issues/2430)) ([d8fbcfe](https://github.com/olimorris/codecompanion.nvim/commit/d8fbcfe21925c2e3a7215fbcb7eb98a7de48fa7c)), closes [#2416](https://github.com/olimorris/codecompanion.nvim/issues/2416)
23+
324
## [17.32.0](https://github.com/olimorris/codecompanion.nvim/compare/v17.31.0...v17.32.0) (2025-11-18)
425

526

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/toupeira"><img src="https:&#x2F;&#x2F;github.com&#x2F;toupeira.png" width="60px" alt="User avatar: Markus Koller" /></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/iamthebot"><img src="https:&#x2F;&#x2F;github.com&#x2F;iamthebot.png" width="60px" alt="User avatar: Alfredo Luque" /></a><a href="https://github.com/serranomorante"><img src="https:&#x2F;&#x2F;github.com&#x2F;serranomorante.png" width="60px" alt="User avatar: Patricio Serrano" /></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/toupeira"><img src="https:&#x2F;&#x2F;github.com&#x2F;toupeira.png" width="60px" alt="User avatar: Markus Koller" /></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/serranomorante"><img src="https:&#x2F;&#x2F;github.com&#x2F;serranomorante.png" width="60px" alt="User avatar: Patricio Serrano" /></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><!-- 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/.vitepress/config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { joinURL, withoutTrailingSlash } from "ufo";
22
import { defineConfig } from "vitepress";
3+
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";
34
import { execSync } from "node:child_process";
45
import { withMermaid } from "vitepress-plugin-mermaid";
56

@@ -74,6 +75,11 @@ const headers = inProd ? [...baseHeaders, umamiScript] : baseHeaders;
7475
// https://vitepress.dev/reference/site-config
7576
export default withMermaid(
7677
defineConfig({
78+
markdown: {
79+
config(md) {
80+
md.use(tabsMarkdownPlugin);
81+
},
82+
},
7783
mermaid: {
7884
securityLevel: "loose", // Allows more flexibility
7985
theme: "base", // Use base theme to allow CSS variables to take effect

doc/.vitepress/theme/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import DefaultTheme from "vitepress/theme";
22
import "./vaporwave.css";
3+
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";
34

4-
export default DefaultTheme;
5+
export default {
6+
extends: DefaultTheme,
7+
enhanceApp({ app }) {
8+
enhanceAppWithTabs(app);
9+
},
10+
};

doc/codecompanion.txt

Lines changed: 30 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*codecompanion.txt* For NVIM v0.11 Last change: 2025 November 19
1+
*codecompanion.txt* For NVIM v0.11 Last change: 2025 November 24
22

33
==============================================================================
44
Table of Contents *codecompanion-table-of-contents*
@@ -878,10 +878,9 @@ The configuration for both types of adapters is exactly the same, however they
878878
sit within their own tables (`adapters.http.*` and `adapters.acp.*`) and have
879879
different options available. HTTP adapters use `models` to allow users to
880880
select the specific LLM they’d like to interact with. ACP adapters use
881-
`commands` to allow users to customize their interaction with agents
882-
(e.g. enabling `yolo` mode). As there is a lot of shared functionality between
883-
the two adapters, it is recommend that you read this page alongside the ACP
884-
one.
881+
`commands` to allow users to customize their interaction with agents (e.g.�
882+
enabling `yolo` mode). As there is a lot of shared functionality between the
883+
two adapters, it is recommend that you read this page alongside the ACP one.
885884

886885

887886
CHANGING THE DEFAULT ADAPTER ~
@@ -913,7 +912,7 @@ the adapter’s URL, headers, parameters and other fields at runtime.
913912

914913
Supported `env` value types: - **Plain environment variable name (string)**: if
915914
the value is the name of an environment variable that has already been set
916-
(e.g. `"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. -
915+
(e.g.`"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. -
917916
**Command (string prefixed with cmd:)**: any value that starts with `cmd:` will
918917
be executed via the shell. Example: `"cmd:op read
919918
op://personal/Gemini/credential --no-newline"`. - **Function**: you can provide
@@ -1867,69 +1866,9 @@ utilize the `insert_edit_into_file` tool, then the plugin can update files and
18671866
buffers and a diff will be created so you can see the changes made by the LLM.
18681867
The `inline` is the default diff.
18691868

1870-
There are a number of diff settings available to you:
1869+
Depending on which provider you choose, there are different configuration
1870+
options available to you:
18711871

1872-
>lua
1873-
require("codecompanion").setup({
1874-
display = {
1875-
diff = {
1876-
enabled = true,
1877-
provider = providers.diff, -- mini_diff|split|inline
1878-
1879-
provider_opts = {
1880-
-- Options for inline diff provider
1881-
inline = {
1882-
layout = "float", -- float|buffer - Where to display the diff
1883-
1884-
diff_signs = {
1885-
signs = {
1886-
text = "▌", -- Sign text for normal changes
1887-
reject = "✗", -- Sign text for rejected changes in super_diff
1888-
highlight_groups = {
1889-
addition = "DiagnosticOk",
1890-
deletion = "DiagnosticError",
1891-
modification = "DiagnosticWarn",
1892-
},
1893-
},
1894-
-- Super Diff options
1895-
icons = {
1896-
accepted = " ",
1897-
rejected = " ",
1898-
},
1899-
colors = {
1900-
accepted = "DiagnosticOk",
1901-
rejected = "DiagnosticError",
1902-
},
1903-
},
1904-
1905-
opts = {
1906-
context_lines = 3, -- Number of context lines in hunks
1907-
dim = 25, -- Background dim level for floating diff (0-100, [100 full transparent], only applies when layout = "float")
1908-
full_width_removed = true, -- Make removed lines span full width
1909-
show_keymap_hints = true, -- Show "gda: accept | gdr: reject" hints above diff
1910-
show_removed = true, -- Show removed lines as virtual text
1911-
},
1912-
},
1913-
1914-
-- Options for the split provider
1915-
split = {
1916-
close_chat_at = 240, -- Close an open chat buffer if the total columns of your display are less than...
1917-
layout = "vertical", -- vertical|horizontal split
1918-
opts = {
1919-
"internal",
1920-
"filler",
1921-
"closeoff",
1922-
"algorithm:histogram", -- https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/
1923-
"indent-heuristic", -- https://blog.k-nut.eu/better-git-diffs
1924-
"followwrap",
1925-
"linematch:120",
1926-
},
1927-
},
1928-
},
1929-
},
1930-
},
1931-
})
1932-
<
19331872

19341873
You can also customize the window that the diff appears in (taking precedence
19351874
over `child_window`):
@@ -2214,8 +2153,26 @@ The inline assistant supports keymaps for accepting or rejecting changes:
22142153
})
22152154
<
22162155

2217-
In this example, `<leader>a` (or `ga` on some keyboards) accepts inline
2218-
changes, while `gr` rejects them.
2156+
In this example, `ga` accepts inline changes, while `gr` rejects them.
2157+
2158+
You can also cancel an inline request with:
2159+
2160+
>lua
2161+
require("codecompanion").setup({
2162+
strategies = {
2163+
inline = {
2164+
keymaps = {
2165+
stop = {
2166+
modes = { n = "q" },
2167+
index = 4,
2168+
callback = "keymaps.stop",
2169+
description = "Stop request",
2170+
},
2171+
},
2172+
},
2173+
},
2174+
})
2175+
<
22192176

22202177

22212178
VARIABLES ~
@@ -2952,7 +2909,7 @@ The fastest way to copy an LLM’s code output is with `gy`. This will yank the
29522909
nearest codeblock.
29532910

29542911

2955-
APPLYING AN LLMS EDITS TO A BUFFER OR FILE ~
2912+
APPLYING AN LLM€�S EDITS TO A BUFFER OR FILE ~
29562913

29572914
The |codecompanion-usage-chat-buffer-tools-files| tool, combined with the
29582915
|codecompanion-usage-chat-buffer-variables.html-buffer| variable or
@@ -5020,7 +4977,7 @@ These handlers manage tool/function calling:
50204977
as a great reference to understand how they’re working with the output of the
50214978
API
50224979

5023-
OPENAIS API OUTPUT
4980+
OPENAI€�S API OUTPUT
50244981

50254982
If we reference the OpenAI documentation
50264983
<https://platform.openai.com/docs/guides/text-generation/chat-completions-api>
@@ -6927,7 +6884,7 @@ tool to function. In the case of Anthropic, we insert additional headers.
69276884
<
69286885

69296886
Some adapter tools can be a `hybrid` in terms of their implementation. That is,
6930-
they’re an adapter tool that requires a client-side component (i.e. a
6887+
they’re an adapter tool that requires a client-side component (i.e.a
69316888
built-in tool). This is the case for the
69326889
|codecompanion-usage-chat-buffer-tools-memory| tool from Anthropic. To allow
69336890
for this, ensure that the tool definition in `available_tools` has

doc/configuration/chat-buffer.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -429,41 +429,32 @@ require("codecompanion").setup({
429429

430430
CodeCompanion has built-in inline and split diffs available to you. If you utilize the `insert_edit_into_file` tool, then the plugin can update files and buffers and a diff will be created so you can see the changes made by the LLM. The `inline` is the default diff.
431431

432-
There are a number of diff settings available to you:
432+
Depending on which provider you choose, there are different configuration options available to you:
433+
434+
:::tabs
435+
436+
== Select Provider
433437

434438
```lua
435439
require("codecompanion").setup({
436440
display = {
437441
diff = {
438442
enabled = true,
439-
provider = providers.diff, -- mini_diff|split|inline
443+
provider = providers.diff, -- inline|split|mini.diff
444+
},
445+
},
446+
})
447+
```
440448

449+
== Inline Provider
450+
451+
```lua
452+
require("codecompanion").setup({
453+
display = {
454+
diff = {
441455
provider_opts = {
442-
-- Options for inline diff provider
443456
inline = {
444457
layout = "float", -- float|buffer - Where to display the diff
445-
446-
diff_signs = {
447-
signs = {
448-
text = "", -- Sign text for normal changes
449-
reject = "", -- Sign text for rejected changes in super_diff
450-
highlight_groups = {
451-
addition = "DiagnosticOk",
452-
deletion = "DiagnosticError",
453-
modification = "DiagnosticWarn",
454-
},
455-
},
456-
-- Super Diff options
457-
icons = {
458-
accepted = "",
459-
rejected = "",
460-
},
461-
colors = {
462-
accepted = "DiagnosticOk",
463-
rejected = "DiagnosticError",
464-
},
465-
},
466-
467458
opts = {
468459
context_lines = 3, -- Number of context lines in hunks
469460
dim = 25, -- Background dim level for floating diff (0-100, [100 full transparent], only applies when layout = "float")
@@ -472,8 +463,19 @@ require("codecompanion").setup({
472463
show_removed = true, -- Show removed lines as virtual text
473464
},
474465
},
466+
},
467+
},
468+
},
469+
})
470+
```
471+
472+
== Split Provider
475473

476-
-- Options for the split provider
474+
```lua
475+
require("codecompanion").setup({
476+
display = {
477+
diff = {
478+
provider_opts = {
477479
split = {
478480
close_chat_at = 240, -- Close an open chat buffer if the total columns of your display are less than...
479481
layout = "vertical", -- vertical|horizontal split
@@ -493,6 +495,9 @@ require("codecompanion").setup({
493495
})
494496
```
495497

498+
499+
:::
500+
496501
You can also customize the window that the diff appears in (taking precedence over `child_window`):
497502

498503
```lua

doc/configuration/inline-assistant.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,26 @@ require("codecompanion").setup({
3636
})
3737
```
3838

39-
In this example, `<leader>a` (or `ga` on some keyboards) accepts inline changes, while `gr` rejects them.
39+
In this example, `ga` accepts inline changes, while `gr` rejects them.
40+
41+
You can also cancel an inline request with:
42+
43+
```lua
44+
require("codecompanion").setup({
45+
strategies = {
46+
inline = {
47+
keymaps = {
48+
stop = {
49+
modes = { n = "q" },
50+
index = 4,
51+
callback = "keymaps.stop",
52+
description = "Stop request",
53+
},
54+
},
55+
},
56+
},
57+
})
58+
```
4059

4160
## Variables
4261

doc/package-lock.json

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"mermaid": "^11.10.0",
55
"ufo": "^1.6.1",
66
"vitepress": "^1.5.0",
7-
"vitepress-plugin-mermaid": "^2.0.17"
7+
"vitepress-plugin-mermaid": "^2.0.17",
8+
"vitepress-plugin-tabs": "^0.7.3"
89
},
910
"scripts": {
1011
"dev": "vitepress dev",

0 commit comments

Comments
 (0)