import * as React from "react"; import { ArrowDown } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useAutoScroll } from "@/hooks/use-auto-scroll"; interface ChatMessageListProps extends React.HTMLAttributes { smooth?: boolean; } const ChatMessageList = React.forwardRef( ({ className, children, smooth = false, ...props }, _ref) => { const { scrollRef, isAtBottom, autoScrollEnabled, scrollToBottom, disableAutoScroll, } = useAutoScroll({ smooth, content: children, }); return (
{children}
{!isAtBottom && ( )}
); } ); ChatMessageList.displayName = "ChatMessageList"; export { ChatMessageList };