mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
🌿 fix: forking a long conversation breaks chat structure (#4778)
* fix: branching and forking sometimes break conversation structure * fix test for forking. * chore: message type issues * test: add conversation structure tests for message handling --------- Co-authored-by: xyqyear <xyqyear@gmail.com>
This commit is contained in:
parent
7d5be68747
commit
c87a51eaab
8 changed files with 248 additions and 16 deletions
|
|
@ -67,11 +67,11 @@ export default function useExportConversation({
|
|||
};
|
||||
|
||||
if (!message.content) {
|
||||
return formatText(message.sender, message.text);
|
||||
return formatText(message.sender || '', message.text);
|
||||
}
|
||||
|
||||
return message.content
|
||||
.map((content) => getMessageContent(message.sender, content))
|
||||
.map((content) => getMessageContent(message.sender || '', content))
|
||||
.map((text) => {
|
||||
return formatText(text[0], text[1]);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue