sg.nvim
sg.nvim copied to clipboard
Enterprise - Cody Not Working
Hello, My org recently announced that Enterprise Model Selection is now available on our production instance.
Around the same time, Cody stopped working completely for me in Neovim. The version of this plugin did not change in the meantime, and I created a new Personal Access Token just in case.
`sg: require("sg.health").check()
sg.nvim report ~
- Machine: arm64, sysname: Darwin
- OK Valid nvim version: 0.10.1
- WARNING Unable to find valid cargo executable. Trying to build sg.nvim locally will fail. Instead use
:SourcegraphDownloadBinaries - OK Found
sg-nvim-agent: "/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent" - OK Found
node(config.node_executable) is executable. Version: '18.20.4' - OK Found
cody-agent: /Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js - OK Authentication setup correctly
- OK endpoint set to: https://
.sourcegraph.com - OK Found correct binary versions: "1.1.0" = "1.1.0"
- OK Sourcegraph Connection info: {
access_token_set = true,
endpoint = "https://
.sourcegraph.com", sg_nvim_version = "1.1.0", sourcegraph_version = { build = "5.6.185", product = "5.6.185" } } - To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
- OK Cody Account Information: { cody_pro_enabled = false, username = "rbattaglia" }
- OK sg.nvim is ready to run`
Cody does appear to be working in other IDE Cody plugins, tested with IntelliJ. I can see all the models available:
.
In Neovim, I cannot see all these models:
I also tried to set the model in the config.chat.defaultModel to match something I saw in the dropdown in IntelliJ.
Looks like error is somewhere in the Cody Agent from lsp.log
[ERROR][2024-08-22 17:17:38] .../vim/lsp/rpc.lua:770 "rpc" "/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent" "stderr" "[sg-nvim-agent] failed to read message data did not match any variant of untagged enum Message\n"
[ERROR][2024-08-22 17:17:39] .../vim/lsp/rpc.lua:770 "rpc" "/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/sg-nvim-agent" "stderr" 'Recieved a message: Request { id: 2, data: SourcegraphRemoteURL { path: "/Users/robbattaglia/dotfiles/nvim/.config/nvim/" } }\nDATA : SourcegraphRemoteURL { path: "/Users/robbattaglia/dotfiles/nvim/.config/nvim/" }\n'
[ERROR][2024-08-22 17:17:43] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
[WARN][2024-08-22 17:17:45] ...lsp/handlers.lua:135 "The language server copilot triggers a registerCapability handler for workspace/didChangeWorkspaceFolders despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[ERROR][2024-08-22 17:18:05] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
[ERROR][2024-08-22 17:18:15] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
[ERROR][2024-08-22 17:18:19] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
[ERROR][2024-08-22 17:19:05] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
[ERROR][2024-08-22 17:19:19] .../vim/lsp/rpc.lua:770 "rpc" "node" "stderr" '{"stack":"Error: Timeout\n at Timeout._onTimeout (/Users/robbattaglia/.local/share/nvim/lazy/sg.nvim/dist/cody-agent.js:277769:20)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}\n'
Same here it used to work, but not anymore.
Same here, it stopped working in the last days, with an enterprise account...
I have written a new plugin that is a convenient wrapper around the Cody CLI for the functionality that I needed, in case it can be useful to anyone: https://github.com/guillemaru/codyassist
I'm having the same issue. Is there any workaround for this?
Having the same issue as well, any solutions by now?