From 3120087992cd5057829c82869f58e9fcb7b87885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=80=E7=B1=B3?= <76780744+YBY2020@users.noreply.github.com> Date: Fri, 30 Jun 2023 12:00:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf=20:=20=E4=BB=A3=E7=A0=81=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 大神, 学习代码过程中发现的一个小小的点,887行已定义`const isUser = message.role === "user";`,此处可直接用isUser --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 25c3be26e..ff0bc5b34 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -922,7 +922,7 @@ export function Chat() { }} > - {message.role === "user" ? ( + {isUser ? ( ) : ( From 9057712c8f080d0222a491037371cfd62e6de5d0 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Fri, 30 Jun 2023 16:08:45 +0800 Subject: [PATCH 2/2] Update chat.module.scss --- app/components/chat.module.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/components/chat.module.scss b/app/components/chat.module.scss index 8c4359176..fa3a1cf2e 100644 --- a/app/components/chat.module.scss +++ b/app/components/chat.module.scss @@ -212,6 +212,7 @@ .chat-body { flex: 1; overflow: auto; + overflow-x: hidden; padding: 20px; padding-bottom: 40px; position: relative;