{# Background-task status/result fragment. Included by workflow_detail.html and returned alone for HTMX polling (HX-Request). Polls only while the derived status is running; the terminal render drops the hx-* attributes, so outerHTML replacement stops the loop. #}

Background task

{{ task_status }} {% if can_cancel %} {% endif %}
{% if task_text %}

Task

{{ task_text }}
{% endif %}

Answer

{% if answer_html %}
{{ answer_html | safe }}
{% elif task_status == 'running' %}

The answer appears here when the task finishes.

{% else %}

No answer was stored for this task.

{% endif %} {% if task_session_pk %}

Open the full session transcript →

{% endif %}