Good chance you'll get most back. Go through these in order:
1. Local History (the editor's own). Cursor is a VS Code fork and keeps a copy of a file every time you save it, separate from git and checkpoints. On a Mac:
~/Library/Application Support/Cursor/User/History/
Every folder in there is one file. Inside is an entries.json with the original path, plus the saved versions. Find yours:
cd ~/Library/Application\ Support/Cursor/User/History
grep -l "components/booking" */entries.jsonOpen the matching folders, the newest file (by date) is the last version you saved. Copy it back to its path.
For a file that still exists, the Timeline panel at the bottom of the Explorer shows the same history with a UI.
2. Time Machine, if you have it on.
3. After this: commit before every agent run. Even git add -A && git commit -m "wip before agent". A checkpoint is an undo button, not a backup.