import OpenHandsLogo from "#/assets/branding/openhands-logo.svg?react";
import TerminalIcon from "#/icons/terminal.svg?react";
import {
CLAUDE_CODE_MARK_PATH,
CLAUDE_CODE_VIEWBOX,
CODEX_MARK_PATH,
CODEX_VIEWBOX,
GEMINI_MARK_PATH,
GEMINI_VIEWBOX,
} from "#/constants/acp-brand-marks";
import type { ACPProviderIcon } from "#/constants/acp-providers";
import { cn } from "#/utils/utils";
/**
* Icons the conversation chip + onboarding tiles can render. Strictly broader
* than {@link ACPProviderIcon} — that type covers ACP CLI subprocesses only
* (Claude Code, Codex, Gemini, generic terminal fallback), whereas this type
* additionally includes the native OpenHands harness.
*/
export type AgentBrandIconKind = "openhands" | ACPProviderIcon;
// The OpenHands wordmark renders at a 3:2 (width:height) ratio. Kept as a
// named constant so the conversation chip and the onboarding tile (24×16)
// stay visually identical — see ``AgentOptionIcon`` in choose-agent-step.tsx.
const OPENHANDS_LOGO_ASPECT_RATIO = 3 / 2;
interface AgentBrandIconProps {
kind: AgentBrandIconKind;
size?: number;
className?: string;
"data-testid"?: string;
}
export function AgentBrandIcon({
kind,
size = 12,
className,
"data-testid": testId,
}: AgentBrandIconProps) {
if (kind === "openhands") {
// The shipped SVG draws the wordmark with ``fill="white"`` paths but
// leaves the two hand shapes as ``fill="transparent"`` (negative space).
// Recolor only the non-transparent paths to ``currentColor`` so the logo
// inherits the chip's text color *without* filling in the hands — a
// blanket ``[&_path]`` selector turns the whole mark into a solid blob.
return (
);
}
if (kind === "claude-code") {
return (
);
}
if (kind === "codex") {
return (
);
}
if (kind === "gemini") {
return (
);
}
return (
);
}