Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

usageProviders.ts

33 lines1.1 KB

1import type { UsageProviderKind } from "@t3tools/contracts";
2​
3import { ClaudeAI, type Icon, OpenAI } from "../Icons";
4​
5/**
6 * Series and table order. The chart layers both providers from a shared zero
7 * baseline, so this only fixes the reading order of legends, tables and hover
8 * rows; it does not decide which series sits above the other.
9 */
10export const PROVIDER_ORDER: readonly UsageProviderKind[] = ["codex", "claude"];
11​
12export const PROVIDER_LABEL: Record<UsageProviderKind, string> = {
13 claude: "Claude Code",
14 codex: "Codex",
15};
16​
17/** Claude's brand orange against a neutral white for Codex. */
18export const PROVIDER_COLOR: Record<UsageProviderKind, string> = {
19 claude: "#d97757",
20 codex: "#e6e6e6",
21};
22​
23/**
24 * Brand marks, reused from the provider picker.
25 *
26 * These ship their own fills (`#d97757` for Claude, white on dark for OpenAI),
27 * which are the same colours as the chart bands, so swapping a colour dot for a
28 * mark keeps the series association intact rather than trading it away.
29 */
30export const PROVIDER_MARK: Record<UsageProviderKind, Icon> = {
31 claude: ClaudeAI,
32 codex: OpenAI,
33};