{% for session in sessions %}
<div class="session-item{% if session.active %} active{% endif %}"
     id="session-{{ session.id }}"
     hx-post="/api/chat/sessions/{{ session.id }}"
     hx-target="#messages"
     hx-swap="innerHTML">
    <div class="session-info">
        <div class="session-name">{{ session.name }}</div>
        <div class="session-preview">{{ session.last_message }}</div>
    </div>
    <div class="session-meta">
        <span class="session-time">{{ session.timestamp }}</span>
    </div>
</div>
{% endfor %}
{% if sessions.is_empty() %}
<div class="empty-state">
    <p>No conversations yet</p>
    <button hx-post="/api/chat/sessions/new"
            hx-target="#session-list"
            hx-swap="afterbegin">
        Start a conversation
    </button>
</div>
{% endif %}
