fix(ui): show category count badge in guardrail selection modal

Category-based guardrails (like EU AI Act) now display an orange
tag showing how many categories they contain, matching the existing
pattern count tag for pattern-based guardrails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ishaan Jaffer 2026-02-17 16:57:31 -08:00
parent ae24bfe8cb
commit f329294005

View file

@ -201,6 +201,11 @@ const GuardrailSelectionModal: React.FC<GuardrailSelectionModalProps> = ({
{guardrail.definition.litellm_params.patterns.length} pattern(s)
</Tag>
)}
{guardrail.definition?.litellm_params?.categories && (
<Tag className="text-xs" color="orange">
{guardrail.definition.litellm_params.categories.length} category/categories
</Tag>
)}
</div>
</div>
</div>