feat: 新增 assembleCreatePrompt,plan/build/archive 不再内嵌文件内容
This commit is contained in:
@@ -50,8 +50,8 @@ describe("完整 SDD 流程", () => {
|
||||
expect(changes[0].documents.length).toBeGreaterThan(0);
|
||||
|
||||
const buildPrompt = await assembleBuildPrompt(config, TMP_DIR, changeName);
|
||||
expect(buildPrompt).toContain("实现登录 API");
|
||||
expect(buildPrompt).toContain("共 2 项");
|
||||
expect(buildPrompt).toContain("task.md");
|
||||
expect(buildPrompt).toContain("2");
|
||||
|
||||
await writeFile(join(changeDir, "task.md"), "- [x] 实现登录 API\n- [x] 编写登录测试");
|
||||
|
||||
@@ -95,10 +95,10 @@ describe("完整 SDD 流程", () => {
|
||||
expect(changes).toHaveLength(2);
|
||||
|
||||
const authPrompt = await assembleBuildPrompt(config, TMP_DIR, "auth");
|
||||
expect(authPrompt).toContain("auth 任务");
|
||||
expect(authPrompt).toContain("task.md");
|
||||
|
||||
const paymentPrompt = await assembleBuildPrompt(config, TMP_DIR, "payment");
|
||||
expect(paymentPrompt).toContain("payment 任务");
|
||||
expect(paymentPrompt).toContain("task.md");
|
||||
});
|
||||
|
||||
it("自定义配置覆盖默认配置", async () => {
|
||||
@@ -189,7 +189,9 @@ describe("archive 校验", () => {
|
||||
|
||||
const prompt = await assembleArchivePrompt(config, TMP_DIR, "incomplete-task");
|
||||
expect(prompt).toContain("警告");
|
||||
expect(prompt).toContain("未完成任务");
|
||||
expect(prompt).toContain("task.md");
|
||||
expect(prompt).toContain("未完成");
|
||||
expect(prompt).not.toContain("- [ ] 未完成任务");
|
||||
expect(prompt).toContain("是否确认");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user