|
@@ -614,11 +614,15 @@
|
|
|
dismissible={true}
|
|
|
edit={true}
|
|
|
on:dismiss={async () => {
|
|
|
- if (file.type !== 'collection' && !file?.collection) {
|
|
|
- if (file.id) {
|
|
|
- // This will handle both file deletion and Chroma cleanup
|
|
|
- await deleteFileById(localStorage.token, file.id);
|
|
|
+ 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
|