{#- The transcript as a CI-style log (data.log): numbered lines, a group per tool call. -#}
{% macro console(lg, running, id="log", follow=True) -%}
{%- if not lg.groups %}
Empty so far.
{% endif %}
{%- for g in lg.groups %}
{%- if g.title %}
{{ g.n }}{{ g.title }}{% if g.kind == "tool" and not g.done %}{{ " … running" if running else " (no result)" }}{% endif %}
{%- for n, t, c in g.lines %}