mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
08e4c163ea
commit
d54e588ec3
1 changed files with 8 additions and 4 deletions
|
|
@ -614,11 +614,15 @@
|
||||||
dismissible={true}
|
dismissible={true}
|
||||||
edit={true}
|
edit={true}
|
||||||
on:dismiss={async () => {
|
on:dismiss={async () => {
|
||||||
if (file.type !== 'collection' && !file?.collection) {
|
try {
|
||||||
if (file.id) {
|
if (file.type !== 'collection' && !file?.collection) {
|
||||||
// This will handle both file deletion and Chroma cleanup
|
if (file.id) {
|
||||||
await deleteFileById(localStorage.token, file.id);
|
// This will handle both file deletion and Chroma cleanup
|
||||||
|
await deleteFileById(localStorage.token, file.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error deleting file:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove from UI state
|
// Remove from UI state
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue