From 7eaadfd273ebfb8db7bdeff253356f9da7aec0c5 Mon Sep 17 00:00:00 2001 From: lc6464 <64722907+lc6464@users.noreply.github.com> Date: Sun, 22 Mar 2026 15:59:19 +0800 Subject: [PATCH] fix(chat): preserve blank lines and add input hint - Add Tailwind `whitespace-pre-wrap` to the user message bubble of web chat so spaces and blank lines can be rendered correctly. - Update chat input placeholders in en.json and zh.json to show Enter vs Shift+Enter. --- web/frontend/src/components/chat/user-message.tsx | 2 +- web/frontend/src/i18n/locales/en.json | 2 +- web/frontend/src/i18n/locales/zh.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/frontend/src/components/chat/user-message.tsx b/web/frontend/src/components/chat/user-message.tsx index b47806f49..84978e907 100644 --- a/web/frontend/src/components/chat/user-message.tsx +++ b/web/frontend/src/components/chat/user-message.tsx @@ -5,7 +5,7 @@ interface UserMessageProps { export function UserMessage({ content }: UserMessageProps) { return (
-
+
{content}
diff --git a/web/frontend/src/i18n/locales/en.json b/web/frontend/src/i18n/locales/en.json index 7b3ad0911..ef5a7250e 100644 --- a/web/frontend/src/i18n/locales/en.json +++ b/web/frontend/src/i18n/locales/en.json @@ -17,7 +17,7 @@ "chat": { "welcome": "How can I help you today?", "welcomeDesc": "Ask me about weather, settings, or any other tasks. I'm here to assist you.", - "placeholder": "Start a new message...", + "placeholder": "Start a new message...\nPress Enter to send, Shift + Enter for a new line", "newChat": "New Chat", "notConnected": "Gateway is not running. Start it to chat.", "thinking": { diff --git a/web/frontend/src/i18n/locales/zh.json b/web/frontend/src/i18n/locales/zh.json index d1ffa1ac9..68bb07cfd 100644 --- a/web/frontend/src/i18n/locales/zh.json +++ b/web/frontend/src/i18n/locales/zh.json @@ -17,7 +17,7 @@ "chat": { "welcome": "今天我能为您做些什么?", "welcomeDesc": "您可以询问我天气、设置或其他任何任务,我随时为您效劳。", - "placeholder": "输入新消息...", + "placeholder": "输入新消息...\n按 Enter 发送,Shift + Enter 换行", "newChat": "新建对话", "notConnected": "服务未运行,请先启动以进行对话。", "thinking": {