Files
browser-use/browser_use/dom/utils.py
2025-07-11 14:19:22 +02:00

6 lines
169 B
Python

def cap_text_length(text: str, max_length: int) -> str:
"""Cap text length for display."""
if len(text) <= max_length:
return text
return text[:max_length] + '...'