Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(usage): add Grok and OpenCode reporting #5704

Closeddevteapot(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/5704/headopened View on GitHub

Showing 18 changed files with 52 additions and 7 deletions (loading 16).

x
0 of 18 viewed, 18 left
8 additions and 3 deletionsapps/mobile/src/features/usage/usageProviders.tsModified
View file
@@ -5,21 +5,26 @@
* 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"];
+export const PROVIDER_ORDER: readonly UsageProviderKind[] = ["codex", "claude", "grok", "opencode"];
​
export const PROVIDER_LABEL: Record<UsageProviderKind, string> = {
claude: "Claude Code",
codex: "Codex",
+ grok: "Grok",
+ opencode: "OpenCode",
};
​
/**
- * Claude's brand orange holds in both themes; Codex is neutral and must flip
- * with the theme or its bars vanish against the matching background.
+ * Claude's brand orange holds in both themes; Codex, Grok, and OpenCode 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();
return {
claude: "#d97757",
codex: scheme === "dark" ? "#e6e6e6" : "#3c3c43",
+ grok: scheme === "dark" ? "#a8a29e" : "#57534e",
+ opencode: scheme === "dark" ? "#cfcecd" : "#6b7280",
};