{{ chat.title if chat else t("New chat") }} {# Rename, where the name is. A themed dialog through `data-prompt` rather than an inline field: the heading is in a flex row beside the badges and the connection chip, and swapping it for a text box moves all of them. The response is the same out-of-band pair the `done` frame sends, so the sidebar row follows without a second request. #} {% if chat %} {% endif %} {# Beside the title because it describes the chat rather than acting on it. The way out of it is Keep, in the overflow menu. #} {% if chat and chat.temporary %} {{ t("Temporary · read-only") }} {# Reported on the way out, so a chat that lives "until you leave it" does. A reload reports it too, and the page that comes back clears it again (chat_service.mark_back). #} {% if temporary_leaves %} {% endif %} {% endif %}
{# Where this chat runs. Beside the title because it describes the chat and cannot be changed -- update_chat refuses the connection and the directory with a 409 -- so it is of a kind with the Temporary badge rather than with the controls on the right. The mode is the one thing here that moves, and it stays down by the message box. #} {% if chat and chat.kind == "agent" %} {% if chat.device_token_id and device_reports_model %} {% include "chat/_device_model.html" %} {% endif %} {% endif %}
{{ icon("server", "empty__mark") }}
{% else %}
{{ t("No models available") }}
{% if user.is_admin %} {{ t("Add an OpenAI-compatible connection and %(name)s will load its models.", name=brand.name) }} {% else %} {{ t("No model connections have been set up yet. Ask an administrator.") }} {% endif %}
{% if user.is_admin %} {{ icon("server", "icon--sm") }} {{ t("Set up a connection") }} {% endif %}
{% if not messages %}
{{ scene() }}
{% endif %}
{# The same include the rewind response returns, so the conversation
is described in one place. Markdown was rendered server-side in
pages.py, keyed by message id. #}
{% include "chat/_thread.html" %}
{{ t("What would you ask?") }}
{{ t(brand.text.chat_empty) }}
{# Only on a chat that does not exist yet. An empty chat someone opened on purpose already has a model and a prompt chosen. #} {% if not chat and suggestions %}
{% for suggestion in suggestions %}
{% endfor %}
{% endif %}