{% extends "base.html" %} {% block content %}

Turn: {{ turn.id[:12] }}

{% if turn.actor == 'agent' %} agent {% else %} user {% endif %} {% if turn.model %} {{ turn.model }} {% endif %}
Session: {{ turn.session_id[:12] }} · IDE: {{ turn.ide or "?" }} · Time: {{ (turn.timestamp or "")[:19] }} {% if turn.commit_sha %} · Commit: {{ turn.commit_sha[:10] }} {% endif %}
Turn Content / Prompt
{{ content|markdown|safe }}
{% if usage %}

Ingestion & API Usage

Tokens In
{{ "{:,}".format(usage.tokens_in or 0) }}
Tokens Out
{{ "{:,}".format(usage.tokens_out or 0) }}
Cached
{{ "{:,}".format(usage.tokens_cached or 0) }}
Cost
${{ "%.4f"|format(usage.cost_usd or 0) }}
{% endif %} {% if tool_calls %}

Tool Invocations ({{ tool_calls|length }})

{% for tc in tool_calls %}
{{ tc.tool_name }} {% if tc.file_path %} File: {{ tc.file_path }} {% endif %}
{{ tc.status or "completed" }} {% if tc.duration_ms %} {{ tc.duration_ms }}ms {% endif %}
{% endfor %}
{% endif %} {% if changes %}

Code Changes ({{ changes|length }})

{% for c in changes %}
{{ c.file_path }} {{ c.change_type }}
+{{ c.lines_added }} -{{ c.lines_removed }}
{% if c.diff_content %}
          {%- for line in c.diff_content.split('\n') -%}
            {%- if line.startswith('+') and not line.startswith('+++') -%}
              {{ line }}
            {%- elif line.startswith('-') and not line.startswith('---') -%}
              {{ line }}
            {%- else -%}
              {{ line }}
            {%- endif -%}
          {%- endfor -%}
        
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}