Clears all statistics data and regenerates empty files

Wrapper function around clearStatistics that provides a more consistent and descriptive name for the IPC interface. This function is the primary entry point for resetting statistics data when called from other parts of the application, particularly from the UI.

The function completely reinitializes the statistics storage, by:

  1. Erasing all collected metrics, patterns, and listening history
  2. Resetting the main statistics file with default values
  3. Deleting all additional statistics files in the statistics directory
  4. Triggering an aggregation process to regenerate empty statistics files

This operation cannot be undone unless the user has previously exported their data.

// Clear all statistics from the UI
ipcRenderer.invoke('statistics:clearAll').then(success => {
if (success) {
refreshDashboard();
}
});
export const clearAllStatistics = async (): Promise<boolean> => {
return await clearStatistics();
};