mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 17:30:16 +01:00
🗨️ fix: Prevent Resetting Title to 'New Chat' on Follow-Up Message (#1870)
* fix: prevent reseting title to 'New Chat' on follow up message * chore(useSSE): remove empty line
This commit is contained in:
parent
ece5d9f588
commit
6a25dd38a4
2 changed files with 33 additions and 4 deletions
|
|
@ -3,7 +3,6 @@ import {
|
|||
isToday,
|
||||
isWithinInterval,
|
||||
subDays,
|
||||
getMonth,
|
||||
getYear,
|
||||
startOfDay,
|
||||
startOfYear,
|
||||
|
|
@ -162,3 +161,20 @@ export const deleteConversation = (
|
|||
|
||||
return newData;
|
||||
};
|
||||
|
||||
export const getConversationById = (
|
||||
data: ConversationData | undefined,
|
||||
conversationId: string | null,
|
||||
): TConversation | undefined => {
|
||||
if (!data || !conversationId) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
for (const page of data.pages) {
|
||||
const conversation = page.conversations.find((c) => c.conversationId === conversationId);
|
||||
if (conversation) {
|
||||
return conversation;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue