Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/features/settings/settings.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export class SettingsController {

private storedModelFor(def: (typeof PROVIDER_CATALOG)[number]): string {
const stored = this.context.globalState.get<string>(this.providerModelKey(def.id));
Comment thread
FernandoCelmer marked this conversation as resolved.
return stored && def.models.includes(stored) ? stored : def.defaultModel;
return stored || def.defaultModel;
}

private async healStaleModel(): Promise<void> {
const settings = readSettings();
const def = findProviderDef(this.activeProviderId(settings.provider));
Comment thread
FernandoCelmer marked this conversation as resolved.
if (!def || !settings.model || def.models.includes(settings.model)) {
if (!def || settings.model) {
return;
}
await updateSetting("model", def.defaultModel);
Expand Down
Loading