Skip to content
24 linesCodeBlameRaw
1import type { WorkspaceAgent } from "@g1t/contracts";
2
3import { Mark } from "./logo";
4
5/**
6 * Whether an agent is `@g1t`, the orchestrator every workspace has: built
7 * in, first in the agents service's list. Its handle is never another agent's.
8 */
9export function isOrchestrator(agent: Pick<WorkspaceAgent, "handle"> & { builtin?: boolean | null }): boolean {
10 return agent.builtin === true || agent.handle === "g1t";
11}
12
13/** g1t's face: the pixel 1 of the logo on a dark square, where agents wear the sparkle. */
14export function G1tMark({ size = 20 }: { size?: number }) {
15 return (
16 <span
17 aria-hidden="true"
18 className="inline-flex shrink-0 items-center justify-center bg-[#0b0b0d] text-fg ring-1 ring-line-strong ring-inset scheme-dark"
19 style={{ width: size, height: size, borderRadius: Math.round(size * 0.26) }}
20 >
21 <Mark className="size-full" />
22 </span>
23 );
24}