()
| 289 | |
| 290 | /** Clear all log files */ |
| 291 | export async function clearLogs(): Promise<void> { |
| 292 | _pendingLines = []; |
| 293 | try { |
| 294 | const platform = getPlatformService(); |
| 295 | await ensureLogDir(); |
| 296 | // Delete current day's log |
| 297 | const todayPath = await getLogFilePath(getTodayDateStr()); |
| 298 | if (await platform.exists(todayPath)) { |
| 299 | await platform.deleteFile(todayPath); |
| 300 | } |
| 301 | } catch { |
| 302 | // Ignore |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | /** Install console/error capture into the file-based log system. Safe to call more than once. */ |
| 307 | export function installFeedbackLogCapture(): () => void { |
no test coverage detected