forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
46 lines (43 loc) · 1.5 KB
/
Copy pathlayout.tsx
File metadata and controls
46 lines (43 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use client";
import "./globals.css";
import "@copilotkit/react-core/v2/styles.css";
import { CopilotKit } from "@copilotkit/react-core/v2";
import { ThemeProvider } from "@/hooks/use-theme";
// A2UI catalog: definitions + renderers in ./declarative-generative-ui/
import { demonstrationCatalog } from "./declarative-generative-ui/renderers";
export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en">
<head>
<title>CopilotKit</title>
<link
rel="icon"
type="image/svg+xml"
href="/copilotkit-logo-mark.svg"
/>
</head>
{/*
suppressHydrationWarning: browser extensions (e.g. Grammarly) inject
attributes like data-gr-ext-installed onto <body> before React hydrates,
which would otherwise surface as a hydration mismatch on first load.
This only relaxes the check for <body>'s own attributes (one level deep);
everything rendered inside <body> is still fully hydration-checked.
*/}
<body className={`antialiased`} suppressHydrationWarning>
<ThemeProvider>
<CopilotKit
runtimeUrl="/api/copilotkit"
inspectorDefaultAnchor={{ horizontal: "right", vertical: "top" }}
a2ui={{ catalog: demonstrationCatalog }}
openGenerativeUI={{}}
useSingleEndpoint={false}
>
{children}
</CopilotKit>
</ThemeProvider>
</body>
</html>
);
}