diff --git a/packages/ui/src/ui-component/dialog/ChatFeedbackContentDialog.jsx b/packages/ui/src/ui-component/dialog/ChatFeedbackContentDialog.jsx index 3bb5524d..6b34aeca 100644 --- a/packages/ui/src/ui-component/dialog/ChatFeedbackContentDialog.jsx +++ b/packages/ui/src/ui-component/dialog/ChatFeedbackContentDialog.jsx @@ -27,7 +27,10 @@ const ChatFeedbackContentDialog = ({ show, onCancel, onConfirm }) => { useEffect(() => { if (show) dispatch({ type: SHOW_CANVAS_DIALOG }) else dispatch({ type: HIDE_CANVAS_DIALOG }) - return () => dispatch({ type: HIDE_CANVAS_DIALOG }) + return () => { + dispatch({ type: HIDE_CANVAS_DIALOG }) + setFeedbackContent('') + } }, [show, dispatch]) const component = show ? ( diff --git a/packages/ui/src/views/chatmessage/ChatMessage.jsx b/packages/ui/src/views/chatmessage/ChatMessage.jsx index 9e748fc0..e083552a 100644 --- a/packages/ui/src/views/chatmessage/ChatMessage.jsx +++ b/packages/ui/src/views/chatmessage/ChatMessage.jsx @@ -871,11 +871,6 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews /> ) : null} - setShowFeedbackContentDialog(false)} - onConfirm={submitFeedbackContent} - /> ) : null} {message.fileAnnotations && ( @@ -1124,6 +1119,11 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews )} setSourceDialogOpen(false)} /> + setShowFeedbackContentDialog(false)} + onConfirm={submitFeedbackContent} + /> ) }