Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for local CoPilot #190

Closed
janEbert opened this issue Oct 5, 2023 · 3 comments
Closed

Support for local CoPilot #190

janEbert opened this issue Oct 5, 2023 · 3 comments

Comments

@janEbert
Copy link

janEbert commented Oct 5, 2023

Hey, I'd like to do something similar to https://github.com/danielgross/localpilot, which sets github.copilot.advanced.debug.{testOverrideProxyUrl,overrideProxyUrl} to a different URL in settings.json in order to avoid having to access GitHub.

I was unable to find any way to set settings.json variables in the ELisp code. I was also unsuccessful in hardcoding the appropriate values in agent.js.

What pieces are missing to avoid the proprietary remote APIs? Or would maybe just adding a way to pass settings into the JavaScript code be enough? If the functionality for passing settings already exists, I'd be super happy if you could point me to it.


Including debug messages I added, I get the following output messages upon M-x copilot-diagnose:

Copilot agent started.
copilot--request args: ('initialize '(:capabilities (:workspace (:workspaceFolders t))))
copilot--async-request args: nil
copilot--async-request args: (:success-fn (lambda (_) (message Copilot OK.)) :error-fn (lambda (err) (message Copilot error: %S err)) :timeout-fn (lambda nil (message Copilot agent timeout.)))
Copilot error: (:code 1000 :message "Not authenticated: NotSignedIn")

The proxy I tried to hardcode in agent.js does not seem to be hit at all.

@janEbert
Copy link
Author

janEbert commented Oct 6, 2023

I suppose danielgross/localpilot#12 may be the answer to the errors I'm facing. Even overriding the proxies, I get walled off by (as of yet) unavoidable authentification.

@zerolfx
Copy link
Collaborator

zerolfx commented Oct 6, 2023

@janEbert This plugin is built on copilot.vim. If the local copilot works with copilot.vim but not with copilot.el, I can look into it.

@janEbert
Copy link
Author

I believe it to be an issue with the JavaScript until further notice. :)
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants