Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: regeneration not clear like status and sub more items (#557)

Joel054ba88434df
diff --git a/web/app/components/app/text-generate/item/index.tsx b/web/app/components/app/text-generate/item/index.tsx
index faabf16d602..a9873dc8b94 100644
--- a/web/app/components/app/text-generate/item/index.tsx
+++ b/web/app/components/app/text-generate/item/index.tsx
@@ -128,6 +128,9 @@ const GenerationItem: FC<IGenerationItemProps> = ({
startQuerying()
const res: any = await fetchMoreLikeThis(messageId as string, isInstalledApp, installedAppId)
setCompletionRes(res.answer)
+ setChildFeedback({
+ rating: null,
+ })
setChildMessageId(res.id)
stopQuerying()
}
@@ -152,6 +155,12 @@ const GenerationItem: FC<IGenerationItemProps> = ({
}
}, [controlClearMoreLikeThis])
+ // regeneration clear child
+ useEffect(() => {
+ if (isLoading)
+ setChildMessageId(null)
+ }, [isLoading])
+
return (
<div className={cn(className, isTop ? 'rounded-xl border border-gray-200 bg-white' : 'rounded-br-xl !mt-0')}
style={isTop