Improve command result printing to console

This commit is contained in:
Reinier van der Leer
2023-08-25 02:13:52 +02:00
parent 7285f7dad3
commit 1f3db55ee8

View File

@@ -338,10 +338,7 @@ def run_interaction_loop(
result = agent.execute(command_name, command_args, user_input)
if result.status == "success":
logger.info(
str(result.results),
extra={"title": "SYSTEM:", "title_color": Fore.YELLOW},
)
logger.info(result, extra={"title": "SYSTEM:", "title_color": Fore.YELLOW})
elif result.status == "error":
logger.warn(
f"Command {command_name} returned an error: {result.error or result.reason}"