{% from 'components/page-heading.html' import page_heading %} {{ page_heading(t.prompts, t.prompts_subtitle) }} {% if errors.get('prompts') %} {{ read_error(errors.prompts, t.prompts) }} {% elif not data.prompts %}

{{ t.prompt_empty }}

{{ t.prompt_empty_body }}

{% else %}
{% for prompt in data.prompts %} {% set opened = prompt_opened if prompt_opened and prompt.prompt_key == prompt_key else none %} {% set mode = opened.content.mode if opened else prompt.mode %}

{{ t.get(prompt.prompt_key, prompt.prompt_key) }}

{{ prompt.prompt_key }}
{{ t.prompt_status }}: {{ prompt.status }}
{{ t.prompt_mode }}: {{ t.prompt_custom if mode == 'custom' else t.prompt_auto }}
{% if prompt.prompt_key == prompt_key and errors.get('prompt_selected') %} {{ read_error(errors.prompt_selected, t.prompt_revision) }} {% else %}
{{ t.prompt_revision }}
{{ opened.revision if opened else (prompt.artifact.revision if prompt.artifact else t.prompt_auto) }}
{{ t.prompt_demonstrations }}
{{ opened.content.demonstrations|length if opened else (prompt.effective.demonstrations|length if prompt.effective else 0) }}
{% if prompt.artifact %}

{{ t.revision_history }}

{% endif %} {% if opened %}

{{ t.prompt_instructions }}

{{ opened.content.instructions }}
{% elif prompt.effective %}

{{ t.prompt_instructions }}

{{ prompt.effective.instructions }}
{% elif prompt.builtin %}

{{ t.prompt_instructions }}

{{ prompt.builtin.instructions }}
{% endif %} {% endif %}
{% endfor %}
{% include 'components/revision-history.html' %} {% endif %}