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

Method emit

packages/opencode/src/bus/global.ts:14–19  ·  view source on GitHub ↗
(eventName: "event", event: GlobalEvent)

Source from the content-addressed store, hash-verified

12 event: [GlobalEvent]
13}> {
14 override emit(eventName: "event", event: GlobalEvent): boolean {
15 if (event.payload && typeof event.payload === "object" && !("id" in event.payload)) {
16 event.payload.id = event.payload.syncEvent?.id ?? Identifier.create("evt", "ascending")
17 }
18 return super.emit(eventName, event)
19 }
20}
21
22export const GlobalBus = new GlobalBusEmitter()

Callers 15

emitEventFunction · 0.45
flushFunction · 0.45
event-v2-bridge.tsFile · 0.45
setStatusFunction · 0.45
workspace.tsFile · 0.45
emitDisposedFunction · 0.45
emitUpdatedFunction · 0.45
index.tsFile · 0.45
upgradeFunction · 0.45
worker.tsFile · 0.45

Calls 1

createMethod · 0.65

Tested by 1

emitEventFunction · 0.36