@kwirthmagnify/kwirth-common-ai 0.5.36 → 0.5.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/front.js +5 -0
- package/package.json +1 -1
package/dist/front.js
CHANGED
|
@@ -247,6 +247,11 @@ const AiConfigProvider = (props) => {
|
|
|
247
247
|
const endpoint = providerType === 'openai-compat' ? providerEndpoint : undefined;
|
|
248
248
|
const models = await props.onLoadModels({ name: providerName, type: providerType, key: providerKey, models: [], endpoint });
|
|
249
249
|
setPendingModels(models);
|
|
250
|
+
if (selectedIndex !== null) {
|
|
251
|
+
const updated = [...providers];
|
|
252
|
+
updated[selectedIndex] = Object.assign(Object.assign({}, updated[selectedIndex]), { models });
|
|
253
|
+
setProviders(updated);
|
|
254
|
+
}
|
|
250
255
|
}
|
|
251
256
|
finally {
|
|
252
257
|
setLoadingModels(false);
|