MCPcopy Create free account
hub / github.com/codeaashu/claude-code / ChatLayout

Function ChatLayout

web/components/chat/ChatLayout.tsx:12–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10import { AnnouncerProvider } from "@/components/a11y/Announcer";
11
12export function ChatLayout() {
13 const { conversations, createConversation, activeConversationId } = useChatStore();
14
15 useEffect(() => {
16 if (conversations.length === 0) {
17 createConversation();
18 }
19 }, []);
20
21 return (
22 <AnnouncerProvider>
23 <SkipToContent />
24 <div className="flex h-screen bg-surface-950 text-surface-100">
25 <Sidebar />
26 <div className="flex flex-col flex-1 min-w-0">
27 <Header />
28 <main
29 id="main-content"
30 aria-label="Chat"
31 className="flex flex-col flex-1 min-h-0"
32 >
33 {activeConversationId ? (
34 <>
35 <ChatWindow conversationId={activeConversationId} />
36 <ChatInput conversationId={activeConversationId} />
37 </>
38 ) : (
39 <div className="flex-1 flex items-center justify-center text-surface-500">
40 Select or create a conversation
41 </div>
42 )}
43 </main>
44 </div>
45 </div>
46 </AnnouncerProvider>
47 );
48}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected