fix(whatsapp): isolate group sessions and inject quoted context safely

Default WhatsApp groups to per-user sessions, skip redundant quoted-text injection when already in recent history, and disable group long-term memory writes unless explicitly enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-07-03 17:48:34 +08:00
parent d90fca7293
commit fc10560052
8 changed files with 450 additions and 11 deletions

View file

@ -191,6 +191,8 @@ def run_attempt(*, store: Any, data: AttemptRunnerInput) -> AttemptRunnerOutput:
user_text=str(data.persisted_user_text if data.persisted_user_text is not None else data.msg.text or ""),
assistant_text=outcome.final_text,
turn_uuid=outcome.turn_uuid,
channel=str(data.msg.channel or ""),
metadata=data.msg.metadata if isinstance(data.msg.metadata, dict) else {},
)
if data.trace_id:
try: