{% extends "base.html" %} {% block title %}{{ stage | title }} Session — Exp {{ exp_id }} — ABREKA{% endblock %} {% block extra_css %} /* Session-specific styles */ .session-block { margin-bottom: 12px; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; } .block-header { padding: 8px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; } .block-body { padding: 12px 16px; background: var(--surface); } /* User message */ .block-user .block-header { background: #dbeafe; color: #1e40af; } .block-user .block-body { background: #f0f7ff; } /* Assistant message */ .block-assistant .block-header { background: #e0e7ff; color: #3730a3; } /* Tool call */ .block-tool .block-header { background: #f3f4f6; color: #374151; } .block-tool.is-error .block-header { background: #fee2e2; color: #991b1b; } /* Thinking block */ .thinking-block { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; } .thinking-block summary { color: #7c3aed; font-weight: 500; } .thinking-content { margin-top: 8px; color: #6b21a8; font-size: 13px; white-space: pre-wrap; word-break: break-word; } /* Tool summary line */ .tool-cmd { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; } /* Assistant text content */ .assistant-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.6; } .assistant-text p { margin: 6px 0; } /* Expand all button */ .controls { margin-bottom: 12px; display: flex; gap: 8px; } .controls button { padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: pointer; font-size: 12px; color: var(--muted); } .controls button:hover { background: var(--primary-light); color: var(--primary); } {% endblock %} {% block content %}

{{ stage | title }} Session

{{ exp.status.value }}

Experiment {{ exp_id }} — {{ exp.hypothesis[:80] }}{% if exp.hypothesis|length > 80 %}...{% endif %}

{{ blocks | length }} blocks
{% for block in blocks %} {% if block.type == "user" %}
User Prompt
Prompt ({{ block.text | length }} chars)
{{ block.text | md }}
{% elif block.type == "assistant" %}
Assistant {% if block.model %}{{ block.model }}{% endif %} {% if block.usage and block.usage.get('totalTokens') %} {{ block.usage.totalTokens }} tokens {% endif %}
{% if block.thinking %}
Thinking ({{ block.thinking | length }} chars)
{{ block.thinking }}
{% endif %} {% if block.text %}
{{ block.text | md }}
{% endif %}
{% elif block.type == "tool" %}
Tool: {{ block.name }} {% if block.is_error %}ERROR{% endif %}
{{ block | tool_summary }}
{% if block.args and block.name not in ('bash',) %}
Arguments
{{ block.args | tojson(indent=2) }}
{% endif %} {% if block.result %}
Result ({{ block.result | length }} chars)
{{ block.result }}
{% endif %}
{% endif %} {% endfor %} {% if not blocks %}

No session data available.

{% endif %} {% endblock %}