Skip to content

Commit

Permalink
chore: handle fix generation without have dep thread id
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Dec 23, 2024
1 parent 45e6135 commit c4db8b9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/screens/Thread/ThreadCenterPanel/ChatBody/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ const ChatBody = memo(
}
}, [count, virtualizer])

useEffect(() => {
if (parentRef.current && isGeneratingResponse) {
parentRef.current.scrollTo({ top: parentRef.current.scrollHeight })
virtualizer.scrollToIndex(count - 1)
}
}, [count, virtualizer, isGeneratingResponse])

useEffect(() => {
if (parentRef.current && isGeneratingResponse) {
parentRef.current.scrollTo({ top: parentRef.current.scrollHeight })
Expand Down

0 comments on commit c4db8b9

Please sign in to comment.