{% if ev.kind == "owner_message" %}
{{ owner_name }}{{ ev.text }}
{% elif ev.kind == "sol_message" %}
{% set origin = sol_message_origins.get(loop.index0) if sol_message_origins is defined else none %}
{% if origin %}
{% if origin.trigger_talent %}
{% set origin_label = sol_voice_copy.CHAT_ORIGIN_TAG_WITH_TALENT.format(trigger_talent=origin.trigger_talent, time=origin.time) %}
{% else %}
{% set origin_label = sol_voice_copy.CHAT_ORIGIN_TAG_WITHOUT_TALENT.format(time=origin.time) %}
{% endif %}
{% if origin.superseded_by_id %}
{% set origin_label = origin_label ~ sol_voice_copy.CHAT_ORIGIN_SUPERSEDED_SUFFIX.format(time=origin.superseded_time) %}
{% endif %}
{{ origin_label }}
{{ sol_voice_copy.CHAT_ORIGIN_PROVENANCE_LABEL_TRIGGER_TALENT }} {{ origin.trigger_talent or "" }}{{ sol_voice_copy.CHAT_ORIGIN_PROVENANCE_LABEL_DEDUPE }} {{ origin.dedupe or "" }}{{ sol_voice_copy.CHAT_ORIGIN_PROVENANCE_LABEL_SINCE_TS }} {{ origin.since_ts or "" }}
{% endif %}
{{ agent_name }}{{ ev.text }}
{% if ev.thinking is defined and ev.thinking and ev.thinking.content and thinking_surfaces != "never" %}
{% set thinking_id = "chat-thinking-" ~ loop.index0 %}
{% if thinking_surfaces == "always" %}
{{ ev.thinking.content }}
{% else %}
{{ ev.thinking.content }}
{% endif %}
{% endif %}
{% elif ev.kind == "talent_spawned" %}
{% elif ev.kind == "talent_finished" %}
{% if ev.thinking is defined and ev.thinking and ev.thinking.content and thinking_surfaces != "never" %}
{% set thinking_id = "chat-thinking-" ~ loop.index0 %}
{% if thinking_surfaces == "always" %}