MCPcopy Index your code
hub / github.com/Fission-AI/OpenSpec / countTasksFromContent

Function countTasksFromContent

src/utils/task-progress.ts:12–25  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

10}
11
12export function countTasksFromContent(content: string): TaskProgress {
13 const lines = content.split('\n');
14 let total = 0;
15 let completed = 0;
16 for (const line of lines) {
17 if (line.match(TASK_PATTERN)) {
18 total++;
19 if (line.match(COMPLETED_TASK_PATTERN)) {
20 completed++;
21 }
22 }
23 }
24 return { total, completed };
25}
26
27export async function getTaskProgressForChange(changesDir: string, changeName: string): Promise<TaskProgress> {
28 const tasksPath = path.join(changesDir, changeName, 'tasks.md');

Callers 1

getTaskProgressForChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected