diff --git a/frontend/app/components/Kai/components/ChatLog.tsx b/frontend/app/components/Kai/components/ChatLog.tsx index 5609642b5..9a8bd4f90 100644 --- a/frontend/app/components/Kai/components/ChatLog.tsx +++ b/frontend/app/components/Kai/components/ChatLog.tsx @@ -67,10 +67,10 @@ function ChatLog({ isUser={msg.isUser} userName={userLetter} messageId={msg.messageId} - isLast={index === lastHumanMsgInd} duration={msg.duration} feedback={msg.feedback} siteId={projectId} + canEdit={processingStage === null && msg.isUser && index === lastHumanMsgInd} /> ))} {processingStage ? ( diff --git a/frontend/app/components/Kai/components/ChatMsg.tsx b/frontend/app/components/Kai/components/ChatMsg.tsx index 17ab1a110..8b3224f3f 100644 --- a/frontend/app/components/Kai/components/ChatMsg.tsx +++ b/frontend/app/components/Kai/components/ChatMsg.tsx @@ -21,19 +21,19 @@ export function ChatMsg({ isUser, userName, messageId, - isLast, duration, feedback, siteId, + canEdit, }: { text: string; isUser: boolean; messageId: string; userName?: string; - isLast?: boolean; duration?: number; feedback: boolean | null; siteId: string; + canEdit?: boolean; }) { const [isProcessing, setIsProcessing] = React.useState(false); const bodyRef = React.useRef(null); @@ -103,7 +103,7 @@ export function ChatMsg({ {text} {isUser ? ( - isLast ? ( + canEdit ? (