mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix attaching files to permanent assistant from welcome screen
This commit is contained in:
@ -351,10 +351,13 @@ async function onFileAttach(file) {
|
||||
$('#file_form .file_size').text(humanFileSize(file.size));
|
||||
$('#file_form').removeClass('displayNone');
|
||||
|
||||
// Reset form on chat change
|
||||
// Reset form on chat change (if not on a welcome screen)
|
||||
const currentChatId = getCurrentChatId();
|
||||
if (currentChatId) {
|
||||
eventSource.once(event_types.CHAT_CHANGED, () => {
|
||||
$('#file_form').trigger('reset');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user