From de63174a89964724d3d1cf1e9e41c9adef1c82d7 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 9 Sep 2024 09:40:13 -0700 Subject: [PATCH] remove some comments --- web/src/app/chat/ChatPage.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/web/src/app/chat/ChatPage.tsx b/web/src/app/chat/ChatPage.tsx index ff0053cd138..faa29ba2439 100644 --- a/web/src/app/chat/ChatPage.tsx +++ b/web/src/app/chat/ChatPage.tsx @@ -540,10 +540,6 @@ export function ChatPage({ currentMessageMap(completeMessageDetail) ); - // if (visibleRange.get(loadedIdSessionRef.current)==undefined){ - // initializeVisibleRange(true); - // } - const [submittedMessage, setSubmittedMessage] = useState(""); const [chatState, setChatState] = useState>( @@ -1551,8 +1547,7 @@ export function ChatPage({ debounceNumber, }); - // Virutalization + Scrolling related effects and functions - + // Virtualization + Scrolling related effects and functions const scrollInitialized = useRef(false); interface VisibleRange { start: number; @@ -1597,13 +1592,7 @@ export function ChatPage({ currentMessageMap(completeMessageDetail) ); - if ( - !scrollInitialized.current && - upToDatemessageHistory.length > 0 - // && - // (!visibleRange.get(currentSessionId()) || - // visibleRange.get(currentSessionId())?.end == 0) - ) { + if (!scrollInitialized.current && upToDatemessageHistory.length > 0) { const newEnd = Math.max(upToDatemessageHistory.length, 40); const newStart = Math.max(0, newEnd - 20); const newMostVisibleMessageId =