diff --git a/ui/admin/app/components/chat/MessagePane.tsx b/ui/admin/app/components/chat/MessagePane.tsx index 4f6739e3..d21e753e 100644 --- a/ui/admin/app/components/chat/MessagePane.tsx +++ b/ui/admin/app/components/chat/MessagePane.tsx @@ -34,7 +34,10 @@ export function MessagePane({ startScrollAt="bottom" enableScrollTo="bottom" enableScrollStick="bottom" - className={cn("h-full w-full relative", classNames.messageList)} + classNames={{ + root: cn("h-full w-full relative", classNames.messageList), + viewport: cn(isEmpty && "flex flex-col justify-center"), + }} > {isEmpty ? ( diff --git a/ui/admin/app/components/ui/scroll-area.tsx b/ui/admin/app/components/ui/scroll-area.tsx index b7bc5efb..6a0927bd 100644 --- a/ui/admin/app/components/ui/scroll-area.tsx +++ b/ui/admin/app/components/ui/scroll-area.tsx @@ -15,6 +15,10 @@ const ScrollArea = React.forwardRef< startScrollAt?: "bottom"; enableScrollStick?: "bottom"; enableScrollTo?: "bottom"; + classNames?: { + root?: string; + viewport?: string; + }; } >((props, ref) => { const { @@ -23,6 +27,7 @@ const ScrollArea = React.forwardRef< startScrollAt, enableScrollTo, enableScrollStick, + classNames = {}, ...rootProps } = props; @@ -60,11 +65,18 @@ const ScrollArea = React.forwardRef< return ( setShouldStickToBottom(isScrolledToBottom(e.currentTarget))