{# Shared Jinja macros for the Memorizz UI. agent_card(agent, agent_id, display_name, ...) renders the agent-card shell used by agents.html and playground_select.html. Page-specific pieces plug in through parameters: icon 'robot-svg' for the outlined robot icon, anything else for the plain emoji icon. favorite none to hide the favorite toggle, otherwise the current is-favorite boolean (renders the toggle form). favorite_redirect value for the favorite form's redirect_to field. meta_items list of {label, value, class?} dicts rendered after the Mode row ("class" defaults to "meta-value"). footer_links list of {href, class, label} dicts for the card footer. Extra trailing card content (e.g. the inline mini-chat on agents.html) can be supplied with {% call %} ... {% endcall %}. #} {% macro agent_card(agent, agent_id, display_name, icon='emoji', favorite=none, favorite_redirect='', meta_items=[], footer_links=[]) %}
{% if icon == 'robot-svg' %} {% else %}
🤖
{% endif %}

{{ display_name }}

{{ agent_id[:12] }}...
{% if favorite is not none %}
{% endif %}
Mode: {{ agent.application_mode or 'assistant' }}
{% for item in meta_items %}
{{ item.label }} {{ item.value }}
{% endfor %}
{% if agent.instruction %}

{{ agent.instruction[:150] }}{% if agent.instruction|length > 150 %}...{% endif %}

{% endif %}
{{ caller() if caller }}
{% endmacro %}