Update App.jsx to include pendingChatLibrarySlug and toggleChatLibrary
This commit is contained in:
@@ -1827,11 +1827,12 @@ async function createNewChat() {
|
||||
library={activeLibrary}
|
||||
jobs={libraryJobs}
|
||||
chatLibrarySlug={chatLibrarySlug}
|
||||
pendingChatLibrarySlug={pendingChatLibrarySlug}
|
||||
onRefresh={async () => {
|
||||
await refreshLibraries();
|
||||
await refreshLibraryJobs();
|
||||
}}
|
||||
onToggleChatLibrary={setChatLibrarySlug}
|
||||
onToggleChatLibrary={toggleChatLibrary}
|
||||
onDeleted={(slug) => {
|
||||
if (activeLibrarySlug === slug) {
|
||||
const next = libraries.find(lib => lib.slug !== slug);
|
||||
@@ -1840,6 +1841,9 @@ async function createNewChat() {
|
||||
if (chatLibrarySlug === slug) {
|
||||
setChatLibrarySlug(null);
|
||||
}
|
||||
if (pendingChatLibrarySlug === slug) {
|
||||
setPendingChatLibrarySlug(null);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user