import { useCallback, useRef } from 'react' export function useChatScroll() { const containerRef = useRef(null) const scrollToBottom = useCallback(() => { if (!containerRef.current) return const container = containerRef.current container.scrollTo({ top: container.scrollHeight, behavior: 'smooth', }) }, []) return { containerRef, scrollToBottom } }