Add library purge functionality in backend and frontend
This commit is contained in:
11
src/App.jsx
11
src/App.jsx
@@ -808,6 +808,17 @@ async function regenerateFromIndex(index, overrideUserText = null) {
|
||||
}
|
||||
}
|
||||
|
||||
async function handleLibrariesPurged() {
|
||||
setLibraries([])
|
||||
setLibraryJobs([])
|
||||
setActiveLibrarySlug(null)
|
||||
setEditingLibrarySlug(null)
|
||||
setIsDbPickerOpen(false)
|
||||
setChatLibraryBySession({})
|
||||
await refreshLibraries()
|
||||
await refreshLibraryJobs()
|
||||
}
|
||||
|
||||
// Load chat sessions from backend on initial render
|
||||
useEffect(() => {
|
||||
if (!backendApiUrl) return;
|
||||
|
||||
Reference in New Issue
Block a user