|
1 | 1 | /// <reference types="unplugin-icons/types/react" /> |
2 | 2 | import type { AgentKind } from '@linkcode/schema'; |
| 3 | +import ClaudeGlyph from '~icons/lobe-icons/claude'; |
3 | 4 | import ClaudeColorGlyph from '~icons/lobe-icons/claude-color'; |
4 | | -import ClaudeCodeGlyph from '~icons/lobe-icons/claudecode'; |
5 | 5 | import CodexGlyph from '~icons/lobe-icons/codex'; |
6 | 6 | import CodexColorGlyph from '~icons/lobe-icons/codex-color'; |
| 7 | +import GrokGlyph from '~icons/lobe-icons/grok'; |
7 | 8 | import OpenCodeGlyph from '~icons/lobe-icons/opencode'; |
8 | 9 | import { AGENT_INITIALS } from '../agent-meta'; |
9 | 10 | import { cn } from '../lib/cn'; |
10 | 11 |
|
11 | 12 | export { AGENT_LABELS } from '../agent-meta'; |
12 | 13 |
|
13 | | -const AGENT_GLYPHS: Partial<Record<AgentKind, typeof ClaudeCodeGlyph>> = { |
14 | | - 'claude-code': ClaudeCodeGlyph, |
| 14 | +type AgentGlyph = React.ComponentType<React.SVGProps<SVGSVGElement>>; |
| 15 | + |
| 16 | +const AGENT_GLYPHS: Partial<Record<AgentKind, AgentGlyph>> = { |
| 17 | + 'claude-code': ClaudeGlyph, |
15 | 18 | codex: CodexGlyph, |
| 19 | + 'grok-build': GrokGlyph, |
16 | 20 | opencode: OpenCodeGlyph, |
| 21 | + pi: PiGlyph, |
17 | 22 | }; |
18 | 23 |
|
19 | | -const AGENT_COLOR_GLYPHS: Partial<Record<AgentKind, typeof ClaudeColorGlyph>> = { |
| 24 | +const AGENT_COLOR_GLYPHS: Partial<Record<AgentKind, AgentGlyph>> = { |
20 | 25 | 'claude-code': ClaudeColorGlyph, |
21 | 26 | codex: CodexColorGlyph, |
22 | 27 | }; |
23 | 28 |
|
| 29 | +function PiGlyph(props: React.SVGProps<SVGSVGElement>): React.ReactNode { |
| 30 | + return ( |
| 31 | + <svg viewBox="0 0 800 800" {...props}> |
| 32 | + <path |
| 33 | + d="M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z" |
| 34 | + fill="currentColor" |
| 35 | + fillRule="evenodd" |
| 36 | + /> |
| 37 | + <path d="M517.36 400H634.72V634.72H517.36Z" fill="currentColor" /> |
| 38 | + </svg> |
| 39 | + ); |
| 40 | +} |
| 41 | + |
24 | 42 | export function AgentIcon({ |
25 | 43 | kind, |
26 | 44 | variant = 'solid', |
|
0 commit comments