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:
xKevIsDev
2025-07-19 01:19:43 +01:00
parent 897c08a8bd
commit 1554e2b0ce
3 changed files with 40 additions and 6 deletions

View File

@@ -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}