I use Cody in VS Code with no tabs and three windows arranged from left to right: file explorer, an open file, and the Cody AI chat window. In the past few days, when I clicked ‘Apply’ in the chat window, the changes were correctly applied to the open file. However, today Cody suddenly started creating new files every time I click ‘Apply.’ Could this be a bug?
@f64c Could you make a screen recording, upload to youtube and add the link here? There are certain conditions for smart apply and it has the ability to create new files especially if you use the right prompt so without a reproducible test case that might be found from the screen recording, there is little chance for this issue to be found.
I am just an user as yourself but I have had issues with smart apply and I have some familiarity with the code as I have fixed an issue for myself where it was creating new files when it shouldn’t have so I might be able to help out if I know how to reproduce the issue.
Thanks for the feedback. A video wouldn’t be a problem but today it works again without any changes on my side. But for further investigation attached is a screenshot. It looked like a problem with the API.
@f64c The screenshot is not very useful as it doesn’t show the full error message and there is no test case or detail on what you’ve tried.
Doing a github search has led me here cody/vscode/src/edit/manager.ts at 5bd253c16261680490d2afb14398ff568334ffbd · sourcegraph/cody · GitHub which mentions that they couldn’t find what selection was needed for the smart apply.
If you can find a reproducible workflow where it fails and can share it, it would make it more likely for an issue with a bug report to be added which can then be checked by the developers.
As mentioned earlier, it’s working again today, so I can’t reproduce the error. I’ve attached the screenshot to show that, as far as I can tell, this isn’t a VS Code issue.