fix(core): put workspace routing behind OPENCODE_EXPERIMENTAL_WORKSPACES flag (#16775)

This commit is contained in:
James Long
2026-03-09 16:14:19 -04:00
committed by GitHub
parent ce38997c76
commit 86cef16940
5 changed files with 17 additions and 8 deletions

View File

@@ -10,12 +10,22 @@ import { Database } from "../../src/storage/db"
import { resetDatabase } from "../fixture/db"
import * as adaptors from "../../src/control-plane/adaptors"
import type { Adaptor } from "../../src/control-plane/types"
import { Flag } from "../../src/flag/flag"
afterEach(async () => {
mock.restore()
await resetDatabase()
})
const original = Flag.OPENCODE_EXPERIMENTAL_WORKSPACES
// @ts-expect-error don't do this normally, but it works
Flag.OPENCODE_EXPERIMENTAL_WORKSPACES = true
afterEach(() => {
// @ts-expect-error don't do this normally, but it works
Flag.OPENCODE_EXPERIMENTAL_WORKSPACES = original
})
type State = {
workspace?: "first" | "second"
calls: Array<{ method: string; url: string; body?: string }>