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

Callers 1

_report_recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected