forked from pingdotgg/t3code
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathusageProviders.ts
More file actions
31 lines (28 loc) · 969 Bytes
/
Copy pathusageProviders.ts
File metadata and controls
31 lines (28 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { UsageProviderKind } from "@t3tools/contracts";
import { useColorScheme } from "react-native";
/**
* Series and table order. The chart stacks providers from the bottom in this
* order, so it also fixes which band sits on top of the bars.
*/
export const PROVIDER_ORDER: readonly UsageProviderKind[] = ["codex", "claude", "grok", "kimi"];
export const PROVIDER_LABEL: Record<UsageProviderKind, string> = {
claude: "Claude Code",
codex: "Codex",
grok: "Grok",
kimi: "Kimi",
};
/**
* Claude's and Kimi's brand oranges hold in both themes; Codex and Grok are
* neutral and must flip with the theme or their bars vanish against the
* matching background.
*/
export function useProviderColors(): Record<UsageProviderKind, string> {
const scheme = useColorScheme();
const dark = scheme === "dark";
return {
claude: "#d97757",
codex: dark ? "#e6e6e6" : "#3c3c43",
grok: dark ? "#8b8b8b" : "#6b6b6b",
kimi: "#ff6a3d",
};
}