MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / clearAllLogs

Function clearAllLogs

static/js/logs.js:205–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203}
204
205async function clearAllLogs() {
206 const ok = await confirm("确认清空全部后台日志吗?该操作不可恢复。", "清空后台日志");
207 if (!ok) return;
208
209 try {
210 loading.show(el.clearLogsBtn, "清空中...");
211 const data = await api.delete("/logs?confirm=true");
212 toast.success(`清空完成:删除 ${data.deleted_total || 0} 条`);
213 logsState.page = 1;
214 await Promise.all([loadLogs(true), loadStats(true)]);
215 setLogsSummary();
216 } catch (error) {
217 toast.error(`清空失败: ${error?.message || error}`);
218 } finally {
219 loading.hide(el.clearLogsBtn);
220 }
221}
222
223function restartAutoRefresh() {
224 if (logsState.timer) {

Callers

nothing calls this directly

Calls 10

confirmFunction · 0.85
loadLogsFunction · 0.85
setLogsSummaryFunction · 0.85
successMethod · 0.80
allMethod · 0.80
errorMethod · 0.80
hideMethod · 0.80
loadStatsFunction · 0.70
showMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected