mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
6 lines
169 B
Python
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] + '...'
|