enh: allow full context mode for collections

This commit is contained in:
Timothy Jaeryang Baek
2025-07-09 01:29:49 +04:00
parent d5f9bbc7a7
commit b3c4bc6041
4 changed files with 65 additions and 19 deletions

View File

@@ -1145,18 +1145,8 @@
loading={file.status === 'uploading'}
dismissible={true}
edit={true}
modal={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);
files = files;