Load specific resources by name, or all if names is None. Args: names: List of resource names to load, or None for all. Returns: List of loaded resource dictionaries with content.
(self, names: List[str] = None)
| 543 | return loaded |
| 544 | |
| 545 | def load_resources(self, names: List[str] = None) -> List[Dict[str, Any]]: |
| 546 | """ |
| 547 | Load specific resources by name, or all if names is None. |
| 548 | |
| 549 | Args: |
| 550 | names: List of resource names to load, or None for all. |
| 551 | |
| 552 | Returns: |
| 553 | List of loaded resource dictionaries with content. |
| 554 | """ |
| 555 | target_res = [ |
| 556 | r for r in self.skill.resources |
| 557 | if r.name not in ['SKILL.md', 'LICENSE.txt'] |
| 558 | ] |
| 559 | if names: |
| 560 | target_res = [r for r in target_res if r.name in names] |
| 561 | |
| 562 | loaded = [] |
| 563 | for res in target_res: |
| 564 | abs_path = res.path.resolve() |
| 565 | loaded.append({ |
| 566 | 'name': res.name, |
| 567 | 'file': res.to_dict(), |
| 568 | 'path': self._get_resource_path(res.path), |
| 569 | 'abs_path': str(abs_path), |
| 570 | 'content': self._read_file_content(abs_path), |
| 571 | }) |
| 572 | self.resources.extend(loaded) |
| 573 | return loaded |
| 574 | |
| 575 | def load_from_plan(self) -> None: |
| 576 | """ |
no test coverage detected