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); }