mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fix followOutput
This commit is contained in:
@@ -593,14 +593,20 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
}}
|
}}
|
||||||
// followOutput works much more reliably than manually tracking visible messages count. This will scroll when the count changes, so for cases where the row height changes, we use onHeightChange to scroll.
|
// followOutput works much more reliably than manually tracking visible messages count. This will scroll when the count changes, so for cases where the row height changes, we use onHeightChange to scroll.
|
||||||
followOutput={(isAtBottom: boolean) => {
|
followOutput={(isAtBottom: boolean) => {
|
||||||
if (didScrollUp) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
return "smooth" // can be 'auto' or false to avoid scrolling
|
return "smooth"
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
if (didScrollUp) {
|
||||||
|
// would sometimes get set to true even when new items get added. followoutput taking us to bottom will set this back to false
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
return "smooth"
|
||||||
|
}
|
||||||
|
// if (isAtBottom) {
|
||||||
|
// return "smooth" // can be 'auto' or false to avoid scrolling
|
||||||
|
// } else {
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
}}
|
}}
|
||||||
components={{
|
components={{
|
||||||
Footer: () => <div style={{ height: 5 }} />, // Add empty padding at the bottom
|
Footer: () => <div style={{ height: 5 }} />, // Add empty padding at the bottom
|
||||||
|
|||||||
Reference in New Issue
Block a user