ui: fixes for kai msg editing
This commit is contained in:
parent
5de6d5de98
commit
3597523a04
2 changed files with 4 additions and 4 deletions
|
|
@ -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 ? (
|
||||
|
|
|
|||
|
|
@ -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={
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue