From cf591c91d17b4ba2461cd053cddddaef0220c537 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 6 May 2026 03:45:39 +0200 Subject: [PATCH] Integrates and utilizes the new scroll management hook across the component, enabling persistent and accurate chat scrolling behavior. --- src/App.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/App.jsx b/src/App.jsx index a63ee6a..148fc68 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1292,6 +1292,26 @@ async function regenerateFromIndex(index, overrideUserText = null) { return chatSessions.find(s => s.session_id === activeSessionId)?.messages || []; }, [activeSessionId, chatSessions]); + const { + activeSessionIdRef, + handleNewMsgTipClick, + newMsgTip, + restoredForRef, + scrollMessageToTop, + scrollPendingMessageForSession, + scrollToBottom, + setNewMsgTip, + setPendingScrollToLastUser, + setScrollPositions, + setUserScrolledUp, + userScrolledUpRef, + } = useChatScroll({ + activeSessionId, + activeSidebarMode, + chatRef, + messagesLength: messages.length, + }) + const activeChatSession = useMemo(() => { return chatSessions.find(session => session.session_id === activeSessionId) || null }, [activeSessionId, chatSessions])