an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
feat(renderer): add git-isolation toggle to AddAgentModal
Chaitanya Giri5834c579d1d6
diff --git a/src/preload/index.ts b/src/preload/index.tsindex 42e5960a..5360c4cd 100644--- a/src/preload/index.ts+++ b/src/preload/index.ts@@ -52,6 +52,8 @@ export interface SpawnPtyOptions {rows?: number;/** When present, the agent is provisioned in the hive at spawn. */hive?: HiveAgentMeta;+ /** When true (and cwd is a git repo), spawn the agent in its own git worktree. */+ isolate?: boolean;}export interface PtyExit { exitCode: number; signal?: number | undefined }diff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsxindex 560a3e20..d6d50b35 100644--- a/src/renderer/src/components/AddAgentModal.tsx+++ b/src/renderer/src/components/AddAgentModal.tsx@@ -41,6 +41,7 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {setCommand(buildSpawnCommand(config, id));};const [goal, setGoal] = useState('');+ const [isolate, setIsolate] = useState(false);const [error, setError] = useState<string | undefined>();const [busy, setBusy] = useState(false);@@ -70,6 +71,8 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {args,cols: 100,rows: 30,+ // When set, the main process spawns this agent in its own git worktree.+ isolate,// Provision this agent in the hive (memory + mailbox + identity/protocol).hive: {id,@@ -229,6 +232,18 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {/></Row>+ <label style={{ display: 'flex', gap: 8, alignItems: 'center', cursor: 'pointer' }}>+ <input+ type="checkbox"+ checked={isolate}+ onChange={(e) => setIsolate(e.target.checked)}+ style={{ width: 16, height: 16, cursor: 'pointer' }}+ />+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 14, color: 'var(--cth-ink-900)' }}>+ Git isolation (own worktree)+ </span>+ </label>+<Row label="Character"><div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>{OFFICE_CAST.map(c => (diff --git a/src/renderer/src/store/store.ts b/src/renderer/src/store/store.tsindex 3179674d..55dd5a43 100644--- a/src/renderer/src/store/store.ts+++ b/src/renderer/src/store/store.ts@@ -61,6 +61,9 @@ export interface Agent {/** Michael's prep assistant ("Dwight") — enriches prompts and forwards them to* Michael via the hive. Send-only: never receives inbox/broadcast mail. */isAssistant?: boolean;+ /** When git isolation is enabled, the dedicated worktree path the agent runs+ * in (its own `agent/<id>` branch); undefined for shared-cwd agents. */+ worktreePath?: string;}export interface FeedEntry {