add version to user-agent

This commit is contained in:
Dax Raad
2025-08-01 12:17:51 -04:00
parent 6ebd828aa5
commit 50e4b3e6a7
2 changed files with 3 additions and 1 deletions

View File

@@ -136,6 +136,7 @@ export namespace Installation {
}
export const VERSION = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "dev"
export const USER_AGENT = `opencode/${VERSION}`
export async function latest() {
return fetch("https://api.github.com/repos/sst/opencode/releases/latest")