MCPcopy
hub / github.com/wavetermdev/waveterm / handleWaveEvent

Function handleWaveEvent

frontend/app/store/wps.ts:130–148  ·  view source on GitHub ↗
(event: WaveEvent)

Source from the content-addressed store, hash-verified

128}
129
130function handleWaveEvent(event: WaveEvent) {
131 // console.log("handleWaveEvent", event);
132 const subjects = waveEventSubjects.get(event.event);
133 if (subjects == null) {
134 return;
135 }
136 for (const scont of subjects) {
137 if (isBlank(scont.scope)) {
138 scont.handler(event);
139 continue;
140 }
141 if (event.scopes == null) {
142 continue;
143 }
144 if (event.scopes.includes(scont.scope)) {
145 scont.handler(event);
146 }
147 }
148}
149
150export {
151 getFileSubject,

Callers 3

recvRpcMessageMethod · 0.90
SysinfoPreviewFunction · 0.90
makeMockRpcFunction · 0.90

Calls 2

isBlankFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected