diff --git a/src/lib/components/common/PruneDataDialog.svelte b/src/lib/components/common/PruneDataDialog.svelte index 10a29d2594..1dd11e984a 100644 --- a/src/lib/components/common/PruneDataDialog.svelte +++ b/src/lib/components/common/PruneDataDialog.svelte @@ -22,6 +22,10 @@ let delete_orphaned_notes = true; let delete_orphaned_folders = true; + // Audio cache cleanup + let cleanupAudioCache = true; + let audio_cache_max_age_days = 30; + let showDetailsExpanded = false; let activeDetailsTab = 'chats'; let activeSettingsTab = 'chats'; @@ -41,7 +45,8 @@ delete_orphaned_knowledge_bases, delete_orphaned_models, delete_orphaned_notes, - delete_orphaned_folders + delete_orphaned_folders, + audio_cache_max_age_days: cleanupAudioCache ? audio_cache_max_age_days : null }); show = false; }; @@ -62,7 +67,8 @@ Authorization: Bearer "delete_orphaned_knowledge_bases": ${delete_orphaned_knowledge_bases}, "delete_orphaned_models": ${delete_orphaned_models}, "delete_orphaned_notes": ${delete_orphaned_notes}, - "delete_orphaned_folders": ${delete_orphaned_folders} + "delete_orphaned_folders": ${delete_orphaned_folders}, + "audio_cache_max_age_days": ${cleanupAudioCache ? audio_cache_max_age_days : null} }`; const copyApiCall = () => { @@ -207,10 +213,10 @@ Authorization: Bearer {:else if activeDetailsTab === 'imagesaudio'}

{$i18n.t('Images & Audio Content Cleanup:')}

-

• {$i18n.t('TBD - Image cleanup functionality')}

-

• {$i18n.t('TBD - Audio cleanup functionality')}

-

• {$i18n.t('TBD - Orphaned images and audio files')}

-

• {$i18n.t('TBD - Media processing cache cleanup')}

+

• {$i18n.t('Generated images: Already integrated with file system - orphaned images are automatically cleaned up when chats are deleted')}

+

• {$i18n.t('Uploaded images: Already integrated with file system - orphaned images are automatically cleaned up based on active references')}

+

• {$i18n.t('Audio cache cleanup: Remove old text-to-speech (TTS) generated audio files and speech-to-text (STT) transcription files')}

+

• {$i18n.t('Audio recordings and transcriptions: Clean up cached audio files older than specified days')}

{:else if activeDetailsTab === 'system'}
@@ -261,7 +267,7 @@ Authorization: Bearer {$i18n.t('Configure what data should be cleaned up during the pruning process.')}

- +
+
- +
{#if activeSettingsTab === 'chats'} @@ -508,6 +520,61 @@ Authorization: Bearer
+ + {:else if activeSettingsTab === 'audio'} + +
+
+
+
+ +
+
+
+ {$i18n.t('Clean audio cache')} +
+
+ {$i18n.t('Remove old audio cache files (TTS and STT recordings)')} +
+
+
+
+ + + {#if cleanupAudioCache} +
+
+ +
+ + {$i18n.t('days')} +
+

+ {$i18n.t('Remove cached TTS (text-to-speech) and STT (speech-to-text) files older than specified days')} +

+
+ +
+
+ {$i18n.t('Audio Cache Types:')} +
+
+

{$i18n.t('TTS Files:')} {$i18n.t('Generated audio files when AI speaks text to you')}

+

{$i18n.t('STT Files:')} {$i18n.t('Uploaded audio files for transcription (voice messages)')}

+

{$i18n.t('Metadata:')} {$i18n.t('Associated JSON files with transcription data')}

+
+
+
+ {/if} +
{/if}