Fix message queue persistence after auto-send

This commit is contained in:
ruizanthony@gmail.com 2026-05-19 14:07:09 +00:00
parent 6664fc7f38
commit 83a58cf6ad
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,8 @@ class MessageQueueSend(ApiHandler):
if send_all:
count = mq.send_all_aggregated(context)
if count:
mark_dirty_for_context(context.id, reason="message_queue_send_all")
return {"ok": True, "sent_count": count}
# Send single item

View file

@ -2,6 +2,7 @@ import asyncio
from helpers.extension import Extension
from helpers import message_queue as mq
from agent import AgentContext, Agent, LoopData
from helpers.state_monitor_integration import mark_dirty_for_context
class ProcessQueue(Extension):
@ -34,4 +35,5 @@ class ProcessQueue(Extension):
# Send next queued message if task is not running
if not context.is_running():
mq.send_next(context)
if mq.send_next(context):
mark_dirty_for_context(context.id, reason="message_queue_auto_send")