import { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'; /** * Imperative transcript scroll state. Use `scrollToBottom` after the user sends * a message, which cannot be inferred from incoming content. */ export type ChatLayoutHandle = { /** Smoothly scrolls to latest and re-engages stick-to-bottom. */ scrollToBottom: () => void; /** True within the stick-to-bottom threshold of latest content. */ isAtBottom: boolean; }; export type ChatLayoutProps = Omit, "children" | "style"> & { /** Message stream in the scrolling transcript. Omit for a prompt-only column. */ conversation?: ReactNode; /** Bottom-pinned composer. Omit for a transcript-only column. */ prompt?: ReactNode; /** * Receives {@link ChatLayoutHandle} for caller-driven scrolling. */ controlRef?: Ref; className?: string; };