feat: Log all agent actions (@SEND_EMAIL, @SEND_TELEGRAM, @ADD/UPDATE_TEAM_MEMBER) as tasks

Every parsed agent command now creates a task entry with type action_email /
action_telegram / action_team, parent_task_id pointing to the originating task,
and status completed/error reflecting the actual outcome.

Tasks UI gets matching badges for all new types plus a parent-task indicator
(↳ #N) so the full chain from trigger to action is visible at a glance.
This commit is contained in:
eric 2026-02-21 19:06:33 +00:00
parent f13860f38d
commit d3800ac792
2 changed files with 69 additions and 10 deletions

View file

@ -35,13 +35,24 @@
<td>
<strong>{{ task.title }}</strong>
{% if task.type == 'email' %}
<span class="badge bg-info ms-1" title="Von: {{ task.reply_to }}">Email</span>
{% endif %}
{% if task.type == 'orchestrated' %}
<span class="badge bg-info ms-1">📧 Email</span>
{% elif task.type == 'telegram' %}
<span class="badge ms-1" style="background-color:#229ed9;">✈ Telegram</span>
{% elif task.type == 'action_email' %}
<span class="badge bg-info ms-1">📤 Email gesendet</span>
{% elif task.type == 'action_telegram' %}
<span class="badge ms-1" style="background-color:#229ed9;">📤 Telegram gesendet</span>
{% elif task.type == 'action_team' %}
<span class="badge bg-secondary ms-1">👤 Team</span>
{% elif task.type == 'orchestrated' %}
<span class="badge ms-1" style="background-color:#9333ea;">Orchestriert</span>
{% endif %}
{% if task.type == 'agent_created' %}
{% elif task.type == 'agent_created' or task.type == 'agent_subtask' %}
<span class="badge bg-warning ms-1">Agent</span>
{% elif task.type == 'agent_question' %}
<span class="badge bg-warning ms-1">❓ Frage</span>
{% endif %}
{% if task.parent_task_id %}
<span class="badge bg-dark ms-1" title="Sub-Task von #{{ task.parent_task_id }}">↳ #{{ task.parent_task_id }}</span>
{% endif %}
{% if task.description %}
<div style="font-size:.75rem;color:var(--text-muted);">