fix(webui): hide actions until turn end

This commit is contained in:
Zhou
2026-08-16 00:14:42 +08:00
committed by Xubin Ren
parent 5e84055dbb
commit 48126f049d
5 changed files with 213 additions and 8 deletions
+5 -1
View File
@@ -52,6 +52,8 @@ import type {
interface MessageBubbleProps {
message: UIMessage;
/** The containing agent turn has not received turn_end yet. */
isTurnStreaming?: boolean;
/** Give temporary-chat user turns the dashed private-mode treatment. */
temporary?: boolean;
/** When false, hide this message's copy button. Default true. */
@@ -260,6 +262,7 @@ function UserDeliveryStatus({
/** Render user turns as compact bubbles and assistant turns as document-like prose. */
export function MessageBubble({
message,
isTurnStreaming = false,
temporary = false,
showCopyAction = true,
cliApps = [],
@@ -381,7 +384,8 @@ export function MessageBubble({
: "";
const automationTriggeredLabel = t("message.automationTriggered");
const showAssistantActions = message.role === "assistant" && !message.isStreaming && !empty;
const showAssistantActions =
message.role === "assistant" && !message.isStreaming && !isTurnStreaming && !empty;
const showCopyButton = showCopyAction && showAssistantActions;
const showForkButton = showAssistantActions && !!onForkFromHere;
const forkLabel = t("message.forkFromHere");