Commit fa4c2249 authored by Jun Siang Cheah's avatar Jun Siang Cheah
Browse files

feat: add warning icon to images when some models are not vision capable

parent 4002ead6
......@@ -653,7 +653,32 @@
{#each files as file, fileIdx}
<div class=" relative group">
{#if file.type === 'image'}
<img src={file.url} alt="input" class=" h-16 w-16 rounded-xl object-cover" />
<div class="relative">
<img
src={file.url}
alt="input"
class=" h-16 w-16 rounded-xl object-cover"
/>
{#if visionCapableState === 'some'}
<Tooltip
className=" absolute top-0 left-0"
content={$i18n.t('A selected model does not support image input')}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-6 h-6 fill-yellow-300"
>
<path
fill-rule="evenodd"
d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"
clip-rule="evenodd"
/>
</svg>
</Tooltip>
{/if}
</div>
{:else if file.type === 'doc'}
<div
class="h-16 w-[15rem] flex items-center space-x-3 px-2.5 dark:bg-gray-600 rounded-xl border border-gray-200 dark:border-none"
......
......@@ -5,6 +5,7 @@
export let placement = 'top';
export let content = `I'm a tooltip!`;
export let touch = true;
export let className = 'flex';
let tooltipElement;
let tooltipInstance;
......@@ -29,6 +30,6 @@
});
</script>
<div bind:this={tooltipElement} aria-label={content} class="flex">
<div bind:this={tooltipElement} aria-label={content} class={className}>
<slot />
</div>
......@@ -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": "الحساب",
......
......@@ -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": "Акаунт",
......
......@@ -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": "একাউন্ট",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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": "",
......
......@@ -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": "",
......
......@@ -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",
......
......@@ -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": "حساب کاربری",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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": "חשבון",
......
......@@ -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": "खाता",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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": "アカウント",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment