From ed9828befe0a1828a67c9498334b5170eec00204 Mon Sep 17 00:00:00 2001 From: Huarch Date: Mon, 8 Jun 2026 20:16:58 +0800 Subject: [PATCH] fix(chat): hide actions while streaming --- src/components/chat/AgentTurn.tsx | 4 +++- src/components/chat/AgentWorkspace.tsx | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/chat/AgentTurn.tsx b/src/components/chat/AgentTurn.tsx index 5a5c794..07da8fb 100644 --- a/src/components/chat/AgentTurn.tsx +++ b/src/components/chat/AgentTurn.tsx @@ -39,6 +39,7 @@ import StopRounded from "@mui/icons-material/StopRounded"; type AgentTurnProps = { message: Message; + isStreaming: boolean; messageSpeechState: SpeechState; onSpeak: (messageId: string, text: string) => void; onPause: () => void; @@ -54,6 +55,7 @@ type AgentTurnProps = { export const AgentTurn = React.memo( ({ message, + isStreaming, messageSpeechState, onSpeak, onPause, @@ -277,7 +279,7 @@ export const AgentTurn = React.memo( - {isHovered && ( + {isHovered && !isStreaming && ( void; @@ -55,6 +56,7 @@ const sameMessages = (left: Message[], right: Message[]) => const TurnListInner = ({ messages, + isStreaming, speakingMessageId, speechState, onSpeak, @@ -73,6 +75,7 @@ const TurnListInner = ({ sameMessages(prevProps.messages, nextProps.messages) && + prevProps.isStreaming === nextProps.isStreaming && prevProps.speakingMessageId === nextProps.speakingMessageId && prevProps.speechState === nextProps.speechState && prevProps.onSpeak === nextProps.onSpeak && @@ -274,6 +278,7 @@ export const AgentWorkspace = ({