From 6dfa4f6a5fc4809bdce968d290905feb696db67d Mon Sep 17 00:00:00 2001 From: BiggerRain <15911122312@163.COM> Date: Wed, 31 Dec 2025 14:13:51 +0800 Subject: [PATCH] fix: prevent window collapse when chat history is open (#1039) --- src/components/SearchChat/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/SearchChat/index.tsx b/src/components/SearchChat/index.tsx index 53731261..beb50290 100644 --- a/src/components/SearchChat/index.tsx +++ b/src/components/SearchChat/index.tsx @@ -38,6 +38,7 @@ import { useTauriFocus } from "@/hooks/useTauriFocus"; import { POPOVER_PANEL_SELECTOR, WINDOW_CENTER_BASELINE_HEIGHT, + HISTORY_PANEL_ID, } from "@/constants"; import { useChatStore } from "@/stores/chatStore"; import { useSearchStore } from "@/stores/searchStore"; @@ -132,6 +133,7 @@ function SearchChat({ const updateAppDialog = document.querySelector("#update-app-dialog"); const popoverPanelEl = document.querySelector(POPOVER_PANEL_SELECTOR); + const historyPanel = document.getElementById(HISTORY_PANEL_ID); const { hasActiveChat } = useChatStore.getState(); @@ -140,6 +142,7 @@ function SearchChat({ canNavigateBack() || inputRef.current || popoverPanelEl || + historyPanel || (isChatModeRef.current && hasActiveChat) ) { setHideMiddleBorder(false);