{% extends "base.html" %} {% from "_macros.html" import icon, mark %} {# Messages: one conversation per person, opened at the most recent turns. The ordinary chat shell, with two differences. It opens on the live chunk rather than on everything, and above that sits a sentinel that fetches the page before it when scrolled into view. Everything else — the composer, the bubbles, the tail poller, the streaming shell — is the same machinery, which is the whole reason this is a `Chat` with a different `kind`. #} {% block title %}Messages - {{ brand.name }}{% endblock %} {% block head %} {% endblock %} {% block body_attrs %} data-authenticated="true"{% endblock %} {% block body %}
{% include "partials/sidebar.html" %}

{{ icon("chat", "icon--sm") }} Messages

{% if schedules %}
{{ icon("clock", "icon--sm") }} {{ schedules | length }} scheduled
Posting into this conversation
{% for item in schedules %} {{ item.row.title }} {{ item.summary }} {% if not item.row.enabled %} paused {% endif %} {% endfor %}
{% endif %} {% if can.get("schedule.use") %} {{ icon("plus", "icon--sm") }} Schedule {% endif %}
{% if not messages %}
{{ mark(cls="empty__mark", uid="messages") }}

Nothing said yet

One conversation that keeps going. Anything scheduled to write here will arrive in it.

{% endif %} {# The sentinel goes above the turns and replaces itself with the page before, plus a fresh sentinel. Rendered only when there is something earlier, so a short conversation has no loading row at the top. #} {% if more_before %}
Loading earlier messages…
{% endif %} {% for message in messages %} {% with body_html = bodies.get(message.id, "") %} {% include "chat/_message.html" %} {% endwith %} {% endfor %}
{# Outside `#thread` and outside the composer form, for the two reasons `tests/test_chat_tail.py` already walks the chat page to enforce. #} {% include "chat/_composer.html" %}
{% endblock %} {% block scripts %} {% endblock %}