Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

1.2 KB
Raw Blame
import { createRoot } from 'react-dom/client';

import '@fontsource-variable/inter';
import '@fontsource-variable/jetbrains-mono';
import 'harmonyos-sans-sc-webfont-splitted';

import '@/i18n';
import './themes/colors';
import './styles/globals.css';

import { TopLevelErrorBoundary } from './components/error/TopLevelErrorBoundary';
import { ResourceUsageWindowRoot } from './components/resource-usage/ResourceUsageWindowLayout';
import { applyFontSettings, getInitialFontSettings } from './hooks/useFontSettings';
import { getInitialThemeVariant } from './hooks/useTheme';
import { bootstrapLocalThemesSync } from './themes/local-themes';
import { themeService } from './themes/theme-service';
import { installHiddenAnimationGate } from './lib/hiddenAnimationGate';

document.documentElement.dataset.platform = window.electronAPI.platform;
installHiddenAnimationGate();
bootstrapLocalThemesSync();
themeService.applyTheme(getInitialThemeVariant().theme);
applyFontSettings(getInitialFontSettings());

const rootElement = document.getElementById('root');
if (!rootElement) throw new Error('Missing #root element');

createRoot(rootElement).render(
  <TopLevelErrorBoundary>
    <ResourceUsageWindowRoot />
  </TopLevelErrorBoundary>,
);