Skip to content

Commit 873e772

Browse files
committed
Merge branch 'main' into tools
* main: chore(doc): auto generate docs Properly null check opts.glob when rigpgrep is not available (CopilotC-Nvim#1183) docs: add adborden as a contributor for code (CopilotC-Nvim#1171) fix: CopilotC-Nvim#1153 use filepath on accept (CopilotC-Nvim#1170) chore(doc): auto generate docs chore(main): release 3.12.1 (CopilotC-Nvim#1164) docs: add fredrikaverpil as a contributor for code (CopilotC-Nvim#1165) chore(doc): auto generate docs fix: move plenary import into function (CopilotC-Nvim#1162) chore(doc): auto generate docs chore(main): release 3.12.0 (CopilotC-Nvim#1131) docs: add azdanov as a contributor for doc, and code (CopilotC-Nvim#1130) chore(doc): auto generate docs docs: update mentions of default model to gpt-4.1 feat: switch to new default model gpt-4.1 chore(doc): auto generate docs chore(main): release 3.11.1 (CopilotC-Nvim#1116) chore(doc): auto generate docs [pre-commit.ci] pre-commit autoupdate
2 parents cfa02e8 + a90a92a commit 873e772

9 files changed

Lines changed: 60 additions & 13 deletions

File tree

.all-contributorsrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,27 @@
396396
"avatar_url": "https://avatars.githubusercontent.com/u/77256586?v=4",
397397
"profile": "https://m4dd0c.netlify.app",
398398
"contributions": ["code"]
399+
},
400+
{
401+
"login": "azdanov",
402+
"name": "Anton Ždanov",
403+
"avatar_url": "https://avatars.githubusercontent.com/u/6123841?v=4",
404+
"profile": "https://www.azdanov.dev",
405+
"contributions": ["doc", "code"]
406+
},
407+
{
408+
"login": "fredrikaverpil",
409+
"name": "Fredrik Averpil",
410+
"avatar_url": "https://avatars.githubusercontent.com/u/994357?v=4",
411+
"profile": "http://fredrikaverpil.github.io",
412+
"contributions": ["code"]
413+
},
414+
{
415+
"login": "adborden",
416+
"name": "Aaron D Borden",
417+
"avatar_url": "https://avatars.githubusercontent.com/u/509703?v=4",
418+
"profile": "https://a14n.net",
419+
"contributions": ["code"]
399420
}
400421
],
401422
"contributorsPerLine": 7,

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ repos:
44
hooks:
55
- id: prettier
66
- repo: https://github.com/JohnnyMorganz/StyLua
7-
rev: v2.0.2
7+
rev: v2.1.0
88
hooks:
99
- id: stylua-github

CHANGELOG.md

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

3+
## [3.12.1](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v3.12.0...v3.12.1) (2025-06-16)
4+
5+
6+
### Bug Fixes
7+
8+
* move plenary import into function ([#1162](https://github.com/CopilotC-Nvim/CopilotChat.nvim/issues/1162)) ([5229bc4](https://github.com/CopilotC-Nvim/CopilotChat.nvim/commit/5229bc48d655247449652d37ba525429ecfcce99))
9+
10+
## [3.12.0](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v3.11.1...v3.12.0) (2025-05-09)
11+
12+
13+
### Features
14+
15+
* switch to new default model gpt-4.1 ([5f105cf](https://github.com/CopilotC-Nvim/CopilotChat.nvim/commit/5f105cf2453585487d3c9ccfe7fd129d3344056c))
16+
17+
## [3.11.1](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v3.11.0...v3.11.1) (2025-04-21)
18+
19+
20+
### Bug Fixes
21+
22+
* **validation:** Ensure If the erminal buffer is excluded from #buffers and #buffer ([bc644cd](https://github.com/CopilotC-Nvim/CopilotChat.nvim/commit/bc644cd97d272e6b46272cbb11147a5891fa08ff))
23+
324
## [3.11.0](https://github.com/CopilotC-Nvim/CopilotChat.nvim/compare/v3.10.1...v3.11.0) (2025-04-09)
425

526

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ Below are all available configuration options with their default values:
441441

442442
system_prompt = 'COPILOT_INSTRUCTIONS', -- System prompt to use (can be specified manually in prompt via /).
443443

444-
model = 'gpt-4o-2024-11-20', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
444+
model = 'gpt-4.1', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
445445
group = nil, -- Default group of tools or array of groups to use (can be specified manually in prompt via @).
446446
sticky = nil, -- Default sticky prompt or array of sticky prompts to use at start of every new chat (can be specified manually in prompt via >).
447447

@@ -746,8 +746,8 @@ require("CopilotChat").load("my_debugging_session")
746746

747747
-- Use custom sticky and model
748748
require("CopilotChat").ask("How can I optimize this?", {
749-
model = "gpt-4o",
750-
sticky = {"#buffer", "#git:staged"}
749+
model = "gpt-4.1",
750+
context = {"buffer", "git:staged"}
751751
})
752752
```
753753

@@ -870,6 +870,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
870870
<td align="center" valign="top" width="14.28%"><a href="https://ouuan.moe/about"><img src="https://avatars.githubusercontent.com/u/30581822?v=4?s=100" width="100px;" alt="Yufan You"/><br /><sub><b>Yufan You</b></sub></a><br /><a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=ouuan" title="Documentation">📖</a> <a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=ouuan" title="Code">💻</a></td>
871871
<td align="center" valign="top" width="14.28%"><a href="https://m4dd0c.netlify.app"><img src="https://avatars.githubusercontent.com/u/77256586?v=4?s=100" width="100px;" alt="Manish Kumar"/><br /><sub><b>Manish Kumar</b></sub></a><br /><a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=m4dd0c" title="Code">💻</a></td>
872872
</tr>
873+
<tr>
874+
<td align="center" valign="top" width="14.28%"><a href="https://www.azdanov.dev"><img src="https://avatars.githubusercontent.com/u/6123841?v=4?s=100" width="100px;" alt="Anton Ždanov"/><br /><sub><b>Anton Ždanov</b></sub></a><br /><a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=azdanov" title="Documentation">📖</a> <a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=azdanov" title="Code">💻</a></td>
875+
<td align="center" valign="top" width="14.28%"><a href="http://fredrikaverpil.github.io"><img src="https://avatars.githubusercontent.com/u/994357?v=4?s=100" width="100px;" alt="Fredrik Averpil"/><br /><sub><b>Fredrik Averpil</b></sub></a><br /><a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=fredrikaverpil" title="Code">💻</a></td>
876+
<td align="center" valign="top" width="14.28%"><a href="https://a14n.net"><img src="https://avatars.githubusercontent.com/u/509703?v=4?s=100" width="100px;" alt="Aaron D Borden"/><br /><sub><b>Aaron D Borden</b></sub></a><br /><a href="https://github.com/CopilotC-Nvim/CopilotChat.nvim/commits?author=adborden" title="Code">💻</a></td>
877+
</tr>
873878
</tbody>
874879
</table>
875880

doc/CopilotChat.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*CopilotChat.txt* For NVIM v0.8.0 Last change: 2025 April 18
1+
*CopilotChat.txt* For NVIM v0.8.0 Last change: 2025 July 09
22

33
==============================================================================
44
Table of Contents *CopilotChat-table-of-contents*
@@ -512,7 +512,7 @@ Below are all available configuration options with their default values:
512512

513513
system_prompt = 'COPILOT_INSTRUCTIONS', -- System prompt to use (can be specified manually in prompt via /).
514514

515-
model = 'gpt-4o-2024-11-20', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
515+
model = 'gpt-4.1', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
516516
agent = 'copilot', -- Default agent to use, see ':CopilotChatAgents' for available agents (can be specified manually in prompt via @).
517517
context = nil, -- Default context or array of contexts to use (can be specified manually in prompt via #).
518518
sticky = nil, -- Default sticky prompt or array of sticky prompts to use at start of every new chat.
@@ -827,7 +827,7 @@ EXAMPLE USAGE *CopilotChat-example-usage*
827827

828828
-- Use custom context and model
829829
require("CopilotChat").ask("How can I optimize this?", {
830-
model = "gpt-4o",
830+
model = "gpt-4.1",
831831
context = {"buffer", "git:staged"}
832832
})
833833
<
@@ -882,7 +882,7 @@ See CONTRIBUTING.md </CONTRIBUTING.md> for detailed guidelines.
882882
Thanks goes to these wonderful people (emoji key
883883
<https://allcontributors.org/docs/en/emoji-key>):
884884

885-
gptlang💻 📖Dung Duc Huynh (Kaka)💻 📖Ahmed Haracic💻Trí Thiện Nguyễn💻He Zhizhou💻Guruprakash Rajakkannu💻kristofka💻PostCyberPunk📖Katsuhiko Nishimra💻Erno Hopearuoho💻Shaun Garwood💻neutrinoA4💻 📖Jack Muratore💻Adriel Velazquez💻 📖Tomas Slusny💻 📖Nisal📖Tobias Gårdhus📖Petr Dlouhý📖Dylan Madisetti💻Aaron Weisberg💻 📖Jose Tlacuilo💻 📖Kevin Traver💻 📖dTry💻Arata Furukawa💻Ling💻Ivan Frolov💻Folke Lemaitre💻 📖GitMurf💻Dmitrii Lipin💻jinzhongjia📖guill💻Sjon-Paul Brown💻Renzo Mondragón💻 📖fjchen7💻Radosław Woźniak💻JakubPecenka💻thomastthai📖Tomáš Janoušek💻Toddneal Stallworth📖Sergey Alexandrov💻Léopold Mebazaa💻JunKi Jin💻abdennourzahaf📖Josiah💻Tony Fischer💻 📖Kohei Wada💻Sebastian Yaghoubi📖johncming💻Rokas Brazdžionis💻Sola📖 💻Mani Chandra💻Nischal Basuti📖Teo Ljungberg💻Joe Price💻Yufan You📖 💻This project follows the all-contributors
885+
gptlang💻 📖Dung Duc Huynh (Kaka)💻 📖Ahmed Haracic💻Trí Thiện Nguyễn💻He Zhizhou💻Guruprakash Rajakkannu💻kristofka💻PostCyberPunk📖Katsuhiko Nishimra💻Erno Hopearuoho💻Shaun Garwood💻neutrinoA4💻 📖Jack Muratore💻Adriel Velazquez💻 📖Tomas Slusny💻 📖Nisal📖Tobias Gårdhus📖Petr Dlouhý📖Dylan Madisetti💻Aaron Weisberg💻 📖Jose Tlacuilo💻 📖Kevin Traver💻 📖dTry💻Arata Furukawa💻Ling💻Ivan Frolov💻Folke Lemaitre💻 📖GitMurf💻Dmitrii Lipin💻jinzhongjia📖guill💻Sjon-Paul Brown💻Renzo Mondragón💻 📖fjchen7💻Radosław Woźniak💻JakubPecenka💻thomastthai📖Tomáš Janoušek💻Toddneal Stallworth📖Sergey Alexandrov💻Léopold Mebazaa💻JunKi Jin💻abdennourzahaf📖Josiah💻Tony Fischer💻 📖Kohei Wada💻Sebastian Yaghoubi📖johncming💻Rokas Brazdžionis💻Sola📖 💻Mani Chandra💻Nischal Basuti📖Teo Ljungberg💻Joe Price💻Yufan You📖 💻Manish Kumar💻Anton Ždanov📖 💻Fredrik Averpil💻Aaron D Borden💻This project follows the all-contributors
886886
<https://github.com/all-contributors/all-contributors> specification.
887887
Contributions of any kind are welcome!
888888

lua/CopilotChat/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ return {
5858

5959
system_prompt = 'COPILOT_INSTRUCTIONS', -- System prompt to use (can be specified manually in prompt via /).
6060

61-
model = 'gpt-4o', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
61+
model = 'gpt-4.1', -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
6262
tools = nil, -- Default tool or array of tools (or groups) to share with LLM (can be specified manually in prompt via @).
6363
sticky = nil, -- Default sticky prompt or array of sticky prompts to use at start of every new chat (can be specified manually in prompt via >).
6464

lua/CopilotChat/config/mappings.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ local function get_diff(block)
6363
change = block.content,
6464
reference = reference or '',
6565
filetype = filetype or '',
66-
filename = filename,
66+
filename = utils.filepath(filename),
6767
start_line = start_line,
6868
end_line = end_line,
6969
bufnr = bufnr,

lua/CopilotChat/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
local async = require('plenary.async')
22
local curl = require('plenary.curl')
33
local scandir = require('plenary.scandir')
4-
local filetype = require('plenary.filetype')
54

65
local M = {}
76
M.timers = {}
@@ -214,6 +213,7 @@ end
214213
---@param filename string The file name
215214
---@return string|nil
216215
function M.filetype(filename)
216+
local filetype = require('plenary.filetype')
217217
local ft = filetype.detect(filename, {
218218
fs_access = false,
219219
})
@@ -506,7 +506,7 @@ M.glob = async.wrap(function(path, opts, callback)
506506
vim.tbl_deep_extend('force', opts, {
507507
depth = opts.max_depth,
508508
add_dirs = false,
509-
search_pattern = M.glob_to_pattern(opts.pattern),
509+
search_pattern = opts.glob and M.glob_to_pattern(opts.glob) or nil,
510510
respect_gitignore = not opts.no_ignore,
511511
on_exit = function(files)
512512
callback(filter_files(files, opts.max_count))

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11.0
1+
3.12.1

0 commit comments

Comments
 (0)