MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / countEvents

Function countEvents

packages/agent-core/test/agent/compaction/full.test.ts:2254–2259  ·  view source on GitHub ↗
(events: ReturnType<TestAgentContext['newEvents']>, type: string)

Source from the content-addressed store, hash-verified

2252}
2253
2254function countEvents(events: ReturnType<TestAgentContext['newEvents']>, type: string): number {
2255 return events.filter((event) => {
2256 if (typeof event !== 'object' || event === null) return false;
2257 return (event as { readonly event?: unknown }).event === type;
2258 }).length;
2259}
2260
2261function oauthTestAgentOptions(
2262 getAccessToken: (options?: { readonly force?: boolean }) => Promise<string>,

Callers 1

full.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected