About code disappearance

Is there a history of queries like chatGPT has, I recently accidentally formatted the code file and then didn’t save it, I’m trying to retrieve that code now, is there any hope?