源码: compact.rs:38-50
(summary: str)
| 307 | # ============================================================ |
| 308 | |
| 309 | def format_compact_summary(summary: str) -> str: |
| 310 | """源码: compact.rs:38-50""" |
| 311 | without_analysis = strip_tag_block(summary, "analysis") |
| 312 | content = extract_tag_block(without_analysis, "summary") |
| 313 | if content is not None: |
| 314 | formatted = without_analysis.replace( |
| 315 | f"<summary>{content}</summary>", |
| 316 | f"Summary:\n{content.strip()}", |
| 317 | ) |
| 318 | else: |
| 319 | formatted = without_analysis |
| 320 | return _collapse_blank_lines(formatted).strip() |
| 321 | |
| 322 | |
| 323 | # ============================================================ |
no test coverage detected