Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f076969ce | |||
| 37d4ebfc1c |
@@ -279,9 +279,10 @@
|
||||
"description": "在指定时间提醒到期的待办事项。",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "todo",
|
||||
"command": "remind",
|
||||
"args": [
|
||||
"remind"
|
||||
"--seconds",
|
||||
"{{seconds}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,9 +264,12 @@ async def _run_remind_async(*, seconds: int) -> dict[str, Any]:
|
||||
"""
|
||||
真实平台会推送到任务中心 UI 并支持取消;
|
||||
"""
|
||||
log = _get_task_logger()
|
||||
todos = todo_service.get_current_remind_todos()
|
||||
log.info("[task]remind todos count: %s", len(todos))
|
||||
for todo in todos:
|
||||
todo_service.mark_done(todo.id)
|
||||
log.info("[task]remind todos : %s", todo.title)
|
||||
emit(f"提醒待办 {todo.title}", skill=SKILL_SLUG, stage="remind")
|
||||
summary = todo_service.stats()
|
||||
return {"remind": True, "duration_seconds": len(todos), "stats": summary}
|
||||
|
||||
Reference in New Issue
Block a user