File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def run(
6262 lint_cmd : str ,
6363 fnames : list [str ],
6464 log_dir : Path ,
65+ test_first : bool = False ,
6566 ) -> AgentReturn :
6667 """Start aider agent"""
6768 if test_cmd :
@@ -111,7 +112,14 @@ def run(
111112 coder .stream = True
112113
113114 # Run the agent
114- coder .run (message )
115+ if test_first :
116+ test_errors = coder .commands .cmd_test (test_cmd )
117+ if test_errors :
118+ coder .run (test_errors )
119+ else :
120+ coder .run (message )
121+
122+ # #### TMP
115123
116124 # #### TMP
117125 # import time
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ def run_agent_for_repo(
139139 lint_cmd ,
140140 target_edit_files ,
141141 test_log_dir ,
142+ test_first = True ,
142143 )
143144 # after running the agent, update the money display
144145 update_queue .put (
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ def run_agent_for_repo(
130130 lint_cmd ,
131131 target_edit_files ,
132132 test_log_dir ,
133+ test_first = True ,
133134 )
134135 # cost = agent_return.last_cost
135136 else :
You can’t perform that action at this time.
0 commit comments