5 Commits

Author SHA1 Message Date
Rankin Zheng
58230455df Add refill prompt action icon to user messages 2023-06-06 18:13:26 +08:00
Rankin Zheng
80d91518f2 feat: Add refill prompt action icon to user messages 2023-06-06 15:13:49 +08:00
Rankin Zheng
54b2d4d44f Fix: Preserve whitespace in ChatPanel message content
In this commit, we updated the ChatPanel's MessageContainer component to preserve whitespace in the message content. This change improves the display of code snippets and other content that relies on whitespace formatting. The content is now wrapped in a <pre> tag with the overflowWrap style set to 'normal'.
2023-06-06 11:00:52 +08:00
Rankin Zheng
dd90ced309 Refactor: Simplify width prop handling in ChatPanel components
In this commit, we simplified the width prop handling in the ChatPanel components by directly passing the width value instead of the entire chatContainerRect object. This change makes the code more readable and easier to maintain.
2023-06-05 21:13:06 +08:00
Rankin Zheng
77898b8294 Refactor: Extract MessageContainer component from ChatPanel
Created a new MessageContainer.tsx file and moved the MessageContainer component from ChatPanel/index.tsx to the new file.
Imported the MessageContainer component in ChatPanel/index.tsx and removed the previous inline implementation.
MessageContainer component handles the display and management of messages in the chat panel, including message avatars, message contexts, and message blinking.
2023-06-05 19:27:25 +08:00