feat: Persist outbound emails, fix @UPDATE_TEAM_MEMBER parser, add per-entry delete
- Add sent_emails table to DB for persistent outbox logging - send_email() now writes every outgoing mail (incl. errors) to sent_emails - parse_agent_commands() passes agent_key/task_id as triggered_by metadata - Fix @UPDATE_TEAM_MEMBER parser: now matches Identifier/TelegramID/Role/etc. format from system prompt (was expecting Email/Field/Value — never matched) - update_team_member() called correctly via **kwargs (was positional args bug) - Set Piotr telegram_id=1578034974 directly in DB - email_log.html: two-tab UI (Inbox Journal + Outbox), click-to-expand body - emails.html: per-message delete button in inbox list - New routes: DELETE inbox (IMAP expunge), journal entry, sent entry
This commit is contained in:
parent
99df910497
commit
f6ad727bf0
3 changed files with 340 additions and 165 deletions
|
|
@ -60,14 +60,19 @@
|
|||
{% else %}
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for mail in emails %}
|
||||
<li class="list-group-item list-group-item-action"
|
||||
style="cursor:pointer;" onclick="viewEmail('{{ mail.id }}', '{{ mail.subject|e }}', '{{ mail.from|e }}')">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<strong style="font-size:.875rem;">{{ mail.subject }}</strong>
|
||||
<small style="color:var(--text-muted);white-space:nowrap;margin-left:.5rem;">{{ mail.date[:10] }}</small>
|
||||
<li class="list-group-item list-group-item-action d-flex align-items-start gap-2" style="cursor:pointer;">
|
||||
<div class="flex-grow-1" onclick="viewEmail('{{ mail.id }}', '{{ mail.subject|e }}', '{{ mail.from|e }}')">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<strong style="font-size:.875rem;">{{ mail.subject }}</strong>
|
||||
<small style="color:var(--text-muted);white-space:nowrap;margin-left:.5rem;">{{ mail.date[:10] }}</small>
|
||||
</div>
|
||||
<div style="font-size:.8rem;color:var(--text-muted);">{{ mail.from }}</div>
|
||||
<div style="font-size:.78rem;color:var(--text-muted);margin-top:.2rem;">{{ mail.preview }}</div>
|
||||
</div>
|
||||
<div style="font-size:.8rem;color:var(--text-muted);">{{ mail.from }}</div>
|
||||
<div style="font-size:.78rem;color:var(--text-muted);margin-top:.2rem;">{{ mail.preview }}</div>
|
||||
<form method="POST" action="/emails/inbox/{{ mail.id }}/delete"
|
||||
onsubmit="return confirm('Email aus Posteingang löschen?')" style="flex-shrink:0;">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Löschen">✕</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue