{# partials/_input.html Renders the input prompt section of a result entry. Expects: entry, truncated (bool), process_text(), process_standardised_conversation(), text_to_colour() #} {% if entry.system_message and entry.system_message is not none and entry.system_message != '' %}
System Message
{{ process_text(entry.system_message, truncated=truncated)|e }}
{% endif %} {% if entry.objective and entry.objective is not none and entry.objective != '' %}
Objective:{{ entry.objective|e }}
{% endif %} {% set _has_trace = entry.conversation or (entry.input is mapping) or (entry.input is sequence and entry.input is not string) %} {% if entry.conversation %} {% set _trace_size = conversation_message_count(entry.conversation) %} {% elif entry.input is mapping %} {% set _trace_size = entry.input.conversation | length %} {% elif entry.input is sequence and entry.input is not string %} {% set _trace_size = entry.input | length %} {% else %} {% set _trace_size = 0 %} {% endif %} {% set _trace_expanded = not truncated or _trace_size <= 8 %} {% if _has_trace %}
{{ 'Conversation' if entry.conversation else 'Input conversation' }} · {{ _trace_size }} messages
{% else %}
Input Prompt
{% endif %} {# ── Standardised attack conversation trace ── #} {% if entry.conversation %}
{{ process_standardised_conversation(entry.conversation, truncated=false) | safe }}
{# ── Multi-turn mapping: {conversation: [{role, content}, ...]} ── #} {% elif entry.input is mapping %}
{% for message in entry.input.conversation %}
{{ message.role | upper }}
{{ process_text(message.content, truncated=false)|e }}
{% endfor %}
{# ── Sequence of messages ── #} {% elif entry.input is sequence and entry.input is not string %}
{% for message in entry.input %}
{{ process_text(message, truncated=false)|e }}
{% endfor %}
{# ── Plain string ── #} {% else %}
{{ process_text(entry.input, truncated=truncated)|e }}
{% endif %} {% if _has_trace %}
{% else %} {% endif %}