Open History to see the last commit
1import type { UsageProviderKind } from "@t3tools/contracts";
2
3import { ClaudeAI, type Icon, OpenAI } from "../Icons";
4
5type UsageProviderPresentation = {
6 readonly label: string;
7 readonly color: string;
8 readonly mark: Icon;
9};
10
11/**
12 * Exhaustive presentation for providers supported by the usage contract.
13 * Declaration order is reused by every chart, table, legend, and skeleton, so
14 * adding a provider only requires its contract support and one entry here.
15 */
16export const PROVIDER_PRESENTATION = {
17 codex: {
18 label: "Codex",
19 color: "var(--foreground)",
20 mark: OpenAI,
21 },
22 claude: {
23 label: "Claude Code",
24 color: "#d97757",
25 mark: ClaudeAI,
26 },
27} satisfies Record<UsageProviderKind, UsageProviderPresentation>;
28
29/** The chart layers every series from zero, so order only controls how it is read. */
30export const PROVIDER_ORDER = Object.keys(PROVIDER_PRESENTATION) as UsageProviderKind[];