mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
assistant_context: Fix thread_summary_model not getting used in Text Threads (#38859)
Closes https://github.com/zed-industries/zed/issues/37472 Release Notes: - Fixed an issue in Text Threads where it was using `default_model` even in case `thread_summary_model` was set. --------- Signed-off-by: Umesh Yadav <git@umesh.dev>
This commit is contained in:
parent
f303a461c4
commit
c627543b46
2 changed files with 7 additions and 8 deletions
|
|
@ -2669,7 +2669,7 @@ impl AssistantContext {
|
|||
}
|
||||
|
||||
pub fn summarize(&mut self, mut replace_old: bool, cx: &mut Context<Self>) {
|
||||
let Some(model) = LanguageModelRegistry::read_global(cx).default_model() else {
|
||||
let Some(model) = LanguageModelRegistry::read_global(cx).thread_summary_model() else {
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1329,13 +1329,12 @@ fn setup_context_editor_with_fake_model(
|
|||
cx.update(|cx| {
|
||||
init_test(cx);
|
||||
LanguageModelRegistry::global(cx).update(cx, |registry, cx| {
|
||||
registry.set_default_model(
|
||||
Some(ConfiguredModel {
|
||||
provider: fake_provider.clone(),
|
||||
model: fake_model.clone(),
|
||||
}),
|
||||
cx,
|
||||
)
|
||||
let configured_model = ConfiguredModel {
|
||||
provider: fake_provider.clone(),
|
||||
model: fake_model.clone(),
|
||||
};
|
||||
registry.set_default_model(Some(configured_model.clone()), cx);
|
||||
registry.set_thread_summary_model(Some(configured_model), cx);
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue