diff --git a/libs/mobile/chat/features/ai-message-actions/src/lib/component.tsx b/libs/mobile/chat/features/ai-message-actions/src/lib/component.tsx index a7a00ff..9bff564 100644 --- a/libs/mobile/chat/features/ai-message-actions/src/lib/component.tsx +++ b/libs/mobile/chat/features/ai-message-actions/src/lib/component.tsx @@ -19,6 +19,7 @@ interface AiMessageActionsProps { onAddDetails: (messageId: string) => void; onMoreConcise: (messageId: string) => void; isLast: boolean; + isResponseGenerating: boolean; } //TODO Extend with more actions - https://www.figma.com/design/YPCZjyVlD86psDwUxvMVBc/OpenWebUI-Redesign-React-Native?node-id=27540-25291&t=kg2yUIDp3UQDStLf-0 @@ -31,6 +32,7 @@ export function AiMessageActions({ onAddDetails, onMoreConcise, isLast, + isResponseGenerating, children, }: PropsWithChildren): ReactElement { const translate = useTranslation('CHAT.AI_MESSAGE_ACTIONS'); @@ -134,7 +136,10 @@ export function AiMessageActions({ return ( - + {children} ; actions: Array; + isResponseGenerating?: boolean; + sheetRef?: React.RefObject; } export function MessageActionsSheetWrapper({ sheetRef, actions, + isResponseGenerating, children, }: PropsWithChildren): ReactElement { const actionsSheetRef = useRef(null); const { animatedStyle, startAnimation, stopAnimation } = useAnimateMessage(); const handleLongPress = (): void => { + if (isResponseGenerating) return; + startAnimation(); actionsSheetRef.current?.present(); };