(msg: Any, msg_type: str)
| 327 | |
| 328 | |
| 329 | def should_export_structured_message(msg: Any, msg_type: str) -> bool: |
| 330 | if msg_type in SKIP_MESSAGE_TYPES: |
| 331 | return False |
| 332 | if msg_type == "system": |
| 333 | subtype = _field(msg, "subtype", None) |
| 334 | subtype_str = "" if subtype is None else str(subtype) |
| 335 | if subtype_str in SKIP_SYSTEM_SUBTYPES: |
| 336 | return False |
| 337 | if _field(msg, "isMeta") is True or _field(msg, "isCompactSummary") is True: |
| 338 | return False |
| 339 | content = extract_message_content(msg) |
| 340 | if is_synthetic_content(content): |
| 341 | return False |
| 342 | return has_exportable_structured_content(content) or not is_known_message_type( |
| 343 | msg_type |
| 344 | ) |
| 345 | |
| 346 | |
| 347 | # --------------------------------------------------------------------------- # |
no test coverage detected