import { Suspense, lazy } from 'react' import { BrowserRouter, Routes, Route } from 'react-router-dom' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { ConfigProvider } from 'antd' import zhCN from 'antd/locale/zh_CN' import { AuthProvider } from './contexts/AuthContext' import AuthGuard from './components/AuthGuard' import PermissionGuard from './components/PermissionGuard' import PageLoading from './components/PageLoading' import AdminLayout from './layouts/AdminLayout' const Login = lazy(() => import('./pages/Login')) const KnowledgeBasesPage = lazy(() => import('./pages/KnowledgeBases')) const BillingPage = lazy(() => import('./pages/Billing')) const GiteaEmbed = lazy(() => import('./pages/GiteaEmbed')) const ConfigPage = lazy(() => import("./pages/Config")) const AiGatewayPage = lazy(() => import("./pages/AiGateway")) const CSPage = lazy(() => import("./pages/ContentSafety")) const MetricsPage = lazy(() => import("./pages/Metrics")) const EventsPage = lazy(() => import("./pages/Events")) const ServersPage = lazy(() => import("./pages/Servers")) const AuditLogPage = lazy(() => import("./pages/AuditLog")) const Dashboard = lazy(() => import('./pages/Dashboard')) const UserManagement = lazy(() => import('./pages/UserManagement')) const HermesSettings = lazy(() => import('./pages/HermesSettings')) const TaskAssistant = lazy(() => import('./pages/TaskAssistant')) const Placeholder = lazy(() => import('./pages/Placeholder')) const ForbiddenPage = lazy(() => import('./pages/403')) const NotFoundPage = lazy(() => import('./pages/404')) const ServerErrorPage = lazy(() => import('./pages/500')) const queryClient = new QueryClient() function App() { return ( }> } /> } /> } /> } /> } > } /> } /> }>} /> } /> } /> } /> } /> }>} /> } /> } /> }>} /> } /> }>} /> }>} /> }> } /> }>} /> }>} /> }>} /> }>} /> }>} /> }> } /> }> } /> } /> ) } export default App