Skip to content

Commit

Permalink
ask user if they want to debug command errors
Browse files Browse the repository at this point in the history
  • Loading branch information
senko committed Jun 4, 2024
1 parent 03b45bd commit 152a740
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/agents/error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ async def handle_command_error(self, message: str, details: dict) -> AgentRespon
if not cmd:
raise ValueError("No command provided in command error response details")

confirm = await self.ask_question(
"Can I debug why this command failed?",
buttons={"yes": "Yes", "no": "No"},
default="yes",
buttons_only=True,
)
if confirm.cancelled or confirm.button == "no":
log.info("Skipping command error debug (requested by user)")
return AgentResponse.done(self)

llm = self.get_llm()
convo = AgentConvo(self).template(
"debug",
Expand Down

0 comments on commit 152a740

Please sign in to comment.