feat(skills): implement linking for agent skills (#18295)

This commit is contained in:
Grant McCloskey
2026-02-04 14:11:01 -08:00
committed by GitHub
parent 821355c429
commit a3af4a8cae
16 changed files with 584 additions and 8 deletions

View File

@@ -28,14 +28,19 @@ export async function skillsConsentString(
skills: SkillDefinition[],
source: string,
targetDir?: string,
isLink = false,
): Promise<string> {
const action = isLink ? 'Linking' : 'Installing';
const output: string[] = [];
output.push(`Installing agent skill(s) from "${source}".`);
output.push('\nThe following agent skill(s) will be installed:\n');
output.push(`${action} agent skill(s) from "${source}".`);
output.push(
`\nThe following agent skill(s) will be ${action.toLowerCase()}:\n`,
);
output.push(...(await renderSkillsList(skills)));
if (targetDir) {
output.push(`Install Destination: ${targetDir}`);
const destLabel = isLink ? 'Link' : 'Install';
output.push(`${destLabel} Destination: ${targetDir}`);
}
output.push('\n' + SKILLS_WARNING_MESSAGE);