ui: fixes for kai msg editing

This commit is contained in:
nick-delirium 2025-05-20 11:09:56 +02:00
parent 5de6d5de98
commit 3597523a04
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 4 additions and 4 deletions

View file

@ -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 ? (

View file

@ -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<HTMLDivElement>(null);
@ -103,7 +103,7 @@ export function ChatMsg({
<Markdown remarkPlugins={[remarkGfm]}>{text}</Markdown>
</div>
{isUser ? (
isLast ? (
canEdit ? (
<div
onClick={onRetry}
className={