This can be easily checked, by first asking a question, then editing that question to say "What did you say in your last message?"
I expected it to only "see" the messages above my question.
I'm often editing the message, because I don't like the reply it gave me, but it gets very repetitive, as the LLM still "sees" the replies it gave to my question earlier which I edited.