import { ShieldCheck } from 'lucide-react' import { lazy, Suspense } from 'react' import { BrowserRouter, Navigate, NavLink, Route, Routes } from 'react-router' import { ChatProvider } from '@/hooks/ChatProvider' import { cn } from '@/lib/utils' import { AskPage } from '@/pages/AskPage' import { AboutPage } from '@/pages/AboutPage' // The Evals page carries the chart library (~150 kB gzip): loaded only when opened, so // the chat stays light. const EvalsPage = lazy(() => import('@/pages/EvalsPage').then((m) => ({ default: m.EvalsPage }))) // The Architecture page carries the graph library: also loaded only when opened. const ArchitecturePage = lazy(() => import('@/pages/ArchitecturePage').then((m) => ({ default: m.ArchitecturePage }))) const PAGES = [ { to: '/ask', label: 'Ask' }, { to: '/evals', label: 'Evals' }, { to: '/architecture', label: 'Architecture' }, { to: '/about', label: 'About' }, ] /** The shell: a slim header with the pages, then the page filling the rest of the screen * (the Ask page is a full-height chat). The server sends index.html for any of these * paths (api.SpaFiles), so a reload keeps the page. */ export default function App() { return (
CoverageCheck
} /> } /> Loading the results…
}> } /> Loading the architecture…}> } /> } /> } />
) }