cleanupOldMessageFilesInBackground function
Run all cleanup operations in the background.
Implementation
Future<void> cleanupOldMessageFilesInBackground() async {
// Guard: skip if settings have validation errors but cleanupPeriodDays
// was explicitly set.
if (_rawSettingsContainsKey('cleanupPeriodDays')) {
// Check for settings validation errors would go here.
// Simplified: we always proceed in the Dart port.
}
await cleanupOldMessageFiles();
await cleanupOldSessionFiles();
await cleanupOldPlanFiles();
await cleanupOldFileHistoryBackups();
await cleanupOldSessionEnvDirs();
await cleanupOldDebugLogs();
}