Files
fusion/packages/dashboard/app/utils/agentSkills.ts
Fusion 783d834b91 feat(FN-3381): add skill detail panel with readable badges to agent detail
Adds readable skill badges to the agent detail view with an interactive detail panel, along with corresponding tests and utility functions. A typecheck fix for the dashboard docker config is included.

Fusion-Task-Id: FN-3381
2026-05-04 21:21:22 -07:00

16 lines
372 B
TypeScript

const SKILL_PATH_LABEL_PATTERN = /(?:^|\/)skills\/([^/]+)\/SKILL\.md$/i;
export function formatAgentSkillBadgeLabel(skillId: string): string {
const trimmedSkillId = skillId.trim();
if (!trimmedSkillId) {
return skillId;
}
const match = trimmedSkillId.match(SKILL_PATH_LABEL_PATTERN);
if (match?.[1]) {
return match[1];
}
return trimmedSkillId;
}