{% macro badge_for(ev, view) %} {%- set label = ev.badge -%} {%- if view == 'transcript' and ev.kind == 'tool_use' and ev.name -%} {%- set label = ev.name|upper -%} {%- endif -%} {{ label }} {% endmacro %} {% macro meta_for(ev) %} {%- if ev.in_tokens or ev.out_tokens -%} {{ ev.in_tokens|fmt_tokens }} / {{ ev.out_tokens }} {%- endif -%} {%- if ev.duration_ms -%} {{ ev.duration_ms|fmt_duration }} {%- endif -%} {{ ev.ts|fmt_time or (ev.received_at|fmt_time) }} {% endmacro %} {% macro copyable(content, hl="json") %}
{# `json-maybe` on text blocks: the tree renders only when JSON.parse succeeds, so tool_result output that happens to be JSON gets the collapsible view while plain prose stays untouched. #}
{{ content }}
{% endmacro %} {% macro detail_panel(ev, did) %} {% endmacro %}