@@ -328,7 +328,7 @@ export const SessionView: Component<SessionViewProps> = (props) => {
328328 if ( ! activeSession ) return null
329329 return (
330330 < div ref = { rootRef } class = "session-view" >
331- < Show when = { isActiveSession ( ) } fallback = { < div class = "flex-1 min-h-0" /> } >
331+ < div class = "flex-1 min-h-0" style = { { display : isActiveSession ( ) ? "flex" : "none" } } >
332332 < MessageSection
333333 instanceId = { props . instanceId }
334334 sessionId = { activeSession . id }
@@ -350,44 +350,41 @@ export const SessionView: Component<SessionViewProps> = (props) => {
350350 forceCompactStatusLayout = { props . forceCompactStatusLayout }
351351 onQuoteSelection = { handleQuoteSelection }
352352 />
353- </ Show >
354-
355-
356- < Show when = { isActiveSession ( ) } >
357- < >
358- < Show when = { attachments ( ) . length > 0 } >
359- < PromptAttachmentsBar
360- attachments = { attachments ( ) }
361- onRemoveAttachment = { ( attachmentId ) => {
362- if ( promptInputApi ) {
363- promptInputApi . removeAttachment ( attachmentId )
364- return
365- }
366- removeAttachment ( props . instanceId , props . sessionId , attachmentId )
367- } }
368- onExpandTextAttachment = { ( attachmentId ) => promptInputApi ?. expandTextAttachment ( attachmentId ) }
369- />
370- </ Show >
371-
372- < PromptInput
373- instanceId = { props . instanceId }
374- instanceFolder = { props . instanceFolder }
375- sessionId = { activeSession . id }
376- isActive = { props . isActive }
377- compactLayout = { props . compactPromptLayout }
378- onSend = { handleSendMessage }
379- onRunShell = { handleRunShell }
380- escapeInDebounce = { props . escapeInDebounce }
381- isSessionBusy = { sessionBusy ( ) }
382- disabled = { sessionNeedsInput ( ) }
383- onAbortSession = { handleAbortSession }
384- registerPromptInputApi = { registerPromptInputApi }
385- />
386- </ >
353+ </ div >
354+
355+ < div style = { { display : isActiveSession ( ) ? "block" : "none" } } >
356+ < Show when = { attachments ( ) . length > 0 } >
357+ < PromptAttachmentsBar
358+ attachments = { attachments ( ) }
359+ onRemoveAttachment = { ( attachmentId ) => {
360+ if ( promptInputApi ) {
361+ promptInputApi . removeAttachment ( attachmentId )
362+ return
363+ }
364+ removeAttachment ( props . instanceId , props . sessionId , attachmentId )
365+ } }
366+ onExpandTextAttachment = { ( attachmentId ) => promptInputApi ?. expandTextAttachment ( attachmentId ) }
367+ />
387368 </ Show >
369+
370+ < PromptInput
371+ instanceId = { props . instanceId }
372+ instanceFolder = { props . instanceFolder }
373+ sessionId = { activeSession . id }
374+ isActive = { props . isActive }
375+ compactLayout = { props . compactPromptLayout }
376+ onSend = { handleSendMessage }
377+ onRunShell = { handleRunShell }
378+ escapeInDebounce = { props . escapeInDebounce }
379+ isSessionBusy = { sessionBusy ( ) }
380+ disabled = { sessionNeedsInput ( ) }
381+ onAbortSession = { handleAbortSession }
382+ registerPromptInputApi = { registerPromptInputApi }
383+ />
388384 </ div >
389- )
390- } }
385+ </ div >
386+ )
387+ } }
391388 </ Show >
392389 )
393390}
0 commit comments