sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.56k stars 265 forks source link

bug: Cody not able to view or access files/context that i attach in the chat #5274

Open flubzie opened 4 weeks ago

flubzie commented 4 weeks ago

Version

v1.30.3

Describe the bug

the @-mention feature doesn't seem to work. Cody is not able to view or access the files or repositories that I try to add via @-mention.

Direct response from Cody after asking it if it can see the code in the files I've attached:

It appears that I cannot directly view or access files that you attach in this chat. However, you can copy and paste the contents of your frontend code here, and I will be able to help you with it. Please go ahead and paste the relevant code or information, and I'll assist you accordingly.

Expected behavior

I would expect Cody to be able to access the code, or other content, that are contained in the files/repositories I try to add as context.

Additional context

No response

MaartenKoller commented 1 week ago

(I'm on Intellij plugin version 7.0.1) Same here. It appears to happen when I use @(root-folder) and for example ask 'what is the unit test framework configured', it gives the reply mentioned above. When I do @(root-folder) and @package.json it responds in the correct/expected way (which in this case saying there was no framework configured (the package file is quite empty)) So it seems the @(root-folder) does not give the appropriate context to Cody. Which kind of defeats the slogan "Cody: the AI assistant that actually knows your codebase" :P

@flubzie maybe this might help you if you are on VS? https://marketplace.visualstudio.com/items?itemName=mnismt.cody-plus-plus I came across it here: https://community.sourcegraph.com/t/adding-a-project-folder-as-context/737

Also, sometimes it just pretends to have access and just completely makes up a package json and starts reporting on that made up file. It's interesting to feel my reliability perception plummet.

Fun fact: Just installed VS Code and did the exact same steps as with my own IDE, and in VS Code it works flawlessly! (exact same prompt in the exact same folder/vanilla project)