df03300211
- Split 25+ index.ts files into hook.ts + extracted modules - Rename all catch-all utils.ts/helpers.ts to domain-specific names - Split src/tools/lsp/ into ~15 focused modules - Split src/tools/delegate-task/ into ~18 focused modules - Separate shared types from implementation - 155 files changed, 60+ new files created - All typecheck clean, 61 tests pass
22 lines
1.0 KiB
TypeScript
22 lines
1.0 KiB
TypeScript
import type { GitMasterConfig, BrowserAutomationProvider } from "../../config/schema"
|
|
import { resolveMultipleSkillsAsync } from "../../features/opencode-skill-loader/skill-content"
|
|
import { discoverSkills } from "../../features/opencode-skill-loader"
|
|
|
|
export async function resolveSkillContent(
|
|
skills: string[],
|
|
options: { gitMasterConfig?: GitMasterConfig; browserProvider?: BrowserAutomationProvider, disabledSkills?: Set<string> }
|
|
): Promise<{ content: string | undefined; error: string | null }> {
|
|
if (skills.length === 0) {
|
|
return { content: undefined, error: null }
|
|
}
|
|
|
|
const { resolved, notFound } = await resolveMultipleSkillsAsync(skills, options)
|
|
if (notFound.length > 0) {
|
|
const allSkills = await discoverSkills({ includeClaudeCodePaths: true })
|
|
const available = allSkills.map(s => s.name).join(", ")
|
|
return { content: undefined, error: `Skills not found: ${notFound.join(", ")}. Available: ${available}` }
|
|
}
|
|
|
|
return { content: Array.from(resolved.values()).join("\n\n"), error: null }
|
|
}
|