feat(delegate-task): pass directory option through skill discovery
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
parent
dc76e2cd11
commit
90dccfbdaf
@ -4,7 +4,7 @@ import { discoverSkills } from "../../features/opencode-skill-loader"
|
|||||||
|
|
||||||
export async function resolveSkillContent(
|
export async function resolveSkillContent(
|
||||||
skills: string[],
|
skills: string[],
|
||||||
options: { gitMasterConfig?: GitMasterConfig; browserProvider?: BrowserAutomationProvider, disabledSkills?: Set<string> }
|
options: { gitMasterConfig?: GitMasterConfig; browserProvider?: BrowserAutomationProvider, disabledSkills?: Set<string>, directory?: string }
|
||||||
): Promise<{ content: string | undefined; error: string | null }> {
|
): Promise<{ content: string | undefined; error: string | null }> {
|
||||||
if (skills.length === 0) {
|
if (skills.length === 0) {
|
||||||
return { content: undefined, error: null }
|
return { content: undefined, error: null }
|
||||||
@ -12,7 +12,7 @@ export async function resolveSkillContent(
|
|||||||
|
|
||||||
const { resolved, notFound } = await resolveMultipleSkillsAsync(skills, options)
|
const { resolved, notFound } = await resolveMultipleSkillsAsync(skills, options)
|
||||||
if (notFound.length > 0) {
|
if (notFound.length > 0) {
|
||||||
const allSkills = await discoverSkills({ includeClaudeCodePaths: true })
|
const allSkills = await discoverSkills({ includeClaudeCodePaths: true, directory: options?.directory })
|
||||||
const available = allSkills.map(s => s.name).join(", ")
|
const available = allSkills.map(s => s.name).join(", ")
|
||||||
return { content: undefined, error: `Skills not found: ${notFound.join(", ")}. Available: ${available}` }
|
return { content: undefined, error: `Skills not found: ${notFound.join(", ")}. Available: ${available}` }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,6 +128,7 @@ Prompts MUST be in English.`
|
|||||||
gitMasterConfig: options.gitMasterConfig,
|
gitMasterConfig: options.gitMasterConfig,
|
||||||
browserProvider: options.browserProvider,
|
browserProvider: options.browserProvider,
|
||||||
disabledSkills: options.disabledSkills,
|
disabledSkills: options.disabledSkills,
|
||||||
|
directory: options.directory,
|
||||||
})
|
})
|
||||||
if (skillError) {
|
if (skillError) {
|
||||||
return skillError
|
return skillError
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user