Skip to content

Commit f21edfb

Browse files
committed
feat: add support for Codex agent
Adds Codex to the available agents in the ACP sidebar
1 parent ad5e375 commit f21edfb

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

frontend/src/components/ai/ai-provider-icon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ import type { ProviderId } from "@/core/ai/ids/ids";
1515
import { cn } from "@/utils/cn";
1616
import marimoIcon from "../../assets/icon-32x32.png?inline";
1717

18-
type Aliases = "claude" | "gemini";
18+
type Aliases = "claude" | "gemini" | "codex";
1919

2020
const icons: Record<ProviderId | Aliases, string> = {
2121
openai: OpenAIIcon,
2222
anthropic: AnthropicIcon,
2323
claude: AnthropicIcon,
2424
gemini: GeminiIcon,
2525
google: GeminiIcon,
26+
codex: OpenAIIcon,
2627
ollama: OllamaIcon,
2728
azure: AzureIcon,
2829
bedrock: BedrockIcon,

frontend/src/components/chat/acp/agent-selector.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ const AVAILABLE_AGENTS = [
4242
displayName: "Gemini",
4343
iconId: "google",
4444
},
45+
{
46+
id: "codex",
47+
displayName: "Codex",
48+
iconId: "openai",
49+
},
4550
] as const;
4651

4752
interface AgentMenuItemProps {

frontend/src/components/chat/acp/state.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ExternalAgentSessionId, SessionSupportType } from "./types";
1111

1212
// Types
1313
export type TabId = TypedString<"TabId">;
14-
export type ExternalAgentId = "claude" | "gemini";
14+
export type ExternalAgentId = "claude" | "gemini" | "codex";
1515

1616
// No agents support loading sessions, so we limit to 1, otherwise
1717
// this is confusing to the user when switching between sessions
@@ -220,7 +220,7 @@ export function getSessionsByAgent(
220220
}
221221

222222
export function getAllAgentIds(): ExternalAgentId[] {
223-
return ["claude", "gemini"];
223+
return ["claude", "gemini", "codex"];
224224
}
225225

226226
export function getAgentDisplayName(agentId: ExternalAgentId): string {
@@ -251,6 +251,12 @@ const AGENT_CONFIG: Record<ExternalAgentId, AgentConfig> = {
251251
webSocketUrl: "ws://localhost:3019/message",
252252
sessionSupport: "single",
253253
},
254+
codex: {
255+
port: 3021,
256+
command: "npx @zed-industries/codex-acp",
257+
webSocketUrl: "ws://localhost:3021/message",
258+
sessionSupport: "single",
259+
},
254260
};
255261

256262
export function getAgentSessionSupport(

0 commit comments

Comments
 (0)