Added a feature to clean compleeted tasks either Never, 24 hours, 7 days or 30 days

This commit is contained in:
2025-12-17 21:43:11 +01:00
parent e7557af55a
commit 730d99fc80
3 changed files with 62 additions and 1 deletions

View File

@@ -13,6 +13,20 @@ export class TaskWeaverSettingTab extends PluginSettingTab {
const { containerEl } = this;
containerEl.empty();
new Setting(containerEl)
.setName("Clear completed tasks")
.setDesc("Automatically remove completed tasks after a specified period")
.addDropdown(dropdown => dropdown
.addOption("never", "Never")
.addOption("1day", "After 24 hours")
.addOption("7days", "After 7 days")
.addOption("30days", "After 30 days")
.setValue(this.plugin.settings.completedTaskRetention)
.onChange(async (value) => {
this.plugin.settings.completedTaskRetention = value as any;
await this.plugin.saveSettings();
}));
new Setting(containerEl)
.setName("Enable daily note logging")
.setDesc("Log completed tasks to your daily note")