From da1cf77ea7b8eb16998ac8b6bca326622878290c Mon Sep 17 00:00:00 2001 From: MyGit <3282299728@qq.com> Date: Thu, 4 Jul 2024 13:12:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BC=9A=E8=AF=9D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96=EF=BC=8C=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=97=B6=E9=97=B4=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bs-comp/chatComponent/MessageBs.tsx | 13 +++++++-- .../bs-comp/chatComponent/MessageUser.tsx | 14 ++++++++-- src/frontend/src/pages/ChatAppPage/index.tsx | 28 +++++++++++-------- src/frontend/src/pages/DiffFlowPage/index.tsx | 2 +- src/frontend/src/types/chat/index.ts | 2 ++ src/frontend/src/util/utils.ts | 12 ++++++++ 6 files changed, 52 insertions(+), 19 deletions(-) diff --git a/src/frontend/src/components/bs-comp/chatComponent/MessageBs.tsx b/src/frontend/src/components/bs-comp/chatComponent/MessageBs.tsx index 1e1dcb00f..c62e2c01a 100644 --- a/src/frontend/src/components/bs-comp/chatComponent/MessageBs.tsx +++ b/src/frontend/src/components/bs-comp/chatComponent/MessageBs.tsx @@ -3,7 +3,7 @@ import { LoadIcon } from "@/components/bs-icons/loading"; import { CodeBlock } from "@/modals/formModal/chatMessage/codeBlock"; import { ChatMessageType } from "@/types/chat"; import { copyText } from "@/utils"; -import { useMemo, useRef } from "react"; +import { useMemo, useRef, useState } from "react"; import ReactMarkdown from "react-markdown"; import rehypeMathjax from "rehype-mathjax"; import remarkGfm from "remark-gfm"; @@ -11,6 +11,7 @@ import remarkMath from "remark-math"; import MessageButtons from "./MessageButtons"; import SourceEntry from "./SourceEntry"; import { useMessageStore } from "./messageStore"; +import { isSameDay } from "@/util/utils"; // 颜色列表 const colorList = [ @@ -76,11 +77,17 @@ export default function MessageBs({ data, onUnlike = () => { }, onSource }: { da } const chatId = useMessageStore(state => state.chatId) + const [show, setShow] = useState(false) - return
{data.sender}
} -{useName}
} -- - {chat.flow_name} -
- {chat.flow_description} -{chat.flow_name}
+