Fix an issue where provider settings were lost when switching between Ollama models (#13402)
Closes #13399. Release Notes: - Fixed an issue where provider settings were lost when switching between Ollama models ([#13399](https://github.com/zed-industries/zed/issues/13399)).
This commit is contained in:
parent
890443241d
commit
7e694d1bcf
1 changed files with 8 additions and 0 deletions
|
@ -326,6 +326,14 @@ impl AssistantSettingsContent {
|
||||||
*model = Some(new_model);
|
*model = Some(new_model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some(AssistantProviderContent::Ollama {
|
||||||
|
default_model: model,
|
||||||
|
..
|
||||||
|
}) => {
|
||||||
|
if let LanguageModel::Ollama(new_model) = new_model {
|
||||||
|
*model = Some(new_model);
|
||||||
|
}
|
||||||
|
}
|
||||||
provider => match new_model {
|
provider => match new_model {
|
||||||
LanguageModel::Cloud(model) => {
|
LanguageModel::Cloud(model) => {
|
||||||
*provider = Some(AssistantProviderContent::ZedDotDev {
|
*provider = Some(AssistantProviderContent::ZedDotDev {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue