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 .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');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user