chore: remove monitor debug logs and add log clear action

This commit is contained in:
superclaw
2026-03-14 14:16:03 +08:00
parent 8d5527990b
commit 731f022669
8 changed files with 61 additions and 10 deletions

View File

@@ -972,6 +972,17 @@ function registerIpcHandlers() {
}
})
ipcMain.handle('log:clear', async () => {
try {
const logPath = join(app.getPath('userData'), 'logs', 'wcdb.log')
await mkdir(dirname(logPath), { recursive: true })
await writeFile(logPath, '', 'utf8')
return { success: true }
} catch (e) {
return { success: false, error: String(e) }
}
})
ipcMain.handle('diagnostics:getExportCardLogs', async (_, options?: { limit?: number }) => {
return exportCardDiagnosticsService.snapshot(options?.limit)
})