mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
fix: background sub-agent and timer replies only show in the open chat after a page reload (#31576)
When a sub-agent running in the background finished, or a timer the model set went off, the result and the model's follow-up reply were saved but did not show in the chat the user had open. They only appeared after a manual page reload. They now show in the open chat as soon as they arrive. Fixes #31566
This commit is contained in:
parent
9b45bedeaf
commit
fa66b0f306
2 changed files with 2 additions and 0 deletions
|
|
@ -219,6 +219,7 @@ async def process_pending_internal_messages(
|
|||
history['messages'] = messages
|
||||
history['currentId'] = assistant_message_id
|
||||
chat.chat = {**(chat.chat or {}), 'history': history}
|
||||
chat.current_message_id = assistant_message_id
|
||||
chat.updated_at = int(time.time())
|
||||
await db.commit()
|
||||
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ async def execute_due_timer(app, timer_id: str, claim_id: str | None = None) ->
|
|||
|
||||
parent.chat = parent_chat
|
||||
history['currentId'] = assistant_message_id
|
||||
parent.current_message_id = assistant_message_id
|
||||
parent.updated_at = int(time.time())
|
||||
timer_row = await db.get(Chat, timer_id)
|
||||
if timer_row:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue