Manually written changes are deleted on composer chat start

I’ve lost a bunch of code this way multiple times now. Here are the steps to reproduce:

  1. open compose
  2. ask for a change
  3. reject the change
  4. change the code manually
  5. go back into the composer editor to try again
  6. composer updates code to the checkpoint from step 2 deleting all changes made in step 5
  7. undo doesn’t get changes from step 5 back

The only way to avoid this problem is to “reset” the composer at step 5 instead of just changing the prompt and rerunning. However, this means you also must recreate the set of files to include in the context.

Hey, try this solution: