{% extends "base.html" %} {% from "_macros.html" import icon, mark %} {% block title %}{{ chat.title if chat else "Chats" }} - LLeMbas{% endblock %} {% block head %} {% endblock %} {% block body_attrs %} data-authenticated="true"{% endblock %} {% block body %}
{% include "partials/sidebar.html" %}
{% if chat %}

{{ chat.title }}

{% if models %}
{% endif %} {% else %}

Chats

{% endif %}
{% if not chat %} {# No chat selected. #}
{{ mark(cls="empty__mark", uid="empty") }}

The road goes ever on

Pick a chat from the side, or start a new one.

{% elif not models %} {# Nothing to talk to yet. This is the state every fresh install lands in, so it points straight at the fix rather than just reporting a problem. #}
{{ icon("server", "empty__mark") }}

No models available

{% if user.is_admin %} Add an OpenAI-compatible connection and LLeMbas will load its models. {% else %} No model connections have been set up yet. Ask an administrator. {% endif %}

{% if user.is_admin %} {{ icon("server", "icon--sm") }} Set up a connection {% endif %}
{% else %}
{% if not messages %}
{{ mark(cls="empty__mark", uid="intro") }}

What would you ask?

Speak, friend, and enter.

{% endif %} {% for message in messages %} {# Markdown was rendered server-side in pages.py, keyed by message id, so this loop stays a lookup rather than a render. #} {% with body_html = bodies.get(message.id, "") %} {% include "chat/_message.html" %} {% endwith %} {% endfor %}

Enter to send, Shift+Enter for a new line.

{% endif %}
{% endblock %}