diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 39abdd97b..bde807476 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -379,12 +379,13 @@ function useScrollToBottom() { // for auto-scroll const scrollRef = useRef(null); const [autoScroll, setAutoScroll] = useState(true); - + const config = useAppConfig(); + let isAutoScrollEnabled: boolean = config.autoScrollMessage; function scrollDomToBottom() { const dom = scrollRef.current; if (dom) { requestAnimationFrame(() => { - setAutoScroll(true); + setAutoScroll(isAutoScrollEnabled); dom.scrollTo(0, dom.scrollHeight); }); }