Fix chat width issues (#1813)

This commit is contained in:
Matthew Diamant
2025-03-22 10:55:12 -07:00
committed by GitHub
parent 20a35c7bad
commit f82983c6fa
2 changed files with 5 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ export default function UserMessage({ message }: UserMessageProps) {
<div className="flex-col max-w-[85%]">
<div className="flex flex-col group">
<div className="flex bg-slate text-white rounded-xl rounded-br-none py-2 px-3">
<div ref={contentRef}>
<div className="break-all" ref={contentRef}>
<MarkdownContent content={textContent} className="text-white" />
</div>
</div>

View File

@@ -73,7 +73,10 @@ const ScrollArea = React.forwardRef<ScrollAreaHandle, ScrollAreaProps>(
className={cn('relative overflow-hidden', className)}
{...props}
>
<ScrollAreaPrimitive.Viewport ref={viewportRef} className="h-full w-full rounded-[inherit]">
<ScrollAreaPrimitive.Viewport
ref={viewportRef}
className="h-full w-full rounded-[inherit] [&>div]:!block"
>
{children}
{autoScroll && <div ref={viewportEndRef} style={{ height: '1px' }} />}
</ScrollAreaPrimitive.Viewport>