mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
* Fixes #4882: Remove experimental setting for command execution in attempt_completion - Remove DISABLE_COMPLETION_COMMAND from experiments system - Permanently disable command execution in attempt_completion tool - Update tool prompts to remove command parameter and examples - Remove experimental UI toggle and localization entries (18+ languages) - Update tests to reflect permanent behavior - Remove experiment-specific test file Command execution is now permanently disabled in attempt_completion. Users must use execute_command tool separately before attempt_completion. * refactor: simplify getAttemptCompletionDescription by removing unnecessary variables * test: fix tests by regenerating snaps --------- Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import type { AssertEqual, Equals, Keys, Values, ExperimentId, Experiments } from "@roo-code/types"
|
|
|
|
export const EXPERIMENT_IDS = {
|
|
MULTI_FILE_APPLY_DIFF: "multiFileApplyDiff",
|
|
POWER_STEERING: "powerSteering",
|
|
} as const satisfies Record<string, ExperimentId>
|
|
|
|
type _AssertExperimentIds = AssertEqual<Equals<ExperimentId, Values<typeof EXPERIMENT_IDS>>>
|
|
|
|
type ExperimentKey = Keys<typeof EXPERIMENT_IDS>
|
|
|
|
interface ExperimentConfig {
|
|
enabled: boolean
|
|
}
|
|
|
|
export const experimentConfigsMap: Record<ExperimentKey, ExperimentConfig> = {
|
|
MULTI_FILE_APPLY_DIFF: { enabled: false },
|
|
POWER_STEERING: { enabled: false },
|
|
}
|
|
|
|
export const experimentDefault = Object.fromEntries(
|
|
Object.entries(experimentConfigsMap).map(([_, config]) => [
|
|
EXPERIMENT_IDS[_ as keyof typeof EXPERIMENT_IDS] as ExperimentId,
|
|
config.enabled,
|
|
]),
|
|
) as Record<ExperimentId, boolean>
|
|
|
|
export const experiments = {
|
|
get: (id: ExperimentKey): ExperimentConfig | undefined => experimentConfigsMap[id],
|
|
isEnabled: (experimentsConfig: Experiments, id: ExperimentId) => experimentsConfig[id] ?? experimentDefault[id],
|
|
} as const
|