MCPcopy Create free account
hub / github.com/MagicCube/agentara / MessageAction

Function MessageAction

web/src/components/ai-elements/message.tsx:83–112  ·  view source on GitHub ↗
({
  tooltip,
  children,
  label,
  variant = "ghost",
  size = "icon-sm",
  ...props
}: MessageActionProps)

Source from the content-addressed store, hash-verified

81};
82
83export const MessageAction = ({
84 tooltip,
85 children,
86 label,
87 variant = "ghost",
88 size = "icon-sm",
89 ...props
90}: MessageActionProps) => {
91 const button = (
92 <Button size={size} type="button" variant={variant} {...props}>
93 {children}
94 <span className="sr-only">{label || tooltip}</span>
95 </Button>
96 );
97
98 if (tooltip) {
99 return (
100 <TooltipProvider>
101 <Tooltip>
102 <TooltipTrigger asChild>{button}</TooltipTrigger>
103 <TooltipContent>
104 <p>{tooltip}</p>
105 </TooltipContent>
106 </Tooltip>
107 </TooltipProvider>
108 );
109 }
110
111 return button;
112};
113
114interface MessageBranchContextType {
115 currentBranch: number;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected