fix: feed Codex prompts through stdin
This commit is contained in:
@@ -7,8 +7,8 @@ from .models import AgentResult
|
||||
|
||||
|
||||
class CommandRunner:
|
||||
def run(self, command: list[str], cwd: str | Path) -> AgentResult:
|
||||
result = subprocess.run(command, cwd=cwd, text=True, capture_output=True, check=False)
|
||||
def run(self, command: list[str], cwd: str | Path, *, stdin: str | None = None) -> AgentResult:
|
||||
result = subprocess.run(command, cwd=cwd, input=stdin, text=True, capture_output=True, check=False)
|
||||
return AgentResult(exit_code=result.returncode, stdout=result.stdout, stderr=result.stderr)
|
||||
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ class TaskRunner:
|
||||
issue_title=issue.title,
|
||||
branch_name=branch_name,
|
||||
)
|
||||
result = self.command_runner.run(command, workspace)
|
||||
result = self.command_runner.run(command, workspace, stdin=prompt)
|
||||
report = read_report(workspace / "AGENT_IMPLEMENTATION_REPORT.md")
|
||||
self.db.add_agent_run(
|
||||
task_id=task.id,
|
||||
@@ -236,7 +236,7 @@ class TaskRunner:
|
||||
issue_title=issue.title,
|
||||
pr_number=pr_number,
|
||||
)
|
||||
result = self.command_runner.run(command, workspace)
|
||||
result = self.command_runner.run(command, workspace, stdin=prompt)
|
||||
report = read_report(workspace / "AGENT_REVIEW_REPORT.md")
|
||||
self.db.add_agent_run(
|
||||
task_id=task.id,
|
||||
|
||||
Reference in New Issue
Block a user