Update library handling logic in App.jsx
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user