fix: opencode run takes prompt as positional arg not --prompt-file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
bf7614a190
commit
90f80d9220
1 changed files with 1 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue