feat: implement CLI interface for headless profiling and report viewing
This commit is contained in:
14
src/App.tsx
14
src/App.tsx
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user