Diff deletes entire contents of file

I don’t want to post my entire file here at the moment, but any change to my current file which I request via cursor chat results in a diff which:

• Deletes all code in the current file
• Re-adds only the altered lines

The current file is around 900 lines long, and is being replaced with around 10 lines (this is obviously incorrect).

Hi @tylercasper ,

Can you please paste system info from Cursor > Help > About.

Also, which LLM have you selected in the chat prompt area?

Is the current chat very long?

If you enter the same prompt in another chat does it produce the same undesired behaviour?

And whilst your issue doesn’t seem like it would be related to any connection errors, do you see anything out of place at Cursor > Terminal > Output and then click on the dropdown and select Window (or one of the other Cursor specific options, such as Cursor Tab or Cursor Indexing & Retrieval ).