fix: model selection (#643)

fix: pass correct selected model in ModelOverlay

The ModelOverlay component was incorrectly passing the current model
instead of the newly selected model to its onSelect callback. This
prevented model changes from being applied properly.

The fix ensures that when a user selects a new model, the parent
component receives the correct newly selected model value, allowing
model changes to work as intended.
This commit is contained in:
Pulipaka Sai Krishna
2025-04-25 11:38:05 -05:00
committed by GitHub
parent 3fe7e53327
commit 2759ff39da

View File

@@ -153,10 +153,10 @@ export default function ModelOverlay({
}
initialItems={items}
currentValue={currentModel}
onSelect={() =>
onSelect={(selectedModel) =>
onSelect(
items?.map((m) => m.value),
currentModel,
selectedModel,
)
}
onExit={onExit}