File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,15 @@ export function PromptInputAttachments({
342342 return ( ) => ro . disconnect ( ) ;
343343 } , [ ] ) ;
344344
345+ // biome-ignore lint/correctness/useExhaustiveDependencies: Force height measurement when attachments change
346+ useLayoutEffect ( ( ) => {
347+ const el = contentRef . current ;
348+ if ( ! el ) {
349+ return ;
350+ }
351+ setHeight ( el . getBoundingClientRect ( ) . height ) ;
352+ } , [ attachments . files . length ] ) ;
353+
345354 if ( attachments . files . length === 0 ) {
346355 return null ;
347356 }
@@ -357,7 +366,7 @@ export function PromptInputAttachments({
357366 style = { { height : attachments . files . length ? height : 0 } }
358367 { ...props }
359368 >
360- < div className = "space-y-2 p-3 pt-3 " ref = { contentRef } >
369+ < div className = "space-y-2 py-1 " ref = { contentRef } >
361370 < div className = "flex flex-wrap gap-2" >
362371 { attachments . files
363372 . filter ( ( f ) => ! ( f . mediaType ?. startsWith ( "image/" ) && f . url ) )
You can’t perform that action at this time.
0 commit comments