File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ import WindowButton from "./WindowButton";
2424import PDFButton from "./pdf/PDFButton" ;
2525import FadeIn from "./motions/FadeIn" ;
2626import type { Message } from "../types/agentTypes" ;
27+ import clsx from "clsx" ;
2728
2829interface ChatWindowProps extends HeaderProps {
2930 children ?: ReactNode ;
3031 className ?: string ;
3132 showDonation : boolean ;
33+ fullscreen ?: boolean ;
3234}
3335
3436const messageListId = "chat-window-message-list" ;
@@ -40,6 +42,7 @@ const ChatWindow = ({
4042 title,
4143 showDonation,
4244 onSave,
45+ fullscreen,
4346} : ChatWindowProps ) => {
4447 const [ hasUserScrolled , setHasUserScrolled ] = useState ( false ) ;
4548 const scrollRef = useRef < HTMLDivElement > ( null ) ;
@@ -73,7 +76,11 @@ const ChatWindow = ({
7376 >
7477 < MacWindowHeader title = { title } messages = { messages } onSave = { onSave } />
7578 < div
76- className = "window-heights mb-2 mr-2"
79+ className = { clsx (
80+ "mb-2 mr-2 " ,
81+ ( fullscreen && "max-h-[75vh] flex-grow overflow-auto" ) ||
82+ "window-heights"
83+ ) }
7784 ref = { scrollRef }
7885 onScroll = { handleScroll }
7986 id = { messageListId }
Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import clsx from "clsx" ;
23
34interface DottedGridBackgroundProps {
45 children : React . ReactNode ;
@@ -9,12 +10,7 @@ const DottedGridBackground = ({
910 children,
1011 className,
1112} : DottedGridBackgroundProps ) => {
12- return (
13- < div className = { `${ className ? className + " " : "" } background` } >
14- < div className = "lower-gradient" />
15- { children }
16- </ div >
17- ) ;
13+ return < div className = { clsx ( className , "background" ) } > { children } </ div > ;
1814} ;
1915
2016export default DottedGridBackground ;
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ const AgentPage: NextPage = () => {
4242 messages = { messages }
4343 title = { getAgent ?. data ?. name }
4444 showDonation = { false }
45- className = { "min-h-[80vh] md:w-[80%]" }
45+ className = "min-h-[80vh] md:w-[80%]"
46+ fullscreen
4647 />
4748 < div className = "flex flex-row gap-2" >
4849 < Button
You can’t perform that action at this time.
0 commit comments