diff --git a/app/components/Models.tsx b/app/components/Models.tsx index 2c56cae..697e32a 100644 --- a/app/components/Models.tsx +++ b/app/components/Models.tsx @@ -225,6 +225,8 @@ const ModelSection: React.FC = () => { const newModel = event.target.value; setSelectedModelDropdown(newModel); localStorage.setItem('selectedModelDropdown', newModel); // Update localStorage directly + var model = localStorage.getItem('activeSelectedAIFunction') || "Code" + modelClicked(model) }; // Determine the filtered models based on current radioSelection @@ -285,7 +287,8 @@ const ModelSection: React.FC = () => { const modelClicked = (model: string) => { localStorage.setItem('activeSelectedAIFunction', model) setActiveSelectedAIFunction(model) - const selectedAIFunction = selectedModelDropdown as keyof typeof modelList; + var modelDropdown = localStorage.getItem('selectedModelDropdown') || 'Offline Fast' + const selectedAIFunction = modelDropdown as keyof typeof modelList; localStorage.setItem("model", modelList[selectedAIFunction][model as keyof typeof modelList[typeof selectedAIFunction]]) localStorage.setItem("type", modelList[selectedAIFunction]['model_type' as keyof typeof modelList[typeof selectedAIFunction]]) }