MCPcopy Create free account
hub / github.com/coderoad/coderoad-vscode / handler

Function handler

web-app/src/services/state/useStateMachine.tsx:32–41  ·  view source on GitHub ↗
(event: any)

Source from the content-addressed store, hash-verified

30 const listener = 'message'
31 // propagate channel event to state machine
32 const handler = (event: any) => {
33 // NOTE: must call event.data, cannot destructure. VSCode acts odd
34 const action = event.data
35
36 if (action.source !== 'coderoad') {
37 // filter out events from other extensions
38 return
39 }
40 send(action)
41 }
42 window.addEventListener(listener, handler)
43 return () => {
44 window.removeEventListener(listener, handler)

Callers

nothing calls this directly

Calls 1

sendFunction · 0.50

Tested by

no test coverage detected