From bc66329f3f80e1f1cfd932eaee5621727f799620 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 19 Mar 2026 21:10:48 +0100 Subject: [PATCH] Move useEffect hook in src/App.jsx --- src/App.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 169e0de..b2b11df 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -789,12 +789,6 @@ async function regenerateFromIndex(index, overrideUserText = null) { } catch {} }, [chatLibrarySlug]); - useEffect(() => { - if (chatLibrarySlug && chatLibrary && !chatLibrary.states?.is_indexed) { - setChatLibrarySlug(null) - } - }, [chatLibrarySlug, chatLibrary]); - useEffect(() => { if (!ollamaApiUrl) return; const interval = setInterval(() => { @@ -831,6 +825,12 @@ async function regenerateFromIndex(index, overrideUserText = null) { return libraries.find(lib => lib.slug === chatLibrarySlug) || null; }, [chatLibrarySlug, libraries]); + useEffect(() => { + if (chatLibrarySlug && chatLibrary && !chatLibrary.states?.is_indexed) { + setChatLibrarySlug(null) + } + }, [chatLibrarySlug, chatLibrary]); + // Persist the scrollTop of the session we are LEAVING (on chat change or when leaving the chat view) useEffect(() => { const leavingSessionId = activeSessionId;