{% if thread_view.thread.status == "escalated" %}
This thread has been escalated for review.
{% elif thread_view.thread.status == "review" %}
This thread hit a review state and needs manual attention.
{% elif thread_view.thread.status == "declined" %}
This thread has been closed.
{% endif %}
{% for message in thread_view.messages %}
{% if message.role == "sender" %}
You
{% elif message.role == "gate" %}
{{ gate.assistant_name }}
{% else %}
System
{% endif %}
{{ message.content }}
{% endfor %}
{% if thread_view.latest_decision %}
Latest decision: {{ thread_view.latest_decision.decision }}
Confidence: {{ "%.2f"|format(thread_view.latest_decision.confidence) }}
{% endif %}
{% if not thread_closed %}
{% endif %}