diff --git a/web/chat/tooltip-utils.js b/web/chat/tooltip-utils.js --- a/web/chat/tooltip-utils.js +++ b/web/chat/tooltip-utils.js @@ -380,11 +380,34 @@ }; }, [addReply, messageInfo, threadInfo]); } + +function useComposedMessageTooltipActions( + item: ChatMessageInfoItem, + threadInfo: ThreadInfo, +): $ReadOnlyArray { + const sidebarAction = useMessageTooltipSidebarAction(item, threadInfo); + const replyAction = useMessageTooltipReplyAction(item, threadInfo); + return React.useMemo(() => [replyAction, sidebarAction].filter(Boolean), [ + replyAction, + sidebarAction, + ]); +} + +function useRobotextMessageTooltipActions( + item: ChatMessageInfoItem, + threadInfo: ThreadInfo, +): $ReadOnlyArray { + const replyAction = useMessageTooltipReplyAction(item, threadInfo); + return React.useMemo(() => [replyAction].filter(Boolean), [replyAction]); +} + export { findTooltipPosition, calculateTooltipSize, getMessageActionTooltipStyle, useMessageTooltipSidebarAction, useMessageTooltipReplyAction, + useComposedMessageTooltipActions, + useRobotextMessageTooltipActions, sizeOfTooltipArrow, };