import { cn } from "~/utils/cn"; export type TerminalLine = { text: string; tone?: "muted" | "danger" | "success" | "accent" | "plain" }; const TONES = { plain: "text-kumo-default", muted: "text-kumo-subtle", danger: "text-kumo-danger", success: "text-kumo-success", accent: "text-accent-300", } as const; /** Monospace scrollback that reveals `visible` lines and shows a caret after the last one. */ export function Terminal({ lines, visible }: { lines: ReadonlyArray; visible: number }) { return (
{lines.slice(0, visible).map((line, index) => ( // oxlint-disable-next-line react/no-array-index-key -- scrollback lines are positional

{line.text || " "}

))}
); }