feat: implement CLI interface for headless profiling and report viewing

This commit is contained in:
2026-02-23 01:35:16 +01:00
parent 47452d9330
commit e6c5adca5e
4 changed files with 197 additions and 99 deletions

View File

@@ -92,6 +92,20 @@ function App() {
const [report, setReport] = useState<ProfilingReport | null>(null);
useEffect(() => {
// Check for initial report (from CLI args)
const checkInitialReport = async () => {
try {
const data = await invoke<ProfilingReport | null>('get_initial_report');
if (data) {
setReport(data);
setView('report');
}
} catch (e) {
console.error('Failed to get initial report:', e);
}
};
checkInitialReport();
const fetchStats = async () => {
try {
const isRecording = stats?.is_recording ?? false;