diff --git a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx index 351a77aa..0e94f8f1 100644 --- a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx +++ b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx @@ -54,6 +54,7 @@ interface ChatHistory { agent_avatar: string; compressed: boolean; created: string; + showSidePanel: (isEnabled: boolean) => void; } import { @@ -349,7 +350,9 @@ function SessionsAndFiles(props: SessionsAndFilesProps) { conversation_id={chatHistory.conversation_id} slug={chatHistory.slug} agent_avatar={chatHistory.agent_avatar} - agent_name={chatHistory.agent_name} /> + agent_name={chatHistory.agent_name} + showSidePanel={props.setEnabled} + /> ))} ))} @@ -357,7 +360,7 @@ function SessionsAndFiles(props: SessionsAndFilesProps) { { (props.data && props.data.length > 5) && ( - + ) } @@ -527,7 +530,7 @@ function ChatSession(props: ChatHistory) { onMouseLeave={() => setIsHovered(false)} key={props.conversation_id} className={`${styles.session} ${props.compressed ? styles.compressed : '!max-w-full'} ${isHovered ? `${styles.sessionHover}` : ''}`}> - + props.showSidePanel(false)}>

{props.slug || "New Conversation 🌱"}

@@ -537,9 +540,10 @@ function ChatSession(props: ChatHistory) { interface ChatSessionsModalProps { data: GroupedChatHistory | null; + showSidePanel: (isEnabled: boolean) => void; } -function ChatSessionsModal({ data }: ChatSessionsModalProps) { +function ChatSessionsModal({ data, showSidePanel }: ChatSessionsModalProps) { return ( + agent_name={chatHistory.agent_name} + showSidePanel={showSidePanel}/> ))} ))} @@ -718,8 +723,7 @@ export default function SidePanel(props: SidePanelProps) { height={40} /> { - authenticatedData && - isMobileWidth ? + authenticatedData && isMobileWidth && enabled ?