mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
chore: generate
This commit is contained in:
@@ -3,10 +3,7 @@ import { Effect } from "effect"
|
||||
import { HttpEffect, HttpMiddleware, HttpServerRequest } from "effect/unstable/http"
|
||||
|
||||
const disposeAfterResponse = new WeakMap<object, InstanceContext>()
|
||||
const reloadAfterResponse = new WeakMap<
|
||||
object,
|
||||
InstanceContext & { next: Parameters<typeof Instance.reload>[0] }
|
||||
>()
|
||||
const reloadAfterResponse = new WeakMap<object, InstanceContext & { next: Parameters<typeof Instance.reload>[0] }>()
|
||||
|
||||
export const markInstanceForDisposal = (ctx: InstanceContext) =>
|
||||
HttpEffect.appendPreResponseHandler((request, response) =>
|
||||
|
||||
@@ -72,7 +72,8 @@ export const projectHandlers = Layer.unwrap(
|
||||
const initGit = Effect.fn("ProjectHttpApi.initGit")(function* () {
|
||||
const ctx = yield* InstanceState.context
|
||||
const next = yield* svc.initGit({ directory: ctx.directory, project: ctx.project })
|
||||
if (next.id === ctx.project.id && next.vcs === ctx.project.vcs && next.worktree === ctx.project.worktree) return next
|
||||
if (next.id === ctx.project.id && next.vcs === ctx.project.vcs && next.worktree === ctx.project.worktree)
|
||||
return next
|
||||
yield* markInstanceForReload(ctx, {
|
||||
directory: ctx.directory,
|
||||
worktree: ctx.directory,
|
||||
|
||||
Reference in New Issue
Block a user