From fa4c22492f100b0147e021e187c4c4540e0cae68 Mon Sep 17 00:00:00 2001 From: Jun Siang Cheah Date: Sun, 19 May 2024 18:57:13 +0800 Subject: [PATCH] feat: add warning icon to images when some models are not vision capable --- src/lib/components/chat/MessageInput.svelte | 27 ++++++++++++++++++++- src/lib/components/common/Tooltip.svelte | 3 ++- src/lib/i18n/locales/ar-BH/translation.json | 1 + src/lib/i18n/locales/bg-BG/translation.json | 1 + src/lib/i18n/locales/bn-BD/translation.json | 1 + src/lib/i18n/locales/ca-ES/translation.json | 1 + src/lib/i18n/locales/de-DE/translation.json | 1 + src/lib/i18n/locales/dg-DG/translation.json | 1 + src/lib/i18n/locales/en-GB/translation.json | 1 + src/lib/i18n/locales/en-US/translation.json | 1 + src/lib/i18n/locales/es-ES/translation.json | 1 + src/lib/i18n/locales/fa-IR/translation.json | 1 + src/lib/i18n/locales/fi-FI/translation.json | 1 + src/lib/i18n/locales/fr-CA/translation.json | 1 + src/lib/i18n/locales/fr-FR/translation.json | 1 + src/lib/i18n/locales/he-IL/translation.json | 1 + src/lib/i18n/locales/hi-IN/translation.json | 1 + src/lib/i18n/locales/hr-HR/translation.json | 1 + src/lib/i18n/locales/it-IT/translation.json | 1 + src/lib/i18n/locales/ja-JP/translation.json | 1 + src/lib/i18n/locales/ka-GE/translation.json | 1 + src/lib/i18n/locales/ko-KR/translation.json | 1 + src/lib/i18n/locales/nl-NL/translation.json | 1 + src/lib/i18n/locales/pa-IN/translation.json | 1 + src/lib/i18n/locales/pl-PL/translation.json | 1 + src/lib/i18n/locales/pt-BR/translation.json | 1 + src/lib/i18n/locales/pt-PT/translation.json | 1 + src/lib/i18n/locales/ru-RU/translation.json | 1 + src/lib/i18n/locales/sr-RS/translation.json | 1 + src/lib/i18n/locales/sv-SE/translation.json | 1 + src/lib/i18n/locales/tr-TR/translation.json | 1 + src/lib/i18n/locales/uk-UA/translation.json | 1 + src/lib/i18n/locales/vi-VN/translation.json | 1 + src/lib/i18n/locales/zh-CN/translation.json | 1 + src/lib/i18n/locales/zh-TW/translation.json | 1 + 35 files changed, 61 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index f7b519e87..98277867b 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -653,7 +653,32 @@ {#each files as file, fileIdx}
{#if file.type === 'image'} - input +
+ input + {#if visionCapableState === 'some'} + + + + + + {/if} +
{:else if file.type === 'doc'}
-
+
diff --git a/src/lib/i18n/locales/ar-BH/translation.json b/src/lib/i18n/locales/ar-BH/translation.json index d90b038b8..e3ad98e48 100644 --- a/src/lib/i18n/locales/ar-BH/translation.json +++ b/src/lib/i18n/locales/ar-BH/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} ...يفكر", "{{user}}'s Chats": "{{user}}' الدردشات", "{{webUIName}} Backend Required": "{{webUIName}} مطلوب", + "A selected model does not support image input": "", "a user": "المستخدم", "About": "عن", "Account": "الحساب", diff --git a/src/lib/i18n/locales/bg-BG/translation.json b/src/lib/i18n/locales/bg-BG/translation.json index d9c6cbf9a..7400560de 100644 --- a/src/lib/i18n/locales/bg-BG/translation.json +++ b/src/lib/i18n/locales/bg-BG/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} мисли ...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Изисква се Бекенд", + "A selected model does not support image input": "", "a user": "потребител", "About": "Относно", "Account": "Акаунт", diff --git a/src/lib/i18n/locales/bn-BD/translation.json b/src/lib/i18n/locales/bn-BD/translation.json index f2a947209..d9487bd50 100644 --- a/src/lib/i18n/locales/bn-BD/translation.json +++ b/src/lib/i18n/locales/bn-BD/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} চিন্তা করছে...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} ব্যাকএন্ড আবশ্যক", + "A selected model does not support image input": "", "a user": "একজন ব্যাবহারকারী", "About": "সম্পর্কে", "Account": "একাউন্ট", diff --git a/src/lib/i18n/locales/ca-ES/translation.json b/src/lib/i18n/locales/ca-ES/translation.json index fde747b53..b7e034ab1 100644 --- a/src/lib/i18n/locales/ca-ES/translation.json +++ b/src/lib/i18n/locales/ca-ES/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} està pensant...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "Es requereix Backend de {{webUIName}}", + "A selected model does not support image input": "", "a user": "un usuari", "About": "Sobre", "Account": "Compte", diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 11c0ea7dd..6df2a9148 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} denkt nach...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}}-Backend erforderlich", + "A selected model does not support image input": "", "a user": "ein Benutzer", "About": "Über", "Account": "Account", diff --git a/src/lib/i18n/locales/dg-DG/translation.json b/src/lib/i18n/locales/dg-DG/translation.json index 3ab072e89..13ee2decc 100644 --- a/src/lib/i18n/locales/dg-DG/translation.json +++ b/src/lib/i18n/locales/dg-DG/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} is thinkin'...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Backend Much Required", + "A selected model does not support image input": "", "a user": "such user", "About": "Much About", "Account": "Account", diff --git a/src/lib/i18n/locales/en-GB/translation.json b/src/lib/i18n/locales/en-GB/translation.json index 9de54c229..db2387a05 100644 --- a/src/lib/i18n/locales/en-GB/translation.json +++ b/src/lib/i18n/locales/en-GB/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "", + "A selected model does not support image input": "", "a user": "", "About": "", "Account": "", diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json index 9de54c229..db2387a05 100644 --- a/src/lib/i18n/locales/en-US/translation.json +++ b/src/lib/i18n/locales/en-US/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "", + "A selected model does not support image input": "", "a user": "", "About": "", "Account": "", diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index 5e0e0ab02..de5cf3947 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Servidor Requerido", + "A selected model does not support image input": "", "a user": "un usuario", "About": "Sobre nosotros", "Account": "Cuenta", diff --git a/src/lib/i18n/locales/fa-IR/translation.json b/src/lib/i18n/locales/fa-IR/translation.json index fb64e6da8..ec2a34886 100644 --- a/src/lib/i18n/locales/fa-IR/translation.json +++ b/src/lib/i18n/locales/fa-IR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} در حال فکر کردن است...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.", + "A selected model does not support image input": "", "a user": "یک کاربر", "About": "درباره", "Account": "حساب کاربری", diff --git a/src/lib/i18n/locales/fi-FI/translation.json b/src/lib/i18n/locales/fi-FI/translation.json index ad63a5be1..e7300d902 100644 --- a/src/lib/i18n/locales/fi-FI/translation.json +++ b/src/lib/i18n/locales/fi-FI/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} miettii...", "{{user}}'s Chats": "{{user}}:n keskustelut", "{{webUIName}} Backend Required": "{{webUIName}} backend vaaditaan", + "A selected model does not support image input": "", "a user": "käyttäjä", "About": "Tietoja", "Account": "Tili", diff --git a/src/lib/i18n/locales/fr-CA/translation.json b/src/lib/i18n/locales/fr-CA/translation.json index 152b82237..589ead6d3 100644 --- a/src/lib/i18n/locales/fr-CA/translation.json +++ b/src/lib/i18n/locales/fr-CA/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} réfléchit...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "Backend {{webUIName}} requis", + "A selected model does not support image input": "", "a user": "un utilisateur", "About": "À propos", "Account": "Compte", diff --git a/src/lib/i18n/locales/fr-FR/translation.json b/src/lib/i18n/locales/fr-FR/translation.json index f2625d642..5d883ba11 100644 --- a/src/lib/i18n/locales/fr-FR/translation.json +++ b/src/lib/i18n/locales/fr-FR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} réfléchit...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "Backend {{webUIName}} requis", + "A selected model does not support image input": "", "a user": "un utilisateur", "About": "À propos", "Account": "Compte", diff --git a/src/lib/i18n/locales/he-IL/translation.json b/src/lib/i18n/locales/he-IL/translation.json index 1f9392d19..341ac1068 100644 --- a/src/lib/i18n/locales/he-IL/translation.json +++ b/src/lib/i18n/locales/he-IL/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} חושב...", "{{user}}'s Chats": "צ'אטים של {{user}}", "{{webUIName}} Backend Required": "נדרש Backend של {{webUIName}}", + "A selected model does not support image input": "", "a user": "משתמש", "About": "אודות", "Account": "חשבון", diff --git a/src/lib/i18n/locales/hi-IN/translation.json b/src/lib/i18n/locales/hi-IN/translation.json index a3188db74..f8857d5cd 100644 --- a/src/lib/i18n/locales/hi-IN/translation.json +++ b/src/lib/i18n/locales/hi-IN/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} सोच रहा है...", "{{user}}'s Chats": "{{user}} की चैट", "{{webUIName}} Backend Required": "{{webUIName}} बैकएंड आवश्यक", + "A selected model does not support image input": "", "a user": "एक उपयोगकर्ता", "About": "हमारे बारे में", "Account": "खाता", diff --git a/src/lib/i18n/locales/hr-HR/translation.json b/src/lib/i18n/locales/hr-HR/translation.json index b02dea2f3..1328b1008 100644 --- a/src/lib/i18n/locales/hr-HR/translation.json +++ b/src/lib/i18n/locales/hr-HR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} razmišlja...", "{{user}}'s Chats": "Razgovori korisnika {{user}}", "{{webUIName}} Backend Required": "{{webUIName}} Backend je potreban", + "A selected model does not support image input": "", "a user": "korisnik", "About": "O", "Account": "Račun", diff --git a/src/lib/i18n/locales/it-IT/translation.json b/src/lib/i18n/locales/it-IT/translation.json index 94e73f9c7..47212915a 100644 --- a/src/lib/i18n/locales/it-IT/translation.json +++ b/src/lib/i18n/locales/it-IT/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} sta pensando...", "{{user}}'s Chats": "{{user}} Chat", "{{webUIName}} Backend Required": "{{webUIName}} Backend richiesto", + "A selected model does not support image input": "", "a user": "un utente", "About": "Informazioni", "Account": "Account", diff --git a/src/lib/i18n/locales/ja-JP/translation.json b/src/lib/i18n/locales/ja-JP/translation.json index 881f1b865..091c12e82 100644 --- a/src/lib/i18n/locales/ja-JP/translation.json +++ b/src/lib/i18n/locales/ja-JP/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} は思考中です...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} バックエンドが必要です", + "A selected model does not support image input": "", "a user": "ユーザー", "About": "概要", "Account": "アカウント", diff --git a/src/lib/i18n/locales/ka-GE/translation.json b/src/lib/i18n/locales/ka-GE/translation.json index cc13b3832..7f5a657f4 100644 --- a/src/lib/i18n/locales/ka-GE/translation.json +++ b/src/lib/i18n/locales/ka-GE/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} ფიქრობს...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} საჭიროა ბექენდი", + "A selected model does not support image input": "", "a user": "მომხმარებელი", "About": "შესახებ", "Account": "ანგარიში", diff --git a/src/lib/i18n/locales/ko-KR/translation.json b/src/lib/i18n/locales/ko-KR/translation.json index c1dd795eb..8df313456 100644 --- a/src/lib/i18n/locales/ko-KR/translation.json +++ b/src/lib/i18n/locales/ko-KR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} 이(가) 생각중입니다....", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} 백엔드가 필요합니다.", + "A selected model does not support image input": "", "a user": "사용자", "About": "소개", "Account": "계정", diff --git a/src/lib/i18n/locales/nl-NL/translation.json b/src/lib/i18n/locales/nl-NL/translation.json index 11aab2285..a533a5e32 100644 --- a/src/lib/i18n/locales/nl-NL/translation.json +++ b/src/lib/i18n/locales/nl-NL/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} is aan het denken...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Backend Verlpicht", + "A selected model does not support image input": "", "a user": "een gebruiker", "About": "Over", "Account": "Account", diff --git a/src/lib/i18n/locales/pa-IN/translation.json b/src/lib/i18n/locales/pa-IN/translation.json index 83521510f..aba350e13 100644 --- a/src/lib/i18n/locales/pa-IN/translation.json +++ b/src/lib/i18n/locales/pa-IN/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} ਸੋਚ ਰਿਹਾ ਹੈ...", "{{user}}'s Chats": "{{user}} ਦੀਆਂ ਗੱਲਾਂ", "{{webUIName}} Backend Required": "{{webUIName}} ਬੈਕਐਂਡ ਲੋੜੀਂਦਾ ਹੈ", + "A selected model does not support image input": "", "a user": "ਇੱਕ ਉਪਭੋਗਤਾ", "About": "ਬਾਰੇ", "Account": "ਖਾਤਾ", diff --git a/src/lib/i18n/locales/pl-PL/translation.json b/src/lib/i18n/locales/pl-PL/translation.json index a4b5a0b35..d81071080 100644 --- a/src/lib/i18n/locales/pl-PL/translation.json +++ b/src/lib/i18n/locales/pl-PL/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} myśli...", "{{user}}'s Chats": "{{user}} - czaty", "{{webUIName}} Backend Required": "Backend {{webUIName}} wymagane", + "A selected model does not support image input": "", "a user": "użytkownik", "About": "O nas", "Account": "Konto", diff --git a/src/lib/i18n/locales/pt-BR/translation.json b/src/lib/i18n/locales/pt-BR/translation.json index 0f5ec8de5..a1c268467 100644 --- a/src/lib/i18n/locales/pt-BR/translation.json +++ b/src/lib/i18n/locales/pt-BR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário", + "A selected model does not support image input": "", "a user": "um usuário", "About": "Sobre", "Account": "Conta", diff --git a/src/lib/i18n/locales/pt-PT/translation.json b/src/lib/i18n/locales/pt-PT/translation.json index 25a99b317..f3525b6e6 100644 --- a/src/lib/i18n/locales/pt-PT/translation.json +++ b/src/lib/i18n/locales/pt-PT/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário", + "A selected model does not support image input": "", "a user": "um usuário", "About": "Sobre", "Account": "Conta", diff --git a/src/lib/i18n/locales/ru-RU/translation.json b/src/lib/i18n/locales/ru-RU/translation.json index 4273cd89a..0f6bdc974 100644 --- a/src/lib/i18n/locales/ru-RU/translation.json +++ b/src/lib/i18n/locales/ru-RU/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} думает...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} бэкенд требуемый", + "A selected model does not support image input": "", "a user": "пользователь", "About": "Об", "Account": "Аккаунт", diff --git a/src/lib/i18n/locales/sr-RS/translation.json b/src/lib/i18n/locales/sr-RS/translation.json index 47c88169a..0ff67d112 100644 --- a/src/lib/i18n/locales/sr-RS/translation.json +++ b/src/lib/i18n/locales/sr-RS/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} размишља...", "{{user}}'s Chats": "Ћаскања корисника {{user}}", "{{webUIName}} Backend Required": "Захтева се {{webUIName}} позадинац", + "A selected model does not support image input": "", "a user": "корисник", "About": "О нама", "Account": "Налог", diff --git a/src/lib/i18n/locales/sv-SE/translation.json b/src/lib/i18n/locales/sv-SE/translation.json index f8c7f6012..27d87c0d8 100644 --- a/src/lib/i18n/locales/sv-SE/translation.json +++ b/src/lib/i18n/locales/sv-SE/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} tänker...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Backend krävs", + "A selected model does not support image input": "", "a user": "en användare", "About": "Om", "Account": "Konto", diff --git a/src/lib/i18n/locales/tr-TR/translation.json b/src/lib/i18n/locales/tr-TR/translation.json index f30ae511a..aa26e4339 100644 --- a/src/lib/i18n/locales/tr-TR/translation.json +++ b/src/lib/i18n/locales/tr-TR/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} düşünüyor...", "{{user}}'s Chats": "{{user}} Sohbetleri", "{{webUIName}} Backend Required": "{{webUIName}} Arkayüz Gerekli", + "A selected model does not support image input": "", "a user": "bir kullanıcı", "About": "Hakkında", "Account": "Hesap", diff --git a/src/lib/i18n/locales/uk-UA/translation.json b/src/lib/i18n/locales/uk-UA/translation.json index 3cfc4d3ae..5bbbd8981 100644 --- a/src/lib/i18n/locales/uk-UA/translation.json +++ b/src/lib/i18n/locales/uk-UA/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} думає...", "{{user}}'s Chats": "Чати {{user}}а", "{{webUIName}} Backend Required": "Необхідно підключення бекенду {{webUIName}}", + "A selected model does not support image input": "", "a user": "користувача", "About": "Про програму", "Account": "Обліковий запис", diff --git a/src/lib/i18n/locales/vi-VN/translation.json b/src/lib/i18n/locales/vi-VN/translation.json index dc92f9f92..88d4eadd6 100644 --- a/src/lib/i18n/locales/vi-VN/translation.json +++ b/src/lib/i18n/locales/vi-VN/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} đang suy nghĩ...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "{{webUIName}} Yêu cầu Backend", + "A selected model does not support image input": "", "a user": "người sử dụng", "About": "Giới thiệu", "Account": "Tài khoản", diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index ee86445ed..b6df2885a 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{user}}'s Chats": "{{user}} 的聊天记录", "{{webUIName}} Backend Required": "需要 {{webUIName}} 后端", + "A selected model does not support image input": "", "a user": "用户", "About": "关于", "Account": "账户", diff --git a/src/lib/i18n/locales/zh-TW/translation.json b/src/lib/i18n/locales/zh-TW/translation.json index a0db63e6b..95740e652 100644 --- a/src/lib/i18n/locales/zh-TW/translation.json +++ b/src/lib/i18n/locales/zh-TW/translation.json @@ -6,6 +6,7 @@ "{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{user}}'s Chats": "", "{{webUIName}} Backend Required": "需要 {{webUIName}} 後台", + "A selected model does not support image input": "", "a user": "使用者", "About": "關於", "Account": "帳號",