I really like the Cody edit function: select the whole content in a file and submit a request for a refactor then it will do the magic. But sometimes we need to refactor across multiple files, how can I select multiple files and submit a refactor request, then let Cody change the code simultaneously across various files?
Hey @shallker great question. Right now, it isn’t possible but I will make sure the product team sees this in the weekly community feedback report.
What other features are you enjoying? How can they be better?
I would really love to see this feature. in my opinion it’s so critical - i really don’t know how it wasn’t done yet. it’s so simple to implement, yet i think it’s a real game changer.
imagine just telling cody:
add a ajax form to this page, and cody would add some css to the css file, some html / php / jsx to the current file, and some ajax related functions to another file in one go… isn’t it a life changer?
Also - it would be great to be able to tell cody to edit a file from the chat. so for example i ask cody:
how would i make this function more secure and cody answers, and i ask him, but maybe this way? and he answers, and then i tell him:
great. do that.
A life changer in my opinion.
This would be awesome addition, for example like Cursor composer and Claud Dev.
Hello @benadam This functionality is now available as “Smart Apply” feature from the Cody Chat where you can apply code blocks to multiple files in a sequentially way manually controlled by the user.
You can read more here.
Thanks @PriNova,
This is really exciting. I tried it today.
I did stumble across two problems:
- A lot of time it doesn’t get the code in the right place in the file. just drops it in the end.
- It is never putting the code in the file it says the code should be written in, unless it is the current file.
Btw - for me at least, it also works very very slow.
You are welcome.
Yes, I observed it sometimes too, but hard to pin point it.
- My observations is so far, that if it is a entire function, it is placed at the end of the file (not always). Not bad if the language support out-of-order function definitions.
- If it is a new file, it works for me, if it is a change in a file, which is not opened in a tab it sometimes fails, but w/o observable pattern
The slowness is known and they are working on it.
Thanks for reporting.
Related to this, I have simply seen VSCode’s Cody integration stop making multiple edits. It was working for awhile, and not isn’t making any changes without a specific single file context, even as it tells me again and again that it is doing so.