4.8.5 test (#1819)

This commit is contained in:
Archer
2024-06-21 18:32:05 +08:00
committed by GitHub
parent 5cc01b8509
commit 24596a6e21
40 changed files with 908 additions and 1058 deletions

View File

@@ -9,6 +9,8 @@ import { useRouter } from 'next/router';
import { useTranslation } from 'next-i18next';
import { getChatTitleFromChatMessage } from '@fastgpt/global/core/chat/utils';
import MyTag from '@fastgpt/web/components/common/Tag/index';
import { useContextSelector } from 'use-context-selector';
import { ChatContext } from '@/web/core/chat/context/chatContext';
const ChatHeader = ({
history,
@@ -16,8 +18,7 @@ const ChatHeader = ({
appAvatar,
chatModels,
showHistory,
onRoute2AppDetail,
onOpenSlider
onRoute2AppDetail
}: {
history: ChatItemType[];
appName: string;
@@ -25,7 +26,6 @@ const ChatHeader = ({
chatModels?: string[];
showHistory?: boolean;
onRoute2AppDetail?: () => void;
onOpenSlider: () => void;
}) => {
const theme = useTheme();
const { t } = useTranslation();
@@ -36,6 +36,8 @@ const ChatHeader = ({
[appName, history, t]
);
const onOpenSlider = useContextSelector(ChatContext, (v) => v.onOpenSlider);
return (
<Flex
alignItems={'center'}