fix: actually remove Avatar from chat
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 4s

This commit is contained in:
WangDL 2026-05-22 16:25:04 +08:00
parent fae5d36b0c
commit c24d7c665f

View File

@ -1,5 +1,5 @@
import { useState, useRef, useEffect, useCallback } from 'react'
import { Input, Button, Avatar, theme, Typography, App } from 'antd'
import { Input, Button, theme, Typography, App } from 'antd'
import {
SendOutlined, RobotOutlined, UserOutlined, PlusOutlined,
DeleteOutlined, StopOutlined, MessageOutlined,
@ -191,9 +191,6 @@ function ChatPage() {
{messages.map(msg => (
<div key={msg.id} style={{ display: 'flex', gap: 12, marginBottom: 20, flexDirection: msg.role === 'user' ? 'row-reverse' : 'row' }}>
<Avatar size={32} icon={msg.role === 'user' ? <UserOutlined /> : <RobotOutlined />}
style={{ backgroundColor: msg.role === 'user' ? token.colorPrimary : token.colorSuccess, flexShrink: 0 }} />
<div style={{ maxWidth: '75%', minWidth: 0 }}>
<div style={{ padding: '12px 16px', borderRadius: 12, lineHeight: 1.8, wordBreak: 'break-word', background: msg.role === 'user' ? token.colorPrimary : token.colorFillAlter, color: msg.role === 'user' ? '#fff' : token.colorText }}>
{msg.role === 'assistant'
? (msg.content