perf: dynamic

This commit is contained in:
archer
2023-07-28 16:09:10 +08:00
parent 0a689b0ab8
commit 5d0c8fa462
5 changed files with 5 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ const ChatHistorySlider = ({
const concatHistory = useMemo<HistoryItemType[]>(
() =>
!activeChatId ? [{ id: activeChatId, title: t('chat.New Chat') }].concat(history) : history,
[activeChatId, history]
[activeChatId, history, t]
);
const isShare = useMemo(() => !appId || !userInfo, [appId, userInfo]);

View File

@@ -16,7 +16,7 @@ const ToolMenu = ({ history }: { history: ChatItemType[] }) => {
icon: 'chat',
label: '新对话',
onClick: () => {
router.push({
router.replace({
query: {
appId
}