diff --git a/autogpt/agent/agent.py b/autogpt/agent/agent.py index 75f51dc1..4db9e2ee 100644 --- a/autogpt/agent/agent.py +++ b/autogpt/agent/agent.py @@ -149,18 +149,18 @@ class Agent: NEXT_ACTION_FILE_NAME, ) + logger.typewriter_log( + "NEXT ACTION: ", + Fore.CYAN, + f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} " + f"ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}", + ) + if not cfg.continuous_mode and self.next_action_count == 0: # ### GET USER AUTHORIZATION TO EXECUTE COMMAND ### # Get key press: Prompt the user to press enter to continue or escape # to exit self.user_input = "" - logger.typewriter_log( - "NEXT ACTION: ", - Fore.CYAN, - f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} " - f"ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}", - ) - logger.info( "Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands, " "'n' to exit program, or enter feedback for " @@ -235,12 +235,9 @@ class Agent: logger.info("Exiting...") break else: - # Print command + # Print authorized commands left value logger.typewriter_log( - "NEXT ACTION: ", - Fore.CYAN, - f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL}" - f" ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}", + f"{Fore.CYAN}AUTHORISED COMMANDS LEFT: {Style.RESET_ALL}{self.next_action_count}" ) # Execute command