feat: opencode command 文件加 rune- 前缀
This commit is contained in:
@@ -22,7 +22,7 @@ describe("injectOpenCode", () => {
|
||||
const skills = await readdir(join(TMP_DIR, ".opencode", "skills"));
|
||||
|
||||
for (const stage of ["discuss", "plan", "build", "archive"]) {
|
||||
expect(commands).toContain(`${stage}.md`);
|
||||
expect(commands).toContain(`rune-${stage}.md`);
|
||||
expect(skills).toContain(`rune-${stage}.md`);
|
||||
}
|
||||
});
|
||||
@@ -40,7 +40,7 @@ describe("injectOpenCode", () => {
|
||||
it("command 文件包含 skill 调用指令", async () => {
|
||||
await injectOpenCode(TMP_DIR);
|
||||
const content = await readFile(
|
||||
join(TMP_DIR, ".opencode", "commands", "discuss.md"),
|
||||
join(TMP_DIR, ".opencode", "commands", "rune-discuss.md"),
|
||||
"utf-8",
|
||||
);
|
||||
expect(content).toContain("rune-discuss");
|
||||
@@ -71,13 +71,13 @@ describe("injectOpenCode", () => {
|
||||
it("重复注入时不覆盖已存在的文件", async () => {
|
||||
await injectOpenCode(TMP_DIR);
|
||||
const originalContent = await readFile(
|
||||
join(TMP_DIR, ".opencode", "commands", "discuss.md"),
|
||||
join(TMP_DIR, ".opencode", "commands", "rune-discuss.md"),
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
await injectOpenCode(TMP_DIR);
|
||||
const content = await readFile(
|
||||
join(TMP_DIR, ".opencode", "commands", "discuss.md"),
|
||||
join(TMP_DIR, ".opencode", "commands", "rune-discuss.md"),
|
||||
"utf-8",
|
||||
);
|
||||
expect(content).toBe(originalContent);
|
||||
|
||||
Reference in New Issue
Block a user