From eff02f5ee58a6c6a31547b785ae55daa321b4c0f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 07:29:47 +0000 Subject: [PATCH 1/4] feat: add OpenCode to spawn dialogs and empty-state UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SpawnAgentCli type: 'claude' | 'codex' → 'claude' | 'codex' | 'opencode' - SpawnAgentDialog: adds OpenCode card to the spawn grid (3-col) - TerminalPane empty state: adds OpenCode quick-spawn button alongside Claude and Codex UI-only change. No relay package bump, no headless routing. https://claude.ai/code/session_01KXU1uAUwx3L82TMLnAmU4z --- .../src/components/sidebar/SpawnAgentDialog.tsx | 7 ++++--- .../src/components/terminal/TerminalPane.tsx | 14 ++++++++++++-- src/renderer/src/lib/spawn-agent.ts | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/sidebar/SpawnAgentDialog.tsx b/src/renderer/src/components/sidebar/SpawnAgentDialog.tsx index 0e99049..4d01dd9 100644 --- a/src/renderer/src/components/sidebar/SpawnAgentDialog.tsx +++ b/src/renderer/src/components/sidebar/SpawnAgentDialog.tsx @@ -1,7 +1,7 @@ import type React from 'react' import { useCallback, useEffect, useRef, useState } from 'react' import { Loader2, X } from 'lucide-react' -import { ClaudeIcon, CodexIcon } from '@/components/common/AgentIcons' +import { ClaudeIcon, CodexIcon, OpenCodeIcon } from '@/components/common/AgentIcons' import { listProjectPersonas, spawnProjectAgent, spawnProjectPersona, type SpawnAgentCli } from '@/lib/spawn-agent' import type { WorkforcePersona } from '@/lib/ipc' import { useProjectStore, type ProjectRoot } from '@/stores/project-store' @@ -9,7 +9,8 @@ import { useUIStore } from '@/stores/ui-store' const AGENT_OPTIONS: Array<{ cli: SpawnAgentCli; label: string; Icon: typeof ClaudeIcon }> = [ { cli: 'claude', label: 'Claude', Icon: ClaudeIcon }, - { cli: 'codex', label: 'Codex', Icon: CodexIcon } + { cli: 'codex', label: 'Codex', Icon: CodexIcon }, + { cli: 'opencode', label: 'OpenCode', Icon: OpenCodeIcon } ] export function SpawnAgentDialog(): React.ReactNode { @@ -207,7 +208,7 @@ export function SpawnAgentDialog(): React.ReactNode { className="h-9 w-full rounded-md border border-[var(--pear-border-subtle)] bg-[var(--pear-bg)] px-3 text-sm text-[var(--pear-text)] outline-none placeholder:text-[var(--pear-text-faint)] focus:border-[var(--pear-accent-dim)] disabled:opacity-50" /> -
+
{AGENT_OPTIONS.map(({ cli, label, Icon }) => ( +
) : ( - - + {([ + { cli: 'claude', label: 'Claude', Icon: ClaudeIcon }, + { cli: 'codex', label: 'Codex', Icon: CodexIcon }, + { cli: 'opencode', label: 'OpenCode', Icon: OpenCodeIcon } + ] as const).map(({ cli, label, Icon }) => ( + + ))}
) : (