// ── window.__hermes: HMR-safe runtime store ──
// Ensure object exists (may have been created by composable imports first).
// Console hook only installs once (guarded by _origConsole).
const _h = (window as any).__hermes || ((window as any).__hermes = {});
if (!_h._origConsole) {
    const MAX = 200;
    const buf: any[] = _h.console || [];
    const orig = { log: console.log, warn: console.warn, error: console.error, info: console.info, debug: console.debug };
    for (const [level, fn] of Object.entries(orig)) {
        (console as any)[level] = (...args: any[]) => {
            buf.push({ t: Date.now(), l: level, m: args.map(a => typeof a === 'string' ? a : JSON.stringify(a)).join(' ') });
            if (buf.length > MAX) buf.splice(0, buf.length - MAX);
            fn.apply(console, args);
        };
    }
    _h.console = buf;
    _h._origConsole = orig;
}

import { createApp } from 'vue';
import { createPinia } from 'pinia';
import 'overlayscrollbars/overlayscrollbars.css';
import '../css/tailwind.css';
import '../css/base.css';
import '../css/scrollbar.css';
import '../css/layout.css';
import '../css/sidebar.css';
import '../css/components.css';
import '../css/markdown.css';
import '../css/views/agents.css';
import '../css/views/home.css';
import '../css/views/login.css';
import '../css/views/dev.css';
import App from './App.vue';
import router from './router';

const app = createApp(App);
app.use(createPinia());
app.use(router);
app.mount('#app');
