mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-17 04:12:25 +00:00
chore: generate
This commit is contained in:
parent
499e8e4b78
commit
0df2f5b45f
2 changed files with 3 additions and 11 deletions
|
|
@ -269,10 +269,7 @@ it.live("InstanceState correct after interleaved init and dispose", () =>
|
|||
expect(a).toBe(one)
|
||||
|
||||
const [, b] = yield* Effect.all(
|
||||
[
|
||||
reloadInstance({ directory: one }),
|
||||
Test.use((svc) => svc.get()).pipe(provideInstanceEffect(two)),
|
||||
],
|
||||
[reloadInstance({ directory: one }), Test.use((svc) => svc.get()).pipe(provideInstanceEffect(two))],
|
||||
{ concurrency: "unbounded" },
|
||||
)
|
||||
expect(b).toBe(two)
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ import { TestLLMServer } from "../lib/llm-server"
|
|||
|
||||
const noopBootstrap = Layer.succeed(InstanceBootstrap.Service, InstanceBootstrap.Service.of({ run: Effect.void }))
|
||||
export const testInstanceStoreLayer = InstanceStore.defaultLayer.pipe(Layer.provide(noopBootstrap))
|
||||
const testInstanceRuntime = ManagedRuntime.make(
|
||||
testInstanceStoreLayer.pipe(Layer.provideMerge(Observability.layer)),
|
||||
)
|
||||
const testInstanceRuntime = ManagedRuntime.make(testInstanceStoreLayer.pipe(Layer.provideMerge(Observability.layer)))
|
||||
|
||||
const runTestInstanceStore = <A>(fn: (store: InstanceStore.Interface) => Effect.Effect<A>) =>
|
||||
testInstanceRuntime.runPromise(InstanceStore.Service.use(fn))
|
||||
|
|
@ -207,10 +205,7 @@ export const withTmpdirInstance =
|
|||
Effect.gen(function* () {
|
||||
const directory = yield* tmpdirScoped(options)
|
||||
return yield* self.pipe(Effect.provideService(TestInstance, { directory }), provideInstanceEffect(directory))
|
||||
}).pipe(
|
||||
Effect.provide(testInstanceStoreLayer),
|
||||
Effect.provide(CrossSpawnSpawner.defaultLayer),
|
||||
)
|
||||
}).pipe(Effect.provide(testInstanceStoreLayer), Effect.provide(CrossSpawnSpawner.defaultLayer))
|
||||
|
||||
export function provideTmpdirServer<A, E, R>(
|
||||
self: (input: { dir: string; llm: TestLLMServer["Service"] }) => Effect.Effect<A, E, R>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue