Reload a skill from its directory. Args: skill_path: Path to skill directory Returns: Reloaded SkillSchema object if successful, None otherwise
(self, skill_path: str)
| 203 | return self.loaded_skills.copy() |
| 204 | |
| 205 | def reload_skill(self, skill_path: str) -> Optional[SkillSchema]: |
| 206 | """ |
| 207 | Reload a skill from its directory. |
| 208 | |
| 209 | Args: |
| 210 | skill_path: Path to skill directory |
| 211 | |
| 212 | Returns: |
| 213 | Reloaded SkillSchema object if successful, None otherwise |
| 214 | """ |
| 215 | path_obj = Path(skill_path) |
| 216 | |
| 217 | if not self._is_skill_directory(path_obj): |
| 218 | logger.error(f'Not a valid skill directory: {skill_path}') |
| 219 | return None |
| 220 | |
| 221 | skill = self._load_single_skill(path_obj) |
| 222 | if skill: |
| 223 | skill_key: str = self._get_skill_key(skill=skill) |
| 224 | self.loaded_skills[skill_key] = skill |
| 225 | logger.info(f'Successfully reloaded skill: {skill.name}') |
| 226 | |
| 227 | return skill |
| 228 | |
| 229 | |
| 230 | def load_skills( |
nothing calls this directly
no test coverage detected