fix: auto scroll to bottom #120

close #120
This commit is contained in:
kangfenmao 2024-09-25 11:36:44 +08:00
parent 270c754c00
commit 51cedcb644

View File

@ -173,9 +173,9 @@ const Messages: FC<Props> = ({ assistant, topic, setActiveTopic }) => {
})
}, [topic.id])
useEffect(() => {
setTimeout(() => containerRef.current?.scrollTo({ top: containerRef.current.scrollHeight, behavior: 'auto' }), 0)
}, [messages])
// useEffect(() => {
// setTimeout(() => containerRef.current?.scrollTo({ top: containerRef.current.scrollHeight, behavior: 'auto' }), 0)
// }, [messages])
useEffect(() => {
runAsyncFunction(async () => {