MCPcopy
hub / github.com/Zleap-AI/SAG / clearModelLogs

Function clearModelLogs

web/src/App.tsx:448–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

446 }
447
448 async function clearModelLogs() {
449 try {
450 const response = await api.listModelCallLogs(modelLogCursorRef.current);
451 if (response.latestSequence !== modelLogCursorRef.current) {
452 modelLogCursorRef.current = response.latestSequence;
453 setModelLogCursor(response.latestSequence);
454 }
455 } catch (err) {
456 console.warn("Failed to sync model log cursor before clearing", err);
457 }
458 setModelLogs([]);
459 window.localStorage.removeItem(MODEL_LOGS_STORAGE_KEY);
460 window.localStorage.setItem(MODEL_LOG_CURSOR_STORAGE_KEY, String(modelLogCursorRef.current));
461 setStatus(t("已清空浏览器缓存中的原始日志", "Raw logs in browser cache have been cleared"));
462 }
463
464 async function createProject() {
465 const name = newProjectName.trim();

Callers 1

AppShellFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected