Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

acp: Filter out built-in agents from the registry (#47279)

Ben Brandtb22d129fa878
diff --git a/crates/agent_ui/src/agent_registry_ui.rs b/crates/agent_ui/src/agent_registry_ui.rs
index 3873f4e0c98..40f95d2f511 100644
--- a/crates/agent_ui/src/agent_registry_ui.rs
+++ b/crates/agent_ui/src/agent_registry_ui.rs
@@ -21,6 +21,10 @@ use workspace::{
item::{Item, ItemEvent},
};
+/// Registry IDs for built-in agents that Zed already provides first-class support for.
+/// These are filtered out of the ACP Agent Registry UI to avoid showing duplicates.
+const BUILT_IN_REGISTRY_IDS: [&str; 3] = ["claude-acp", "codex-acp", "gemini"];
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum RegistryFilter {
All,
@@ -183,6 +187,12 @@ impl AgentRegistryPage {
.iter()
.enumerate()
.filter(|(_, agent)| {
+ // Filter out built-in agents since they already appear in the main
+ // agent configuration UI and don't need to be installed from the registry.
+ if BUILT_IN_REGISTRY_IDS.contains(&agent.id.as_ref()) {
+ return false;
+ }
+
let matches_search = search.as_ref().is_none_or(|query| {
let query = query.as_str();
agent.id.as_ref().to_lowercase().contains(query)