this has built in history and lots of other features that a serious user needs, like checking token limits and estimating costs, etc.
https://github.com/rksm/org-ai