From 637815940615b040b84782b3de7baa527ad58b3f Mon Sep 17 00:00:00 2001 From: sp mac bookpro 2605 Date: Mon, 8 Jun 2026 01:06:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=A0=B7=E5=BC=8F=20-=20=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E6=9B=B4=E6=B5=85=E6=9B=B4=E5=B0=8F=EF=BC=8CAGENT=E6=B0=94?= =?UTF-8?q?=E6=B3=A1=E7=99=BD=E5=BA=95=EF=BC=8C=E4=BF=AE=E6=AD=A3AGENT?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B8=83=E5=B1=80=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/chat/components/ChatBody.tsx | 6 +- .../chat/components/messages/MessageItem.tsx | 70 +++++++++---------- src/styles.css | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/pages/chat/components/ChatBody.tsx b/src/pages/chat/components/ChatBody.tsx index dcf9942..2d6741a 100644 --- a/src/pages/chat/components/ChatBody.tsx +++ b/src/pages/chat/components/ChatBody.tsx @@ -94,9 +94,9 @@ export default function ChatBody(props: { marginBottom: 6 }}> {streamingAgent.name} diff --git a/src/pages/chat/components/messages/MessageItem.tsx b/src/pages/chat/components/messages/MessageItem.tsx index 22aa24f..c6d27ef 100644 --- a/src/pages/chat/components/messages/MessageItem.tsx +++ b/src/pages/chat/components/messages/MessageItem.tsx @@ -50,9 +50,39 @@ export default function MessageItem(props: { transition: 'background 0.4s, padding 0.4s' }} > - {message.role === 'assistant' ? ( + {message.role === 'user' ? ( +
+ {/* 用户: 头像在右侧,内容在左侧(靠右对齐) */} +
+
+ + 我 + +
+
+ {message.content.includes('![image](') ? ( + {message.content} + ) : ( + @$1') + }} /> + )} +
+
+ +
+ ) : (
- {/* AGENT: 头像在左侧 */} + {/* AGENT: 头像在左侧,内容在右侧(靠左对齐) */} {hasAnswerAgent && ( )} @@ -65,9 +95,9 @@ export default function MessageItem(props: { marginBottom: 6 }}> {answerAgent!.name} @@ -121,36 +151,6 @@ export default function MessageItem(props: { )}
- ) : ( -
-
-
- - 我 - -
-
- {message.content.includes('![image](') ? ( - {message.content} - ) : ( - @$1') - }} /> - )} -
-
- {/* 用户: 头像在右侧 */} - -
)} ); diff --git a/src/styles.css b/src/styles.css index aaebdbc..a4c51f5 100644 --- a/src/styles.css +++ b/src/styles.css @@ -645,7 +645,7 @@ body { } .bubble.assistant { - background: var(--color-surface); + background: #ffffff; color: var(--color-text); border: 1px solid var(--color-border); border-bottom-left-radius: 5px;