Merge pull request #2193 from Lootheo/betterparsing

changed rstrip for strip and added case for empty string
This commit is contained in:
Richard Beales
2023-04-17 20:43:25 +01:00
committed by GitHub

View File

@@ -115,9 +115,12 @@ class Agent:
console_input = clean_input(
Fore.MAGENTA + "Input:" + Style.RESET_ALL
)
if console_input.lower().rstrip() == "y":
if console_input.lower().strip() == "y":
user_input = "GENERATE NEXT COMMAND JSON"
break
elif console_input.lower().strip() == "":
print("Invalid input format.")
continue
elif console_input.lower().startswith("y -"):
try:
self.next_action_count = abs(