Integrates and utilizes the new scroll management hook across the component, enabling persistent and accurate chat scrolling behavior.
This commit is contained in:
20
src/App.jsx
20
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])
|
||||
|
||||
Reference in New Issue
Block a user