fix: history list height (#550)

* fix: history list height

* docs: update notes
This commit is contained in:
BiggerRain
2025-05-22 16:28:11 +08:00
committed by GitHub
parent 401832ad43
commit cf3f2affa5
4 changed files with 48 additions and 46 deletions

View File

@@ -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

View File

@@ -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 (
<div
data-tauri-drag-region
className={`flex flex-col rounded-md relative h-full overflow-hidden`}
>
<>
{showChatHistory && !setIsSidebarOpen && (
<ChatSidebar
isSidebarOpen={isSidebarOpenChat}
@@ -336,49 +333,53 @@ const ChatAI = memo(
onRename={renameChat}
/>
)}
<ChatHeader
clearChat={clearChat}
onOpenChatAI={openChatAI}
setIsSidebarOpen={toggleSidebar}
isSidebarOpen={isSidebarOpenChat}
activeChat={activeChat}
reconnect={reconnect}
isChatPage={isChatPage}
showChatHistory={showChatHistory}
assistantIDs={assistantIDs}
/>
{isCurrentLogin ? (
<ChatContent
<div
data-tauri-drag-region
className={`flex flex-col rounded-md h-full overflow-hidden`}
>
<ChatHeader
clearChat={clearChat}
onOpenChatAI={openChatAI}
setIsSidebarOpen={toggleSidebar}
isSidebarOpen={isSidebarOpenChat}
activeChat={activeChat}
curChatEnd={curChatEnd}
query_intent={query_intent}
tools={tools}
fetch_source={fetch_source}
pick_source={pick_source}
deep_read={deep_read}
think={think}
response={response}
loadingStep={loadingStep}
timedoutShow={timedoutShow}
Question={Question}
reconnect={reconnect}
isChatPage={isChatPage}
showChatHistory={showChatHistory}
assistantIDs={assistantIDs}
handleSendMessage={(value) =>
handleSendMessage(value, activeChat)
}
getFileUrl={getFileUrl}
/>
) : (
<ConnectPrompt />
)}
{!activeChat?._id && !visibleStartPage && (
<PrevSuggestion sendMessage={init} />
)}
{isCurrentLogin ? (
<ChatContent
activeChat={activeChat}
curChatEnd={curChatEnd}
query_intent={query_intent}
tools={tools}
fetch_source={fetch_source}
pick_source={pick_source}
deep_read={deep_read}
think={think}
response={response}
loadingStep={loadingStep}
timedoutShow={timedoutShow}
Question={Question}
assistantIDs={assistantIDs}
handleSendMessage={(value) =>
handleSendMessage(value, activeChat)
}
getFileUrl={getFileUrl}
/>
) : (
<ConnectPrompt />
)}
{/* <ReadAloud /> */}
</div>
{!activeChat?._id && !visibleStartPage && (
<PrevSuggestion sendMessage={init} />
)}
{/* <ReadAloud /> */}
</div>
</>
);
}
)

View File

@@ -29,7 +29,7 @@ export const ChatSidebar: React.FC<ChatSidebarProps> = ({
<div
data-sidebar
className={`
h-screen fixed top-0 left-0 z-100 w-64
h-screen absolute top-0 left-0 z-100 w-64
transform transition-all duration-300 ease-in-out
${isSidebarOpen ? "translate-x-0" : "-translate-x-full"}
bg-gray-100 dark:bg-gray-800

View File

@@ -401,7 +401,7 @@ function SearchChat({
<div
data-tauri-drag-region={isTauri}
className={clsx(
"m-auto overflow-hidden relative bg-no-repeat bg-cover bg-center bg-white dark:bg-black flex flex-col transform",
"m-auto overflow-hidden relative bg-no-repeat bg-cover bg-center bg-white dark:bg-black flex flex-col",
[
isTransitioned
? "bg-chat_bg_light dark:bg-chat_bg_dark"