mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
refac
This commit is contained in:
parent
d52eaf19d6
commit
5c16631ec5
@ -123,6 +123,8 @@
|
|||||||
currentMessage =
|
currentMessage =
|
||||||
currentMessage.parentId !== null ? history.messages[currentMessage.parentId] : null;
|
currentMessage.parentId !== null ? history.messages[currentMessage.parentId] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is most likely causing the performance issue
|
||||||
messages = _messages;
|
messages = _messages;
|
||||||
} else {
|
} else {
|
||||||
messages = [];
|
messages = [];
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
Object.keys(history.messages).forEach((id) => {
|
Object.keys(history.messages).forEach((id) => {
|
||||||
const message = history.messages[id];
|
const message = history.messages[id];
|
||||||
const level = message.parentId ? positionMap.get(message.parentId).level + 1 : 0;
|
const level = message.parentId ? (positionMap.get(message.parentId)?.level ?? -1) + 1 : 0;
|
||||||
if (!layerWidths[level]) layerWidths[level] = 0;
|
if (!layerWidths[level]) layerWidths[level] = 0;
|
||||||
|
|
||||||
positionMap.set(id, {
|
positionMap.set(id, {
|
||||||
|
Loading…
Reference in New Issue
Block a user