{% import "components.html" as c with context %} {# the configuration of an agent as cards: the agent itself, then one card per channel and per runtime, kept as a stack of pages per kind with a blank page at the end to start another. field names carry the card's number, so the handler reads the cards back in the order they were added; the values sent are the configuration's own words, the page shows them in the reader's #} {% macro kind_name(family, kind) -%} {{ t.text("agents." ~ family ~ "." ~ kind) if t.has("agents." ~ family ~ "." ~ kind) else kind }} {%- endmacro %} {% macro logo(family, kind) -%} {% if family == "channel" %}{{ c.channels((kind,)) }}{% else %}{{ c.runtimes((kind,)) }}{% endif %} {%- endmacro %} {# a card's head: its logo and name, the runtime's version beside it, and the way to take the card out #} {% macro card_head(family, kind, version=none) -%}
{{ t.text("contacts.reply_hint") }}
{{ t.text("agents." ~ listed.answer, {"code": listed.code}) }}
{% elif family == "channel" %} {% for item in listed.kinds %}{{ channel_card(item.kind, "__N__") }}{% endfor %} {% else %} {% for item in listed.kinds %}{% if item.available %}{{ runtime_card(item.kind, "__N__", version=item.version) }}{% endif %}{% endfor %} {% endif %} {%- endmacro %} {# the cards of one family as a stack of pages, one shown, a tab on its edge to turn them; `start` numbers the first card #} {% macro deck(family, items, start, kept=false, origins=none, present=()) -%}