diff --git a/libs/copilot/src/components/Header.tsx b/libs/copilot/src/components/Header.tsx index 843026c3f6..3d6a3732f1 100644 --- a/libs/copilot/src/components/Header.tsx +++ b/libs/copilot/src/components/Header.tsx @@ -3,6 +3,8 @@ import { IconButton, Stack } from '@mui/material'; import ExpandIcon from '@chainlit/app/src/assets/expand'; import MinimizeIcon from '@chainlit/app/src/assets/minimize'; import { Logo } from '@chainlit/app/src/components/atoms/logo'; +import AudioPresence from '@chainlit/app/src/components/organisms/chat/inputBox/AudioPresence'; +import { useAudio } from '@chainlit/react-client/src'; import ChatProfiles from './ChatProfiles'; import NewChatButton from './NewChatButton'; @@ -12,30 +14,43 @@ interface Props { setExpanded: (expanded: boolean) => void; } -const Header = ({ expanded, setExpanded }: Props): JSX.Element => ( - - - - setExpanded(!expanded)}> - {expanded ? ( - - ) : ( - - )} - - - - - +const Header = ({ expanded, setExpanded }: Props): JSX.Element => { + const { audioConnection } = useAudio(); + + return ( + + + + setExpanded(!expanded)}> + {expanded ? ( + + ) : ( + + )} + + + + {audioConnection === 'on' ? ( + + ) : null} + + + - -); + ); +}; export default Header;