mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
- Remove GitHub remote loading to eliminate 404 errors in development - Implement automatic cache invalidation when TOOLS.md is updated - Add file watcher system for real-time cache refresh - Create useToolsUpdates hook for reactive UI components - Ensure AI Config page immediately reflects updated tool data - Auto-dispatch tools-updated events for seamless UI synchronization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
// IMPORTANT: Polyfills must be imported FIRST
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
|
|
import App from './App';
|
|
import ErrorReportNotification from './components/ErrorReportNotification';
|
|
import './index.css';
|
|
import './polyfills';
|
|
import { initSentry } from './services/analytics';
|
|
import { setupDesktopDeepLinkListener } from './utils/desktopDeepLinkListener';
|
|
import { startToolsFileWatcher } from './lib/tools/file-watcher';
|
|
|
|
// Initialize Sentry early (before React renders)
|
|
initSentry();
|
|
|
|
// Deep link listener — try/catch handles non-Tauri environments
|
|
setupDesktopDeepLinkListener().catch(err => {
|
|
console.error('[DeepLink] setup error:', err);
|
|
});
|
|
|
|
// Start file watcher for automatic TOOLS.md cache invalidation
|
|
startToolsFileWatcher();
|
|
|
|
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
<React.StrictMode>
|
|
<App />
|
|
</React.StrictMode>
|
|
);
|
|
|
|
// Mount error notification in an isolated React root so it survives App crashes
|
|
const errorRoot = document.createElement('div');
|
|
errorRoot.id = 'error-report-root';
|
|
document.body.appendChild(errorRoot);
|
|
ReactDOM.createRoot(errorRoot).render(<ErrorReportNotification />);
|