import type { AgentType } from "@/lib/types" import { AGENT_COLORS } from "@/lib/types" import { cn } from "@/lib/utils" import ClaudeColor from "@lobehub/icons/es/Claude/components/Color" import ClineMono from "@lobehub/icons/es/Cline/components/Mono" import GeminiColor from "@lobehub/icons/es/Gemini/components/Color" import GithubCopilotMono from "@lobehub/icons/es/GithubCopilot/components/Mono" import GooseMono from "@lobehub/icons/es/Goose/components/Mono" import QwenColor from "@lobehub/icons/es/Qwen/components/Color" import KimiColor from "@lobehub/icons/es/Kimi/components/Color" import MistralColor from "@lobehub/icons/es/Mistral/components/Color" import OpenClawColor from "@lobehub/icons/es/OpenClaw/components/Color" import { OpenAI, OpenCode } from "@lobehub/icons" interface AgentIconProps { agentType: AgentType className?: string } // eslint-disable-next-line @typescript-eslint/no-explicit-any type AnyIcon = React.ComponentType const COLOR_ICONS: Partial> = { claude_code: ClaudeColor, gemini: GeminiColor, qwen_code: QwenColor, kimi: KimiColor, mistral_vibe: MistralColor, open_claw: OpenClawColor, } const MONO_ICONS: Partial> = { codex: OpenAI, open_code: OpenCode, github_copilot: GithubCopilotMono, cline: ClineMono, goose: GooseMono, } // Text-color versions for Mono icons and SVG fallbacks const AGENT_TEXT_COLORS: Partial> = { open_code: "text-blue-500", auggie: "text-purple-500", autohand: "text-emerald-500", cline: "text-rose-500", codebuddy_code: "text-violet-500", corust_agent: "text-amber-500", github_copilot: "text-gray-700 dark:text-gray-300", goose: "text-lime-500", junie: "text-pink-500", minion_code: "text-fuchsia-500", qoder: "text-teal-500", factory_droid: "text-yellow-600", stakpak: "text-slate-500", } function FallbackIcon({ agentType, className, }: { agentType: AgentType className?: string }) { const cls = cn("shrink-0", AGENT_TEXT_COLORS[agentType], className) switch (agentType) { case "auggie": return ( ) case "junie": return ( ) case "qoder": return ( ) case "factory_droid": return ( ) case "autohand": return ( ) case "codebuddy_code": return ( ) case "corust_agent": return ( ) case "minion_code": return ( ) case "stakpak": return ( ) default: return ( ) } } export function AgentIcon({ agentType, className }: AgentIconProps) { const ColorIcon = COLOR_ICONS[agentType] if (ColorIcon) { return ( ) } const MonoIcon = MONO_ICONS[agentType] if (MonoIcon) { return ( ) } return }