Skip to content

Commit

Permalink
assistant panel: Show provider name in model selector (zed-industries…
Browse files Browse the repository at this point in the history
…#15523)

With zed.dev provider becoming more popular, it helps alleviate
confusion when showing not only the model name but also the provider
name.

Release Notes:

- N/A
  • Loading branch information
mrnugget authored Jul 31, 2024
1 parent 8e6af73 commit d8f7322
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/assistant/src/assistant_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,13 @@ impl Render for ContextEditorToolbarItem {
Label::new(
LanguageModelRegistry::read_global(cx)
.active_model()
.map(|model| model.name().0)
.map(|model| {
format!(
"{}: {}",
model.provider_name().0,
model.name().0
)
})
.unwrap_or_else(|| "No model selected".into()),
)
.size(LabelSize::Small)
Expand Down

0 comments on commit d8f7322

Please sign in to comment.