diff --git a/frontend/web/src/components/ChatBubble.tsx b/frontend/web/src/components/ChatBubble.tsx
index f45a9ce..fea5e61 100644
--- a/frontend/web/src/components/ChatBubble.tsx
+++ b/frontend/web/src/components/ChatBubble.tsx
@@ -7,9 +7,11 @@ interface ChatBubbleProps {
content: ReactNode
meta?: ReactNode
pending?: boolean
+ /** 镜像布局:探索下钻里虚拟用户居左、被评对象居右(与常规聊天相反) */
+ mirrored?: boolean
}
-export default function ChatBubble({ role, content, meta, pending }: ChatBubbleProps) {
+export default function ChatBubble({ role, content, meta, pending, mirrored }: ChatBubbleProps) {
const isUser = role === 'user'
const isAgent = role === 'agent'
const isSystem = role === 'system'
@@ -17,8 +19,9 @@ export default function ChatBubble({ role, content, meta, pending }: ChatBubbleP
const bg = isUser ? colors.chatUser : isAgent ? colors.chatAgent : colors.chatSystemError
const border = isSystem ? '#ffccc7' : 'transparent'
const textColor = isSystem ? '#cf1322' : colors.text
- const align = isUser ? 'flex-end' : 'flex-start'
- const radius = isUser ? '10px 10px 2px 10px' : '10px 10px 10px 2px'
+ const alignRight = isSystem ? false : isUser ? !mirrored : !!mirrored
+ const align = alignRight ? 'flex-end' : 'flex-start'
+ const radius = alignRight ? '10px 10px 2px 10px' : '10px 10px 10px 2px'
const icon = isUser
?