// audit.jsx — AI 가상 심사관: 트랙 문서를 심사관 관점으로 검토 → 지적사항 리포트 const { Icon, Pill, Button } = window.RAlly; const SEV = { Critical: { label: 'Critical', bg: '#f3ded7', fg: '#b94a2c' }, Major: { label: 'Major', bg: '#fbf0d8', fg: '#9a6a12' }, Minor: { label: 'Minor', bg: '#e7e3da', fg: '#5a6068' }, }; const Audit = ({ go }) => { const [res, setRes] = React.useState(null); const [busy, setBusy] = React.useState(false); const [useLlm, setUseLlm] = React.useState(false); const runAudit = () => { setBusy(true); setRes(null); window.RAlly.resolveTrackId().then((tid) => { if (!tid) { setBusy(false); return; } fetch('/api/track/' + tid + '/audit', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ use_llm: useLlm }), }).then((r) => r.json()).then((d) => { setRes(d); setBusy(false); }).catch(() => setBusy(false)); }); }; const c = res ? res.counts : null; return (