Join message sections once while preserving their original order.
(*sections: Any)
| 742 | |
| 743 | |
| 744 | def merge_unique_message_sections(*sections: Any) -> str: |
| 745 | """Join message sections once while preserving their original order.""" |
| 746 | merged: List[str] = [] |
| 747 | seen: set[str] = set() |
| 748 | |
| 749 | for section in sections: |
| 750 | text = str(section or "").strip() |
| 751 | if not text or text in seen: |
| 752 | continue |
| 753 | seen.add(text) |
| 754 | merged.append(text) |
| 755 | |
| 756 | return "\n".join(merged) |
| 757 | |
| 758 | |
| 759 | BOT_AUTHORED_PREFIXES = ( |
no outgoing calls
no test coverage detected