From 0188ccb1174ee259179b5ac4b7d10b300654e973 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 19 Mar 2026 21:23:38 +0100 Subject: [PATCH] Update library handling logic in App.jsx --- src/App.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.jsx b/src/App.jsx index 06f5c6b..477bdf9 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -697,6 +697,7 @@ async function regenerateFromIndex(index, overrideUserText = null) { if (nextLibraries.length === 0) { setActiveLibrarySlug(null); setChatLibrarySlug(null); + setPendingChatLibrarySlug(null); return; } @@ -706,6 +707,9 @@ async function regenerateFromIndex(index, overrideUserText = null) { if (chatLibrarySlug && !nextLibraries.some(lib => lib.slug === chatLibrarySlug)) { setChatLibrarySlug(null); } + if (pendingChatLibrarySlug && !nextLibraries.some(lib => lib.slug === pendingChatLibrarySlug)) { + setPendingChatLibrarySlug(null); + } } catch (error) { console.warn('Failed to load libraries', error); }