// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // SPDX-License-Identifier: MIT import "~/styles/globals.css"; import { type Metadata } from "next"; import { Geist } from "next/font/google"; import Script from "next/script"; import { ThemeProviderWrapper } from "~/components/deer-flow/theme-provider-wrapper"; import { loadConfig } from "~/core/api/config"; import { env } from "~/env"; import { Toaster } from "../components/deer-flow/toaster"; export const metadata: Metadata = { title: "🦌 DeerFlow", description: "Deep Exploration and Efficient Research, an AI tool that combines language models with specialized tools for research tasks.", icons: [{ rel: "icon", url: "/favicon.ico" }], }; const geist = Geist({ subsets: ["latin"], variable: "--font-geist-sans", }); export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { const conf = await loadConfig(); return ( {/* Define isSpace function globally to fix markdown-it issues with Next.js + Turbopack https://github.com/markdown-it/markdown-it/issues/1082#issuecomment-2749656365 */} {children} { // NO USER BEHAVIOR TRACKING OR PRIVATE DATA COLLECTION BY DEFAULT // // When `NEXT_PUBLIC_STATIC_WEBSITE_ONLY` is `true`, the script will be injected // into the page only when `AMPLITUDE_API_KEY` is provided in `.env` } {env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY && env.AMPLITUDE_API_KEY && ( <> )} ); }