MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _truncate_text

Function _truncate_text

src/api/admin.py:61–65  ·  view source on GitHub ↗
(text: Any, limit: int = 240)

Source from the content-addressed store, hash-verified

59
60
61def _truncate_text(text: Any, limit: int = 240) -> str:
62 value = str(text or "").strip()
63 if len(value) <= limit:
64 return value
65 return f"{value[:limit - 3]}..."
66
67
68def _extract_error_summary(payload: Any) -> str:

Callers 1

_extract_error_summaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected