How to get CopilotChat to use github copilot and throw error if not authenticated? #258
-
From reading the docs, Copilot.vim or zbirenbaum/copilot.lua is a 'dependency' plugin of CopilotChat, however I noticed that if you don't authenticate, CopilotChat still gets results, I then disabled the copilot.lua plugin and I'm still getting CopilotChat responses. How can I ensure that:
Setup: Branch: Canary |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Just FYI - There is a similar here #245 |
Beta Was this translation helpful? Give feedback.
-
For authentication, all github copilot stuff uses same file for storing the token afaik, so if you are using for example copilot cli or even vscode, I think its stored in that file that we are reading as well. I am definitely sure that the CLI extension at least works like that. So if it is working for you then you must've authenticated through one of those methods and that stored your token. You can see how the file is being loaded here: https://github.com/CopilotC-Nvim/CopilotChat.nvim/blob/canary/lua/CopilotChat/copilot.lua#L85 And we will throw an error if it fails to load the token from there as well |
Beta Was this translation helpful? Give feedback.
For authentication, all github copilot stuff uses same file for storing the token afaik, so if you are using for example copilot cli or even vscode, I think its stored in that file that we are reading as well. I am definitely sure that the CLI extension at least works like that. So if it is working for you then you must've authenticated through one of those methods and that stored your token.
You can see how the file is being loaded here:
https://github.com/CopilotC-Nvim/CopilotChat.nvim/blob/canary/lua/CopilotChat/copilot.lua#L85
And we will throw an error if it fails to load the token from there as well