{#- Shared page chrome. Import with {% from '_ui.html' import page_header, page_tabs, empty_state, id_chip %}. page_header: `section` is the breadcrumb (plain text, sentence case), `back` an optional (href, label) pair, `nav` rendered tabs (page_tabs or an area macro below). Wrap it in {% call %} to add actions on the right: {% call page_header('Agents', 'Create and run agents.', 'Build') %} Create agent {% endcall %} page_tabs: sibling views of one area, as (href, label, key[, element_id]). -#} {% macro page_header(title, description=None, section=None, back=None, nav=None, title_id=None, description_id=None, actions_class=None) -%} {%- endmacro %} {% macro page_tabs(tabs, active=None, label='Section views') -%} {%- endmacro %} {#- empty_state: wrap in {% call %} for custom actions (script buttons, several links). -#} {% macro empty_state(title, text=None, action_href=None, action_label=None) -%}
{{ title }} {% if text %}

{{ text }}

{% endif %} {% if action_href or caller is defined %}
{% if action_href %}{{ action_label }}{% endif %} {% if caller is defined %}{{ caller() }}{% endif %}
{% endif %}
{%- endmacro %} {% macro id_chip(value, length=12) -%} {%- endmacro %} {#- Views of the Observability area. `urls` carries selection-preserving links. -#} {% macro observability_tabs(active, urls=None) -%} {% set urls = urls or {} %} {{ page_tabs([ (urls.get('traces') or '/traces', 'Traces', 'traces', 'trace-traces-link'), (urls.get('health') or '/traces/health', 'Health', 'health', 'trace-health-link'), (urls.get('compare') or '/traces/compare', 'Compare traces', 'compare', 'trace-compare-link'), (urls.get('usage') or '/traces/usage', 'Usage & cost', 'usage', 'trace-usage-link'), ], active, 'Observability views') }} {%- endmacro %} {#- Views of the Evalground area. -#} {% macro evalground_tabs(active) -%} {{ page_tabs([ ('/evalground', 'Evaluations', 'evaluations', 'evalground-evaluations-tab'), ('/evalground/compare', 'Compare models & rerankers', 'compare', 'evalground-compare-tab'), ], active, 'Evalground views') }} {%- endmacro %}