Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Implemented showing the number of preauthorised commands left. #1035 (#3322)

Marwand Ayubi233f900fa6df
diff --git a/autogpt/agent/agent.py b/autogpt/agent/agent.py
index 75f51dc19c..4db9e2eea6 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