mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
* feat(web-evals): remember last Roo model selection * fix(web-evals): reset model selections on provider switch and fix lint warning - Add useEffect to reset model selections when switching between providers This prevents OpenRouter model IDs from persisting when switching to Roo, which was causing Roo's stored selection to be overwritten with wrong IDs - Remove unused 'executionMethod' from onSubmit dependency array to fix react-hooks/exhaustive-deps warning * fix(web-evals): add missing executionMethod to test cases * fix(web-evals): harden localStorage + keep provider selections
20 lines
583 B
TypeScript
20 lines
583 B
TypeScript
import type { CreateRun } from "./schemas"
|
|
|
|
/**
|
|
* The New Run UI keeps exercise selection in component state.
|
|
* This normalizer ensures we submit the *visible/selected* exercises when suite is partial.
|
|
*/
|
|
export function normalizeCreateRunForSubmit(
|
|
values: CreateRun,
|
|
selectedExercises: string[],
|
|
suiteOverride?: CreateRun["suite"],
|
|
): CreateRun {
|
|
const suite = suiteOverride ?? values.suite
|
|
const normalizedSelectedExercises = Array.from(new Set(selectedExercises))
|
|
|
|
return {
|
|
...values,
|
|
suite,
|
|
exercises: suite === "partial" ? normalizedSelectedExercises : [],
|
|
}
|
|
}
|