{% extends "server/base.html" %} {% import "activity/macros.html" as m with context %} {% set short = ref(agent.id) %} {% block title %}{{ t.text("activity.today.title") }}{% endblock %} {% block top %}{% endblock %} {% block head %}{% endblock %} {% block body %} {# today's turns, newest first: when, from where, what set each off, how it went - done, failed, cancelled or still running - how long and how many tokens; as many as the card holds on a wide screen, the newest three on a phone #}

{{ t.text("activity.today.title") }}

{{ t.text("activity.today.turns", {"n": total}) }}{% if failed %} · {{ t.text("activity.today.failed", {"n": failed}) }}{% endif %} {{ t.text("activity.log.title") }}{{ m.icon("chevron-right") }}
{% for turn in turns %} {% set message = messages.get((agent.id, turn.message_id)) %} {% set reminded = message and message.name == "reminder.fired" %}
{{ turn.started_ms | stamp }} {% if reminded %}{{ m.icon("alarm-clock") }}{{ t.text("activity.reminder") }}{% else %}{% if turn.channel %}{{ m.logo(turn.channel) }}{% endif %}{{ m.conversation(names.get(turn.thread_id)) }}{% endif %} {% if reminded %}{{ message.metadata.get("title") or "" }}{% elif message %}{{ message.metadata.get("text") or "" }}{% endif %} {% if turn.outcome == "completed" %}{{ m.icon("circle-check") }}{{ t.text("activity.done") }} {% elif turn.outcome == "cancelled" %}{{ t.text("activity.cancelled") }} {% elif turn.outcome %}{{ m.icon("triangle-alert") }}{{ t.text("activity.failed") }} {% else %}{{ t.text("activity.running") }}{% endif %} {{ ((turn.ended_ms or now_ms) - turn.started_ms) | duration("compact") }} · {{ (turn.input + turn.cached + turn.output) | tokens }}
{% else %}

{{ t.text("activity.today.none") }}

{% endfor %}
{% endblock %}