Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jan 10, 2025
1 parent 3fb02df commit 31270be
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions ee/tabby-ui/components/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,22 @@ function ChatRenderer(
}
}, [answer, isLoading])

const scrollToBottom = useDebounceCallback((behavior: ScrollBehavior = 'smooth') => {
if (container) {
container.scrollTo({
top: container.scrollHeight,
behavior
})
} else {
window.scrollTo({
top: document.body.offsetHeight,
behavior
})
}
}, 100)
const scrollToBottom = useDebounceCallback(
(behavior: ScrollBehavior = 'smooth') => {
if (container) {
container.scrollTo({
top: container.scrollHeight,
behavior
})
} else {
window.scrollTo({
top: document.body.offsetHeight,
behavior
})
}
},
100
)

React.useLayoutEffect(() => {
// scroll to bottom when a request is sent
Expand Down

0 comments on commit 31270be

Please sign in to comment.