Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant_tools: Enable diff-fenced edit parser for all Gemini models (#32812)
Umesh Yadav4383fee3c19c
diff --git a/crates/assistant_tools/src/edit_agent/edit_parser.rs b/crates/assistant_tools/src/edit_agent/edit_parser.rsindex 5ba3931c56b..db58c2bf368 100644--- a/crates/assistant_tools/src/edit_agent/edit_parser.rs+++ b/crates/assistant_tools/src/edit_agent/edit_parser.rs@@ -75,7 +75,7 @@ impl FromStr for EditFormat {impl EditFormat {/// Return an optimal edit format for the language modelpub fn from_model(model: Arc<dyn LanguageModel>) -> anyhow::Result<Self> {- if model.provider_id().0 == "google" {+ if model.provider_id().0 == "google" || model.id().0.to_lowercase().contains("gemini") {Ok(EditFormat::DiffFenced)} else {Ok(EditFormat::XmlTags)