Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
refactor(chat): extract shared empty state illustration, simplify copy
Gabriel Stein980c342f34f1
diff --git a/src/components/agent/AgentChat.tsx b/src/components/agent/AgentChat.tsxindex 4013bf400..b319e8976 100644--- a/src/components/agent/AgentChat.tsx+++ b/src/components/agent/AgentChat.tsx@@ -1,5 +1,6 @@import { useTranslation } from "react-i18next";import { ChatMessages } from "../chat/ChatMessages";+import { ChatEmptyIllustration } from "../chat/ChatEmptyIllustration";import type { Message } from "../chat/types";export type { Message, ToolCallInfo } from "../chat/types";@@ -15,13 +16,11 @@ export function AgentChat({ messages }: AgentChatProps) {<ChatMessagesmessages={messages}emptyState={- <div className="flex flex-col items-center justify-center h-full gap-1 select-none">- <p className="text-[13px] font-medium text-foreground/40">+ <div className="flex flex-col items-center justify-center h-full -mt-4 select-none">+ <ChatEmptyIllustration size={48} />+ <p className="text-xs text-foreground/50 dark:text-foreground/25 mt-3">{t("agentMode.chat.emptyState")}</p>- <p className="text-[11px] text-muted-foreground/30">- {t("agentMode.chat.emptyStateHint")}- </p></div>}/>diff --git a/src/components/chat/ChatEmptyIllustration.tsx b/src/components/chat/ChatEmptyIllustration.tsxnew file mode 100644index 000000000..dc685b36b--- /dev/null+++ b/src/components/chat/ChatEmptyIllustration.tsx@@ -0,0 +1,48 @@+interface ChatEmptyIllustrationProps {+ size?: number;+}++export function ChatEmptyIllustration({ size = 56 }: ChatEmptyIllustrationProps) {+ const h = Math.round(size * (48 / 56));++ return (+ <svg+ className="text-foreground dark:text-white"+ width={size}+ height={h}+ viewBox="0 0 56 48"+ fill="none"+ >+ {/* Back bubble */}+ <rect+ x="16"+ y="18"+ width="36"+ height="24"+ rx="4"+ fill="currentColor"+ fillOpacity={0.03}+ stroke="currentColor"+ strokeOpacity={0.06}+ />+ <rect x="22" y="25" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.05} />+ <rect x="22" y="30" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />++ {/* Front bubble */}+ <rect+ x="4"+ y="6"+ width="36"+ height="24"+ rx="4"+ fill="currentColor"+ fillOpacity={0.04}+ stroke="currentColor"+ strokeOpacity={0.08}+ />+ <rect x="10" y="13" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.06} />+ <rect x="10" y="18" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.04} />+ <rect x="10" y="23" width="14" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />+ </svg>+ );+}diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsxindex a65e656f1..b5158dfb9 100644--- a/src/components/chat/ChatView.tsx+++ b/src/components/chat/ChatView.tsx@@ -4,6 +4,7 @@ import { useChatPersistence } from "./useChatPersistence";import { useChatStreaming } from "./useChatStreaming";import { ChatMessages } from "./ChatMessages";import { ChatInput } from "./ChatInput";+import { ChatEmptyIllustration } from "./ChatEmptyIllustration";import ConversationList from "./ConversationList";import EmptyChatState from "./EmptyChatState";import { ConfirmDialog } from "../ui/dialog";@@ -18,42 +19,8 @@ function NewChatEmptyState() {const { t } = useTranslation();return (<div className="flex flex-col items-center justify-center h-full -mt-6 select-none">- <svg- className="text-foreground dark:text-white mb-4"- width="56"- height="48"- viewBox="0 0 56 48"- fill="none"- >- <rect- x="4"- y="6"- width="36"- height="24"- rx="4"- fill="currentColor"- fillOpacity={0.04}- stroke="currentColor"- strokeOpacity={0.08}- />- <rect x="10" y="13" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.06} />- <rect x="10" y="18" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.04} />- <rect x="10" y="23" width="14" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />- <rect- x="16"- y="18"- width="36"- height="24"- rx="4"- fill="currentColor"- fillOpacity={0.03}- stroke="currentColor"- strokeOpacity={0.06}- />- <rect x="22" y="25" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.05} />- <rect x="22" y="30" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />- </svg>- <p className="text-xs text-foreground/50 dark:text-foreground/25 text-center max-w-48">+ <ChatEmptyIllustration />+ <p className="text-xs text-foreground/50 dark:text-foreground/25 text-center max-w-48 mt-4">{t("chat.newChatEmpty")}</p></div>diff --git a/src/components/chat/EmptyChatState.tsx b/src/components/chat/EmptyChatState.tsxindex f7a9f0d0b..67602447c 100644--- a/src/components/chat/EmptyChatState.tsx+++ b/src/components/chat/EmptyChatState.tsx@@ -1,11 +1,13 @@import { useTranslation } from "react-i18next";+import { ChatEmptyIllustration } from "./ChatEmptyIllustration";export default function EmptyChatState() {const { t } = useTranslation();return (- <div className="flex items-center justify-center h-full select-none">- <p className="text-xs text-muted-foreground/40">{t("chat.selectChat")}</p>+ <div className="flex flex-col items-center justify-center h-full -mt-6 select-none">+ <ChatEmptyIllustration />+ <p className="text-xs text-muted-foreground/40 mt-4">{t("chat.selectChat")}</p></div>);}diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 12bbf45c9..7d493f595 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "In Zwischenablage kopieren","copied": "Kopiert!","emptyState": "Frag mich alles",- "emptyStateHint": "Notizen, Web, Kalender — einfach fragen","errorPrefix": "Fehler"},"titleBar": {diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 326d86445..80aac96c5 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -1949,7 +1949,6 @@"copyToClipboard": "Copy to clipboard","copied": "Copied!","emptyState": "Ask me anything",- "emptyStateHint": "Notes, web, calendar — just ask","errorPrefix": "Error"},"titleBar": {diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 4e96c7156..cee9aa72d 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "Copiar al portapapeles","copied": "¡Copiado!","emptyState": "Preguntame lo que sea",- "emptyStateHint": "Notas, web, calendario — solo pregunta","errorPrefix": "Error"},"titleBar": {diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex b36b0707f..cb0d808c9 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "Copier dans le presse-papiers","copied": "Copié !","emptyState": "Demandez-moi n'importe quoi",- "emptyStateHint": "Notes, web, calendrier — demandez simplement","errorPrefix": "Erreur"},"titleBar": {diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 55e8e8863..004057052 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "Copia negli appunti","copied": "Copiato!","emptyState": "Chiedimi qualsiasi cosa",- "emptyStateHint": "Note, web, calendario — chiedi e basta","errorPrefix": "Errore"},"titleBar": {diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 7cf8c1c28..a6a107cad 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "クリップボードにコピー","copied": "コピーしました!","emptyState": "なんでも聞いてください",- "emptyStateHint": "ノート、ウェブ、カレンダー — 何でもどうぞ","errorPrefix": "エラー"},"titleBar": {diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 44478ed0f..b80dcf0f2 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "Copiar para área de transferência","copied": "Copiado!","emptyState": "Pergunte-me qualquer coisa",- "emptyStateHint": "Notas, web, calendário — é só perguntar","errorPrefix": "Erro"},"titleBar": {diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 5677ac329..0068742e0 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1901,7 +1901,6 @@"copyToClipboard": "Копировать в буфер обмена","copied": "Скопировано!","emptyState": "Спросите что угодно",- "emptyStateHint": "Заметки, веб, календарь — просто спросите","errorPrefix": "Ошибка"},"titleBar": {diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex b73adb180..329b97e12 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -1896,7 +1896,6 @@"copyToClipboard": "复制到剪贴板","copied": "已复制!","emptyState": "随便问我",- "emptyStateHint": "笔记、网页、日历 — 尽管问","errorPrefix": "错误"},"titleBar": {diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 86cd1920e..56b785606 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -1896,7 +1896,6 @@"copyToClipboard": "複製到剪貼簿","copied": "已複製!","emptyState": "隨便問我",- "emptyStateHint": "筆記、網頁、日曆 — 儘管問","errorPrefix": "錯誤"},"titleBar": {