{% from "_macros.html" import icon %} {# Everything is rendered through normal Jinja escaping and never `|safe`. This JSON is full of model output, search results and uploaded documents -- hard rule 6 applies here exactly as it does to a chat bubble. #}

{{ t("Rebuilt now against the current configuration. This is not a recording of the request that produced the last reply — if a prompt or a setting has changed since, this shows what would be sent today.") }}

{{ t("This chat") }}

{{ t("Model") }}
{{ chat.model_id or "—" }}
{{ t("Context") }}
{% if model and model.context_length %} {{ t("%(n)s tokens", n=model.context_length) }} {% else %} {# Shown here rather than only beside a reply, because "why is there no percentage" is a question people have before the first one. #} {% if model %}{{ tm('not set — set it', id=model.id) }}{% else %}{{ t("not set") }}{% endif %} {% endif %}
{% if chat.temporary %}
{{ t("Lifetime") }}
{{ t("temporary") }}
{% endif %}

{{ t("Last reply") }}

{% if row %}
{{ t("Tokens") }}
{% if metrics.has_anything %} {% set approx = "~" if metrics.estimated else "" %} {{ t("%(sent)s in, %(received)s out", sent=approx ~ metrics.prompt_tokens, received=approx ~ metrics.completion_tokens) }} {% if metrics.estimated %}{{ t("estimated") }}{% endif %} {% else %} {{ t("not reported") }} {% endif %}
{{ t("Elapsed") }}
{{ metrics.elapsed_ms }} ms
{{ t("Thinking") }}
{{ row.reasoning_ms }} ms
{{ t("Tool calls") }}
{{ row.tool_calls_json | length }}
{{ t("Rounds") }}
{{ metrics.rounds }}
{{ t("State") }}
{% if row.error %}{{ t("error") }} {% elif row.stopped %}{{ t("stopped") }} {% elif not row.complete %}{{ t("writing") }} {% else %}{{ t("complete") }}{% endif %}
{% if row.error %}

{{ row.error }}

{% endif %} {% else %}

{{ t("Nothing has been answered in this chat yet.") }}

{% endif %}

{{ t("System message") }}

{% if system %}
{{ system }}
{% else %}

{{ t("None is being sent.") }}

{% endif %}

{{ t("Tools offered") }} {{ tool_names | length }}

{% if tool_names %}

{{ tool_names | join(", ") }}

{% else %}

{{ t("None. A model has to be marked as supporting tools, the user needs the permission, and the tool itself has to be turned on.") }}

{% endif %}

{{ t("Request body") }}

{{ request_json }}