Add file to cody option missing

I used to be able to right-click on a file in VS Code navigator and, in the context menu, “add to Cody chat” was available. Now it’s not.
Please help.

I guess the team abandoned this option, because Cody is now placed in the sidebar.
I don’t know if it is technically possible to have the context menu option by checking if the Cody Chat is in an editor window.

It’s a feature I used very often. It is an important part of MY workflow:
I could add several files to Cody and ask to update them based on the suggested changes. Using @-file is no way easier that having “Add to chat” as an option.
How can I get that feature back?

I solved it. A really nice feature of the uninstall drop-down is that one can install earlier versions, so I installed 1.26.7 and got “Add file to Cody chat” option back again. :grin: :upside_down_face:
It would be great to continue having this option in future updates, perhaps with the ability to enable/disable it.

I found this .json file for Cody here:
cody/vscode/package.json at main · sourcegraph/cody · GitHub.
I would like to know if I can update Cody and install “Add File to Cody” using this:
{
“command”: “cody.mention.file”,
“category”: “Cody”,
“group”: “Chat”,
“title”: “Add File to Cody Chat”,
“icon”: “$(mention)”,
“enablement”: “cody.activated && resourceSet”
},

If you don’t know, who else can I ask? :wink:
Thanks!

Hello @marqec-104

Yes, you can change this by ourself in the Cody source code. Be sure to use another branch to avoid issues with future updates in the upstream.

If you have a file open in the editor, the “Add File to Cody” is available in the context popup menu.

The devs probably removed this menu item in the file explorer because if Cody Chat is open in the sidebar, then it will hide the file explorer.

Please explain.

Again, please explain. Could this option be added to my Cody settings.json?

In my version, v1.26.7, adding file to Cody doesn’t hide the explorer.
However, for this novice, I find it extremely useful to give Cody 4 related files and ask my questions. How would that be done in the latest version?
Thanks!

What I understood from your previous post is, that you like to build Cody from source. Because the package.json file you mentioned is only relevant for development of Cody itself.

If you want to mentioned specific files in Cody, use the @ mention feature in the chat. In the input field press this @ key and a popup menu apprears to select Files and other option or you type the filename after the @ key directly.

Right now the 1.26.7 version gives me the option to add file to chat by right-click on filename. I found that on the Cody > features > command page. I am asking if I can add that feature to a later version.

I also just found Cody++ extension that allows me to send folders to Cody.
I’m working on small Joomla modules and it’s much easier for Cody to know what’s going on when it has the whole codebase to consider.

Cody++ Features

Add Folder to Cody:
Recursively adds all files in a folder to Cody.
You can configure the maximum number of files allowed before showing a warning message.
You can configure the file extensions to exclude from being added to Cody.

Yes, this is a very beneficial tool build by a Cody expert.

If you familiar with the codebase and the vocabulary in it, Cody may infer the correct files or code ranges.

But, yeah, if it stucks, then better mention the file directly.
You can also mention only code ranges to narrow down the problem space and context window.