MCPcopy
hub / github.com/7836246/cursor2api / clearLogs

Function clearLogs

public/logs.js:411–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

409
410// ===== Clear logs =====
411async function clearLogs(){
412 if(!confirm('确定清空所有日志?此操作不可恢复。'))return;
413 try{
414 await fetch(authQ('/api/logs/clear'),{method:'POST'});
415 reqs=[];rmap={};logs=[];selId=null;curPayload=null;
416 renderRL();updCnt();updStats();desel();
417 }catch(e){console.error(e)}
418}
419
420// ===== Keyboard =====
421document.addEventListener('keydown',e=>{

Callers

nothing calls this directly

Calls 6

authQFunction · 0.85
renderRLFunction · 0.85
updCntFunction · 0.85
updStatsFunction · 0.85
deselFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected