From 60401a491e92492e3dee3d060e3ba44f3c9ef2c3 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sat, 4 Mar 2023 11:39:02 +0800 Subject: [PATCH] style updates --- src/components/Chat/ChatContent/ChatContent.tsx | 6 ------ .../Chat/ChatContent/Message/Message.tsx | 15 +++++++++------ .../Chat/ChatContent/Message/MessageContent.tsx | 6 ++++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/Chat/ChatContent/ChatContent.tsx b/src/components/Chat/ChatContent/ChatContent.tsx index 35360f1..c6bc5bd 100644 --- a/src/components/Chat/ChatContent/ChatContent.tsx +++ b/src/components/Chat/ChatContent/ChatContent.tsx @@ -7,12 +7,6 @@ import ChatTitle from './ChatTitle'; import Message from './Message'; import NewMessageButton from './Message/NewMessageButton'; -import { getChatCompletionStream as getChatCompletionStreamFree } from '@api/freeApi'; -import { getChatCompletionStream as getChatCompletionStreamCustom } from '@api/customApi'; -import { parseEventSource } from '@api/helper'; - -import RefreshIcon from '@icon/RefreshIcon'; -import { MessageInterface } from '@type/chat'; import useSubmit from '@hooks/useSubmit'; const ChatContent = () => { diff --git a/src/components/Chat/ChatContent/Message/Message.tsx b/src/components/Chat/ChatContent/Message/Message.tsx index 2b7c68b..b075b6c 100644 --- a/src/components/Chat/ChatContent/Message/Message.tsx +++ b/src/components/Chat/ChatContent/Message/Message.tsx @@ -6,11 +6,12 @@ import MessageContent from './MessageContent'; import { Role } from '@type/chat'; import RoleSelector from './RoleSelector'; -const backgroundStyle: { [role in Role]: string } = { - user: 'dark:bg-gray-800', - assistant: 'bg-gray-50 dark:bg-[#444654]', - system: 'bg-gray-50 dark:bg-[#444654]', -}; +// const backgroundStyle: { [role in Role]: string } = { +// user: 'dark:bg-gray-800', +// assistant: 'bg-gray-50 dark:bg-[#444654]', +// system: 'bg-gray-50 dark:bg-[#444654]', +// }; +const backgroundStyle = ['dark:bg-gray-800', 'bg-gray-50 dark:bg-[#444654]']; const Message = ({ role, @@ -25,7 +26,9 @@ const Message = ({ }) => { return (