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

Function withSession

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

Source from the content-addressed store, hash-verified

13)
14
15const withSession = (input?: Parameters<SessionNs.Interface["create"]>[0]) =>
16 Effect.acquireRelease(SessionNs.use.create(input), (created) =>
17 SessionNs.Service.use((session) => session.remove(created.id).pipe(Effect.ignore)),
18 )
19
20describe("session.listGlobal", () => {
21 it.instance(

Callers 1

Calls 3

createMethod · 0.65
removeMethod · 0.65
useMethod · 0.45

Tested by

no test coverage detected