refactor: 移除模板变量 {{change-name}} 替换功能,模板改为纯静态文本
This commit is contained in:
@@ -56,9 +56,10 @@ describe("assemblePlanPrompt", () => {
|
||||
expect(prompt).not.toContain("# 已有设计");
|
||||
});
|
||||
|
||||
it("替换模板中的 {{change-name}}", async () => {
|
||||
it("包含格式模板(纯静态文本)", async () => {
|
||||
const prompt = await assemblePlanPrompt(defaultConfig, TMP_DIR, "user-auth", "design");
|
||||
expect(prompt).toContain("user-auth 设计文档");
|
||||
expect(prompt).toContain("格式模板");
|
||||
expect(prompt).toContain("# 设计文档");
|
||||
expect(prompt).not.toContain("{{change-name}}");
|
||||
});
|
||||
|
||||
@@ -110,7 +111,7 @@ describe("assemblePlanPrompt", () => {
|
||||
{
|
||||
name: "spec",
|
||||
prompt: "生成规格",
|
||||
template: "# {{change-name}} 规格",
|
||||
template: "# 规格文档",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -118,7 +119,7 @@ describe("assemblePlanPrompt", () => {
|
||||
};
|
||||
const prompt = await assemblePlanPrompt(config, TMP_DIR, "my-feature", "spec");
|
||||
expect(prompt).toContain("spec");
|
||||
expect(prompt).toContain("my-feature 规格");
|
||||
expect(prompt).toContain("规格文档");
|
||||
expect(prompt).not.toContain("design");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user