{% extends "base.html" %} {% set active_page = "sessions" %} {% block title %}{{ ws.get('summary', session_id) }} - AI Control Plane{% endblock %} {% block head_extra %} {% endblock %} {% block breadcrumb %} {% endblock %} {% block content %}
{% for item in conversation %} {% if item.kind == 'session_start' %}
{{ ts_display(item.timestamp) }}
Session started · {{ 'Claude Code' if source == 'claude' else ('VS Code Chat' if source == 'vscode' else 'Copilot') }} {{ item.version }} {% if item.repo %} · {{ item.repo }}{% endif %} {% if item.branch %} ({{ item.branch }}){% endif %}
{% elif item.kind == 'user_message' %}
{{ ts_display(item.timestamp) }}{% if item.time_spent_waiting_ms %}waited {{ "%.1f"|format(item.time_spent_waiting_ms / 1000) }}s{% endif %}
User{% if item.permission_mode and item.permission_mode != 'default' %}{{ item.permission_mode }}{% endif %}{% if item.agent_mode %}{{ item.agent_mode }}{% endif %}
{{ item.content }}
{% if item.attachments %}
{% for a in item.attachments %} {{ a.type }}: {{ a.name or a.path }} {% endfor %}
{% endif %}
{% elif item.kind == 'assistant_message' %}
{{ ts_display(item.timestamp) }}{% if item.output_tokens %}{{ item.output_tokens }} tokens{% endif %}{% if item.first_progress_ms %}TTFT {{ item.first_progress_ms }}ms{% endif %}{% if item.total_elapsed_ms %}{{ "%.1f"|format(item.total_elapsed_ms / 1000) }}s{% endif %}{% if item.cost_multiplier %}{{ item.cost_multiplier }}{% endif %}
Assistant {% if item.parent_tool_call_id %} (sub-agent response){% endif %} {% if item.stop_reason %}{{ item.stop_reason }}{% endif %}
{% if item.content %}
{{ Markup(md_to_html(item.content)) }}
{% endif %} {% if item.tool_requests %}
Requesting tools: {% for tr in item.tool_requests %}{{ tr.toolName }}{% endfor %}
{% endif %} {% if item.reasoning %}
Show reasoning
{{ item.reasoning }}
{% endif %}
{% elif item.kind == 'tool_start' %}
{{ ts_display(item.timestamp) }}
{% if item.mcp_server %}{{ item.mcp_server }} → {% endif %}{{ item.tool_name }}
{% if item.past_tense %}
{{ item.past_tense }}
{% endif %}
{{ json.dumps(item.arguments, indent=2) }}
{% elif item.kind == 'tool_complete' %}
{{ ts_display(item.timestamp) }}
{% if item.success %} Tool succeeded{% else %} Tool failed{% endif %}
{{ item.result }}
{% elif item.kind == 'subagent_start' %}
{{ ts_display(item.timestamp) }}
Sub-agent started: {{ item.agent_name }} {% if item.agent_prompt %}{% endif %}
{% if item.agent_prompt %}
{{ item.agent_prompt }}
{% endif %}
{% elif item.kind == 'subagent_complete' %}
{{ ts_display(item.timestamp) }}
Sub-agent completed {% if item.result %}{% endif %}
{% if item.result %}
{{ item.result }}
{% endif %}
{% elif item.kind == 'error' %}
{{ ts_display(item.timestamp) }}
{{ item.message }}
{% elif item.kind == 'warning' %}
{{ ts_display(item.timestamp) }}
{{ item.message }}
{% elif item.kind == 'session_summary' %}
{{ ts_display(item.timestamp) }}
AI-generated session summary
{{ item.content }}
{% elif item.kind == 'model_change' %}
{{ ts_display(item.timestamp) }}
Model changed to {{ item.new_model }}{% if item.reasoning_effort %} (reasoning: {{ item.reasoning_effort }}){% endif %}
{% elif item.kind == 'notification' %}
{{ ts_display(item.timestamp) }}
{{ item.message }}
{% elif item.kind == 'turn_start' %}
── Turn {{ item.turn_id }} ──
{% elif item.kind == 'hook' %}
{{ ts_display(item.timestamp) }}
{{ item.hook_event }}: {{ item.hook_name }}{% if item.command %} → {{ item.command }}{% endif %}
{% elif item.kind == 'file_snapshot' %}
{{ ts_display(item.timestamp) }}
{{ item.file_count }} file{{ 's' if item.file_count != 1 }} tracked: {{ item.files|join(', ') }}{% if item.file_count > 5 %}…{% endif %}
{% elif item.kind == 'last_prompt' %}
{{ ts_display(item.timestamp) }}
Session ended with pending prompt: {{ item.content[:120] }}{% if item.content|length > 120 %}…{% endif %}
{% elif item.kind == 'followups' %}
{% for s in item.suggestions %}{{ s }}{% endfor %}
{% elif item.kind == 'progress_task' %}
{{ item.content }}
{% elif item.kind == 'session_end' %}
{{ ts_display(item.timestamp) }}
Session ended
{% endif %} {% endfor %}
{% endblock %} {% block scripts_extra %} {% endblock %}