Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
feat(frontend): restyle the prompt variables palette
Sergey Kozyrenko161ff1031563
diff --git a/frontend/src/components/ui/badge.tsx b/frontend/src/components/ui/badge.tsxindex 757f9882..66097a8a 100644--- a/frontend/src/components/ui/badge.tsx+++ b/frontend/src/components/ui/badge.tsx@@ -11,17 +11,17 @@ const badgeVariants = cva(},variants: {variant: {- blue: 'border-blue-500/20 bg-blue-500/10 text-blue-600',+ blue: 'border-blue-500/20 bg-blue-500/10 text-blue-600 hover:bg-blue-500/20',default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',- green: 'border-green-500/20 bg-green-500/10 text-green-600',- orange: 'border-orange-500/20 bg-orange-500/10 text-orange-600',+ green: 'border-green-500/20 bg-green-500/10 text-green-600 hover:bg-green-500/20',+ orange: 'border-orange-500/20 bg-orange-500/10 text-orange-600 hover:bg-orange-500/20',outline: 'text-foreground',- pink: 'border-pink-500/20 bg-pink-500/10 text-pink-600',- purple: 'border-purple-500/20 bg-purple-500/10 text-purple-600',- red: 'border-red-500/20 bg-red-500/10 text-red-600',+ pink: 'border-pink-500/20 bg-pink-500/10 text-pink-600 hover:bg-pink-500/20',+ purple: 'border-purple-500/20 bg-purple-500/10 text-purple-600 hover:bg-purple-500/20',+ red: 'border-red-500/20 bg-red-500/10 text-red-600 hover:bg-red-500/20',secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',- yellow: 'border-yellow-500/20 bg-yellow-500/10 text-yellow-600',+ yellow: 'border-yellow-500/20 bg-yellow-500/10 text-yellow-600 hover:bg-yellow-500/20',},},},diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsxindex 0ea71cdd..f3addf82 100644--- a/frontend/src/pages/settings/settings-prompt.tsx+++ b/frontend/src/pages/settings/settings-prompt.tsx@@ -48,6 +48,7 @@ import {} from '@/components/layouts/app/app-header';import ConfirmationDialog from '@/components/shared/confirmation-dialog';import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';+import { Badge } from '@/components/ui/badge';import { Button } from '@/components/ui/button';import { Card, CardContent } from '@/components/ui/card';import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';@@ -1064,24 +1065,24 @@ function Variables({ currentTemplate, onVariableClick, variables }: VariablesProconst usedVariables = getUsedVariables(currentTemplate);return (- <div className="bg-muted/50 rounded-md border p-3">- <h4 className="text-muted-foreground mb-2 text-sm font-medium">Available Variables:</h4>- <div className="flex flex-wrap gap-1">+ <div className="bg-card overflow-hidden rounded-lg border">+ <div className="border-b px-4 py-3">+ <h4 className="text-sm font-medium">Available variables</h4>+ <p className="text-muted-foreground mt-1 text-xs">Click a variable to insert it into the template.</p>+ </div>+ <div className="bg-background flex flex-wrap gap-1.5 px-4 py-3">{variables.map((variable) => {const isUsed = usedVariables.has(variable);return (- <code- className={`cursor-pointer rounded border px-2 py-1 font-mono text-xs transition-colors ${- isUsed- ? 'border-green-300 bg-green-100 text-green-800 hover:bg-green-200'- : 'bg-background text-foreground hover:bg-accent'- }`}+ <Badge+ className="cursor-pointer font-mono font-normal"key={variable}onClick={() => onVariableClick(variable)}+ variant={isUsed ? 'green' : 'secondary'}>{`{{.${variable}}}`}- </code>+ </Badge>);})}</div>