Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ public static boolean saveSkills(Path baseDir, List<AgentSkill> skills, boolean
return false;
}

int size = skills.size();
int saveCount = 0;
try {
for (AgentSkill skill : skills) {
String skillName = skill.getName();
Expand All @@ -182,7 +184,7 @@ public static boolean saveSkills(Path baseDir, List<AgentSkill> skills, boolean
if (!force) {
logger.info(
"Skill directory already exists and force=false: {}", skillName);
return false;
continue; // Skip to the next skill if force=false
} else {
logger.info("Overwriting existing skill directory: {}", skillName);
deleteDirectory(skillDir);
Expand Down Expand Up @@ -215,10 +217,15 @@ public static boolean saveSkills(Path baseDir, List<AgentSkill> skills, boolean
}
}

saveCount++;
logger.info("Successfully saved skill: {}", skillName);
}
boolean allSaved = (size == saveCount);
if (!allSaved) {
logger.warn("Not all skills were saved. Saved {} of {}", saveCount, size);
}

return true;
return allSaved;
} catch (IOException e) {
logger.error("Failed to save skills", e);
throw new RuntimeException("Failed to save skills", e);
Expand Down
Loading