(name: str, prompt: str = '')
| 73 | |
| 74 | |
| 75 | def execute_command(name: str, prompt: str = '') -> CommandExecution: |
| 76 | module = get_command(name) |
| 77 | if module is None: |
| 78 | return CommandExecution(name=name, source_hint='', prompt=prompt, handled=False, message=f'Unknown mirrored command: {name}') |
| 79 | action = f"Mirrored command '{module.name}' from {module.source_hint} would handle prompt {prompt!r}." |
| 80 | return CommandExecution(name=module.name, source_hint=module.source_hint, prompt=prompt, handled=True, message=action) |
| 81 | |
| 82 | |
| 83 | def render_command_index(limit: int = 20, query: str | None = None) -> str: |
no test coverage detected