From 822c47c171a0b7e0aba1c6c0e7ddc8506d9b19a9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 24 Sep 2024 01:35:34 +0200 Subject: [PATCH] fix --- .../components/chat/Messages/MultiResponseMessages.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Messages/MultiResponseMessages.svelte b/src/lib/components/chat/Messages/MultiResponseMessages.svelte index 1bd4b8875..a070abd5d 100644 --- a/src/lib/components/chat/Messages/MultiResponseMessages.svelte +++ b/src/lib/components/chat/Messages/MultiResponseMessages.svelte @@ -49,9 +49,10 @@ const showPreviousMessage = (modelIdx) => { groupedMessageIdsIdx[modelIdx] = Math.max(0, groupedMessageIdsIdx[modelIdx] - 1); - let messageId = groupedMessageIds[modelIdx].messages[groupedMessageIdsIdx[modelIdx]].id; + let messageId = groupedMessageIds[modelIdx].messageIds[groupedMessageIdsIdx[modelIdx]]; console.log(messageId); + let messageChildrenIds = history.messages[messageId].childrenIds; while (messageChildrenIds.length !== 0) { @@ -65,11 +66,11 @@ const showNextMessage = (modelIdx) => { groupedMessageIdsIdx[modelIdx] = Math.min( - groupedMessageIds[modelIdx].messages.length - 1, + groupedMessageIds[modelIdx].messageIds.length - 1, groupedMessageIdsIdx[modelIdx] + 1 ); - let messageId = groupedMessageIds[modelIdx].messages[groupedMessageIdsIdx[modelIdx]].id; + let messageId = groupedMessageIds[modelIdx].messageIds[groupedMessageIdsIdx[modelIdx]]; console.log(messageId); let messageChildrenIds = history.messages[messageId].childrenIds;