mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(voice): say the attachment limit is 10 KB in total
The attach menu promised up to 10 KB per file, but the attachments share one 10 KB budget, so two 6 KB files were refused. The hint now says the limit covers them all, in every locale.
This commit is contained in:
1 parent
829db19f60
commit
51b561815c
14 files changed
+26
-15
No files matched your search
@@ -737,9 +737,9 @@ Only one mode runs at a time: the microphone closes chat, and opening chat
|
||||
stops voice. Enter sends, Shift+Enter adds a line, and Up or Down at the start
|
||||
of the field recall recent messages and restore the draft. Attachments are up
|
||||
to four map-layer references or UTF-8 TXT, Markdown, CSV, JSON and GeoJSON
|
||||
files, 10 KB each and bounded together, sent only with the message; a layer
|
||||
reference names the layer without exporting its records. The conversation and
|
||||
recent commands stay in memory for the page.
|
||||
files, 10 KB in total, sent only with the message; a layer reference names
|
||||
the layer without exporting its records. The conversation and recent commands
|
||||
stay in memory for the page.
|
||||
|
||||
The chat routes answer a missing key with `503` and code `API_KEY_MISSING`.
|
||||
OpenAI chat can only bill `OPENAI_API_KEY`, so while `GEV_PREFER_CODEX_OAUTH`
|
||||
|
||||
@@ -3321,7 +3321,7 @@
|
||||
"Attach a map layer": "إرفاق طبقة خريطة",
|
||||
"Choose a layer…": "اختر طبقة…",
|
||||
"Attach a file": "إرفاق ملف",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT أو Markdown أو CSV أو JSON أو GeoJSON · حتى 10 كيلوبايت لكل ملف. تُرسل المرفقات إلى مزوّد الذكاء الاصطناعي مع رسالتك.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT أو Markdown أو CSV أو JSON أو GeoJSON · حتى 10 كيلوبايت إجمالًا. تُرسل المرفقات إلى مزوّد الذكاء الاصطناعي مع رسالتك.",
|
||||
"Latest AI response": "أحدث رد من الذكاء الاصطناعي",
|
||||
"Expand conversation": "توسيع المحادثة",
|
||||
"Command suggestions": "اقتراحات الأوامر",
|
||||
|
||||
@@ -3033,7 +3033,7 @@
|
||||
"Attach a map layer": "Kartenebene anhängen",
|
||||
"Choose a layer…": "Ebene wählen…",
|
||||
"Attach a file": "Datei anhängen",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON oder GeoJSON · je bis zu 10 KB. Anhänge werden mit deiner Nachricht an deinen KI-Anbieter gesendet.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON oder GeoJSON · insgesamt bis zu 10 KB. Anhänge werden mit deiner Nachricht an deinen KI-Anbieter gesendet.",
|
||||
"Latest AI response": "Neueste KI-Antwort",
|
||||
"Expand conversation": "Unterhaltung erweitern",
|
||||
"Command suggestions": "Befehlsvorschläge",
|
||||
|
||||
@@ -3108,7 +3108,7 @@
|
||||
"Attach a map layer": "Adjuntar una capa del mapa",
|
||||
"Choose a layer…": "Elige una capa…",
|
||||
"Attach a file": "Adjuntar un archivo",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON o GeoJSON · hasta 10 KB cada uno. Los adjuntos se envían a tu proveedor de IA con el mensaje.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON o GeoJSON · hasta 10 KB en total. Los adjuntos se envían a tu proveedor de IA con el mensaje.",
|
||||
"Latest AI response": "Última respuesta de IA",
|
||||
"Expand conversation": "Expandir conversación",
|
||||
"Command suggestions": "Sugerencias de comandos",
|
||||
|
||||
@@ -3108,7 +3108,7 @@
|
||||
"Attach a map layer": "Joindre une couche de carte",
|
||||
"Choose a layer…": "Choisir une couche…",
|
||||
"Attach a file": "Joindre un fichier",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON ou GeoJSON · 10 Ko max. chacun. Les pièces jointes sont envoyées à votre fournisseur d’IA avec votre message.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON ou GeoJSON · 10 Ko max. au total. Les pièces jointes sont envoyées à votre fournisseur d’IA avec votre message.",
|
||||
"Latest AI response": "Dernière réponse de l’IA",
|
||||
"Expand conversation": "Agrandir la conversation",
|
||||
"Command suggestions": "Suggestions de commandes",
|
||||
|
||||
@@ -3108,7 +3108,7 @@
|
||||
"Attach a map layer": "Allega un livello della mappa",
|
||||
"Choose a layer…": "Scegli un livello…",
|
||||
"Attach a file": "Allega un file",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON o GeoJSON · fino a 10 KB ciascuno. Gli allegati vengono inviati al tuo fornitore di IA insieme al messaggio.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON o GeoJSON · fino a 10 KB in totale. Gli allegati vengono inviati al tuo fornitore di IA insieme al messaggio.",
|
||||
"Latest AI response": "Ultima risposta dell’IA",
|
||||
"Expand conversation": "Espandi conversazione",
|
||||
"Command suggestions": "Suggerimenti di comandi",
|
||||
|
||||
@@ -2958,7 +2958,7 @@
|
||||
"Attach a map layer": "地図レイヤーを添付",
|
||||
"Choose a layer…": "レイヤーを選択…",
|
||||
"Attach a file": "ファイルを添付",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON、GeoJSON · 各 10 KB まで。添付はメッセージとともに AI プロバイダーへ送信されます。",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON、GeoJSON · 合計 10 KB まで。添付はメッセージとともに AI プロバイダーへ送信されます。",
|
||||
"Latest AI response": "最新の AI の応答",
|
||||
"Expand conversation": "会話を展開",
|
||||
"Command suggestions": "コマンドの候補",
|
||||
|
||||
@@ -3108,7 +3108,7 @@
|
||||
"Attach a map layer": "Anexar uma camada do mapa",
|
||||
"Choose a layer…": "Escolha uma camada…",
|
||||
"Attach a file": "Anexar um arquivo",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON ou GeoJSON · até 10 KB cada. Os anexos são enviados ao seu provedor de IA com a sua mensagem.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON ou GeoJSON · até 10 KB no total. Os anexos são enviados ao seu provedor de IA com a sua mensagem.",
|
||||
"Latest AI response": "Última resposta da IA",
|
||||
"Expand conversation": "Expandir conversa",
|
||||
"Command suggestions": "Sugestões de comandos",
|
||||
|
||||
@@ -3183,7 +3183,7 @@
|
||||
"Attach a map layer": "Прикрепить слой карты",
|
||||
"Choose a layer…": "Выберите слой…",
|
||||
"Attach a file": "Прикрепить файл",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON или GeoJSON · до 10 КБ каждый. Вложения отправляются провайдеру ИИ вместе с сообщением.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON или GeoJSON · до 10 КБ в сумме. Вложения отправляются провайдеру ИИ вместе с сообщением.",
|
||||
"Latest AI response": "Последний ответ ИИ",
|
||||
"Expand conversation": "Развернуть разговор",
|
||||
"Command suggestions": "Подсказки команд",
|
||||
|
||||
@@ -3183,7 +3183,7 @@
|
||||
"Attach a map layer": "Прикріпити шар мапи",
|
||||
"Choose a layer…": "Виберіть шар…",
|
||||
"Attach a file": "Прикріпити файл",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON або GeoJSON · до 10 КБ кожен. Вкладення надсилаються вашому постачальнику ШІ разом із повідомленням.",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT, Markdown, CSV, JSON або GeoJSON · до 10 КБ загалом. Вкладення надсилаються вашому постачальнику ШІ разом із повідомленням.",
|
||||
"Latest AI response": "Остання відповідь ШІ",
|
||||
"Expand conversation": "Розгорнути розмову",
|
||||
"Command suggestions": "Підказки команд",
|
||||
|
||||
@@ -2958,7 +2958,7 @@
|
||||
"Attach a map layer": "附加地图图层",
|
||||
"Choose a layer…": "选择图层…",
|
||||
"Attach a file": "附加文件",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON 或 GeoJSON · 每个文件最多 10 KB。附件会随消息发送给您的 AI 服务商。",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON 或 GeoJSON · 总计最多 10 KB。附件会随消息发送给您的 AI 服务商。",
|
||||
"Latest AI response": "最新 AI 回复",
|
||||
"Expand conversation": "展开对话",
|
||||
"Command suggestions": "命令建议",
|
||||
|
||||
@@ -2958,7 +2958,7 @@
|
||||
"Attach a map layer": "附加地圖圖層",
|
||||
"Choose a layer…": "選擇圖層…",
|
||||
"Attach a file": "附加檔案",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON 或 GeoJSON · 每個最多 10 KB。附件會隨訊息傳送給你的 AI 供應商。",
|
||||
"TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.": "TXT、Markdown、CSV、JSON 或 GeoJSON · 總計最多 10 KB。附件會隨訊息傳送給你的 AI 供應商。",
|
||||
"Latest AI response": "最新 AI 回覆",
|
||||
"Expand conversation": "展開對話",
|
||||
"Command suggestions": "指令建議",
|
||||
|
||||
@@ -95,7 +95,7 @@ const quickPrompts = () => [t('Fly to Tokyo'), t('Show live flights')];
|
||||
<button id="gev-chat-layer-attach" type="button" :disabled="props.view.chat.locked || !layerChoice" @click="attachLayer()">{{ t('Attach layer') }}</button>
|
||||
</div>
|
||||
<button id="gev-chat-file-button" type="button" :disabled="props.view.chat.locked" @click="emit('chat-file-button')">{{ t('Attach a file') }}</button>
|
||||
<p>{{ t('TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB each. Attachments are sent to your AI provider with your message.') }}</p>
|
||||
<p>{{ t('TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.') }}</p>
|
||||
<input id="gev-chat-file" type="file" accept=".txt,.md,.csv,.json,.geojson" multiple hidden @change="emit('chat-files', $event.target)" />
|
||||
</div>
|
||||
<aside id="gev-chat-mini-reply" :hidden="!props.view.chat.miniReply" :aria-label="t('Latest AI response')">
|
||||
|
||||
@@ -108,6 +108,17 @@ test('attachments over 10 KB together are refused', async (t) => {
|
||||
]);
|
||||
});
|
||||
|
||||
test('the attach menu states the 10 KB limit for all attachments together', async (t) => {
|
||||
const { pinia, settle } = mountVoiceView(t);
|
||||
const ui = createTestVoiceUi({ panel: true, pinia });
|
||||
attachments(t, { ui });
|
||||
ui.update('chat', { open: true });
|
||||
await settle();
|
||||
const hint = $('#gev-chat-attach-menu > p').textContent;
|
||||
assert.match(hint, /up to 10 KB in total\./);
|
||||
assert.doesNotMatch(hint, /each/);
|
||||
});
|
||||
|
||||
test('Escape closes the attach menu and returns to the Attach button', async (t) => {
|
||||
const { pinia, settle } = mountVoiceView(t);
|
||||
const ui = createTestVoiceUi({ panel: true, pinia });
|
||||
|
||||
Reference in new issue
Block a user