{# A call's estimate on its button (design section 15.4): tokens, and its cost at API prices when known. #} {% macro cost(estimate) -%} {%- if estimate -%} ~{{ estimate.tokens|tokens }} {{ _("tokens") }}{% if estimate.cost_usd is none %}{% elif estimate.cost_usd == 0 %} · {{ _("free") }}{% else %} · ~{{ estimate.cost_usd|dollars }}{% endif %} {%- endif -%} {%- endmacro %} {# A search result's kind, in the reader's language (design section 7.2). #} {% macro kind_name(kind) -%} {%- set names = {"area": _("Area"), "concept": _("Concept"), "path": _("Path"), "digest": _("Digest"), "answer": _("Saved answer"), "decision": _("Decision"), "fact": _("Fact")} -%} {{ names.get(kind, kind) }} {%- endmacro %} {# How each provider is signed in, and the latest plan usage, under an estimate (design section 15.4). #} {% macro account_notes(sign_ins, plan_usage) -%}
{{ _("From the digests of") }} {% for target, repository, digest_id in overview.digests %}{% if linked is none or target in linked %}{{ repository }}{% else %}{{ repository }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
{% if read_button %}{% endif %}{{ _("This catch-up has no overview: %(problem)s", problem=reason) }}
{%- endmacro %} {# A digest as a team card shows it (design section 24.7): its title linked to it, its highlights with their marks or its first paragraph, and how many guide pages changed; then a Mark read button, or, without one, an "unread" pill while it is unread (design section 25.3). #} {% macro team_digest(digest, target, read_button=True, unread=False) -%}