Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix an issue where provider settings were lost when switching between Ollama models (#13402)

ᴀᴍᴛᴏᴀᴇʀ7e694d1bcfc7
diff --git a/crates/assistant/src/assistant_settings.rs b/crates/assistant/src/assistant_settings.rs
index 07d87961ec8..95b3927ca6d 100644
--- a/crates/assistant/src/assistant_settings.rs
+++ b/crates/assistant/src/assistant_settings.rs
@@ -326,6 +326,14 @@ impl AssistantSettingsContent {
*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 {
LanguageModel::Cloud(model) => {
*provider = Some(AssistantProviderContent::ZedDotDev {