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
feat(context): add full file content support for files
The files context provider now supports two modes:
- 'list' (default) - includes only filenames in the workspace
- 'full' - includes both filenames and their content
This change provides more flexibility when needing full context from workspace
files. The implementation also adds proper filetype detection and filtering
for files to ensure only text files are included.
ClosesCopilotC-Nvim#360
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,7 +275,7 @@ Default contexts are:
275
275
-`buffer` - Includes specified buffer in chat context (default current). Supports input.
276
276
-`buffers` - Includes all buffers in chat context (default listed). Supports input.
277
277
-`file` - Includes content of provided file in chat context. Supports input.
278
-
-`files` - Includes all non-hidden filenames in the current workspace in chat context.
278
+
-`files` - Includes all non-hidden files in the current workspace in chat context. By default includes only filenames, includes also content with `full` input. Including all content can be slow on big workspaces so use with care. Supports input.
279
279
-`git` - Includes current git diff in chat context (default unstaged). Supports input.
280
280
-`register` - Includes content of specified register in chat context (default `+`, e.g system clipboard). Supports input.
Copy file name to clipboardExpand all lines: lua/CopilotChat/config.lua
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -228,9 +228,14 @@ return {
228
228
end,
229
229
},
230
230
files= {
231
-
description='Includes all non-hidden filenames in the current workspace in chat context.',
232
-
resolve=function(_, source)
233
-
returncontext.files(source.winnr)
231
+
description='Includes all non-hidden files in the current workspace in chat context. By default includes only filenames, includes also content with `full` input. Including all content can be slow on big workspaces so use with care. Supports input.',
0 commit comments