fix(webui): keep streaming tail visible (#5140)
This commit is contained in:
1 parent
1faf0826f6
commit
76ab04ac48
6 files changed
+215
-102
No files matched your search
@@ -275,7 +275,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
|
||||
if (el) {
|
||||
const top = Math.max(0, el.scrollHeight - el.clientHeight);
|
||||
if (smooth) {
|
||||
threadMotionRef.current?.animateTo(top);
|
||||
threadMotionRef.current?.navigateLatestTo(top);
|
||||
} else {
|
||||
threadMotionRef.current?.jumpTo(top);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
|
||||
(smooth = false, options?: { force?: boolean }) => {
|
||||
const force = options?.force ?? false;
|
||||
if (!force && threadMotionRef.current?.isAutoFollowPaused()) return;
|
||||
threadMotionRef.current?.resumeAutoFollow();
|
||||
if (!smooth) threadMotionRef.current?.resumeAutoFollow();
|
||||
scrollToBottomNow(smooth);
|
||||
},
|
||||
[scrollToBottomNow],
|
||||
|
||||
Reference in new issue
Block a user