5 Commits

Author SHA1 Message Date
Rankin Zheng
2738a5b602 Update components to use chat panel width from store
- Extract chat panel width state into Chat store
- Remove width prop drilling from parent components
- Use chat panel width via hook instead of props
- Pass className prop to MessageMarkdown for width styling
- Extend MessageMarkdown props to allow className
- Update MessageBody to get width styles
2023-09-14 15:03:37 +08:00
Rankin Zheng
447ae59088 Refactor MessageBody component and enhance ChatStore
- Extracted Markdown rendering logic from MessageBody into a new MessageMarkdown component.
- Moved CodeButtons component into the new MessageMarkdown directory.
- Updated MessageBody to use the new MessageMarkdown component.
- Added value attributes to buttons in the initial bot message in ChatStore.
2023-08-22 16:14:43 +08:00
Rankin Zheng
4641b97700 Update package.json and MessageBody component, enhance ChatStore
- Corrected indentation in package.json for DevChat.PythonVirtualEnv.
- Added 'rehype-raw' to dependencies in package.json.
- Imported 'rehype-raw' in MessageBody component and added it to ReactMarkdown as a rehypePlugin.
- Enhanced initial bot message in ChatStore with additional information and buttons.
2023-08-22 15:35:32 +08:00
Rankin Zheng
54cd6768e9 Refactor MessageAvatar and MessageBody components
- Removed unused 'key' prop from MessageAvatar component.
- Converted MessageBody component to use observer from mobx-react-lite.
- Added 'messageText' and 'messageType' to MessageBody props interface.
- Removed extra line breaks in MessageBody component.
2023-08-22 14:22:23 +08:00
Rankin Zheng
b7c16f709f Rename CodeBlock to MessageBody
- Renamed CodeBlock component to MessageBody for better clarity.
- Updated all references of CodeBlock to MessageBody in the codebase.
- Moved CodeBlock related files to MessageBody directory.
2023-08-21 14:07:11 +08:00