From e3feca09b30c9dadeea7462a7b7a44d1677e38bb Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Mon, 18 May 2026 16:20:46 +0000 Subject: [PATCH] chore: generate --- .../src/reference/repository-cache.ts | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/packages/opencode/src/reference/repository-cache.ts b/packages/opencode/src/reference/repository-cache.ts index 3a2f632aef..a09b6468bd 100644 --- a/packages/opencode/src/reference/repository-cache.ts +++ b/packages/opencode/src/reference/repository-cache.ts @@ -181,19 +181,17 @@ const ensureWithServices = Effect.fn("RepositoryCache.ensureWithServices")(funct ), () => Effect.gen(function* () { - yield* services.fs - .ensureDir(path.dirname(localPath)) - .pipe( - Effect.catch((error: unknown) => - Effect.fail( - new CacheOperationError({ - operation: "ensure cache directory", - path: localPath, - message: errorMessage(error), - }), - ), + yield* services.fs.ensureDir(path.dirname(localPath)).pipe( + Effect.catch((error: unknown) => + Effect.fail( + new CacheOperationError({ + operation: "ensure cache directory", + path: localPath, + message: errorMessage(error), + }), ), - ) + ), + ) const exists = yield* services.fs.existsSafe(localPath) const hasGitDir = yield* services.fs.existsSafe(path.join(localPath, ".git")) @@ -203,19 +201,17 @@ const ensureWithServices = Effect.fn("RepositoryCache.ensureWithServices")(funct const originReference = origin?.exitCode === 0 ? parseRepositoryReference(origin.text().trim()) : undefined const reuse = hasGitDir && Boolean(originReference && sameRepositoryReference(originReference, cloneTarget)) if (exists && !reuse) { - yield* services.fs - .remove(localPath, { recursive: true }) - .pipe( - Effect.catch((error: unknown) => - Effect.fail( - new CacheOperationError({ - operation: "remove stale cache", - path: localPath, - message: errorMessage(error), - }), - ), + yield* services.fs.remove(localPath, { recursive: true }).pipe( + Effect.catch((error: unknown) => + Effect.fail( + new CacheOperationError({ + operation: "remove stale cache", + path: localPath, + message: errorMessage(error), + }), ), - ) + ), + ) } const currentBranch = hasGitDir ? yield* services.git.branch(localPath) : undefined