(props: {
toolkit: ToolkitResponse;
showOwnerLabels: boolean;
mcpUrl: string;
onBack: () => void;
onManageConnections: () => void;
onRemove: () => void;
})
| 942 | } |
| 943 | |
| 944 | function ToolkitHeader(props: { |
| 945 | toolkit: ToolkitResponse; |
| 946 | showOwnerLabels: boolean; |
| 947 | mcpUrl: string; |
| 948 | onBack: () => void; |
| 949 | onManageConnections: () => void; |
| 950 | onRemove: () => void; |
| 951 | }) { |
| 952 | return ( |
| 953 | <div className="shrink-0 border-b border-border/60 bg-background/95 px-5 py-3"> |
| 954 | <div className="flex min-w-0 flex-wrap items-start justify-between gap-x-6 gap-y-3"> |
| 955 | <div className="min-w-0 flex-1"> |
| 956 | <Button |
| 957 | type="button" |
| 958 | variant="ghost" |
| 959 | size="xs" |
| 960 | onClick={props.onBack} |
| 961 | className="-ml-1 h-6 px-1 text-xs text-muted-foreground hover:text-foreground" |
| 962 | > |
| 963 | <ArrowLeftIcon className="size-3.5" /> |
| 964 | Toolkits |
| 965 | </Button> |
| 966 | <div className="mt-1 flex min-w-0 items-center gap-2"> |
| 967 | <h2 className="truncate text-sm font-semibold text-foreground">{props.toolkit.name}</h2> |
| 968 | {props.showOwnerLabels ? ( |
| 969 | <Badge variant="outline" className="text-[10px]"> |
| 970 | {ownerLabel(props.toolkit.owner)} |
| 971 | </Badge> |
| 972 | ) : null} |
| 973 | </div> |
| 974 | <div className="mt-2 flex max-w-3xl min-w-0 items-center gap-2 rounded-md bg-muted/20 px-2 py-1 text-xs text-muted-foreground ring-1 ring-border/40"> |
| 975 | <span className="shrink-0 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/70"> |
| 976 | MCP |
| 977 | </span> |
| 978 | <code className="min-w-0 flex-1 truncate text-[11px] text-muted-foreground"> |
| 979 | {props.mcpUrl} |
| 980 | </code> |
| 981 | <CopyButton value={props.mcpUrl} className="-mr-1" /> |
| 982 | </div> |
| 983 | </div> |
| 984 | <div className="flex shrink-0 items-center gap-1 pt-0.5"> |
| 985 | <Button |
| 986 | type="button" |
| 987 | variant="ghost" |
| 988 | size="sm" |
| 989 | aria-label="Manage toolkit connections" |
| 990 | onClick={props.onManageConnections} |
| 991 | className="h-8 text-muted-foreground hover:text-foreground" |
| 992 | > |
| 993 | <PlugIcon className="size-3.5" /> |
| 994 | Connections |
| 995 | </Button> |
| 996 | <AlertDialog> |
| 997 | <AlertDialogTrigger asChild> |
| 998 | <Button |
| 999 | type="button" |
| 1000 | variant="ghost" |
| 1001 | size="icon-sm" |
nothing calls this directly
no test coverage detected