fix(stats): send User-Agent for GitHub star count (#58283)

Co-authored-by: jayair <53023+jayair@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-10-23 00:55:04 +00:00
committed by GitHub
Unverified
parent 286425fcd4
commit 8c5b202815
@@ -10,7 +10,7 @@ export type HeaderLink = { href: string; label: string }
export const githubLink = {
href: "https://github.com/anomalyco/opencode",
apiHref: "https://api.github.com/repos/anomalyco/opencode",
fallbackStars: "208K",
fallbackStars: "220K",
}
export const themePreferences = ["dark", "light", "system"] as const
export const themeStorageKey = "opencode:stats-theme"
@@ -28,6 +28,7 @@ export const getGitHubStars = query(async () => {
headers: {
Accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
"User-Agent": "opencode-stats",
},
})
.then((response) => (response.ok ? response.json() : undefined))