Skip to content

Commit eabfe92

Browse files
committed
Return user to bottom of the chat when navigating between pages.
1 parent a0f3488 commit eabfe92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/src/pages/chat/Chat.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,10 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
819819
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'smooth' })
820820
}, [showLoadingMessage, processMessages])
821821

822+
useEffect(() => {
823+
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'smooth' })
824+
}, [messages])
825+
822826
const onShowCitation = (citation: Citation) => {
823827
const path = `/#/document/${citation.filepath}`
824828
const url = window.location.origin + path

0 commit comments

Comments
 (0)