Fix undefined name branch_to_use in console_formatter.py

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-05-21 10:07:51 +00:00
parent b44cdc6e2a
commit a9c175a0f8

View File

@@ -591,6 +591,13 @@ class ConsoleFormatter:
# Remove the thinking status node when complete
if "Thinking" in str(tool_branch.label):
# Define branch_to_use here to fix the undefined name issue
branch_to_use = (
self.current_lite_agent_branch
or agent_branch
or self.current_task_branch
)
parents = [
branch_to_use if 'branch_to_use' in locals() else None,
self.current_lite_agent_branch,