Clicking apply suddenly deletes file

I’ve had this at least once a day for the past week and it is driving me nuts. I click apply and the file disappear. If the file is new, i.e. untracked, I literally lose the file and can’t restore it. Currently had to work 40 minutes to restore the component from previous interactions. Have you also experienced this recently?

Version: 0.42.3
VSCode Version: 1.93.1
Commit: 949de58bd3d85d530972cac2dffc4feb9eee1e40
Date: 2024-10-16T17:56:07.754Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 22.6.0

Hi @belfortf

Is this issue occurring in the Composer?

Hi @deanrie

No, in the chat sidebar (cmd + l)

Did this only happen once, or is it a recurring issue? What type of project are you working on? This seems like a bug. Thanks for sharing this!

was this file created by apply from chat originally? or did you create the file manually and then apply to it?

No, it has already happened at least 4 times, at least once a day for the past few days. It is a next.js project. It all happens extremely fast, I hit apply and then the file is gone.

The file was definitely created by apply from chat. Last time it happened I was iterating over it, i.e. applying a new version and then the moment I hit apply the code was gone. But as I said before, it all happens extremely fast.

1 Like

@deanrie @rishabhy , I think I have found out what’s going on. I created a component from scratch with chat, meaning that chat created the file for me when I clicked on apply for the first time. I then iterated over it and applied another bit of code. I then hit cmd+z as I wasn’t satisfied with the outcome and, I believe, that instead of showing the diff editor the file got deleted automatically.

Oh, thanks for the info, I’m glad you found the reason.