mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 19:10:45 +08:00
feat(scheduler): add scheduled jobs with channel-aware delivery
Introduce persisted cron/interval jobs, gateway scheduler loop, worker turns, and admin CRUD/edit UI. Route proactive reminders via the originating chat channel (WhatsApp vs WeChat), harden Weixin outbound with durable queue and PG-compatible polling, and fix chat UI to show each scheduled reminder separately. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5336f8835f
commit
47813f6a94
45 changed files with 4956 additions and 43 deletions
|
|
@ -690,6 +690,14 @@ def _build_model_context(
|
|||
)
|
||||
except Exception:
|
||||
pass
|
||||
if str(user_text or "").strip() and str(active_turn_uuid or "").strip():
|
||||
has_turn_user = any(
|
||||
str(getattr(m, "role", "") or "") == "user"
|
||||
and str(getattr(m, "turn_uuid", "") or "") == str(active_turn_uuid)
|
||||
for m in (rows or [])
|
||||
)
|
||||
if not has_turn_user:
|
||||
llm_messages.append({"role": "user", "content": str(user_text).strip()})
|
||||
return llm_messages
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue