Files
openhuman/src/main.tsx
T
cyrusandClaude c00ba2f045 feat: implement automatic TOOLS.md cache synchronization with bundled-only loading
- 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>
2026-03-06 16:09:36 +05:30

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 />);