File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const clearAuthToken = () => {
121121
122122const platform : Platform = {
123123 platform : "web" ,
124- version : pkg . version ,
124+ version : import . meta . env . VITE_OPENCODE_VERSION || pkg . version ,
125125 openLink,
126126 back,
127127 forward,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ interface ImportMetaEnv {
22 readonly VITE_OPENCODE_SERVER_HOST : string
33 readonly VITE_OPENCODE_SERVER_PORT : string
44 readonly VITE_OPENCODE_CHANNEL ?: "dev" | "beta" | "prod"
5+ readonly VITE_OPENCODE_VERSION : string
56
67 readonly VITE_SENTRY_DSN ?: string
78 readonly VITE_SENTRY_ENVIRONMENT ?: string
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ const channel = (() => {
1212 return "dev"
1313} ) ( )
1414
15+ const version = process . env . OPENCODE_VERSION ?? ""
16+
1517/**
1618 * @type {import("vite").PluginOption }
1719 */
@@ -27,6 +29,7 @@ export default [
2729 } ,
2830 define : {
2931 "import.meta.env.VITE_OPENCODE_CHANNEL" : JSON . stringify ( channel ) ,
32+ "import.meta.env.VITE_OPENCODE_VERSION" : JSON . stringify ( version ) ,
3033 } ,
3134 worker : {
3235 format : "es" ,
You can’t perform that action at this time.
0 commit comments