mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🗨️ fix(useSSE): Prevent 'New Chat' Title after Regenerating Initial Message (#2238)
This commit is contained in:
parent
59a8165379
commit
0a8118deed
1 changed files with 2 additions and 1 deletions
|
|
@ -251,7 +251,8 @@ export default function useSSE(submission: TSubmission | null, index = 0) {
|
|||
let update = {} as TConversation;
|
||||
setConversation((prevState) => {
|
||||
let title = prevState?.title;
|
||||
if (parentMessageId !== Constants.NO_PARENT && title?.toLowerCase()?.includes('new chat')) {
|
||||
const parentId = isRegenerate ? message?.overrideParentMessageId : parentMessageId;
|
||||
if (parentId !== Constants.NO_PARENT && title?.toLowerCase()?.includes('new chat')) {
|
||||
const convos = queryClient.getQueryData<ConversationData>([QueryKeys.allConversations]);
|
||||
const cachedConvo = getConversationById(convos, conversationId);
|
||||
title = cachedConvo?.title;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue