save/restore chat history locally for a session