Unverified Commit 054ba884 authored by Joel's avatar Joel Committed by GitHub

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

parent da82a11b
...@@ -128,6 +128,9 @@ const GenerationItem: FC<IGenerationItemProps> = ({ ...@@ -128,6 +128,9 @@ const GenerationItem: FC<IGenerationItemProps> = ({
startQuerying() startQuerying()
const res: any = await fetchMoreLikeThis(messageId as string, isInstalledApp, installedAppId) const res: any = await fetchMoreLikeThis(messageId as string, isInstalledApp, installedAppId)
setCompletionRes(res.answer) setCompletionRes(res.answer)
setChildFeedback({
rating: null,
})
setChildMessageId(res.id) setChildMessageId(res.id)
stopQuerying() stopQuerying()
} }
...@@ -152,6 +155,12 @@ const GenerationItem: FC<IGenerationItemProps> = ({ ...@@ -152,6 +155,12 @@ const GenerationItem: FC<IGenerationItemProps> = ({
} }
}, [controlClearMoreLikeThis]) }, [controlClearMoreLikeThis])
// regeneration clear child
useEffect(() => {
if (isLoading)
setChildMessageId(null)
}, [isLoading])
return ( return (
<div className={cn(className, isTop ? 'rounded-xl border border-gray-200 bg-white' : 'rounded-br-xl !mt-0')} <div className={cn(className, isTop ? 'rounded-xl border border-gray-200 bg-white' : 'rounded-br-xl !mt-0')}
style={isTop style={isTop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment