fix: resolve TypeError in HistoryManager by ensuring MathJax.typesetPromise is available
- Fixed the uncaught TypeError caused by `MathJax.typesetPromise` not being a function.
- Ensured MathJax is properly loaded before calling `typesetPromise`.
- Updated the HistoryManager.displayHistory function to handle MathJax initialization correctly.
Fixes issue at (索引):750:15 and (索引):923:22.