import * as React from 'react' import { Box, Text } from '@anthropic/ink' import { getAgentName, getTeammateColor, getTeamName, } from '../../utils/teammate.js' import { Spinner } from '../Spinner.js' import { WorkerBadge } from './WorkerBadge.js' type Props = { toolName: string description: string } /** * Visual indicator shown on workers while waiting for leader to approve a permission request. * Displays the pending tool with a spinner and information about what's being requested. */ export function WorkerPendingPermission({ toolName, description, }: Props): React.ReactNode { const teamName = getTeamName() const agentName = getAgentName() const agentColor = getTeammateColor() return ( {' '} Waiting for team lead approval {agentName && agentColor && ( )} Tool: {toolName} Action: {description} {teamName && ( Permission request sent to team {'"'} {teamName} {'"'} leader )} ) }