feat: add optional multi-run isolation

Adds an Isolate runs toggle for Git projects
Allows Git multi-runs to share the same directory
Keeps non-Git runs unisolated with clear footer info
This commit is contained in:
Bohdan Triapitsyn
2026-05-15 11:35:23 +03:00
parent 29811ec03e
commit 713bb6dfb1
10 changed files with 45 additions and 6 deletions
+4 -3
View File
@@ -118,10 +118,11 @@ export const useMultiRunStore = create<MultiRunStore>()(
const directory = project.path;
const isGit = await checkIsGitRepository(directory);
const shouldIsolateRuns = isGit && params.isolateRuns !== false;
const groupSlug = toGitSafeSlug(groupName);
const rootBranch = isGit ? await getRootBranch(directory) : undefined;
const rootTrackingRemote = isGit ? await resolveRootTrackingRemote(directory) : null;
const rootBranch = shouldIsolateRuns ? await getRootBranch(directory) : undefined;
const rootTrackingRemote = shouldIsolateRuns ? await resolveRootTrackingRemote(directory) : null;
const createdRuns: Array<{
sessionId: string;
@@ -161,7 +162,7 @@ export const useMultiRunStore = create<MultiRunStore>()(
? `${groupSlug}/${model.providerID}/${model.modelID}/${index}`
: `${groupSlug}/${model.providerID}/${model.modelID}`;
if (!isGit) {
if (!shouldIsolateRuns) {
const session = await opencodeClient.withDirectory(
directory,
() => opencodeClient.createSession({ title: sessionTitle })