(args: argparse.Namespace)
| 130 | |
| 131 | |
| 132 | async def _run(args: argparse.Namespace) -> None: |
| 133 | from agent.opencode_agent.runner import OpenCodeAgentRunner |
| 134 | |
| 135 | runner = OpenCodeAgentRunner( |
| 136 | model=args.model_id, |
| 137 | max_steps=args.max_steps, |
| 138 | agent_name=args.agent_name, |
| 139 | opencode_bin=args.opencode_bin, |
| 140 | attach=args.attach, |
| 141 | timeout_s=args.timeout_s, |
| 142 | thinking=args.thinking, |
| 143 | variant=args.variant, |
| 144 | allow_bash=args.allow_bash, |
| 145 | allow_edit=args.allow_edit, |
| 146 | allow_web=args.allow_web, |
| 147 | allow_files=args.allow_files, |
| 148 | workspace_dir=args.workspace_dir, |
| 149 | dangerously_skip_permissions=not args.ask_permissions, |
| 150 | ) |
| 151 | result = await runner.run(args.question) |
| 152 | print_result( |
| 153 | result, show_trajectory=args.show_trajectory, output_json=args.output_json |
| 154 | ) |
| 155 | |
| 156 | |
| 157 | def main() -> None: |
nothing calls this directly
no test coverage detected