In the previous version 0.41.3 a code update to my file it would apply it to the correct file. An update came I accepted the update. when it reopened this started happening. Now it creates a new file in a new folder with the updated code. I uninstalled and reinstalled the previous version and the issue still persists. Anyone have thoughts on how to fix this?
Hi @Dan.Lane
Could you show me the steps to reproduce it?
I want to share the video recording of the bug but for some reason, I am not allowed to upload a video in the forumā¦ let me take screenshots and see if that will show.
Let me know if you need further explanation.
and because I am a new user I can only upload one imageā¦ ughhhā¦
Yeah, itād be great if you could provide a bit more detail. I canāt quite figure out whatās happening from the screenshots. You could also record a YouTube Shorts video and send the link.
here is the basics. I asked the chat to review my file and shared it in the chat. It generated the code you see. I click on apply. It created a new file in the incorrect directory structure although it was correct placement it was not in the correct place. I already have the file and it is not updating the file it is rather creating a whole new file in a new directory. Rather than updating the file.
Also if I click on the name in the chat window to the left of ask copy apply it opens the correct file.
Wait, but as far as I know, the chat canāt create files, let alone directories. Thatās something Composer can do. Maybe you have two identical files in different directories? It happens sometimes.
I added a file to the composer and removed it is still doing it. Not to every file itās randomā¦ If I uninstall and delete the files for Cursor reinstallā¦ will this resolve my issue? what will I lose by doing this? It is causing me to not be able to do as much as I would like as quickly as I would like.
also verified I only have the one file with the files it seems to be doing it to. One other thing is it is doing it to files that chat ai suggests parts of a code for a file. If I click apply for the suggested code change it applies then the next one down for the same file it goes and creates the file in a completely new directory albeit the dir structure is correct as well as the file name.
Thanks for reporting this and for the video! It seems like the apply is thinking you want to edit src/{file} whereas you are actually on {project_dir}/src/{file}. This is either a model intelligence issue or an issue with our path resolution (perhaps specifically on Windows). We didnāt make any changes to this logic in this new release, so it should not be coming from the new release.
To confirm, this happens on every apply or just on some applies?
CCāing @shaoruu
(Also @deanrie, it is possible for apply to create a file from chat if apply thinks the code should be added to a file location that doesnāt already exist, but this happens very rarely and when it does happens it is often erroneous).
Thank you for your reply. I will try this in the other models and see if that is the fix.
It applies on some of the suggested code updates, not all of them, but when it happens on a particular file and it updates all of the code for that particular file, it will always happen on that file no matter what I do.
Hmm strange, thanks for the info. We have someone looking into it trying to reproduce. If itās ultimately a model intelligence issue, then trying other models should help, as youāve been doing.
Thank you by the way, I was using sonnet 3.5.
I have the same issue, last week when i was working i didnāt have the issue, for now the solution would be to just copy the text from chat instead of pressing the apply button, it does it with all models it seemsā¦
Same, both windows and osx
I have the same issue with claude-3.5-sonnet
but it works fine with gpt-4o
.
When on Sonnet and using Chat, new suggestions always create a new tab and paste the whole code there. They are no longer applied to my code unless I switch models.
Iām having this issue as well. On MacOS, using claude-3.5-sonnet-20241022. Apply has worked for me in general, but on a set of files Iām working now, if I click apply it creates a file in the wrong path. This is in āchatā. I know chat isnāt supposed to create files, but I think itās doing it as part of the logic of āupdatingā the file at the wrong path.
In my case I have a VSCode workspace with multiple folders mounted as top-level projects. Iām working in one of the folders, but the āapplyā incorrectly happens in another one (the first project in the list).
Itās 100% reproducible with these files. I havenāt experienced this with other uses of apply. Happy to jump on a zoom or something if someone wants to debug this. Itās pretty annoying.