From cf3f2affa50ea347971773bc17d2a51df2c18bee Mon Sep 17 00:00:00 2001 From: BiggerRain <15911122312@163.COM> Date: Thu, 22 May 2025 16:28:11 +0800 Subject: [PATCH] fix: history list height (#550) * fix: history list height * docs: update notes --- docs/content.en/docs/release-notes/_index.md | 1 + src/components/Assistant/Chat.tsx | 89 ++++++++++---------- src/components/Assistant/ChatSidebar.tsx | 2 +- src/components/SearchChat/index.tsx | 2 +- 4 files changed, 48 insertions(+), 46 deletions(-) diff --git a/docs/content.en/docs/release-notes/_index.md b/docs/content.en/docs/release-notes/_index.md index 3211288c..3ff71412 100644 --- a/docs/content.en/docs/release-notes/_index.md +++ b/docs/content.en/docs/release-notes/_index.md @@ -40,6 +40,7 @@ Information about release notes of Coco Server is provided here. - fix: panic when fetching app metadata on Windows #538 - fix: service switching error #539 - fix: switch server assistant and session unchanged #540 +- fix: history list height #550 ### ✈️ Improvements diff --git a/src/components/Assistant/Chat.tsx b/src/components/Assistant/Chat.tsx index 76d107d9..a74584e1 100644 --- a/src/components/Assistant/Chat.tsx +++ b/src/components/Assistant/Chat.tsx @@ -76,7 +76,7 @@ const ChatAI = memo( const { curChatEnd, setCurChatEnd, connected, setConnected } = useChatStore(); - const isCurrentLogin = useAuthStore(state => state.isCurrentLogin); + const isCurrentLogin = useAuthStore((state) => state.isCurrentLogin); const visibleStartPage = useConnectStore((state) => { return state.visibleStartPage; @@ -164,7 +164,7 @@ const ChatAI = memo( isMCPActive, changeInput, websocketSessionId, - showChatHistory, + showChatHistory ); const { dealMsg } = useMessageHandler( @@ -320,10 +320,7 @@ const ChatAI = memo( ); return ( -
+ <> {showChatHistory && !setIsSidebarOpen && ( )} - - - - {isCurrentLogin ? ( - + - handleSendMessage(value, activeChat) - } - getFileUrl={getFileUrl} /> - ) : ( - - )} - {!activeChat?._id && !visibleStartPage && ( - - )} + {isCurrentLogin ? ( + + handleSendMessage(value, activeChat) + } + getFileUrl={getFileUrl} + /> + ) : ( + + )} - {/* */} -
+ {!activeChat?._id && !visibleStartPage && ( + + )} + + {/* */} + + ); } ) diff --git a/src/components/Assistant/ChatSidebar.tsx b/src/components/Assistant/ChatSidebar.tsx index e091eeea..cea635a5 100644 --- a/src/components/Assistant/ChatSidebar.tsx +++ b/src/components/Assistant/ChatSidebar.tsx @@ -29,7 +29,7 @@ export const ChatSidebar: React.FC = ({