MCPcopy Create free account
hub / github.com/AntiHub-Project/AntiHub / ToolHeader

Function ToolHeader

components/ai-elements/tool.tsx:70–93  ·  view source on GitHub ↗
({
  className,
  title,
  type,
  state,
  ...props
}: ToolHeaderProps)

Source from the content-addressed store, hash-verified

68};
69
70export const ToolHeader = ({
71 className,
72 title,
73 type,
74 state,
75 ...props
76}: ToolHeaderProps) => (
77 <CollapsibleTrigger
78 className={cn(
79 "flex w-full items-center justify-between gap-4 p-3",
80 className
81 )}
82 {...props}
83 >
84 <div className="flex items-center gap-2">
85 <WrenchIcon className="size-4 text-muted-foreground" />
86 <span className="font-medium text-sm">
87 {title ?? type.split("-").slice(1).join("-")}
88 </span>
89 {getStatusBadge(state)}
90 </div>
91 <ChevronDownIcon className="size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180" />
92 </CollapsibleTrigger>
93);
94
95export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
96

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
getStatusBadgeFunction · 0.85

Tested by

no test coverage detected