fix: the configs page now always displays the currently selected non-local model so that other models can be selected properly

This commit is contained in:
josc146 2023-05-28 23:44:21 +08:00
parent 4e678eff6f
commit a16c85b07d

View File

@ -775,6 +775,10 @@ export const Configs: FC = observer(() => {
modelName: data.value
});
}}>
{!commonStore.modelSourceList.find(item => item.name === selectedConfig.modelParameters.modelName)?.isLocal
&& <option key={-1}
value={selectedConfig.modelParameters.modelName}>{selectedConfig.modelParameters.modelName}
</option>}
{commonStore.modelSourceList.map((modelItem, index) =>
modelItem.isLocal && <option key={index} value={modelItem.name}>{modelItem.name}</option>
)}