@@ -45,6 +45,7 @@ def __init__(self, project):
45
45
self .debugger = Debugger (self )
46
46
47
47
def start_coding (self , task_source ):
48
+ print ('' , type = 'verbose' , category = 'agent:developer' )
48
49
if not self .project .finished :
49
50
self .project .current_step = 'coding'
50
51
update_app_status (self .project .args ['app_id' ], self .project .current_step )
@@ -67,6 +68,7 @@ def start_coding(self, task_source):
67
68
if current_progress_percent > threshold and threshold not in documented_thresholds :
68
69
if not self .project .skip_steps :
69
70
self .project .technical_writer .document_project (current_progress_percent )
71
+ print ('' , type = 'verbose' , category = 'agent:developer' )
70
72
documented_thresholds .add (threshold )
71
73
72
74
if self .project .tasks_to_load :
@@ -101,14 +103,14 @@ def start_coding(self, task_source):
101
103
update_app_status (self .project .args ['app_id' ], self .project .current_step )
102
104
message = 'The app is DONE!!! Yay...you can use it now.\n '
103
105
logger .info (message )
104
- print (color_green_bold (message ))
106
+ print (color_green_bold (message ), category = 'success' )
105
107
if not self .project .skip_steps :
106
108
telemetry .set ("end_result" , "success:initial-project" )
107
109
telemetry .send ()
108
110
else :
109
111
message = 'Feature complete!\n '
110
112
logger .info (message )
111
- print (color_green_bold (message ))
113
+ print (color_green_bold (message ), category = 'success' )
112
114
if not self .project .skip_steps :
113
115
telemetry .set ("end_result" , "success:feature" )
114
116
telemetry .send ()
@@ -121,7 +123,7 @@ def implement_task(self, i, task_source, development_task=None):
121
123
:param task_source: The source of the task, one of: 'app', 'feature', 'debugger', 'iteration'.
122
124
:param development_task: The task to implement.
123
125
"""
124
- print (color_green_bold (f'Implementing task #{ i + 1 } : ' ) + color_green (f' { development_task ["description" ]} \n ' ))
126
+ print (color_green_bold (f'Implementing task #{ i + 1 } : ' ) + color_green (f' { development_task ["description" ]} \n ' ), category = 'agent:developer' )
125
127
self .project .dot_pilot_gpt .chat_log_folder (i + 1 )
126
128
127
129
convo_dev_task = AgentConvo (self )
@@ -495,6 +497,13 @@ def execute_task(self, convo, task_steps, test_command=None, reset_convo=True,
495
497
"""
496
498
function_uuid = str (uuid .uuid4 ())
497
499
convo .save_branch (function_uuid )
500
+ agent_map = {
501
+ 'app' : 'agent:developer' ,
502
+ 'feature' : 'agent:developer' ,
503
+ 'debugger' : 'agent:debugger' ,
504
+ 'troubleshooting' : 'agent:troubleshooter' ,
505
+ 'review' : 'agent:reviewer' ,
506
+ }
498
507
499
508
for (i , step ) in enumerate (task_steps ):
500
509
print_step_progress (i + 1 , len (task_steps ), step , task_source )
@@ -525,20 +534,19 @@ def execute_task(self, convo, task_steps, test_command=None, reset_convo=True,
525
534
convo .load_branch (function_uuid )
526
535
527
536
if step ['type' ] == 'command' :
528
- print ('' , type = 'verbose' , category = 'command run' )
529
537
result = self .step_command_run (convo , task_steps , i , success_with_cli_response = need_to_see_output )
530
538
# if need_to_see_output and 'cli_response' in result:
531
539
# result['user_input'] = result['cli_response']
532
540
533
541
elif step ['type' ] in ['save_file' , 'modify_file' , 'code_change' ]:
534
- print ('' , type = 'verbose' , category = 'save file ' )
542
+ print ('' , type = 'verbose' , category = 'agent:code-monkey ' )
535
543
result = self .step_save_file (convo , step , i , test_after_code_changes )
536
544
537
545
elif step ['type' ] == 'delete_file' :
538
546
result = self .step_delete_file (convo , step , i , test_after_code_changes )
539
547
540
548
elif step ['type' ] == 'human_intervention' :
541
- print ('' , type = 'verbose' , category = 'human intervention' )
549
+ print ('' , type = 'verbose' , category = 'human- intervention' )
542
550
result = self .step_human_intervention (convo , task_steps , i )
543
551
544
552
# TODO background_command - if we run commands in background we should have way to kill processes
@@ -547,7 +555,7 @@ def execute_task(self, convo, task_steps, test_command=None, reset_convo=True,
547
555
# terminate_named_process(step['kill_process'])
548
556
# result = {'success': True}
549
557
550
- print ('' , type = 'verbose' , category = 'agent:developer' )
558
+ print ('' , type = 'verbose' , category = agent_map [ task_source ] )
551
559
logger .info (' step result: %s' , result )
552
560
553
561
if (not result ['success' ]) or (need_to_see_output and result .get ("user_input" ) != "SKIP" ):
@@ -628,7 +636,8 @@ def continue_development(self, iteration_convo, last_branch_name, continue_descr
628
636
return_cli_response = True , is_root_task = True )},
629
637
convo = iteration_convo ,
630
638
is_root_task = True ,
631
- add_loop_button = iteration_count > 3 )
639
+ add_loop_button = iteration_count > 3 ,
640
+ category = 'human-test' )
632
641
633
642
logger .info ('response: %s' , response )
634
643
self .review_count = 0
@@ -638,6 +647,7 @@ def continue_development(self, iteration_convo, last_branch_name, continue_descr
638
647
return {"success" : True , "user_input" : user_feedback }
639
648
640
649
if user_feedback is not None :
650
+ print ('' , type = 'verbose' , category = 'agent:troubleshooter' )
641
651
user_feedback = self .bug_report_generator (user_feedback )
642
652
stuck_in_loop = user_feedback .startswith (STUCK_IN_LOOP )
643
653
if stuck_in_loop :
@@ -761,6 +771,7 @@ def review_task(self):
761
771
Review all task changes and refactor big files.
762
772
:return: bool - True if the task changes passed review, False if not
763
773
"""
774
+ print ('' , type = 'verbose' , category = 'agent:reviewer' )
764
775
self .review_count += 1
765
776
review_result = self .review_code_changes ()
766
777
refactoring_done = self .refactor_code ()
0 commit comments