feat: status 命令根据 tracked 决定是否扫描 task.md
This commit is contained in:
@@ -44,14 +44,16 @@ export async function scanChanges(
|
||||
const buildUnlocked = planCompleted;
|
||||
|
||||
let taskProgress: { completed: number; total: number } | null = null;
|
||||
const taskFile = files.find((d) => d === "task.md");
|
||||
if (taskFile) {
|
||||
const content = await readFile(join(entryPath, taskFile), "utf-8");
|
||||
const tasks = parseTasks(content);
|
||||
taskProgress = {
|
||||
completed: tasks.filter((t) => t.checked).length,
|
||||
total: tasks.length,
|
||||
};
|
||||
if (config?.metadata?.tracked) {
|
||||
const taskFile = files.find((d) => d === "task.md");
|
||||
if (taskFile) {
|
||||
const content = await readFile(join(entryPath, taskFile), "utf-8");
|
||||
const tasks = parseTasks(content);
|
||||
taskProgress = {
|
||||
completed: tasks.filter((t) => t.checked).length,
|
||||
total: tasks.length,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
results.push({
|
||||
|
||||
Reference in New Issue
Block a user