{% from "_macros.html" import icon %} {# A helper's conversation so far, as the panel shows it. One shape for a helper running here and a device's subagent (`services/jobs.transcript`, `device_link.job_transcript`): a user turn is the task, or a message sent to it (`machine`); an assistant turn is its tool lines and what it wrote. `turn.html` is the one `|safe`: it came out of `services/markdown.py`. The rest is text and is escaped. #} {% if not turns %}

{{ t("Nothing yet.") }}

{% endif %} {% for turn in turns %} {% if turn.role == "user" %}
{{ t("From the main agent") if turn.machine else t("The task") }}
{{ turn.text }}
{% else %}
{% for tool in turn.tools %}
{{ icon(tool_icon(tool.name), "icon--sm tool-activity__icon") }} {{ tool_label(tool.name) }} {% if tool.title %}{{ tool.title }}{% endif %} {% if tool.isError %}{{ t("failed") }}{% endif %}
{% endfor %} {% if turn.html %}
{{ turn.html|safe }}
{% endif %} {% if turn.error %}

{{ turn.error }}

{% endif %} {% if turn.running %}

{{ t("Working…") }}

{% endif %}
{% endif %} {% endfor %}