diff --git a/components/chat.tsx b/components/chat.tsx index 34e92244..817807a4 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -75,16 +75,12 @@ export function Chat({ id }: ChatProps) { if (isMobile) { return ( {/* Add Provider */} + {/* The order of components here is critical for mobile layout. + Using a flex column, the .mobile-chat-messages-area is set to flex: 1 + which allows it to take up the remaining space. The other components + have fixed heights, so for the chat area to scroll properly, it must + be rendered before the fixed-height elements. */}
-
- {activeView ? : } -
-
- -
-
- -
{showEmptyScreen ? ( )}
+
+ +
+
+ +
+
+ {activeView ? : } +
);