Run a specific command.
(
arguments: dict[str, Any], project_root: Path
)
| 1620 | |
| 1621 | |
| 1622 | async def run_specific_command( |
| 1623 | arguments: dict[str, Any], project_root: Path |
| 1624 | ) -> CallToolResult: |
| 1625 | """Run a specific command.""" |
| 1626 | command = arguments["command"] |
| 1627 | working_directory = arguments.get("working_directory", ".") |
| 1628 | |
| 1629 | work_dir = project_root / working_directory |
| 1630 | |
| 1631 | result = await run_command(command.split(), work_dir) |
| 1632 | return CallToolResult( |
| 1633 | content=[ |
| 1634 | TextContent(type="text", text=f"Command: {command}\nOutput:\n{result}") |
| 1635 | ] |
| 1636 | ) |
| 1637 | |
| 1638 | |
| 1639 | async def validate_completion( |
no test coverage detected