History

fix(server): recreate a thread's worktree before starting a turn (#7839)

MacKinley Smith committed 2 months ago

Commit 01fc7d21 parent 17822fa5 files · +124 −0Browse files

Showing the changes to apps/server/src/git (1 of 5 files). Show all

Unified · Split

apps/server/src/git/GitWorkflowService.ts+7−0
@@ -84,6 +84,9 @@ export class GitWorkflowService extends Context.Service< · 83 unmodified lines
8484 readonly removeWorktree: (
8585 input: VcsRemoveWorktreeInput,
8686 ) => Effect.Effect<void, GitCommandError>;
87+ readonly pruneWorktrees: (input: {
88+ readonly cwd: string;
89+ }) => Effect.Effect<void, GitCommandError>;
8790 readonly createRef: (
8891 input: VcsCreateRefInput,
8992 ) => Effect.Effect<VcsCreateRefResult, GitCommandError>;
@@ -319,6 +322,10 @@ export const make = Effect.gen(function* () { · 229 unmodified lines
319322 ensureGitCommand("GitWorkflowService.removeWorktree", input.cwd).pipe(
320323 Effect.andThen(git.removeWorktree(input)),
321324 ),
325+ pruneWorktrees: (input) =>
326+ ensureGitCommand("GitWorkflowService.pruneWorktrees", input.cwd).pipe(
327+ Effect.andThen(git.pruneWorktrees(input)),
328+ ),
322329 createRef: (input) =>
323330 ensureGitCommand("GitWorkflowService.createRef", input.cwd).pipe(
324331 Effect.andThen(git.createRef(input)),