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:
parent
2c64b05ea4
commit
858ab9cc23
9 changed files with 122 additions and 184 deletions
|
@ -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,
|
||||
);
|
||||
})
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue