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
I am experiencing an issue where the file input in CopilotChat.nvim is not functioning as expected. Could someone provide guidance on how to verify if the file input is working correctly?
I've also experienced a related issue recently where sometimes after adding files in the context it would just add a filemap (?) and the LLM would tell me it can't see the content, but just the names (and that's also what I see after pressing gc). I'm not using the filenames context option btw.
Until recently the #files context included also filenames but I removed it so now you need to explicitely also use #filenames so that should not be an issue anymore. Or alternatively only use #buffers and #filenames, I also made the ai aware of contexts so when its missing some context it should be able to generate #file that gets auto inserted to your next prompt from #filenames.
Rest is mostly just filtering issue, #buffers have score adjusted so they get prioritzed in search, but if your context is too big the plugin will automatically try to limit it to some reasonable amount and sometimes that can fail if your prompt do not includes any relevant keywords that are in the file
@deathbeam i'm on commit 1e5640b (from 15 min ago). can you confirm that this is intended behavior (i have custom instructions so right now it doesn't auto-generate #file to add it in my next prompt yet until i change it)? there are many more files than those and i don't understand why it's seeing those specifically:
can you list all the files whose content you can see? #files #filenames
# Copilot
# Files Whose Content I Can Currently See
1. **Neo-tree File Explorer View**:
`/Users/andreaperugini/neo-tree filesystem [1]` - Shows your project's directory structure in the Neo-tree file explorer
2. **Ruby Module for Test Filtering**:
`unity/auto/test_file_filter.rb` - Contains a Ruby class `TestFileFilter` that handles test file filtering functionality for Unity testing framework
3. **Clang Compiler Configuration**:
`unity/test/targets/clang_file.yml` - YAML configuration file for running Unity tests with the Clang compiler, including compiler flags and settings
The other contexts (`file_map`, `file_map1`, and `file_map2`) aren't actual file contents but rather listings of available files in your project directory structure.
If you'd like me to examine the content of any specific file from those listings, you can use the `#file:` command followed by the file path.
💡 **Tip**: To quickly navigate between files in Neovim with AstroNvim, you can use Telescope with `<leader>ff` (find files) or `<leader>fb` (find buffers).
**`References`**:
[neo-tree filesystem [1]](/Users/andreaperugini/neo-tree filesystem [1])
[file_map](file_map)
[test_file_filter.rb](unity/auto/test_file_filter.rb)
[file_map1](file_map1)
[file_map2](file_map2)
[clang_file.yml](unity/test/targets/clang_file.yml)
if i press gc, i can see other files (with content) in src/ but the LLM claims there's no content. furthermore, gc doesn't show me anything in src/include/ but apparently it finds files in other subdirectories. thank you in advance!
@deathbeam i'm on commit 1e5640b (from 15 min ago). can you confirm that this is intended behavior (i have custom instructions so right now it doesn't auto-generate #file to add it in my next prompt yet until i change it)? there are many more files than those and i don't understand why it's seeing those specifically:
can you list all the files whose content you can see? #files #filenames
# Copilot
# Files Whose Content I Can Currently See
1. **Neo-tree File Explorer View**:
`/Users/andreaperugini/neo-tree filesystem [1]` - Shows your project's directory structure in the Neo-tree file explorer
2. **Ruby Module for Test Filtering**:
`unity/auto/test_file_filter.rb` - Contains a Ruby class `TestFileFilter` that handles test file filtering functionality for Unity testing framework
3. **Clang Compiler Configuration**:
`unity/test/targets/clang_file.yml` - YAML configuration file for running Unity tests with the Clang compiler, including compiler flags and settings
The other contexts (`file_map`, `file_map1`, and `file_map2`) aren't actual file contents but rather listings of available files in your project directory structure.
If you'd like me to examine the content of any specific file from those listings, you can use the `#file:` command followed by the file path.
💡 **Tip**: To quickly navigate between files in Neovim with AstroNvim, you can use Telescope with `<leader>ff` (find files) or `<leader>fb` (find buffers).
**`References`**:
[neo-tree filesystem [1]](/Users/andreaperugini/neo-tree filesystem [1])
[file_map](file_map)
[test_file_filter.rb](unity/auto/test_file_filter.rb)
[file_map1](file_map1)
[file_map2](file_map2)
[clang_file.yml](unity/test/targets/clang_file.yml)
if i press gc, i can see other files (with content) in src/ but the LLM claims there's no content. furthermore, gc doesn't show me anything in src/include/ but apparently it finds files in other subdirectories. thank you in advance!
yea that is somewhat intended behaviour. how the filtering works is that it grabs your prompt + all prompts from history and filters the result of #files based on that. gc will still show other stuff because it is showing context before filtering (as filtering uses embeddings so I did not wanted gc to try and use embedding api every time it was used).
which means that for generic description of the project and very generic queries on big repositories it is not very helpful (in ideal scenario it will try to grab stuff like README etc if you have one), but if you somewhat know what you are looking for (keywords etc) then the results are better.
The context description for generating the ># commands is auto included after all system prompts, so its there but as the AI doesnt even know what you are looking for it cant even generate specific context command so it only mentions it i guess.
Also the file/filenames contexts have limit of 2500 files and also respect gitignore so if src/include is in gitignore or there are too many files it skips
I think this might be better as discussion as stuff like this is something that will gradually have to improve as the filtering is best effort at best (stuff like VectorCode and vectorspace also partially helps) so gonna move it to discussion. I also just did some improvements on agressive filtering out of binary files in advance for slightly better results
Activity
jellydn commentedon Mar 15, 2025
Could you try to use
pintag/version: v3.9.1? If that works for you just in case the latest on main is broken for some reason. cc @deathbeamdeathbeam commentedon Mar 15, 2025
This definitely needs more info, what exactly is not working? Maybe the issue is this? https://github.com/CopilotC-Nvim/CopilotChat.nvim?tab=readme-ov-file#requirements (e.g autocomplete config not set properly)
deathbeam commentedon Mar 15, 2025
So was it the issue I mentioned or can you provide some steps to reproduce the issue or info about what the issue even is?
peruginiandrea commentedon Mar 15, 2025
I've also experienced a related issue recently where sometimes after adding files in the context it would just add a filemap (?) and the LLM would tell me it can't see the content, but just the names (and that's also what I see after pressing
gc). I'm not using the filenames context option btw.deathbeam commentedon Mar 15, 2025
Until recently the
#filescontext included also filenames but I removed it so now you need to explicitely also use#filenamesso that should not be an issue anymore. Or alternatively only use#buffersand#filenames, I also made the ai aware of contexts so when its missing some context it should be able to generate#filethat gets auto inserted to your next prompt from#filenames.Rest is mostly just filtering issue,
#buffershave score adjusted so they get prioritzed in search, but if your context is too big the plugin will automatically try to limit it to some reasonable amount and sometimes that can fail if your prompt do not includes any relevant keywords that are in the fileperuginiandrea commentedon Mar 15, 2025
@deathbeam i'm on commit 1e5640b (from 15 min ago). can you confirm that this is intended behavior (i have custom instructions so right now it doesn't auto-generate
#fileto add it in my next prompt yet until i change it)? there are many more files than those and i don't understand why it's seeing those specifically:if i press
gc, i can see other files (with content) in src/ but the LLM claims there's no content. furthermore,gcdoesn't show me anything in src/include/ but apparently it finds files in other subdirectories. thank you in advance!deathbeam commentedon Mar 15, 2025
yea that is somewhat intended behaviour. how the filtering works is that it grabs your prompt + all prompts from history and filters the result of #files based on that.
gcwill still show other stuff because it is showing context before filtering (as filtering uses embeddings so I did not wanted gc to try and use embedding api every time it was used).which means that for generic description of the project and very generic queries on big repositories it is not very helpful (in ideal scenario it will try to grab stuff like README etc if you have one), but if you somewhat know what you are looking for (keywords etc) then the results are better.
The context description for generating the ># commands is auto included after all system prompts, so its there but as the AI doesnt even know what you are looking for it cant even generate specific context command so it only mentions it i guess.
Also the file/filenames contexts have limit of 2500 files and also respect gitignore so if src/include is in gitignore or there are too many files it skips
deathbeam commentedon Mar 16, 2025
I think this might be better as discussion as stuff like this is something that will gradually have to improve as the filtering is best effort at best (stuff like VectorCode and vectorspace also partially helps) so gonna move it to discussion. I also just did some improvements on agressive filtering out of binary files in advance for slightly better results