function Counter() { const [count, setCount] = useState(0); const increment = () => { fetch('http://localhost:54321',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({sessionId:'sess8x7k2p',time:new Date().toTimeString().split(' ')[0],type:'before-increment',data:{count}})}).catch(()=>{}); setCount(c => c + 1); };
async function fetchData(userId) { fetch('http://localhost:54321',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({sessionId:'sessa1b2c3',time:new Date().toTimeString().split(' ')[0],type:'fetch-start',data:{userId}})}).catch(()=>{});
try { const response = await fetch(/api/users/${userId}); fetch('http://localhost:54321',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({sessionId:'sessa1b2c3',time:new Date().toTimeString().split(' ')[0],type:'fetch-response',data:{status:response.status,ok:response.ok}})}).catch(()=>{});
Решение для совместной отладки искусственного интеллекта. Преобразование console.log в HTTP-запросы для сбора логов; после того, как пользователь завершит работу, ИИ сможет просматривать и анализировать их самостоятельно — скриншоты или копирование с консоли не требуются. Поддерживает Claude Code, OpenCode, Cursor. Источник: dimple-smile/agent-skills.