{% macro blocks(entries, sid, offset=0) %} {% for entry in entries %}
{{ entry.role }} {% if entry.timestamp %}{% endif %}
{% for b in entry.blocks %} {% if b.kind == 'text' %}
{{ md(b.text)|safe }}
{% elif b.kind == 'thinking' %}
thinking
{{ md(b.text)|safe }}
{% elif b.kind == 'image' %} {% elif b.kind == 'tool' %} {% set t = b.tool %}
{{ t.name }} {{ t.summary }} {% if t.is_error %}error{% endif %}
{% set rendered = tool_args(t.name, t.input) %} {% if rendered %}{{ rendered|safe }}{% endif %} {% if t.result %}
{{ code(t.result)|safe }} {% if t.truncated %}

output truncated

{% endif %}
{% endif %} {% for idx in t.images %} {% endfor %}
{% endif %} {% endfor %}
{% endfor %} {% endmacro %}