MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / emitLifecycle

Function emitLifecycle

projects/electron/src/modules/code/pty.ts:125–133  ·  view source on GitHub ↗
(event: PtyLifecycleEvent)

Source from the content-addressed store, hash-verified

123}
124
125function emitLifecycle(event: PtyLifecycleEvent): void {
126 for (const listener of lifecycleListeners) {
127 try {
128 listener(event)
129 } catch (error) {
130 logger.warn("[Pty] Lifecycle listener failed", error)
131 }
132 }
133}
134
135export function addPtyLifecycleListener(listener: (event: PtyLifecycleEvent) => void): () => void {
136 lifecycleListeners.add(listener)

Callers 5

sendOutputFunction · 0.70
sendExitFunction · 0.70
handleSpawnFunction · 0.70
handleKillFunction · 0.70
cleanupFunction · 0.70

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected