@@ -606,9 +606,6 @@ export default function ChatView(props: ChatViewProps) {
606606 const composerFilesRef = useRef < ComposerFileAttachment [ ] > ( [ ] ) ;
607607 const composerTerminalContextsRef = useRef < TerminalContextDraft [ ] > ( [ ] ) ;
608608 const branchToolbarRef = useRef < BranchToolbarHandle > ( null ) ;
609- const [ restingComposerControlsHost , setRestingComposerControlsHost ] =
610- useState < HTMLDivElement | null > ( null ) ;
611- const [ restingComposerControlsVisible , setRestingComposerControlsVisible ] = useState ( false ) ;
612609 const citeAssistantText = (
613610 citation : AssistantCitation ,
614611 sourceAnchor : AssistantCitationSourceAnchor ,
@@ -1638,25 +1635,13 @@ export default function ChatView(props: ChatViewProps) {
16381635 providerSubagentModels ,
16391636 reportedModelSelection ,
16401637 ) ;
1641- const mountComposerContextStrip = shouldShowComposerContextStrip ( {
1642- isDraftHeroState,
1643- persistInActiveThreads : settings . persistComposerContextStrip ,
1644- hasActiveProject : activeProject !== null && ! showProviderSubagentBar ,
1645- isGitRepo,
1646- showEnvironmentIndicator : showComposerEnvironmentIndicator ,
1647- hostsRestingComposerControls : routeKind === "server" ,
1648- } ) ;
16491638 const showComposerContextStrip = shouldShowComposerContextStrip ( {
16501639 isDraftHeroState,
16511640 persistInActiveThreads : settings . persistComposerContextStrip ,
16521641 hasActiveProject : activeProject !== null && ! showProviderSubagentBar ,
16531642 isGitRepo,
16541643 showEnvironmentIndicator : showComposerEnvironmentIndicator ,
1655- hostsRestingComposerControls : routeKind === "server" && restingComposerControlsVisible ,
16561644 } ) ;
1657- const mountComposerModelStrip =
1658- routeKind === "server" && ! mountComposerContextStrip && ! showProviderSubagentBar ;
1659- const showComposerModelStrip = mountComposerModelStrip && restingComposerControlsVisible ;
16601645 const terminalShortcutLabelOptions = {
16611646 context : {
16621647 terminalFocus : true ,
@@ -2130,21 +2115,10 @@ export default function ChatView(props: ChatViewProps) {
21302115 composerMounted : composerMountedRef . current ,
21312116 composerReportedResting : composerRestingRef . current ,
21322117 } ) ;
2133- const modelStrip = composerOverlayElement ?. querySelector < HTMLElement > (
2134- '[data-composer-model-strip="true"]' ,
2135- ) ;
2136- const restingOnlyHeight =
2137- modelStrip && isResting
2138- ? Math . max (
2139- 0 ,
2140- modelStrip . offsetHeight + Number . parseFloat ( getComputedStyle ( modelStrip ) . marginTop ) ,
2141- )
2142- : 0 ;
21432118 const nextInset = resolveComposerTimelineInset ( {
21442119 currentInset : composerTimelineInsetRef . current ,
21452120 overlayHeight : height ,
21462121 isResting,
2147- restingOnlyHeight,
21482122 } ) ;
21492123 if ( composerTimelineInsetRef . current !== nextInset ) {
21502124 composerTimelineInsetRef . current = nextInset ;
@@ -2688,7 +2662,10 @@ export default function ChatView(props: ChatViewProps) {
26882662 canOverrideServerThreadEnvMode,
26892663 setPendingServerThreadEnvModeEntry,
26902664 setPendingServerThreadStartFromOriginByThreadId,
2691- scheduleComposerFocus,
2665+ // A settings change from the compacted row keeps it compacted (focus would expand it).
2666+ scheduleComposerFocus : ( ) => {
2667+ if ( ! composerRef . current ?. isResting ( ) ) scheduleComposerFocus ( ) ;
2668+ } ,
26922669 } ) ;
26932670 const { onResume, isResuming } = useComposerResume ( {
26942671 environmentId,
@@ -3364,9 +3341,7 @@ export default function ChatView(props: ChatViewProps) {
33643341 : undefined
33653342 }
33663343 >
3367- < ComposerSurface . Shell
3368- contextStrip = { showComposerContextStrip || showComposerModelStrip }
3369- >
3344+ < ComposerSurface . Shell contextRow = { showComposerContextStrip } >
33703345 < ComposerSurface . Host
33713346 inert = { queuedRunEdit . isSaving }
33723347 aria-busy = { queuedRunEdit . isSaving }
@@ -3481,6 +3456,7 @@ export default function ChatView(props: ChatViewProps) {
34813456 activeEnvironmentUnavailable ? null : threadSyncPhase
34823457 }
34833458 runtimeMode = { runtimeMode }
3459+ defaultRuntimeMode = { defaultRuntimeMode }
34843460 interactionMode = { interactionMode }
34853461 lockedProvider = { modelPickerLockedProvider }
34863462 providerStatuses = { providerStatuses as ServerProvider [ ] }
@@ -3506,12 +3482,6 @@ export default function ChatView(props: ChatViewProps) {
35063482 supportsPullRequests ? activeProjectRepository : null
35073483 }
35083484 threadPullRequests = { ( activeThreadShell ?? activeThread ) ?. pullRequests }
3509- restingControlsHost = { restingComposerControlsHost }
3510- restingControlsHaveLeadingContext = {
3511- mountComposerContextStrip &&
3512- ( isGitRepo || showComposerEnvironmentIndicator )
3513- }
3514- onRestingControlsVisibilityChange = { setRestingComposerControlsVisible }
35153485 getTimelineScrollableNode = { getTimelineScrollableNodeStable }
35163486 isTimelineAtLogicalEnd = { isTimelineAtLogicalEndStable }
35173487 timelineOverflows = { timelineOverflows }
@@ -3567,24 +3537,7 @@ export default function ChatView(props: ChatViewProps) {
35673537 data-terminal-open = { terminalUiState . terminalOpen ? "true" : undefined }
35683538 className = "relative z-0"
35693539 >
3570- { mountComposerModelStrip ? (
3571- < ComposerSurface . ContextStrip
3572- data-composer-model-strip = "true"
3573- aria-hidden = { showComposerModelStrip ? undefined : true }
3574- inert = { showComposerModelStrip ? undefined : true }
3575- className = { cn (
3576- "group-data-model-strip-transition/composer-surface:before:backdrop-blur-(--glass-blur) group-data-model-strip-transition/composer-surface:before:bg-(--chat-composer-glass-surface)/(--glass-opacity)" ,
3577- ! showComposerModelStrip &&
3578- "pointer-events-none invisible absolute inset-x-0 top-full" ,
3579- ) }
3580- >
3581- < div
3582- ref = { setRestingComposerControlsHost }
3583- className = "min-w-0 flex-1"
3584- />
3585- </ ComposerSurface . ContextStrip >
3586- ) : null }
3587- { mountComposerContextStrip && (
3540+ { showComposerContextStrip && (
35883541 < div className = "pointer-events-auto" >
35893542 < BranchToolbar
35903543 forceNewWorktree = { multipleModelSelections !== null }
@@ -3625,8 +3578,6 @@ export default function ChatView(props: ChatViewProps) {
36253578 : undefined
36263579 }
36273580 availableEnvironments = { logicalProjectEnvironments }
3628- composerControlsHostRef = { setRestingComposerControlsHost }
3629- contextStripVisible = { showComposerContextStrip }
36303581 />
36313582 </ div >
36323583 ) }
0 commit comments