diff --git a/src/components/agent-icon.tsx b/src/components/agent-icon.tsx index efe271d..e12851e 100644 --- a/src/components/agent-icon.tsx +++ b/src/components/agent-icon.tsx @@ -1,3 +1,5 @@ +import { memo, useId } from "react" + import type { AgentType } from "@/lib/types" import { AGENT_COLORS } from "@/lib/types" import { cn } from "@/lib/utils" @@ -5,7 +7,6 @@ import { cn } from "@/lib/utils" import { ClaudeCode, Cline, - Codex, GeminiCLI, OpenClaw, OpenCode, @@ -16,12 +17,52 @@ interface AgentIconProps { className?: string } +// Codex.Color has a white background rect that shows as a white square on +// dark backgrounds. This component renders only the logo path with its +// gradient, without the opaque background. +const CodexColorIcon = memo(function CodexColorIcon({ + size = "1em", +}: { + size?: string | number +}) { + const id = useId() + return ( + + Codex + + + + + + + + + + ) +}) + // eslint-disable-next-line @typescript-eslint/no-explicit-any type AnyIcon = React.ComponentType const COLOR_ICONS: Partial> = { claude_code: ClaudeCode.Color, - codex: Codex.Color, + codex: CodexColorIcon, gemini: GeminiCLI.Color, open_claw: OpenClaw.Color, }