fix: enhance UserMessage component to support image parts and improve rendering
- Updated UserMessage to accept a new `parts` prop for handling different message types, including images. - Refactored image handling to extract and display images from the parts array, ensuring proper rendering of image content. - Adjusted the layout and styling of the UserMessage component for better visual presentation.
This commit is contained in:
@@ -71,7 +71,7 @@ export const Messages = forwardRef<HTMLDivElement, MessagesProps>(
|
||||
>
|
||||
<div className="grid grid-col-1 w-full">
|
||||
{isUserMessage ? (
|
||||
<UserMessage content={content} />
|
||||
<UserMessage content={content} parts={parts} />
|
||||
) : (
|
||||
<AssistantMessage
|
||||
content={content}
|
||||
|
||||
Reference in New Issue
Block a user