Add routine support to recurring task portability

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-23 11:14:01 -05:00
parent 8fa4b6a5fb
commit 2e76a2a554
11 changed files with 1520 additions and 86 deletions
+1
View File
@@ -160,6 +160,7 @@ export const FRONTMATTER_FIELD_LABELS: Record<string, string> = {
priority: "Priority",
assignee: "Assignee",
project: "Project",
recurring: "Recurring",
targetDate: "Target date",
};
+3 -2
View File
@@ -50,6 +50,7 @@ function checkedSlugs(checkedFiles: Set<string>): {
agents: Set<string>;
projects: Set<string>;
tasks: Set<string>;
routines: Set<string>;
} {
const agents = new Set<string>();
const projects = new Set<string>();
@@ -62,7 +63,7 @@ function checkedSlugs(checkedFiles: Set<string>): {
const taskMatch = p.match(/^tasks\/([^/]+)\//);
if (taskMatch) tasks.add(taskMatch[1]);
}
return { agents, projects, tasks };
return { agents, projects, tasks, routines: new Set(tasks) };
}
/**
@@ -77,7 +78,7 @@ function filterPaperclipYaml(yaml: string, checkedFiles: Set<string>): string {
const out: string[] = [];
// Sections whose entries are slug-keyed and should be filtered
const filterableSections = new Set(["agents", "projects", "tasks"]);
const filterableSections = new Set(["agents", "projects", "tasks", "routines"]);
let currentSection: string | null = null; // top-level key (e.g. "agents")
let currentEntry: string | null = null; // slug under that section