File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ function truthy(key: string) {
77
88const OPENCODE_EXPERIMENTAL = truthy ( "OPENCODE_EXPERIMENTAL" )
99const copy = process . env [ "OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT" ]
10- const workspaces = process . env [ "OPENCODE_EXPERIMENTAL_WORKSPACES" ]
10+
11+ function enabledByExperimental ( key : string ) {
12+ return process . env [ key ] === undefined ? OPENCODE_EXPERIMENTAL : truthy ( key )
13+ }
1114
1215export const Flag = {
1316 OTEL_EXPORTER_OTLP_ENDPOINT : process . env [ "OTEL_EXPORTER_OTLP_ENDPOINT" ] ,
@@ -43,8 +46,7 @@ export const Flag = {
4346 OPENCODE_DB : process . env [ "OPENCODE_DB" ] ,
4447
4548 OPENCODE_WORKSPACE_ID : process . env [ "OPENCODE_WORKSPACE_ID" ] ,
46- OPENCODE_EXPERIMENTAL_WORKSPACES :
47- workspaces === undefined ? OPENCODE_EXPERIMENTAL : truthy ( "OPENCODE_EXPERIMENTAL_WORKSPACES" ) ,
49+ OPENCODE_EXPERIMENTAL_WORKSPACES : enabledByExperimental ( "OPENCODE_EXPERIMENTAL_WORKSPACES" ) ,
4850
4951 // Evaluated at access time (not module load) because tests, the CLI, and
5052 // external tooling set these env vars at runtime.
You can’t perform that action at this time.
0 commit comments