feat(ui): upgrade @lobehub/icons to v5 and update agent icon colors

Upgrade @lobehub/icons from v4 to v5.3.0, adopt new icon components (ClaudeCode, Codex, GeminiCLI) with Color variants, and align fallback AGENT_COLORS with official brand colors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xintaofei
2026-04-07 21:42:22 +08:00
parent 768d1326b1
commit 8d97ba6f44
4 changed files with 34 additions and 64 deletions

View File

@@ -2,11 +2,14 @@ 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 GeminiColor from "@lobehub/icons/es/Gemini/components/Color"
import OpenClawColor from "@lobehub/icons/es/OpenClaw/components/Color"
import ClineMono from "@lobehub/icons/es/Cline/components/Mono"
import { OpenAI, OpenCode } from "@lobehub/icons"
import {
ClaudeCode,
Cline,
Codex,
GeminiCLI,
OpenClaw,
OpenCode,
} from "@lobehub/icons"
interface AgentIconProps {
agentType: AgentType
@@ -17,21 +20,19 @@ interface AgentIconProps {
type AnyIcon = React.ComponentType<any>
const COLOR_ICONS: Partial<Record<AgentType, AnyIcon>> = {
claude_code: ClaudeColor,
gemini: GeminiColor,
open_claw: OpenClawColor,
claude_code: ClaudeCode.Color,
codex: Codex.Color,
gemini: GeminiCLI.Color,
open_claw: OpenClaw.Color,
}
const MONO_ICONS: Partial<Record<AgentType, AnyIcon>> = {
codex: OpenAI,
open_code: OpenCode,
cline: ClineMono,
cline: Cline,
}
// Text-color versions for Mono icons
const AGENT_TEXT_COLORS: Partial<Record<AgentType, string>> = {
open_code: "text-blue-500",
}
const AGENT_TEXT_COLORS: Partial<Record<AgentType, string>> = {}
export function AgentIcon({ agentType, className }: AgentIconProps) {
const ColorIcon = COLOR_ICONS[agentType]

View File

@@ -245,10 +245,10 @@ export const AGENT_LABELS: Record<AgentType, string> = {
}
export const AGENT_COLORS: Record<AgentType, string> = {
claude_code: "bg-orange-500",
codex: "bg-green-500",
open_code: "bg-blue-500",
gemini: "bg-blue-400",
claude_code: "bg-[#D97757]",
codex: "bg-[#7A9DFF]",
open_code: "bg-black",
gemini: "bg-[#3186FF]",
open_claw: "bg-emerald-600",
cline: "bg-purple-500",
}