MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / emit

Method emit

extensions/vscode/src/mcp/eventBus.ts:24–33  ·  view source on GitHub ↗
(type: CgcEventType, payload?: unknown)

Source from the content-addressed store, hash-verified

22 }
23
24 public emit(type: CgcEventType, payload?: unknown): void {
25 const event: CgcEvent = { type, payload };
26 for (const listener of this.listeners.get(type) ?? []) {
27 try {
28 listener(event);
29 } catch {
30 // individual listener failures must not break the bus
31 }
32 }
33 }
34
35 public dispose(): void {
36 this.listeners.clear();

Callers 7

activateFunction · 0.45
notifyOnlineMethod · 0.45
notifyOfflineMethod · 0.45
handleMessageMethod · 0.45
showMethod · 0.45
startPollingMethod · 0.45

Calls 1

getMethod · 0.65

Tested by

no test coverage detected