MCPcopy
hub / github.com/anomalyco/opencode / withSession

Function withSession

packages/opencode/test/server/session-list.test.ts:23–26  ·  view source on GitHub ↗
(input?: Parameters<SessionNs.Interface["create"]>[0])

Source from the content-addressed store, hash-verified

21const itWorkspaces = testEffect(layer(true))
22
23const withSession = (input?: Parameters<SessionNs.Interface["create"]>[0]) =>
24 Effect.acquireRelease(SessionNs.use.create(input), (created) =>
25 SessionNs.Service.use((session) => session.remove(created.id).pipe(Effect.ignore)),
26 )
27
28afterEach(async () => {
29 await disposeAllInstances()

Callers 1

Calls 3

createMethod · 0.65
removeMethod · 0.65
useMethod · 0.45

Tested by

no test coverage detected