Revert "Use a static slice rather than vec"

Richard Feldman created

This reverts commit 7f7312ca8f8fc7e1888a50a67b4b1fd466f8f9f7.

Change summary

crates/agent_servers/src/agent_servers.rs | 8 ++++----
crates/agent_servers/src/claude.rs        | 8 ++++----
crates/agent_servers/src/gemini.rs        | 4 ++--
crates/agent_ui/src/acp/thread_view.rs    | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)

Detailed changes

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(

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(

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(

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,