mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-29 11:42:04 +00:00
Add the in-window floating pet (sprite, speech bubble, contact shadow, profile-scoped, resize-safe) and a pop-out always-on-top overlay window with gestures and notifications. Add the Cmd+K pet picker page plus the appearance gallery and size slider in settings. Includes the pet stores, electron overlay wiring, i18n strings, and store tests.
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
import './styles.css'
|
|
// Side-effect: applies the persisted window translucency on load.
|
|
import './store/translucency'
|
|
|
|
import { QueryClientProvider } from '@tanstack/react-query'
|
|
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import { HashRouter } from 'react-router-dom'
|
|
|
|
import App from './app'
|
|
import { ErrorBoundary } from './components/error-boundary'
|
|
import { HapticsProvider } from './components/haptics-provider'
|
|
import { I18nProvider } from './i18n'
|
|
import { installClipboardShim } from './lib/clipboard'
|
|
import { queryClient } from './lib/query-client'
|
|
import { ThemeProvider } from './themes/context'
|
|
|
|
installClipboardShim()
|
|
|
|
// Dev-only: install __PERF_DRIVE__ + __PERF_PROBE__ on window so the
|
|
// scripts/ harnesses can drive a synthetic stream + record render cost.
|
|
// Tree-shaken out of production builds. (Uses MODE rather than DEV because
|
|
// our Vite setup currently bundles with PROD=true even in `vite dev`; see
|
|
// scripts/dev-no-hmr.mjs for the surrounding workarounds.)
|
|
if (import.meta.env.MODE !== 'production') {
|
|
import('./app/chat/perf-probe')
|
|
}
|
|
|
|
// The pet overlay rides this same bundle (`?win=overlay`) but mounts a tiny,
|
|
// transparent, gateway-less surface instead of the full app. Branch before any
|
|
// app-shell work so the overlay window stays cheap.
|
|
if (new URLSearchParams(window.location.search).get('win') === 'overlay') {
|
|
void import('./app/pet-overlay/overlay-root').then(({ mountPetOverlay }) => mountPetOverlay())
|
|
} else {
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<ErrorBoundary label="root">
|
|
<QueryClientProvider client={queryClient}>
|
|
<I18nProvider>
|
|
<ThemeProvider>
|
|
<HapticsProvider>
|
|
<HashRouter>
|
|
<App />
|
|
</HashRouter>
|
|
</HapticsProvider>
|
|
</ThemeProvider>
|
|
</I18nProvider>
|
|
</QueryClientProvider>
|
|
</ErrorBoundary>
|
|
</StrictMode>
|
|
)
|
|
}
|