Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Truncate long model names in config option selector (#57808)
Vitaly Danilovc7987fabf7af
diff --git a/crates/agent_ui/src/config_options.rs b/crates/agent_ui/src/config_options.rsindex d285075a2df..03446a61c30 100644--- a/crates/agent_ui/src/config_options.rs+++ b/crates/agent_ui/src/config_options.rs@@ -364,9 +364,16 @@ impl ConfigOptionSelector {IconName::ChevronDown};+ let value_name = self.current_value_name();+ let display_name = if value_name.len() > 33 {+ format!("{}…", &value_name[..32])+ } else {+ value_name+ };+Button::new(ElementId::Name(format!("config-option-{}", option.id.0).into()),- self.current_value_name(),+ display_name,).label_size(LabelSize::Small).color(Color::Muted)