@@ -114,7 +114,7 @@ export function ChatInput({ onSend, onStop, disabled = false, sending = false, i
114114 useEffect ( ( ) => {
115115 if ( textareaRef . current ) {
116116 textareaRef . current . style . height = 'auto' ;
117- textareaRef . current . style . height = `${ Math . min ( textareaRef . current . scrollHeight , 200 ) } px` ;
117+ textareaRef . current . style . height = `${ Math . min ( textareaRef . current . scrollHeight , 240 ) } px` ;
118118 }
119119 } , [ input ] ) ;
120120
@@ -407,33 +407,54 @@ export function ChatInput({ onSend, onStop, disabled = false, sending = false, i
407407 </ div >
408408 ) }
409409
410- { /* Input Row */ }
411- < div className = { `relative bg-white dark:bg-card rounded-[28px] shadow-sm border p -1.5 transition-all ${ dragOver ? 'border-primary ring-1 ring-primary' : 'border-black/10 dark:border-white/10' } ` } >
410+ { /* Input Container */ }
411+ < div className = { `relative bg-white dark:bg-card rounded-2xl shadow-sm border px-3 pt-2.5 pb -1.5 transition-all ${ dragOver ? 'border-primary ring-1 ring-primary' : 'border-black/10 dark:border-white/10' } ` } >
412412 { selectedTarget && (
413- < div className = "px-2.5 pt-2 pb-1" >
413+ < div className = "pb-1.5 " >
414414 < button
415415 type = "button"
416416 onClick = { ( ) => setTargetAgentId ( null ) }
417- className = "inline-flex items-center gap-1.5 rounded-full border border-primary/20 bg-primary/5 px-3 py-1 text-[13px] font-medium text-foreground transition-colors hover:bg-primary/10"
417+ className = "inline-flex items-center gap-1.5 rounded-lg border border-primary/20 bg-primary/5 px-2.5 py-1 text-[13px] font-medium text-foreground transition-colors hover:bg-primary/10"
418418 title = { t ( 'composer.clearTarget' ) }
419419 >
420420 < span > { t ( 'composer.targetChip' , { agent : selectedTarget . name } ) } </ span >
421- < X className = "h-3.5 w-3.5 text-muted-foreground" />
421+ < X className = "h-3 w-3 text-muted-foreground" />
422422 </ button >
423423 </ div >
424424 ) }
425425
426- < div className = "flex items-end gap-1.5" >
426+ { /* Text Row — flush-left */ }
427+ < Textarea
428+ ref = { textareaRef }
429+ value = { input }
430+ onChange = { ( e ) => setInput ( e . target . value ) }
431+ onKeyDown = { handleKeyDown }
432+ onCompositionStart = { ( ) => {
433+ isComposingRef . current = true ;
434+ } }
435+ onCompositionEnd = { ( ) => {
436+ isComposingRef . current = false ;
437+ } }
438+ onPaste = { handlePaste }
439+ placeholder = { disabled ? t ( 'composer.gatewayDisconnectedPlaceholder' ) : '' }
440+ disabled = { disabled }
441+ data-testid = "chat-composer-input"
442+ className = "min-h-[48px] max-h-[240px] resize-none border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none bg-transparent p-0 text-[15px] placeholder:text-muted-foreground/60 leading-relaxed"
443+ rows = { 1 }
444+ />
445+
446+ { /* Action Row — icons on their own line */ }
447+ < div className = "mt-1.5 flex items-center gap-1" >
427448 { /* Attach Button */ }
428449 < Button
429450 variant = "ghost"
430451 size = "icon"
431- className = "shrink-0 h-10 w-10 rounded-full text-muted-foreground hover:bg-black/5 dark:hover:bg-white/10 hover:text-foreground transition-colors"
452+ className = "shrink-0 h-8 w-8 rounded-lg text-muted-foreground hover:bg-black/5 dark:hover:bg-white/10 hover:text-foreground transition-colors"
432453 onClick = { pickFiles }
433454 disabled = { disabled || sending }
434455 title = { t ( 'composer.attachFiles' ) }
435456 >
436- < Paperclip className = "h-4 w-4 " />
457+ < Paperclip className = "h-3.5 w-3.5 " />
437458 </ Button >
438459
439460 { showAgentPicker && (
@@ -442,14 +463,14 @@ export function ChatInput({ onSend, onStop, disabled = false, sending = false, i
442463 variant = "ghost"
443464 size = "icon"
444465 className = { cn (
445- 'h-10 w-10 rounded-full text-muted-foreground hover:bg-black/5 dark:hover:bg-white/10 hover:text-foreground transition-colors' ,
466+ 'h-8 w-8 rounded-lg text-muted-foreground hover:bg-black/5 dark:hover:bg-white/10 hover:text-foreground transition-colors' ,
446467 ( pickerOpen || selectedTarget ) && 'bg-primary/10 text-primary hover:bg-primary/20'
447468 ) }
448469 onClick = { ( ) => setPickerOpen ( ( open ) => ! open ) }
449470 disabled = { disabled || sending }
450471 title = { t ( 'composer.pickAgent' ) }
451472 >
452- < AtSign className = "h-4 w-4 " />
473+ < AtSign className = "h-3.5 w-3.5 " />
453474 </ Button >
454475 { pickerOpen && (
455476 < div className = "absolute left-0 bottom-full z-20 mb-2 w-72 overflow-hidden rounded-2xl border border-black/10 bg-white p-1.5 shadow-xl dark:border-white/10 dark:bg-card" >
@@ -475,35 +496,13 @@ export function ChatInput({ onSend, onStop, disabled = false, sending = false, i
475496 </ div >
476497 ) }
477498
478- { /* Textarea */ }
479- < div className = "flex-1 relative" >
480- < Textarea
481- ref = { textareaRef }
482- value = { input }
483- onChange = { ( e ) => setInput ( e . target . value ) }
484- onKeyDown = { handleKeyDown }
485- onCompositionStart = { ( ) => {
486- isComposingRef . current = true ;
487- } }
488- onCompositionEnd = { ( ) => {
489- isComposingRef . current = false ;
490- } }
491- onPaste = { handlePaste }
492- placeholder = { disabled ? t ( 'composer.gatewayDisconnectedPlaceholder' ) : '' }
493- disabled = { disabled }
494- data-testid = "chat-composer-input"
495- className = "min-h-[40px] max-h-[200px] resize-none border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none bg-transparent py-2.5 px-2 text-[15px] placeholder:text-muted-foreground/60 leading-relaxed"
496- rows = { 1 }
497- />
498- </ div >
499-
500- { /* Send Button */ }
499+ { /* Send Button — pushed to the right */ }
501500 < Button
502501 onClick = { sending ? handleStop : handleSend }
503502 disabled = { sending ? ! canStop : ! canSend }
504503 size = "icon"
505504 data-testid = "chat-composer-send"
506- className = { `shrink-0 h-10 w-10 rounded-full transition-colors ${
505+ className = { `ml-auto shrink-0 h-8 w-8 rounded-lg transition-colors ${
507506 ( sending || canSend )
508507 ? 'bg-black/5 dark:bg-white/10 text-foreground hover:bg-black/10 dark:hover:bg-white/20'
509508 : 'text-muted-foreground/50 hover:bg-transparent bg-transparent'
@@ -512,9 +511,9 @@ export function ChatInput({ onSend, onStop, disabled = false, sending = false, i
512511 title = { sending ? t ( 'composer.stop' ) : t ( 'composer.send' ) }
513512 >
514513 { sending ? (
515- < Square className = "h-4 w-4 " fill = "currentColor" />
514+ < Square className = "h-3.5 w-3.5 " fill = "currentColor" />
516515 ) : (
517- < SendHorizontal className = "h-[18px] w-[18px] " strokeWidth = { 2 } />
516+ < SendHorizontal className = "h-4 w-4 " strokeWidth = { 2 } />
518517 ) }
519518 </ Button >
520519 </ div >
0 commit comments