fix(shared): support opencode directory aliases

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-26 11:22:00 +09:00
parent da3e80464d
commit 6d688ac0ae
2 changed files with 12 additions and 5 deletions
+8 -3
View File
@@ -26,8 +26,10 @@ describe("opencode-command-dirs", () => {
const dirs = getOpenCodeSkillDirs({ binary: "opencode" })
expect(dirs).toContain("/home/user/.config/opencode/profiles/opus/skills")
expect(dirs).toContain("/home/user/.config/opencode/profiles/opus/skill")
expect(dirs).toContain("/home/user/.config/opencode/skills")
expect(dirs).toHaveLength(2)
expect(dirs).toContain("/home/user/.config/opencode/skill")
expect(dirs).toHaveLength(4)
})
})
})
@@ -41,7 +43,8 @@ describe("opencode-command-dirs", () => {
const dirs = getOpenCodeSkillDirs({ binary: "opencode" })
expect(dirs).toContain("/home/user/.config/opencode/skills")
expect(dirs).toHaveLength(1)
expect(dirs).toContain("/home/user/.config/opencode/skill")
expect(dirs).toHaveLength(2)
})
})
})
@@ -56,9 +59,11 @@ describe("opencode-command-dirs", () => {
const { getOpenCodeCommandDirs } = await import("./opencode-command-dirs")
const dirs = getOpenCodeCommandDirs({ binary: "opencode" })
expect(dirs).toContain("/home/user/.config/opencode/profiles/opus/commands")
expect(dirs).toContain("/home/user/.config/opencode/profiles/opus/command")
expect(dirs).toContain("/home/user/.config/opencode/commands")
expect(dirs).toContain("/home/user/.config/opencode/command")
expect(dirs).toHaveLength(2)
expect(dirs).toHaveLength(4)
})
})
})