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

Function getTaskProgressForChange

src/utils/task-progress.ts:27–35  ·  view source on GitHub ↗
(changesDir: string, changeName: string)

Source from the content-addressed store, hash-verified

25}
26
27export async function getTaskProgressForChange(changesDir: string, changeName: string): Promise<TaskProgress> {
28 const tasksPath = path.join(changesDir, changeName, 'tasks.md');
29 try {
30 const content = await fs.readFile(tasksPath, 'utf-8');
31 return countTasksFromContent(content);
32 } catch {
33 return { total: 0, completed: 0 };
34 }
35}
36
37export function formatTaskStatus(progress: TaskProgress): string {
38 if (progress.total === 0) return 'No tasks';

Callers 4

getChangesDataMethod · 0.85
executeMethod · 0.85
runMethod · 0.85
selectChangeMethod · 0.85

Calls 2

countTasksFromContentFunction · 0.85
readFileMethod · 0.80

Tested by

no test coverage detected