Browse Source

refac/fix: disable file upload by drag with unsupported model

Timothy Jaeryang Baek 3 months ago
parent
commit
82093cf690
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/components/chat/MessageInput.svelte

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

@@ -505,6 +505,11 @@
 			return null;
 		}
 
+		if (fileUploadCapableModels.length !== selectedModels.length) {
+			toast.error($i18n.t('Model(s) do not support file upload'));
+			return null;
+		}
+
 		const tempItemId = uuidv4();
 		const fileItem = {
 			type: 'file',