fix(skills): emit warning for all pruned skills, not just agent-attached ones

Previously, skills pruned during re-scan only emitted a warning when
they were attached to agents. Skills with no agent references were
deleted silently. Now every pruned skill emits a warning in the scan
result so the deletion is always visible to the caller.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-13 00:03:17 +00:00
parent 157729ea95
commit 3610559cc7
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -2061,6 +2061,10 @@ export function companySkillService(db: Db) {
warnings.push(
`Skill "${skill.slug}" was removed from ${sourceLocator} and detached from ${usedByAgents.map((a) => a.name).join(", ")}.`,
);
} else {
warnings.push(
`Skill "${skill.slug}" was removed from ${sourceLocator} and deleted.`,
);
}
await deleteSkill(companyId, skill.id);
}