refactor(agent): make resource invocation explicit

This commit is contained in:
Mario Zechner
2026-05-08 13:35:54 +02:00
parent 3680418251
commit e1647aaa00
5 changed files with 46 additions and 30 deletions
+6
View File
@@ -25,6 +25,12 @@ interface SkillFrontmatter {
[key: string]: unknown;
}
/** Expand a skill into a prompt, optionally appending additional user instructions. */
export function expandSkillCommand(skill: Skill, additionalInstructions?: string): string {
const skillBlock = `<skill name="${skill.name}" location="${skill.filePath}">\nReferences are relative to ${dirnameEnvPath(skill.filePath)}.\n\n${skill.content}\n</skill>`;
return additionalInstructions ? `${skillBlock}\n\n${additionalInstructions}` : skillBlock;
}
/**
* Load skills from one or more directories.
*