From 869d6786c7a5bef6a1dbdf50f0f7b834b94cbdda Mon Sep 17 00:00:00 2001 From: Jiayuan Date: Wed, 14 Jan 2026 05:03:04 +0800 Subject: [PATCH] feat: add Claude Code ACP as agent option - Add claude-code-acp to DEFAULT_AGENTS (first in list) - Add install hint for @anthropic-ai/claude-code - Add icon and description in Settings UI Reference: https://github.com/zed-industries/claude-code-acp Co-Authored-By: Claude Opus 4.5 --- src/main/config/defaults.ts | 9 +++++++++ src/main/utils/agent-check.ts | 3 ++- src/renderer/src/components/Settings.tsx | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/config/defaults.ts b/src/main/config/defaults.ts index 5c3564cd82..05000e4870 100644 --- a/src/main/config/defaults.ts +++ b/src/main/config/defaults.ts @@ -4,6 +4,15 @@ import type { AgentConfig, AppConfig } from '../../shared/types' export const DEFAULT_AGENTS: Record = { + 'claude-code': { + id: 'claude-code', + name: 'Claude Code', + command: 'claude-code-acp', + args: [], + enabled: true, + // Note: Uses https://github.com/zed-industries/claude-code-acp + // Requires ANTHROPIC_API_KEY environment variable + }, opencode: { id: 'opencode', name: 'OpenCode', diff --git a/src/main/utils/agent-check.ts b/src/main/utils/agent-check.ts index a74294660a..c7722e89b1 100644 --- a/src/main/utils/agent-check.ts +++ b/src/main/utils/agent-check.ts @@ -17,9 +17,10 @@ export interface AgentCheckResult { // Install hints for each agent const INSTALL_HINTS: Record = { + 'claude-code': 'npm install -g @anthropic-ai/claude-code', opencode: 'go install github.com/anomalyco/opencode@latest', codex: 'npm install -g @openai/codex', - gemini: 'npm install -g @anthropic-ai/gemini-cli', + gemini: 'npm install -g @google/gemini-cli', } /** diff --git a/src/renderer/src/components/Settings.tsx b/src/renderer/src/components/Settings.tsx index 0729ff0b6f..bf795578e0 100644 --- a/src/renderer/src/components/Settings.tsx +++ b/src/renderer/src/components/Settings.tsx @@ -15,10 +15,10 @@ interface SettingsProps { // Agent icons mapping const AGENT_ICONS: Record = { + 'claude-code': '◉', opencode: '⌘', codex: '◈', gemini: '✦', - claude: '◉', } type ThemeMode = 'light' | 'dark' | 'system' @@ -281,10 +281,10 @@ function AgentCard({ agent, isSelected, onSelect }: AgentCardProps) { function getAgentDescription(agentId: string): string { const descriptions: Record = { + 'claude-code': 'Anthropic\'s Claude Code via ACP', opencode: 'Terminal-based coding assistant', - codex: 'OpenAI\'s coding agent CLI', + codex: 'OpenAI\'s Codex CLI via ACP', gemini: 'Google\'s Gemini CLI agent', - claude: 'Anthropic\'s Claude CLI', } return descriptions[agentId] || 'Coding assistant' }