Skip to content

Commit 69f051b

Browse files
committed
Formatted run_command outputs, changed outputs of tools to spot errors.
1 parent ba54aa0 commit 69f051b

7 files changed

Lines changed: 211 additions & 390 deletions

render_machine/actions/agent_fix_conformance_test.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
delete_file,
1212
edit_file,
1313
grep,
14-
list_files,
1514
ls_files,
1615
read_file,
1716
run_command,
@@ -83,7 +82,6 @@ def execute(self, render_context: RenderContext, previous_action_payload: Any |
8382
"write_file": write_file,
8483
"delete_file": delete_file,
8584
"read_file": read_file,
86-
"list_files": list_files,
8785
"ls_files": ls_files,
8886
"grep": grep,
8987
"run_command": run_command,
@@ -531,9 +529,15 @@ def _build_continuation_message(
531529
parts.append(
532530
"2. Locate and read the relevant test code and the implementation code that is being tested. Make sure you understand the root cause of the failure.\n"
533531
)
534-
parts.append("3a. If you understand exactly what the issue is: Implement a fix that addresses the root cause.\n")
535-
parts.append("3b. If you do not exactly understand what the issue is: Make adjustments to the code that help you diagnose the issue (like additional logs for example).\n")
532+
parts.append(
533+
"3a. If you understand exactly what the issue is: Implement a fix that addresses the root cause.\n"
534+
)
535+
parts.append(
536+
"3b. If you do not exactly understand what the issue is: Make adjustments to the code that help you diagnose the issue (like additional logs for example).\n"
537+
)
536538
parts.append("4. Verify the fix or adjustments by reading the edited files to ensure the fix is correct.\n")
537-
parts.append("5. When you are finished with implementing the fix or diagnostic adjustments run the tests again by using the submit_fix tool.\n")
539+
parts.append(
540+
"5. When you are finished with implementing the fix or diagnostic adjustments run the tests again by using the submit_fix tool.\n"
541+
)
538542

539543
return "\n".join(parts)

render_machine/actions/agent_fix_unit_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
delete_file,
1111
edit_file,
1212
grep,
13-
list_files,
1413
ls_files,
1514
read_file,
1615
run_command,
@@ -28,7 +27,6 @@
2827
"write_file": write_file,
2928
"delete_file": delete_file,
3029
"read_file": read_file,
31-
"list_files": list_files,
3230
"ls_files": ls_files,
3331
"grep": grep,
3432
"think": think,

render_machine/actions/agent_render_conformance_tests.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,7 @@
66
from render_machine.actions.base_action import BaseAction
77
from render_machine.agent import agent_runner
88
from render_machine.agent.tool_executor import ToolExecutor
9-
from render_machine.agent.tools import (
10-
delete_file,
11-
edit_file,
12-
grep,
13-
list_files,
14-
ls_files,
15-
read_file,
16-
run_command,
17-
write_file,
18-
)
9+
from render_machine.agent.tools import delete_file, edit_file, grep, ls_files, read_file, run_command, think, write_file
1910
from render_machine.render_context import RenderContext
2011
from render_machine.render_types import AcceptanceTestPhase, TestExecutionPhase
2112

@@ -24,10 +15,10 @@
2415
"write_file": write_file,
2516
"delete_file": delete_file,
2617
"read_file": read_file,
27-
"list_files": list_files,
2818
"ls_files": ls_files,
2919
"grep": grep,
3020
"run_command": run_command,
21+
"think": think,
3122
}
3223

3324

render_machine/actions/agent_render_functional_requirement.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,18 @@
77
from render_machine.actions.base_action import BaseAction
88
from render_machine.agent import agent_runner
99
from render_machine.agent.tool_executor import ToolExecutor
10-
from render_machine.agent.tools import (
11-
delete_file,
12-
edit_file,
13-
grep,
14-
list_files,
15-
ls_files,
16-
read_file,
17-
run_command,
18-
write_file,
19-
)
10+
from render_machine.agent.tools import delete_file, edit_file, grep, ls_files, read_file, run_command, think, write_file
2011
from render_machine.render_context import RenderContext
2112

2213
RENDER_FUNCTIONAL_REQUIREMENT_TOOLS = {
2314
"edit_file": edit_file,
2415
"write_file": write_file,
2516
"delete_file": delete_file,
2617
"read_file": read_file,
27-
"list_files": list_files,
2818
"ls_files": ls_files,
2919
"grep": grep,
3020
"run_command": run_command,
21+
"think": think,
3122
}
3223

3324

render_machine/actions/review_conformance_fix_action.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from render_machine.actions.base_action import BaseAction
77
from render_machine.agent import agent_runner
88
from render_machine.agent.tool_executor import ToolExecutor
9-
from render_machine.agent.tools import grep, list_files, ls_files, read_file, think
9+
from render_machine.agent.tools import grep, ls_files, read_file, think
1010
from render_machine.render_context import RenderContext
1111

1212

@@ -96,7 +96,6 @@ def execute(self, render_context: RenderContext, _previous_action_payload: Any |
9696
reviewer_tools = {
9797
"think": think,
9898
"read_file": read_file,
99-
"list_files": list_files,
10099
"ls_files": ls_files,
101100
"grep": grep,
102101
}

render_machine/agent/tool_executor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111

1212
DEFAULT_TOOLS: dict[str, ToolFunction] = {
1313
"run_unit_tests": tools.run_unit_tests,
14-
"run_conformance_tests": tools.run_conformance_tests,
1514
"run_command": tools.run_command,
1615
"edit_file": tools.edit_file,
1716
"write_file": tools.write_file,
1817
"delete_file": tools.delete_file,
1918
"read_file": tools.read_file,
20-
"list_files": tools.list_files,
2119
"ls_files": tools.ls_files,
2220
"grep": tools.grep,
2321
"think": tools.think,

0 commit comments

Comments
 (0)