Added human intervention step + renamed verification to intervention

This commit is contained in:
Zvonimir Sabljic
2023-08-03 21:21:09 +02:00
parent c940bb9594
commit ef03879f86
3 changed files with 5 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ class Project:
with open(full_path, 'w', encoding='utf-8') as f:
f.write(file_snapshot.content)
def ask_for_human_verification(self, message, description):
def ask_for_human_intervention(self, message, description):
print(colored(message, "yellow"))
print(description)
answer = ''

View File

@@ -63,6 +63,8 @@ class Developer(Agent):
code_monkey = CodeMonkey(self.project, self)
updated_convo = code_monkey.implement_code_changes(convo, step['code_change_description'], i)
self.test_code_changes(code_monkey, updated_convo)
elif step['type'] == 'human_intervention':
self.project.ask_for_human_intervention(step['human_intervention_description'])
else:
raise Exception('Step type must be either run_command or code_change.')
@@ -135,7 +137,7 @@ class Developer(Agent):
code_monkey.implement_code_changes(convo, automated_test_description, 0)
elif test_type == 'manual_test':
# TODO make the message better
self.project.ask_for_human_verification(
self.project.ask_for_human_intervention(
'Message from Euclid: I need your help. Can you please test if this was successful?',
manual_test_description
)

View File

@@ -156,7 +156,7 @@ def run_command_until_success(command, timeout, convo):
command = response
if not command_executed:
convo.agent.project.ask_for_human_verification(
convo.agent.project.ask_for_human_intervention(
'It seems like I cannot debug this problem by myself. Can you please help me and try debugging it yourself?',
command
)