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

[BUG] "error: no handler key provided" when using --authCopilot #44

Open
timvancann opened this issue Mar 3, 2024 · 4 comments
Open

Comments

@timvancann
Copy link

helix-editor version
23.10

helix-gpt version
0.28

Describe the bug
When booting up helix the GPT language server crashes with the log "error: no handler key provided" when configured using Copilot.
This happens when booting up helix with HANDLER=copilot hx main.rs

helix-gpt logs
n.a.

helix logs

2024-03-03T08:22:32.702 helix_lsp::transport [ERROR] gpt err <- "error: no handler key provided\n"
2024-03-03T08:22:32.702 helix_lsp::transport [ERROR] gpt err <- "      at /***.local/bin/helix-gpt:3:2197\n"
2024-03-03T08:22:32.703 helix_lsp::transport [ERROR] gpt err <- "error: \"helix-gpt\" exited with code 1\n"

My configuration for rust is:

[language-server.gpt]
command = "bun"
args = ["run", "/***.local/bin/helix-gpt", "--authCopilot"]

[[language]]
name = "rust"
language-servers = [
    "rust-analyzer",
    "gpt"
]
@sigmaSd
Copy link
Contributor

sigmaSd commented Mar 3, 2024

you need to remove --authCopilot and change it with --handler copilot

[language-server.gpt]
command = "bun"
args = ["run", "/***.local/bin/helix-gpt", "--handler", "copilot"]

to authenticate to copilot you need to run this on the terminal once

bun run ""/***.local/bin/helix-gpt" --authCopilot --handler copilot

@timvancann
Copy link
Author

I tried that as well,

bun run  ~/.local/bin/helix-gpt --authCopilot --handler copilot

returns

                                                                                                                                                                                                                  ^
error: no handler key provided
      at ~/.local/bin/helix-gpt:3:2197
error: "helix-gpt" exited with code 1

@timvancann
Copy link
Author

It seems there's already a PR open for this bug #31

@sigmaSd
Copy link
Contributor

sigmaSd commented Mar 3, 2024

Its already fixed in master

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