{#
NPC Dialogue Response partial - displays conversation with current exchange.
Used when job polling returns NPC dialogue results.

Expected context:
- npc_name: Name of the NPC
- character_name: Name of the player character
- conversation_history: List of previous exchanges [{player_line, npc_response}, ...]
- player_line: What the player just said
- dialogue: NPC's current response
- session_id: For any follow-up actions
#}

{# Only show CURRENT exchange (removed conversation_history loop) #}
<div class="current-exchange">
    {% if player_line %}
    <div class="chat-message chat-message--player">
        <strong>{{ character_name }}:</strong> {{ player_line }}
    </div>
    {% endif %}
    <div class="chat-message chat-message--npc">
        <strong>{{ npc_name }}:</strong> {{ dialogue }}
    </div>
</div>

{# Trigger history refresh after new message #}
<div hx-trigger="load"
     _="on load trigger newMessage on body"
     style="display: none;"></div>

{# Trigger sidebar refreshes after NPC dialogue #}
<div hx-get="{{ url_for('game.npcs_accordion', session_id=session_id) }}"
     hx-trigger="load"
     hx-target="#accordion-npcs"
     hx-swap="innerHTML"
     style="display: none;"></div>
