Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit f7434de

Browse files
chore: remove POWER_STEERING experimental feature (#10926)
- Remove powerSteering from experimentIds array and schema in packages/types - Remove POWER_STEERING from EXPERIMENT_IDS and experimentConfigsMap - Remove power steering conditional block from getEnvironmentDetails - Remove POWER_STEERING entry from all 18 locale settings.json files - Update related test files to remove power steering references
1 parent 2d2ed15 commit f7434de

24 files changed

Lines changed: 6 additions & 127 deletions

packages/types/src/experiment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
77
*/
88

99
export const experimentIds = [
10-
"powerSteering",
1110
"multiFileApplyDiff",
1211
"preventFocusDisruption",
1312
"imageGeneration",
@@ -25,7 +24,6 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
2524
*/
2625

2726
export const experimentsSchema = z.object({
28-
powerSteering: z.boolean().optional(),
2927
multiFileApplyDiff: z.boolean().optional(),
3028
preventFocusDisruption: z.boolean().optional(),
3129
imageGeneration: z.boolean().optional(),

src/core/environment/__tests__/getEnvironmentDetails.spec.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import delay from "delay"
55
import type { Mock } from "vitest"
66

77
import { getEnvironmentDetails } from "../getEnvironmentDetails"
8-
import { EXPERIMENT_IDS, experiments } from "../../../shared/experiments"
98
import { getFullModeDetails } from "../../../shared/modes"
109
import { isToolAllowedForMode } from "../../tools/validateToolUse"
1110
import { getApiMetrics } from "../../../shared/getApiMetrics"
@@ -43,7 +42,6 @@ vi.mock("execa", () => ({
4342
execa: vi.fn(),
4443
}))
4544

46-
vi.mock("../../../shared/experiments")
4745
vi.mock("../../../shared/modes")
4846
vi.mock("../../../shared/getApiMetrics")
4947
vi.mock("../../../services/glob/list-files")
@@ -321,16 +319,6 @@ describe("getEnvironmentDetails", () => {
321319
expect(mockInactiveTerminal.getCurrentWorkingDirectory).toHaveBeenCalled()
322320
})
323321

324-
it("should include experiment-specific details when Power Steering is enabled", async () => {
325-
mockState.experiments = { [EXPERIMENT_IDS.POWER_STEERING]: true }
326-
;(experiments.isEnabled as Mock).mockReturnValue(true)
327-
328-
const result = await getEnvironmentDetails(mockCline as Task)
329-
330-
expect(result).toContain("<role>You are a code assistant</role>")
331-
expect(result).toContain("<custom_instructions>Custom instructions</custom_instructions>")
332-
})
333-
334322
it("should handle missing provider or state", async () => {
335323
// Mock provider to return null.
336324
mockCline.providerRef!.deref = vi.fn().mockReturnValue(null)

src/core/environment/getEnvironmentDetails.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import delay from "delay"
88
import type { ExperimentId } from "@roo-code/types"
99
import { DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT } from "@roo-code/types"
1010

11-
import { EXPERIMENT_IDS, experiments as Experiments } from "../../shared/experiments"
1211
import { formatLanguage } from "../../shared/language"
1312
import { defaultModeSlug, getFullModeDetails } from "../../shared/modes"
1413
import { getApiMetrics } from "../../shared/getApiMetrics"
@@ -243,14 +242,6 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
243242
details += `<model>${modelId}</model>\n`
244243
details += `<tool_format>${toolFormat}</tool_format>\n`
245244

246-
if (Experiments.isEnabled(experiments ?? {}, EXPERIMENT_IDS.POWER_STEERING)) {
247-
details += `<role>${modeDetails.roleDefinition}</role>\n`
248-
249-
if (modeDetails.customInstructions) {
250-
details += `<custom_instructions>${modeDetails.customInstructions}</custom_instructions>\n`
251-
}
252-
}
253-
254245
// Add browser session status - Only show when active to prevent cluttering context
255246
const isBrowserActive = cline.browserSession.isSessionActive()
256247

src/shared/__tests__/experiments.spec.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ import type { ExperimentId } from "@roo-code/types"
55
import { EXPERIMENT_IDS, experimentConfigsMap, experiments as Experiments } from "../experiments"
66

77
describe("experiments", () => {
8-
describe("POWER_STEERING", () => {
9-
it("is configured correctly", () => {
10-
expect(EXPERIMENT_IDS.POWER_STEERING).toBe("powerSteering")
11-
expect(experimentConfigsMap.POWER_STEERING).toMatchObject({
12-
enabled: false,
13-
})
14-
})
15-
})
16-
178
describe("MULTI_FILE_APPLY_DIFF", () => {
189
it("is configured correctly", () => {
1910
expect(EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF).toBe("multiFileApplyDiff")
@@ -24,43 +15,40 @@ describe("experiments", () => {
2415
})
2516

2617
describe("isEnabled", () => {
27-
it("returns false when POWER_STEERING experiment is not enabled", () => {
18+
it("returns false when MULTI_FILE_APPLY_DIFF experiment is not enabled", () => {
2819
const experiments: Record<ExperimentId, boolean> = {
29-
powerSteering: false,
3020
multiFileApplyDiff: false,
3121
preventFocusDisruption: false,
3222
imageGeneration: false,
3323
runSlashCommand: false,
3424
multipleNativeToolCalls: false,
3525
customTools: false,
3626
}
37-
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
27+
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF)).toBe(false)
3828
})
3929

40-
it("returns true when experiment POWER_STEERING is enabled", () => {
30+
it("returns true when experiment MULTI_FILE_APPLY_DIFF is enabled", () => {
4131
const experiments: Record<ExperimentId, boolean> = {
42-
powerSteering: true,
43-
multiFileApplyDiff: false,
32+
multiFileApplyDiff: true,
4433
preventFocusDisruption: false,
4534
imageGeneration: false,
4635
runSlashCommand: false,
4736
multipleNativeToolCalls: false,
4837
customTools: false,
4938
}
50-
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(true)
39+
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF)).toBe(true)
5140
})
5241

5342
it("returns false when experiment is not present", () => {
5443
const experiments: Record<ExperimentId, boolean> = {
55-
powerSteering: false,
5644
multiFileApplyDiff: false,
5745
preventFocusDisruption: false,
5846
imageGeneration: false,
5947
runSlashCommand: false,
6048
multipleNativeToolCalls: false,
6149
customTools: false,
6250
}
63-
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
51+
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF)).toBe(false)
6452
})
6553
})
6654
})

src/shared/experiments.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { AssertEqual, Equals, Keys, Values, ExperimentId, Experiments } fro
22

33
export const EXPERIMENT_IDS = {
44
MULTI_FILE_APPLY_DIFF: "multiFileApplyDiff",
5-
POWER_STEERING: "powerSteering",
65
PREVENT_FOCUS_DISRUPTION: "preventFocusDisruption",
76
IMAGE_GENERATION: "imageGeneration",
87
RUN_SLASH_COMMAND: "runSlashCommand",
@@ -20,7 +19,6 @@ interface ExperimentConfig {
2019

2120
export const experimentConfigsMap: Record<ExperimentKey, ExperimentConfig> = {
2221
MULTI_FILE_APPLY_DIFF: { enabled: false },
23-
POWER_STEERING: { enabled: false },
2422
PREVENT_FOCUS_DISRUPTION: { enabled: false },
2523
IMAGE_GENERATION: { enabled: false },
2624
RUN_SLASH_COMMAND: { enabled: false },

webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,10 @@ describe("mergeExtensionState", () => {
233233
...baseState,
234234
apiConfiguration: { modelMaxThinkingTokens: 456, modelTemperature: 0.3 },
235235
experiments: {
236-
powerSteering: true,
237-
marketplace: false,
238-
disableCompletionCommand: false,
239-
concurrentFileReads: true,
240236
multiFileApplyDiff: true,
241237
preventFocusDisruption: false,
242-
newTaskRequireTodos: false,
243238
imageGeneration: false,
244239
runSlashCommand: false,
245-
nativeToolCalling: false,
246240
multipleNativeToolCalls: false,
247241
customTools: false,
248242
} as Record<ExperimentId, boolean>,
@@ -257,16 +251,10 @@ describe("mergeExtensionState", () => {
257251
})
258252

259253
expect(result.experiments).toEqual({
260-
powerSteering: true,
261-
marketplace: false,
262-
disableCompletionCommand: false,
263-
concurrentFileReads: true,
264254
multiFileApplyDiff: true,
265255
preventFocusDisruption: false,
266-
newTaskRequireTodos: false,
267256
imageGeneration: false,
268257
runSlashCommand: false,
269-
nativeToolCalling: false,
270258
multipleNativeToolCalls: false,
271259
customTools: false,
272260
})

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,10 +808,6 @@
808808
"name": "Use experimental insert content tool",
809809
"description": "Enable the experimental insert content tool, allowing Roo to insert content at specific line numbers without needing to create a diff."
810810
},
811-
"POWER_STEERING": {
812-
"name": "Use experimental \"power steering\" mode",
813-
"description": "When enabled, Roo will remind the model about the details of its current mode definition more frequently. This will lead to stronger adherence to role definitions and custom instructions, but will use more tokens per message."
814-
},
815811
"CONCURRENT_FILE_READS": {
816812
"name": "Enable concurrent file reads",
817813
"description": "When enabled, Roo can read multiple files in a single request. When disabled, Roo must read files one at a time. Disabling this can help when working with less capable models or when you want more control over file access."

webview-ui/src/i18n/locales/es/settings.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)