effect: move tool flags into RuntimeFlags (#27198)

This commit is contained in:
Kit Langton
2026-05-12 21:45:53 -04:00
committed by GitHub
parent c9df833d2c
commit da689d77c4
7 changed files with 88 additions and 47 deletions

View File

@@ -16,12 +16,24 @@ describe("RuntimeFlags", () => {
fromConfig({
OPENCODE_PURE: "true",
OPENCODE_DISABLE_DEFAULT_PLUGINS: "true",
OPENCODE_EXPERIMENTAL: "true",
OPENCODE_ENABLE_EXA: "true",
OPENCODE_ENABLE_PARALLEL: "true",
OPENCODE_ENABLE_QUESTION_TOOL: "true",
OPENCODE_CLIENT: "desktop",
}),
),
)
expect(flags.pure).toBe(true)
expect(flags.disableDefaultPlugins).toBe(true)
expect(flags.enableExa).toBe(true)
expect(flags.enableParallel).toBe(true)
expect(flags.enableQuestionTool).toBe(true)
expect(flags.experimentalScout).toBe(true)
expect(flags.experimentalLspTool).toBe(true)
expect(flags.experimentalPlanMode).toBe(true)
expect(flags.client).toBe("desktop")
}),
)
@@ -31,6 +43,8 @@ describe("RuntimeFlags", () => {
expect(flags.pure).toBe(false)
expect(flags.disableDefaultPlugins).toBe(true)
expect(flags.enableExa).toBe(false)
expect(flags.client).toBe("cli")
}),
)
@@ -43,6 +57,9 @@ describe("RuntimeFlags", () => {
ConfigProvider.fromUnknown({
OPENCODE_PURE: "true",
OPENCODE_DISABLE_DEFAULT_PLUGINS: "true",
OPENCODE_EXPERIMENTAL: "true",
OPENCODE_ENABLE_EXA: "true",
OPENCODE_CLIENT: "desktop",
}),
),
),
@@ -50,6 +67,8 @@ describe("RuntimeFlags", () => {
expect(flags.pure).toBe(false)
expect(flags.disableDefaultPlugins).toBe(false)
expect(flags.enableExa).toBe(false)
expect(flags.client).toBe("cli")
}),
)
})