agent: Refine language model selector (#28597)

Release Notes:

- agent: Show recommended models in the agent model selector and display
the provider in the model selector's trigger.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
This commit is contained in:
Bennet Bo Fenner 2025-04-11 17:02:50 -06:00 committed by GitHub
parent dafe994eef
commit b22faf96e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 350 additions and 218 deletions

View file

@ -6,7 +6,6 @@ use client::Client;
use gpui::{
App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Global, ReadGlobal as _,
};
use icons::IconName;
use proto::{Plan, TypedEnvelope};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
@ -53,13 +52,6 @@ impl CloudModel {
}
}
pub fn icon(&self) -> Option<IconName> {
match self {
Self::Anthropic(_) => Some(IconName::AiAnthropicHosted),
_ => None,
}
}
pub fn max_token_count(&self) -> usize {
match self {
Self::Anthropic(model) => model.max_token_count(),