fix: pass payload struct for regenerate/edit/download commands, edit button visibility
This commit is contained in:
@@ -718,15 +718,19 @@ function MessageBubble({
|
||||
) : isUser ? (
|
||||
<>
|
||||
<div className="whitespace-pre-wrap">{message.content}</div>
|
||||
{!streaming ? (
|
||||
<div
|
||||
className={`mt-1 flex justify-end transition-opacity ${
|
||||
streaming ? "opacity-0" : "opacity-0 group-hover:opacity-100"
|
||||
}`}
|
||||
>
|
||||
<button
|
||||
className="absolute -left-8 top-2 hidden rounded p-1 text-slate-500 hover:text-slate-200 group-hover:block"
|
||||
className="rounded px-1.5 py-0.5 text-[10px] text-white/60 hover:bg-white/10 hover:text-white"
|
||||
onClick={() => onEditStart(message)}
|
||||
title="编辑并重新提交"
|
||||
title="编辑并重新提交(清空之后的生成)"
|
||||
>
|
||||
✎
|
||||
编辑
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
</>
|
||||
) : message.content ? (
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>{message.content}</ReactMarkdown>
|
||||
|
||||
Reference in New Issue
Block a user