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

Function eventCount

packages/core/test/session-prompt.test.ts:88–99  ·  view source on GitHub ↗
(type: string)

Source from the content-addressed store, hash-verified

86 ),
87)
88const eventCount = (type: string) =>
89 Database.Service.use(({ db }) =>
90 db
91 .select()
92 .from(EventTable)
93 .where(eq(EventTable.type, type))
94 .all()
95 .pipe(
96 Effect.orDie,
97 Effect.map((rows) => rows.length),
98 ),
99 )
100
101describe("SessionV2.prompt", () => {
102 it.effect("exposes the execution registry", () =>

Callers 1

Calls 6

eqFunction · 0.85
useMethod · 0.45
allMethod · 0.45
whereMethod · 0.45
fromMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected