MCPcopy Index your code
hub / github.com/github/copilot-sdk / on_event

Function on_event

python/samples/manual_tool_resume.py:23–26  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

21 future = loop.create_future()
22
23 def on_event(event):
24 if isinstance(event.data, data_type) and (predicate is None or predicate(event.data)):
25 unsubscribe()
26 future.set_result(event)
27
28 unsubscribe = session.on(on_event)
29 return future

Callers

nothing calls this directly

Calls 2

predicateFunction · 0.85
unsubscribeFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…