{/* Header */}
{getToolIcon(current.toolName)}
{current.toolName}
{selectedTeamName !== current.teamName &&
(teamColor ? (
{displayName}
) : (
{displayName}
))}
{/* Tool input preview (syntax-highlighted) */}
{/* Diff preview (Write/Edit/NotebookEdit only) */}
{/* Error feedback */}
{error && (
)}
{/* Actions */}
handleRespond(true)}
className="rounded-md px-3.5 py-1.5 text-xs font-medium text-white transition-colors disabled:opacity-50"
style={{ backgroundColor: 'rgb(5, 150, 105)' }}
onMouseEnter={(e) => {
if (!disabled)
Object.assign(e.currentTarget.style, { backgroundColor: 'rgb(16, 185, 129)' });
}}
onMouseLeave={(e) => {
Object.assign(e.currentTarget.style, { backgroundColor: 'rgb(5, 150, 105)' });
}}
>
Allow
handleRespond(false)}
className="rounded-md border px-3.5 py-1.5 text-xs font-medium transition-colors disabled:opacity-50"
style={{
borderColor: 'rgba(239, 68, 68, 0.5)',
color: 'rgb(248, 113, 113)',
}}
onMouseEnter={(e) => {
if (!disabled)
Object.assign(e.currentTarget.style, {
backgroundColor: 'rgba(239, 68, 68, 0.1)',
});
}}
onMouseLeave={(e) => {
Object.assign(e.currentTarget.style, { backgroundColor: 'transparent' });
}}
>
Deny
{pendingApprovals.length > 1 && (
{pendingApprovals.length - 1} pending
)}
{/* Settings panel (full-width, outside flex row) */}
{/* Timeout progress bar */}
);
};
// ---------------------------------------------------------------------------
// Syntax-highlighted tool input preview
// ---------------------------------------------------------------------------
const ToolInputPreview = ({
toolName,
toolInput,
}: {
toolName: string;
toolInput: Record