sg.nvim icon indicating copy to clipboard operation
sg.nvim copied to clipboard

Cody doesn't find any file context

Open mGuerino opened this issue 1 year ago • 2 comments

Description: Hi, I have an issue with the file context. Cody doesn't find any file context when I use :codyTask, and I don't know why. However, the completion functions work fine. Below are the details from the sg.nvim report.

Steps to Reproduce:

  1. Run :codyTask with any request.
  2. Observe that the context files section is always empty, regardless of the request.

Expected Behavior: Cody should be able to find and utilize the file context correctly in :codyTask.

Actual Behavior: The context files section is always empty in :codyTask, but the completion functions work fine.

Output from sg.nvim report:

sg: require("sg.health").check()

sg.nvim report ~
- Machine: arm64, sysname: Darwin
- OK Valid nvim version: 0.10.0-dev
- OK Found `cargo` (cargo 1.79.0) is executable
-     Use `:SourcegraphDownloadBinaries` to avoid building locally.
- OK Found `sg-nvim-agent`: "/Users/michaelguerino/.local/share/nvim/site/pack/packer/start/sg.nvim/dist/sg-nvim-agent"
- OK Found `node` (config.node_executable) is executable.
      Version: '22.2.0'
- OK Found `cody-agent`: /Users/michaelguerino/.local/share/nvim/site/pack/packer/start/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 = "279339_2024-06-20_5.4-99968a6630e6",
      product = "279339_2024-06-20_5.4-99968a6630e6"
    }
  }
- To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
- OK Cody Account Information: {
    chat_limit = 20,
    chat_usage = 1,
    code_limit = 500,
    code_usage = 55,
    cody_pro_enabled = false,
    username = "m..."
  }
- OK sg.nvim is ready to run

Additional Information:

  • Device: MacBook Air M2
  • Operating System: macOS (arm64, Darwin)
  • Neovim version: 0.10.0-dev
  • Node version: 22.2.0
  • Cargo version: 1.79.0
  • Cody agent path: /Users/m.../.local/share/nvim/site/pack/packer/start/sg.nvim/dist/cody-agent.js

Any help to resolve this issue would be greatly appreciated.

mGuerino avatar Jun 20 '24 20:06 mGuerino

Seeing the same issue on my end here. Any extra info we could give to help identify the cause?

rmagatti avatar Jul 10 '24 06:07 rmagatti

Same here with CodyAsk. Only if I have code in a visual selection when sending the command it will add the immediate code to the prompt, but other than that, no additional context is found or selected.

pheuberger avatar Jul 24 '24 20:07 pheuberger