diff --git a/euclid/helpers/Project.py b/euclid/helpers/Project.py index 12d6f71..2c77e52 100644 --- a/euclid/helpers/Project.py +++ b/euclid/helpers/Project.py @@ -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 = '' diff --git a/euclid/helpers/agents/Developer.py b/euclid/helpers/agents/Developer.py index 87690d2..a27ecb0 100644 --- a/euclid/helpers/agents/Developer.py +++ b/euclid/helpers/agents/Developer.py @@ -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 ) diff --git a/euclid/helpers/cli.py b/euclid/helpers/cli.py index a470b48..120bc55 100644 --- a/euclid/helpers/cli.py +++ b/euclid/helpers/cli.py @@ -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 )