Fix attaching files to permanent assistant from welcome screen

This commit is contained in:
Cohee
2025-05-21 22:39:49 +03:00
parent 3486303d7c
commit 94c30837a2

View File

@ -351,10 +351,13 @@ async function onFileAttach(file) {
$('#file_form .file_size').text(humanFileSize(file.size)); $('#file_form .file_size').text(humanFileSize(file.size));
$('#file_form').removeClass('displayNone'); $('#file_form').removeClass('displayNone');
// Reset form on chat change // Reset form on chat change (if not on a welcome screen)
eventSource.once(event_types.CHAT_CHANGED, () => { const currentChatId = getCurrentChatId();
$('#file_form').trigger('reset'); if (currentChatId) {
}); eventSource.once(event_types.CHAT_CHANGED, () => {
$('#file_form').trigger('reset');
});
}
} }
/** /**