A helper function that creates a callback to scroll to the bottom of the chat viewer.
It returns a generic ChatCallback that can be used with the chat viewer.
This function handles layout shifts that may occur after scrolling (e.g., when content
like delimiters is rendered asynchronously). It monitors scrollSize changes and re-scrolls
until the content stabilizes, ensuring the bottom remains visible.
A helper function that creates a callback to scroll to the bottom of the chat viewer. It returns a generic ChatCallback that can be used with the chat viewer.
This function handles layout shifts that may occur after scrolling (e.g., when content like delimiters is rendered asynchronously). It monitors scrollSize changes and re-scrolls until the content stabilizes, ensuring the bottom remains visible.