diff --git a/crates/agent_servers/src/agent_servers.rs b/crates/agent_servers/src/agent_servers.rs index a723fd51deac6be2aba0a38721074c551328f52f..006739ed0595fa5c6868cbe3db1af8ed95e7c8c8 100644 --- a/crates/agent_servers/src/agent_servers.rs +++ b/crates/agent_servers/src/agent_servers.rs @@ -71,15 +71,15 @@ pub trait AgentServer: Send { /// Returns the list of slash commands that should trigger Zed's authentication UI /// when the user types them (e.g., "/login"). /// These commands will be intercepted by Zed to show the auth method selection UI. - fn login_commands(&self) -> &'static [&'static str] { - &[] + fn login_commands(&self) -> Vec<&'static str> { + Vec::new() } /// Returns the list of logout-related slash commands that should be sent to the agent /// to let it reset internal state (e.g., "/logout"). /// These commands will be added to available_commands and passed through to the agent. - fn logout_commands(&self) -> &'static [&'static str] { - &[] + fn logout_commands(&self) -> Vec<&'static str> { + Vec::new() } fn connect( diff --git a/crates/agent_servers/src/claude.rs b/crates/agent_servers/src/claude.rs index db6cae720ee41d37886342509abfa51140b6fd50..914b43805dea5f5e0c3588b924a81c616904395c 100644 --- a/crates/agent_servers/src/claude.rs +++ b/crates/agent_servers/src/claude.rs @@ -56,12 +56,12 @@ impl AgentServer for ClaudeCode { }); } - fn login_commands(&self) -> &'static [&'static str] { - &["login"] + fn login_commands(&self) -> Vec<&'static str> { + vec!["login"] } - fn logout_commands(&self) -> &'static [&'static str] { - &["logout"] + fn logout_commands(&self) -> Vec<&'static str> { + vec!["logout"] } fn connect( diff --git a/crates/agent_servers/src/gemini.rs b/crates/agent_servers/src/gemini.rs index 605a3164c3c0d214b58d98fddd3bd4cb6d340ae7..1fba2cb39df5793500c03944cb2221aabfb105c9 100644 --- a/crates/agent_servers/src/gemini.rs +++ b/crates/agent_servers/src/gemini.rs @@ -25,8 +25,8 @@ impl AgentServer for Gemini { ui::IconName::AiGemini } - fn login_commands(&self) -> &'static [&'static str] { - &["login"] + fn login_commands(&self) -> Vec<&'static str> { + vec!["login"] } fn connect( diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 8bed99c92b32814c83c54b19b2c6c0b54b96cf50..c25464e9f3c16f95f7a887c6a64a66d74b0d4618 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -1441,7 +1441,7 @@ impl AcpThreadView { // Add login commands from the agent for command_name in self.agent.login_commands() { available_commands.push(acp::AvailableCommand { - name: command_name.to_string(), + name: command_name.to_owned(), description: "Authenticate".to_owned(), input: None, meta: None, @@ -1451,7 +1451,7 @@ impl AcpThreadView { // Add logout commands from the agent for command_name in self.agent.logout_commands() { available_commands.push(acp::AvailableCommand { - name: command_name.to_string(), + name: command_name.to_owned(), description: "Authenticate".to_owned(), input: None, meta: None,