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,12 +614,16 @@
|
|||
dismissible={true}
|
||||
edit={true}
|
||||
on:dismiss={async () => {
|
||||
try {
|
||||
if (file.type !== 'collection' && !file?.collection) {
|
||||
if (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
|
||||
files.splice(fileIdx, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue