One slash command: plugins/ /commands/ .md.
| 270 | |
| 271 | @dataclass |
| 272 | class CommandSource: |
| 273 | """One slash command: plugins/<plugin>/commands/<name>.md.""" |
| 274 | |
| 275 | plugin: str |
| 276 | name: str |
| 277 | path: Path |
| 278 | frontmatter: dict |
| 279 | body: str |
| 280 | |
| 281 | @property |
| 282 | def description(self) -> str: |
| 283 | return (self.frontmatter.get("description") or "").strip() |
| 284 | |
| 285 | @property |
| 286 | def argument_hint(self) -> str: |
| 287 | return (self.frontmatter.get("argument-hint") or "").strip() |
| 288 | |
| 289 | |
| 290 | @dataclass |
no outgoing calls