Fix scrolling to bottom problem
This commit is contained in:
parent
2bfef70960
commit
f53115aaa1
1 changed files with 5 additions and 0 deletions
|
|
@ -60,6 +60,11 @@ export default function RetrievalTesting() {
|
|||
|
||||
// Add messages to chatbox
|
||||
setMessages([...prevMessages, userMessage, assistantMessage])
|
||||
|
||||
// Force scroll to bottom after messages are rendered
|
||||
setTimeout(() => {
|
||||
scrollToBottom(true)
|
||||
}, 0)
|
||||
|
||||
// Clear input and set loading
|
||||
setInputValue('')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue