{# Console fragment — renders the entire history + optional pending-continuation marker. Swapped in place by htmx on every submission so scrollback grows without a full-page reload. #}
{% if not history %}
interpreter idle — submit an expression to start
{% endif %} {% for entry in history %}
>>>
{{ entry.source }}
{% if entry.stdout %}
{{ entry.stdout }}
{% endif %} {% if entry.stderr %}
{{ entry.stderr }}
{% endif %} {% if entry.error %}
{{ entry.error }}
{% endif %}
{% endfor %} {% if pending_continuation %}
... waiting for continuation. Complete the statement and submit again.
{{ pending_continuation }}
{% endif %}