Execute a prompt command.
(
self,
command: PromptCommand,
args: str,
)
| 201 | ) |
| 202 | |
| 203 | async def _execute_prompt( |
| 204 | self, |
| 205 | command: PromptCommand, |
| 206 | args: str, |
| 207 | ) -> CommandResult: |
| 208 | """Execute a prompt command.""" |
| 209 | try: |
| 210 | prompt_content = await command.get_prompt_for_command(args, self.context) |
| 211 | return CommandResult.success_prompt( |
| 212 | command.name, |
| 213 | prompt_content, |
| 214 | should_query=True, |
| 215 | ) |
| 216 | except Exception as e: |
| 217 | return CommandResult.error( |
| 218 | command.name, |
| 219 | str(e), |
| 220 | ) |
| 221 | |
| 222 | async def _execute_interactive( |
| 223 | self, |
no test coverage detected