mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-10 12:17:11 +00:00
Register email auto translate task
This commit is contained in:
@@ -569,6 +569,21 @@ async def action_draft_email_replies(owner: str, **kwargs) -> Tuple[str, bool]:
|
||||
return str(e), False
|
||||
|
||||
|
||||
async def action_email_auto_translate(owner: str, **kwargs) -> Tuple[str, bool]:
|
||||
"""Placeholder for the opt-in email translation enrichment task.
|
||||
|
||||
The task is seeded paused so it is visible in Tasks while the detector,
|
||||
cache, and on-demand translation path are built. Returning False makes a
|
||||
manual run show a clear message instead of pretending work happened.
|
||||
"""
|
||||
return (
|
||||
"Email auto-translate is registered but not implemented yet. "
|
||||
"Next step: detect foreign-language emails, cache translations by body hash, "
|
||||
"and stream translated text in the email reader without replacing the original.",
|
||||
False,
|
||||
)
|
||||
|
||||
|
||||
_TYPE_COLORS = {
|
||||
"work": "#5b8abf", # blue
|
||||
"personal": "#a07ae0", # purple
|
||||
@@ -2487,6 +2502,7 @@ BUILTIN_ACTIONS = {
|
||||
"tidy_research": action_tidy_research,
|
||||
"summarize_emails": action_summarize_emails,
|
||||
"draft_email_replies": action_draft_email_replies,
|
||||
"email_auto_translate": action_email_auto_translate,
|
||||
"extract_email_events": action_extract_email_events,
|
||||
"classify_events": action_classify_events,
|
||||
# ping_events removed from the user-facing registry. Calendar reminders
|
||||
@@ -2511,6 +2527,7 @@ BUILTIN_ACTION_INFO = {
|
||||
"tidy_research": "Remove orphaned research files (sessions that were deleted)",
|
||||
"summarize_emails": "Pre-generate AI summaries for new inbox emails",
|
||||
"draft_email_replies": "Pre-draft AI reply suggestions for new inbox emails",
|
||||
"email_auto_translate": "Detect foreign-language emails and cache translated text for the email reader",
|
||||
"extract_email_events": "Scan emails for booking/meeting confirmations and auto-add to calendar",
|
||||
"classify_events": "Tag upcoming events with importance (low/normal/high/critical) and type (work/health/travel/etc.); colors them too",
|
||||
"daily_brief": "Build a morning digest: today's calendar, unread email count + top senders, active todos",
|
||||
|
||||
@@ -239,6 +239,7 @@ HOUSEKEEPING_DEFAULTS = {
|
||||
"tidy_research": {"name": "Research Tidy", "trigger_type": "event", "trigger_event": "research_completed", "trigger_count": 5, "schedule": None, "scheduled_time": None, "cron_expression": None, "legacy_names": ["Tidy Research"]},
|
||||
"summarize_emails": {"name": "Email (Summary)", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 */2 * * *", "ship_paused": True, "legacy_names": ["Tidy Email (Summary)"]},
|
||||
"draft_email_replies": {"name": "Email AI Auto Reply", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 */2 * * *", "ship_paused": True, "legacy_names": ["Tidy Email (Replies)", "AI Auto Reply"]},
|
||||
"email_auto_translate": {"name": "Auto-translate Emails", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 */2 * * *", "ship_paused": True, "legacy_names": ["Auto Translate Email", "Email Auto Translate"]},
|
||||
"extract_email_events": {"name": "Email Calendar Events", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 */1 * * *", "ship_paused": True, "legacy_names": ["Email → Calendar Events"]},
|
||||
"classify_events": {"name": "Calendar Classify Events", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 6,18 * * *", "ship_paused": True, "legacy_names": ["Classify Calendar Events"]},
|
||||
"check_email_urgency": {"name": "Email Tags", "schedule": "cron", "scheduled_time": None, "cron_expression": "0 * * * *", "ship_paused": True, "old_cron_expressions": ["*/15 * * * *"], "legacy_names": ["Email Triage", "Urgent Email"]},
|
||||
@@ -1014,6 +1015,7 @@ class TaskScheduler:
|
||||
"learn_sender_signatures",
|
||||
"summarize_emails",
|
||||
"draft_email_replies",
|
||||
"email_auto_translate",
|
||||
"extract_email_events",
|
||||
"classify_events",
|
||||
"tidy_sessions",
|
||||
@@ -1027,6 +1029,7 @@ class TaskScheduler:
|
||||
_MODEL_BACKED_ACTIONS = frozenset({
|
||||
"summarize_emails",
|
||||
"draft_email_replies",
|
||||
"email_auto_translate",
|
||||
"extract_email_events",
|
||||
"classify_events",
|
||||
"learn_sender_signatures",
|
||||
|
||||
Reference in New Issue
Block a user