Files
krow_talent_app/src/components/agents/icons.js
2026-08-20 18:18:10 +05:30

31 lines
1.0 KiB
JavaScript

import {
Activity, BarChart3, Briefcase, GraduationCap, Layers, Shield, Sparkles, UserCheck, Users,
} from 'lucide-react';
/**
* Agent icon id → component.
*
* A hand-written table, for the same reason `SECTION_COMPONENTS` is one: a
* definition names a key, and only a key written down here resolves to
* anything. There is no path from a Markdown file to a component nobody chose.
*
* `owliver` is deliberately absent — it is not a lucide glyph but the product's
* own avatar, and the switcher draws it directly. Returning `null` for it is
* the signal to do that, which keeps the primary agent looking like Owliver
* rather than like a generic icon.
*/
const ICONS = {
sparkles: Sparkles,
briefcase: Briefcase,
users: Users,
'user-check': UserCheck,
layers: Layers,
'graduation-cap': GraduationCap,
'bar-chart': BarChart3,
activity: Activity,
shield: Shield,
};
/** The component for an icon id, or null when the avatar should be drawn. */
export const agentIconFor = (id) => ICONS[String(id || '').trim()] ?? null;