Format a tool name with appropriate color
(name: str, status: str = "active")
| 120 | |
| 121 | |
| 122 | def format_tool(name: str, status: str = "active") -> str: |
| 123 | """Format a tool name with appropriate color""" |
| 124 | if status == "active": |
| 125 | return f"{Colors.CYAN}{Colors.BOLD}{name}{Colors.RESET}" |
| 126 | elif status == "done": |
| 127 | return f"{Colors.GREEN}{name}{Colors.RESET}" |
| 128 | elif status == "error": |
| 129 | return f"{Colors.RED}{name}{Colors.RESET}" |
| 130 | return name |
| 131 | |
| 132 | |
| 133 | def truncate(s: str, max_len: int) -> str: |