浏览代码

Merge pull request #2198 from YBY2020/main

perf : 代码细节优化
Yifei Zhang 1 年之前
父节点
当前提交
5d6e7de667
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -922,7 +922,7 @@ export function Chat() {
                         }}
                         }}
                       ></IconButton>
                       ></IconButton>
                     </div>
                     </div>
-                    {message.role === "user" ? (
+                    {isUser ? (
                       <Avatar avatar={config.avatar} />
                       <Avatar avatar={config.avatar} />
                     ) : (
                     ) : (
                       <MaskAvatar mask={session.mask} />
                       <MaskAvatar mask={session.mask} />