Add <reason> arg to do_nothing command (#3090)

* Add <reason> arg to do_nothing command

* do_nothing returns reason arg
This commit is contained in:
fluxism
2023-04-24 08:12:15 -07:00
committed by GitHub
parent 9c60eecce6
commit cade788a7e
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ def execute_command(
# non-file is given, return instructions "Input should be a python
# filepath, write your code to file and try again
elif command_name == "do_nothing":
return "No action performed."
return f"Error: No action performed. Reason: {arguments['reason']}"
elif command_name == "task_complete":
shutdown()
else:

View File

@@ -39,7 +39,7 @@ def build_default_prompt_generator() -> PromptGenerator:
# Define the command list
commands = [
("Do Nothing", "do_nothing", {}),
("Do Nothing", "do_nothing", {"reason": "<reason>"}),
("Task Complete (Shutdown)", "task_complete", {"reason": "<reason>"}),
]