{% extends "server/base.html" %} {% import "activity/macros.html" as m with context %} {% block title %}{{ t.text("activity.feed.title") }}{% endblock %} {% block top %}{% endblock %} {% block head %}{% endblock %} {% block body %} {# the market's feed: what the agents and computers the account sees did lately, newest first, as many as the card holds; who did it in bold and how long ago #}

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

{% for item in items %} {% set event = item.event %} {% if event is none %}
{{ m.icon("wifi-off") }}{{ item.computer }} {{ t.text("activity.feed.left") }}{{ item.at_ms | since }}
{% elif item.agent is not none %} {% set agent = item.agent %} {% set named = names.get(event.thread_id) %} {% if event.name in ("harness.turn.requested", "runtime.request.turn.started") %}
{{ m.icon("zap") }}{{ agent.name }} {{ t.text("activity.feed.started", {"where": m.conversation(named) | striptags}) }}{{ item.at_ms | since }}
{% elif event.name.startswith("channel.outbound.") %} {% set asked = messages.get((agent.id, event.metadata.get("reply_to_message_id"))) %}
{{ m.icon("send") }}{{ agent.name }} {{ t.text("activity.feed.replied_to" if asked else "activity.feed.replied", {"where": m.conversation(named) | striptags, "who": (m.sender(asked) | striptags) if asked else ""}) }}{{ item.at_ms | since }}
{% elif event.name == "channel.inbound.persisted" %} {% if named is not none and named.kind == "group" %}
{{ m.icon("users") }}{{ m.conversation(named) }} {{ t.text("activity.feed.invites", {"agent": agent.name}) }}{{ item.at_ms | since }}
{% else %}
{{ m.icon("user-plus") }}{{ m.sender(event) }} {{ t.text("activity.feed.asks", {"agent": agent.name}) }}{{ item.at_ms | since }}
{% endif %} {% elif event.name == "reminder.fired" %}
{{ m.icon("alarm-clock") }}{{ agent.name }}{{ t.text("activity.feed.reminded", {"title": event.metadata.get("title") or ""}) }}{{ item.at_ms | since }}
{% elif turns.get((agent.id, event.turn_id)) %}
{{ m.icon("terminal") }}{{ agent.name }} {{ m.calls(turns[(agent.id, event.turn_id)].calls) }}{{ item.at_ms | since }}
{% endif %} {% endif %} {% else %}

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

{% endfor %}
{% endblock %}