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

Release Notes:

- N/A
This commit is contained in:
Ben Brandt authored and GitHub committed 2026-01-21 10:27:24 +00:00
1 parent fd20675dd7
commit 1eb4dfbd73
1 file changed
+10
+10
View File
@@ -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)