mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
fix: send the saved title in the chat:title event when title generation is off (#31355)
Fixes #31348 With title generation turned off (per user or by the admin), the chat is saved with the first user message as its title, but the live title event sent the assistant message instead. A new chat therefore kept showing "New Chat" in the header and tab until a reload, because the assistant message is still empty at that point. In a note's chat panel the whole model reply showed up as the title. The fallback branch now sends the title it just saved, the same way the generated-title branch above it already does. The sidebar was never affected because it reloads titles from the database.
This commit is contained in:
@@ -3979,7 +3979,7 @@ async def background_tasks_handler(ctx):
|
||||
await event_emitter(
|
||||
{
|
||||
'type': 'chat:title',
|
||||
'data': message.get('content', user_message),
|
||||
'data': title,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user