fix: opencode run takes prompt as positional arg not --prompt-file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Zoë 2026-05-30 18:03:28 -07:00
parent bf7614a190
commit 90f80d9220

View file

@ -151,11 +151,7 @@ Instructions:
def run_opencode(prompt: str) -> int: def run_opencode(prompt: str) -> int:
"""Run opencode non-interactively with the given prompt.""" """Run opencode non-interactively with the given prompt."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) as f: cmd = ["opencode", "run", prompt]
f.write(prompt)
prompt_file = f.name
cmd = ["opencode", "run", "--no-input", "--prompt-file", prompt_file]
log.info("Running: %s", " ".join(cmd)) log.info("Running: %s", " ".join(cmd))
result = subprocess.run(cmd, check=False) result = subprocess.run(cmd, check=False)