From b2c4be81bd73c0de2612650b1ab426d7feaaccb8 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Mon, 18 May 2026 13:04:27 +0800 Subject: [PATCH] auto-sync: 2026-05-18 13:04:27 --- src/blackboard/operations.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/blackboard/operations.py b/src/blackboard/operations.py index 9de7bf5..0e2611a 100644 --- a/src/blackboard/operations.py +++ b/src/blackboard/operations.py @@ -198,6 +198,20 @@ class Blackboard: finally: conn.close() + def update_must_haves(self, task_id: str, must_haves: str) -> bool: + """更新 Task 的 must_haves 字段(用于 Mail 元数据等)""" + conn = self._conn() + try: + conn.execute("BEGIN IMMEDIATE") + conn.execute( + "UPDATE tasks SET must_haves=?, updated_at=datetime('now') WHERE id=?", + (must_haves, task_id), + ) + conn.commit() + return True + finally: + conn.close() + # =================================================================== # Comment # ===================================================================