{# Chat — the cold open, and a bound session (043 C6). Derived from docs/design/040/web/chat-cold-open.html and chat-read-only.html. ONE template, two states, decided by `is_new`: is_new the hero, four starters, the composer. No model picker, no tool checkboxes, no max-steps slider — they move to Agent › Settings in phase 4, and the session request carries only the task. bound the thread, live, drawn by static/app/transcript.js. It reads the session from document.body's data attributes, which is why no inline script is needed here. The read-only frame comes from shell.html and is stated ONCE there; all this page does is swap the composer for the sentence that says why it is off. The thread itself is a READ and renders on every posture. #} {% extends "shell.html" %} {% block body_attrs %} data-session-id="{{ session_id or 'new' }}" data-is-new="{{ 'true' if is_new else 'false' }}" data-is-owner="{{ 'true' if is_owner else 'false' }}" data-is-authenticated="{{ 'true' if is_authenticated else 'false' }}" data-read-only="{{ 'true' if read_only else 'false' }}"{% endblock %} {% block body %} {%- if is_new %}
{{ t('chat.open.sub') }}
{%- if not read_only %} {# A starter is a SHORTCUT INTO THE COMPOSER, and read-only has no composer — chat-open.js binds them only after it finds the form, so rendering them here shipped four buttons that did nothing. #}{{ t('chat.ownership_unknown') }}
{{ t('chat.ownership_unknown_note') }}
{%- elif read_only %} {# The off state (schema: chat-read-only.html) — a dashed, dimmed composer that cannot be typed into. `style-src 'unsafe-inline'` is already the CSP. #}{{ t('chat.read_only.composer') }}
{{ t('chat.read_only.note') }}
{# E14: an owner verb typed here is refused too. Before this the box said only that the console could not TALK, so `/pause` looked like a thing you could still do from a read-only seat. #}{{ t('chat.read_only.verbs') }}
{%- else %}{{ t('chat.composer.hint') }}
{%- if not is_new %} {%- endif %} {%- endif %}{{ t('chat.sources')|safe }}
{# Loaded on EVERY posture. The thread is a READ, and gating the script on read-only left /c/{id} permanently blank on the one posture prod runs — the composer is already absent above, and `data-read-only` is what keeps the imported session modules in look-only mode. #} {%- if not ownership_unknown %} {%- endif %} {% endblock %}