Hey, something interesting just happened to me. After a few months of not playing Undertale I did a true reset to start a new Pacifist run, and when I faced Undyne I got the "you told Undyne you just want to be friends/she remembers someone" flavor text. Which is weird because I thought this one only appeared with an Undyne hangout in a previous run and then doing a normal reset. Then again, she killed me once and the text only appeared after the reload...
After some testing and delving into the code, I have found that this flavor text is dependent on a variable that changes during the battle. It is not dependent on having befriended Undyne in a previous run!
It seems strange that she “remembers someone” if this is not due to befriending Frisk in a previous timeline. However, “someone” doesn’t have to be Frisk. Perhaps, Undyne is thinking about Papyrus.
In the pacifist neutral route, Frisk can hang out with Undyne after their battle. While they are drinking tea, Undyne tells Frisk how Papyrus “is too innocent and nice” to send to battle, considering how Papyrus befriended Frisk instead of capturing them. This makes it very likely that Undyne thought about Papyrus during the battle when Frisk chose to say they “want to be friends.”