Login for Codex

Richard Feldman created

Change summary

crates/agent_servers/src/codex.rs          |  2 +-
crates/agent_ui/src/acp/thread_view.rs     | 15 +++++++++------
crates/agent_ui/src/agent_configuration.rs |  5 -----
crates/project/src/agent_server_store.rs   | 10 ----------
4 files changed, 10 insertions(+), 22 deletions(-)

Detailed changes

crates/agent_servers/src/codex.rs 🔗

@@ -21,7 +21,7 @@ impl AgentServer for Codex {
 
     fn logo(&self) -> ui::IconName {
         // No dedicated Codex icon yet; use the generic AI icon.
-        ui::IconName::Ai
+        ui::IconName::AiOpenAi
     }
 
     fn connect(

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

@@ -1012,11 +1012,13 @@ impl AcpThreadView {
             };
 
             let connection = thread.read(cx).connection().clone();
-            if !connection
-                .auth_methods()
-                .iter()
-                .any(|method| method.id.0.as_ref() == "claude-login")
-            {
+            let auth_methods = connection.auth_methods();
+            let has_supported_auth = auth_methods.iter().any(|method| {
+                let id = method.id.0.as_ref();
+                id == "claude-login" || id == "spawn-gemini-cli" || id == "spawn-codex-acp"
+            });
+            let can_login = has_supported_auth || auth_methods.is_empty() || self.login.is_some();
+            if !can_login {
                 return;
             };
             let this = cx.weak_entity();
@@ -1517,7 +1519,8 @@ impl AcpThreadView {
         configuration_view.take();
         pending_auth_method.replace(method.clone());
         let authenticate = if (method.0.as_ref() == "claude-login"
-            || method.0.as_ref() == "spawn-gemini-cli")
+            || method.0.as_ref() == "spawn-gemini-cli"
+            || method.0.as_ref() == "spawn-codex-acp")
             && let Some(login) = self.login.clone()
         {
             if let Some(workspace) = self.workspace.upgrade() {

crates/agent_ui/src/agent_configuration.rs 🔗

@@ -1088,11 +1088,6 @@ impl AgentConfiguration {
                         IconName::AiClaude,
                         "Claude Code",
                     ))
-                    .child(Divider::horizontal().color(DividerColor::BorderFaded))
-                    .child(self.render_agent_server(
-                        IconName::Ai,
-                        "Codex",
-                    ))
                     .map(|mut parent| {
                         for agent in user_defined_agents {
                             parent = parent.child(Divider::horizontal().color(DividerColor::BorderFaded))

crates/project/src/agent_server_store.rs 🔗

@@ -298,16 +298,6 @@ impl AgentServerStore {
                     new_version_available_tx: None,
                 }) as Box<dyn ExternalAgentServer>,
             ),
-            (
-                CODEX_NAME.into(),
-                Box::new(RemoteExternalAgentServer {
-                    project_id,
-                    upstream_client: upstream_client.clone(),
-                    name: CODEX_NAME.into(),
-                    status_tx: None,
-                    new_version_available_tx: None,
-                }) as Box<dyn ExternalAgentServer>,
-            ),
         ]
         .into_iter()
         .collect();