MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / process

Function process

common/src/util/analytics-dispatcher.ts:57–79  ·  view source on GitHub ↗
(
    input: AnalyticsDispatchInput,
  )

Source from the content-addressed store, hash-verified

55 }
56
57 function process(
58 input: AnalyticsDispatchInput,
59 ): AnalyticsDispatchPayload[] {
60 if (isDevEnv) {
61 return []
62 }
63
64 const payload = toTrackableAnalyticsPayload(input)
65 if (payload) {
66 const toSend = flushBufferWithUser(payload.userId)
67 toSend.push(payload)
68 return toSend
69 }
70
71 if (
72 bufferWhenNoUser &&
73 getAnalyticsEventId(input.data as AnalyticsLogData)
74 ) {
75 buffered.push(input)
76 }
77
78 return []
79 }
80
81 return { process }
82}

Callers

nothing calls this directly

Calls 3

getAnalyticsEventIdFunction · 0.90
flushBufferWithUserFunction · 0.85

Tested by

no test coverage detected