core: add sandbox support for git worktrees to allow working in multiple directories per project

This commit is contained in:
Dax Raad
2026-01-03 18:52:53 -05:00
parent f6cc84747a
commit 0b4af95223
4 changed files with 89 additions and 35 deletions

View File

@@ -19,10 +19,10 @@ export const Instance = {
if (!existing) {
Log.Default.info("creating instance", { directory: input.directory })
existing = iife(async () => {
const project = await Project.fromDirectory(input.directory)
const { project, sandbox } = await Project.fromDirectory(input.directory)
const ctx = {
directory: input.directory,
worktree: project.worktree,
worktree: sandbox,
project,
}
await context.provide(ctx, async () => {