#file:…
or #buffer:…
doesn't seems to work
#1447
Replies: 8 comments
-
Well fix does not work because neovim cannot detect its filetype. News is indeed massive so probably do not even fits into context so the whole file is skipped. Try renaming README to README.md, maybe that will fix the filetype detection (neovim can detect the filetype regardless usually, but for that it needs to read the file partially, which is why buffer would work as then the file is already loaded). But the limitation for only known filetypes in neovim is mostly so people do not accidentally embed binaries. Its probably not super necessary anymore as support for just loading all the files at once was removed so now its mostly filenames and 1by1 loading |
Beta Was this translation helpful? Give feedback.
-
README is already README.md ( https://gitlab.gnome.org/GNOME/gnome-shell )
Is there a possibility to be notified if there is a problem with "filetype" or if the file doesn't fit into the context. |
Beta Was this translation helpful? Give feedback.
-
ah my bad. well with log level debug you can at least see what data is being sent so you can try to see the outgoing request and see if it contains README or not. For the file detection, im considering just removing that and letting people embed whatever, as the biggest reason before for not doing that is because plugin had bulk file operations, but it doesnt anymore |
Beta Was this translation helpful? Give feedback.
-
Ok, I think I understand what's going on now. When the code see a For example:
But, if the file is too big, it doesn't add the content, for example:
We see that "Resource tokens" > "max_tokens". → I think CopilotChat should warn the user when it happens ! Idem if the file type isn't detected (or isn't allowed ?).
it's this part of the code, write ?
(just for me to try) In any case, thanks for the help and for the tool ! |
Beta Was this translation helpful? Give feedback.
-
Another idea (do you want me to create a new issue for it): It would be great if CopilotChat could split it's prompt/request in multiple requests if it doesn't fit into one (because of |
Beta Was this translation helpful? Give feedback.
-
That is not how it works. You need to always send the whole context, the remote api has no memory, the memory is in request. So if it do not fits it will never fit. |
Beta Was this translation helpful? Give feedback.
-
Issue with notifying the users about the request size is that it is getting filtered way too late so its pretty hard to do and there is also no dedicated notification area in the chat window other than in progress message. I guess I can technically imporove And for filtering, yes, you can just do if not filetype then filetype = '' or something |
Beta Was this translation helpful? Give feedback.
-
Moving to discussions as its not really an issue |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
context
For example on this repository: https://gitlab.gnome.org/GNOME/gnome-shell
prompt examples
Here are some prompts, taken secondes/minutes apart, without any modification to any file or conf.
Each prompt was taken with a fresh neovim process (quit and reopen neovim between each prompt).
file and buffer doesn't work
buffer works
file doesn't work
file doesn't work, buffer works
file doesn't work
buffer doesn't work
notes
As you can see it's somewhat strange.
Sometimes it works, sometimes it doesn't.
I thinks the size of the file might explain why copilot never displayed the right answer for the
NEWS
file.(it's responding too fast, I think, it doesn't get the full 234K, so he is hallucinating)
There is no error in the CopilotChat.log (in
trace
log level):Here is my LazyVim conf (I disabled
copilot.lua
to be sure it wasn't the culprit):I can give you some logs if you want.
GitHub Copilot Business is active on my account.
note: I am a total noob on CopilotChat and somewhat neovim plugins and such (I installed & configured LazyVim only last week, to install CopilotChat… and it took me some times).
Do you have any idea on what's going on ?
Regards
Beta Was this translation helpful? Give feedback.
All reactions