From ebfa4e26a6ab5855c8facac9c061dcccc5501130 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Sat, 7 Dec 2024 00:23:53 +0530 Subject: [PATCH] fix: artifact loop fix --- app/components/chat/Artifact.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/components/chat/Artifact.tsx b/app/components/chat/Artifact.tsx index c53d15b..989b92b 100644 --- a/app/components/chat/Artifact.tsx +++ b/app/components/chat/Artifact.tsx @@ -51,7 +51,10 @@ export const Artifact = memo(({ messageId }: ArtifactProps) => { if (actions.length !== 0 && artifact.type === 'bundled') { const finished = !actions.find((action) => action.status !== 'complete'); - setAllActionFinished(finished); + + if (finished != allActionFinished) { + setAllActionFinished(finished); + } } }, [actions]);