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
+4 -2
View File
@@ -17,8 +17,9 @@ export function getOpenCodeCommandDirs(options: OpenCodeConfigDirOptions): strin
return Array.from(
new Set([
join(configDir, "commands"),
join(configDir, "command"),
...(parentConfigDir ? [join(parentConfigDir, "command")] : []),
...(parentConfigDir ? [join(parentConfigDir, "commands"), join(parentConfigDir, "command")] : []),
])
)
}
@@ -30,7 +31,8 @@ export function getOpenCodeSkillDirs(options: OpenCodeConfigDirOptions): string[
return Array.from(
new Set([
join(configDir, "skills"),
...(parentConfigDir ? [join(parentConfigDir, "skills")] : []),
join(configDir, "skill"),
...(parentConfigDir ? [join(parentConfigDir, "skills"), join(parentConfigDir, "skill")] : []),
])
)
}