Spaces:
Sleeping
Sleeping
Download frontend/src/components/layout/ChatLayout.tsx from insight-ai/web: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/spaces/insight-ai/web/resolve/main/frontend/src/components/layout/ChatLayout.tsx
- Command line
-
hf download hf://spaces/insight-ai/web/frontend/src/components/layout/ChatLayout.tsx
-
curl -L -o ChatLayout.tsx https://huggingface.co/spaces/insight-ai/web/resolve/main/frontend/src/components/layout/ChatLayout.tsx
858 Bytes
| import { useState } from "react"; | |
| import { ChatInterface } from "@/components/chat/ChatInterface"; | |
| import { SettingsModal } from "@/components/modals/SettingsModal"; | |
| import { SourcesModal } from "@/components/modals/SourcesModal"; | |
| const ChatLayout = () => { | |
| const [isSettingsOpen, setIsSettingsOpen] = useState(false); | |
| const [isSourcesOpen, setIsSourcesOpen] = useState(false); | |
| return ( | |
| <div className="flex h-[100dvh] md:h-screen w-full"> | |
| <ChatInterface | |
| onOpenSettings={() => setIsSettingsOpen(true)} | |
| onOpenSources={() => setIsSourcesOpen(true)} | |
| /> | |
| <SettingsModal | |
| open={isSettingsOpen} | |
| onOpenChange={setIsSettingsOpen} | |
| /> | |
| <SourcesModal | |
| open={isSourcesOpen} | |
| onOpenChange={setIsSourcesOpen} | |
| /> | |
| </div> | |
| ); | |
| }; | |
| export default ChatLayout; | |