import { cn } from "@multica/ui/lib/utils"; import type { AgentRuntime } from "@multica/core/types"; import { ProviderLogo } from "../../runtimes/components/provider-logo"; import { useT } from "../../i18n"; /** * One-line runtime row for Step 3's web CLI expand. Provider logo, * name + subtitle, online indicator on the right. Selection state is * driven by the caller (kept stateless so both StepPlatformFork and * any future embedder can share it without duplicating the picker * plumbing). */ export function CompactRuntimeRow({ runtime, selected, onSelect, }: { runtime: AgentRuntime; selected: boolean; onSelect: () => void; }) { const { t: tAgents } = useT("agents"); const online = runtime.status === "online"; return (
{ if (e.key === "Enter" || e.key === " ") { e.preventDefault(); onSelect(); } }} className={cn( "flex cursor-pointer flex-row items-center gap-3 rounded-lg border bg-card p-4 transition-colors", selected ? "border-primary ring-1 ring-primary" : "hover:border-foreground/20", )} >
{runtime.name}
{runtime.provider}
$.availability.online) : tAgents(($) => $.availability.offline)} />
); }