Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

feat(playground): attach images and text files to a message (#325) (#648)

Tashfeen43d895bb2555
diff --git a/README.md b/README.md
index 911ee995..0eb38c65 100644
--- a/README.md
+++ b/README.md
@@ -298,7 +298,7 @@ Manage provider credentials and grab the unified API key your apps connect with.
### Playground
-Send a chat completion through the router and see which provider served it, with the model ID and latency printed right on the message.
+Send a chat completion through the router and see which provider served it, with the model ID and latency printed right on the message. Attach files by button, drag-and-drop, or paste: images (PNG/JPEG/WebP/GIF) are downscaled in the browser and sent as image content parts to a vision-capable model, and text files (TXT/MD/CSV/JSON/LOG) are inlined into the prompt as fenced blocks.
![Playground page](repo-assets/playground.png)
diff --git a/client/src/components/model-combobox.tsx b/client/src/components/model-combobox.tsx
index 1b1cfee2..621cd63b 100644
--- a/client/src/components/model-combobox.tsx
+++ b/client/src/components/model-combobox.tsx
@@ -15,6 +15,11 @@ export interface ModelComboOption {
isNew?: boolean
/** Provider names when the model is served by several (hover + search). */
platforms?: string[]
+ /**
+ * Caveat badge: the option stays selectable but is dimmed and tagged (e.g.
+ * "no image support" while the Playground has an image attached).
+ */
+ note?: string
}
export function ModelCombobox({
@@ -118,7 +123,12 @@ export function ModelCombobox({
}`}
>
<Check className={`size-4 shrink-0 ${o.value === value ? 'opacity-100' : 'opacity-0'}`} />
- <span className="min-w-0 flex-1 truncate">{o.label}</span>
+ <span className={`min-w-0 flex-1 truncate ${o.note ? 'opacity-50' : ''}`}>{o.label}</span>
+ {o.note && (
+ <span className="rounded px-1 py-0.5 text-[9px] font-semibold uppercase leading-none tracking-wide bg-amber-500/15 text-amber-600 dark:text-amber-400">
+ {o.note}
+ </span>
+ )}
{o.isNew && (
<span className="rounded px-1 py-0.5 text-[9px] font-semibold uppercase leading-none tracking-wide bg-emerald-500/15 text-emerald-600 dark:text-emerald-400">
{t('models.newBadge')}
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index 9d9dd564..cde2ac39 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -506,7 +506,14 @@
"errorPrefix": "ስህተት",
"systemPromptLabel": "የስርዓት ጥያቄ",
"systemPromptPlaceholder": "አማራጭ። ከውይይትዎ በፊት እንደ የስርዓት መልእክት ተልኳል።",
- "errorTitle": "ጥያቄ አልተሳካም"
+ "errorTitle": "ጥያቄ አልተሳካም",
+ "attach": "ፋይሎችን ያያይዙ",
+ "attachTooMany": "በአንድ መልእክት እስከ {count} ፋይሎች ማያያዝ ይችላሉ።",
+ "attachTooLarge": "{name} በጣም ትልቅ ነው። ገደቡ {max} ነው።",
+ "attachUnsupported": "{name} አይደገፍም። ምስሎችን (PNG, JPEG, WebP, GIF) ወይም የጽሑፍ ፋይሎችን (TXT, MD, CSV, JSON, LOG) ያያይዙ።",
+ "attachFailed": "{name} ማንበብ አልተቻለም።",
+ "noVisionBadge": "ምስል የለም",
+ "visionWarning": "{model} ምስሎችን አይቀበልም። ምስል የሚቀበል ሞዴል ወይም ራስ-ሰር ይምረጡ።"
},
"embeddings": {
"title": "ሞዴሎች",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index d0ff2f55..dc52c4c7 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -506,7 +506,14 @@
"errorPrefix": "خطأ:",
"systemPromptLabel": "موجه النظام",
"systemPromptPlaceholder": "اختياري. يتم إرسالها كرسالة نظام قبل الدردشة.",
- "errorTitle": "فشل الطلب"
+ "errorTitle": "فشل الطلب",
+ "attach": "إرفاق الملفات",
+ "attachTooMany": "يمكنك إرفاق ما يصل إلى {count} ملفات لكل رسالة.",
+ "attachTooLarge": "حجم {name} كبير جدًا. الحد الأقصى هو {max}.",
+ "attachUnsupported": "{name} غير مدعوم. أرفق صورًا (PNG، JPEG، WebP، GIF) أو ملفات نصية (TXT، MD، CSV، JSON، LOG).",
+ "attachFailed": "تعذّرت قراءة {name}.",
+ "noVisionBadge": "بدون صور",
+ "visionWarning": "{model} لا يقبل الصور. اختر نموذج رؤية أو «تلقائي»."
},
"embeddings": {
"title": "نماذج",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index d089517e..ab85d7dc 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -506,7 +506,14 @@
"errorPrefix": "Səhv:",
"systemPromptLabel": "Sistem sorğusu",
"systemPromptPlaceholder": "İstəyə bağlıdır. Çatdan əvvəl sistem mesajı kimi göndərildi.",
- "errorTitle": "Tələb uğursuz oldu"
+ "errorTitle": "Tələb uğursuz oldu",
+ "attach": "Fayl əlavə et",
+ "attachTooMany": "Hər mesaja ən çox {count} fayl əlavə edə bilərsiniz.",
+ "attachTooLarge": "{name} çox böyükdür. Maksimum həcm: {max}.",
+ "attachUnsupported": "{name} dəstəklənmir. Şəkil (PNG, JPEG, WebP, GIF) və ya mətn faylları (TXT, MD, CSV, JSON, LOG) əlavə edin.",
+ "attachFailed": "{name} oxunmadı.",
+ "noVisionBadge": "Şəkilsiz",
+ "visionWarning": "{model} şəkilləri qəbul etmir. Şəkil dəstəkləyən model və ya Avtomatik seçin."
},
"embeddings": {
"title": "Modellər",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index 1ec21c84..d0a0b11d 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -506,7 +506,14 @@
"errorPrefix": "Грешка:",
"systemPromptLabel": "Системна подсказка",
"systemPromptPlaceholder": "По желание. Изпратено е като системно съобщение преди чата.",
- "errorTitle": "Заявката беше провалена"
+ "errorTitle": "Заявката беше провалена",
+ "attach": "Прикачване на файлове",
+ "attachTooMany": "Може да прикачите до {count} файла на съобщение.",
+ "attachTooLarge": "{name} е твърде голям. Ограничението е {max}.",
+ "attachUnsupported": "{name} не се поддържа. Прикачете изображения (PNG, JPEG, WebP, GIF) или текстови файлове (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "{name} не може да бъде прочетен.",
+ "noVisionBadge": "Без изображения",
+ "visionWarning": "{model} не приема изображения. Изберете модел с визия или Авто."
},
"embeddings": {
"title": "Модели",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index 9dc7f093..1ce3c993 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -506,7 +506,14 @@
"errorPrefix": "ত্রুটি:",
"systemPromptLabel": "সিস্টেম প্রম্পট",
"systemPromptPlaceholder": "ঐচ্ছিক। আপনার চ্যাটের আগে একটি সিস্টেম বার্তা হিসাবে পাঠানো হয়েছে৷",
- "errorTitle": "অনুরোধ ব্যর্থ হয়েছে"
+ "errorTitle": "অনুরোধ ব্যর্থ হয়েছে",
+ "attach": "ফাইল সংযুক্ত করুন",
+ "attachTooMany": "আপনি প্রতি বার্তায় সর্বোচ্চ {count}টি ফাইল সংযুক্ত করতে পারেন।",
+ "attachTooLarge": "{name} খুব বড়। সীমা হল {max}।",
+ "attachUnsupported": "{name} সমর্থিত নয়। ছবি (PNG, JPEG, WebP, GIF) বা পাঠ্য ফাইল (TXT, MD, CSV, JSON, LOG) সংযুক্ত করুন।",
+ "attachFailed": "{name} পড়া যায়নি।",
+ "noVisionBadge": "ছবি নেই",
+ "visionWarning": "{model} ছবি গ্রহণ করে না। একটি দৃষ্টি মডেল বা স্বয়ংক্রিয় নির্বাচন করুন।"
},
"embeddings": {
"title": "মডেল",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index 328f1b6c..1e9d745b 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -506,7 +506,14 @@
"errorPrefix": "Chyba:",
"systemPromptLabel": "Systémový prompt",
"systemPromptPlaceholder": "Volitelné. Odesláno jako systémová zpráva před vaším chatem.",
- "errorTitle": "Žádost neúspěšná"
+ "errorTitle": "Žádost neúspěšná",
+ "attach": "Připojit soubory",
+ "attachTooMany": "Ke zprávě můžete připojit až {count} souborů.",
+ "attachTooLarge": "{name} je příliš velký. Limit je {max}.",
+ "attachUnsupported": "{name} není podporován. Připojte obrázky (PNG, JPEG, WebP, GIF) nebo textové soubory (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Soubor {name} se nepodařilo přečíst.",
+ "noVisionBadge": "Bez obrázků",
+ "visionWarning": "{model} nepřijímá obrázky. Zvolte model podporující obrázky nebo Auto."
},
"embeddings": {
"title": "Modely",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index 33c32dff..58e808dd 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -506,7 +506,14 @@
"errorPrefix": "Fejl:",
"systemPromptLabel": "Systemprompt",
"systemPromptPlaceholder": "Valgfrit. Sendt som en systembesked før din chat.",
- "errorTitle": "Anmodningen mislykkedes"
+ "errorTitle": "Anmodningen mislykkedes",
+ "attach": "Vedhæft filer",
+ "attachTooMany": "Du kan vedhæfte op til {count} filer pr. besked.",
+ "attachTooLarge": "{name} er for stor. Grænsen er {max}.",
+ "attachUnsupported": "{name} understøttes ikke. Vedhæft billeder (PNG, JPEG, WebP, GIF) eller tekstfiler (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Kunne ikke læse {name}.",
+ "noVisionBadge": "Ingen billeder",
+ "visionWarning": "{model} accepterer ikke billeder. Vælg en model med billedinput eller Auto."
},
"embeddings": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index ec324a5f..e1c1246b 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -506,7 +506,14 @@
"errorPrefix": "Fehler:",
"systemPromptLabel": "Systemaufforderung",
"systemPromptPlaceholder": "Optional. Wird als Systemnachricht vor Ihrem Chat gesendet.",
- "errorTitle": "Die Anfrage ist fehlgeschlagen"
+ "errorTitle": "Die Anfrage ist fehlgeschlagen",
+ "attach": "Dateien anhängen",
+ "attachTooMany": "Sie können bis zu {count} Dateien pro Nachricht anhängen.",
+ "attachTooLarge": "{name} ist zu groß. Das Limit beträgt {max}.",
+ "attachUnsupported": "{name} wird nicht unterstützt. Hängen Sie Bilder (PNG, JPEG, WebP, GIF) oder Textdateien (TXT, MD, CSV, JSON, LOG) an.",
+ "attachFailed": "{name} konnte nicht gelesen werden.",
+ "noVisionBadge": "Keine Bilder",
+ "visionWarning": "{model} akzeptiert keine Bilder. Wählen Sie ein Vision-Modell oder Auto."
},
"embeddings": {
"title": "Modelle",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index 818639f2..71eadbe1 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -506,7 +506,14 @@
"errorPrefix": "Σφάλμα:",
"systemPromptLabel": "Προτροπή συστήματος",
"systemPromptPlaceholder": "Προαιρετικός. Στάλθηκε ως μήνυμα συστήματος πριν από τη συνομιλία σας.",
- "errorTitle": "Το αίτημα απέτυχε"
+ "errorTitle": "Το αίτημα απέτυχε",
+ "attach": "Επισύναψη αρχείων",
+ "attachTooMany": "Μπορείτε να επισυνάψετε έως {count} αρχεία ανά μήνυμα.",
+ "attachTooLarge": "Το {name} είναι πολύ μεγάλο. Το όριο είναι {max}.",
+ "attachUnsupported": "Το {name} δεν υποστηρίζεται. Επισυνάψτε εικόνες (PNG, JPEG, WebP, GIF) ή αρχεία κειμένου (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Δεν ήταν δυνατή η ανάγνωση του {name}.",
+ "noVisionBadge": "Χωρίς εικόνες",
+ "visionWarning": "Το {model} δεν δέχεται εικόνες. Επιλέξτε μοντέλο με υποστήριξη εικόνας ή Αυτόματο."
},
"embeddings": {
"title": "Μοντέλα",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 957934b5..99acfc40 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -516,7 +516,14 @@
"errorPrefix": "Error:",
"systemPromptLabel": "System prompt",
"systemPromptPlaceholder": "Optional. Sent as a system message before your chat.",
- "errorTitle": "Request failed"
+ "errorTitle": "Request failed",
+ "attach": "Attach files",
+ "attachTooMany": "You can attach up to {count} files per message.",
+ "attachTooLarge": "{name} is too large. The limit is {max}.",
+ "attachUnsupported": "{name} is not supported. Attach images (PNG, JPEG, WebP, GIF) or text files (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Could not read {name}.",
+ "noVisionBadge": "No images",
+ "visionWarning": "{model} does not accept images. Choose a vision model or Auto."
},
"embeddings": {
"title": "Models",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index e18cec42..7f68f4a6 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -506,7 +506,14 @@
"errorPrefix": "Error:",
"systemPromptLabel": "Prompt del sistema",
"systemPromptPlaceholder": "Opcional. Se envía como mensaje del sistema antes de tu chat.",
- "errorTitle": "La solicitud falló"
+ "errorTitle": "La solicitud falló",
+ "attach": "Adjuntar archivos",
+ "attachTooMany": "Puedes adjuntar hasta {count} archivos por mensaje.",
+ "attachTooLarge": "{name} es demasiado grande. El límite es {max}.",
+ "attachUnsupported": "{name} no es compatible. Adjunta imágenes (PNG, JPEG, WebP, GIF) o archivos de texto (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "No se pudo leer {name}.",
+ "noVisionBadge": "Sin imágenes",
+ "visionWarning": "{model} no acepta imágenes. Elige un modelo de visión o Auto."
},
"embeddings": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index fa7d0d61..2c759400 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -506,7 +506,14 @@
"errorPrefix": "خطا:",
"systemPromptLabel": "اعلان سیستم",
"systemPromptPlaceholder": "اختیاری. قبل از چت شما به عنوان یک پیام سیستمی ارسال می شود.",
- "errorTitle": "درخواست ناموفق بود"
+ "errorTitle": "درخواست ناموفق بود",
+ "attach": "پیوست فایل‌ها",
+ "attachTooMany": "در هر پیام حداکثر می‌توانید {count} فایل پیوست کنید.",
+ "attachTooLarge": "{name} خیلی بزرگ است. محدودیت {max} است.",
+ "attachUnsupported": "{name} پشتیبانی نمی‌شود. تصویر (PNG، JPEG، WebP، GIF) یا فایل متنی (TXT، MD، CSV، JSON، LOG) پیوست کنید.",
+ "attachFailed": "{name} خوانده نشد.",
+ "noVisionBadge": "بدون تصویر",
+ "visionWarning": "{model} تصویر نمی‌پذیرد. یک مدل با ورودی تصویر یا خودکار را انتخاب کنید."
},
"embeddings": {
"title": "مدل ها",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index ad59b34d..5f9cdb16 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -506,7 +506,14 @@
"errorPrefix": "Virhe:",
"systemPromptLabel": "Järjestelmäkehote",
"systemPromptPlaceholder": "Valinnainen. Lähetetty järjestelmäviestinä ennen keskusteluasi.",
- "errorTitle": "Pyyntö epäonnistui"
+ "errorTitle": "Pyyntö epäonnistui",
+ "attach": "Liitä tiedostoja",
+ "attachTooMany": "Voit liittää enintään {count} tiedostoa viestiä kohden.",
+ "attachTooLarge": "{name} on liian suuri. Raja on {max}.",
+ "attachUnsupported": "{name} ei ole tuettu. Liitä kuvia (PNG, JPEG, WebP, GIF) tai tekstitiedostoja (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Tiedostoa {name} ei voitu lukea.",
+ "noVisionBadge": "Ei kuvia",
+ "visionWarning": "{model} ei hyväksy kuvia. Valitse kuvasyötteen hyväksyvä malli tai Auto."
},
"embeddings": {
"title": "Mallit",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index 36efb294..ddd1e4da 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -506,7 +506,14 @@
"errorPrefix": "Erreur :",
"systemPromptLabel": "Prompt système",
"systemPromptPlaceholder": "Facultatif. Envoyé comme message système avant votre conversation.",
- "errorTitle": "La requête a échoué"
+ "errorTitle": "La requête a échoué",
+ "attach": "Joindre des fichiers",
+ "attachTooMany": "Vous pouvez joindre jusqu'à {count} fichiers par message.",
+ "attachTooLarge": "{name} est trop volumineux. La limite est de {max}.",
+ "attachUnsupported": "{name} n'est pas pris en charge. Joignez des images (PNG, JPEG, WebP, GIF) ou des fichiers texte (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Impossible de lire {name}.",
+ "noVisionBadge": "Sans images",
+ "visionWarning": "{model} n'accepte pas les images. Choisissez un modèle vision ou Auto."
},
"embeddings": {
"title": "Modèles",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index f6d098dc..c291dc3b 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -506,7 +506,14 @@
"errorPrefix": "ભૂલ:",
"systemPromptLabel": "સિસ્ટમ પ્રોમ્પ્ટ",
"systemPromptPlaceholder": "વૈકલ્પિક. તમારી ચેટ પહેલા સિસ્ટમ સંદેશ તરીકે મોકલવામાં આવે છે.",
- "errorTitle": "વિનંતી નિષ્ફળ"
+ "errorTitle": "વિનંતી નિષ્ફળ",
+ "attach": "ફાઇલો જોડો",
+ "attachTooMany": "તમે સંદેશ દીઠ વધુમાં વધુ {count} ફાઇલો જોડી શકો છો.",
+ "attachTooLarge": "{name} ખૂબ મોટી છે. મર્યાદા {max} છે.",
+ "attachUnsupported": "{name} સમર્થિત નથી. છબીઓ (PNG, JPEG, WebP, GIF) અથવા ટેક્સ્ટ ફાઇલો (TXT, MD, CSV, JSON, LOG) જોડો.",
+ "attachFailed": "{name} વાંચી શકાયું નથી.",
+ "noVisionBadge": "છબીઓ નહીં",
+ "visionWarning": "{model} છબીઓ સ્વીકારતું નથી. ઇમેજ ઇનપુટ સ્વીકારતું મોડેલ અથવા ઓટો પસંદ કરો."
},
"embeddings": {
"title": "મોડલ્સ",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index 98b5a8a4..2cd87708 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -506,7 +506,14 @@
"errorPrefix": "Kuskure:",
"systemPromptLabel": "Tsarin tsari",
"systemPromptPlaceholder": "Na zaɓi. An aika azaman saƙon tsarin kafin tattaunawar ku.",
- "errorTitle": "Buƙatar ta kasa"
+ "errorTitle": "Buƙatar ta kasa",
+ "attach": "Haɗa fayiloli",
+ "attachTooMany": "Za ka iya haɗa har fayiloli {count} a kowane saƙo.",
+ "attachTooLarge": "{name} ya yi girma sosai. Iyakar ita ce {max}.",
+ "attachUnsupported": "Ba a goyi bayan {name} ba. Haɗa hotuna (PNG, JPEG, WebP, GIF) ko fayilolin rubutu (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Ba a iya karanta {name} ba.",
+ "noVisionBadge": "Babu hotuna",
+ "visionWarning": "{model} ba ya karɓar hotuna. Zaɓi samfurin da ke karɓar hotuna ko Auto."
},
"embeddings": {
"title": "Samfura",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index 3f0d6413..7e920dd7 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -506,7 +506,14 @@
"errorPrefix": "שגיאה:",
"systemPromptLabel": "הנחיית המערכת",
"systemPromptPlaceholder": "אופציונלי. נשלח כהודעה מערכתית לפני הצ'אט שלך.",
- "errorTitle": "הבקשה נכשלה"
+ "errorTitle": "הבקשה נכשלה",
+ "attach": "צירוף קבצים",
+ "attachTooMany": "אפשר לצרף עד {count} קבצים בכל הודעה.",
+ "attachTooLarge": "{name} גדול מדי. המגבלה היא {max}.",
+ "attachUnsupported": "{name} אינו נתמך. צרף תמונות (PNG, JPEG, WebP, GIF) או קובצי טקסט (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "לא ניתן לקרוא את {name}.",
+ "noVisionBadge": "ללא תמונות",
+ "visionWarning": "{model} אינו מקבל תמונות. בחר מודל חזון או אוטו."
},
"embeddings": {
"title": "דגמים",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index a6023491..23d42ef6 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -506,7 +506,14 @@
"errorPrefix": "त्रुटि:",
"systemPromptLabel": "सिस्टम प्रॉम्प्ट",
"systemPromptPlaceholder": "वैकल्पिक. आपकी चैट से पहले एक सिस्टम संदेश के रूप में भेजा गया।",
- "errorTitle": "अनुरोध विफल"
+ "errorTitle": "अनुरोध विफल",
+ "attach": "फ़ाइलें संलग्न करें",
+ "attachTooMany": "आप प्रति संदेश अधिकतम {count} फ़ाइलें संलग्न कर सकते हैं।",
+ "attachTooLarge": "{name} बहुत बड़ी है। सीमा {max} है।",
+ "attachUnsupported": "{name} समर्थित नहीं है। छवियाँ (PNG, JPEG, WebP, GIF) या टेक्स्ट फ़ाइलें (TXT, MD, CSV, JSON, LOG) संलग्न करें।",
+ "attachFailed": "{name} को पढ़ा नहीं जा सका।",
+ "noVisionBadge": "छवि नहीं",
+ "visionWarning": "{model} छवियाँ स्वीकार नहीं करता। कोई दृष्टि मॉडल या ऑटो चुनें।"
},
"embeddings": {
"title": "मॉडल",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index 74d89eb8..71f25ad7 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -506,7 +506,14 @@
"errorPrefix": "Pogreška:",
"systemPromptLabel": "Sistemski upit",
"systemPromptPlaceholder": "Opcionalno. Poslana kao sistemska poruka prije vašeg chata.",
- "errorTitle": "Zahtjev nije uspio"
+ "errorTitle": "Zahtjev nije uspio",
+ "attach": "Priloži datoteke",
+ "attachTooMany": "Po poruci možete priložiti najviše {count} datoteka.",
+ "attachTooLarge": "Datoteka {name} je prevelika. Ograničenje je {max}.",
+ "attachUnsupported": "Datoteka {name} nije podržana. Priložite slike (PNG, JPEG, WebP, GIF) ili tekstualne datoteke (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Nije moguće pročitati datoteku {name}.",
+ "noVisionBadge": "Bez slika",
+ "visionWarning": "Model {model} ne prihvaća slike. Odaberite model s vizijom ili Auto."
},
"embeddings": {
"title": "Modeli",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index bbb4b2b7..d1423aea 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -506,7 +506,14 @@
"errorPrefix": "Hiba:",
"systemPromptLabel": "Rendszerprompt",
"systemPromptPlaceholder": "Opcionális. Rendszerüzenetként küldték el a csevegés előtt.",
- "errorTitle": "Kérés meghiúsult"
+ "errorTitle": "Kérés meghiúsult",
+ "attach": "Fájlok csatolása",
+ "attachTooMany": "Üzenetenként legfeljebb {count} fájlt csatolhatsz.",
+ "attachTooLarge": "A(z) {name} túl nagy. A korlát {max}.",
+ "attachUnsupported": "A(z) {name} nem támogatott. Csatolj képeket (PNG, JPEG, WebP, GIF) vagy szövegfájlokat (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "A(z) {name} nem olvasható.",
+ "noVisionBadge": "Nincs kép",
+ "visionWarning": "A(z) {model} nem fogad képeket. Válassz képfeldolgozó modellt vagy az Automatikus lehetőséget."
},
"embeddings": {
"title": "Modellek",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index f1c40623..d9f136d9 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -506,7 +506,14 @@
"errorPrefix": "Kesalahan:",
"systemPromptLabel": "Perintah sistem",
"systemPromptPlaceholder": "Opsional. Dikirim sebagai pesan sistem sebelum obrolan Anda.",
- "errorTitle": "Permintaan gagal"
+ "errorTitle": "Permintaan gagal",
+ "attach": "Lampirkan file",
+ "attachTooMany": "Anda dapat melampirkan hingga {count} file per pesan.",
+ "attachTooLarge": "{name} terlalu besar. Batasnya adalah {max}.",
+ "attachUnsupported": "{name} tidak didukung. Lampirkan gambar (PNG, JPEG, WebP, GIF) atau file teks (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Tidak dapat membaca {name}.",
+ "noVisionBadge": "Tanpa gambar",
+ "visionWarning": "{model} tidak menerima gambar. Pilih model visi atau Otomatis."
},
"embeddings": {
"title": "Model",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index b48291c1..ab032f19 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -506,7 +506,14 @@
"errorPrefix": "Njehie:",
"systemPromptLabel": "Ngwa ngwa sistemụ",
"systemPromptPlaceholder": "Nhọrọ. Ezitere dị ka ozi sistemụ tupu nkata gị.",
- "errorTitle": "Arịrịọ agaghị"
+ "errorTitle": "Arịrịọ agaghị",
+ "attach": "Tinye faịlụ",
+ "attachTooMany": "Ị nwere ike itinye ihe ruru faịlụ {count} n'ozi ọ bụla.",
+ "attachTooLarge": "{name} buru ibu nke ukwuu. Oke ya bụ {max}.",
+ "attachUnsupported": "Anaghị akwado {name}. Tinye onyonyo (PNG, JPEG, WebP, GIF) ma ọ bụ faịlụ ederede (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Enweghị ike ịgụ {name}.",
+ "noVisionBadge": "Enweghị onyonyo",
+ "visionWarning": "{model} anaghị anabata onyonyo. Họrọ ụdị na-anabata onyonyo ma ọ bụ Akpaaka."
},
"embeddings": {
"title": "Ụdị",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index f7cf581b..a020d240 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -506,7 +506,14 @@
"errorPrefix": "Errore:",
"systemPromptLabel": "Prompt di sistema",
"systemPromptPlaceholder": "Facoltativo. Inviato come messaggio di sistema prima della chat.",
- "errorTitle": "Richiesta non riuscita"
+ "errorTitle": "Richiesta non riuscita",
+ "attach": "Allega file",
+ "attachTooMany": "Puoi allegare fino a {count} file per messaggio.",
+ "attachTooLarge": "{name} è troppo grande. Il limite è {max}.",
+ "attachUnsupported": "{name} non è supportato. Allega immagini (PNG, JPEG, WebP, GIF) o file di testo (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Impossibile leggere {name}.",
+ "noVisionBadge": "No immagini",
+ "visionWarning": "{model} non accetta immagini. Scegli un modello con visione o Auto."
},
"embeddings": {
"title": "Modelli",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index 3b33685f..815f45ea 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -506,7 +506,14 @@
"errorPrefix": "エラー:",
"systemPromptLabel": "システムプロンプト",
"systemPromptPlaceholder": "オプション。チャットの前にシステム メッセージとして送信されます。",
- "errorTitle": "リクエストが失敗しました"
+ "errorTitle": "リクエストが失敗しました",
+ "attach": "ファイルを添付",
+ "attachTooMany": "1 件のメッセージに添付できるファイルは最大 {count} 件です。",
+ "attachTooLarge": "{name} は大きすぎます。上限は {max} です。",
+ "attachUnsupported": "{name} はサポートされていません。画像 (PNG、JPEG、WebP、GIF) またはテキスト ファイル (TXT、MD、CSV、JSON、LOG) を添付してください。",
+ "attachFailed": "{name} を読み取れませんでした。",
+ "noVisionBadge": "画像不可",
+ "visionWarning": "{model} は画像を受け付けません。ビジョン モデルまたは「自動」を選択してください。"
},
"embeddings": {
"title": "モデル",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index 6e1b89ed..834bf129 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -506,7 +506,14 @@
"errorPrefix": "შეცდომა:",
"systemPromptLabel": "სისტემის მოთხოვნა",
"systemPromptPlaceholder": "სურვილისამებრ. გაიგზავნა სისტემური შეტყობინების სახით თქვენი ჩატის წინ.",
- "errorTitle": "მოთხოვნა ვერ მოხერხდა"
+ "errorTitle": "მოთხოვნა ვერ მოხერხდა",
+ "attach": "ფაილების მიმაგრება",
+ "attachTooMany": "ერთ შეტყობინებაზე შეგიძლიათ მაქსიმუმ {count} ფაილის მიმაგრება.",
+ "attachTooLarge": "{name} ძალიან დიდია. ლიმიტია {max}.",
+ "attachUnsupported": "{name} არ არის მხარდაჭერილი. მიამაგრეთ სურათები (PNG, JPEG, WebP, GIF) ან ტექსტური ფაილები (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "{name} ვერ წაიკითხა.",
+ "noVisionBadge": "სურათების გარეშე",
+ "visionWarning": "{model} არ იღებს სურათებს. აირჩიეთ ხედვის მოდელი ან ავტომატური."
},
"embeddings": {
"title": "მოდელები",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index 7d6e4605..058667b8 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -506,7 +506,14 @@
"errorPrefix": "កំហុស៖",
"systemPromptLabel": "ការជូនដំណឹងប្រព័ន្ធ",
"systemPromptPlaceholder": "ជាជម្រើស។ បានផ្ញើជាសារប្រព័ន្ធមុនពេលជជែករបស់អ្នក។",
- "errorTitle": "សំណើបរាជ័យ"
+ "errorTitle": "សំណើបរាជ័យ",
+ "attach": "ភ្ជាប់ឯកសារ",
+ "attachTooMany": "អ្នកអាចភ្ជាប់ឯកសារបានរហូតដល់ {count} ក្នុងមួយសារ។",
+ "attachTooLarge": "{name} មានទំហំធំពេក។ ដែនកំណត់គឺ {max}។",
+ "attachUnsupported": "{name} មិនត្រូវបានគាំទ្រទេ។ ភ្ជាប់រូបភាព (PNG, JPEG, WebP, GIF) ឬឯកសារអត្ថបទ (TXT, MD, CSV, JSON, LOG)។",
+ "attachFailed": "មិនអាចអានឯកសារ {name} បានទេ។",
+ "noVisionBadge": "គ្មានរូបភាព",
+ "visionWarning": "{model} មិនទទួលយករូបភាពទេ។ សូមជ្រើសរើសម៉ូដែលដែលទទួលរូបភាព ឬ Auto។"
},
"embeddings": {
"title": "ម៉ូដែល",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index 18e2a6b8..1d81e1d1 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -506,7 +506,14 @@
"errorPrefix": "ದೋಷ:",
"systemPromptLabel": "ಸಿಸ್ಟಮ್ ಪ್ರಾಂಪ್ಟ್",
"systemPromptPlaceholder": "ಐಚ್ಛಿಕ. ನಿಮ್ಮ ಚಾಟ್‌ಗೆ ಮೊದಲು ಸಿಸ್ಟಮ್ ಸಂದೇಶವಾಗಿ ಕಳುಹಿಸಲಾಗಿದೆ.",
- "errorTitle": "ವಿನಂತಿ ವಿಫಲವಾಗಿದೆ"
+ "errorTitle": "ವಿನಂತಿ ವಿಫಲವಾಗಿದೆ",
+ "attach": "ಫೈಲ್‌ಗಳನ್ನು ಲಗತ್ತಿಸಿ",
+ "attachTooMany": "ಪ್ರತಿ ಸಂದೇಶಕ್ಕೆ ನೀವು ಗರಿಷ್ಠ {count} ಫೈಲ್‌ಗಳನ್ನು ಲಗತ್ತಿಸಬಹುದು.",
+ "attachTooLarge": "{name} ತುಂಬಾ ದೊಡ್ಡದಾಗಿದೆ. ಮಿತಿ {max} ಆಗಿದೆ.",
+ "attachUnsupported": "{name} ಬೆಂಬಲಿತವಾಗಿಲ್ಲ. ಚಿತ್ರಗಳನ್ನು (PNG, JPEG, WebP, GIF) ಅಥವಾ ಪಠ್ಯ ಫೈಲ್‌ಗಳನ್ನು (TXT, MD, CSV, JSON, LOG) ಲಗತ್ತಿಸಿ.",
+ "attachFailed": "{name} ಅನ್ನು ಓದಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ.",
+ "noVisionBadge": "ಚಿತ್ರಗಳಿಲ್ಲ",
+ "visionWarning": "{model} ಚಿತ್ರಗಳನ್ನು ಸ್ವೀಕರಿಸುವುದಿಲ್ಲ. ಚಿತ್ರದ ಇನ್‌ಪುಟ್ ಸ್ವೀಕರಿಸುವ ಮಾದರಿ ಅಥವಾ ಸ್ವಯಂ ಆಯ್ಕೆಮಾಡಿ."
},
"embeddings": {
"title": "ಮಾದರಿಗಳು",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index c007b260..e1dd7c1e 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -506,7 +506,14 @@
"errorPrefix": "오류:",
"systemPromptLabel": "시스템 프롬프트",
"systemPromptPlaceholder": "선택사항. 채팅 전 시스템 메시지로 전송됩니다.",
- "errorTitle": "요청 실패"
+ "errorTitle": "요청 실패",
+ "attach": "파일 첨부",
+ "attachTooMany": "메시지당 최대 {count}개의 파일을 첨부할 수 있습니다.",
+ "attachTooLarge": "{name}이(가) 너무 큽니다. 제한은 {max}입니다.",
+ "attachUnsupported": "{name}은(는) 지원되지 않습니다. 이미지(PNG, JPEG, WebP, GIF) 또는 텍스트 파일(TXT, MD, CSV, JSON, LOG)을 첨부하세요.",
+ "attachFailed": "{name}을(를) 읽을 수 없습니다.",
+ "noVisionBadge": "이미지 불가",
+ "visionWarning": "{model}은(는) 이미지를 지원하지 않습니다. 이미지 입력이 가능한 모델 또는 자동을 선택하세요."
},
"embeddings": {
"title": "모델",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index 60b5084f..d5b2e63b 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -506,7 +506,14 @@
"errorPrefix": "Klaida:",
"systemPromptLabel": "Sistemos užklausa",
"systemPromptPlaceholder": "Pasirinktinai. Siunčiama kaip sistemos žinutė prieš jūsų pokalbį.",
- "errorTitle": "Užklausa atmesta"
+ "errorTitle": "Užklausa atmesta",
+ "attach": "Pridėti failus",
+ "attachTooMany": "Prie vienos žinutės galite pridėti iki {count} failų.",
+ "attachTooLarge": "Failas {name} yra per didelis. Riba yra {max}.",
+ "attachUnsupported": "Failas {name} nepalaikomas. Pridėkite vaizdų (PNG, JPEG, WebP, GIF) arba tekstinių failų (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Nepavyko perskaityti failo {name}.",
+ "noVisionBadge": "Be vaizdų",
+ "visionWarning": "Modelis {model} nepriima vaizdų. Pasirinkite vaizdo įvestį palaikantį modelį arba Auto."
},
"embeddings": {
"title": "Modeliai",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index 5d677247..5c890149 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -506,7 +506,14 @@
"errorPrefix": "പിശക്:",
"systemPromptLabel": "സിസ്റ്റം പ്രോംപ്റ്റ്",
"systemPromptPlaceholder": "ഓപ്ഷണൽ. നിങ്ങളുടെ ചാറ്റിന് മുമ്പ് ഒരു സിസ്റ്റം സന്ദേശമായി അയച്ചു.",
- "errorTitle": "അഭ്യർത്ഥന പരാജയപ്പെട്ടു"
+ "errorTitle": "അഭ്യർത്ഥന പരാജയപ്പെട്ടു",
+ "attach": "ഫയലുകൾ അറ്റാച്ചുചെയ്യുക",
+ "attachTooMany": "ഓരോ സന്ദേശത്തിലും പരമാവധി {count} ഫയലുകൾ വരെ അറ്റാച്ചുചെയ്യാം.",
+ "attachTooLarge": "{name} വളരെ വലുതാണ്. പരിധി {max} ആണ്.",
+ "attachUnsupported": "{name} പിന്തുണയ്ക്കുന്നില്ല. ചിത്രങ്ങൾ (PNG, JPEG, WebP, GIF) അല്ലെങ്കിൽ ടെക്സ്റ്റ് ഫയലുകൾ (TXT, MD, CSV, JSON, LOG) അറ്റാച്ചുചെയ്യുക.",
+ "attachFailed": "{name} വായിക്കാൻ കഴിഞ്ഞില്ല.",
+ "noVisionBadge": "ചിത്രങ്ങളില്ല",
+ "visionWarning": "{model} ചിത്രങ്ങൾ സ്വീകരിക്കുന്നില്ല. ഇമേജ് ഇൻപുട്ട് സ്വീകരിക്കുന്ന മോഡൽ അല്ലെങ്കിൽ ഓട്ടോ തിരഞ്ഞെടുക്കുക."
},
"embeddings": {
"title": "മോഡലുകൾ",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index aacd9dd0..693403f2 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -506,7 +506,14 @@
"errorPrefix": "त्रुटी:",
"systemPromptLabel": "सिस्टम प्रॉम्प्ट",
"systemPromptPlaceholder": "ऐच्छिक. तुमच्या चॅटपूर्वी सिस्टम मेसेज म्हणून पाठवले.",
- "errorTitle": "विनंती अयशस्वी"
+ "errorTitle": "विनंती अयशस्वी",
+ "attach": "फाइल्स संलग्न करा",
+ "attachTooMany": "तुम्ही प्रति संदेश जास्तीत जास्त {count} फाइल्स संलग्न करू शकता.",
+ "attachTooLarge": "{name} खूप मोठी आहे. मर्यादा {max} आहे.",
+ "attachUnsupported": "{name} समर्थित नाही. प्रतिमा (PNG, JPEG, WebP, GIF) किंवा मजकूर फाइल्स (TXT, MD, CSV, JSON, LOG) संलग्न करा.",
+ "attachFailed": "{name} वाचता आले नाही.",
+ "noVisionBadge": "प्रतिमा नाही",
+ "visionWarning": "{model} प्रतिमा स्वीकारत नाही. दृष्टी मॉडेल किंवा ऑटो निवडा."
},
"embeddings": {
"title": "मॉडेल्स",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index e79e66f9..ab112e03 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -506,7 +506,14 @@
"errorPrefix": "Ralat:",
"systemPromptLabel": "Arahan sistem",
"systemPromptPlaceholder": "Pilihan. Dihantar sebagai mesej sistem sebelum sembang anda.",
- "errorTitle": "Permintaan gagal"
+ "errorTitle": "Permintaan gagal",
+ "attach": "Lampirkan fail",
+ "attachTooMany": "Anda boleh melampirkan sehingga {count} fail bagi setiap mesej.",
+ "attachTooLarge": "{name} terlalu besar. Hadnya ialah {max}.",
+ "attachUnsupported": "{name} tidak disokong. Lampirkan imej (PNG, JPEG, WebP, GIF) atau fail teks (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Tidak dapat membaca {name}.",
+ "noVisionBadge": "Tiada imej",
+ "visionWarning": "{model} tidak menerima imej. Pilih model yang menyokong imej atau Auto."
},
"embeddings": {
"title": "Model",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index bf4fc29f..b6168b99 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -506,7 +506,14 @@
"errorPrefix": "အမှား:",
"systemPromptLabel": "System prompt",
"systemPromptPlaceholder": "ရွေးချယ်နိုင်ပါတယ်။ သင့်စကားပြောမှုမတိုင်မီ စနစ်မက်ဆေ့ခ်ျအဖြစ် ပို့သည်။",
- "errorTitle": "တောင်းဆိုမှု မအောင်မြင်ပါ"
+ "errorTitle": "တောင်းဆိုမှု မအောင်မြင်ပါ",
+ "attach": "ဖိုင်များ ပူးတွဲပါ",
+ "attachTooMany": "မက်ဆေ့ခ်ျတစ်ခုလျှင် ဖိုင် {count} ခုအထိ ပူးတွဲနိုင်ပါသည်။",
+ "attachTooLarge": "{name} သည် အရွယ်အစား ကြီးလွန်းသည်။ ကန့်သတ်ချက်မှာ {max} ဖြစ်သည်။",
+ "attachUnsupported": "{name} ကို မပံ့ပိုးပါ။ ပုံများ (PNG, JPEG, WebP, GIF) သို့မဟုတ် စာသားဖိုင်များ (TXT, MD, CSV, JSON, LOG) ကို ပူးတွဲပါ။",
+ "attachFailed": "{name} ကို ဖတ်၍မရပါ။",
+ "noVisionBadge": "ပုံမရ",
+ "visionWarning": "{model} သည် ပုံများကို လက်မခံပါ။ ပုံရိပ်ထည့်သွင်းမှုကို လက်ခံသော မော်ဒယ် သို့မဟုတ် အော်တို ကို ရွေးပါ။"
},
"embeddings": {
"title": "မော်ဒယ်များ",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index 7275fe8b..b19065f8 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -506,7 +506,14 @@
"errorPrefix": "त्रुटि:",
"systemPromptLabel": "प्रणाली प्रवर्धन",
"systemPromptPlaceholder": "वैकल्पिक छ । तपाईँको कुराकानी भन्दा पहिले प्रणाली सन्देशको रूपमा पठाइयो ।",
- "errorTitle": "अनुरोध असफल भयो"
+ "errorTitle": "अनुरोध असफल भयो",
+ "attach": "फाइलहरू संलग्न गर्नुहोस्",
+ "attachTooMany": "तपाईं प्रति सन्देश {count} वटासम्म फाइल संलग्न गर्न सक्नुहुन्छ।",
+ "attachTooLarge": "{name} धेरै ठूलो छ। सीमा {max} हो।",
+ "attachUnsupported": "{name} समर्थित छैन। छवि (PNG, JPEG, WebP, GIF) वा पाठ फाइलहरू (TXT, MD, CSV, JSON, LOG) संलग्न गर्नुहोस्।",
+ "attachFailed": "{name} पढ्न सकिएन।",
+ "noVisionBadge": "छवि छैन",
+ "visionWarning": "{model} ले छवि स्वीकार गर्दैन। छवि स्वीकार गर्ने मोडेल वा स्वत: छान्नुहोस्।"
},
"embeddings": {
"title": "नमूनाहरू",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index f026d289..995b4a71 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -506,7 +506,14 @@
"errorPrefix": "Fout:",
"systemPromptLabel": "Systeemprompt",
"systemPromptPlaceholder": "Optioneel. Verzonden als een systeembericht vóór je chat.",
- "errorTitle": "Verzoek afgewezen"
+ "errorTitle": "Verzoek afgewezen",
+ "attach": "Bestanden bijvoegen",
+ "attachTooMany": "Je kunt maximaal {count} bestanden per bericht bijvoegen.",
+ "attachTooLarge": "{name} is te groot. De limiet is {max}.",
+ "attachUnsupported": "{name} wordt niet ondersteund. Voeg afbeeldingen (PNG, JPEG, WebP, GIF) of tekstbestanden (TXT, MD, CSV, JSON, LOG) toe.",
+ "attachFailed": "Kan {name} niet lezen.",
+ "noVisionBadge": "Geen afbeeldingen",
+ "visionWarning": "{model} accepteert geen afbeeldingen. Kies een model met beeldinvoer of Auto."
},
"embeddings": {
"title": "Modellen",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index af4335da..f5fc4fef 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -506,7 +506,14 @@
"errorPrefix": "Feil:",
"systemPromptLabel": "Systemprompt",
"systemPromptPlaceholder": "Valgfritt. Sendt som en systemmelding før chatten din.",
- "errorTitle": "Forespørselen ble avvist"
+ "errorTitle": "Forespørselen ble avvist",
+ "attach": "Legg ved filer",
+ "attachTooMany": "Du kan legge ved opptil {count} filer per melding.",
+ "attachTooLarge": "{name} er for stor. Grensen er {max}.",
+ "attachUnsupported": "{name} støttes ikke. Legg ved bilder (PNG, JPEG, WebP, GIF) eller tekstfiler (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Kunne ikke lese {name}.",
+ "noVisionBadge": "Ingen bilder",
+ "visionWarning": "{model} godtar ikke bilder. Velg en modell med bildeinput eller Auto."
},
"embeddings": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index 43739b18..fce4c10f 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -506,7 +506,14 @@
"errorPrefix": "ତ୍ରୁଟି:",
"systemPromptLabel": "ସିଷ୍ଟମ୍ ପ୍ରମ୍ପ୍ଟ",
"systemPromptPlaceholder": "ଇଚ୍ଛାଧୀନ । ଆପଣଙ୍କ ଚାଟ୍ ପୂର୍ବରୁ ଏକ ସିଷ୍ଟମ୍ ସନ୍ଦେଶ ଭାବେ ପ୍ରେରିତ ହୋଇଛି।",
- "errorTitle": "ଅନୁରୋଧ ବିଫଳ ହୋଇଛି"
+ "errorTitle": "ଅନୁରୋଧ ବିଫଳ ହୋଇଛି",
+ "attach": "ଫାଇଲଗୁଡିକ ସଂଲଗ୍ନ କରନ୍ତୁ",
+ "attachTooMany": "ପ୍ରତି ସନ୍ଦେଶରେ ଆପଣ ସର୍ବାଧିକ {count} ଫାଇଲ୍ ସଂଲଗ୍ନ କରିପାରିବେ।",
+ "attachTooLarge": "{name} ବହୁତ ବଡ଼। ସୀମା ହେଉଛି {max}।",
+ "attachUnsupported": "{name} ସମର୍ଥିତ ନୁହେଁ। ଚିତ୍ର (PNG, JPEG, WebP, GIF) କିମ୍ୱା ଟେକ୍ସଟ୍ ଫାଇଲ (TXT, MD, CSV, JSON, LOG) ସଂଲଗ୍ନ କରନ୍ତୁ।",
+ "attachFailed": "{name} ପଢ଼ି ହେଲା ନାହିଁ।",
+ "noVisionBadge": "ଚିତ୍ର ନାହିଁ",
+ "visionWarning": "{model} ଚିତ୍ର ଗ୍ରହଣ କରେ ନାହିଁ। ଫଟୋ ଇନପୁଟ୍ ସ୍ଵୀକାର କରୁଥିବା ମଡେଲ୍ କିମ୍ୱା ସ୍ଵତଃ ଚୟନ କରନ୍ତୁ।"
},
"embeddings": {
"title": "ମଡେଲଗୁଡିକ",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index 1c79db5c..3ce8b87f 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -506,7 +506,14 @@
"errorPrefix": "ਗਲਤੀ:",
"systemPromptLabel": "ਸਿਸਟਮ ਪ੍ਰੋਂਪਟ",
"systemPromptPlaceholder": "ਵਿਕਲਪਿਕ। ਤੁਹਾਡੀ ਗੱਲਬਾਤ ਤੋਂ ਪਹਿਲਾਂ ਇੱਕ ਸਿਸਟਮ ਸੁਨੇਹੇ ਵਜੋਂ ਭੇਜਿਆ ਗਿਆ।",
- "errorTitle": "ਬੇਨਤੀ ਅਸਫਲ ਰਹੀ"
+ "errorTitle": "ਬੇਨਤੀ ਅਸਫਲ ਰਹੀ",
+ "attach": "ਫਾਈਲਾਂ ਨੱਥੀ ਕਰੋ",
+ "attachTooMany": "ਤੁਸੀਂ ਪ੍ਰਤੀ ਸੁਨੇਹਾ ਵੱਧ ਤੋਂ ਵੱਧ {count} ਫਾਈਲਾਂ ਨੱਥੀ ਕਰ ਸਕਦੇ ਹੋ।",
+ "attachTooLarge": "{name} ਬਹੁਤ ਵੱਡੀ ਹੈ। ਸੀਮਾ {max} ਹੈ।",
+ "attachUnsupported": "{name} ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ। ਚਿੱਤਰ (PNG, JPEG, WebP, GIF) ਜਾਂ ਟੈਕਸਟ ਫਾਈਲਾਂ (TXT, MD, CSV, JSON, LOG) ਨੱਥੀ ਕਰੋ।",
+ "attachFailed": "{name} ਪੜ੍ਹਿਆ ਨਹੀਂ ਜਾ ਸਕਿਆ।",
+ "noVisionBadge": "ਚਿੱਤਰ ਨਹੀਂ",
+ "visionWarning": "{model} ਚਿੱਤਰ ਸਵੀਕਾਰ ਨਹੀਂ ਕਰਦਾ। ਚਿੱਤਰ ਇੰਪੁੱਟ ਸਵੀਕਾਰ ਕਰਨ ਵਾਲਾ ਮਾਡਲ ਜਾਂ ਆਟੋ ਚੁਣੋ।"
},
"embeddings": {
"title": "ਮਾਡਲ",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index c51d08be..7f115f9f 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -506,7 +506,14 @@
"errorPrefix": "Błąd:",
"systemPromptLabel": "Monit systemowy",
"systemPromptPlaceholder": "Opcjonalne. Wysłane jako wiadomość systemowa przed rozmową.",
- "errorTitle": "Żądanie nie powiodło się"
+ "errorTitle": "Żądanie nie powiodło się",
+ "attach": "Załącz pliki",
+ "attachTooMany": "W jednej wiadomości możesz załączyć maksymalnie {count} plików.",
+ "attachTooLarge": "Plik {name} jest za duży. Limit to {max}.",
+ "attachUnsupported": "{name} nie jest obsługiwany. Załącz obrazy (PNG, JPEG, WebP, GIF) lub pliki tekstowe (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Nie udało się odczytać pliku {name}.",
+ "noVisionBadge": "Bez obrazów",
+ "visionWarning": "{model} nie przyjmuje obrazów. Wybierz model obsługujący obrazy lub Auto."
},
"embeddings": {
"title": "Modele",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index ad40b508..e61d255c 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -506,7 +506,14 @@
"errorPrefix": "Erro:",
"systemPromptLabel": "Prompt do sistema",
"systemPromptPlaceholder": "Opcional. Enviado como uma mensagem de sistema antes do seu chat.",
- "errorTitle": "A solicitação falhou"
+ "errorTitle": "A solicitação falhou",
+ "attach": "Anexar arquivos",
+ "attachTooMany": "Você pode anexar até {count} arquivos por mensagem.",
+ "attachTooLarge": "{name} é muito grande. O limite é {max}.",
+ "attachUnsupported": "{name} não é compatível. Anexe imagens (PNG, JPEG, WebP, GIF) ou arquivos de texto (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Não foi possível ler {name}.",
+ "noVisionBadge": "Sem imagens",
+ "visionWarning": "{model} não aceita imagens. Escolha um modelo de visão ou Auto."
},
"embeddings": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 6ffab74a..55a8a2c8 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -506,7 +506,14 @@
"errorPrefix": "Erro:",
"systemPromptLabel": "Prompt do sistema",
"systemPromptPlaceholder": "Opcional. Enviado como mensagem do sistema antes do teu chat.",
- "errorTitle": "Pedido falhado"
+ "errorTitle": "Pedido falhado",
+ "attach": "Anexar ficheiros",
+ "attachTooMany": "Pode anexar até {count} ficheiros por mensagem.",
+ "attachTooLarge": "{name} é demasiado grande. O limite é {max}.",
+ "attachUnsupported": "{name} não é suportado. Anexe imagens (PNG, JPEG, WebP, GIF) ou ficheiros de texto (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Não foi possível ler {name}.",
+ "noVisionBadge": "Sem imagens",
+ "visionWarning": "{model} não aceita imagens. Escolha um modelo de visão ou Auto."
},
"embeddings": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index e89c44cd..2c2e7fcb 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -506,7 +506,14 @@
"errorPrefix": "Eroare:",
"systemPromptLabel": "Prompt de sistem",
"systemPromptPlaceholder": "Opțional. Trimis ca mesaj de sistem înainte de chat.",
- "errorTitle": "Cerere eșuată"
+ "errorTitle": "Cerere eșuată",
+ "attach": "Atașează fișiere",
+ "attachTooMany": "Poți atașa cel mult {count} fișiere per mesaj.",
+ "attachTooLarge": "{name} este prea mare. Limita este {max}.",
+ "attachUnsupported": "{name} nu este acceptat. Atașează imagini (PNG, JPEG, WebP, GIF) sau fișiere text (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Nu s-a putut citi {name}.",
+ "noVisionBadge": "Fără imagini",
+ "visionWarning": "{model} nu acceptă imagini. Alege un model cu suport pentru imagini sau Auto."
},
"embeddings": {
"title": "Modele",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index acc57ddf..3b8ad01d 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -506,7 +506,14 @@
"errorPrefix": "Ошибка:",
"systemPromptLabel": "Системная подсказка",
"systemPromptPlaceholder": "Необязательно. Отправляется как системное сообщение перед вашим чатом.",
- "errorTitle": "Запрос не выполнен"
+ "errorTitle": "Запрос не выполнен",
+ "attach": "Прикрепить файлы",
+ "attachTooMany": "К одному сообщению можно прикрепить не более {count} файлов.",
+ "attachTooLarge": "Файл {name} слишком большой. Лимит — {max}.",
+ "attachUnsupported": "{name} не поддерживается. Прикрепите изображения (PNG, JPEG, WebP, GIF) или текстовые файлы (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Не удалось прочитать {name}.",
+ "noVisionBadge": "Без изображений",
+ "visionWarning": "{model} не принимает изображения. Выберите модель с поддержкой изображений или «Авто»."
},
"embeddings": {
"title": "Модели",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index 4357835b..87eb6887 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -506,7 +506,14 @@
"errorPrefix": "දෝෂය:",
"systemPromptLabel": "පද්ධති විමසුම",
"systemPromptPlaceholder": "විකල්ප. ඔබගේ කතාබස් කිරීමට පෙර පද්ධති පණිවිඩයක් ලෙස යවන ලදී.",
- "errorTitle": "ඉල්ලීම අසාර්ථක විය"
+ "errorTitle": "ඉල්ලීම අසාර්ථක විය",
+ "attach": "ගොනු අමුණන්න",
+ "attachTooMany": "එක් පණිවිඩයකට ගොනු {count}ක් දක්වා අමුණා ගත හැක.",
+ "attachTooLarge": "{name} ඉතා විශාලයි. සීමාව {max} වේ.",
+ "attachUnsupported": "{name} සඳහා සහාය නොදක්වයි. රූප (PNG, JPEG, WebP, GIF) හෝ පෙළ ගොනු (TXT, MD, CSV, JSON, LOG) අමුණන්න.",
+ "attachFailed": "{name} කියවිය නොහැකි විය.",
+ "noVisionBadge": "රූප නැත",
+ "visionWarning": "{model} රූප පිළිගන්නේ නැත. රූප පිළිගන්නා ආකෘතියක් හෝ ස්වයංක්‍රීය තෝරන්න."
},
"embeddings": {
"title": "ආකෘති",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index b3dca1da..28d0a241 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -506,7 +506,14 @@
"errorPrefix": "Chyba:",
"systemPromptLabel": "Systémový prompt",
"systemPromptPlaceholder": "Voliteľné. Odoslaná ako systémová správa pred vaším chatom.",
- "errorTitle": "Žiadosť zlyhala"
+ "errorTitle": "Žiadosť zlyhala",
+ "attach": "Priložiť súbory",
+ "attachTooMany": "K jednej správe môžete priložiť najviac {count} súborov.",
+ "attachTooLarge": "Súbor {name} je príliš veľký. Limit je {max}.",
+ "attachUnsupported": "Súbor {name} nie je podporovaný. Priložte obrázky (PNG, JPEG, WebP, GIF) alebo textové súbory (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Súbor {name} sa nepodarilo prečítať.",
+ "noVisionBadge": "Bez obrázkov",
+ "visionWarning": "Model {model} neprijíma obrázky. Vyberte model s podporou obrázkov alebo Auto."
},
"embeddings": {
"title": "Modely",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index c39fe931..cfa02b24 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -506,7 +506,14 @@
"errorPrefix": "Грешка:",
"systemPromptLabel": "Системски промпт",
"systemPromptPlaceholder": "Опционо. Послато као системска порука пре вашег ћаскања.",
- "errorTitle": "Захтев није успео"
+ "errorTitle": "Захтев није успео",
+ "attach": "Приложи датотеке",
+ "attachTooMany": "По поруци можете приложити највише {count} датотека.",
+ "attachTooLarge": "Датотека {name} је превелика. Ограничење је {max}.",
+ "attachUnsupported": "Датотека {name} није подржана. Приложите слике (PNG, JPEG, WebP, GIF) или текстуалне датотеке (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Није могуће прочитати датотеку {name}.",
+ "noVisionBadge": "Без слика",
+ "visionWarning": "Модел {model} не прихвата слике. Изаберите модел са визијом или Ауто."
},
"embeddings": {
"title": "Модели",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index 689debf2..f1f7e858 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -506,7 +506,14 @@
"errorPrefix": "Fel:",
"systemPromptLabel": "Systemprompt",
"systemPromptPlaceholder": "Valfritt. Skickat som ett systemmeddelande innan din chatt.",
- "errorTitle": "Begäran avvisades"
+ "errorTitle": "Begäran avvisades",
+ "attach": "Bifoga filer",
+ "attachTooMany": "Du kan bifoga upp till {count} filer per meddelande.",
+ "attachTooLarge": "{name} är för stor. Gränsen är {max}.",
+ "attachUnsupported": "{name} stöds inte. Bifoga bilder (PNG, JPEG, WebP, GIF) eller textfiler (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Kunde inte läsa {name}.",
+ "noVisionBadge": "Inga bilder",
+ "visionWarning": "{model} accepterar inte bilder. Välj en modell med bildstöd eller Auto."
},
"embeddings": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index 7e2a63f5..4c593e0d 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -506,7 +506,14 @@
"errorPrefix": "Hitilafu:",
"systemPromptLabel": "Agizo la mfumo",
"systemPromptPlaceholder": "Hiari. Imetumwa kama ujumbe wa mfumo kabla ya gumzo lako.",
- "errorTitle": "Ombi halijafaulu"
+ "errorTitle": "Ombi halijafaulu",
+ "attach": "Ambatisha faili",
+ "attachTooMany": "Unaweza kuambatisha hadi faili {count} kwa kila ujumbe.",
+ "attachTooLarge": "{name} ni kubwa mno. Kikomo ni {max}.",
+ "attachUnsupported": "{name} haitumiki. Ambatisha picha (PNG, JPEG, WebP, GIF) au faili za maandishi (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Imeshindwa kusoma {name}.",
+ "noVisionBadge": "Hakuna picha",
+ "visionWarning": "{model} haikubali picha. Chagua muundo wa maono au Otomatiki."
},
"embeddings": {
"title": "Mifano",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index 5d9ad9b7..dd77b126 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -506,7 +506,14 @@
"errorPrefix": "பிழை:",
"systemPromptLabel": "சிஸ்டம் ப்ராம்ட்",
"systemPromptPlaceholder": "விருப்பமானது. உங்கள் அரட்டைக்கு முன் கணினி செய்தியாக அனுப்பப்பட்டது.",
- "errorTitle": "கோரிக்கை தோல்வியடைந்தது"
+ "errorTitle": "கோரிக்கை தோல்வியடைந்தது",
+ "attach": "கோப்புகளை இணைக்கவும்",
+ "attachTooMany": "ஒரு செய்திக்கு அதிகபட்சம் {count} கோப்புகளை இணைக்கலாம்.",
+ "attachTooLarge": "{name} மிகவும் பெரியது. வரம்பு {max}.",
+ "attachUnsupported": "{name} ஆதரிக்கப்படவில்லை. படங்களை (PNG, JPEG, WebP, GIF) அல்லது உரைக் கோப்புகளை (TXT, MD, CSV, JSON, LOG) இணைக்கவும்.",
+ "attachFailed": "{name} ஐப் படிக்க முடியவில்லை.",
+ "noVisionBadge": "படங்கள் இல்லை",
+ "visionWarning": "{model} படங்களை ஏற்காது. பட உள்ளீட்டை ஏற்கும் மாதிரியை அல்லது ஆட்டோ என்பதைத் தேர்ந்தெடுக்கவும்."
},
"embeddings": {
"title": "மாதிரிகள்",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index ca7f8c0c..a8092b1e 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -506,7 +506,14 @@
"errorPrefix": "లోపం:",
"systemPromptLabel": "సిస్టమ్ ప్రాంప్ట్",
"systemPromptPlaceholder": "ఐచ్ఛికం. మీ చాట్‌కు ముందు సిస్టమ్ సందేశంగా పంపబడింది.",
- "errorTitle": "అభ్యర్థన విఫలమైంది"
+ "errorTitle": "అభ్యర్థన విఫలమైంది",
+ "attach": "ఫైల్‌లను జోడించండి",
+ "attachTooMany": "ఒక్కో సందేశానికి మీరు గరిష్టంగా {count} ఫైల్‌లను జోడించవచ్చు.",
+ "attachTooLarge": "{name} చాలా పెద్దది. పరిమితి {max}.",
+ "attachUnsupported": "{name} మద్దతు లేదు. చిత్రాలను (PNG, JPEG, WebP, GIF) లేదా టెక్స్ట్ ఫైల్‌లను (TXT, MD, CSV, JSON, LOG) జోడించండి.",
+ "attachFailed": "{name} చదవడం సాధ్యం కాలేదు.",
+ "noVisionBadge": "చిత్రాలు లేవు",
+ "visionWarning": "{model} చిత్రాలను అంగీకరించదు. చిత్రాలకు మద్దతిచ్చే మోడల్‌ని లేదా ఆటో ఎంచుకోండి."
},
"embeddings": {
"title": "మోడల్స్",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index e05b4b43..29f98803 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -506,7 +506,14 @@
"errorPrefix": "ข้อผิดพลาด:",
"systemPromptLabel": "พร้อมท์ระบบ",
"systemPromptPlaceholder": "ไม่จำเป็น ส่งเป็นข้อความระบบก่อนการแชทของคุณ",
- "errorTitle": "คำขอล้มเหลว"
+ "errorTitle": "คำขอล้มเหลว",
+ "attach": "แนบไฟล์",
+ "attachTooMany": "คุณแนบไฟล์ได้สูงสุด {count} ไฟล์ต่อหนึ่งข้อความ",
+ "attachTooLarge": "{name} มีขนาดใหญ่เกินไป ขีดจำกัดคือ {max}",
+ "attachUnsupported": "{name} ไม่รองรับ กรุณาแนบรูปภาพ (PNG, JPEG, WebP, GIF) หรือไฟล์ข้อความ (TXT, MD, CSV, JSON, LOG)",
+ "attachFailed": "ไม่สามารถอ่าน {name} ได้",
+ "noVisionBadge": "ไม่รับรูปภาพ",
+ "visionWarning": "{model} ไม่รองรับรูปภาพ เลือกโมเดลที่รองรับรูปภาพหรืออัตโนมัติ"
},
"embeddings": {
"title": "โมเดล",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index 782830a2..5b548974 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -506,7 +506,14 @@
"errorPrefix": "Error:",
"systemPromptLabel": "System prompt",
"systemPromptPlaceholder": "Opsyonal. Ipinadala bilang system message bago ang iyong chat.",
- "errorTitle": "Nabigo ang kahilingan"
+ "errorTitle": "Nabigo ang kahilingan",
+ "attach": "Maglakip ng mga file",
+ "attachTooMany": "Puwede kang maglakip ng hanggang {count} file kada mensahe.",
+ "attachTooLarge": "Masyadong malaki ang {name}. Ang limitasyon ay {max}.",
+ "attachUnsupported": "Hindi suportado ang {name}. Maglakip ng mga larawan (PNG, JPEG, WebP, GIF) o mga text file (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Hindi mabasa ang {name}.",
+ "noVisionBadge": "Walang larawan",
+ "visionWarning": "Hindi tumatanggap ng larawan ang {model}. Pumili ng modelong tumatanggap ng larawan o Auto."
},
"embeddings": {
"title": "Mga Modelo",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index d2a569bd..560be136 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -506,7 +506,14 @@
"errorPrefix": "Hata:",
"systemPromptLabel": "Sistem istemi",
"systemPromptPlaceholder": "İsteğe bağlı. Sohbetinizden önce sistem mesajı olarak gönderilir.",
- "errorTitle": "İstek başarısız oldu"
+ "errorTitle": "İstek başarısız oldu",
+ "attach": "Dosya ekle",
+ "attachTooMany": "Her mesajda en fazla {count} dosya ekleyebilirsiniz.",
+ "attachTooLarge": "{name} çok büyük. Sınır {max}.",
+ "attachUnsupported": "{name} desteklenmiyor. Görüntü (PNG, JPEG, WebP, GIF) veya metin dosyaları (TXT, MD, CSV, JSON, LOG) ekleyin.",
+ "attachFailed": "{name} okunamadı.",
+ "noVisionBadge": "Görüntü yok",
+ "visionWarning": "{model} görüntü kabul etmiyor. Görüntü destekleyen bir model veya Otomatik seçin."
},
"embeddings": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index e1f3ad18..87f9bfff 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -506,7 +506,14 @@
"errorPrefix": "Помилка:",
"systemPromptLabel": "Системна підказка",
"systemPromptPlaceholder": "Додатково. Надсилається як системне повідомлення перед вашим чатом.",
- "errorTitle": "Запит не виконано"
+ "errorTitle": "Запит не виконано",
+ "attach": "Прикріпити файли",
+ "attachTooMany": "До одного повідомлення можна прикріпити не більше {count} файлів.",
+ "attachTooLarge": "Файл {name} завеликий. Обмеження — {max}.",
+ "attachUnsupported": "{name} не підтримується. Прикріпіть зображення (PNG, JPEG, WebP, GIF) або текстові файли (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Не вдалося прочитати {name}.",
+ "noVisionBadge": "Без зображень",
+ "visionWarning": "{model} не приймає зображення. Виберіть модель із підтримкою зображень або «Авто»."
},
"embeddings": {
"title": "Моделі",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index 9e28cd09..a6c26a40 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -506,7 +506,14 @@
"errorPrefix": "خرابی:",
"systemPromptLabel": "سسٹم پرامپٹ",
"systemPromptPlaceholder": "اختیاری آپ کی چیٹ سے پہلے سسٹم پیغام کے طور پر بھیجا گیا۔",
- "errorTitle": "درخواست ناکام ہوگئی"
+ "errorTitle": "درخواست ناکام ہوگئی",
+ "attach": "فائلیں منسلک کریں۔",
+ "attachTooMany": "آپ فی پیغام زیادہ سے زیادہ {count} فائلیں منسلک کر سکتے ہیں۔",
+ "attachTooLarge": "{name} بہت بڑی ہے۔ حد {max} ہے۔",
+ "attachUnsupported": "{name} سپورٹڈ نہیں ہے۔ تصاویر (PNG، JPEG، WebP، GIF) یا ٹیکسٹ فائلیں (TXT، MD، CSV، JSON، LOG) منسلک کریں۔",
+ "attachFailed": "{name} کو پڑھا نہیں جا سکا۔",
+ "noVisionBadge": "تصاویر نہیں",
+ "visionWarning": "{model} تصاویر قبول نہیں کرتا۔ کوئی وژن ماڈل یا آٹو منتخب کریں۔"
},
"embeddings": {
"title": "ماڈلز",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index 10bcd9d5..8743e1de 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -506,7 +506,14 @@
"errorPrefix": "Xato:",
"systemPromptLabel": "Tizim so'rovi",
"systemPromptPlaceholder": "Ixtiyoriy. Suhbatingizdan oldin tizim xabari sifatida yuborilgan.",
- "errorTitle": "So‘rov bajarilmadi"
+ "errorTitle": "So‘rov bajarilmadi",
+ "attach": "Fayllarni biriktirish",
+ "attachTooMany": "Har bir xabarga koʻpi bilan {count} ta fayl biriktirishingiz mumkin.",
+ "attachTooLarge": "{name} juda katta. Cheklov: {max}.",
+ "attachUnsupported": "{name} qoʻllab-quvvatlanmaydi. Rasm (PNG, JPEG, WebP, GIF) yoki matnli fayl (TXT, MD, CSV, JSON, LOG) biriktiring.",
+ "attachFailed": "{name} oʻqib boʻlmadi.",
+ "noVisionBadge": "Rasmsiz",
+ "visionWarning": "{model} rasmlarni qabul qilmaydi. Rasmni qoʻllaydigan model yoki Avtomatik variantini tanlang."
},
"embeddings": {
"title": "Modellar",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index b6c9be6a..ed8bcee3 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -506,7 +506,14 @@
"errorPrefix": "Lỗi:",
"systemPromptLabel": "Lời nhắc hệ thống",
"systemPromptPlaceholder": "Tùy chọn. Được gửi dưới dạng tin nhắn hệ thống trước cuộc trò chuyện của bạn.",
- "errorTitle": "Yêu cầu không thành công"
+ "errorTitle": "Yêu cầu không thành công",
+ "attach": "Đính kèm tệp",
+ "attachTooMany": "Bạn có thể đính kèm tối đa {count} tệp cho mỗi tin nhắn.",
+ "attachTooLarge": "{name} quá lớn. Giới hạn là {max}.",
+ "attachUnsupported": "{name} không được hỗ trợ. Hãy đính kèm hình ảnh (PNG, JPEG, WebP, GIF) hoặc tệp văn bản (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "Không thể đọc {name}.",
+ "noVisionBadge": "Không hình ảnh",
+ "visionWarning": "{model} không chấp nhận hình ảnh. Hãy chọn một mô hình hỗ trợ hình ảnh hoặc Tự động."
},
"embeddings": {
"title": "Người mẫu",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index b57c6478..3bcba6c8 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -506,7 +506,14 @@
"errorPrefix": "Asise:",
"systemPromptLabel": "Ilana eto",
"systemPromptPlaceholder": "iyan. Ti firanṣẹ bi ifiranṣẹ eto ṣaaju iwiregbe rẹ.",
- "errorTitle": "Ibere kuna"
+ "errorTitle": "Ibere kuna",
+ "attach": "Somọ awọn faili",
+ "attachTooMany": "O le somọ to awọn faili {count} fun ifiranṣẹ kọọkan.",
+ "attachTooLarge": "{name} tobi ju. Ààlà ni {max}.",
+ "attachUnsupported": "A ko ṣe atilẹyin fun {name}. Somọ awọn aworan (PNG, JPEG, WebP, GIF) tabi awọn faili ọrọ (TXT, MD, CSV, JSON, LOG).",
+ "attachFailed": "A ko le ka {name}.",
+ "noVisionBadge": "Ko si aworan",
+ "visionWarning": "{model} ko gba aworan. Yan awoṣe ti o gba aworan tabi Aifọwọyi."
},
"embeddings": {
"title": "Awọn awoṣe",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index c1ae9447..684b13ff 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -506,7 +506,14 @@
"errorPrefix": "错误:",
"systemPromptLabel": "系统提示词",
"systemPromptPlaceholder": "可选。作为系统消息在你的对话之前发送。",
- "errorTitle": "请求失败"
+ "errorTitle": "请求失败",
+ "attach": "附加文件",
+ "attachTooMany": "每条消息最多可附加 {count} 个文件。",
+ "attachTooLarge": "{name} 太大了。上限为 {max}。",
+ "attachUnsupported": "不支持 {name}。请附加图像(PNG、JPEG、WebP、GIF)或文本文件(TXT、MD、CSV、JSON、LOG)。",
+ "attachFailed": "无法读取 {name}。",
+ "noVisionBadge": "无图像",
+ "visionWarning": "{model} 不接受图像。请选择视觉模型或「自动」。"
},
"embeddings": {
"title": "模型",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index e26a92da..7f6ccba9 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -506,7 +506,14 @@
"errorPrefix": "錯誤:",
"systemPromptLabel": "系統提示",
"systemPromptPlaceholder": "可選的。在聊天前以系統訊息形式發送。",
- "errorTitle": "申請失敗"
+ "errorTitle": "申請失敗",
+ "attach": "附加檔案",
+ "attachTooMany": "每則訊息最多可附加 {count} 個檔案。",
+ "attachTooLarge": "{name} 太大了。上限為 {max}。",
+ "attachUnsupported": "{name} 不受支援。請附加圖片(PNG、JPEG、WebP、GIF)或文字檔案(TXT、MD、CSV、JSON、LOG)。",
+ "attachFailed": "無法讀取 {name}。",
+ "noVisionBadge": "無圖片",
+ "visionWarning": "{model} 不接受圖片。請選擇支援影像輸入的模型或「自動」。"
},
"embeddings": {
"title": "型號",
diff --git a/client/src/lib/attachments.test.ts b/client/src/lib/attachments.test.ts
new file mode 100644
index 00000000..3e96da14
--- /dev/null
+++ b/client/src/lib/attachments.test.ts
@@ -0,0 +1,123 @@
+import { describe, it, expect } from 'vitest'
+import {
+ MAX_IMAGE_EDGE,
+ attachmentImages,
+ classifyFile,
+ composeText,
+ dataUrlBytes,
+ fenceLanguage,
+ fitWithin,
+ inlineTextAttachment,
+ toMessageContent,
+ type Attachment,
+} from './attachments'
+
+/** What PlaygroundPage sends: the composed text plus its image data URIs. */
+const contentFor = (text: string, attachments: Attachment[] = []) =>
+ toMessageContent(composeText(text, attachments), attachmentImages(attachments))
+
+const png = (name = 'shot.png'): Attachment => ({
+ id: name, kind: 'image', name, dataUrl: 'data:image/png;base64,iVBORw0KGgo=',
+})
+
+describe('classifyFile', () => {
+ it('accepts the four image types the composer offers', () => {
+ for (const type of ['image/png', 'image/jpeg', 'image/webp', 'image/gif']) {
+ expect(classifyFile({ name: 'a.bin', type })).toBe('image')
+ }
+ })
+
+ it('accepts text-like files by extension even when the browser reports no MIME type', () => {
+ for (const name of ['notes.txt', 'README.md', 'rows.csv', 'rows.tsv', 'body.json', 'server.log']) {
+ expect(classifyFile({ name, type: '' })).toBe('text')
+ }
+ })
+
+ it('rejects the document formats left for the follow-up', () => {
+ expect(classifyFile({ name: 'book.xlsx', type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })).toBeNull()
+ expect(classifyFile({ name: 'paper.pdf', type: 'application/pdf' })).toBeNull()
+ expect(classifyFile({ name: 'archive.zip', type: 'application/zip' })).toBeNull()
+ expect(classifyFile({ name: 'clip.mp4', type: 'video/mp4' })).toBeNull()
+ })
+})
+
+describe('fitWithin', () => {
+ it('never scales up', () => {
+ expect(fitWithin(320, 200)).toEqual({ width: 320, height: 200 })
+ })
+
+ it('caps the longest edge and preserves the aspect ratio', () => {
+ expect(fitWithin(4000, 2000)).toEqual({ width: MAX_IMAGE_EDGE, height: MAX_IMAGE_EDGE / 2 })
+ expect(fitWithin(2000, 4000)).toEqual({ width: MAX_IMAGE_EDGE / 2, height: MAX_IMAGE_EDGE })
+ })
+})
+
+describe('inlineTextAttachment', () => {
+ it('labels the block with the filename and a language hint', () => {
+ expect(fenceLanguage('rows.csv')).toBe('csv')
+ expect(inlineTextAttachment('rows.csv', 'a,b\n1,2')).toBe('rows.csv:\n```csv\na,b\n1,2\n```')
+ })
+
+ it('widens the fence so a markdown file cannot break out of it', () => {
+ const inlined = inlineTextAttachment('doc.md', 'text\n```js\ncode()\n```')
+ expect(inlined.startsWith('doc.md:\n````markdown\n')).toBe(true)
+ expect(inlined.endsWith('\n````')).toBe(true)
+ })
+})
+
+describe('message content', () => {
+ it('stays a plain string when nothing is attached', () => {
+ expect(contentFor('hello')).toBe('hello')
+ expect(contentFor('hello', [])).toBe('hello')
+ })
+
+ it('inlines text files into the string, still without an array envelope', () => {
+ expect(contentFor('summarize', [
+ { id: '1', kind: 'text', name: 'notes.txt', text: 'line one' },
+ ])).toBe('summarize\n\nnotes.txt:\n```text\nline one\n```')
+ })
+
+ it('emits the OpenAI multimodal array once an image is attached', () => {
+ expect(contentFor('what is this?', [png()])).toEqual([
+ { type: 'text', text: 'what is this?' },
+ { type: 'image_url', image_url: { url: 'data:image/png;base64,iVBORw0KGgo=' } },
+ ])
+ })
+
+ it('omits the text part when the message is images only', () => {
+ expect(contentFor(' ', [png()])).toEqual([
+ { type: 'image_url', image_url: { url: 'data:image/png;base64,iVBORw0KGgo=' } },
+ ])
+ })
+
+ it('keeps every image, in attach order, alongside inlined text files', () => {
+ const content = contentFor('compare', [
+ png('a.png'),
+ { id: 't', kind: 'text', name: 'notes.md', text: 'ctx' },
+ png('b.png'),
+ ]) as Exclude<ReturnType<typeof contentFor>, string>
+ expect(content.map(p => p.type)).toEqual(['text', 'image_url', 'image_url'])
+ expect((content[0] as { text: string }).text).toBe('compare\n\nnotes.md:\n```markdown\nctx\n```')
+ })
+
+ it('drops images that never finished encoding', () => {
+ expect(contentFor('hi', [{ id: 'x', kind: 'image', name: 'x.png' }])).toBe('hi')
+ })
+
+ it('rebuilds history turns from the stored text + image URIs', () => {
+ // How PlaygroundPage replays earlier turns: the transcript keeps the text
+ // and the data URIs, and the request envelope is rebuilt from them.
+ expect(toMessageContent('earlier turn', ['data:image/jpeg;base64,zz'])).toEqual([
+ { type: 'text', text: 'earlier turn' },
+ { type: 'image_url', image_url: { url: 'data:image/jpeg;base64,zz' } },
+ ])
+ expect(toMessageContent('plain turn')).toBe('plain turn')
+ })
+})
+
+describe('dataUrlBytes', () => {
+ it('measures the decoded payload, not the URI', () => {
+ // 4 base64 chars per 3 bytes; the "data:...;base64," prefix is excluded.
+ expect(dataUrlBytes(`data:image/png;base64,${'A'.repeat(400)}`)).toBe(300)
+ })
+})
diff --git a/client/src/lib/attachments.ts b/client/src/lib/attachments.ts
new file mode 100644
index 00000000..015ae8e1
--- /dev/null
+++ b/client/src/lib/attachments.ts
@@ -0,0 +1,200 @@
+// Playground file attachments (#325). Two kinds only, on purpose:
+//
+// - images (png/jpeg/webp/gif) → downscaled in the browser and sent as an
+// OpenAI `image_url` data-URI content part, which the server already
+// accepts and routes to a vision-capable model (server/src/lib/content.ts).
+// - text-like files (txt/md/csv/tsv/json/log) → inlined into the message text
+// as a fenced block labelled with the filename.
+//
+// Binary documents (pdf/xlsx/docx) are deliberately NOT handled here: extracting
+// their text needs a parser, and that is a separate piece of work.
+//
+// The caps below exist because every request leaves through a FREE-TIER
+// provider: base64 images inflate the prompt ~33%, and free tiers have small
+// per-request body limits and tight token budgets. They are intentionally
+// conservative — a 1024px edge is enough for a model to read a screenshot.
+
+/** Longest edge, in pixels, an attached image is downscaled to. */
+export const MAX_IMAGE_EDGE = 1024
+/** Cap for one encoded image data URI (~1.2 MB ≈ 0.9 MB of pixels). */
+export const MAX_IMAGE_BYTES = 1_200_000
+/** Cap for all images on a single message. */
+export const MAX_TOTAL_IMAGE_BYTES = 3_000_000
+/** Cap for one text-like file, before inlining it into the prompt. */
+export const MAX_TEXT_BYTES = 128_000
+/** Attachments allowed on a single message. */
+export const MAX_ATTACHMENTS = 5
+
+export const IMAGE_MIME_TYPES = ['image/png', 'image/jpeg', 'image/webp', 'image/gif']
+export const TEXT_EXTENSIONS = ['txt', 'md', 'markdown', 'csv', 'tsv', 'json', 'log']
+
+/** `accept` for the file input — mirrors what classifyFile() lets through. */
+export const ACCEPT_ATTRIBUTE = [...IMAGE_MIME_TYPES, ...TEXT_EXTENSIONS.map(e => `.${e}`)].join(',')
+
+export type AttachmentKind = 'image' | 'text'
+
+export interface Attachment {
+ id: string
+ kind: AttachmentKind
+ name: string
+ /** Downscaled data URI — images only. */
+ dataUrl?: string
+ /** Decoded UTF-8 contents — text-like files only. */
+ text?: string
+}
+
+/** OpenAI multimodal content parts, exactly as the proxy expects them. */
+export type ContentPart =
+ | { type: 'text'; text: string }
+ | { type: 'image_url'; image_url: { url: string } }
+
+export function fileExtension(name: string): string {
+ const dot = name.lastIndexOf('.')
+ return dot === -1 ? '' : name.slice(dot + 1).toLowerCase()
+}
+
+// Type sniffing is extension-first because browsers report inconsistent MIME
+// types for text-like files (empty string for .md, application/vnd.ms-excel for
+// .csv on Windows). Anything we don't recognize is rejected loudly rather than
+// guessed at.
+export function classifyFile(file: { name: string; type?: string }): AttachmentKind | null {
+ const type = (file.type ?? '').toLowerCase()
+ if (IMAGE_MIME_TYPES.includes(type)) return 'image'
+ const ext = fileExtension(file.name)
+ if (TEXT_EXTENSIONS.includes(ext)) return 'text'
+ if (!type && ext === '') return null
+ if (type.startsWith('text/')) return 'text'
+ if (type === 'application/json') return 'text'
+ return null
+}
+
+/** Scale (w, h) down so the longest edge is at most `maxEdge`; never scales up. */
+export function fitWithin(width: number, height: number, maxEdge = MAX_IMAGE_EDGE): { width: number; height: number } {
+ const longest = Math.max(width, height)
+ if (longest <= maxEdge) return { width, height }
+ const scale = maxEdge / longest
+ return {
+ width: Math.max(1, Math.round(width * scale)),
+ height: Math.max(1, Math.round(height * scale)),
+ }
+}
+
+const FENCE_LANGUAGE: Record<string, string> = {
+ md: 'markdown', markdown: 'markdown', json: 'json', csv: 'csv', tsv: 'tsv', log: 'text', txt: 'text',
+}
+
+export function fenceLanguage(name: string): string {
+ return FENCE_LANGUAGE[fileExtension(name)] ?? 'text'
+}
+
+// Inlined as a fenced block so the model sees the filename AND a boundary; the
+// fence is widened past any run of backticks inside the file so pasted markdown
+// can't break out of it.
+export function inlineTextAttachment(name: string, text: string): string {
+ const longestRun = Math.max(0, ...[...text.matchAll(/`+/g)].map(m => m[0].length))
+ const fence = '`'.repeat(Math.max(3, longestRun + 1))
+ return `${name}:\n${fence}${fenceLanguage(name)}\n${text.replace(/\s+$/, '')}\n${fence}`
+}
+
+/**
+ * The user-visible message text: what was typed, followed by one fenced block
+ * per text-like attachment. Text files live in the prompt itself, so the chat
+ * transcript shows exactly what the model was given.
+ */
+export function composeText(text: string, attachments: Attachment[] = []): string {
+ return [
+ text.trim(),
+ ...attachments.filter(a => a.kind === 'text').map(a => inlineTextAttachment(a.name, a.text ?? '')),
+ ].filter(Boolean).join('\n\n')
+}
+
+/** The data URIs of the attachments that made it through image encoding. */
+export function attachmentImages(attachments: Attachment[] = []): string[] {
+ return attachments.flatMap(a => (a.kind === 'image' && a.dataUrl ? [a.dataUrl] : []))
+}
+
+/**
+ * Build the `content` field for a message. Stays a plain string when there are
+ * no images (the shape the Playground has always sent); becomes the OpenAI
+ * multimodal array as soon as one image is attached — which is exactly what
+ * server/src/lib/content.ts normalizes and what the vision router keys on.
+ */
+export function toMessageContent(text: string, images: string[] = []): string | ContentPart[] {
+ if (images.length === 0) return text
+ return [
+ ...(text ? [{ type: 'text' as const, text }] : []),
+ ...images.map(url => ({ type: 'image_url' as const, image_url: { url } })),
+ ]
+}
+
+/** Approximate decoded byte size of a data URI (base64 is 4 chars per 3 bytes). */
+export function dataUrlBytes(dataUrl: string): number {
+ const comma = dataUrl.indexOf(',')
+ const payload = comma === -1 ? dataUrl : dataUrl.slice(comma + 1)
+ return Math.floor((payload.length * 3) / 4)
+}
+
+export function formatBytes(bytes: number): string {
+ if (bytes >= 1_000_000) return `${Math.round(bytes / 100_000) / 10} MB`
+ return `${Math.round(bytes / 1000)} KB`
+}
+
+// ── Browser-only readers ────────────────────────────────────────────────────
+// Kept in this module so the Playground page stays a view: everything below
+// touches the DOM (canvas/FileReader) and is exercised by hand, while the pure
+// helpers above carry the unit tests.
+
+export type AttachmentErrorReason = 'unsupported' | 'too-large' | 'unreadable'
+
+export class AttachmentError extends Error {
+ reason: AttachmentErrorReason
+
+ constructor(reason: AttachmentErrorReason, message?: string) {
+ super(message ?? reason)
+ this.reason = reason
+ }
+}
+
+async function encode(canvas: HTMLCanvasElement, sourceType: string): Promise<string> {
+ // PNG/WebP sources keep an alpha-preserving encode first; if that lands over
+ // the per-image cap we fall back to progressively cheaper JPEG (a flattened
+ // screenshot is far better than a rejected attachment).
+ const attempts: [string, number | undefined][] = sourceType === 'image/png' || sourceType === 'image/webp'
+ ? [['image/png', undefined], ['image/jpeg', 0.82], ['image/jpeg', 0.6]]
+ : [['image/jpeg', 0.82], ['image/jpeg', 0.6]]
+ let last = ''
+ for (const [type, quality] of attempts) {
+ last = canvas.toDataURL(type, quality)
+ if (dataUrlBytes(last) <= MAX_IMAGE_BYTES) return last
+ }
+ throw new AttachmentError('too-large')
+}
+
+/** Downscale an image file to MAX_IMAGE_EDGE and return it as a data URI. */
+export async function readImageAttachment(file: File): Promise<string> {
+ let bitmap: ImageBitmap
+ try {
+ bitmap = await createImageBitmap(file)
+ } catch {
+ throw new AttachmentError('unreadable')
+ }
+ const { width, height } = fitWithin(bitmap.width, bitmap.height)
+ const canvas = document.createElement('canvas')
+ canvas.width = width
+ canvas.height = height
+ const ctx = canvas.getContext('2d')
+ if (!ctx) throw new AttachmentError('unreadable')
+ ctx.drawImage(bitmap, 0, 0, width, height)
+ bitmap.close?.()
+ return encode(canvas, (file.type ?? '').toLowerCase())
+}
+
+/** Read a text-like file, rejecting anything over MAX_TEXT_BYTES. */
+export async function readTextAttachment(file: File): Promise<string> {
+ if (file.size > MAX_TEXT_BYTES) throw new AttachmentError('too-large')
+ try {
+ return await file.text()
+ } catch {
+ throw new AttachmentError('unreadable')
+ }
+}
diff --git a/client/src/pages/PlaygroundPage.tsx b/client/src/pages/PlaygroundPage.tsx
index 5a017790..e8155be9 100644
--- a/client/src/pages/PlaygroundPage.tsx
+++ b/client/src/pages/PlaygroundPage.tsx
@@ -1,6 +1,6 @@
import { useState, useRef, useEffect } from 'react'
import { useQuery } from '@tanstack/react-query'
-import { ChevronRight, CircleAlert } from 'lucide-react'
+import { ChevronRight, CircleAlert, FileText, Paperclip, X } from 'lucide-react'
import { apiFetch } from '@/lib/api'
import { Button } from '@/components/ui/button'
import { ModelCombobox } from '@/components/model-combobox'
@@ -8,6 +8,24 @@ import { buildModelOptions } from '@/lib/model-groups'
import { PageHeader } from '@/components/page-header'
import { Markdown } from '@/components/markdown'
import { CopyButton } from '@/components/copy-button'
+import { toast } from '@/lib/toast'
+import {
+ ACCEPT_ATTRIBUTE,
+ AttachmentError,
+ MAX_ATTACHMENTS,
+ MAX_IMAGE_BYTES,
+ MAX_TEXT_BYTES,
+ MAX_TOTAL_IMAGE_BYTES,
+ attachmentImages,
+ classifyFile,
+ composeText,
+ dataUrlBytes,
+ formatBytes,
+ readImageAttachment,
+ readTextAttachment,
+ toMessageContent,
+ type Attachment,
+} from '@/lib/attachments'
import { useI18n } from '@/i18n'
interface FallbackEntry {
@@ -16,15 +34,20 @@ interface FallbackEntry {
enabled: boolean
platform: string
modelId: string
+ canonicalId?: string
displayName: string
sizeLabel: string
intelligenceRank: number
+ supportsVision: boolean
keyCount: number
}
interface ChatMessage {
role: 'user' | 'assistant'
content: string
+ // Data URIs of the images attached to this turn: rendered as thumbnails in
+ // the bubble and replayed as `image_url` parts on every follow-up request.
+ images?: string[]
// Request-level failure rendered as a distinct error bubble, not a fake
// assistant reply.
isError?: boolean
@@ -131,8 +154,13 @@ export default function PlaygroundPage() {
const [selectedModel, setSelectedModel] = useState<string>(
() => localStorage.getItem('playground.model') ?? 'auto',
)
+ // Files staged for the NEXT message: images already downscaled to a data URI,
+ // text-like files already decoded. Cleared on send. (#325)
+ const [attachments, setAttachments] = useState<Attachment[]>([])
+ const [dragging, setDragging] = useState(false)
const messagesEndRef = useRef<HTMLDivElement>(null)
const inputRef = useRef<HTMLTextAreaElement>(null)
+ const fileInputRef = useRef<HTMLInputElement>(null)
const { data: keyData } = useQuery<{ apiKey: string }>({
queryKey: ['unified-key'],
@@ -153,6 +181,18 @@ export default function PlaygroundPage() {
// canonical id, which the proxy resolves to the whole group).
const modelOptions = buildModelOptions(availableModels, unifyOn)
+ // Picker values that can accept images. A unified option counts as vision-
+ // capable when ANY of its providers is, because routing picks a vision member
+ // for image requests. Auto/Fusion are never flagged: the server picks the
+ // model there (and hard-fails with a clear error if none can see).
+ const visionValues = new Set(
+ availableModels.filter(e => e.supportsVision).map(e => e.canonicalId ?? e.modelId),
+ )
+ const pendingImages = attachmentImages(attachments)
+ const modelBlindToImages = pendingImages.length > 0
+ && selectedModel !== 'auto' && selectedModel !== 'fusion'
+ && !visionValues.has(selectedModel)
+
useEffect(() => {
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' })
}, [messages])
@@ -209,14 +249,67 @@ export default function PlaygroundPage() {
flush(false)
}
+ // Stage dropped/pasted/picked files. Every rejection is reported by name so a
+ // silently missing attachment is impossible; accepted files are added in one
+ // batch after the async reads settle.
+ const addFiles = async (files: File[]) => {
+ if (files.length === 0) return
+ const accepted: Attachment[] = []
+ let imageBytes = pendingImages.reduce((sum, url) => sum + dataUrlBytes(url), 0)
+
+ for (const file of files) {
+ if (attachments.length + accepted.length >= MAX_ATTACHMENTS) {
+ toast.error(t('playground.attachTooMany', { count: MAX_ATTACHMENTS }))
+ break
+ }
+ const kind = classifyFile(file)
+ if (!kind) {
+ toast.error(t('playground.attachUnsupported', { name: file.name }))
+ continue
+ }
+ try {
+ if (kind === 'image') {
+ const dataUrl = await readImageAttachment(file)
+ if (imageBytes + dataUrlBytes(dataUrl) > MAX_TOTAL_IMAGE_BYTES) {
+ toast.error(t('playground.attachTooLarge', { name: file.name, max: formatBytes(MAX_TOTAL_IMAGE_BYTES) }))
+ continue
+ }
+ imageBytes += dataUrlBytes(dataUrl)
+ accepted.push({ id: `${Date.now()}-${accepted.length}-${file.name}`, kind, name: file.name, dataUrl })
+ } else {
+ const text = await readTextAttachment(file)
+ accepted.push({ id: `${Date.now()}-${accepted.length}-${file.name}`, kind, name: file.name, text })
+ }
+ } catch (err) {
+ const reason = err instanceof AttachmentError ? err.reason : 'unreadable'
+ toast.error(reason === 'too-large'
+ ? t('playground.attachTooLarge', {
+ name: file.name,
+ max: formatBytes(kind === 'image' ? MAX_IMAGE_BYTES : MAX_TEXT_BYTES),
+ })
+ : t('playground.attachFailed', { name: file.name }))
+ }
+ }
+ if (accepted.length > 0) setAttachments(prev => [...prev, ...accepted])
+ }
+
+ const removeAttachment = (id: string) => setAttachments(prev => prev.filter(a => a.id !== id))
+
const handleSend = async () => {
const text = input.trim()
- if (!text || loading) return
-
- const userMsg: ChatMessage = { role: 'user', content: text }
+ if ((!text && attachments.length === 0) || loading) return
+
+ // Text-like files are inlined into the prompt; images ride along as data
+ // URIs and become `image_url` parts in the request envelope below.
+ const userMsg: ChatMessage = {
+ role: 'user',
+ content: composeText(text, attachments),
+ ...(pendingImages.length > 0 ? { images: pendingImages } : {}),
+ }
const newMessages = [...messages, userMsg]
setMessages(newMessages)
setInput('')
+ setAttachments([])
setLoading(true)
inputRef.current?.focus()
@@ -229,7 +322,7 @@ export default function PlaygroundPage() {
const body: any = {
messages: [
...(sysPrompt ? [{ role: 'system', content: sysPrompt }] : []),
- ...newMessages.map(m => ({ role: m.role, content: m.content })),
+ ...newMessages.map(m => ({ role: m.role, content: toMessageContent(m.content, m.images) })),
],
}
if (selectedModel !== 'auto') body.model = selectedModel
@@ -311,6 +404,7 @@ export default function PlaygroundPage() {
const handleClear = () => {
setMessages([])
+ setAttachments([])
inputRef.current?.focus()
}
@@ -334,6 +428,11 @@ export default function PlaygroundPage() {
isNew: false,
// Provider names for the multi-provider hover + search; empty when solo.
platforms: o.providerCount > 1 ? o.platforms : [],
+ // With images staged, flag (and dim) the models that can't read them.
+ // Only a hint — sending anyway is allowed and the server decides.
+ note: pendingImages.length > 0 && !visionValues.has(o.value)
+ ? t('playground.noVisionBadge')
+ : undefined,
})),
]
function pickModel(v: string) {
@@ -410,6 +509,13 @@ export default function PlaygroundPage() {
: 'bg-muted'
}`}
>
+ {msg.images && msg.images.length > 0 && (
+ <div className="mb-2 flex flex-wrap gap-1.5">
+ {msg.images.map((src, n) => (
+ <img key={n} src={src} alt="" className="size-20 rounded-lg object-cover" />
+ ))}
+ </div>
+ )}
{msg.isError ? (
<div className="flex items-start gap-2">
<CircleAlert className="mt-0.5 size-4 shrink-0" />
@@ -490,7 +596,16 @@ export default function PlaygroundPage() {
)}
</div>
- <div className="border-t bg-background/50 p-3">
+ <div
+ className={`border-t bg-background/50 p-3 transition-colors ${dragging ? 'bg-primary/5 ring-1 ring-inset ring-primary/40' : ''}`}
+ onDragOver={e => { e.preventDefault(); setDragging(true) }}
+ onDragLeave={e => { if (!e.currentTarget.contains(e.relatedTarget as Node)) setDragging(false) }}
+ onDrop={e => {
+ e.preventDefault()
+ setDragging(false)
+ addFiles([...e.dataTransfer.files])
+ }}
+ >
<div className="mb-2">
<button
type="button"
@@ -511,12 +626,68 @@ export default function PlaygroundPage() {
/>
)}
</div>
+ {attachments.length > 0 && (
+ <div className="mb-2 flex flex-wrap gap-2">
+ {attachments.map(a => (
+ <div key={a.id} className="relative flex items-center gap-1.5 rounded-lg border bg-background py-1 pl-1.5 pr-6 text-xs">
+ {a.kind === 'image' && a.dataUrl
+ ? <img src={a.dataUrl} alt="" className="size-8 rounded object-cover" />
+ : <FileText className="size-4 shrink-0 text-muted-foreground" />}
+ <span className="max-w-[140px] truncate">{a.name}</span>
+ <button
+ type="button"
+ aria-label={t('common.remove')}
+ title={t('common.remove')}
+ onClick={() => removeAttachment(a.id)}
+ className="absolute right-1 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground"
+ >
+ <X className="size-3.5" />
+ </button>
+ </div>
+ ))}
+ </div>
+ )}
+ {modelBlindToImages && (
+ <div className="mb-2 flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400">
+ <CircleAlert className="mt-0.5 size-3.5 shrink-0" />
+ <span>{t('playground.visionWarning', { model: activeModelLabel })}</span>
+ </div>
+ )}
<div className="flex gap-2 items-end">
+ <input
+ ref={fileInputRef}
+ type="file"
+ multiple
+ accept={ACCEPT_ATTRIBUTE}
+ className="hidden"
+ onChange={e => {
+ addFiles([...(e.target.files ?? [])])
+ e.target.value = ''
+ }}
+ />
+ <Button
+ variant="outline"
+ size="icon"
+ onClick={() => fileInputRef.current?.click()}
+ disabled={loading}
+ aria-label={t('playground.attach')}
+ title={t('playground.attach')}
+ >
+ <Paperclip className="size-4" />
+ </Button>
<textarea
ref={inputRef}
value={input}
onChange={e => setInput(e.target.value)}
onKeyDown={handleKeyDown}
+ onPaste={e => {
+ // Screenshot straight from the clipboard; a normal text paste
+ // carries no files and falls through untouched.
+ const files = [...e.clipboardData.files]
+ if (files.length === 0) return
+ e.preventDefault()
+ addFiles(files)
+ }}
placeholder={t('playground.inputPlaceholder')}
rows={1}
className="flex-1 resize-none rounded-lg border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring/50 min-h-[40px] max-h-[160px]"
@@ -527,7 +698,7 @@ export default function PlaygroundPage() {
el.style.height = Math.min(el.scrollHeight, 160) + 'px'
}}
/>
- <Button onClick={handleSend} disabled={loading || !input.trim()} size="default">
+ <Button onClick={handleSend} disabled={loading || (!input.trim() && attachments.length === 0)} size="default">
{loading ? t('playground.sending') : t('playground.send')}
</Button>
</div>
diff --git a/server/src/__tests__/routes/proxy-array-content.test.ts b/server/src/__tests__/routes/proxy-array-content.test.ts
index e3ec7484..d63724fc 100644
--- a/server/src/__tests__/routes/proxy-array-content.test.ts
+++ b/server/src/__tests__/routes/proxy-array-content.test.ts
@@ -132,6 +132,59 @@ describe('OpenAI multimodal array content', () => {
expect(body.choices[0].message.content).toBe('got it');
});
+ // #325: the dashboard Playground attaches files by downscaling images to a
+ // data URI and inlining text-like files as fenced blocks. This pins the exact
+ // envelope it emits, so a change on either side breaks here first.
+ it('round-trips a Playground file-attachment payload to the provider (mocked groq)', async () => {
+ const dataUri = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA==';
+ let upstream: any = null;
+
+ const origFetch = global.fetch;
+ vi.spyOn(global, 'fetch').mockImplementation(async (url, init) => {
+ const urlStr = typeof url === 'string' ? url : url.toString();
+ if (urlStr.includes('api.groq.com/openai/v1/chat/completions')) {
+ upstream = JSON.parse(String((init as RequestInit).body));
+ return {
+ ok: true,
+ json: () => Promise.resolve({
+ id: 'chatcmpl-upload', object: 'chat.completion', created: 1,
+ model: 'meta-llama/llama-4-scout-17b-16e-instruct',
+ choices: [{ index: 0, message: { role: 'assistant', content: 'a red square' }, finish_reason: 'stop' }],
+ usage: { prompt_tokens: 9, completion_tokens: 3, total_tokens: 12 },
+ }),
+ } as any;
+ }
+ return origFetch(url, init);
+ });
+
+ const { status, body } = await request(app, 'POST', '/v1/chat/completions', {
+ model: 'auto',
+ messages: [{
+ role: 'user',
+ content: [
+ { type: 'text', text: 'what colour is it?\n\nnotes.md:\n```markdown\ncontext\n```' },
+ { type: 'image_url', image_url: { url: dataUri } },
+ ],
+ }],
+ }, authHeaders());
+
+ expect(status).toBe(200);
+ expect(body.choices[0].message.content).toBe('a red square');
+
+ // The image survives to the provider verbatim: the router must have picked a
+ // vision-capable model (the precheck 422s otherwise) and the adapter must
+ // forward the block rather than flattening it to text.
+ const routed = getDb()
+ .prepare("SELECT supports_vision FROM models WHERE platform = 'groq' AND model_id = ?")
+ .get(upstream.model) as { supports_vision: number } | undefined;
+ expect(routed?.supports_vision).toBe(1);
+
+ const content = upstream.messages[0].content;
+ expect(Array.isArray(content)).toBe(true);
+ expect(content[0]).toEqual({ type: 'text', text: 'what colour is it?\n\nnotes.md:\n```markdown\ncontext\n```' });
+ expect(content[1]).toEqual({ type: 'image_url', image_url: { url: dataUri } });
+ });
+
it('rejects an empty array as missing content', async () => {
const { status } = await request(app, 'POST', '/v1/chat/completions', {
messages: [], // top-level empty messages