diff --git a/crates/agent_servers/src/claude.rs b/crates/agent_servers/src/claude.rs index bea8cd5b18e3e74a297f695057e5a18a030d068c..f711708383fb6bdce42b08b26f0aa37ce173d9c3 100644 --- a/crates/agent_servers/src/claude.rs +++ b/crates/agent_servers/src/claude.rs @@ -9,7 +9,7 @@ use std::{any::Any, path::PathBuf}; use anyhow::{Context as _, Result}; use gpui::{App, AppContext as _, SharedString, Task}; -use project::agent_server_store::{AllAgentServersSettings, CLAUDE_CODE_NAME}; +use project::agent_server_store::{AllAgentServersSettings, CLAUDE_AGENT_NAME}; use crate::{AgentServer, AgentServerDelegate, load_proxy_env}; use acp_thread::AgentConnection; @@ -24,7 +24,7 @@ pub struct AgentServerLoginCommand { impl AgentServer for ClaudeCode { fn name(&self) -> SharedString { - "Claude Code".into() + "Claude Agent".into() } fn logo(&self) -> ui::IconName { @@ -232,8 +232,8 @@ impl AgentServer for ClaudeCode { let (command, root_dir, login) = store .update(cx, |store, cx| { let agent = store - .get_external_agent(&CLAUDE_CODE_NAME.into()) - .context("Claude Code is not registered")?; + .get_external_agent(&CLAUDE_AGENT_NAME.into()) + .context("Claude Agent is not registered")?; anyhow::Ok(agent.get_command( root_dir.as_deref(), extra_env, diff --git a/crates/agent_ui/src/acp/message_editor.rs b/crates/agent_ui/src/acp/message_editor.rs index 7c9966295483d5c0b0b5586b7d020c98db50f25f..5af85d5e7faaff6329b8976afc21b3d7fbf3ef9e 100644 --- a/crates/agent_ui/src/acp/message_editor.rs +++ b/crates/agent_ui/src/acp/message_editor.rs @@ -1688,7 +1688,7 @@ mod tests { None, prompt_capabilities.clone(), available_commands.clone(), - "Claude Code".into(), + "Claude Agent".into(), "Test", EditorMode::AutoHeight { min_lines: 1, @@ -1713,7 +1713,7 @@ mod tests { // Should fail because available_commands is empty (no commands supported) assert!(contents_result.is_err()); let error_message = contents_result.unwrap_err().to_string(); - assert!(error_message.contains("not supported by Claude Code")); + assert!(error_message.contains("not supported by Claude Agent")); assert!(error_message.contains("Available commands: none")); // Now simulate Claude providing its list of available commands (which doesn't include file) @@ -1730,7 +1730,7 @@ mod tests { assert!(contents_result.is_err()); let error_message = contents_result.unwrap_err().to_string(); - assert!(error_message.contains("not supported by Claude Code")); + assert!(error_message.contains("not supported by Claude Agent")); assert!(error_message.contains("/file")); assert!(error_message.contains("Available commands: /help")); diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index c5e68ca6008dcea3ea8245c1da4418bf32d76c53..5d38f2576c2b5a876cc2ce9642daeab1ce375dd1 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -2386,7 +2386,7 @@ impl AcpServerView { fn current_model_name(&self, cx: &App) -> SharedString { // For native agent (Zed Agent), use the specific model name (e.g., "Claude 3.5 Sonnet") - // For ACP agents, use the agent name (e.g., "Claude Code", "Gemini CLI") + // For ACP agents, use the agent name (e.g., "Claude Agent", "Gemini CLI") // This provides better clarity about what refused the request if self.as_native_connection(cx).is_some() { self.active_thread() @@ -2395,7 +2395,7 @@ impl AcpServerView { .map(|model| model.name.clone()) .unwrap_or_else(|| SharedString::from("The model")) } else { - // ACP agent - use the agent name (e.g., "Claude Code", "Gemini CLI") + // ACP agent - use the agent name (e.g., "Claude Agent", "Gemini CLI") self.agent.name() } } diff --git a/crates/agent_ui/src/acp/thread_view/active_thread.rs b/crates/agent_ui/src/acp/thread_view/active_thread.rs index 2671b0f81f66eb2b2d71fd4c62a0e2de9f208d44..daeb1f559b742038a92e96b3824044dcd7a0e2b4 100644 --- a/crates/agent_ui/src/acp/thread_view/active_thread.rs +++ b/crates/agent_ui/src/acp/thread_view/active_thread.rs @@ -6749,7 +6749,7 @@ impl AcpThreadView { fn current_model_name(&self, cx: &App) -> SharedString { // For native agent (Zed Agent), use the specific model name (e.g., "Claude 3.5 Sonnet") - // For ACP agents, use the agent name (e.g., "Claude Code", "Gemini CLI") + // For ACP agents, use the agent name (e.g., "Claude Agent", "Gemini CLI") // This provides better clarity about what refused the request if self.as_native_connection(cx).is_some() { self.model_selector @@ -6758,7 +6758,7 @@ impl AcpThreadView { .map(|model| model.name.clone()) .unwrap_or_else(|| SharedString::from("The model")) } else { - // ACP agent - use the agent name (e.g., "Claude Code", "Gemini CLI") + // ACP agent - use the agent name (e.g., "Claude Agent", "Gemini CLI") self.agent_name.clone() } } diff --git a/crates/agent_ui/src/agent_configuration.rs b/crates/agent_ui/src/agent_configuration.rs index dec56a789a6fa0a1d52da9ea981c17f66bf596f2..81de185db7c8586a0db67d8da49d6f2dc59d2e8e 100644 --- a/crates/agent_ui/src/agent_configuration.rs +++ b/crates/agent_ui/src/agent_configuration.rs @@ -29,7 +29,7 @@ use language_models::AllLanguageModelSettings; use notifications::status_toast::{StatusToast, ToastIcon}; use project::{ agent_server_store::{ - AgentServerStore, CLAUDE_CODE_NAME, CODEX_NAME, ExternalAgentServerName, + AgentServerStore, CLAUDE_AGENT_NAME, CODEX_NAME, ExternalAgentServerName, ExternalAgentSource, GEMINI_NAME, }, context_server_store::{ContextServerConfiguration, ContextServerStatus, ContextServerStore}, @@ -942,7 +942,7 @@ impl AgentConfiguration { let user_defined_agents = agent_server_store .external_agents() .filter(|name| { - name.0 != GEMINI_NAME && name.0 != CLAUDE_CODE_NAME && name.0 != CODEX_NAME + name.0 != GEMINI_NAME && name.0 != CLAUDE_AGENT_NAME && name.0 != CODEX_NAME }) .cloned() .collect::>(); @@ -1056,8 +1056,8 @@ impl AgentConfiguration { .gap_2() .child(self.render_agent_server( AgentIcon::Name(IconName::AiClaude), - "Claude Code", - "Claude Code", + "Claude Agent", + "Claude Agent", ExternalAgentSource::Builtin, cx, )) diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 3010bff352314e2a98a16bf7976c13bb6996e5f1..0ce6bd16a8fff708e594417f8dbd0bff45b8b0f7 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -7,12 +7,12 @@ use agent_servers::AgentServer; use db::kvp::{Dismissable, KEY_VALUE_STORE}; use project::{ ExternalAgentServerName, - agent_server_store::{CLAUDE_CODE_NAME, CODEX_NAME, GEMINI_NAME}, + agent_server_store::{CLAUDE_AGENT_NAME, CODEX_NAME, GEMINI_NAME}, }; use serde::{Deserialize, Serialize}; use settings::{LanguageModelProviderSetting, LanguageModelSelection}; -use zed_actions::agent::{OpenClaudeCodeOnboardingModal, ReauthenticateAgent}; +use zed_actions::agent::{OpenClaudeAgentOnboardingModal, ReauthenticateAgent}; use crate::ManageProfiles; use crate::ui::{AcpOnboardingModal, ClaudeCodeOnboardingModal}; @@ -195,9 +195,11 @@ pub fn init(cx: &mut App) { .register_action(|workspace, _: &OpenAcpOnboardingModal, window, cx| { AcpOnboardingModal::toggle(workspace, window, cx) }) - .register_action(|workspace, _: &OpenClaudeCodeOnboardingModal, window, cx| { - ClaudeCodeOnboardingModal::toggle(workspace, window, cx) - }) + .register_action( + |workspace, _: &OpenClaudeAgentOnboardingModal, window, cx| { + ClaudeCodeOnboardingModal::toggle(workspace, window, cx) + }, + ) .register_action(|_workspace, _: &ResetOnboarding, window, cx| { window.dispatch_action(workspace::RestoreBanner.boxed_clone(), cx); window.refresh(); @@ -271,7 +273,7 @@ pub enum AgentType { NativeAgent, TextThread, Gemini, - ClaudeCode, + ClaudeAgent, Codex, Custom { name: SharedString, @@ -283,7 +285,7 @@ impl AgentType { match self { Self::NativeAgent | Self::TextThread => "Zed Agent".into(), Self::Gemini => "Gemini CLI".into(), - Self::ClaudeCode => "Claude Code".into(), + Self::ClaudeAgent => "Claude Agent".into(), Self::Codex => "Codex".into(), Self::Custom { name, .. } => name.into(), } @@ -293,7 +295,7 @@ impl AgentType { match self { Self::NativeAgent | Self::TextThread => None, Self::Gemini => Some(IconName::AiGemini), - Self::ClaudeCode => Some(IconName::AiClaude), + Self::ClaudeAgent => Some(IconName::AiClaude), Self::Codex => Some(IconName::AiOpenAi), Self::Custom { .. } => Some(IconName::Sparkle), } @@ -304,7 +306,7 @@ impl From for AgentType { fn from(value: ExternalAgent) -> Self { match value { ExternalAgent::Gemini => Self::Gemini, - ExternalAgent::ClaudeCode => Self::ClaudeCode, + ExternalAgent::ClaudeCode => Self::ClaudeAgent, ExternalAgent::Codex => Self::Codex, ExternalAgent::Custom { name } => Self::Custom { name }, ExternalAgent::NativeAgent => Self::NativeAgent, @@ -937,7 +939,7 @@ impl AgentPanel { AgentType::NativeAgent => Some(HistoryKind::AgentThreads), AgentType::TextThread => Some(HistoryKind::TextThreads), AgentType::Gemini - | AgentType::ClaudeCode + | AgentType::ClaudeAgent | AgentType::Codex | AgentType::Custom { .. } => { if self.acp_history.read(cx).has_session_list() { @@ -1577,7 +1579,7 @@ impl AgentPanel { match &self.selected_agent { AgentType::NativeAgent => Some(ExternalAgent::NativeAgent), AgentType::Gemini => Some(ExternalAgent::Gemini), - AgentType::ClaudeCode => Some(ExternalAgent::ClaudeCode), + AgentType::ClaudeAgent => Some(ExternalAgent::ClaudeCode), AgentType::Codex => Some(ExternalAgent::Codex), AgentType::Custom { name } => Some(ExternalAgent::Custom { name: name.clone() }), AgentType::TextThread => None, @@ -1644,8 +1646,8 @@ impl AgentPanel { AgentType::Gemini => { self.external_thread(Some(crate::ExternalAgent::Gemini), None, None, window, cx) } - AgentType::ClaudeCode => { - self.selected_agent = AgentType::ClaudeCode; + AgentType::ClaudeAgent => { + self.selected_agent = AgentType::ClaudeAgent; self.serialize(cx); self.external_thread( Some(crate::ExternalAgent::ClaudeCode), @@ -2320,8 +2322,8 @@ impl AgentPanel { .separator() .header("External Agents") .item( - ContextMenuEntry::new("Claude Code") - .when(is_agent_selected(AgentType::ClaudeCode), |this| { + ContextMenuEntry::new("Claude Agent") + .when(is_agent_selected(AgentType::ClaudeAgent), |this| { this.action(Box::new(NewExternalAgentThread { agent: None, })) @@ -2339,7 +2341,7 @@ impl AgentPanel { { panel.update(cx, |panel, cx| { panel.new_agent_thread( - AgentType::ClaudeCode, + AgentType::ClaudeAgent, window, cx, ); @@ -2418,7 +2420,7 @@ impl AgentPanel { .external_agents() .filter(|name| { name.0 != GEMINI_NAME - && name.0 != CLAUDE_CODE_NAME + && name.0 != CLAUDE_AGENT_NAME && name.0 != CODEX_NAME }) .cloned() diff --git a/crates/agent_ui/src/agent_registry_ui.rs b/crates/agent_ui/src/agent_registry_ui.rs index 0651ec32bfc3e00504e42d19aed66b7ea33f5bdd..6ca45e87085fcc9ca233538f5f03ef8fe0ea5dd5 100644 --- a/crates/agent_ui/src/agent_registry_ui.rs +++ b/crates/agent_ui/src/agent_registry_ui.rs @@ -55,7 +55,10 @@ fn keywords_by_agent_feature() -> &'static BTreeMap self.render_feature_upsell_banner( - "Claude Code support is built-in to Zed!".into(), - "https://zed.dev/docs/ai/external-agents#claude-code".into(), + "Claude Agent support is built-in to Zed!".into(), + "https://zed.dev/docs/ai/external-agents#claude-agent".into(), ), BuiltInAgent::Codex => self.render_feature_upsell_banner( "Codex CLI support is built-in to Zed!".into(), diff --git a/crates/agent_ui/src/ui.rs b/crates/agent_ui/src/ui.rs index 21ca391b8e55353c7138d9bc7fc403080bdbe6b9..5e0dd5ff5b49b9ba0cfda2d4cb9a5d7f4d43e473 100644 --- a/crates/agent_ui/src/ui.rs +++ b/crates/agent_ui/src/ui.rs @@ -1,6 +1,6 @@ mod acp_onboarding_modal; mod agent_notification; -mod claude_code_onboarding_modal; +mod claude_agent_onboarding_modal; mod end_trial_upsell; mod hold_for_default; mod mention_crease; @@ -9,7 +9,7 @@ mod onboarding_modal; pub use acp_onboarding_modal::*; pub use agent_notification::*; -pub use claude_code_onboarding_modal::*; +pub use claude_agent_onboarding_modal::*; pub use end_trial_upsell::*; pub use hold_for_default::*; pub use mention_crease::*; diff --git a/crates/agent_ui/src/ui/claude_code_onboarding_modal.rs b/crates/agent_ui/src/ui/claude_agent_onboarding_modal.rs similarity index 92% rename from crates/agent_ui/src/ui/claude_code_onboarding_modal.rs rename to crates/agent_ui/src/ui/claude_agent_onboarding_modal.rs index a8f007666d8957a7195fdf36b612b578b16f543c..5a90d430295c921ea6e11f14921694990cbbc27c 100644 --- a/crates/agent_ui/src/ui/claude_code_onboarding_modal.rs +++ b/crates/agent_ui/src/ui/claude_agent_onboarding_modal.rs @@ -8,7 +8,7 @@ use workspace::{ModalView, Workspace}; use crate::agent_panel::{AgentPanel, AgentType}; -macro_rules! claude_code_onboarding_event { +macro_rules! claude_agent_onboarding_event { ($name:expr) => { telemetry::event!($name, source = "ACP Claude Code Onboarding"); }; @@ -37,21 +37,21 @@ impl ClaudeCodeOnboardingModal { if let Some(panel) = workspace.panel::(cx) { panel.update(cx, |panel, cx| { - panel.new_agent_thread(AgentType::ClaudeCode, window, cx); + panel.new_agent_thread(AgentType::ClaudeAgent, window, cx); }); } }); cx.emit(DismissEvent); - claude_code_onboarding_event!("Open Panel Clicked"); + claude_agent_onboarding_event!("Open Panel Clicked"); } fn view_docs(&mut self, _: &ClickEvent, _: &mut Window, cx: &mut Context) { cx.open_url(&zed_urls::external_agents_docs(cx)); cx.notify(); - claude_code_onboarding_event!("Documentation Link Clicked"); + claude_agent_onboarding_event!("Documentation Link Clicked"); } fn cancel(&mut self, _: &menu::Cancel, _: &mut Window, cx: &mut Context) { @@ -172,7 +172,7 @@ impl Render for ClaudeCodeOnboardingModal { .size(IconSize::Small) .color(Color::Muted), ) - .child(Label::new("New Claude Code Thread").size(LabelSize::Small)), + .child(Label::new("New Claude Agent Thread").size(LabelSize::Small)), ) .child(illustration_element( IconName::Stop, @@ -190,11 +190,11 @@ impl Render for ClaudeCodeOnboardingModal { .size(LabelSize::Small) .color(Color::Muted), ) - .child(Headline::new("Claude Code: Natively in Zed").size(HeadlineSize::Large)); + .child(Headline::new("Claude Agent: Natively in Zed").size(HeadlineSize::Large)); - let copy = "Powered by the Agent Client Protocol, you can now run Claude Code as\na first-class citizen in Zed's agent panel."; + let copy = "Powered by the Agent Client Protocol, you can now run Claude Agent as\na first-class citizen in Zed's agent panel."; - let open_panel_button = Button::new("open-panel", "Start with Claude Code") + let open_panel_button = Button::new("open-panel", "Start with Claude Agent") .icon_size(IconSize::Indicator) .style(ButtonStyle::Tinted(TintColor::Accent)) .full_width() @@ -210,7 +210,7 @@ impl Render for ClaudeCodeOnboardingModal { let close_button = h_flex().absolute().top_2().right_2().child( IconButton::new("cancel", IconName::Close).on_click(cx.listener( |_, _: &ClickEvent, _window, cx| { - claude_code_onboarding_event!("Canceled", trigger = "X click"); + claude_agent_onboarding_event!("Canceled", trigger = "X click"); cx.emit(DismissEvent); }, )), @@ -227,7 +227,7 @@ impl Render for ClaudeCodeOnboardingModal { .overflow_hidden() .on_action(cx.listener(Self::cancel)) .on_action(cx.listener(|_, _: &menu::Cancel, _window, cx| { - claude_code_onboarding_event!("Canceled", trigger = "Action"); + claude_agent_onboarding_event!("Canceled", trigger = "Action"); cx.emit(DismissEvent); })) .on_any_mouse_down(cx.listener(|this, _: &MouseDownEvent, window, cx| { diff --git a/crates/ai_onboarding/src/plan_definitions.rs b/crates/ai_onboarding/src/plan_definitions.rs index cc29b9314b391af8573e17f9e474b47ea05d31c3..6d46a598c385b300fa579c69b0c58cfe51610c68 100644 --- a/crates/ai_onboarding/src/plan_definitions.rs +++ b/crates/ai_onboarding/src/plan_definitions.rs @@ -14,7 +14,7 @@ impl PlanDefinitions { "Unlimited prompts with your AI API keys", )) .child(ListBulletItem::new( - "Unlimited use of external agents like Claude Code", + "Unlimited use of external agents like Claude Agent", )) } diff --git a/crates/extensions_ui/src/extensions_ui.rs b/crates/extensions_ui/src/extensions_ui.rs index 7c77579c9172e24680e8398645544cd1099dfaff..1d805cec0c2d4433225ec5d120c3af400eb405c0 100644 --- a/crates/extensions_ui/src/extensions_ui.rs +++ b/crates/extensions_ui/src/extensions_ui.rs @@ -248,7 +248,10 @@ fn keywords_by_feature() -> &'static BTreeMap> { static KEYWORDS_BY_FEATURE: OnceLock>> = OnceLock::new(); KEYWORDS_BY_FEATURE.get_or_init(|| { BTreeMap::from_iter([ - (Feature::AgentClaude, vec!["claude", "claude code"]), + ( + Feature::AgentClaude, + vec!["claude", "claude code", "claude agent"], + ), (Feature::AgentCodex, vec!["codex", "codex cli"]), (Feature::AgentGemini, vec!["gemini", "gemini cli"]), ( @@ -1567,8 +1570,8 @@ impl ExtensionsPage { for feature in &self.upsells { let banner = match feature { Feature::AgentClaude => self.render_feature_upsell_banner( - "Claude Code support is built-in to Zed!".into(), - "https://zed.dev/docs/ai/external-agents#claude-code".into(), + "Claude Agent support is built-in to Zed!".into(), + "https://zed.dev/docs/ai/external-agents#claude-agent".into(), false, cx, ), diff --git a/crates/nc/src/nc.rs b/crates/nc/src/nc.rs index 2808bdc3d6a262845210c32880c83565b69a9391..d1849e236109f95826539b063cd4844643ba2f38 100644 --- a/crates/nc/src/nc.rs +++ b/crates/nc/src/nc.rs @@ -3,11 +3,6 @@ use anyhow::Result; #[cfg(windows)] pub fn main(_socket: &str) -> Result<()> { // It looks like we can't get an async stdio stream on Windows from smol. - // - // We decided to merge this with a panic on Windows since this is only used - // by the experimental Claude Code Agent Server. - // - // We're tracking this internally, and we will address it before shipping the integration. panic!("--nc isn't yet supported on Windows"); } diff --git a/crates/project/src/agent_server_store.rs b/crates/project/src/agent_server_store.rs index 3ebb9f1143483d7914b35fbe88ce171e741fe86a..7d0a6bfb45997e81642a49f510831c65b4e4229d 100644 --- a/crates/project/src/agent_server_store.rs +++ b/crates/project/src/agent_server_store.rs @@ -460,7 +460,7 @@ impl AgentServerStore { ), ); self.external_agents.insert( - CLAUDE_CODE_NAME.into(), + CLAUDE_AGENT_NAME.into(), ExternalAgentEntry::new( Box::new(LocalClaudeCode { fs: fs.clone(), @@ -677,12 +677,12 @@ impl AgentServerStore { // will have them. let external_agents: [(ExternalAgentServerName, ExternalAgentEntry); 3] = [ ( - CLAUDE_CODE_NAME.into(), + CLAUDE_AGENT_NAME.into(), ExternalAgentEntry::new( Box::new(RemoteExternalAgentServer { project_id, upstream_client: upstream_client.clone(), - name: CLAUDE_CODE_NAME.into(), + name: CLAUDE_AGENT_NAME.into(), status_tx: None, new_version_available_tx: None, }) as Box, @@ -909,7 +909,7 @@ impl AgentServerStore { .map(|name| { let agent_name = ExternalAgentServerName(name.clone().into()); let fallback_source = - if name == GEMINI_NAME || name == CLAUDE_CODE_NAME || name == CODEX_NAME { + if name == GEMINI_NAME || name == CLAUDE_AGENT_NAME || name == CODEX_NAME { ExternalAgentSource::Builtin } else { ExternalAgentSource::Custom @@ -1449,26 +1449,8 @@ impl ExternalAgentServer for LocalClaudeCode { ) .await?; command.env = Some(env); - let login = command - .args - .first() - .and_then(|path| { - path.strip_suffix("/@zed-industries/claude-code-acp/dist/index.js") - }) - .map(|path_prefix| task::SpawnInTerminal { - command: Some(command.path.to_string_lossy().into_owned()), - args: vec![ - Path::new(path_prefix) - .join("@anthropic-ai/claude-agent-sdk/cli.js") - .to_string_lossy() - .to_string(), - "/login".into(), - ], - env: command.env.clone().unwrap_or_default(), - label: "claude /login".into(), - ..Default::default() - }); - (command, login) + + (command, None) }; command.env.get_or_insert_default().extend(extra_env); @@ -2229,7 +2211,7 @@ impl ExternalAgentServer for LocalCustomAgent { } pub const GEMINI_NAME: &'static str = "gemini"; -pub const CLAUDE_CODE_NAME: &'static str = "claude"; +pub const CLAUDE_AGENT_NAME: &'static str = "claude"; pub const CODEX_NAME: &'static str = "codex"; #[derive(Default, Clone, JsonSchema, Debug, PartialEq, RegisterSetting)] diff --git a/crates/settings_content/src/agent.rs b/crates/settings_content/src/agent.rs index c592c13c133fe264b254db44250b37dcf520a504..525cb624b4942b14987a065c3a17352a4c5a895f 100644 --- a/crates/settings_content/src/agent.rs +++ b/crates/settings_content/src/agent.rs @@ -119,7 +119,7 @@ pub struct AgentSettingsContent { /// require confirmation. /// /// The global `default` applies when no tool-specific rules match. - /// For external agent servers (e.g. Claude Code) that define their own + /// For external agent servers (e.g. Claude Agent) that define their own /// permission modes, "deny" and "confirm" still take precedence — the /// external agent's permission system is only used when Zed would allow /// the action. Per-tool regex patterns (`always_allow`, `always_deny`, diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index ff14c6fa25bfa3b52bfdd34433548431a042bc2b..9099c303b6afa32a269870bde52f79fd9661d2e7 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -346,9 +346,9 @@ impl TitleBar { OnboardingBanner::new( "ACP Claude Code Onboarding", IconName::AiClaude, - "Claude Code", + "Claude Agent", Some("Introducing:".into()), - zed_actions::agent::OpenClaudeCodeOnboardingModal.boxed_clone(), + zed_actions::agent::OpenClaudeAgentOnboardingModal.boxed_clone(), cx, ) // When updating this to a non-AI feature release, remove this line. diff --git a/crates/zed_actions/src/lib.rs b/crates/zed_actions/src/lib.rs index 874cb569a2d43065e091fe94cbe9575d0e24d8ba..79ed66461853cb6840b0adc1bebc02545b73a741 100644 --- a/crates/zed_actions/src/lib.rs +++ b/crates/zed_actions/src/lib.rs @@ -434,8 +434,8 @@ pub mod agent { OpenOnboardingModal, /// Opens the ACP onboarding modal. OpenAcpOnboardingModal, - /// Opens the Claude Code onboarding modal. - OpenClaudeCodeOnboardingModal, + /// Opens the Claude Agent onboarding modal. + OpenClaudeAgentOnboardingModal, /// Resets the agent onboarding state. ResetOnboarding, /// Starts a chat conversation with the agent. diff --git a/docs/src/ai/agent-panel.md b/docs/src/ai/agent-panel.md index 1f0e2b34f2c86f4fe4d269c42c77dca32cb94a8a..23bd50be35d93587fa6252923e7a137082c4360d 100644 --- a/docs/src/ai/agent-panel.md +++ b/docs/src/ai/agent-panel.md @@ -11,7 +11,7 @@ You can do that by: 1. [subscribing to our Pro plan](https://zed.dev/pricing), so you have access to our hosted models 2. [using your own API keys](./llm-providers.md#use-your-own-keys), either from model providers like Anthropic or model gateways like OpenRouter. -3. using an [external agent](./external-agents.md) like [Gemini CLI](./external-agents.md#gemini-cli) or [Claude Code](./external-agents.md#claude-code) +3. using an [external agent](./external-agents.md) like [Gemini CLI](./external-agents.md#gemini-cli) or [Claude Agent](./external-agents.md#claude-agent) ## Overview {#overview} @@ -19,7 +19,8 @@ With an LLM provider or external agent configured, type in the message editor an Responses stream in with indicators showing [which tools](./tools.md) the model is using. The sections below cover what you can do from here. -> Note that for external agents, like [Gemini CLI](./external-agents.md#gemini-cli) or [Claude Code](./external-agents.md#claude-code), some of the features outlined below may _not_ be supported—for example, _restoring threads from history_, _checkpoints_, _token usage display_, and others. Their availability varies depending on the agent. +> Note that for external agents, like [Gemini CLI](./external-agents.md#gemini-cli) or [Claude Agent](./external-agents.md#claude-agent), some of the features outlined below may _not_ be supported—for example, _restoring threads from history_, _checkpoints_, _token usage display_, and others. +> Their availability varies depending on the agent. ### Creating New Threads {#new-thread} diff --git a/docs/src/ai/configuration.md b/docs/src/ai/configuration.md index 8b213c3c0ee438fdb94fb805ff611f0997ab1e6f..99c54ebf8b8565696ff6cad0ec3e47ffe7f44e73 100644 --- a/docs/src/ai/configuration.md +++ b/docs/src/ai/configuration.md @@ -4,8 +4,8 @@ When using AI in Zed, you can configure multiple dimensions: 1. Which LLM providers you can use - Zed's hosted models, which require [authentication](../authentication.md) and [subscription](./subscription.md) - - [Using your own API keys](./llm-providers.md), which do not - - Using [external agents like Claude Code](./external-agents.md), which do not + - [Using your own API keys](./llm-providers.md), which do not require the above + - Using [external agents like Claude Agent](./external-agents.md), which also do not require the above 2. [Model parameters and usage](./agent-settings.md#model-settings) 3. [Interactions with the Agent Panel](./agent-settings.md#agent-panel-settings) diff --git a/docs/src/ai/external-agents.md b/docs/src/ai/external-agents.md index a256e86a25182fea474271f7e5e1eca35cf8aa2c..bf86781b8ce636f2053aac9095052587c6d7d0bc 100644 --- a/docs/src/ai/external-agents.md +++ b/docs/src/ai/external-agents.md @@ -1,8 +1,13 @@ +--- +title: Use Claude Agent, Gemini CLI, and Codex in Zed +description: Run Claude Agent, Gemini CLI, Codex, and other AI coding agents directly in Zed via the Agent Client Protocol (ACP). +--- + # External Agents Zed supports many external agents, including CLI-based ones, through the [Agent Client Protocol (ACP)](https://agentclientprotocol.com). -Zed supports [Gemini CLI](https://github.com/google-gemini/gemini-cli) (the reference ACP implementation), [Claude Code](https://www.anthropic.com/claude-code), [Codex](https://developers.openai.com/codex), [GitHub Copilot](https://github.com/github/copilot-language-server-release), and [additional agents](#add-more-agents) you can configure. +Zed supports [Gemini CLI](https://github.com/google-gemini/gemini-cli) (the reference ACP implementation), [Claude Agent](https://platform.claude.com/docs/en/agent-sdk/overview), [Codex](https://developers.openai.com/codex), [GitHub Copilot](https://github.com/github/copilot-language-server-release), and [additional agents](#add-more-agents) you can configure. > Note that Zed's interaction with external agents is strictly UI-based; the billing, legal, and terms arrangement is directly between you and the agent provider. > Zed does not charge for use of external agents, and our [zero-data retention agreements/privacy guarantees](./ai-improvement.md) are **_only_** applicable for Zed's hosted models. @@ -68,14 +73,14 @@ Gemini CLI supports the same workflows as Zed's first-party agent: code generati > Some agent panel features are not yet available with Gemini CLI: editing past messages, resuming threads from history, and checkpointing. -## Claude Code +## Claude Agent -Similar to Gemini CLI, you can also run [Claude Code](https://www.anthropic.com/claude-code) directly via Zed's [agent panel](./agent-panel.md). -Under the hood, Zed runs Claude Code and communicate to it over ACP, through [a dedicated adapter](https://github.com/zed-industries/claude-code-acp). +Similar to Gemini CLI, you can also run [Claude Agent](https://platform.claude.com/docs/en/agent-sdk/overview) directly via Zed's [agent panel](./agent-panel.md). +Under the hood, Zed runs the Claude Agent SDK, which runs Claude Code under the hood, and communicates to it over ACP, through [a dedicated adapter](https://github.com/zed-industries/claude-code-acp). ### Getting Started -Open the agent panel with {#kb agent::ToggleFocus}, and then use the `+` button in the top right to start a new Claude Code thread. +Open the agent panel with {#kb agent::ToggleFocus}, and then use the `+` button in the top right to start a new Claude Agent thread. If you'd like to bind this to a keyboard shortcut, you can do so by editing your `keymap.json` file via the `zed: open keymap file` command to include: @@ -83,7 +88,7 @@ If you'd like to bind this to a keyboard shortcut, you can do so by editing your [ { "bindings": { - "cmd-alt-c": ["agent::NewExternalAgentThread", { "agent": "claude_code" }] + "cmd-alt-c": ["agent::NewExternalAgentThread", { "agent": "claude" }] } } ] @@ -91,18 +96,18 @@ If you'd like to bind this to a keyboard shortcut, you can do so by editing your ### Authentication -As of version `0.202.7`, authentication to Zed's Claude Code installation is decoupled entirely from Zed's agent. -That is to say, an Anthropic API key added via the [Zed Agent's settings](./llm-providers.md#anthropic) will _not_ be utilized by Claude Code for authentication and billing. +As of version `0.202.7`, authentication to Zed's Claude Agent installation is decoupled entirely from Zed's agent. +That is to say, an Anthropic API key added via the [Zed Agent's settings](./llm-providers.md#anthropic) will _not_ be utilized by Claude Agent for authentication and billing. -To ensure you're using your billing method of choice, [open a new Claude Code thread](./agent-panel.md#new-thread). +To ensure you're using your billing method of choice, [open a new Claude Agent thread](./agent-panel.md#new-thread). Then, run `/login`, and authenticate either via API key, or via `Log in with Claude Code` to use a Claude Pro/Max subscription. #### Installation -The first time you create a Claude Code thread, Zed will install [@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp). +The first time you create a Claude Agent thread, Zed will install [@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp). This installation is only available to Zed and is kept up to date as you use the agent. -Zed will always use this managed version of the Claude Code adapter, which includes a vendored version of the Claude Code CLI, even if you have it installed globally. +Zed will always use this managed version of the Claude Agent adapter, which includes a vendored version of the Claude Code CLI, even if you have it installed globally. If you want to override the executable used by the adapter, you can set the `CLAUDE_CODE_EXECUTABLE` environment variable in your settings to the path of your preferred executable. @@ -120,22 +125,22 @@ If you want to override the executable used by the adapter, you can set the `CLA ### Usage -Claude Code supports the same workflows as Zed's first-party agent. Add context by @-mentioning files, recent threads, diagnostics, or symbols. +Claude Agent supports the same workflows as Zed's first-party agent. Add context by @-mentioning files, recent threads, diagnostics, or symbols. -In complement to talking to it [over ACP](https://agentclientprotocol.com), Zed relies on the [Claude Code SDK](https://docs.anthropic.com/en/docs/claude-code/sdk/sdk-overview) to support some of its specific features. +In complement to talking to it [over ACP](https://agentclientprotocol.com), Zed relies on the [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) to support some of its specific features. However, the SDK doesn't yet expose everything needed to fully support all of them: - Slash Commands: A subset of [built-in commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands#built-in-slash-commands) are supported, while [custom slash commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands#custom-slash-commands) are fully supported. - [Subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents) are supported. - [Hooks](https://docs.anthropic.com/en/docs/claude-code/hooks-guide) are currently _not_ supported. -> Some [agent panel](./agent-panel.md) features are not yet available with Claude Code: editing past messages, resuming threads from history, and checkpointing. +> Some [agent panel](./agent-panel.md) features are not yet available with Claude Agent: editing past messages, resuming threads from history, and checkpointing. #### CLAUDE.md -Claude Code in Zed will automatically use any `CLAUDE.md` file found in your project root, project subdirectories, or root `.claude` directory. +Claude Agent in Zed will automatically use any `CLAUDE.md` file found in your project root, project subdirectories, or root `.claude` directory. -If you don't have a `CLAUDE.md` file, you can ask Claude Code to create one for you through the `init` slash command. +If you don't have a `CLAUDE.md` file, you can ask Claude Agent to create one for you through the `init` slash command. ## Codex CLI @@ -251,9 +256,9 @@ This lets you see the messages being sent and received between Zed and the agent ![The debug view for ACP logs.](https://zed.dev/img/acp/acp-logs.webp) -It's helpful to attach data from this view if you're opening issues about problems with external agents like Claude Code, Codex, OpenCode, etc. +It's helpful to attach data from this view if you're opening issues about problems with external agents like Claude Agent, Codex, OpenCode, etc. ## MCP Servers Note that for external agents, access to MCP servers [installed from Zed](./mcp.md) may vary depending on the ACP implementation. -For example, Claude Code and Codex both support it, but Gemini CLI does not yet. +For example, Claude Agent and Codex both support it, but Gemini CLI does not yet. diff --git a/docs/src/ai/mcp.md b/docs/src/ai/mcp.md index fa5bc37b08fcf25adee426106685aa28b032f15d..6e2e2fba5606112866e5951fa1aec051a5eaa434 100644 --- a/docs/src/ai/mcp.md +++ b/docs/src/ai/mcp.md @@ -152,5 +152,5 @@ See [Per-tool Permission Rules](./agent-settings.md#per-tool-permission-rules) a Note that for [external agents](./external-agents.md) connected through the [Agent Client Protocol](https://agentclientprotocol.com/), access to MCP servers installed from Zed may vary depending on the ACP agent implementation. -Regarding the built-in ones, Claude Code and Codex both support it, and Gemini CLI does not yet. +Regarding the built-in ones, Claude Agent and Codex both support it, and Gemini CLI does not yet. In the meantime, learn how to add MCP server support to Gemini CLI through [their documentation](https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#using-mcp-servers). diff --git a/docs/src/ai/overview.md b/docs/src/ai/overview.md index 77906fc49c5962080db05fc3281652d2054b5e89..a93eeccf627b9d03e9e01028d9a7139d541048ce 100644 --- a/docs/src/ai/overview.md +++ b/docs/src/ai/overview.md @@ -2,12 +2,37 @@ Zed integrates AI throughout the editor: agentic coding, inline transformations, edit prediction, and direct model conversations. -## Setting Up AI +## How Zed approaches AI -- [Configuration](./configuration.md): Connect to Anthropic, OpenAI, Ollama, Google AI, or other LLM providers. +Zed's AI features run inside a native, GPU-accelerated application built in Rust. There is no Electron layer between you and the model output. + +- **Open source.** The editor and all AI features are [open source](https://github.com/zed-industries/zed). You can read how AI is implemented, how data flows to providers, and how tool calls execute. +- **Multi-model.** Use Zed's hosted models or [bring your own API keys](./llm-providers.md) from Anthropic, OpenAI, Google, Ollama, and 8+ other providers. Run local models, connect to cloud APIs, or mix both. Switch models per task. +- **External agents.** Run Claude Agent, Gemini CLI, Codex, and other CLI-based agents directly in Zed through the [Agent Client Protocol](https://zed.dev/acp). See [External Agents](./external-agents.md). +- **Privacy by default.** AI data sharing is opt-in. When you use your own API keys, Zed maintains zero-data retention agreements with providers. See [Privacy and Security](./privacy-and-security.md). + +## Agentic editing + +The [Agent Panel](./agent-panel.md) is where you work with AI agents. Agents can read files, edit code, run terminal commands, search the web, and access diagnostics through [built-in tools](./tools.md). + +You can extend agents with additional tools through [MCP servers](./mcp.md), control what they can access with [tool permissions](./tool-permissions.md), and shape their behavior with [rules](./rules.md). + +The [Inline Assistant](./inline-assistant.md) works differently: select code or a terminal command, describe what you want, and the model rewrites the selection in place. It works with multiple cursors. -- [External Agents](./external-agents.md): Run Claude Code, Codex, Aider, or other external agents inside Zed. +## Code completions +[Edit Prediction](./edit-prediction.md) provides AI code completions on every keystroke. Each keypress sends a request to the prediction provider, which returns single or multi-line suggestions you accept with `tab`. + +The default provider is Zeta, Zed's open-source model trained on open data. You can also use GitHub Copilot, Supermaven, or Codestral. + +## Text threads + +[Text Threads](./text-threads.md) are conversations with models inside any buffer. They work like a regular editor with your keybindings, multiple cursors, and standard editing features. Content is organized into message blocks with roles (You, Assistant, System). + +## Getting started + +- [Configuration](./configuration.md): Connect to Anthropic, OpenAI, Ollama, Google AI, or other LLM providers. +- [External Agents](./external-agents.md): Run Claude Agent, Codex, Aider, or other external agents inside Zed. - [Subscription](./subscription.md): Zed's hosted models and billing. - [Privacy and Security](./privacy-and-security.md): How Zed handles data when using AI features. diff --git a/docs/src/migrate/intellij.md b/docs/src/migrate/intellij.md index 3534cecaebaaeda24432e294664b61882fbca637..14b245879e4c0e982706ec7ca43967bff6227166 100644 --- a/docs/src/migrate/intellij.md +++ b/docs/src/migrate/intellij.md @@ -311,7 +311,7 @@ To use other AI models in Zed, you have several options: - Use Zed's hosted models, with higher rate limits. Requires [authentication](https://zed.dev/docs/accounts.html) and subscription to [Zed Pro](https://zed.dev/docs/ai/subscription.html). - Bring your own [API keys](https://zed.dev/docs/ai/llm-providers.html), no authentication needed -- Use [external agents like Claude Code](https://zed.dev/docs/ai/external-agents.html) +- Use [external agents like Claude Agent](https://zed.dev/docs/ai/external-agents.html) ## Advanced Config and Productivity Tweaks diff --git a/docs/src/migrate/pycharm.md b/docs/src/migrate/pycharm.md index 438442caf791fb47b822225481b2b0314b37079d..e633e32bd7ec1a5b642c9d2ffe8bc68236bd1a7b 100644 --- a/docs/src/migrate/pycharm.md +++ b/docs/src/migrate/pycharm.md @@ -379,7 +379,7 @@ To use other AI models in Zed, you have several options: - Use Zed's hosted models, with higher rate limits. Requires [authentication](https://zed.dev/docs/accounts.html) and subscription to [Zed Pro](https://zed.dev/docs/ai/subscription.html). - Bring your own [API keys](https://zed.dev/docs/ai/llm-providers.html), no authentication needed -- Use [external agents like Claude Code](https://zed.dev/docs/ai/external-agents.html) +- Use [external agents like Claude Agent](https://zed.dev/docs/ai/external-agents.html) ## Advanced Config and Productivity Tweaks diff --git a/docs/src/migrate/rustrover.md b/docs/src/migrate/rustrover.md index cb3038717528ea468c92a57dc780e44f4710a986..c9edac687fa239a8a5f3eb3c16bfbc53e81d7e7b 100644 --- a/docs/src/migrate/rustrover.md +++ b/docs/src/migrate/rustrover.md @@ -402,7 +402,7 @@ To use other AI models in Zed, you have several options: - Use Zed's hosted models, with higher rate limits. Requires [authentication](https://zed.dev/docs/accounts.html) and subscription to [Zed Pro](https://zed.dev/docs/ai/subscription.html). - Bring your own [API keys](https://zed.dev/docs/ai/llm-providers.html), no authentication needed -- Use [external agents like Claude Code](https://zed.dev/docs/ai/external-agents.html) +- Use [external agents like Claude Agent](https://zed.dev/docs/ai/external-agents.html) ## Advanced Config and Productivity Tweaks diff --git a/docs/src/migrate/vs-code.md b/docs/src/migrate/vs-code.md index dd7419e3ff31dc2892c19b68bf91b340eab24576..c95538b4ccdb25e76d8f2e0f8af8d3c4736587bd 100644 --- a/docs/src/migrate/vs-code.md +++ b/docs/src/migrate/vs-code.md @@ -338,7 +338,7 @@ To use other AI models in Zed, you have several options: - Use Zed’s hosted models, with higher rate limits. Requires [authentication](https://zed.dev/docs/accounts.html) and subscription to [Zed Pro](https://zed.dev/docs/ai/subscription.html). - Bring your own [API keys](https://zed.dev/docs/ai/llm-providers.html), no authentication needed -- Use [external agents like Claude Code](https://zed.dev/docs/ai/external-agents.html). +- Use [external agents like Claude Agent](https://zed.dev/docs/ai/external-agents.html). ### Advanced Config and Productivity Tweaks diff --git a/docs/src/migrate/webstorm.md b/docs/src/migrate/webstorm.md index d1d9612d9571ae2dd949326298f6d26d304748ea..a30b861ff6df4e960a3228e086a550a643676ef5 100644 --- a/docs/src/migrate/webstorm.md +++ b/docs/src/migrate/webstorm.md @@ -380,7 +380,7 @@ To use other AI models in Zed, you have several options: - Use Zed's hosted models, with higher rate limits. Requires [authentication](https://zed.dev/docs/accounts.html) and subscription to [Zed Pro](https://zed.dev/docs/ai/subscription.html). - Bring your own [API keys](https://zed.dev/docs/ai/llm-providers.html), no authentication needed -- Use [external agents like Claude Code](https://zed.dev/docs/ai/external-agents.html) +- Use [external agents like Claude Agent](https://zed.dev/docs/ai/external-agents.html) ## Advanced Config and Productivity Tweaks