refactor(desktop): inline v2 sidecar flag
This commit is contained in:
parent
e96d0b3426
commit
6fb752ad69
3 changed files with 1 additions and 13 deletions
|
|
@ -49,7 +49,6 @@ import { spawnWslSidecar } from "./wsl/sidecar"
|
|||
import { migrate } from "./migrate"
|
||||
import { cleanupStoreFiles } from "./store-cleanup"
|
||||
import { startBackgroundCli } from "./background-cli"
|
||||
import { resolveSidecarVersion } from "./sidecar-version"
|
||||
|
||||
const APP_NAMES: Record<string, string> = {
|
||||
dev: "OpenCode Dev",
|
||||
|
|
@ -62,7 +61,7 @@ const APP_IDS: Record<string, string> = {
|
|||
prod: "ai.opencode.desktop",
|
||||
}
|
||||
const TEST_ONBOARDING = process.env.OPENCODE_TEST_ONBOARDING === "1"
|
||||
const SIDECAR_VERSION = resolveSidecarVersion()
|
||||
const SIDECAR_VERSION = process.env.OPENCODE_SIDECAR_V2 === "1" ? "v2" : "v1"
|
||||
const jsCallStackFeature = "DocumentPolicyIncludeJSCallStacksInCrashReports"
|
||||
|
||||
let logger: ReturnType<typeof initLogging>
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
import { expect, test } from "bun:test"
|
||||
import { resolveSidecarVersion } from "./sidecar-version"
|
||||
|
||||
test("enables the v2 sidecar only for OPENCODE_SIDECAR_V2=1", () => {
|
||||
expect(resolveSidecarVersion("1")).toBe("v2")
|
||||
expect(resolveSidecarVersion("0")).toBe("v1")
|
||||
expect(resolveSidecarVersion(undefined)).toBe("v1")
|
||||
})
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export function resolveSidecarVersion(value = process.env.OPENCODE_SIDECAR_V2) {
|
||||
return value === "1" ? "v2" : "v1"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue