@@ -1865,7 +1865,8 @@ function ChatViewContent(props: ChatViewProps) {
18651865 panelAnimationDurationMs ,
18661866 ) ;
18671867 const rightPanelPresent = rightPanelPresence . present ;
1868- const rightPanelControlsInPanel = rightPanelPresent && rightPanelOpen ;
1868+ const rightPanelControlsInPanel =
1869+ shouldUseRightPanelSheet && rightPanelPresent && rightPanelOpen ;
18691870 const renderedRightPanelSurface = rightPanelPresence . value ?. activeSurface ?? null ;
18701871 const renderedRightPanelSurfaces = rightPanelPresence . value ?. surfaces ?? [ ] ;
18711872 const previewMiniPlayerVisible = shouldRenderPreviewMiniPlayer (
@@ -7450,15 +7451,6 @@ function ChatViewContent(props: ChatViewProps) {
74507451 < div className = "pointer-events-auto flex h-full items-center" > { panelToggleControls } </ div >
74517452 </ div >
74527453 ) ;
7453- const inlineRightPanelControls = (
7454- < div className = "mr-px flex h-full items-center gap-1 [-webkit-app-region:no-drag]" >
7455- < RightPanelMaximizeControl
7456- maximized = { rightPanelMaximized }
7457- onToggle = { toggleRightPanelMaximized }
7458- />
7459- { panelToggleControls }
7460- </ div >
7461- ) ;
74627454 const rightPanelContent = activeThreadRef ? (
74637455 renderedRightPanelSurface ?. kind === "preview" ? (
74647456 < Suspense fallback = { null } >
@@ -7605,6 +7597,7 @@ function ChatViewContent(props: ChatViewProps) {
76057597
76067598 return (
76077599 < div className = "relative flex min-h-0 min-w-0 flex-1 overflow-hidden bg-background" >
7600+ { ! rightPanelControlsInPanel ? panelLayoutControls : null }
76087601 < div
76097602 className = { cn (
76107603 "flex min-h-0 min-w-0 flex-col overflow-x-hidden" ,
@@ -7619,7 +7612,6 @@ function ChatViewContent(props: ChatViewProps) {
76197612 reserveNativeControls = { reserveTitleBarControlInset && ! inlineRightPanelOwnsTitleBar }
76207613 className = "relative bg-background"
76217614 >
7622- { ! rightPanelControlsInPanel ? panelLayoutControls : null }
76237615 < ChatHeader
76247616 { ...( ! supportsPullRequests || activeProjectRepository === null
76257617 ? { }
@@ -8047,7 +8039,6 @@ function ChatViewContent(props: ChatViewProps) {
80478039 mode = "inline"
80488040 open = { rightPanelOpen }
80498041 maximized = { rightPanelMaximized }
8050- layoutControls = { rightPanelOpen ? inlineRightPanelControls : null }
80518042 surfaces = { renderedRightPanelSurfaces }
80528043 environmentId = { activeThreadRef . environmentId }
80538044 activeSurfaceId = { renderedRightPanelSurface ?. id ?? null }
0 commit comments