Browse Source

fix: file input not working after rejecting images

Jun Siang Cheah 1 year ago
parent
commit
9bc628ca75
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/components/chat/MessageInput.svelte

+ 2 - 0
src/lib/components/chat/MessageInput.svelte

@@ -559,6 +559,8 @@
 										if (selectedModel !== undefined) {
 										if (selectedModel !== undefined) {
 											if (!(selectedModel.custom_info?.vision_capable ?? true)) {
 											if (!(selectedModel.custom_info?.vision_capable ?? true)) {
 												toast.error($i18n.t('Selected model does not support image inputs.'));
 												toast.error($i18n.t('Selected model does not support image inputs.'));
+												inputFiles = null;
+												filesInputElement.value = '';
 												return;
 												return;
 											}
 											}
 										}
 										}