leona / helix-gpt

Code assistant language server for Helix with support for Copilot/OpenAI/Codeium/Ollama
MIT License
285 stars 19 forks source link

[BUG] [ERROR] gpt err #12

Closed sommerper closed 5 months ago

sommerper commented 5 months ago

helix-editor version helix 23.10 (2661e05b)

helix-gpt version version 0.21

Describe the bug Not seeing any actions in Helix and not getting any code completion in typescript files

helix-gpt logs Couldn't find any logs even though I have it enabled like so

[language-server.gpt]
command = "helix-gpt"
config = {}
args = ["--handler", "copilot", "--copilotApiKey", "<copilot_key>", "--logFile"]

helix logs

2024-01-29T22:21:05.071 helix_lsp::transport [INFO] gpt -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"positionEncodings":["utf-8","utf-32","utf-16"]},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"deprecatedSupport":true,"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"versionSupport":true},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":false},"executeCommand":{"dynamicRegistration":false},"fileOperations":{"didRename":true,"willRename":true},"inlayHint":{"refreshSupport":false},"symbol":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"23.10 (2661e05b)"},"initializationOptions":{},"processId":1706339,"rootPath":"/home/xxx/development/xxx-003","rootUri":"file:///home/xxx/development/xxx-003","workspaceFolders":[{"name":"xxx-003","uri":"file:///home/xxx/development/xxx-003"}]},"id":0}
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "46 |     query: \"Write a unit test for this code. Do not include any imports.\"\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "47 |   }\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "48 | ];\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "49 | \n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "50 | // src/config.ts\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "51 | var { values } = parseArgs({\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "                      ^\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "TypeError: Option '--logFile <value>' argument missing\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- " code: \"ERR_PARSE_ARGS_INVALID_OPTION_VALUE\"\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "\n"
2024-01-29T22:21:05.118 helix_lsp::transport [ERROR] gpt err <- "      at /$bunfs/root/helix-gpt:51:18\n"
2024-01-29T22:21:05.121 helix_lsp [ERROR] failed to initialize language server: server closed the stream
2024-01-29T22:21:05.121 helix_lsp::transport [ERROR] gpt err: <- StreamClosed
sommerper commented 5 months ago

I added another param for the log file and now it's working! I was probably just stupid and will close this again.