MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _latest_user_text

Function _latest_user_text

uncommon_route/composition.py:690–695  ·  view source on GitHub ↗
(messages: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

688
689
690def _latest_user_text(messages: list[dict[str, Any]]) -> str:
691 idx = _latest_user_index(messages)
692 if idx is None:
693 return ""
694 content = messages[idx].get("content")
695 return content if isinstance(content, str) else (_content_to_text(content) or "")
696
697
698def _latest_user_index(messages: list[dict[str, Any]]) -> int | None:

Callers 2

_checkpoint_historyFunction · 0.85

Calls 3

_latest_user_indexFunction · 0.85
_content_to_textFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected