She was sane enough to function, but someone who does something like that indicates that she really wasn't sane at the time (in the sense of knowing right from wrong).
It sounds like she was totally delusional. My husband could walk around, and drive! but would be convinced he was in a concentration camp or such.
He once punched a doctor because he thought he was a manager from Walmart. Egad. Sometimes you have to laugh. I bet the doctor didn't think it was funny, though.
As my husband said to me later, who is this guy from Walmart telling me what to do?