Loading component…
Loading component…
Agents on their own branches at once, and where they collide – a row per file, a column per agent, each one's way in a sentence to pick from, and Merge once all are settled
To reuse this local React demo, copy all files from the Code tab into the same folder, then import ConflictRadar from ./conflict-radar.
import { ConflictRadar, type RadarAgent, type RadarFile } from "@/components/ui/conflict-radar";
export function Branches({ agents, files }: { agents: RadarAgent[]; files: RadarFile[] }) {
const [resolved, setResolved] = useState<Record<string, string>>({});
return (
<ConflictRadar
agents={agents} // { id, name, model?, avatar?, status?: "running" | "done" }
files={files} // { path, edits: [{ agentId, lines: [from, to], summary?, active? }] }
resolved={resolved}
onResolve={(path, agentId) => setResolved((r) => ({ ...r, [path]: agentId }))}
onMerge={() => mergeBranches(resolved)}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| agents | RadarAgent[] | One column each: name, model or branch, a mark, and whether it's still working | |
| files | RadarFile[] | One row each, with every agent's edit – the lines it changes, whether it's still writing, and for conflicts its way in one sentence | |
| title | string | "Parallel work" | Heading in the bar |
| resolved | Record<string, string> | The agent picked per conflicting file – leave it out and the component keeps the picks itself | |
| onResolve | (path: string, agentId: string) => void | A way was picked for a conflict | |
| onMerge | () => void | Merge was clicked – it's only enabled once every conflict is settled and every agent is done | |
| className | string | Extra class on the root |
Below 440px agent names and folders drop, the columns get smaller and a way's sentence moves under its name
Dark mode built in; colors are CSS variables on .ui-cr