MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / should_export_structured_message

Function should_export_structured_message

src/utils/export_renderer.py:329–344  ·  view source on GitHub ↗
(msg: Any, msg_type: str)

Source from the content-addressed store, hash-verified

327
328
329def 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# --------------------------------------------------------------------------- #

Callers 3

render_messages_to_jsonFunction · 0.85

Calls 5

_fieldFunction · 0.85
extract_message_contentFunction · 0.85
is_synthetic_contentFunction · 0.85
is_known_message_typeFunction · 0.85

Tested by

no test coverage detected