@@ -31,13 +31,15 @@ interface ChatPanelProps {
3131 onToggleVisibility : ( ) => void ;
3232 drawioUi : "min" | "sketch" ;
3333 onToggleDrawioUi : ( ) => void ;
34+ isMobile ?: boolean ;
3435}
3536
3637export default function ChatPanel ( {
3738 isVisible,
3839 onToggleVisibility,
3940 drawioUi,
4041 onToggleDrawioUi,
42+ isMobile = false ,
4143} : ChatPanelProps ) {
4244 const {
4345 loadDiagram : onDisplayChart ,
@@ -410,8 +412,8 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
410412 ) ;
411413 } ;
412414
413- // Collapsed view
414- if ( ! isVisible ) {
415+ // Collapsed view (desktop only)
416+ if ( ! isVisible && ! isMobile ) {
415417 return (
416418 < div className = "h-full flex flex-col items-center pt-4 bg-card border border-border/30 rounded-xl" >
417419 < ButtonWithTooltip
@@ -445,35 +447,39 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
445447 style = { { position : "absolute" } }
446448 />
447449 { /* Header */ }
448- < header className = "px-5 py-4 border-b border-border/50" >
450+ < header className = { ` ${ isMobile ? "px-3 py-2" : "px- 5 py-4" } border-b border-border/50` } >
449451 < div className = "flex items-center justify-between" >
450- < div className = "flex items-center gap-3 " >
452+ < div className = "flex items-center gap-2 " >
451453 < div className = "flex items-center gap-2" >
452454 < Image
453455 src = "/favicon.ico"
454456 alt = "Next AI Drawio"
455- width = { 28 }
456- height = { 28 }
457+ width = { isMobile ? 24 : 28 }
458+ height = { isMobile ? 24 : 28 }
457459 className = "rounded"
458460 />
459- < h1 className = "text-base font-semibold tracking-tight whitespace-nowrap" >
461+ < h1 className = { ` ${ isMobile ? "text-sm" : "text- base" } font-semibold tracking-tight whitespace-nowrap` } >
460462 Next AI Drawio
461463 </ h1 >
462464 </ div >
463- < Link
464- href = "/about"
465- className = "text-sm text-muted-foreground hover:text-foreground transition-colors ml-2"
466- >
467- About
468- </ Link >
469- < ButtonWithTooltip
470- tooltipContent = "Recent generation failures were caused by our AI provider's infrastructure issue, not the app code. After extensive debugging, I've switched providers and observed 6 hours of stability. If issues persist, please report on GitHub."
471- variant = "ghost"
472- size = "icon"
473- className = "h-6 w-6 text-green-500 hover:text-green-600"
474- >
475- < CheckCircle className = "h-4 w-4" />
476- </ ButtonWithTooltip >
465+ { ! isMobile && (
466+ < Link
467+ href = "/about"
468+ className = "text-sm text-muted-foreground hover:text-foreground transition-colors ml-2"
469+ >
470+ About
471+ </ Link >
472+ ) }
473+ { ! isMobile && (
474+ < ButtonWithTooltip
475+ tooltipContent = "Recent generation failures were caused by our AI provider's infrastructure issue, not the app code. After extensive debugging, I've switched providers and observed 6 hours of stability. If issues persist, please report on GitHub."
476+ variant = "ghost"
477+ size = "icon"
478+ className = "h-6 w-6 text-green-500 hover:text-green-600"
479+ >
480+ < CheckCircle className = "h-4 w-4" />
481+ </ ButtonWithTooltip >
482+ ) }
477483 </ div >
478484 < div className = "flex items-center gap-1" >
479485 < a
@@ -482,7 +488,7 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
482488 rel = "noopener noreferrer"
483489 className = "p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-accent transition-colors"
484490 >
485- < FaGithub className = "w-5 h-5" />
491+ < FaGithub className = { ` ${ isMobile ? "w-4 h-4" : "w- 5 h-5"} ` } />
486492 </ a >
487493 { accessCodeRequired && (
488494 < ButtonWithTooltip
@@ -492,18 +498,20 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
492498 onClick = { ( ) => setShowSettingsDialog ( true ) }
493499 className = "hover:bg-accent"
494500 >
495- < Settings className = "h-5 w-5 text-muted-foreground" />
501+ < Settings className = { `${ isMobile ? "h-4 w-4" : "h-5 w-5" } text-muted-foreground` } />
502+ </ ButtonWithTooltip >
503+ ) }
504+ { ! isMobile && (
505+ < ButtonWithTooltip
506+ tooltipContent = "Hide chat panel (Ctrl+B)"
507+ variant = "ghost"
508+ size = "icon"
509+ onClick = { onToggleVisibility }
510+ className = "hover:bg-accent"
511+ >
512+ < PanelRightClose className = "h-5 w-5 text-muted-foreground" />
496513 </ ButtonWithTooltip >
497514 ) }
498- < ButtonWithTooltip
499- tooltipContent = "Hide chat panel (Ctrl+B)"
500- variant = "ghost"
501- size = "icon"
502- onClick = { onToggleVisibility }
503- className = "hover:bg-accent"
504- >
505- < PanelRightClose className = "h-5 w-5 text-muted-foreground" />
506- </ ButtonWithTooltip >
507515 </ div >
508516 </ div >
509517 </ header >
@@ -521,7 +529,7 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
521529 </ main >
522530
523531 { /* Input */ }
524- < footer className = "p-4 border-t border-border/50 bg-card/50" >
532+ < footer className = { ` ${ isMobile ? "p-2" : "p-4" } border-t border-border/50 bg-card/50` } >
525533 < ChatInput
526534 input = { input }
527535 status = { status }
0 commit comments