This commit is contained in:
Timothy Jaeryang Baek
2026-08-05 07:57:55 -05:00
parent 6c4d0ace16
commit c1c07cbe0f
3 changed files with 34 additions and 7 deletions
+4 -3
View File
@@ -168,6 +168,7 @@
export let onQueueSendNow: (id: string) => void = () => {};
export let onQueueEdit: (id: string) => void = () => {};
export let onQueueDelete: (id: string) => void = () => {};
export let onUpdate: (data?: { file?: any }) => void = () => {};
export let chatTasks = [];
@@ -890,7 +891,7 @@
toast.error(`${e}`);
files = files.filter((item) => item?.itemId !== tempItemId);
} finally {
onUpload({ type: 'file' });
onUpdate({ file: fileItem });
}
} else {
// If temporary chat is enabled, we just add the file to the list without uploading it.
@@ -907,7 +908,7 @@
fileItem.error = $i18n.t('Failed to extract content from the file.');
toast.error($i18n.t('Failed to extract content from the file.'));
files = files.filter((item) => item?.itemId !== tempItemId);
onUpload({ type: 'file' });
onUpdate({ file: fileItem });
return null;
} else {
console.log('Extracted content from file:', {
@@ -922,7 +923,7 @@
fileItem.id = uuidv4(); // Temporary ID for the file
files = files;
onUpload({ type: 'file' });
onUpdate({ file: fileItem });
}
}
};