From 593bbe70e3bd4a2cc56f919aee3789946ad30e50 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Tue, 24 Mar 2026 23:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=9A=E8=AF=9D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=BB=9A=E5=8A=A8=E6=9D=A1=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=9C=A8=E5=88=87=E6=8D=A2=E6=A8=A1=E5=BC=8F=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E4=BC=9A=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/folder/layout.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/folder/layout.tsx b/src/app/folder/layout.tsx index b19a759..c8b911d 100644 --- a/src/app/folder/layout.tsx +++ b/src/app/folder/layout.tsx @@ -49,6 +49,7 @@ import { ResizablePanelGroup, } from "@/components/ui/resizable" import type { AgentType } from "@/lib/types" +import { cn } from "@/lib/utils" const TOAST_DURATION_MS = 15000 const WORKSPACE_PANEL_GROUP_ID = "workspace-panel-group" @@ -61,8 +62,6 @@ const FOLDER_SHELL_RIGHT_PANEL_ID = "folder-shell-right-panel" const FOLDER_MAIN_GROUP_ID = "folder-main-group" const FOLDER_MAIN_WORKSPACE_PANEL_ID = "folder-main-workspace-panel" const FOLDER_MAIN_TERMINAL_PANEL_ID = "folder-main-terminal-panel" -const CONVERSATION_ONLY_LAYOUT: [number, number] = [100, 0] -const FILES_ONLY_LAYOUT: [number, number] = [0, 100] const DEFAULT_FUSION_LAYOUT: [number, number] = [56, 44] const MIN_CENTER_WIDTH_PX = 420 const MIN_WORKSPACE_HEIGHT_PX = 220 @@ -145,15 +144,10 @@ function WorkspaceContent({ children }: { children: React.ReactNode }) { useEffect(() => { if (mode === "fusion") { applyLayout(fusionLayoutRef.current) - return } - - if (mode === "conversation") { - applyLayout(CONVERSATION_ONLY_LAYOUT) - return - } - - applyLayout(FILES_ONLY_LAYOUT) + // Non-fusion modes keep panels at their current sizes to preserve + // scroll positions. CSS overlay on the active section provides + // full-width display (see absolute inset-0 below). }, [applyLayout, mode]) const handleLayout = useCallback( @@ -179,7 +173,7 @@ function WorkspaceContent({ children }: { children: React.ReactNode }) { ) return ( -
+