import { HeadContent, Scripts, createRootRoute } from "@tanstack/react-router";
import { RootProvider } from "fumadocs-ui/provider/tanstack";
import appCss from "../styles.css?url";
export const Route = createRootRoute({
head: () => ({
meta: [
{
charSet: "utf-8",
},
{
name: "viewport",
content: "width=device-width, initial-scale=1",
},
{
title: "chat-rs — a runtime for model interaction",
},
{
name: "description",
content:
"chat-rs is a Rust runtime for model interaction: one consistent set of primitives — messages, content, tools, streams, events, embeddings — across every provider, modality, and deployment target.",
},
],
links: [
{
rel: "stylesheet",
href: appCss,
},
{
rel: "preconnect",
href: "https://fonts.googleapis.com",
},
{
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossOrigin: "anonymous",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Orbit&display=swap",
},
],
}),
shellComponent: RootDocument,
});
function RootDocument({ children }: { children: React.ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<HeadContent />
</head>
<body className="flex flex-col min-h-screen">
<RootProvider theme={{ defaultTheme: "dark", enableSystem: false }}>
{children}
</RootProvider>
<Scripts />
</body>
</html>
);
}