{#- A task's comment thread, refetched on live events. Expects: t (the task), comments, optional error. The form that adds a comment lives outside it (_comments.html), so a draft survives. -#} {%- macro stamp(ts) -%}{%- endmacro -%}
{{ error }}
{% endif %} {% if comments %}No comments yet.
{% endif %}{% if t.session_name %}A new comment reaches {{ t.session_name }} through its hooks on its next prompt or tool call.{% else %}No session is bound to this task: a comment waits until one is.{% endif %}
{%- if c.from_owner %} sent {{ stamp(c.created_at) }} {%- if c.delivered_at %} · delivered {{ stamp(c.delivered_at) }}{% if c.delivered_to_name %} to {{ c.delivered_to_name }}{% endif %} {%- else %} · not delivered yet{% endif %} {%- if c.read_at %} · read {{ stamp(c.read_at) }}{% endif %} {%- else %} reply {{ stamp(c.created_at) }} {%- if not c.read_at %} · unread{% endif %} {%- endif %}