File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ function App() {
372372 dialog . replace ( ( ) => < DialogSessionList /> )
373373 } ,
374374 } ,
375- ...( Flag . OPENCODE_EXPERIMENTAL_WORKSPACES_TUI
375+ ...( Flag . OPENCODE_EXPERIMENTAL_WORKSPACES
376376 ? [
377377 {
378378 title : "Manage workspaces" ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export function Header() {
103103 < Match when = { session ( ) ?. parentID } >
104104 < box flexDirection = "column" gap = { 1 } >
105105 < box flexDirection = { narrow ( ) ? "column" : "row" } justifyContent = "space-between" gap = { narrow ( ) ? 1 : 0 } >
106- { Flag . OPENCODE_EXPERIMENTAL_WORKSPACES_TUI ? (
106+ { Flag . OPENCODE_EXPERIMENTAL_WORKSPACES ? (
107107 < box flexDirection = "column" >
108108 < text fg = { theme . text } >
109109 < b > Subagent session</ b >
@@ -154,7 +154,7 @@ export function Header() {
154154 </ Match >
155155 < Match when = { true } >
156156 < box flexDirection = { narrow ( ) ? "column" : "row" } justifyContent = "space-between" gap = { 1 } >
157- { Flag . OPENCODE_EXPERIMENTAL_WORKSPACES_TUI ? (
157+ { Flag . OPENCODE_EXPERIMENTAL_WORKSPACES ? (
158158 < box flexDirection = "column" >
159159 < Title session = { session } />
160160 < WorkspaceInfo workspace = { workspace } />
Original file line number Diff line number Diff line change 1- import { Instance } from "@/project/instance"
21import type { MiddlewareHandler } from "hono"
3- import { Installation } from "../installation "
2+ import { Flag } from "../flag/flag "
43import { getAdaptor } from "./adaptors"
54import { Workspace } from "./workspace"
65import { WorkspaceContext } from "./workspace-context"
@@ -38,7 +37,7 @@ async function routeRequest(req: Request) {
3837
3938export const WorkspaceRouterMiddleware : MiddlewareHandler = async ( c , next ) => {
4039 // Only available in development for now
41- if ( ! Installation . isLocal ( ) ) {
40+ if ( ! Flag . OPENCODE_EXPERIMENTAL_WORKSPACES ) {
4241 return next ( )
4342 }
4443
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ export namespace Flag {
5757 export const OPENCODE_EXPERIMENTAL_LSP_TOOL = OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_LSP_TOOL" )
5858 export const OPENCODE_DISABLE_FILETIME_CHECK = truthy ( "OPENCODE_DISABLE_FILETIME_CHECK" )
5959 export const OPENCODE_EXPERIMENTAL_PLAN_MODE = OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_PLAN_MODE" )
60- export const OPENCODE_EXPERIMENTAL_WORKSPACES_TUI =
61- OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_WORKSPACES_TUI " )
60+ export const OPENCODE_EXPERIMENTAL_WORKSPACES =
61+ OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_WORKSPACES " )
6262 export const OPENCODE_EXPERIMENTAL_MARKDOWN = ! falsy ( "OPENCODE_EXPERIMENTAL_MARKDOWN" )
6363 export const OPENCODE_MODELS_URL = process . env [ "OPENCODE_MODELS_URL" ]
6464 export const OPENCODE_MODELS_PATH = process . env [ "OPENCODE_MODELS_PATH" ]
Original file line number Diff line number Diff line change @@ -10,12 +10,22 @@ import { Database } from "../../src/storage/db"
1010import { resetDatabase } from "../fixture/db"
1111import * as adaptors from "../../src/control-plane/adaptors"
1212import type { Adaptor } from "../../src/control-plane/types"
13+ import { Flag } from "../../src/flag/flag"
1314
1415afterEach ( async ( ) => {
1516 mock . restore ( )
1617 await resetDatabase ( )
1718} )
1819
20+ const original = Flag . OPENCODE_EXPERIMENTAL_WORKSPACES
21+ // @ts -expect-error don't do this normally, but it works
22+ Flag . OPENCODE_EXPERIMENTAL_WORKSPACES = true
23+
24+ afterEach ( ( ) => {
25+ // @ts -expect-error don't do this normally, but it works
26+ Flag . OPENCODE_EXPERIMENTAL_WORKSPACES = original
27+ } )
28+
1929type State = {
2030 workspace ?: "first" | "second"
2131 calls : Array < { method : string ; url : string ; body ?: string } >
You can’t perform that action at this time.
0 commit comments