{% 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 %}

Session {{ session_id }}

{% if agent %}{{ agent }}{% endif %} {% if item %} · item #{{ item.id }} {{ item.status.value }} {% endif %}
{{ stats.turns }} turns {{ stats.wall_ms|fmt_duration or '—' }} {{ stats.input_tokens|fmt_tokens or '0' }} in / {{ stats.output_tokens|fmt_tokens or '0' }} out {% if stats.estimated_cost_usd is not none %} ~${{ "%.4f"|format(stats.estimated_cost_usd) }} {% endif %} {{ stats.raw_count }} lines
{% if tool_usage %}
Tools used {% for t in tool_usage %} {% endfor %}
{% endif %} {% if invocation %}
Invocation {% if invocation.permission_mode %} permissions {{ invocation.permission_mode }} {% endif %} {% if invocation.sdk_version %} sdk {{ invocation.sdk_version }} {% endif %} {% if invocation.entrypoint %} entrypoint {{ invocation.entrypoint }} {% endif %} {% if invocation.mcp_servers %} mcp {{ invocation.mcp_servers | length }} {% endif %}
{% if invocation.cwd %}
cwd{{ invocation.cwd }}
{% endif %} {% if invocation.mcp_servers %}
mcp servers
{% for name in invocation.mcp_servers %} {{ name }} {% endfor %}
{% if invocation.mcp_instructions %}
show MCP instructions {% for mcp in invocation.mcp_instructions %}
{{ mcp.name }}
{{ mcp.preview }}
{% endfor %}
{% endif %} {% endif %}
{% endif %}
Conversation Transcript Debug ({{ debug | length }}) {% if active_tab in ['transcript', 'debug'] and event_kinds %}
All events
{% for kind in event_kinds %} {% endfor %}
{% endif %}
{% if active_tab == "conversation" %} {% if conversation %}
{% for ev in conversation %}
{{ ev.kind }} · {{ ev.ts|fmt_time }}
{{ ev.text }}
{% endfor %}
{% else %}

No conversation messages in this session.

{% endif %} {% else %} {% set events = transcript if active_tab == 'transcript' else debug %} {% if events %}
{% for ev in events %} {% set did = loop.index0 %}
{{ badge_for(ev, active_tab) }} {{ ev.label }} {{ meta_for(ev) }}
{% endfor %}
Select an event to inspect its data.

Tip: use j / k to navigate, Esc to close.
{% for ev in events %} {{ detail_panel(ev, loop.index0) }} {% endfor %}
{% else %}

No events in this view.

{% endif %} {% endif %}