feat: build 阶段根据 tracked 分支处理

This commit is contained in:
2026-06-10 09:03:38 +08:00
parent 8e00e2cdf1
commit 0c89b3ebb2
2 changed files with 50 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import { join } from "node:path";
import type { RuneConfig } from "../types.ts";
import { CommandError } from "../cli/errors.ts";
import { getChangeDir } from "./config.ts";
import { parseTasks } from "./task-parser.ts";
import { parseTasks, validateTaskFormat } from "./task-parser.ts";
import { applyCommandPrefix, getPmPrefix } from "./pm.ts";
export function assembleDiscussPrompt(config: RuneConfig): string {
@@ -85,6 +85,10 @@ export async function assembleBuildPrompt(
});
}
if (!config.metadata?.tracked) {
return applyCommandPrefix(build.prompt, config);
}
const changeDir = getChangeDir(projectRoot, changeName);
const taskPath = join(changeDir, "task.md");
@@ -98,6 +102,8 @@ export async function assembleBuildPrompt(
});
}
validateTaskFormat(taskContent);
const tasks = parseTasks(taskContent);
const pendingTasks = tasks.filter((t) => !t.checked);