Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: add OpenCode usage statistics #7221

Closedtris203(GitHub profile, opens in a new tab)wants to merge 15 commits intomain fromrefs/pull/7221/headopened View on GitHub

Showing 14 changed files with 74 additions and 1 deletion (loading 12).

x
0 of 14 viewed, 14 left
3 additions and 1 deletionapps/mobile/src/features/usage/usageProviders.tsModified
View file
@@ -5,12 +5,13 @@
* 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"];
+export const PROVIDER_ORDER: readonly UsageProviderKind[] = ["codex", "claude", "grok", "opencode"];
​
export const PROVIDER_LABEL: Record<UsageProviderKind, string> = {
claude: "Claude Code",
codex: "Codex",
grok: "Grok Build",
+ opencode: "OpenCode",
};
​
/**
@@ -23,5 +24,6 @@
claude: "#d97757",
codex: scheme === "dark" ? "#e6e6e6" : "#3c3c43",
grok: scheme === "dark" ? "#a1a1aa" : "#52525b",
+ opencode: "#8b5cf6",
};
71 additions and 0 deletionsapps/server/src/usage/UsageService.test.tsAdded
View file
@@ -0,0 +1,71 @@
+// @effect-diagnostics nodeBuiltinImport:off
+import * as NodeFS from "node:fs";
+​
+import * as NodeServices from "@effect/platform-node/NodeServices";