Find the jcode binary.
()
| 68 | |
| 69 | |
| 70 | def find_jcode_binary() -> str: |
| 71 | """Find the jcode binary.""" |
| 72 | # Check target/release first |
| 73 | repo_root = Path(__file__).parent.parent |
| 74 | release_binary = repo_root / "target" / "release" / "jcode" |
| 75 | if release_binary.exists(): |
| 76 | return str(release_binary) |
| 77 | |
| 78 | # Check PATH |
| 79 | result = subprocess.run(["which", "jcode"], capture_output=True, text=True) |
| 80 | if result.returncode == 0: |
| 81 | return result.stdout.strip() |
| 82 | |
| 83 | raise FileNotFoundError("jcode binary not found. Run 'cargo build --release' first.") |
| 84 | |
| 85 | |
| 86 | def run_claude_cli(prompt: str, workdir: str, model: str = "opus") -> RunResult: |
no test coverage detected