fix(coding-agent): /model shows stale scoped models (#2408)
After updating models.json, the scoped model selector still shows the old values when opened. Switching to the "all" scope, however, shows updated model definitions.
This commit is contained in:
committed by
GitHub
parent
fe535333fe
commit
970774ec3c
@@ -164,6 +164,10 @@ export class ModelSelectorComponent extends Container implements Focusable {
|
||||
}
|
||||
|
||||
this.allModels = this.sortModels(models);
|
||||
this.scopedModels = this.scopedModels.map((scoped) => {
|
||||
const refreshed = this.modelRegistry.find(scoped.model.provider, scoped.model.id);
|
||||
return refreshed ? { ...scoped, model: refreshed } : scoped;
|
||||
});
|
||||
this.scopedModelItems = this.sortModels(
|
||||
this.scopedModels.map((scoped) => ({
|
||||
provider: scoped.model.provider,
|
||||
|
||||
Reference in New Issue
Block a user