Load specific scripts by name, or all if names is None. Args: names: List of script names to load, or None for all. Returns: List of loaded script dictionaries with content.
(self, names: List[str] = None)
| 489 | return str(resolved_path) |
| 490 | |
| 491 | def load_scripts(self, names: List[str] = None) -> List[Dict[str, Any]]: |
| 492 | """ |
| 493 | Load specific scripts by name, or all if names is None. |
| 494 | |
| 495 | Args: |
| 496 | names: List of script names to load, or None for all. |
| 497 | |
| 498 | Returns: |
| 499 | List of loaded script dictionaries with content. |
| 500 | """ |
| 501 | target_scripts = self.skill.scripts |
| 502 | if names: |
| 503 | target_scripts = [s for s in self.skill.scripts if s.name in names] |
| 504 | |
| 505 | loaded = [] |
| 506 | for script in target_scripts: |
| 507 | abs_path = script.path.resolve() |
| 508 | loaded.append({ |
| 509 | 'name': script.name, |
| 510 | 'file': script.to_dict(), |
| 511 | 'path': self._get_resource_path(script.path), |
| 512 | 'abs_path': str(abs_path), |
| 513 | 'content': self._read_file_content(abs_path), |
| 514 | }) |
| 515 | self.scripts.extend(loaded) |
| 516 | return loaded |
| 517 | |
| 518 | def load_references(self, names: List[str] = None) -> List[Dict[str, Any]]: |
| 519 | """ |
no test coverage detected