fix: a new side chat is named "New Chat" instead of its first message (#34368)

Since a recent dev change, sending the first message of a new side chat saved it as "New Chat". With automatic title generation off it kept that name on the side chat's tab and in the chat list; with it on, the name only changed once the generated title arrived. A new side chat is named after its first message again, and one whose first message is only a file, with no text, keeps "New Chat" as before.

Fixes #34366
This commit is contained in:
Classic298
2026-11-13 23:01:09 +09:00
committed by GitHub
parent e22210796e
commit 2eb3be33db
+3 -1
View File
@@ -97,7 +97,9 @@
prompt: draft,
files
};
$: title = draft.trim().slice(0, 100) || $i18n.t('New Chat');
let title = $i18n.t('New Chat');
// Sending clears the input before the chat is created.
$: if (draft || files.length) title = draft.trim().slice(0, 100) || $i18n.t('New Chat');
const createChat = async (chat: {
models: string[];