feat: status 命令根据 tracked 决定是否扫描 task.md

This commit is contained in:
2026-06-10 09:10:17 +08:00
parent 0c89b3ebb2
commit 3789d0a7b3
2 changed files with 77 additions and 11 deletions

View File

@@ -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({