diff --git a/src/components/Chat/ChatContent/Message/MessageContent.tsx b/src/components/Chat/ChatContent/Message/MessageContent.tsx index 2ec56fb9..98ca9fab 100644 --- a/src/components/Chat/ChatContent/Message/MessageContent.tsx +++ b/src/components/Chat/ChatContent/Message/MessageContent.tsx @@ -26,6 +26,7 @@ const MessageContent = ({ setIsEdit={setIsEdit} messageIndex={messageIndex} sticky={sticky} + role={role} /> ) : ( >; messageIndex: number; sticky?: boolean; + role: string; }) => { const inputRole = useStore((state) => state.inputRole); const setChats = useStore((state) => state.setChats); @@ -145,6 +147,8 @@ const EditView = ({ cursorPosition={cursorPosition} _setContent={_setContent} messageIndex={messageIndex} + role={role} + content={content} /> {isModalOpen && ( void; @@ -177,6 +183,8 @@ const EditViewButtons = memo( cursorPosition: number; _setContent: React.Dispatch>; messageIndex: number; + role: string; + content: string; }) => { const { t } = useTranslation(); const generating = useStore.getState().generating; @@ -214,7 +222,7 @@ const EditViewButtons = memo( )} - {sticky || ( + {!sticky && role === 'user' && content != '' && (