Scenario
A Cody user has configured their VsCode extension, they have run their target repository through the embeddings process, and the target repository shows as INDEXED in the VsCode UI. However, when the user asks Cody about the Repo, Cody is unable to answer questions about specific files or file contents.
Troubleshooting Steps
- Confirm all setup steps have been completed properly:
- Enable Cody on Your Sourcegraph Instance
- Install and Configure Cody on VsCode
- Confirm Embeddings are properly configured
- Navigate to Site Admin < Cody < Embeddings Jobs page to confirm the target repo has COMPLETED successfully
- Check the Cody: Debug Output for errors:
- Enable Cody > Debug and Cody > Debug:Verbose in the VsCode Settings
- In the command palette, Reload Window
- In the command palette, turn on the View: Toggle Output
- Set the Output to Cody AI by Sourcegraph
- With the Output open, ask Cody about the Repo/file in question and check the output for any clues/errors.
Note: This output is a bit difficult to read. To make it easier, copy and paste the output into a JSON file and have VsCode format it for you.
- Enable Cody > Debug and Cody > Debug:Verbose in the VsCode Settings
- Check the logs:
- The embeddings jobs run on
worker
, so you should be able to find them in the logs for that service. You can search for thefinished generating repo embeddings
string.
When this article was written, engineering is actively working on putting embeddings job info into the database and surfacing helpful information on the embeddings jobs in the admin UI.
- The embeddings jobs run on
Possible Explanations
If all the configuration/setup steps have been done properly, and Cody still has trouble finding contents within the repo, this may indicate that some files have been skipped during the embedding process.
Reasons a file may have been skipped during embedding:
- The file was larger than 1 MB
- The file matched a specific pattern
- The file was, or appears to be, autogenerated