Fix attaching files to permanent assistant from welcome screen
| @@ -351,11 +351,14 @@ async function onFileAttach(file) { | ||
| 351 | 351 | $('#file_form .file_size').text(humanFileSize(file.size)); |
| 352 | 352 | $('#file_form').removeClass('displayNone'); |
| 353 | 353 | |
| 354 | 354 | // Reset form on chat change (if not on a welcome screen) |
| 355 | + const currentChatId = getCurrentChatId(); | |
| 356 | + if (currentChatId) { | |
| 355 | 357 | eventSource.once(event_types.CHAT_CHANGED, () => { |
| 356 | 358 | $('#file_form').trigger('reset'); |
| 357 | 359 | }); |
| 358 | 360 | } |
| 361 | +} | |
| 359 | 362 | |
| 360 | 363 | /** |
| 361 | 364 | * Deletes file from message. |