MCPcopy
hub / github.com/codeaashu/claude-code / emit

Function emit

src/utils/hooks/hookEvents.ts:72–81  ·  view source on GitHub ↗
(event: HookExecutionEvent)

Source from the content-addressed store, hash-verified

70}
71
72function emit(event: HookExecutionEvent): void {
73 if (eventHandler) {
74 eventHandler(event)
75 } else {
76 pendingEvents.push(event)
77 if (pendingEvents.length > MAX_PENDING_EVENTS) {
78 pendingEvents.shift()
79 }
80 }
81}
82
83function shouldEmit(hookEvent: string): boolean {
84 if ((ALWAYS_EMITTED_HOOK_EVENTS as readonly string[]).includes(hookEvent)) {

Callers 3

emitHookStartedFunction · 0.70
emitHookProgressFunction · 0.70
emitHookResponseFunction · 0.70

Calls 2

shiftMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected