Revert "ai: Auto select user model when there's no default" (#36932)

Reverts zed-industries/zed#36722

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-08-26 15:55:09 +02:00 committed by GitHub
parent 2c64b05ea4
commit 858ab9cc23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 122 additions and 184 deletions

View file

@ -664,7 +664,7 @@ impl Thread {
}
pub fn get_or_init_configured_model(&mut self, cx: &App) -> Option<ConfiguredModel> {
if self.configured_model.is_none() || self.messages.is_empty() {
if self.configured_model.is_none() {
self.configured_model = LanguageModelRegistry::read_global(cx).default_model();
}
self.configured_model.clone()
@ -2097,7 +2097,7 @@ impl Thread {
}
pub fn summarize(&mut self, cx: &mut Context<Self>) {
let Some(model) = LanguageModelRegistry::read_global(cx).thread_summary_model(cx) else {
let Some(model) = LanguageModelRegistry::read_global(cx).thread_summary_model() else {
println!("No thread summary model");
return;
};
@ -2416,7 +2416,7 @@ impl Thread {
}
let Some(ConfiguredModel { model, provider }) =
LanguageModelRegistry::read_global(cx).thread_summary_model(cx)
LanguageModelRegistry::read_global(cx).thread_summary_model()
else {
return;
};
@ -5410,10 +5410,13 @@ fn main() {{
}),
cx,
);
registry.set_thread_summary_model(Some(ConfiguredModel {
provider,
model: model.clone(),
}));
registry.set_thread_summary_model(
Some(ConfiguredModel {
provider,
model: model.clone(),
}),
cx,
);
})
});