源码: compact.rs:317-324
(text: str, max_chars: int = 160)
| 96 | # ============================================================ |
| 97 | |
| 98 | def truncate_summary(text: str, max_chars: int = 160) -> str: |
| 99 | """源码: compact.rs:317-324""" |
| 100 | if len(text) <= max_chars: |
| 101 | return text |
| 102 | return text[:max_chars] + "…" |
| 103 | |
| 104 | |
| 105 | _INTERESTING_EXTENSIONS = {"py", "rs", "ts", "tsx", "js", "json", "md", "toml", "yaml", "yml"} |
no outgoing calls
no test coverage detected