execute_command_and_check_cli_response
Runs a command using execute_commant
and then prompts an LLM to check the output of that command (ran_command.prompt
) using check_if_command_successful
. The prompt then outputs either DONE
or BUG
. If it’s DONE
, it removes the messages from the message history.
run_command_until_success
This is a neat piece of self healing. We first attempt to execute the command like normal, but if we aren’t successful we throw to the Debugger. We reprocess the command using Debugger.debug
in a while True:
loop, but the debugger has a max recursion depth of three attempts — after which is throws and breaks the loop.
Ah, it’s solely to recover from a TokenLimitError, which it reverts back to a previous conversation branch to try and recover.