MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _report_snippet

Function _report_snippet

deployments/desktop/shared/agents.py:645–660  ·  view source on GitHub ↗
(body: str)

Source from the content-addressed store, hash-verified

643
644
645def _report_snippet(body: str) -> str:
646 for raw_line in body.splitlines():
647 line = raw_line.strip()
648 if not line:
649 continue
650 if line.startswith("#"):
651 continue
652 line = re.sub(r"^>+\s*", "", line)
653 line = re.sub(r"^[-*]\s+", "", line)
654 line = re.sub(r"`([^`]*)`", r"\1", line)
655 if re.match(r"^[★☆]{2,}.*(?:约\s*\d+\s*分钟|about\s+\d+\s+min)", line, flags=re.IGNORECASE):
656 continue
657 if not line:
658 continue
659 return line[:240]
660 return ""
661
662
663def _report_record(path: Path) -> Dict[str, Any]:

Callers 1

_report_recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected