Use Vec<String> since that's what extensions will use.

Richard Feldman created

Change summary

crates/agent/src/native_agent_server.rs   |  8 ++++----
crates/agent_servers/src/agent_servers.rs |  8 ++++----
crates/agent_servers/src/claude.rs        | 16 ++++++++--------
crates/agent_servers/src/codex.rs         |  8 ++++----
crates/agent_servers/src/custom.rs        |  8 ++++----
crates/agent_servers/src/gemini.rs        | 10 +++++-----
crates/agent_ui/src/acp/thread_view.rs    | 16 ++++++++--------
7 files changed, 37 insertions(+), 37 deletions(-)

Detailed changes

crates/agent/src/native_agent_server.rs 🔗

@@ -34,19 +34,19 @@ impl AgentServer for NativeAgentServer {
         ui::IconName::ZedAgent
     }
 
-    fn local_login_commands(&self) -> Vec<&'static str> {
+    fn local_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_login_commands(&self) -> Vec<&'static str> {
+    fn remote_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn local_logout_commands(&self) -> Vec<&'static str> {
+    fn local_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_logout_commands(&self) -> Vec<&'static str> {
+    fn remote_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 

crates/agent_servers/src/agent_servers.rs 🔗

@@ -71,22 +71,22 @@ pub trait AgentServer: Send {
     /// Returns the list of slash commands that should trigger Zed's authentication UI
     /// when running locally (e.g., "/login").
     /// These commands will be intercepted by Zed to show the auth method selection UI.
-    fn local_login_commands(&self) -> Vec<&'static str>;
+    fn local_login_commands(&self) -> Vec<String>;
 
     /// Returns the list of slash commands that should trigger Zed's authentication UI
     /// when running remotely (e.g., "/login").
     /// These commands will be intercepted by Zed to show the auth method selection UI.
-    fn remote_login_commands(&self) -> Vec<&'static str>;
+    fn remote_login_commands(&self) -> Vec<String>;
 
     /// Returns the list of logout-related slash commands that should be sent to the agent
     /// when running locally to let it reset internal state (e.g., "/logout").
     /// These commands will be added to available_commands and passed through to the agent.
-    fn local_logout_commands(&self) -> Vec<&'static str>;
+    fn local_logout_commands(&self) -> Vec<String>;
 
     /// Returns the list of logout-related slash commands that should be sent to the agent
     /// when running remotely to let it reset internal state (e.g., "/logout").
     /// These commands will be added to available_commands and passed through to the agent.
-    fn remote_logout_commands(&self) -> Vec<&'static str>;
+    fn remote_logout_commands(&self) -> Vec<String>;
 
     fn connect(
         &self,

crates/agent_servers/src/claude.rs 🔗

@@ -56,20 +56,20 @@ impl AgentServer for ClaudeCode {
         });
     }
 
-    fn local_login_commands(&self) -> Vec<&'static str> {
-        vec!["login"]
+    fn local_login_commands(&self) -> Vec<String> {
+        vec!["login".to_string()]
     }
 
-    fn remote_login_commands(&self) -> Vec<&'static str> {
-        vec!["login"]
+    fn remote_login_commands(&self) -> Vec<String> {
+        vec!["login".to_string()]
     }
 
-    fn local_logout_commands(&self) -> Vec<&'static str> {
-        vec!["logout"]
+    fn local_logout_commands(&self) -> Vec<String> {
+        vec!["logout".to_string()]
     }
 
-    fn remote_logout_commands(&self) -> Vec<&'static str> {
-        vec!["logout"]
+    fn remote_logout_commands(&self) -> Vec<String> {
+        vec!["logout".to_string()]
     }
 
     fn connect(

crates/agent_servers/src/codex.rs 🔗

@@ -36,19 +36,19 @@ impl AgentServer for Codex {
         ui::IconName::AiOpenAi
     }
 
-    fn local_login_commands(&self) -> Vec<&'static str> {
+    fn local_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_login_commands(&self) -> Vec<&'static str> {
+    fn remote_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn local_logout_commands(&self) -> Vec<&'static str> {
+    fn local_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_logout_commands(&self) -> Vec<&'static str> {
+    fn remote_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 

crates/agent_servers/src/custom.rs 🔗

@@ -34,19 +34,19 @@ impl crate::AgentServer for CustomAgentServer {
         IconName::Terminal
     }
 
-    fn local_login_commands(&self) -> Vec<&'static str> {
+    fn local_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_login_commands(&self) -> Vec<&'static str> {
+    fn remote_login_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn local_logout_commands(&self) -> Vec<&'static str> {
+    fn local_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_logout_commands(&self) -> Vec<&'static str> {
+    fn remote_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 

crates/agent_servers/src/gemini.rs 🔗

@@ -25,21 +25,21 @@ impl AgentServer for Gemini {
         ui::IconName::AiGemini
     }
 
-    fn local_login_commands(&self) -> Vec<&'static str> {
-        vec!["login"]
+    fn local_login_commands(&self) -> Vec<String> {
+        vec!["login".to_string()]
     }
 
-    fn remote_login_commands(&self) -> Vec<&'static str> {
+    fn remote_login_commands(&self) -> Vec<String> {
         // When remote, OAuth doesn't work, so login is handled via the
         // auth_commands mapping (oauth-personal -> spawn-gemini-cli)
         vec![]
     }
 
-    fn local_logout_commands(&self) -> Vec<&'static str> {
+    fn local_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 
-    fn remote_logout_commands(&self) -> Vec<&'static str> {
+    fn remote_logout_commands(&self) -> Vec<String> {
         vec![]
     }
 

crates/agent_ui/src/acp/thread_view.rs 🔗

@@ -1067,12 +1067,12 @@ impl AcpThreadView {
             self.agent.local_logout_commands()
         };
         let is_login_command = if let Some(cmd) = command_name {
-            login_commands.contains(&cmd)
+            login_commands.iter().any(|c| c == cmd)
         } else {
             false
         };
         let is_logout_command = if let Some(cmd) = command_name {
-            logout_commands.contains(&cmd)
+            logout_commands.iter().any(|c| c == cmd)
         } else {
             false
         };
@@ -1464,7 +1464,7 @@ impl AcpThreadView {
                 // Add login commands from the agent
                 for command_name in login_commands {
                     available_commands.push(acp::AvailableCommand {
-                        name: command_name.to_string(),
+                        name: command_name,
                         description: "Authenticate".to_owned(),
                         input: None,
                         meta: None,
@@ -1474,7 +1474,7 @@ impl AcpThreadView {
                 // Add logout commands from the agent
                 for command_name in logout_commands {
                     available_commands.push(acp::AvailableCommand {
-                        name: command_name.to_string(),
+                        name: command_name,
                         description: "Authenticate".to_owned(),
                         input: None,
                         meta: None,
@@ -6050,19 +6050,19 @@ pub(crate) mod tests {
             "Test".into()
         }
 
-        fn local_login_commands(&self) -> Vec<&'static str> {
+        fn local_login_commands(&self) -> Vec<String> {
             vec![]
         }
 
-        fn remote_login_commands(&self) -> Vec<&'static str> {
+        fn remote_login_commands(&self) -> Vec<String> {
             vec![]
         }
 
-        fn local_logout_commands(&self) -> Vec<&'static str> {
+        fn local_logout_commands(&self) -> Vec<String> {
             vec![]
         }
 
-        fn remote_logout_commands(&self) -> Vec<&'static str> {
+        fn remote_logout_commands(&self) -> Vec<String> {
             vec![]
         }