From 2ea79cf4660f159210704f7701eff11d4a1e58c1 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Fri, 2 Aug 2024 04:19:29 -0700 Subject: [PATCH] Cleanup --- src/common/stores/chat/store-chats.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/stores/chat/store-chats.ts b/src/common/stores/chat/store-chats.ts index cdac15fed..abcac264a 100644 --- a/src/common/stores/chat/store-chats.ts +++ b/src/common/stores/chat/store-chats.ts @@ -398,17 +398,17 @@ export const useChatStore = create()(/*devtools(*/ if (!validLiveFileIDs.includes(fragment.liveFileId)) delete fragment.liveFileId; - // replace the Content Placeholder fragments [part.pt='ph'] with Error fragments, - // to show the aborted ops (instead of just empty blocks) - return (isContentFragment(fragment) && fragment.part.pt === 'ph') - ? createErrorContentFragment(`${fragment.part.pText} (did not complete)`) - : fragment; + // show the aborted ops: convert a Placeholder fragment [part.pt='ph'] to an Error fragment + if (isContentFragment(fragment) && fragment.part.pt === 'ph') + createErrorContentFragment(`${fragment.part.pText} (did not complete)`); + + return fragment; }); // cleanup within-v4 - TODO: remove at 2.0.0 - for (const fragment of message.fragments) { - // use while in V4 - } + // for (const fragment of message.fragments) { + // ... + // } } } },