diff --git a/web/app/components/base/chat/chat-with-history/hooks.tsx b/web/app/components/base/chat/chat-with-history/hooks.tsx index 5ba62d7a0d..0be12b3208 100644 --- a/web/app/components/base/chat/chat-with-history/hooks.tsx +++ b/web/app/components/base/chat/chat-with-history/hooks.tsx @@ -438,7 +438,7 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => { if (conversationId === currentConversationId) handleNewConversation() handleUpdateConversationList() - }, [isInstalledApp, appId, t, handleUpdateConversationList, handleNewConversation, currentConversationId, conversationDeleting]) + }, [conversationDeleting, currentConversationId, handleNewConversation, handleUpdateConversationList, appSourceType, appId, t]) const [conversationRenaming, setConversationRenaming] = useState(false) const handleRenameConversation = useCallback(async (conversationId: string, newName: string, { onSuccess }: Callback) => { if (conversationRenaming) @@ -464,7 +464,7 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => { finally { setConversationRenaming(false) } - }, [isInstalledApp, appId, t, conversationRenaming, originConversationList]) + }, [conversationRenaming, t, appSourceType, appId, originConversationList]) const handleNewConversationCompleted = useCallback((newConversationId: string) => { setNewConversationId(newConversationId) handleConversationIdInfoChange(newConversationId) diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsx index 8b7d4a7167..367801c62c 100644 --- a/web/app/components/base/chat/chat/answer/index.tsx +++ b/web/app/components/base/chat/chat/answer/index.tsx @@ -303,6 +303,7 @@ const Answer: FC = ({ { typeof item.siblingCount === 'number' && item.siblingCount > 1 + && !responding && ( = ({ } { typeof item.siblingCount === 'number' - && item.siblingCount > 1 && ( + && item.siblingCount > 1 + && !responding + && ( { + handleResponding(true) + hasStopRespondedRef.current = false // If there are no streaming messages, we still need to set the conversation_id to avoid create a new conversation when regeneration in chat-flow. if (conversation_id) { conversationIdRef.current = conversation_id