(text: str)
| 27 | |
| 28 | |
| 29 | def _cap(text: str) -> str: |
| 30 | lines = text.split("\n") |
| 31 | if len(lines) <= _MAX_LINES: |
| 32 | return text |
| 33 | more = len(lines) - _MAX_LINES |
| 34 | head = "\n".join(lines[:_MAX_LINES]) |
| 35 | return ( |
| 36 | f"{head}\n… (diff truncated — {more} more line(s); use the TUI /diff for the " |
| 37 | "full interactive view)" |
| 38 | ) |
| 39 | |
| 40 | |
| 41 | def _section(label: str, result) -> str: |