{% from "_macros.html" import icon %} {# Lazy fragment for the Agent page (#949). Primary swap target is the desktop sidebar (#sidebar-threads, innerHTML). Everything else is filled via HTMX out-of-band swaps in one round-trip: - #offcanvas-threads mobile thread list - #chat-runtime-slot backend chips/badges (runtime status) - #composer-subtle-slot / #composer-actions-slot composer footer The skeleton already resolved the active thread; we just mark it here. #} {# ── macro: a single thread list (shared by sidebar + offcanvas) ── #} {% macro thread_list() %} {% for thread in threads %} {{ thread.title }} {% else %}

Тредов пока нет

{% endfor %} {% endmacro %} {# ── primary swap: desktop sidebar thread list ── #} {{ thread_list() }} {# ── OOB: mobile offcanvas thread list ── #}
{{ thread_list() }}
{# ── OOB: runtime status panel ── #}
{{ active_thread.title if active_thread else "" }}
{% if agent_status and agent_status.selected_backend %} {{ agent_status.selected_backend }} {% endif %} {% if agent_status and agent_status.using_override %} dev override {% endif %}
{% if agent_status %}
Claude {{ "on" if agent_status.selected_backend == "claude" else "off" }} deepagents {{ "on" if agent_status.selected_backend == "deepagents" else "off" }} {% if agent_status.selected_backend == "adk" %} google-adk on {% endif %} {% if agent_status.selected_backend == "deepagents" and agent_status.fallback_model %} provider {{ agent_status.fallback_provider or "unknown" }} model {{ agent_status.fallback_model }} {% endif %}
{% if agent_status.error %}
{{ agent_status.error }}
{% endif %} {% endif %}
{# ── OOB: composer footer (subtle hint + model select / backend hint) ── The Claude model {% for value, label in model_options %} {% endfor %} {% elif agent_status and agent_status.selected_backend == "deepagents" %}
Deepagents runtime Модель и provider берутся из сохраненных настроек и показываются в статусе выше.
{% elif agent_status and agent_status.selected_backend %}
{{ agent_status.selected_backend }} runtime Модель управляется backend'ом — выбор в UI недоступен.
{% endif %}