fix(skills): use directory param instead of process.cwd() for project skill discovery
Project-level skills (.opencode/skills/ and .claude/skills/) were not discovered in desktop app environments because the discover functions hardcoded process.cwd() to resolve project paths. In desktop apps, process.cwd() points to the app installation directory rather than the user's project directory. Add optional directory parameter to all project-level skill discovery functions and thread ctx.directory from the plugin context through the entire skill loading pipeline. Falls back to process.cwd() when directory is not provided, preserving CLI compatibility.
This commit is contained in:
@@ -4,4 +4,6 @@ export interface SkillResolutionOptions {
|
||||
gitMasterConfig?: GitMasterConfig
|
||||
browserProvider?: BrowserAutomationProvider
|
||||
disabledSkills?: Set<string>
|
||||
/** Project directory to discover project-level skills from. Falls back to process.cwd() if not provided. */
|
||||
directory?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user