diff --git a/src/App.jsx b/src/App.jsx
index ad8684b..5794ccd 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1505,8 +1505,7 @@ async function regenerateFromIndex(index, overrideUserText = null) {
setLibraryJobs([])
setActiveLibrarySlug(null)
setEditingLibrarySlug(null)
- setIsDbPickerOpen(false)
- setChatLibraryBySession({})
+ clearChatLibrarySelections()
await refreshLibraries()
await refreshLibraryJobs()
}
@@ -2270,11 +2269,7 @@ async function createNewChat() {
.then(() => {
const newSessions = chatSessions.filter(s => s.session_id !== sessionId);
setChatSessions(newSessions);
- setChatLibraryBySession(prev => {
- const next = { ...(prev || {}) }
- delete next[sessionId]
- return next
- })
+ setChatLibraryForSession(sessionId, null)
if (activeSessionId === sessionId) {
setActiveSessionId(newSessions.length > 0 ? newSessions[0].session_id : null);
}
@@ -2744,74 +2739,15 @@ async function createNewChat() {
placeholder="Ask any question..."
maxRows={13}
/>
-
-
- {isDbPickerOpen && (
-
-
- {libraries.length === 0 ? (
-
No databases yet.
- ) : (
- libraries.map(library => {
- const selected = chatLibrarySlug === library.slug
- const syncing = isLibrarySyncing(library.slug)
- const status = !library.files?.length
- ? 'Empty'
- : library.states?.is_indexed
- ? 'Ready'
- : syncing
- ? 'Syncing'
- : 'Needs sync'
-
- return (
-
- )
- })
- )}
-
- )}
-
+