style: improve string formatting in visualization functions
This commit is contained in:
parent
b7627cb642
commit
f4edc1f372
1 changed files with 3 additions and 3 deletions
|
|
@ -44,21 +44,21 @@ def get_all_nodes(agent: Agent, parent: Agent = None) -> str:
|
|||
if not parent:
|
||||
parts.append(
|
||||
f'"{agent.name}" [label="{agent.name}", shape=box, style=filled, '
|
||||
'fillcolor=lightyellow, width=1.5, height=0.8];'
|
||||
"fillcolor=lightyellow, width=1.5, height=0.8];"
|
||||
)
|
||||
|
||||
# Smaller tools (ellipse, green)
|
||||
for tool in agent.tools:
|
||||
parts.append(
|
||||
f'"{tool.name}" [label="{tool.name}", shape=ellipse, style=filled, '
|
||||
f'fillcolor=lightgreen, width=0.5, height=0.3];'
|
||||
f"fillcolor=lightgreen, width=0.5, height=0.3];"
|
||||
)
|
||||
|
||||
# Bigger handoffs (rounded box, yellow)
|
||||
for handoff in agent.handoffs:
|
||||
parts.append(
|
||||
f'"{handoff.name}" [label="{handoff.name}", shape=box, style=filled, style=rounded, '
|
||||
f'fillcolor=lightyellow, width=1.5, height=0.8];'
|
||||
f"fillcolor=lightyellow, width=1.5, height=0.8];"
|
||||
)
|
||||
parts.append(get_all_nodes(handoff))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue