{% from "_macros.html" import icon %} {# The composer, used both inside an existing chat and on /chat where no chat row exists yet. The only difference is where it posts. With a chat, the turn is appended to the thread in place; without one, /api/chats/start creates the chat and redirects, and the reply streams on arrival because the page renders the unfinished assistant message with its sse-connect. That is what stops an opened-and-abandoned chat ever being written to the database. #}
{% if can.get("files.upload") %}
{% endif %}
{# The chips live outside this form, so their hidden inputs are pulled in explicitly at submit time. #} {% if not chat and current_model %} {% endif %} {% if can.get("files.upload") %} {% endif %}

Enter to send, Shift+Enter for a new line. {% if can.get("files.upload") %} Drag files in, or paste an image. {% if current_model and not current_model.capabilities_json.get("vision") %} {{ current_model.label }} has no vision, so images will not be sent — documents still will. {% endif %} {% endif %}

{% if can.get("files.upload") %} {% endif %}