diff --git a/euclid/helpers/Project.py b/euclid/helpers/Project.py index 8dedd0a..d96b1f1 100644 --- a/euclid/helpers/Project.py +++ b/euclid/helpers/Project.py @@ -1,5 +1,8 @@ import os + +from termcolor import colored from const.common import IGNORE_FOLDERS +from utils.questionary import styled_text from helpers.files import get_files_content from helpers.cli import build_directory_tree from helpers.agents.TechLead import TechLead @@ -49,7 +52,11 @@ class Project: self.developer.start_coding() def get_directory_tree(self): - return build_directory_tree(self.root_path, ignore=IGNORE_FOLDERS) + return build_directory_tree(self.root_path + '/', ignore=IGNORE_FOLDERS) + + def get_test_directory_tree(self): + # TODO remove hardcoded path + return build_directory_tree(self.root_path + '/tests', ignore=IGNORE_FOLDERS) def get_files(self, files): files_with_content = [] @@ -87,4 +94,13 @@ class Project: # Write/overwrite the file with its content with open(full_path, 'w', encoding='utf-8') as f: - f.write(file_snapshot.content) \ No newline at end of file + f.write(file_snapshot.content) + + def ask_for_human_verification(self, message, description): + print(colored(message, "orange")) + print(description) + answer = '' + while answer != 'continue': + answer = styled_text( + 'Once you are ready, type "continue" to continue.', + ) \ No newline at end of file diff --git a/euclid/helpers/cli.py b/euclid/helpers/cli.py index 8501cf5..6318c87 100644 --- a/euclid/helpers/cli.py +++ b/euclid/helpers/cli.py @@ -125,5 +125,7 @@ def run_command_until_success(command, timeout, convo): command = response if not command_executed: - # TODO ask user to debug and press enter to continue - pass + convo.agent.project.ask_for_human_verification( + 'It seems like I cannot debug this problem by myself. Can you please help me and try debugging it yourself?', + command + )