- Added observer from 'mobx-react-lite' and useMst from '@/views/stores/RootStore' to MessageMarkdown.
- Imported Message from '@/views/stores/ChatStore' and messageUtil from '@/util/MessageUtil' to MessageMarkdown.
- Added handleExplain and handleButton functions to MessageMarkdown to handle button clicks and anchor clicks.
- Updated button and anchor components in MessageMarkdown to use the new handleButton and handleExplain functions.
- Added useEffect hook in ChatPanel to handle scroll to bottom when chat.scrollBottom changes.
- Added scrollBottom property and goScrollBottom action to ChatStore.
- Updated the CurrentMessage component to use the Message model from ChatStore.
- Replaced chat.lastMessage with the last message in the chat.messages array.
- Updated the useEffect hooks to create a new Message object and pass it to the newMessage and updateLastMessage actions.
- Updated the chatPanel function in ChatPanel.tsx to create a new Message object before calling the newMessage action.
- Removed the lastMessage field from the ChatStore model.
- Updated the startResponsing action to accept a string parameter.
- Updated the updateLastMessage action to accept a string parameter and update the message field of the last message in the chat.messages array.
- Refactored fetchHistoryMessages and deleteMessage actions in ChatStore to use MobX flow for handling async operations.
- Updated calls to these actions in MessageHeader and ChatPanel components to handle promises returned by these actions.
- Replaced Redux hooks with MobX hooks for state management.
- Removed Redux actions and replaced them with equivalent MobX actions.
- Updated useEffect hook to use MobX actions instead of Redux actions.
- Replaced Redux selectors with equivalent MobX observables.